text: # 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 StudentSpecialEducationProgramAssociationsApi(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_special_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_special_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_special_education_program_association_by_id_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.delete_student_special_education_program_association_by_id_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def delete_student_special_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_special_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_special_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_special_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/studentSpecialEducationProgramAssociations/{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_special_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_special_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
          :return: list[EdFiStudentSpecialEducationProgramAssociation]
                   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_special_education_program_associations_with_http_info(**kwargs)  # noqa: E501
          else:
              (data) = self.deletes_student_special_education_program_associations_with_http_info(**kwargs)  # noqa: E501
              return data
  
      def deletes_student_special_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_special_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
          :return: list[EdFiStudentSpecialEducationProgramAssociation]
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['offset', 'limit', 'min_change_version', 'max_change_version']  # 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_special_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_special_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_special_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 = {}
  
          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/studentSpecialEducationProgramAssociations/deletes', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='list[EdFiStudentSpecialEducationProgramAssociation]',  # 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_special_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_special_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 special_education_setting_descriptor: The major instructional setting (more than 50 percent of a student's special education program).
          :param bool idea_eligibility: Indicator of the eligibility of the student to receive special education services according to the Individuals with Disabilities Education Act (IDEA).
          :param date iep_begin_date: The effective date of the most recent IEP.
          :param date iep_end_date: The end date of the most recent IEP.
          :param date iep_review_date: The date of the last IEP review.
          :param date last_evaluation_date: The date of the last special education evaluation.
          :param bool medically_fragile: Indicates whether the Student receiving special education and related services is:         1) in the age range of birth to 22 years, and         2) has a serious, ongoing illness or a chronic condition that has lasted or is anticipated to last at least 12 or more months or has required at least one month of hospitalization, and that requires daily, ongoing medical treatments and monitoring by appropriately trained personnel which may include parents or other family members, and         3) requires the routine use of medical device or of assistive technology to compensate for the loss of usefulness of a body function needed to participate in activities of daily living, and         4) lives with ongoing threat to his or her continued well-being.         Aligns with federal requirements.
          :param bool multiply_disabled: Indicates whether the Student receiving special education and related services has been designated as multiply disabled by the admission, review, and dismissal committee as aligned with federal requirements.
          :param float school_hours_per_week: Indicate the total number of hours of instructional time per week for the school that the student attends.
          :param float special_education_hours_per_week: The number of hours per week for special education instruction and therapy.
          :return: list[EdFiStudentSpecialEducationProgramAssociation]
                   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_special_education_program_associations_with_http_info(**kwargs)  # noqa: E501
          else:
              (data) = self.get_student_special_education_program_associations_with_http_info(**kwargs)  # noqa: E501
              return data
  
      def get_student_special_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_special_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 special_education_setting_descriptor: The major instructional setting (more than 50 percent of a student's special education program).
          :param bool idea_eligibility: Indicator of the eligibility of the student to receive special education services according to the Individuals with Disabilities Education Act (IDEA).
          :param date iep_begin_date: The effective date of the most recent IEP.
          :param date iep_end_date: The end date of the most recent IEP.
          :param date iep_review_date: The date of the last IEP review.
          :param date last_evaluation_date: The date of the last special education evaluation.
          :param bool medically_fragile: Indicates whether the Student receiving special education and related services is:         1) in the age range of birth to 22 years, and         2) has a serious, ongoing illness or a chronic condition that has lasted or is anticipated to last at least 12 or more months or has required at least one month of hospitalization, and that requires daily, ongoing medical treatments and monitoring by appropriately trained personnel which may include parents or other family members, and         3) requires the routine use of medical device or of assistive technology to compensate for the loss of usefulness of a body function needed to participate in activities of daily living, and         4) lives with ongoing threat to his or her continued well-being.         Aligns with federal requirements.
          :param bool multiply_disabled: Indicates whether the Student receiving special education and related services has been designated as multiply disabled by the admission, review, and dismissal committee as aligned with federal requirements.
          :param float school_hours_per_week: Indicate the total number of hours of instructional time per week for the school that the student attends.
          :param float special_education_hours_per_week: The number of hours per week for special education instruction and therapy.
          :return: list[EdFiStudentSpecialEducationProgramAssociation]
                   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', 'special_education_setting_descriptor', 'idea_eligibility', 'iep_begin_date', 'iep_end_date', 'iep_review_date', 'last_evaluation_date', 'medically_fragile', 'multiply_disabled', 'school_hours_per_week', 'special_education_hours_per_week']  # 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_special_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_special_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_special_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_special_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_special_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_special_education_program_associations`, length must be less than or equal to `32`")  # noqa: E501
          if self.api_client.client_side_validation and ('special_education_setting_descriptor' in params and
                                                         len(params['special_education_setting_descriptor']) > 306):
              raise ValueError("Invalid value for parameter `special_education_setting_descriptor` when calling `get_student_special_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 'special_education_setting_descriptor' in params:
              query_params.append(('specialEducationSettingDescriptor', params['special_education_setting_descriptor']))  # noqa: E501
          if 'idea_eligibility' in params:
              query_params.append(('ideaEligibility', params['idea_eligibility']))  # noqa: E501
          if 'iep_begin_date' in params:
              query_params.append(('iepBeginDate', params['iep_begin_date']))  # noqa: E501
          if 'iep_end_date' in params:
              query_params.append(('iepEndDate', params['iep_end_date']))  # noqa: E501
          if 'iep_review_date' in params:
              query_params.append(('iepReviewDate', params['iep_review_date']))  # noqa: E501
          if 'last_evaluation_date' in params:
              query_params.append(('lastEvaluationDate', params['last_evaluation_date']))  # noqa: E501
          if 'medically_fragile' in params:
              query_params.append(('medicallyFragile', params['medically_fragile']))  # noqa: E501
          if 'multiply_disabled' in params:
              query_params.append(('multiplyDisabled', params['multiply_disabled']))  # noqa: E501
          if 'school_hours_per_week' in params:
              query_params.append(('schoolHoursPerWeek', params['school_hours_per_week']))  # noqa: E501
          if 'special_education_hours_per_week' in params:
              query_params.append(('specialEducationHoursPerWeek', params['special_education_hours_per_week']))  # noqa: E501
  
          header_params = {}
  
          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/studentSpecialEducationProgramAssociations', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='list[EdFiStudentSpecialEducationProgramAssociation]',  # 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_special_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_special_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.
          :return: EdFiStudentSpecialEducationProgramAssociation
                   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_special_education_program_associations_by_id_with_http_info(id, **kwargs)  # noqa: E501
          else:
              (data) = self.get_student_special_education_program_associations_by_id_with_http_info(id, **kwargs)  # noqa: E501
              return data
  
      def get_student_special_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_special_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.
          :return: EdFiStudentSpecialEducationProgramAssociation
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['id', 'if_none_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 get_student_special_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_special_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
  
          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/studentSpecialEducationProgramAssociations/{id}', 'GET',
              path_params,
              query_params,
              header_params,
              body=body_params,
              post_params=form_params,
              files=local_var_files,
              response_type='EdFiStudentSpecialEducationProgramAssociation',  # 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_special_education_program_association(self, student_special_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 (you must use a PUT operation to update a resource by \"id\"). The web service will identify whether the resource already exists based on the natural key values provided, and update or create the resource appropriately.  # 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_special_education_program_association(student_special_education_program_association, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param EdFiStudentSpecialEducationProgramAssociation student_special_education_program_association: The JSON representation of the \"studentSpecialEducationProgramAssociation\" 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_special_education_program_association_with_http_info(student_special_education_program_association, **kwargs)  # noqa: E501
          else:
              (data) = self.post_student_special_education_program_association_with_http_info(student_special_education_program_association, **kwargs)  # noqa: E501
              return data
  
      def post_student_special_education_program_association_with_http_info(self, student_special_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 (you must use a PUT operation to update a resource by \"id\"). The web service will identify whether the resource already exists based on the natural key values provided, and update or create the resource appropriately.  # 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_special_education_program_association_with_http_info(student_special_education_program_association, async_req=True)
          >>> result = thread.get()
  
          :param async_req bool
          :param EdFiStudentSpecialEducationProgramAssociation student_special_education_program_association: The JSON representation of the \"studentSpecialEducationProgramAssociation\" resource to be created or updated. (required)
          :return: None
                   If the method is called asynchronously,
                   returns the request thread.
          """
  
          all_params = ['student_special_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_special_education_program_association" % key
                  )
              params[key] = val
          del params['kwargs']
          # verify the required parameter 'student_special_education_program_association' is set
          if self.api_client.client_side_validation and ('student_special_education_program_association' not in params or
                                                         params['student_special_education_program_association'] is None):  # noqa: E501
              raise ValueError("Missing the required parameter `student_special_education_program_association` when calling `post_student_special_education_program_association`")  # noqa: E501
  
          collection_formats = {}
  
          path_params = {}
  
          query_params = []
  
          header_params = {}
  
          form_params = []
          local_var_files = {}
  
          body_params = None
          if 'student_special_education_program_association' in params:
              body_params = params['student_special_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/studentSpecialEducationProgramAssociations', '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_special_education_program_association(self, id, student_special_education_program_association, **kwargs):  # noqa: E501
          """Updates or creates a resource based on the resource identifier.  # noqa: E501
  
          The PUT operation is used to update or create a resource by identifier. If the resource doesn't exist, the resource will be created using that identifier. Additionally, natural key values cannot be changed using this operation, and will not be modified in the database.  If the resource \"id\" is provided in the JSON body, it will be ignored as well.  # 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_special_education_program_association(id, student_special_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 EdFiStudentSpecialEducationProgramAssociation student_special_education_program_association: The JSON representation of the \"studentSpecialEducationProgramAssociation\" 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_special_education_program_association_with_http_info(id, student_special_education_program_association, **kwargs)  # noqa: E501
          else:
              (data) = self.put_student_special_education_program_association_with_http_info(id, student_special_education_program_association, **kwargs)  # noqa: E501
              return data
  
      def put_student_special_education_program_association_with_http_info(self, id, student_special_education_program_association, **kwargs):  # noqa: E501
          """Updates or creates a resource based on the resource identifier.  # noqa: E501
  
          The PUT operation is used to update or create a resource by identifier. If the resource doesn't exist, the resource will be created using that identifier. Additionally, natural key values cannot be changed using this operation, and will not be modified in the database.  If the resource \"id\" is provided in the JSON body, it will be ignored as well.  # 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_special_education_program_association_with_http_info(id, student_special_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 EdFiStudentSpecialEducationProgramAssociation student_special_education_program_association: The JSON representation of the \"studentSpecialEducationProgramAssociation\" 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_special_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_special_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_special_education_program_association`")  # noqa: E501
          # verify the required parameter 'student_special_education_program_association' is set
          if self.api_client.client_side_validation and ('student_special_education_program_association' not in params or
                                                         params['student_special_education_program_association'] is None):  # noqa: E501
              raise ValueError("Missing the required parameter `student_special_education_program_association` when calling `put_student_special_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_special_education_program_association' in params:
              body_params = params['student_special_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/studentSpecialEducationProgramAssociations/{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)
  