<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 StudentSectionAttendanceEventsApi(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_section_attendance_event_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_section_attendance_event_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_section_attendance_event_by_id_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_student_section_attendance_event_by_id_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def delete_student_section_attendance_event_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_section_attendance_event_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_section_attendance_event_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_section_attendance_event_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/studentSectionAttendanceEvents/{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_section_attendance_events(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_section_attendance_events(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[EdFiStudentSectionAttendanceEvent]
                 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_section_attendance_events_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.deletes_student_section_attendance_events_with_http_info(**kwargs)  # noqa: E501
            return data

    def deletes_student_section_attendance_events_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_section_attendance_events_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[EdFiStudentSectionAttendanceEvent]
                 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_section_attendance_events" % 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_section_attendance_events`, 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_section_attendance_events`, 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/studentSectionAttendanceEvents/deletes', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[EdFiStudentSectionAttendanceEvent]',  # 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_section_attendance_events(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_section_attendance_events(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 str attendance_event_category_descriptor: A code describing the attendance event, for example:         Present         Unexcused absence         Excused absence         Tardy.
        :param date event_date: Date for this attendance event.
        :param str local_course_code: The local code assigned by the School that identifies the course offering provided for the instruction of students.
        :param int school_id: The identifier assigned to a school.
        :param int school_year: The identifier for the school year.
        :param str section_identifier: The local identifier assigned to a section.
        :param str session_name: The identifier for the calendar for the academic session (e.g., 2010/11, 2011 Summer).
        :param str student_unique_id: A unique alphanumeric code assigned to a student.
        :param str educational_environment_descriptor: The setting in which a child receives education and related services. This attribute is only used if it differs from the EducationalEnvironment of the Section. This is only used in the AttendanceEvent if different from the associated Section.
        :param str arrival_time: The time of day the student arrived for the attendance event in ISO 8601 format.
        :param str attendance_event_reason: The reported reason for a student's absence.
        :param str departure_time: The time of day the student departed for the attendance event in ISO 8601 format.
        :param float event_duration: The amount of time for the event as recognized by the school: 1 day = 1, 1/2 day = 0.5, 1/3 day = 0.33.
        :param str id: 
        :param int section_attendance_duration: The duration in minutes of the section attendance event.
        :return: list[EdFiStudentSectionAttendanceEvent]
                 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_section_attendance_events_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_student_section_attendance_events_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_student_section_attendance_events_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_section_attendance_events_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 str attendance_event_category_descriptor: A code describing the attendance event, for example:         Present         Unexcused absence         Excused absence         Tardy.
        :param date event_date: Date for this attendance event.
        :param str local_course_code: The local code assigned by the School that identifies the course offering provided for the instruction of students.
        :param int school_id: The identifier assigned to a school.
        :param int school_year: The identifier for the school year.
        :param str section_identifier: The local identifier assigned to a section.
        :param str session_name: The identifier for the calendar for the academic session (e.g., 2010/11, 2011 Summer).
        :param str student_unique_id: A unique alphanumeric code assigned to a student.
        :param str educational_environment_descriptor: The setting in which a child receives education and related services. This attribute is only used if it differs from the EducationalEnvironment of the Section. This is only used in the AttendanceEvent if different from the associated Section.
        :param str arrival_time: The time of day the student arrived for the attendance event in ISO 8601 format.
        :param str attendance_event_reason: The reported reason for a student's absence.
        :param str departure_time: The time of day the student departed for the attendance event in ISO 8601 format.
        :param float event_duration: The amount of time for the event as recognized by the school: 1 day = 1, 1/2 day = 0.5, 1/3 day = 0.33.
        :param str id: 
        :param int section_attendance_duration: The duration in minutes of the section attendance event.
        :return: list[EdFiStudentSectionAttendanceEvent]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['offset', 'limit', 'min_change_version', 'max_change_version', 'total_count', 'attendance_event_category_descriptor', 'event_date', 'local_course_code', 'school_id', 'school_year', 'section_identifier', 'session_name', 'student_unique_id', 'educational_environment_descriptor', 'arrival_time', 'attendance_event_reason', 'departure_time', 'event_duration', 'id', 'section_attendance_duration']  # 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_section_attendance_events" % 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_section_attendance_events`, 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_section_attendance_events`, must be a value greater than or equal to `0`")  # noqa: E501
        if self.api_client.client_side_validation and ('attendance_event_category_descriptor' in params and
                                                       len(params['attendance_event_category_descriptor']) > 306):
            raise ValueError("Invalid value for parameter `attendance_event_category_descriptor` when calling `get_student_section_attendance_events`, length must be less than or equal to `306`")  # noqa: E501
        if self.api_client.client_side_validation and ('local_course_code' in params and
                                                       len(params['local_course_code']) > 60):
            raise ValueError("Invalid value for parameter `local_course_code` when calling `get_student_section_attendance_events`, length must be less than or equal to `60`")  # noqa: E501
        if self.api_client.client_side_validation and ('section_identifier' in params and
                                                       len(params['section_identifier']) > 255):
            raise ValueError("Invalid value for parameter `section_identifier` when calling `get_student_section_attendance_events`, length must be less than or equal to `255`")  # noqa: E501
        if self.api_client.client_side_validation and ('session_name' in params and
                                                       len(params['session_name']) > 60):
            raise ValueError("Invalid value for parameter `session_name` when calling `get_student_section_attendance_events`, length must be less than or equal to `60`")  # 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_section_attendance_events`, length must be less than or equal to `32`")  # noqa: E501
        if self.api_client.client_side_validation and ('educational_environment_descriptor' in params and
                                                       len(params['educational_environment_descriptor']) > 306):
            raise ValueError("Invalid value for parameter `educational_environment_descriptor` when calling `get_student_section_attendance_events`, length must be less than or equal to `306`")  # noqa: E501
        if self.api_client.client_side_validation and ('attendance_event_reason' in params and
                                                       len(params['attendance_event_reason']) > 255):
            raise ValueError("Invalid value for parameter `attendance_event_reason` when calling `get_student_section_attendance_events`, length must be less than or equal to `255`")  # 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 'attendance_event_category_descriptor' in params:
            query_params.append(('attendanceEventCategoryDescriptor', params['attendance_event_category_descriptor']))  # noqa: E501
        if 'event_date' in params:
            query_params.append(('eventDate', params['event_date']))  # noqa: E501
        if 'local_course_code' in params:
            query_params.append(('localCourseCode', params['local_course_code']))  # noqa: E501
        if 'school_id' in params:
            query_params.append(('schoolId', params['school_id']))  # noqa: E501
        if 'school_year' in params:
            query_params.append(('schoolYear', params['school_year']))  # noqa: E501
        if 'section_identifier' in params:
            query_params.append(('sectionIdentifier', params['section_identifier']))  # noqa: E501
        if 'session_name' in params:
            query_params.append(('sessionName', params['session_name']))  # noqa: E501
        if 'student_unique_id' in params:
            query_params.append(('studentUniqueId', params['student_unique_id']))  # noqa: E501
        if 'educational_environment_descriptor' in params:
            query_params.append(('educationalEnvironmentDescriptor', params['educational_environment_descriptor']))  # noqa: E501
        if 'arrival_time' in params:
            query_params.append(('arrivalTime', params['arrival_time']))  # noqa: E501
        if 'attendance_event_reason' in params:
            query_params.append(('attendanceEventReason', params['attendance_event_reason']))  # noqa: E501
        if 'departure_time' in params:
            query_params.append(('departureTime', params['departure_time']))  # noqa: E501
        if 'event_duration' in params:
            query_params.append(('eventDuration', params['event_duration']))  # noqa: E501
        if 'id' in params:
            query_params.append(('id', params['id']))  # noqa: E501
        if 'section_attendance_duration' in params:
            query_params.append(('sectionAttendanceDuration', params['section_attendance_duration']))  # 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/studentSectionAttendanceEvents', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[EdFiStudentSectionAttendanceEvent]',  # 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_section_attendance_events_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_section_attendance_events_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: EdFiStudentSectionAttendanceEvent
                 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_section_attendance_events_by_id_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_student_section_attendance_events_by_id_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def get_student_section_attendance_events_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_section_attendance_events_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: EdFiStudentSectionAttendanceEvent
                 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_section_attendance_events_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_section_attendance_events_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/studentSectionAttendanceEvents/{id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='EdFiStudentSectionAttendanceEvent',  # 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_section_attendance_event(self, student_section_attendance_event, **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_section_attendance_event(student_section_attendance_event, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param EdFiStudentSectionAttendanceEvent student_section_attendance_event: The JSON representation of the \"studentSectionAttendanceEvent\" 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_section_attendance_event_with_http_info(student_section_attendance_event, **kwargs)  # noqa: E501
        else:
            (data) = self.post_student_section_attendance_event_with_http_info(student_section_attendance_event, **kwargs)  # noqa: E501
            return data

    def post_student_section_attendance_event_with_http_info(self, student_section_attendance_event, **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_section_attendance_event_with_http_info(student_section_attendance_event, async_req=True)
        >>> result = thread.get()

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

        all_params = ['student_section_attendance_event']  # 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_section_attendance_event" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'student_section_attendance_event' is set
        if self.api_client.client_side_validation and ('student_section_attendance_event' not in params or
                                                       params['student_section_attendance_event'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `student_section_attendance_event` when calling `post_student_section_attendance_event`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'student_section_attendance_event' in params:
            body_params = params['student_section_attendance_event']
        # 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/studentSectionAttendanceEvents', '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_section_attendance_event(self, id, student_section_attendance_event, **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_section_attendance_event(id, student_section_attendance_event, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: A resource identifier that uniquely identifies the resource. (required)
        :param EdFiStudentSectionAttendanceEvent student_section_attendance_event: The JSON representation of the \"studentSectionAttendanceEvent\" 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_section_attendance_event_with_http_info(id, student_section_attendance_event, **kwargs)  # noqa: E501
        else:
            (data) = self.put_student_section_attendance_event_with_http_info(id, student_section_attendance_event, **kwargs)  # noqa: E501
            return data

    def put_student_section_attendance_event_with_http_info(self, id, student_section_attendance_event, **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_section_attendance_event_with_http_info(id, student_section_attendance_event, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str id: A resource identifier that uniquely identifies the resource. (required)
        :param EdFiStudentSectionAttendanceEvent student_section_attendance_event: The JSON representation of the \"studentSectionAttendanceEvent\" 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_section_attendance_event', '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_section_attendance_event" % 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_section_attendance_event`")  # noqa: E501
        # verify the required parameter 'student_section_attendance_event' is set
        if self.api_client.client_side_validation and ('student_section_attendance_event' not in params or
                                                       params['student_section_attendance_event'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `student_section_attendance_event` when calling `put_student_section_attendance_event`")  # 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_section_attendance_event' in params:
            body_params = params['student_section_attendance_event']
        # 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/studentSectionAttendanceEvents/{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)
