"""
    traQ v3

    traQ v3 API  # noqa: E501

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


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

from traq.api_client import ApiClient, Endpoint as _Endpoint
from traq.model_utils import (  # noqa: F401
    check_allowed_values,
    check_validations,
    date,
    datetime,
    file_type,
    none_type,
    validate_and_convert_types
)
from traq.model.message import Message
from traq.model.patch_webhook_request import PatchWebhookRequest
from traq.model.post_webhook_request import PostWebhookRequest
from traq.model.webhook import Webhook


class WebhookApi(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.change_webhook_icon_endpoint = _Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/webhooks/{webhookId}/icon',
                'operation_id': 'change_webhook_icon',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'webhook_id',
                    'file',
                ],
                'required': [
                    'webhook_id',
                    'file',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'webhook_id':
                        (str,),
                    'file':
                        (file_type,),
                },
                'attribute_map': {
                    'webhook_id': 'webhookId',
                    'file': 'file',
                },
                'location_map': {
                    'webhook_id': 'path',
                    'file': 'form',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [],
                'content_type': [
                    'multipart/form-data'
                ]
            },
            api_client=api_client
        )
        self.create_webhook_endpoint = _Endpoint(
            settings={
                'response_type': (Webhook,),
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/webhooks',
                'operation_id': 'create_webhook',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'post_webhook_request',
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'post_webhook_request':
                        (PostWebhookRequest,),
                },
                'attribute_map': {
                },
                'location_map': {
                    'post_webhook_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )
        self.delete_webhook_endpoint = _Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/webhooks/{webhookId}',
                'operation_id': 'delete_webhook',
                'http_method': 'DELETE',
                'servers': None,
            },
            params_map={
                'all': [
                    'webhook_id',
                ],
                'required': [
                    'webhook_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'webhook_id':
                        (str,),
                },
                'attribute_map': {
                    'webhook_id': 'webhookId',
                },
                'location_map': {
                    'webhook_id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [],
                'content_type': [],
            },
            api_client=api_client
        )
        self.edit_webhook_endpoint = _Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/webhooks/{webhookId}',
                'operation_id': 'edit_webhook',
                'http_method': 'PATCH',
                'servers': None,
            },
            params_map={
                'all': [
                    'webhook_id',
                    'patch_webhook_request',
                ],
                'required': [
                    'webhook_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'webhook_id':
                        (str,),
                    'patch_webhook_request':
                        (PatchWebhookRequest,),
                },
                'attribute_map': {
                    'webhook_id': 'webhookId',
                },
                'location_map': {
                    'webhook_id': 'path',
                    'patch_webhook_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )
        self.get_webhook_endpoint = _Endpoint(
            settings={
                'response_type': (Webhook,),
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/webhooks/{webhookId}',
                'operation_id': 'get_webhook',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'webhook_id',
                ],
                'required': [
                    'webhook_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'webhook_id':
                        (str,),
                },
                'attribute_map': {
                    'webhook_id': 'webhookId',
                },
                'location_map': {
                    'webhook_id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.get_webhook_icon_endpoint = _Endpoint(
            settings={
                'response_type': (file_type,),
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/webhooks/{webhookId}/icon',
                'operation_id': 'get_webhook_icon',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'webhook_id',
                ],
                'required': [
                    'webhook_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'webhook_id':
                        (str,),
                },
                'attribute_map': {
                    'webhook_id': 'webhookId',
                },
                'location_map': {
                    'webhook_id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'image/jpeg',
                    'image/gif',
                    'image/png'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.get_webhook_messages_endpoint = _Endpoint(
            settings={
                'response_type': ([Message],),
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/webhooks/{webhookId}/messages',
                'operation_id': 'get_webhook_messages',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'webhook_id',
                    'limit',
                    'offset',
                    'since',
                    'until',
                    'inclusive',
                    'order',
                ],
                'required': [
                    'webhook_id',
                ],
                'nullable': [
                ],
                'enum': [
                    'order',
                ],
                'validation': [
                    'limit',
                ]
            },
            root_map={
                'validations': {
                    ('limit',): {

                        'inclusive_maximum': 200,
                        'inclusive_minimum': 1,
                    },
                },
                'allowed_values': {
                    ('order',): {

                        "ASC": "asc",
                        "DESC": "desc"
                    },
                },
                'openapi_types': {
                    'webhook_id':
                        (str,),
                    'limit':
                        (int,),
                    'offset':
                        (int,),
                    'since':
                        (datetime,),
                    'until':
                        (datetime,),
                    'inclusive':
                        (bool,),
                    'order':
                        (str,),
                },
                'attribute_map': {
                    'webhook_id': 'webhookId',
                    'limit': 'limit',
                    'offset': 'offset',
                    'since': 'since',
                    'until': 'until',
                    'inclusive': 'inclusive',
                    'order': 'order',
                },
                'location_map': {
                    'webhook_id': 'path',
                    'limit': 'query',
                    'offset': 'query',
                    'since': 'query',
                    'until': 'query',
                    'inclusive': 'query',
                    'order': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.get_webhooks_endpoint = _Endpoint(
            settings={
                'response_type': ([Webhook],),
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/webhooks',
                'operation_id': 'get_webhooks',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'all',
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'all':
                        (bool,),
                },
                'attribute_map': {
                    'all': 'all',
                },
                'location_map': {
                    'all': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.post_webhook_endpoint = _Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/webhooks/{webhookId}',
                'operation_id': 'post_webhook',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'webhook_id',
                    'x_traq_signature',
                    'x_traq_channel_id',
                    'embed',
                    'body',
                ],
                'required': [
                    'webhook_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'webhook_id':
                        (str,),
                    'x_traq_signature':
                        (str,),
                    'x_traq_channel_id':
                        (str,),
                    'embed':
                        (int,),
                    'body':
                        (str,),
                },
                'attribute_map': {
                    'webhook_id': 'webhookId',
                    'x_traq_signature': 'X-TRAQ-Signature',
                    'x_traq_channel_id': 'X-TRAQ-Channel-Id',
                    'embed': 'embed',
                },
                'location_map': {
                    'webhook_id': 'path',
                    'x_traq_signature': 'header',
                    'x_traq_channel_id': 'header',
                    'embed': 'query',
                    'body': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [],
                'content_type': [
                    'text/plain'
                ]
            },
            api_client=api_client
        )

    def change_webhook_icon(
        self,
        webhook_id,
        file,
        **kwargs
    ):
        """Webhookのアイコンを変更  # noqa: E501

        指定したWebhookのアイコン画像を変更します。  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.change_webhook_icon(webhook_id, file, async_req=True)
        >>> result = thread.get()

        Args:
            webhook_id (str): WebhookUUID
            file (file_type): アイコン画像(1MBまでのpng, jpeg, gif)

        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['webhook_id'] = \
            webhook_id
        kwargs['file'] = \
            file
        return self.change_webhook_icon_endpoint.call_with_http_info(**kwargs)

    def create_webhook(
        self,
        **kwargs
    ):
        """Webhookを新規作成  # noqa: E501

        Webhookを新規作成します。 `secret`が空文字の場合、insecureウェブフックが作成されます。  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

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


        Keyword Args:
            post_webhook_request (PostWebhookRequest): [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:
            Webhook
                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.create_webhook_endpoint.call_with_http_info(**kwargs)

    def delete_webhook(
        self,
        webhook_id,
        **kwargs
    ):
        """Webhookを削除  # noqa: E501

        指定したWebhookを削除します。 Webhookによって投稿されたメッセージは削除されません。  # 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_webhook(webhook_id, async_req=True)
        >>> result = thread.get()

        Args:
            webhook_id (str): WebhookUUID

        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['webhook_id'] = \
            webhook_id
        return self.delete_webhook_endpoint.call_with_http_info(**kwargs)

    def edit_webhook(
        self,
        webhook_id,
        **kwargs
    ):
        """Webhook情報を変更  # noqa: E501

        指定したWebhookの情報を変更します。  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.edit_webhook(webhook_id, async_req=True)
        >>> result = thread.get()

        Args:
            webhook_id (str): WebhookUUID

        Keyword Args:
            patch_webhook_request (PatchWebhookRequest): [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:
            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['webhook_id'] = \
            webhook_id
        return self.edit_webhook_endpoint.call_with_http_info(**kwargs)

    def get_webhook(
        self,
        webhook_id,
        **kwargs
    ):
        """Webhook情報を取得  # noqa: E501

        指定したWebhookの詳細を取得します。  # 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_webhook(webhook_id, async_req=True)
        >>> result = thread.get()

        Args:
            webhook_id (str): WebhookUUID

        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:
            Webhook
                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['webhook_id'] = \
            webhook_id
        return self.get_webhook_endpoint.call_with_http_info(**kwargs)

    def get_webhook_icon(
        self,
        webhook_id,
        **kwargs
    ):
        """Webhookのアイコンを取得  # noqa: E501

        指定したWebhookのアイコン画像を取得します  # 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_webhook_icon(webhook_id, async_req=True)
        >>> result = thread.get()

        Args:
            webhook_id (str): WebhookUUID

        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:
            file_type
                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['webhook_id'] = \
            webhook_id
        return self.get_webhook_icon_endpoint.call_with_http_info(**kwargs)

    def get_webhook_messages(
        self,
        webhook_id,
        **kwargs
    ):
        """Webhookの投稿メッセージのリストを取得  # noqa: E501

        指定されたWebhookが投稿したメッセージのリストを返します。  # 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_webhook_messages(webhook_id, async_req=True)
        >>> result = thread.get()

        Args:
            webhook_id (str): WebhookUUID

        Keyword Args:
            limit (int): 取得する件数. [optional]
            offset (int): 取得するオフセット. [optional] if omitted the server will use the default value of 0
            since (datetime): 取得する時間範囲の開始日時. [optional] if omitted the server will use the default value of dateutil_parser('0000-01-01T00:00:00Z')
            until (datetime): 取得する時間範囲の終了日時. [optional]
            inclusive (bool): 範囲の端を含めるかどうか. [optional] if omitted the server will use the default value of False
            order (str): 昇順か降順か. [optional] if omitted the server will use the default value of "desc"
            _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:
            [Message]
                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['webhook_id'] = \
            webhook_id
        return self.get_webhook_messages_endpoint.call_with_http_info(**kwargs)

    def get_webhooks(
        self,
        **kwargs
    ):
        """Webhook情報のリストを取得します  # noqa: E501

        Webhookのリストを取得します。 allがtrueで無い場合は、自分がオーナーのWebhookのリストを返します。  # 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_webhooks(async_req=True)
        >>> result = thread.get()


        Keyword Args:
            all (bool): 全てのWebhookを取得します。権限が必要です。. [optional] if omitted the server will use the default value of False
            _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:
            [Webhook]
                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.get_webhooks_endpoint.call_with_http_info(**kwargs)

    def post_webhook(
        self,
        webhook_id,
        **kwargs
    ):
        """Webhookを送信  # noqa: E501

        Webhookにメッセージを投稿します。 secureなウェブフックに対しては`X-TRAQ-Signature`ヘッダーが必須です。 アーカイブされているチャンネルには投稿できません。  # 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_webhook(webhook_id, async_req=True)
        >>> result = thread.get()

        Args:
            webhook_id (str): WebhookUUID

        Keyword Args:
            x_traq_signature (str): リクエストボディシグネチャ(Secretが設定されている場合は必須). [optional]
            x_traq_channel_id (str): 投稿先のチャンネルID(変更する場合). [optional]
            embed (int): メンション・チャンネルリンクを自動埋め込みする場合に1を指定する. [optional] if omitted the server will use the default value of 0
            body (str): [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:
            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['webhook_id'] = \
            webhook_id
        return self.post_webhook_endpoint.call_with_http_info(**kwargs)

