<reponame>xmarcosx/edfi-notebook<filename>src/v5.3/resources/swagger_client/api/student_migrant_education_program_associations_api.py<gh_stars>1-10
# coding: utf-8

"""
    Ed-Fi Operational Data Store API

    The Ed-Fi ODS / API enables applications to read and write education data stored in an Ed-Fi ODS through a secure REST interface.  ***  > *Note: Consumers of ODS / API information should sanitize all data for display and storage. The ODS / API provides reasonable safeguards against cross-site scripting attacks and other malicious content, but the platform does not and cannot guarantee that the data it contains is free of all potentially harmful content.*  ***   # noqa: E501

    OpenAPI spec version: 3
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from swagger_client.api_client import ApiClient


class StudentMigrantEducationProgramAssociationsApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def delete_student_migrant_education_program_association_by_id(self, id, **kwargs):  # noqa: E501
        """Deletes an existing resource using the resource identifier.  # noqa: E501

        The DELETE operation is used to delete an existing resource by identifier. If the resource doesn't exist, an error will result (the resource will not be found).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_student_migrant_education_program_association_by_id(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: A resource identifier that uniquely identifies the resource. (required)
        :param str if_match: The ETag header value used to prevent the DELETE from removing a resource modified by another consumer.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_student_migrant_education_program_association_by_id_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_student_migrant_education_program_association_by_id_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def delete_student_migrant_education_program_association_by_id_with_http_info(self, id, **kwargs):  # noqa: E501
        """Deletes an existing resource using the resource identifier.  # noqa: E501

        The DELETE operation is used to delete an existing resource by identifier. If the resource doesn't exist, an error will result (the resource will not be found).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_student_migrant_education_program_association_by_id_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: A resource identifier that uniquely identifies the resource. (required)
        :param str if_match: The ETag header value used to prevent the DELETE from removing a resource modified by another consumer.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'if_match']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_student_migrant_education_program_association_by_id" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in params or
                                                       params['id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `id` when calling `delete_student_migrant_education_program_association_by_id`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}
        if 'if_match' in params:
            header_params['If-Match'] = params['if_match']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['oauth2_client_credentials']  # noqa: E501

        return self.api_client.call_api(
            '/ed-fi/studentMigrantEducationProgramAssociations/{id}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def deletes_student_migrant_education_program_associations(self, **kwargs):  # noqa: E501
        """Retrieves deleted resources based on change version.  # noqa: E501

        The DELETES operation is used to retrieve deleted resources.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deletes_student_migrant_education_program_associations(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int offset: Indicates how many items should be skipped before returning results.
        :param int limit: Indicates the maximum number of items that should be returned in the results.
        :param int min_change_version: Used in synchronization to set sequence minimum ChangeVersion
        :param int max_change_version: Used in synchronization to set sequence maximum ChangeVersion
        :param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.
        :return: list[DeletedResource]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.deletes_student_migrant_education_program_associations_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.deletes_student_migrant_education_program_associations_with_http_info(**kwargs)  # noqa: E501
            return data

    def deletes_student_migrant_education_program_associations_with_http_info(self, **kwargs):  # noqa: E501
        """Retrieves deleted resources based on change version.  # noqa: E501

        The DELETES operation is used to retrieve deleted resources.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deletes_student_migrant_education_program_associations_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int offset: Indicates how many items should be skipped before returning results.
        :param int limit: Indicates the maximum number of items that should be returned in the results.
        :param int min_change_version: Used in synchronization to set sequence minimum ChangeVersion
        :param int max_change_version: Used in synchronization to set sequence maximum ChangeVersion
        :param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.
        :return: list[DeletedResource]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['offset', 'limit', 'min_change_version', 'max_change_version', 'snapshot_identifier']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method deletes_student_migrant_education_program_associations" % key
                )
            params[key] = val
        del params['kwargs']

        if self.api_client.client_side_validation and ('limit' in params and params['limit'] > 500):  # noqa: E501
            raise ValueError("Invalid value for parameter `limit` when calling `deletes_student_migrant_education_program_associations`, must be a value less than or equal to `500`")  # noqa: E501
        if self.api_client.client_side_validation and ('limit' in params and params['limit'] < 0):  # noqa: E501
            raise ValueError("Invalid value for parameter `limit` when calling `deletes_student_migrant_education_program_associations`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'offset' in params:
            query_params.append(('offset', params['offset']))  # noqa: E501
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'min_change_version' in params:
            query_params.append(('minChangeVersion', params['min_change_version']))  # noqa: E501
        if 'max_change_version' in params:
            query_params.append(('maxChangeVersion', params['max_change_version']))  # noqa: E501

        header_params = {}
        if 'snapshot_identifier' in params:
            header_params['Snapshot-Identifier'] = params['snapshot_identifier']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['oauth2_client_credentials']  # noqa: E501

        return self.api_client.call_api(
            '/ed-fi/studentMigrantEducationProgramAssociations/deletes', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[DeletedResource]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_student_migrant_education_program_associations(self, **kwargs):  # noqa: E501
        """Retrieves specific resources using the resource's property values (using the \"Get\" pattern).  # noqa: E501

        This GET operation provides access to resources using the \"Get\" search pattern.  The values of any properties of the resource that are specified will be used to return all matching results (if it exists).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_student_migrant_education_program_associations(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int offset: Indicates how many items should be skipped before returning results.
        :param int limit: Indicates the maximum number of items that should be returned in the results.
        :param int min_change_version: Used in synchronization to set sequence minimum ChangeVersion
        :param int max_change_version: Used in synchronization to set sequence maximum ChangeVersion
        :param bool total_count: Indicates if the total number of items available should be returned in the 'Total-Count' header of the response.  If set to false, 'Total-Count' header will not be provided.
        :param date begin_date: The earliest date the student is involved with the program. Typically, this is the date the student becomes eligible for the program.
        :param int education_organization_id: The identifier assigned to an education organization.
        :param int program_education_organization_id: The identifier assigned to an education organization.
        :param str program_name: The formal name of the Program of instruction, training, services, or benefits available through federal, state, or local agencies.
        :param str program_type_descriptor: The type of program.
        :param str student_unique_id: A unique alphanumeric code assigned to a student.
        :param str continuation_of_services_reason_descriptor: The \"continuation of services\" provision found in Section 1304(e) of the statute provides that (1) a child who ceases to be a migratory child during a school term shall be eligible for services until the end of such term; (2) a child who is no longer a migratory child may continue to receive services for one additional school year, but only if comparable services are not available through other programs; and (3) secondary school students who were eligible for services in secondary school may continue to be served through credit accrual programs until graduation. Only students who received services at any time during their 36 month eligibility period may continue to receive services (not necessarily the same service).
        :param date eligibility_expiration_date: The Eligibility Expiration Date is used to determine end of eligibility and to account for a child's eligibility expiring earlier than 36 months from the child's QAD. A child's eligibility would end earlier than 36 months from the child's QAD, if the child is no longer entitled to a free public education (e.g., graduated with a high school diploma, obtained a high school equivalency diploma (HSED), or for other reasons as determined by States' requirements), or if the child passes away.
        :param date last_qualifying_move: Date the last qualifying move occurred; used to compute MEP status.
        :param bool priority_for_services: Report migratory children who are classified as having \"priority for services\" because they are failing, or most at risk of failing to meet the State's challenging State academic content standards and challenging State student academic achievement standards, and their education has been interrupted during the regular school year.
        :param date qualifying_arrival_date: The Qualifying Arrival Date (QAD) is the date the child joins the worker who has already moved, or the date when the worker joins the child who has already moved. The QAD is the date that the child's eligibility for the MEP begins. The QAD is not affected by subsequent non-qualifying moves.
        :param date state_residency_date: The verified State residency for the student.
        :param date us_initial_entry: The month, day, and year on which the Student first entered the U.S.
        :param date us_initial_school_entry: The month, day, and year on which the Student first entered a U.S. school.
        :param date us_most_recent_entry: The month, day, and year of the Student's most recent entry into the U.S.
        :param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.
        :return: list[EdFiStudentMigrantEducationProgramAssociation]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_student_migrant_education_program_associations_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_student_migrant_education_program_associations_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_student_migrant_education_program_associations_with_http_info(self, **kwargs):  # noqa: E501
        """Retrieves specific resources using the resource's property values (using the \"Get\" pattern).  # noqa: E501

        This GET operation provides access to resources using the \"Get\" search pattern.  The values of any properties of the resource that are specified will be used to return all matching results (if it exists).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_student_migrant_education_program_associations_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int offset: Indicates how many items should be skipped before returning results.
        :param int limit: Indicates the maximum number of items that should be returned in the results.
        :param int min_change_version: Used in synchronization to set sequence minimum ChangeVersion
        :param int max_change_version: Used in synchronization to set sequence maximum ChangeVersion
        :param bool total_count: Indicates if the total number of items available should be returned in the 'Total-Count' header of the response.  If set to false, 'Total-Count' header will not be provided.
        :param date begin_date: The earliest date the student is involved with the program. Typically, this is the date the student becomes eligible for the program.
        :param int education_organization_id: The identifier assigned to an education organization.
        :param int program_education_organization_id: The identifier assigned to an education organization.
        :param str program_name: The formal name of the Program of instruction, training, services, or benefits available through federal, state, or local agencies.
        :param str program_type_descriptor: The type of program.
        :param str student_unique_id: A unique alphanumeric code assigned to a student.
        :param str continuation_of_services_reason_descriptor: The \"continuation of services\" provision found in Section 1304(e) of the statute provides that (1) a child who ceases to be a migratory child during a school term shall be eligible for services until the end of such term; (2) a child who is no longer a migratory child may continue to receive services for one additional school year, but only if comparable services are not available through other programs; and (3) secondary school students who were eligible for services in secondary school may continue to be served through credit accrual programs until graduation. Only students who received services at any time during their 36 month eligibility period may continue to receive services (not necessarily the same service).
        :param date eligibility_expiration_date: The Eligibility Expiration Date is used to determine end of eligibility and to account for a child's eligibility expiring earlier than 36 months from the child's QAD. A child's eligibility would end earlier than 36 months from the child's QAD, if the child is no longer entitled to a free public education (e.g., graduated with a high school diploma, obtained a high school equivalency diploma (HSED), or for other reasons as determined by States' requirements), or if the child passes away.
        :param date last_qualifying_move: Date the last qualifying move occurred; used to compute MEP status.
        :param bool priority_for_services: Report migratory children who are classified as having \"priority for services\" because they are failing, or most at risk of failing to meet the State's challenging State academic content standards and challenging State student academic achievement standards, and their education has been interrupted during the regular school year.
        :param date qualifying_arrival_date: The Qualifying Arrival Date (QAD) is the date the child joins the worker who has already moved, or the date when the worker joins the child who has already moved. The QAD is the date that the child's eligibility for the MEP begins. The QAD is not affected by subsequent non-qualifying moves.
        :param date state_residency_date: The verified State residency for the student.
        :param date us_initial_entry: The month, day, and year on which the Student first entered the U.S.
        :param date us_initial_school_entry: The month, day, and year on which the Student first entered a U.S. school.
        :param date us_most_recent_entry: The month, day, and year of the Student's most recent entry into the U.S.
        :param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.
        :return: list[EdFiStudentMigrantEducationProgramAssociation]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['offset', 'limit', 'min_change_version', 'max_change_version', 'total_count', 'begin_date', 'education_organization_id', 'program_education_organization_id', 'program_name', 'program_type_descriptor', 'student_unique_id', 'continuation_of_services_reason_descriptor', 'eligibility_expiration_date', 'last_qualifying_move', 'priority_for_services', 'qualifying_arrival_date', 'state_residency_date', 'us_initial_entry', 'us_initial_school_entry', 'us_most_recent_entry', 'snapshot_identifier']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_student_migrant_education_program_associations" % key
                )
            params[key] = val
        del params['kwargs']

        if self.api_client.client_side_validation and ('limit' in params and params['limit'] > 500):  # noqa: E501
            raise ValueError("Invalid value for parameter `limit` when calling `get_student_migrant_education_program_associations`, must be a value less than or equal to `500`")  # noqa: E501
        if self.api_client.client_side_validation and ('limit' in params and params['limit'] < 0):  # noqa: E501
            raise ValueError("Invalid value for parameter `limit` when calling `get_student_migrant_education_program_associations`, must be a value greater than or equal to `0`")  # noqa: E501
        if self.api_client.client_side_validation and ('program_name' in params and
                                                       len(params['program_name']) > 60):
            raise ValueError("Invalid value for parameter `program_name` when calling `get_student_migrant_education_program_associations`, length must be less than or equal to `60`")  # noqa: E501
        if self.api_client.client_side_validation and ('program_type_descriptor' in params and
                                                       len(params['program_type_descriptor']) > 306):
            raise ValueError("Invalid value for parameter `program_type_descriptor` when calling `get_student_migrant_education_program_associations`, length must be less than or equal to `306`")  # noqa: E501
        if self.api_client.client_side_validation and ('student_unique_id' in params and
                                                       len(params['student_unique_id']) > 32):
            raise ValueError("Invalid value for parameter `student_unique_id` when calling `get_student_migrant_education_program_associations`, length must be less than or equal to `32`")  # noqa: E501
        if self.api_client.client_side_validation and ('continuation_of_services_reason_descriptor' in params and
                                                       len(params['continuation_of_services_reason_descriptor']) > 306):
            raise ValueError("Invalid value for parameter `continuation_of_services_reason_descriptor` when calling `get_student_migrant_education_program_associations`, length must be less than or equal to `306`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'offset' in params:
            query_params.append(('offset', params['offset']))  # noqa: E501
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'min_change_version' in params:
            query_params.append(('minChangeVersion', params['min_change_version']))  # noqa: E501
        if 'max_change_version' in params:
            query_params.append(('maxChangeVersion', params['max_change_version']))  # noqa: E501
        if 'total_count' in params:
            query_params.append(('totalCount', params['total_count']))  # noqa: E501
        if 'begin_date' in params:
            query_params.append(('beginDate', params['begin_date']))  # noqa: E501
        if 'education_organization_id' in params:
            query_params.append(('educationOrganizationId', params['education_organization_id']))  # noqa: E501
        if 'program_education_organization_id' in params:
            query_params.append(('programEducationOrganizationId', params['program_education_organization_id']))  # noqa: E501
        if 'program_name' in params:
            query_params.append(('programName', params['program_name']))  # noqa: E501
        if 'program_type_descriptor' in params:
            query_params.append(('programTypeDescriptor', params['program_type_descriptor']))  # noqa: E501
        if 'student_unique_id' in params:
            query_params.append(('studentUniqueId', params['student_unique_id']))  # noqa: E501
        if 'continuation_of_services_reason_descriptor' in params:
            query_params.append(('continuationOfServicesReasonDescriptor', params['continuation_of_services_reason_descriptor']))  # noqa: E501
        if 'eligibility_expiration_date' in params:
            query_params.append(('eligibilityExpirationDate', params['eligibility_expiration_date']))  # noqa: E501
        if 'last_qualifying_move' in params:
            query_params.append(('lastQualifyingMove', params['last_qualifying_move']))  # noqa: E501
        if 'priority_for_services' in params:
            query_params.append(('priorityForServices', params['priority_for_services']))  # noqa: E501
        if 'qualifying_arrival_date' in params:
            query_params.append(('qualifyingArrivalDate', params['qualifying_arrival_date']))  # noqa: E501
        if 'state_residency_date' in params:
            query_params.append(('stateResidencyDate', params['state_residency_date']))  # noqa: E501
        if 'us_initial_entry' in params:
            query_params.append(('usInitialEntry', params['us_initial_entry']))  # noqa: E501
        if 'us_initial_school_entry' in params:
            query_params.append(('usInitialSchoolEntry', params['us_initial_school_entry']))  # noqa: E501
        if 'us_most_recent_entry' in params:
            query_params.append(('usMostRecentEntry', params['us_most_recent_entry']))  # noqa: E501

        header_params = {}
        if 'snapshot_identifier' in params:
            header_params['Snapshot-Identifier'] = params['snapshot_identifier']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['oauth2_client_credentials']  # noqa: E501

        return self.api_client.call_api(
            '/ed-fi/studentMigrantEducationProgramAssociations', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[EdFiStudentMigrantEducationProgramAssociation]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_student_migrant_education_program_associations_by_id(self, id, **kwargs):  # noqa: E501
        """Retrieves a specific resource using the resource's identifier (using the \"Get By Id\" pattern).  # noqa: E501

        This GET operation retrieves a resource by the specified resource identifier.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_student_migrant_education_program_associations_by_id(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: A resource identifier that uniquely identifies the resource. (required)
        :param str if_none_match: The previously returned ETag header value, used here to prevent the unnecessary data transfer of an unchanged resource.
        :param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.
        :return: EdFiStudentMigrantEducationProgramAssociation
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_student_migrant_education_program_associations_by_id_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_student_migrant_education_program_associations_by_id_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def get_student_migrant_education_program_associations_by_id_with_http_info(self, id, **kwargs):  # noqa: E501
        """Retrieves a specific resource using the resource's identifier (using the \"Get By Id\" pattern).  # noqa: E501

        This GET operation retrieves a resource by the specified resource identifier.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_student_migrant_education_program_associations_by_id_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: A resource identifier that uniquely identifies the resource. (required)
        :param str if_none_match: The previously returned ETag header value, used here to prevent the unnecessary data transfer of an unchanged resource.
        :param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.
        :return: EdFiStudentMigrantEducationProgramAssociation
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'if_none_match', 'snapshot_identifier']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_student_migrant_education_program_associations_by_id" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in params or
                                                       params['id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `id` when calling `get_student_migrant_education_program_associations_by_id`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}
        if 'if_none_match' in params:
            header_params['If-None-Match'] = params['if_none_match']  # noqa: E501
        if 'snapshot_identifier' in params:
            header_params['Snapshot-Identifier'] = params['snapshot_identifier']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['oauth2_client_credentials']  # noqa: E501

        return self.api_client.call_api(
            '/ed-fi/studentMigrantEducationProgramAssociations/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='EdFiStudentMigrantEducationProgramAssociation',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def post_student_migrant_education_program_association(self, student_migrant_education_program_association, **kwargs):  # noqa: E501
        """Creates or updates resources based on the natural key values of the supplied resource.  # noqa: E501

        The POST operation can be used to create or update resources. In database terms, this is often referred to as an \"upsert\" operation (insert + update). Clients should NOT include the resource \"id\" in the JSON body because it will result in an error. The web service will identify whether the resource already exists based on the natural key values provided, and update or create the resource appropriately. It is recommended to use POST for both create and update except while updating natural key of a resource in which case PUT operation must be used.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_student_migrant_education_program_association(student_migrant_education_program_association, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param EdFiStudentMigrantEducationProgramAssociation student_migrant_education_program_association: The JSON representation of the \"studentMigrantEducationProgramAssociation\" resource to be created or updated. (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.post_student_migrant_education_program_association_with_http_info(student_migrant_education_program_association, **kwargs)  # noqa: E501
        else:
            (data) = self.post_student_migrant_education_program_association_with_http_info(student_migrant_education_program_association, **kwargs)  # noqa: E501
            return data

    def post_student_migrant_education_program_association_with_http_info(self, student_migrant_education_program_association, **kwargs):  # noqa: E501
        """Creates or updates resources based on the natural key values of the supplied resource.  # noqa: E501

        The POST operation can be used to create or update resources. In database terms, this is often referred to as an \"upsert\" operation (insert + update). Clients should NOT include the resource \"id\" in the JSON body because it will result in an error. The web service will identify whether the resource already exists based on the natural key values provided, and update or create the resource appropriately. It is recommended to use POST for both create and update except while updating natural key of a resource in which case PUT operation must be used.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_student_migrant_education_program_association_with_http_info(student_migrant_education_program_association, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param EdFiStudentMigrantEducationProgramAssociation student_migrant_education_program_association: The JSON representation of the \"studentMigrantEducationProgramAssociation\" resource to be created or updated. (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['student_migrant_education_program_association']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method post_student_migrant_education_program_association" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'student_migrant_education_program_association' is set
        if self.api_client.client_side_validation and ('student_migrant_education_program_association' not in params or
                                                       params['student_migrant_education_program_association'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `student_migrant_education_program_association` when calling `post_student_migrant_education_program_association`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'student_migrant_education_program_association' in params:
            body_params = params['student_migrant_education_program_association']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['oauth2_client_credentials']  # noqa: E501

        return self.api_client.call_api(
            '/ed-fi/studentMigrantEducationProgramAssociations', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def put_student_migrant_education_program_association(self, id, student_migrant_education_program_association, **kwargs):  # noqa: E501
        """Updates a resource based on the resource identifier.  # noqa: E501

        The PUT operation is used to update a resource by identifier. If the resource identifier (\"id\") is provided in the JSON body, it will be ignored. Additionally, this API resource is not configured for cascading natural key updates. Natural key values for this resource cannot be changed using PUT operation and will not be modified in the database, and so recommendation is to use POST as that supports upsert behavior.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.put_student_migrant_education_program_association(id, student_migrant_education_program_association, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: A resource identifier that uniquely identifies the resource. (required)
        :param EdFiStudentMigrantEducationProgramAssociation student_migrant_education_program_association: The JSON representation of the \"studentMigrantEducationProgramAssociation\" resource to be created or updated. (required)
        :param str if_match: The ETag header value used to prevent the PUT from updating a resource modified by another consumer.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.put_student_migrant_education_program_association_with_http_info(id, student_migrant_education_program_association, **kwargs)  # noqa: E501
        else:
            (data) = self.put_student_migrant_education_program_association_with_http_info(id, student_migrant_education_program_association, **kwargs)  # noqa: E501
            return data

    def put_student_migrant_education_program_association_with_http_info(self, id, student_migrant_education_program_association, **kwargs):  # noqa: E501
        """Updates a resource based on the resource identifier.  # noqa: E501

        The PUT operation is used to update a resource by identifier. If the resource identifier (\"id\") is provided in the JSON body, it will be ignored. Additionally, this API resource is not configured for cascading natural key updates. Natural key values for this resource cannot be changed using PUT operation and will not be modified in the database, and so recommendation is to use POST as that supports upsert behavior.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.put_student_migrant_education_program_association_with_http_info(id, student_migrant_education_program_association, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: A resource identifier that uniquely identifies the resource. (required)
        :param EdFiStudentMigrantEducationProgramAssociation student_migrant_education_program_association: The JSON representation of the \"studentMigrantEducationProgramAssociation\" resource to be created or updated. (required)
        :param str if_match: The ETag header value used to prevent the PUT from updating a resource modified by another consumer.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'student_migrant_education_program_association', 'if_match']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method put_student_migrant_education_program_association" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in params or
                                                       params['id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `id` when calling `put_student_migrant_education_program_association`")  # noqa: E501
        # verify the required parameter 'student_migrant_education_program_association' is set
        if self.api_client.client_side_validation and ('student_migrant_education_program_association' not in params or
                                                       params['student_migrant_education_program_association'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `student_migrant_education_program_association` when calling `put_student_migrant_education_program_association`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}
        if 'if_match' in params:
            header_params['If-Match'] = params['if_match']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        if 'student_migrant_education_program_association' in params:
            body_params = params['student_migrant_education_program_association']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['oauth2_client_credentials']  # noqa: E501

        return self.api_client.call_api(
            '/ed-fi/studentMigrantEducationProgramAssociations/{id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

# coding: utf-8

"""
    Ed-Fi Operational Data Store API

    The Ed-Fi ODS / API enables applications to read and write education data stored in an Ed-Fi ODS through a secure REST interface.  ***  > *Note: Consumers of ODS / API information should sanitize all data for display and storage. The ODS / API provides reasonable safeguards against cross-site scripting attacks and other malicious content, but the platform does not and cannot guarantee that the data it contains is free of all potentially harmful content.*  ***   # noqa: E501

    OpenAPI spec version: 3
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from swagger_client.api_client import ApiClient


class StudentMigrantEducationProgramAssociationsApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def delete_student_migrant_education_program_association_by_id(self, id, **kwargs):  # noqa: E501
        """Deletes an existing resource using the resource identifier.  # noqa: E501

        The DELETE operation is used to delete an existing resource by identifier. If the resource doesn't exist, an error will result (the resource will not be found).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_student_migrant_education_program_association_by_id(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: A resource identifier that uniquely identifies the resource. (required)
        :param str if_match: The ETag header value used to prevent the DELETE from removing a resource modified by another consumer.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_student_migrant_education_program_association_by_id_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_student_migrant_education_program_association_by_id_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def delete_student_migrant_education_program_association_by_id_with_http_info(self, id, **kwargs):  # noqa: E501
        """Deletes an existing resource using the resource identifier.  # noqa: E501

        The DELETE operation is used to delete an existing resource by identifier. If the resource doesn't exist, an error will result (the resource will not be found).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_student_migrant_education_program_association_by_id_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: A resource identifier that uniquely identifies the resource. (required)
        :param str if_match: The ETag header value used to prevent the DELETE from removing a resource modified by another consumer.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'if_match']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_student_migrant_education_program_association_by_id" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in params or
                                                       params['id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `id` when calling `delete_student_migrant_education_program_association_by_id`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}
        if 'if_match' in params:
            header_params['If-Match'] = params['if_match']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['oauth2_client_credentials']  # noqa: E501

        return self.api_client.call_api(
            '/ed-fi/studentMigrantEducationProgramAssociations/{id}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def deletes_student_migrant_education_program_associations(self, **kwargs):  # noqa: E501
        """Retrieves deleted resources based on change version.  # noqa: E501

        The DELETES operation is used to retrieve deleted resources.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deletes_student_migrant_education_program_associations(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int offset: Indicates how many items should be skipped before returning results.
        :param int limit: Indicates the maximum number of items that should be returned in the results.
        :param int min_change_version: Used in synchronization to set sequence minimum ChangeVersion
        :param int max_change_version: Used in synchronization to set sequence maximum ChangeVersion
        :param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.
        :return: list[DeletedResource]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.deletes_student_migrant_education_program_associations_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.deletes_student_migrant_education_program_associations_with_http_info(**kwargs)  # noqa: E501
            return data

    def deletes_student_migrant_education_program_associations_with_http_info(self, **kwargs):  # noqa: E501
        """Retrieves deleted resources based on change version.  # noqa: E501

        The DELETES operation is used to retrieve deleted resources.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.deletes_student_migrant_education_program_associations_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int offset: Indicates how many items should be skipped before returning results.
        :param int limit: Indicates the maximum number of items that should be returned in the results.
        :param int min_change_version: Used in synchronization to set sequence minimum ChangeVersion
        :param int max_change_version: Used in synchronization to set sequence maximum ChangeVersion
        :param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.
        :return: list[DeletedResource]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['offset', 'limit', 'min_change_version', 'max_change_version', 'snapshot_identifier']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method deletes_student_migrant_education_program_associations" % key
                )
            params[key] = val
        del params['kwargs']

        if self.api_client.client_side_validation and ('limit' in params and params['limit'] > 500):  # noqa: E501
            raise ValueError("Invalid value for parameter `limit` when calling `deletes_student_migrant_education_program_associations`, must be a value less than or equal to `500`")  # noqa: E501
        if self.api_client.client_side_validation and ('limit' in params and params['limit'] < 0):  # noqa: E501
            raise ValueError("Invalid value for parameter `limit` when calling `deletes_student_migrant_education_program_associations`, must be a value greater than or equal to `0`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'offset' in params:
            query_params.append(('offset', params['offset']))  # noqa: E501
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'min_change_version' in params:
            query_params.append(('minChangeVersion', params['min_change_version']))  # noqa: E501
        if 'max_change_version' in params:
            query_params.append(('maxChangeVersion', params['max_change_version']))  # noqa: E501

        header_params = {}
        if 'snapshot_identifier' in params:
            header_params['Snapshot-Identifier'] = params['snapshot_identifier']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['oauth2_client_credentials']  # noqa: E501

        return self.api_client.call_api(
            '/ed-fi/studentMigrantEducationProgramAssociations/deletes', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[DeletedResource]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_student_migrant_education_program_associations(self, **kwargs):  # noqa: E501
        """Retrieves specific resources using the resource's property values (using the \"Get\" pattern).  # noqa: E501

        This GET operation provides access to resources using the \"Get\" search pattern.  The values of any properties of the resource that are specified will be used to return all matching results (if it exists).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_student_migrant_education_program_associations(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int offset: Indicates how many items should be skipped before returning results.
        :param int limit: Indicates the maximum number of items that should be returned in the results.
        :param int min_change_version: Used in synchronization to set sequence minimum ChangeVersion
        :param int max_change_version: Used in synchronization to set sequence maximum ChangeVersion
        :param bool total_count: Indicates if the total number of items available should be returned in the 'Total-Count' header of the response.  If set to false, 'Total-Count' header will not be provided.
        :param date begin_date: The earliest date the student is involved with the program. Typically, this is the date the student becomes eligible for the program.
        :param int education_organization_id: The identifier assigned to an education organization.
        :param int program_education_organization_id: The identifier assigned to an education organization.
        :param str program_name: The formal name of the Program of instruction, training, services, or benefits available through federal, state, or local agencies.
        :param str program_type_descriptor: The type of program.
        :param str student_unique_id: A unique alphanumeric code assigned to a student.
        :param str continuation_of_services_reason_descriptor: The \"continuation of services\" provision found in Section 1304(e) of the statute provides that (1) a child who ceases to be a migratory child during a school term shall be eligible for services until the end of such term; (2) a child who is no longer a migratory child may continue to receive services for one additional school year, but only if comparable services are not available through other programs; and (3) secondary school students who were eligible for services in secondary school may continue to be served through credit accrual programs until graduation. Only students who received services at any time during their 36 month eligibility period may continue to receive services (not necessarily the same service).
        :param date eligibility_expiration_date: The Eligibility Expiration Date is used to determine end of eligibility and to account for a child's eligibility expiring earlier than 36 months from the child's QAD. A child's eligibility would end earlier than 36 months from the child's QAD, if the child is no longer entitled to a free public education (e.g., graduated with a high school diploma, obtained a high school equivalency diploma (HSED), or for other reasons as determined by States' requirements), or if the child passes away.
        :param date last_qualifying_move: Date the last qualifying move occurred; used to compute MEP status.
        :param bool priority_for_services: Report migratory children who are classified as having \"priority for services\" because they are failing, or most at risk of failing to meet the State's challenging State academic content standards and challenging State student academic achievement standards, and their education has been interrupted during the regular school year.
        :param date qualifying_arrival_date: The Qualifying Arrival Date (QAD) is the date the child joins the worker who has already moved, or the date when the worker joins the child who has already moved. The QAD is the date that the child's eligibility for the MEP begins. The QAD is not affected by subsequent non-qualifying moves.
        :param date state_residency_date: The verified State residency for the student.
        :param date us_initial_entry: The month, day, and year on which the Student first entered the U.S.
        :param date us_initial_school_entry: The month, day, and year on which the Student first entered a U.S. school.
        :param date us_most_recent_entry: The month, day, and year of the Student's most recent entry into the U.S.
        :param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.
        :return: list[EdFiStudentMigrantEducationProgramAssociation]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_student_migrant_education_program_associations_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_student_migrant_education_program_associations_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_student_migrant_education_program_associations_with_http_info(self, **kwargs):  # noqa: E501
        """Retrieves specific resources using the resource's property values (using the \"Get\" pattern).  # noqa: E501

        This GET operation provides access to resources using the \"Get\" search pattern.  The values of any properties of the resource that are specified will be used to return all matching results (if it exists).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_student_migrant_education_program_associations_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int offset: Indicates how many items should be skipped before returning results.
        :param int limit: Indicates the maximum number of items that should be returned in the results.
        :param int min_change_version: Used in synchronization to set sequence minimum ChangeVersion
        :param int max_change_version: Used in synchronization to set sequence maximum ChangeVersion
        :param bool total_count: Indicates if the total number of items available should be returned in the 'Total-Count' header of the response.  If set to false, 'Total-Count' header will not be provided.
        :param date begin_date: The earliest date the student is involved with the program. Typically, this is the date the student becomes eligible for the program.
        :param int education_organization_id: The identifier assigned to an education organization.
        :param int program_education_organization_id: The identifier assigned to an education organization.
        :param str program_name: The formal name of the Program of instruction, training, services, or benefits available through federal, state, or local agencies.
        :param str program_type_descriptor: The type of program.
        :param str student_unique_id: A unique alphanumeric code assigned to a student.
        :param str continuation_of_services_reason_descriptor: The \"continuation of services\" provision found in Section 1304(e) of the statute provides that (1) a child who ceases to be a migratory child during a school term shall be eligible for services until the end of such term; (2) a child who is no longer a migratory child may continue to receive services for one additional school year, but only if comparable services are not available through other programs; and (3) secondary school students who were eligible for services in secondary school may continue to be served through credit accrual programs until graduation. Only students who received services at any time during their 36 month eligibility period may continue to receive services (not necessarily the same service).
        :param date eligibility_expiration_date: The Eligibility Expiration Date is used to determine end of eligibility and to account for a child's eligibility expiring earlier than 36 months from the child's QAD. A child's eligibility would end earlier than 36 months from the child's QAD, if the child is no longer entitled to a free public education (e.g., graduated with a high school diploma, obtained a high school equivalency diploma (HSED), or for other reasons as determined by States' requirements), or if the child passes away.
        :param date last_qualifying_move: Date the last qualifying move occurred; used to compute MEP status.
        :param bool priority_for_services: Report migratory children who are classified as having \"priority for services\" because they are failing, or most at risk of failing to meet the State's challenging State academic content standards and challenging State student academic achievement standards, and their education has been interrupted during the regular school year.
        :param date qualifying_arrival_date: The Qualifying Arrival Date (QAD) is the date the child joins the worker who has already moved, or the date when the worker joins the child who has already moved. The QAD is the date that the child's eligibility for the MEP begins. The QAD is not affected by subsequent non-qualifying moves.
        :param date state_residency_date: The verified State residency for the student.
        :param date us_initial_entry: The month, day, and year on which the Student first entered the U.S.
        :param date us_initial_school_entry: The month, day, and year on which the Student first entered a U.S. school.
        :param date us_most_recent_entry: The month, day, and year of the Student's most recent entry into the U.S.
        :param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.
        :return: list[EdFiStudentMigrantEducationProgramAssociation]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['offset', 'limit', 'min_change_version', 'max_change_version', 'total_count', 'begin_date', 'education_organization_id', 'program_education_organization_id', 'program_name', 'program_type_descriptor', 'student_unique_id', 'continuation_of_services_reason_descriptor', 'eligibility_expiration_date', 'last_qualifying_move', 'priority_for_services', 'qualifying_arrival_date', 'state_residency_date', 'us_initial_entry', 'us_initial_school_entry', 'us_most_recent_entry', 'snapshot_identifier']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_student_migrant_education_program_associations" % key
                )
            params[key] = val
        del params['kwargs']

        if self.api_client.client_side_validation and ('limit' in params and params['limit'] > 500):  # noqa: E501
            raise ValueError("Invalid value for parameter `limit` when calling `get_student_migrant_education_program_associations`, must be a value less than or equal to `500`")  # noqa: E501
        if self.api_client.client_side_validation and ('limit' in params and params['limit'] < 0):  # noqa: E501
            raise ValueError("Invalid value for parameter `limit` when calling `get_student_migrant_education_program_associations`, must be a value greater than or equal to `0`")  # noqa: E501
        if self.api_client.client_side_validation and ('program_name' in params and
                                                       len(params['program_name']) > 60):
            raise ValueError("Invalid value for parameter `program_name` when calling `get_student_migrant_education_program_associations`, length must be less than or equal to `60`")  # noqa: E501
        if self.api_client.client_side_validation and ('program_type_descriptor' in params and
                                                       len(params['program_type_descriptor']) > 306):
            raise ValueError("Invalid value for parameter `program_type_descriptor` when calling `get_student_migrant_education_program_associations`, length must be less than or equal to `306`")  # noqa: E501
        if self.api_client.client_side_validation and ('student_unique_id' in params and
                                                       len(params['student_unique_id']) > 32):
            raise ValueError("Invalid value for parameter `student_unique_id` when calling `get_student_migrant_education_program_associations`, length must be less than or equal to `32`")  # noqa: E501
        if self.api_client.client_side_validation and ('continuation_of_services_reason_descriptor' in params and
                                                       len(params['continuation_of_services_reason_descriptor']) > 306):
            raise ValueError("Invalid value for parameter `continuation_of_services_reason_descriptor` when calling `get_student_migrant_education_program_associations`, length must be less than or equal to `306`")  # noqa: E501
        collection_formats = {}

        path_params = {}

        query_params = []
        if 'offset' in params:
            query_params.append(('offset', params['offset']))  # noqa: E501
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'min_change_version' in params:
            query_params.append(('minChangeVersion', params['min_change_version']))  # noqa: E501
        if 'max_change_version' in params:
            query_params.append(('maxChangeVersion', params['max_change_version']))  # noqa: E501
        if 'total_count' in params:
            query_params.append(('totalCount', params['total_count']))  # noqa: E501
        if 'begin_date' in params:
            query_params.append(('beginDate', params['begin_date']))  # noqa: E501
        if 'education_organization_id' in params:
            query_params.append(('educationOrganizationId', params['education_organization_id']))  # noqa: E501
        if 'program_education_organization_id' in params:
            query_params.append(('programEducationOrganizationId', params['program_education_organization_id']))  # noqa: E501
        if 'program_name' in params:
            query_params.append(('programName', params['program_name']))  # noqa: E501
        if 'program_type_descriptor' in params:
            query_params.append(('programTypeDescriptor', params['program_type_descriptor']))  # noqa: E501
        if 'student_unique_id' in params:
            query_params.append(('studentUniqueId', params['student_unique_id']))  # noqa: E501
        if 'continuation_of_services_reason_descriptor' in params:
            query_params.append(('continuationOfServicesReasonDescriptor', params['continuation_of_services_reason_descriptor']))  # noqa: E501
        if 'eligibility_expiration_date' in params:
            query_params.append(('eligibilityExpirationDate', params['eligibility_expiration_date']))  # noqa: E501
        if 'last_qualifying_move' in params:
            query_params.append(('lastQualifyingMove', params['last_qualifying_move']))  # noqa: E501
        if 'priority_for_services' in params:
            query_params.append(('priorityForServices', params['priority_for_services']))  # noqa: E501
        if 'qualifying_arrival_date' in params:
            query_params.append(('qualifyingArrivalDate', params['qualifying_arrival_date']))  # noqa: E501
        if 'state_residency_date' in params:
            query_params.append(('stateResidencyDate', params['state_residency_date']))  # noqa: E501
        if 'us_initial_entry' in params:
            query_params.append(('usInitialEntry', params['us_initial_entry']))  # noqa: E501
        if 'us_initial_school_entry' in params:
            query_params.append(('usInitialSchoolEntry', params['us_initial_school_entry']))  # noqa: E501
        if 'us_most_recent_entry' in params:
            query_params.append(('usMostRecentEntry', params['us_most_recent_entry']))  # noqa: E501

        header_params = {}
        if 'snapshot_identifier' in params:
            header_params['Snapshot-Identifier'] = params['snapshot_identifier']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['oauth2_client_credentials']  # noqa: E501

        return self.api_client.call_api(
            '/ed-fi/studentMigrantEducationProgramAssociations', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[EdFiStudentMigrantEducationProgramAssociation]',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_student_migrant_education_program_associations_by_id(self, id, **kwargs):  # noqa: E501
        """Retrieves a specific resource using the resource's identifier (using the \"Get By Id\" pattern).  # noqa: E501

        This GET operation retrieves a resource by the specified resource identifier.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_student_migrant_education_program_associations_by_id(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: A resource identifier that uniquely identifies the resource. (required)
        :param str if_none_match: The previously returned ETag header value, used here to prevent the unnecessary data transfer of an unchanged resource.
        :param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.
        :return: EdFiStudentMigrantEducationProgramAssociation
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_student_migrant_education_program_associations_by_id_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_student_migrant_education_program_associations_by_id_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def get_student_migrant_education_program_associations_by_id_with_http_info(self, id, **kwargs):  # noqa: E501
        """Retrieves a specific resource using the resource's identifier (using the \"Get By Id\" pattern).  # noqa: E501

        This GET operation retrieves a resource by the specified resource identifier.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_student_migrant_education_program_associations_by_id_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: A resource identifier that uniquely identifies the resource. (required)
        :param str if_none_match: The previously returned ETag header value, used here to prevent the unnecessary data transfer of an unchanged resource.
        :param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.
        :return: EdFiStudentMigrantEducationProgramAssociation
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'if_none_match', 'snapshot_identifier']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_student_migrant_education_program_associations_by_id" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in params or
                                                       params['id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `id` when calling `get_student_migrant_education_program_associations_by_id`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}
        if 'if_none_match' in params:
            header_params['If-None-Match'] = params['if_none_match']  # noqa: E501
        if 'snapshot_identifier' in params:
            header_params['Snapshot-Identifier'] = params['snapshot_identifier']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['oauth2_client_credentials']  # noqa: E501

        return self.api_client.call_api(
            '/ed-fi/studentMigrantEducationProgramAssociations/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='EdFiStudentMigrantEducationProgramAssociation',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def post_student_migrant_education_program_association(self, student_migrant_education_program_association, **kwargs):  # noqa: E501
        """Creates or updates resources based on the natural key values of the supplied resource.  # noqa: E501

        The POST operation can be used to create or update resources. In database terms, this is often referred to as an \"upsert\" operation (insert + update). Clients should NOT include the resource \"id\" in the JSON body because it will result in an error. The web service will identify whether the resource already exists based on the natural key values provided, and update or create the resource appropriately. It is recommended to use POST for both create and update except while updating natural key of a resource in which case PUT operation must be used.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_student_migrant_education_program_association(student_migrant_education_program_association, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param EdFiStudentMigrantEducationProgramAssociation student_migrant_education_program_association: The JSON representation of the \"studentMigrantEducationProgramAssociation\" resource to be created or updated. (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.post_student_migrant_education_program_association_with_http_info(student_migrant_education_program_association, **kwargs)  # noqa: E501
        else:
            (data) = self.post_student_migrant_education_program_association_with_http_info(student_migrant_education_program_association, **kwargs)  # noqa: E501
            return data

    def post_student_migrant_education_program_association_with_http_info(self, student_migrant_education_program_association, **kwargs):  # noqa: E501
        """Creates or updates resources based on the natural key values of the supplied resource.  # noqa: E501

        The POST operation can be used to create or update resources. In database terms, this is often referred to as an \"upsert\" operation (insert + update). Clients should NOT include the resource \"id\" in the JSON body because it will result in an error. The web service will identify whether the resource already exists based on the natural key values provided, and update or create the resource appropriately. It is recommended to use POST for both create and update except while updating natural key of a resource in which case PUT operation must be used.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_student_migrant_education_program_association_with_http_info(student_migrant_education_program_association, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param EdFiStudentMigrantEducationProgramAssociation student_migrant_education_program_association: The JSON representation of the \"studentMigrantEducationProgramAssociation\" resource to be created or updated. (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['student_migrant_education_program_association']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method post_student_migrant_education_program_association" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'student_migrant_education_program_association' is set
        if self.api_client.client_side_validation and ('student_migrant_education_program_association' not in params or
                                                       params['student_migrant_education_program_association'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `student_migrant_education_program_association` when calling `post_student_migrant_education_program_association`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'student_migrant_education_program_association' in params:
            body_params = params['student_migrant_education_program_association']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['oauth2_client_credentials']  # noqa: E501

        return self.api_client.call_api(
            '/ed-fi/studentMigrantEducationProgramAssociations', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def put_student_migrant_education_program_association(self, id, student_migrant_education_program_association, **kwargs):  # noqa: E501
        """Updates a resource based on the resource identifier.  # noqa: E501

        The PUT operation is used to update a resource by identifier. If the resource identifier (\"id\") is provided in the JSON body, it will be ignored. Additionally, this API resource is not configured for cascading natural key updates. Natural key values for this resource cannot be changed using PUT operation and will not be modified in the database, and so recommendation is to use POST as that supports upsert behavior.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.put_student_migrant_education_program_association(id, student_migrant_education_program_association, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: A resource identifier that uniquely identifies the resource. (required)
        :param EdFiStudentMigrantEducationProgramAssociation student_migrant_education_program_association: The JSON representation of the \"studentMigrantEducationProgramAssociation\" resource to be created or updated. (required)
        :param str if_match: The ETag header value used to prevent the PUT from updating a resource modified by another consumer.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.put_student_migrant_education_program_association_with_http_info(id, student_migrant_education_program_association, **kwargs)  # noqa: E501
        else:
            (data) = self.put_student_migrant_education_program_association_with_http_info(id, student_migrant_education_program_association, **kwargs)  # noqa: E501
            return data

    def put_student_migrant_education_program_association_with_http_info(self, id, student_migrant_education_program_association, **kwargs):  # noqa: E501
        """Updates a resource based on the resource identifier.  # noqa: E501

        The PUT operation is used to update a resource by identifier. If the resource identifier (\"id\") is provided in the JSON body, it will be ignored. Additionally, this API resource is not configured for cascading natural key updates. Natural key values for this resource cannot be changed using PUT operation and will not be modified in the database, and so recommendation is to use POST as that supports upsert behavior.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.put_student_migrant_education_program_association_with_http_info(id, student_migrant_education_program_association, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: A resource identifier that uniquely identifies the resource. (required)
        :param EdFiStudentMigrantEducationProgramAssociation student_migrant_education_program_association: The JSON representation of the \"studentMigrantEducationProgramAssociation\" resource to be created or updated. (required)
        :param str if_match: The ETag header value used to prevent the PUT from updating a resource modified by another consumer.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'student_migrant_education_program_association', 'if_match']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method put_student_migrant_education_program_association" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ('id' not in params or
                                                       params['id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `id` when calling `put_student_migrant_education_program_association`")  # noqa: E501
        # verify the required parameter 'student_migrant_education_program_association' is set
        if self.api_client.client_side_validation and ('student_migrant_education_program_association' not in params or
                                                       params['student_migrant_education_program_association'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `student_migrant_education_program_association` when calling `put_student_migrant_education_program_association`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}
        if 'if_match' in params:
            header_params['If-Match'] = params['if_match']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        if 'student_migrant_education_program_association' in params:
            body_params = params['student_migrant_education_program_association']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['oauth2_client_credentials']  # noqa: E501

        return self.api_client.call_api(
            '/ed-fi/studentMigrantEducationProgramAssociations/{id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)
# coding: utf-8 Ed-Fi Operational Data Store API      The Ed-Fi ODS / API enables applications to read and write education data stored in an Ed-Fi ODS through a secure REST interface.  ***  > *Note: Consumers of ODS / API information should sanitize all data for display and storage. The ODS / API provides reasonable safeguards against cross-site scripting attacks and other malicious content, but the platform does not and cannot guarantee that the data it contains is free of all potentially harmful content.*  ***   # noqa: E501      OpenAPI spec version: 3          Generated by: https://github.com/swagger-api/swagger-codegen.git # noqa: F401 # python 2 and python 3 compatibility library NOTE: This class is auto generated by the swagger code generator program.      Do not edit the class manually.     Ref: https://github.com/swagger-api/swagger-codegen # noqa: E501 Deletes an existing resource using the resource identifier.  # noqa: E501          The DELETE operation is used to delete an existing resource by identifier. If the resource doesn't exist, an error will result (the resource will not be found).  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.delete_student_migrant_education_program_association_by_id(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str id: A resource identifier that uniquely identifies the resource. (required)         :param str if_match: The ETag header value used to prevent the DELETE from removing a resource modified by another consumer.         :return: None                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Deletes an existing resource using the resource identifier.  # noqa: E501          The DELETE operation is used to delete an existing resource by identifier. If the resource doesn't exist, an error will result (the resource will not be found).  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.delete_student_migrant_education_program_association_by_id_with_http_info(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str id: A resource identifier that uniquely identifies the resource. (required)         :param str if_match: The ETag header value used to prevent the DELETE from removing a resource modified by another consumer.         :return: None                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Retrieves deleted resources based on change version.  # noqa: E501          The DELETES operation is used to retrieve deleted resources.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.deletes_student_migrant_education_program_associations(async_req=True)         >>> result = thread.get()          :param async_req bool         :param int offset: Indicates how many items should be skipped before returning results.         :param int limit: Indicates the maximum number of items that should be returned in the results.         :param int min_change_version: Used in synchronization to set sequence minimum ChangeVersion         :param int max_change_version: Used in synchronization to set sequence maximum ChangeVersion         :param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.         :return: list[DeletedResource]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Retrieves deleted resources based on change version.  # noqa: E501          The DELETES operation is used to retrieve deleted resources.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.deletes_student_migrant_education_program_associations_with_http_info(async_req=True)         >>> result = thread.get()          :param async_req bool         :param int offset: Indicates how many items should be skipped before returning results.         :param int limit: Indicates the maximum number of items that should be returned in the results.         :param int min_change_version: Used in synchronization to set sequence minimum ChangeVersion         :param int max_change_version: Used in synchronization to set sequence maximum ChangeVersion         :param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.         :return: list[DeletedResource]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Retrieves specific resources using the resource's property values (using the \"Get\" pattern).  # noqa: E501          This GET operation provides access to resources using the \"Get\" search pattern.  The values of any properties of the resource that are specified will be used to return all matching results (if it exists).  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.get_student_migrant_education_program_associations(async_req=True)         >>> result = thread.get()          :param async_req bool         :param int offset: Indicates how many items should be skipped before returning results.         :param int limit: Indicates the maximum number of items that should be returned in the results.         :param int min_change_version: Used in synchronization to set sequence minimum ChangeVersion         :param int max_change_version: Used in synchronization to set sequence maximum ChangeVersion         :param bool total_count: Indicates if the total number of items available should be returned in the 'Total-Count' header of the response.  If set to false, 'Total-Count' header will not be provided.         :param date begin_date: The earliest date the student is involved with the program. Typically, this is the date the student becomes eligible for the program.         :param int education_organization_id: The identifier assigned to an education organization.         :param int program_education_organization_id: The identifier assigned to an education organization.         :param str program_name: The formal name of the Program of instruction, training, services, or benefits available through federal, state, or local agencies.         :param str program_type_descriptor: The type of program.         :param str student_unique_id: A unique alphanumeric code assigned to a student.         :param str continuation_of_services_reason_descriptor: The \"continuation of services\" provision found in Section 1304(e) of the statute provides that (1) a child who ceases to be a migratory child during a school term shall be eligible for services until the end of such term; (2) a child who is no longer a migratory child may continue to receive services for one additional school year, but only if comparable services are not available through other programs; and (3) secondary school students who were eligible for services in secondary school may continue to be served through credit accrual programs until graduation. Only students who received services at any time during their 36 month eligibility period may continue to receive services (not necessarily the same service).         :param date eligibility_expiration_date: The Eligibility Expiration Date is used to determine end of eligibility and to account for a child's eligibility expiring earlier than 36 months from the child's QAD. A child's eligibility would end earlier than 36 months from the child's QAD, if the child is no longer entitled to a free public education (e.g., graduated with a high school diploma, obtained a high school equivalency diploma (HSED), or for other reasons as determined by States' requirements), or if the child passes away.         :param date last_qualifying_move: Date the last qualifying move occurred; used to compute MEP status.         :param bool priority_for_services: Report migratory children who are classified as having \"priority for services\" because they are failing, or most at risk of failing to meet the State's challenging State academic content standards and challenging State student academic achievement standards, and their education has been interrupted during the regular school year.         :param date qualifying_arrival_date: The Qualifying Arrival Date (QAD) is the date the child joins the worker who has already moved, or the date when the worker joins the child who has already moved. The QAD is the date that the child's eligibility for the MEP begins. The QAD is not affected by subsequent non-qualifying moves.         :param date state_residency_date: The verified State residency for the student.         :param date us_initial_entry: The month, day, and year on which the Student first entered the U.S.         :param date us_initial_school_entry: The month, day, and year on which the Student first entered a U.S. school.         :param date us_most_recent_entry: The month, day, and year of the Student's most recent entry into the U.S.         :param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.         :return: list[EdFiStudentMigrantEducationProgramAssociation]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Retrieves specific resources using the resource's property values (using the \"Get\" pattern).  # noqa: E501          This GET operation provides access to resources using the \"Get\" search pattern.  The values of any properties of the resource that are specified will be used to return all matching results (if it exists).  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.get_student_migrant_education_program_associations_with_http_info(async_req=True)         >>> result = thread.get()          :param async_req bool         :param int offset: Indicates how many items should be skipped before returning results.         :param int limit: Indicates the maximum number of items that should be returned in the results.         :param int min_change_version: Used in synchronization to set sequence minimum ChangeVersion         :param int max_change_version: Used in synchronization to set sequence maximum ChangeVersion         :param bool total_count: Indicates if the total number of items available should be returned in the 'Total-Count' header of the response.  If set to false, 'Total-Count' header will not be provided.         :param date begin_date: The earliest date the student is involved with the program. Typically, this is the date the student becomes eligible for the program.         :param int education_organization_id: The identifier assigned to an education organization.         :param int program_education_organization_id: The identifier assigned to an education organization.         :param str program_name: The formal name of the Program of instruction, training, services, or benefits available through federal, state, or local agencies.         :param str program_type_descriptor: The type of program.         :param str student_unique_id: A unique alphanumeric code assigned to a student.         :param str continuation_of_services_reason_descriptor: The \"continuation of services\" provision found in Section 1304(e) of the statute provides that (1) a child who ceases to be a migratory child during a school term shall be eligible for services until the end of such term; (2) a child who is no longer a migratory child may continue to receive services for one additional school year, but only if comparable services are not available through other programs; and (3) secondary school students who were eligible for services in secondary school may continue to be served through credit accrual programs until graduation. Only students who received services at any time during their 36 month eligibility period may continue to receive services (not necessarily the same service).         :param date eligibility_expiration_date: The Eligibility Expiration Date is used to determine end of eligibility and to account for a child's eligibility expiring earlier than 36 months from the child's QAD. A child's eligibility would end earlier than 36 months from the child's QAD, if the child is no longer entitled to a free public education (e.g., graduated with a high school diploma, obtained a high school equivalency diploma (HSED), or for other reasons as determined by States' requirements), or if the child passes away.         :param date last_qualifying_move: Date the last qualifying move occurred; used to compute MEP status.         :param bool priority_for_services: Report migratory children who are classified as having \"priority for services\" because they are failing, or most at risk of failing to meet the State's challenging State academic content standards and challenging State student academic achievement standards, and their education has been interrupted during the regular school year.         :param date qualifying_arrival_date: The Qualifying Arrival Date (QAD) is the date the child joins the worker who has already moved, or the date when the worker joins the child who has already moved. The QAD is the date that the child's eligibility for the MEP begins. The QAD is not affected by subsequent non-qualifying moves.         :param date state_residency_date: The verified State residency for the student.         :param date us_initial_entry: The month, day, and year on which the Student first entered the U.S.         :param date us_initial_school_entry: The month, day, and year on which the Student first entered a U.S. school.         :param date us_most_recent_entry: The month, day, and year of the Student's most recent entry into the U.S.         :param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.         :return: list[EdFiStudentMigrantEducationProgramAssociation]                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Retrieves a specific resource using the resource's identifier (using the \"Get By Id\" pattern).  # noqa: E501          This GET operation retrieves a resource by the specified resource identifier.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.get_student_migrant_education_program_associations_by_id(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str id: A resource identifier that uniquely identifies the resource. (required)         :param str if_none_match: The previously returned ETag header value, used here to prevent the unnecessary data transfer of an unchanged resource.         :param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.         :return: EdFiStudentMigrantEducationProgramAssociation                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Retrieves a specific resource using the resource's identifier (using the \"Get By Id\" pattern).  # noqa: E501          This GET operation retrieves a resource by the specified resource identifier.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.get_student_migrant_education_program_associations_by_id_with_http_info(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str id: A resource identifier that uniquely identifies the resource. (required)         :param str if_none_match: The previously returned ETag header value, used here to prevent the unnecessary data transfer of an unchanged resource.         :param str snapshot_identifier: Indicates the Snapshot-Identifier that should be used.         :return: EdFiStudentMigrantEducationProgramAssociation                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Creates or updates resources based on the natural key values of the supplied resource.  # noqa: E501          The POST operation can be used to create or update resources. In database terms, this is often referred to as an \"upsert\" operation (insert + update). Clients should NOT include the resource \"id\" in the JSON body because it will result in an error. The web service will identify whether the resource already exists based on the natural key values provided, and update or create the resource appropriately. It is recommended to use POST for both create and update except while updating natural key of a resource in which case PUT operation must be used.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.post_student_migrant_education_program_association(student_migrant_education_program_association, async_req=True)         >>> result = thread.get()          :param async_req bool         :param EdFiStudentMigrantEducationProgramAssociation student_migrant_education_program_association: The JSON representation of the \"studentMigrantEducationProgramAssociation\" resource to be created or updated. (required)         :return: None                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Creates or updates resources based on the natural key values of the supplied resource.  # noqa: E501          The POST operation can be used to create or update resources. In database terms, this is often referred to as an \"upsert\" operation (insert + update). Clients should NOT include the resource \"id\" in the JSON body because it will result in an error. The web service will identify whether the resource already exists based on the natural key values provided, and update or create the resource appropriately. It is recommended to use POST for both create and update except while updating natural key of a resource in which case PUT operation must be used.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.post_student_migrant_education_program_association_with_http_info(student_migrant_education_program_association, async_req=True)         >>> result = thread.get()          :param async_req bool         :param EdFiStudentMigrantEducationProgramAssociation student_migrant_education_program_association: The JSON representation of the \"studentMigrantEducationProgramAssociation\" resource to be created or updated. (required)         :return: None                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'student_migrant_education_program_association' is set # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Updates a resource based on the resource identifier.  # noqa: E501          The PUT operation is used to update a resource by identifier. If the resource identifier (\"id\") is provided in the JSON body, it will be ignored. Additionally, this API resource is not configured for cascading natural key updates. Natural key values for this resource cannot be changed using PUT operation and will not be modified in the database, and so recommendation is to use POST as that supports upsert behavior.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.put_student_migrant_education_program_association(id, student_migrant_education_program_association, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str id: A resource identifier that uniquely identifies the resource. (required)         :param EdFiStudentMigrantEducationProgramAssociation student_migrant_education_program_association: The JSON representation of the \"studentMigrantEducationProgramAssociation\" resource to be created or updated. (required)         :param str if_match: The ETag header value used to prevent the PUT from updating a resource modified by another consumer.         :return: None                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Updates a resource based on the resource identifier.  # noqa: E501          The PUT operation is used to update a resource by identifier. If the resource identifier (\"id\") is provided in the JSON body, it will be ignored. Additionally, this API resource is not configured for cascading natural key updates. Natural key values for this resource cannot be changed using PUT operation and will not be modified in the database, and so recommendation is to use POST as that supports upsert behavior.  # noqa: E501         This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.put_student_migrant_education_program_association_with_http_info(id, student_migrant_education_program_association, async_req=True)         >>> result = thread.get()          :param async_req bool         :param str id: A resource identifier that uniquely identifies the resource. (required)         :param EdFiStudentMigrantEducationProgramAssociation student_migrant_education_program_association: The JSON representation of the \"studentMigrantEducationProgramAssociation\" resource to be created or updated. (required)         :param str if_match: The ETag header value used to prevent the PUT from updating a resource modified by another consumer.         :return: None                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # verify the required parameter 'student_migrant_education_program_association' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501