"""
    SORACOM API

    SORACOM API v1  # noqa: E501

    The version of the OpenAPI document: VERSION_PLACEHOLDER
    Generated by: https://openapi-generator.tech
"""


import re  # noqa: F401
import sys  # noqa: F401

from soracom_api.api_client import ApiClient, Endpoint as _Endpoint
from soracom_api.model_utils import (  # noqa: F401
    check_allowed_values,
    check_validations,
    date,
    datetime,
    file_type,
    none_type,
    validate_and_convert_types
)
from soracom_api.model.gadget import Gadget
from soracom_api.model.gadget_registration_request import GadgetRegistrationRequest
from soracom_api.model.group import Group
from soracom_api.model.tag_update_request import TagUpdateRequest


class GadgetApi(object):
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client
        self.delete_gadget_tag_endpoint = _Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/gadgets/{product_id}/{serial_number}/tags/{tag_name}',
                'operation_id': 'delete_gadget_tag',
                'http_method': 'DELETE',
                'servers': None,
            },
            params_map={
                'all': [
                    'product_id',
                    'serial_number',
                    'tag_name',
                ],
                'required': [
                    'product_id',
                    'serial_number',
                    'tag_name',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'product_id':
                        (str,),
                    'serial_number':
                        (str,),
                    'tag_name':
                        (str,),
                },
                'attribute_map': {
                    'product_id': 'product_id',
                    'serial_number': 'serial_number',
                    'tag_name': 'tag_name',
                },
                'location_map': {
                    'product_id': 'path',
                    'serial_number': 'path',
                    'tag_name': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [],
                'content_type': [],
            },
            api_client=api_client
        )
        self.disable_termination_on_gadget_endpoint = _Endpoint(
            settings={
                'response_type': (Gadget,),
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/gadgets/{product_id}/{serial_number}/disable_termination',
                'operation_id': 'disable_termination_on_gadget',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'product_id',
                    'serial_number',
                ],
                'required': [
                    'product_id',
                    'serial_number',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'product_id':
                        (str,),
                    'serial_number':
                        (str,),
                },
                'attribute_map': {
                    'product_id': 'product_id',
                    'serial_number': 'serial_number',
                },
                'location_map': {
                    'product_id': 'path',
                    'serial_number': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.enable_termination_on_gadget_endpoint = _Endpoint(
            settings={
                'response_type': (Gadget,),
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/gadgets/{product_id}/{serial_number}/enable_termination',
                'operation_id': 'enable_termination_on_gadget',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'product_id',
                    'serial_number',
                ],
                'required': [
                    'product_id',
                    'serial_number',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'product_id':
                        (str,),
                    'serial_number':
                        (str,),
                },
                'attribute_map': {
                    'product_id': 'product_id',
                    'serial_number': 'serial_number',
                },
                'location_map': {
                    'product_id': 'path',
                    'serial_number': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.get_gadget_endpoint = _Endpoint(
            settings={
                'response_type': (Gadget,),
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/gadgets/{product_id}/{serial_number}',
                'operation_id': 'get_gadget',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'product_id',
                    'serial_number',
                ],
                'required': [
                    'product_id',
                    'serial_number',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'product_id':
                        (str,),
                    'serial_number':
                        (str,),
                },
                'attribute_map': {
                    'product_id': 'product_id',
                    'serial_number': 'serial_number',
                },
                'location_map': {
                    'product_id': 'path',
                    'serial_number': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.list_gadgets_endpoint = _Endpoint(
            settings={
                'response_type': ([Gadget],),
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/gadgets',
                'operation_id': 'list_gadgets',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'product_id',
                    'tag_name',
                    'tag_value',
                    'tag_value_match_mode',
                    'limit',
                    'last_evaluated_key',
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                    'tag_value_match_mode',
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                    ('tag_value_match_mode',): {

                        "EXACT": "exact",
                        "PREFIX": "prefix"
                    },
                },
                'openapi_types': {
                    'product_id':
                        (str,),
                    'tag_name':
                        (str,),
                    'tag_value':
                        (str,),
                    'tag_value_match_mode':
                        (str,),
                    'limit':
                        (int,),
                    'last_evaluated_key':
                        (str,),
                },
                'attribute_map': {
                    'product_id': 'product_id',
                    'tag_name': 'tag_name',
                    'tag_value': 'tag_value',
                    'tag_value_match_mode': 'tag_value_match_mode',
                    'limit': 'limit',
                    'last_evaluated_key': 'last_evaluated_key',
                },
                'location_map': {
                    'product_id': 'query',
                    'tag_name': 'query',
                    'tag_value': 'query',
                    'tag_value_match_mode': 'query',
                    'limit': 'query',
                    'last_evaluated_key': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.put_gadget_tags_endpoint = _Endpoint(
            settings={
                'response_type': (Gadget,),
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/gadgets/{product_id}/{serial_number}/tags',
                'operation_id': 'put_gadget_tags',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'product_id',
                    'serial_number',
                    'tag_update_request',
                ],
                'required': [
                    'product_id',
                    'serial_number',
                    'tag_update_request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'product_id':
                        (str,),
                    'serial_number':
                        (str,),
                    'tag_update_request':
                        ([TagUpdateRequest],),
                },
                'attribute_map': {
                    'product_id': 'product_id',
                    'serial_number': 'serial_number',
                },
                'location_map': {
                    'product_id': 'path',
                    'serial_number': 'path',
                    'tag_update_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )
        self.register_gadget_endpoint = _Endpoint(
            settings={
                'response_type': (Gadget,),
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/gadgets/{product_id}/{serial_number}/register',
                'operation_id': 'register_gadget',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'product_id',
                    'serial_number',
                    'gadget_registration_request',
                ],
                'required': [
                    'product_id',
                    'serial_number',
                    'gadget_registration_request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'product_id':
                        (str,),
                    'serial_number':
                        (str,),
                    'gadget_registration_request':
                        (GadgetRegistrationRequest,),
                },
                'attribute_map': {
                    'product_id': 'product_id',
                    'serial_number': 'serial_number',
                },
                'location_map': {
                    'product_id': 'path',
                    'serial_number': 'path',
                    'gadget_registration_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )
        self.set_gadget_group_endpoint = _Endpoint(
            settings={
                'response_type': (Gadget,),
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/gadgets/{product_id}/{serial_number}/set_group',
                'operation_id': 'set_gadget_group',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'product_id',
                    'serial_number',
                    'group',
                ],
                'required': [
                    'product_id',
                    'serial_number',
                    'group',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'product_id':
                        (str,),
                    'serial_number':
                        (str,),
                    'group':
                        (Group,),
                },
                'attribute_map': {
                    'product_id': 'product_id',
                    'serial_number': 'serial_number',
                },
                'location_map': {
                    'product_id': 'path',
                    'serial_number': 'path',
                    'group': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )
        self.terminate_gadget_endpoint = _Endpoint(
            settings={
                'response_type': (Gadget,),
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/gadgets/{product_id}/{serial_number}/terminate',
                'operation_id': 'terminate_gadget',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'product_id',
                    'serial_number',
                ],
                'required': [
                    'product_id',
                    'serial_number',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'product_id':
                        (str,),
                    'serial_number':
                        (str,),
                },
                'attribute_map': {
                    'product_id': 'product_id',
                    'serial_number': 'serial_number',
                },
                'location_map': {
                    'product_id': 'path',
                    'serial_number': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.unset_gadget_group_endpoint = _Endpoint(
            settings={
                'response_type': (Gadget,),
                'auth': [
                    'api_key',
                    'api_token'
                ],
                'endpoint_path': '/gadgets/{product_id}/{serial_number}/unset_group',
                'operation_id': 'unset_gadget_group',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'product_id',
                    'serial_number',
                ],
                'required': [
                    'product_id',
                    'serial_number',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'product_id':
                        (str,),
                    'serial_number':
                        (str,),
                },
                'attribute_map': {
                    'product_id': 'product_id',
                    'serial_number': 'serial_number',
                },
                'location_map': {
                    'product_id': 'path',
                    'serial_number': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )

    def delete_gadget_tag(
        self,
        product_id,
        serial_number,
        tag_name,
        **kwargs
    ):
        """Delete gadget Tag.  # noqa: E501

        Deletes a tag from the specified gadget.  # 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_gadget_tag(product_id, serial_number, tag_name, async_req=True)
        >>> result = thread.get()

        Args:
            product_id (str): Product ID of the target gadget.
            serial_number (str): Serial Number of the target gadget.
            tag_name (str): Tag name to be deleted. (This will be part of a URL path, so it needs to be percent-encoded. In JavaScript, specify the name after it has been encoded using encodeURIComponent().)

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            None
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['product_id'] = \
            product_id
        kwargs['serial_number'] = \
            serial_number
        kwargs['tag_name'] = \
            tag_name
        return self.delete_gadget_tag_endpoint.call_with_http_info(**kwargs)

    def disable_termination_on_gadget(
        self,
        product_id,
        serial_number,
        **kwargs
    ):
        """Disable Termination of gadget.  # noqa: E501

        Disables termination of specified gadget.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.disable_termination_on_gadget(product_id, serial_number, async_req=True)
        >>> result = thread.get()

        Args:
            product_id (str): Product ID of the target gadget.
            serial_number (str): Serial Number of the target gadget.

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            Gadget
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['product_id'] = \
            product_id
        kwargs['serial_number'] = \
            serial_number
        return self.disable_termination_on_gadget_endpoint.call_with_http_info(**kwargs)

    def enable_termination_on_gadget(
        self,
        product_id,
        serial_number,
        **kwargs
    ):
        """Enable Termination of gadget.  # noqa: E501

        Enables termination of specified gadget.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.enable_termination_on_gadget(product_id, serial_number, async_req=True)
        >>> result = thread.get()

        Args:
            product_id (str): Product ID of the target gadget.
            serial_number (str): Serial Number of the target gadget.

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            Gadget
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['product_id'] = \
            product_id
        kwargs['serial_number'] = \
            serial_number
        return self.enable_termination_on_gadget_endpoint.call_with_http_info(**kwargs)

    def get_gadget(
        self,
        product_id,
        serial_number,
        **kwargs
    ):
        """Get gadget.  # noqa: E501

        Returns information about the specified gadget.  # 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_gadget(product_id, serial_number, async_req=True)
        >>> result = thread.get()

        Args:
            product_id (str): Product ID of the target gadget.
            serial_number (str): Serial Number of the target gadget.

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            Gadget
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['product_id'] = \
            product_id
        kwargs['serial_number'] = \
            serial_number
        return self.get_gadget_endpoint.call_with_http_info(**kwargs)

    def list_gadgets(
        self,
        **kwargs
    ):
        """List gadgets.  # noqa: E501

        Returns a list of gadgets that match certain criteria. If the total number of gadgets does not fit in one page, a URL for accessing the next page is returned in the 'Link' header of the response.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.list_gadgets(async_req=True)
        >>> result = thread.get()


        Keyword Args:
            product_id (str): Product ID for filtering the search.. [optional]
            tag_name (str): Tag name for filtering the search (exact match).. [optional]
            tag_value (str): Tag search string for filtering the search. Required when `tag_name` has been specified.. [optional]
            tag_value_match_mode (str): Tag match mode.. [optional] if omitted the server will use the default value of "exact"
            limit (int): Maximum number of gadgets to retrieve.. [optional]
            last_evaluated_key (str): The ID ({product_id}/{serial_number}) of the last gadget retrieved on the current page. By specifying this parameter, you can continue to retrieve the list from the next device onward.. [optional]
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            [Gadget]
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        return self.list_gadgets_endpoint.call_with_http_info(**kwargs)

    def put_gadget_tags(
        self,
        product_id,
        serial_number,
        tag_update_request,
        **kwargs
    ):
        """Bulk Insert or Update gadget Tags.  # noqa: E501

        Inserts/updates tags for the specified gadget.  # 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_gadget_tags(product_id, serial_number, tag_update_request, async_req=True)
        >>> result = thread.get()

        Args:
            product_id (str): Product ID of the target gadget.
            serial_number (str): Serial Number of the target gadget.
            tag_update_request ([TagUpdateRequest]): Array of tags to be inserted/updated.

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            Gadget
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['product_id'] = \
            product_id
        kwargs['serial_number'] = \
            serial_number
        kwargs['tag_update_request'] = \
            tag_update_request
        return self.put_gadget_tags_endpoint.call_with_http_info(**kwargs)

    def register_gadget(
        self,
        product_id,
        serial_number,
        gadget_registration_request,
        **kwargs
    ):
        """Register a gadget.  # noqa: E501

        Registers a gadget  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.register_gadget(product_id, serial_number, gadget_registration_request, async_req=True)
        >>> result = thread.get()

        Args:
            product_id (str): Product ID of the target gadget.
            serial_number (str): Serial Number of the target gadget.
            gadget_registration_request (GadgetRegistrationRequest): Gadget registration request

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            Gadget
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['product_id'] = \
            product_id
        kwargs['serial_number'] = \
            serial_number
        kwargs['gadget_registration_request'] = \
            gadget_registration_request
        return self.register_gadget_endpoint.call_with_http_info(**kwargs)

    def set_gadget_group(
        self,
        product_id,
        serial_number,
        group,
        **kwargs
    ):
        """Set Group of gadget.  # noqa: E501

        Sets or overwrites a group for the specified gadget.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.set_gadget_group(product_id, serial_number, group, async_req=True)
        >>> result = thread.get()

        Args:
            product_id (str): Product ID of the target gadget.
            serial_number (str): Serial Number of the target gadget.
            group (Group): Group (may include ID only).

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            Gadget
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['product_id'] = \
            product_id
        kwargs['serial_number'] = \
            serial_number
        kwargs['group'] = \
            group
        return self.set_gadget_group_endpoint.call_with_http_info(**kwargs)

    def terminate_gadget(
        self,
        product_id,
        serial_number,
        **kwargs
    ):
        """Terminate gadget.  # noqa: E501

        Terminates the specified gadget  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.terminate_gadget(product_id, serial_number, async_req=True)
        >>> result = thread.get()

        Args:
            product_id (str): Product ID of the target gadget.
            serial_number (str): Serial Number of the target gadget.

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            Gadget
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['product_id'] = \
            product_id
        kwargs['serial_number'] = \
            serial_number
        return self.terminate_gadget_endpoint.call_with_http_info(**kwargs)

    def unset_gadget_group(
        self,
        product_id,
        serial_number,
        **kwargs
    ):
        """Unset Group of gadget.  # noqa: E501

        Removes the group configuration from the specified gadget.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.unset_gadget_group(product_id, serial_number, async_req=True)
        >>> result = thread.get()

        Args:
            product_id (str): Product ID of the target gadget.
            serial_number (str): Serial Number of the target gadget.

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            Gadget
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['product_id'] = \
            product_id
        kwargs['serial_number'] = \
            serial_number
        return self.unset_gadget_group_endpoint.call_with_http_info(**kwargs)

