# coding: utf-8

"""
    Paragon Insights APIs

    API interface for PI application  # noqa: E501

    OpenAPI spec version: 4.0.0
    Contact: healthbot-feedback@juniper.net
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from jnpr.healthbot.swagger.api_client import ApiClient


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

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

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

    def create_healthbot_organization_site_edge_edge_by_id(self, organization_name, site_name, edge_name, edge, **kwargs):  # noqa: E501
        """Create edge by ID  # noqa: E501

        Create operation of resource: edge  # 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_healthbot_organization_site_edge_edge_by_id(organization_name, site_name, edge_name, edge, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str organization_name: ID of organization-name (required)
        :param str site_name: ID of site-name (required)
        :param str edge_name: ID of edge-name (required)
        :param EdgeSchema edge: edgebody object (required)
        :param str x_iam_token: authentication header object
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_healthbot_organization_site_edge_edge_by_id_with_http_info(organization_name, site_name, edge_name, edge, **kwargs)  # noqa: E501
        else:
            (data) = self.create_healthbot_organization_site_edge_edge_by_id_with_http_info(organization_name, site_name, edge_name, edge, **kwargs)  # noqa: E501
            return data

    def create_healthbot_organization_site_edge_edge_by_id_with_http_info(self, organization_name, site_name, edge_name, edge, **kwargs):  # noqa: E501
        """Create edge by ID  # noqa: E501

        Create operation of resource: edge  # 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_healthbot_organization_site_edge_edge_by_id_with_http_info(organization_name, site_name, edge_name, edge, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str organization_name: ID of organization-name (required)
        :param str site_name: ID of site-name (required)
        :param str edge_name: ID of edge-name (required)
        :param EdgeSchema edge: edgebody object (required)
        :param str x_iam_token: authentication header object
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['organization_name', 'site_name', 'edge_name', 'edge', 'x_iam_token']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'organization_name' in params:
            path_params['organization_name'] = params['organization_name']  # noqa: E501
        if 'site_name' in params:
            path_params['site_name'] = params['site_name']  # noqa: E501
        if 'edge_name' in params:
            path_params['edge_name'] = params['edge_name']  # noqa: E501

        query_params = []

        header_params = {}
        if 'x_iam_token' in params:
            header_params['x-iam-token'] = params['x_iam_token']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/config/organization/{organization_name}/site/{site_name}/edge/{edge_name}/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def create_healthbot_organization_site_site_by_id(self, organization_name, site_name, site, **kwargs):  # noqa: E501
        """Create site by ID  # noqa: E501

        Create operation of resource: site  # 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_healthbot_organization_site_site_by_id(organization_name, site_name, site, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str organization_name: ID of organization-name (required)
        :param str site_name: ID of site-name (required)
        :param SiteSchema site: sitebody object (required)
        :param str x_iam_token: authentication header object
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_healthbot_organization_site_site_by_id_with_http_info(organization_name, site_name, site, **kwargs)  # noqa: E501
        else:
            (data) = self.create_healthbot_organization_site_site_by_id_with_http_info(organization_name, site_name, site, **kwargs)  # noqa: E501
            return data

    def create_healthbot_organization_site_site_by_id_with_http_info(self, organization_name, site_name, site, **kwargs):  # noqa: E501
        """Create site by ID  # noqa: E501

        Create operation of resource: site  # 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_healthbot_organization_site_site_by_id_with_http_info(organization_name, site_name, site, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str organization_name: ID of organization-name (required)
        :param str site_name: ID of site-name (required)
        :param SiteSchema site: sitebody object (required)
        :param str x_iam_token: authentication header object
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['organization_name', 'site_name', 'site', 'x_iam_token']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_iam_token' in params:
            header_params['x-iam-token'] = params['x_iam_token']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/config/organization/{organization_name}/site/{site_name}/', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def delete_healthbot_organization_site_edge_edge_by_id(self, organization_name, site_name, edge_name, **kwargs):  # noqa: E501
        """Delete edge by ID  # noqa: E501

        Delete operation of resource: edge  # 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_healthbot_organization_site_edge_edge_by_id(organization_name, site_name, edge_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str organization_name: ID of organization-name (required)
        :param str site_name: ID of site-name (required)
        :param str edge_name: ID of edge-name (required)
        :param str x_iam_token: authentication header object
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_healthbot_organization_site_edge_edge_by_id_with_http_info(organization_name, site_name, edge_name, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_healthbot_organization_site_edge_edge_by_id_with_http_info(organization_name, site_name, edge_name, **kwargs)  # noqa: E501
            return data

    def delete_healthbot_organization_site_edge_edge_by_id_with_http_info(self, organization_name, site_name, edge_name, **kwargs):  # noqa: E501
        """Delete edge by ID  # noqa: E501

        Delete operation of resource: edge  # 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_healthbot_organization_site_edge_edge_by_id_with_http_info(organization_name, site_name, edge_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str organization_name: ID of organization-name (required)
        :param str site_name: ID of site-name (required)
        :param str edge_name: ID of edge-name (required)
        :param str x_iam_token: authentication header object
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['organization_name', 'site_name', 'edge_name', 'x_iam_token']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'organization_name' in params:
            path_params['organization_name'] = params['organization_name']  # noqa: E501
        if 'site_name' in params:
            path_params['site_name'] = params['site_name']  # noqa: E501
        if 'edge_name' in params:
            path_params['edge_name'] = params['edge_name']  # noqa: E501

        query_params = []

        header_params = {}
        if 'x_iam_token' in params:
            header_params['x-iam-token'] = params['x_iam_token']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/config/organization/{organization_name}/site/{site_name}/edge/{edge_name}/', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def delete_healthbot_organization_site_site_by_id(self, organization_name, site_name, **kwargs):  # noqa: E501
        """Delete site by ID  # noqa: E501

        Delete operation of resource: site  # 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_healthbot_organization_site_site_by_id(organization_name, site_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str organization_name: ID of organization-name (required)
        :param str site_name: ID of site-name (required)
        :param str x_iam_token: authentication header object
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_healthbot_organization_site_site_by_id_with_http_info(organization_name, site_name, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_healthbot_organization_site_site_by_id_with_http_info(organization_name, site_name, **kwargs)  # noqa: E501
            return data

    def delete_healthbot_organization_site_site_by_id_with_http_info(self, organization_name, site_name, **kwargs):  # noqa: E501
        """Delete site by ID  # noqa: E501

        Delete operation of resource: site  # 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_healthbot_organization_site_site_by_id_with_http_info(organization_name, site_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str organization_name: ID of organization-name (required)
        :param str site_name: ID of site-name (required)
        :param str x_iam_token: authentication header object
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['organization_name', 'site_name', 'x_iam_token']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_iam_token' in params:
            header_params['x-iam-token'] = params['x_iam_token']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/config/organization/{organization_name}/site/{site_name}/', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def retrieve_healthbot_organization_site_edge_edge_by_id(self, organization_name, site_name, edge_name, **kwargs):  # noqa: E501
        """Retrieve edge by ID  # noqa: E501

        Retrieve operation of resource: edge  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.retrieve_healthbot_organization_site_edge_edge_by_id(organization_name, site_name, edge_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str organization_name: ID of organization-name (required)
        :param str site_name: ID of site-name (required)
        :param str edge_name: ID of edge-name (required)
        :param str x_iam_token: authentication header object
        :param bool working: true queries undeployed configuration
        :return: EdgeSchema
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.retrieve_healthbot_organization_site_edge_edge_by_id_with_http_info(organization_name, site_name, edge_name, **kwargs)  # noqa: E501
        else:
            (data) = self.retrieve_healthbot_organization_site_edge_edge_by_id_with_http_info(organization_name, site_name, edge_name, **kwargs)  # noqa: E501
            return data

    def retrieve_healthbot_organization_site_edge_edge_by_id_with_http_info(self, organization_name, site_name, edge_name, **kwargs):  # noqa: E501
        """Retrieve edge by ID  # noqa: E501

        Retrieve operation of resource: edge  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.retrieve_healthbot_organization_site_edge_edge_by_id_with_http_info(organization_name, site_name, edge_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str organization_name: ID of organization-name (required)
        :param str site_name: ID of site-name (required)
        :param str edge_name: ID of edge-name (required)
        :param str x_iam_token: authentication header object
        :param bool working: true queries undeployed configuration
        :return: EdgeSchema
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['organization_name', 'site_name', 'edge_name', 'x_iam_token', 'working']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'organization_name' in params:
            path_params['organization_name'] = params['organization_name']  # noqa: E501
        if 'site_name' in params:
            path_params['site_name'] = params['site_name']  # noqa: E501
        if 'edge_name' in params:
            path_params['edge_name'] = params['edge_name']  # noqa: E501

        query_params = []
        if 'working' in params:
            query_params.append(('working', params['working']))  # noqa: E501

        header_params = {}
        if 'x_iam_token' in params:
            header_params['x-iam-token'] = params['x_iam_token']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/config/organization/{organization_name}/site/{site_name}/edge/{edge_name}/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='EdgeSchema',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def retrieve_healthbot_organization_site_site_by_id(self, organization_name, site_name, **kwargs):  # noqa: E501
        """Retrieve site by ID  # noqa: E501

        Retrieve operation of resource: site  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.retrieve_healthbot_organization_site_site_by_id(organization_name, site_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str organization_name: ID of organization-name (required)
        :param str site_name: ID of site-name (required)
        :param str x_iam_token: authentication header object
        :param bool working: true queries undeployed configuration
        :return: SiteSchema
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.retrieve_healthbot_organization_site_site_by_id_with_http_info(organization_name, site_name, **kwargs)  # noqa: E501
        else:
            (data) = self.retrieve_healthbot_organization_site_site_by_id_with_http_info(organization_name, site_name, **kwargs)  # noqa: E501
            return data

    def retrieve_healthbot_organization_site_site_by_id_with_http_info(self, organization_name, site_name, **kwargs):  # noqa: E501
        """Retrieve site by ID  # noqa: E501

        Retrieve operation of resource: site  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.retrieve_healthbot_organization_site_site_by_id_with_http_info(organization_name, site_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str organization_name: ID of organization-name (required)
        :param str site_name: ID of site-name (required)
        :param str x_iam_token: authentication header object
        :param bool working: true queries undeployed configuration
        :return: SiteSchema
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['organization_name', 'site_name', 'x_iam_token', 'working']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

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

        query_params = []
        if 'working' in params:
            query_params.append(('working', params['working']))  # noqa: E501

        header_params = {}
        if 'x_iam_token' in params:
            header_params['x-iam-token'] = params['x_iam_token']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/config/organization/{organization_name}/site/{site_name}/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SiteSchema',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_healthbot_organization_site_edge_edge_by_id(self, organization_name, site_name, edge_name, edge, **kwargs):  # noqa: E501
        """Update edge by ID  # noqa: E501

        Update operation of resource: edge  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_healthbot_organization_site_edge_edge_by_id(organization_name, site_name, edge_name, edge, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str organization_name: ID of organization-name (required)
        :param str site_name: ID of site-name (required)
        :param str edge_name: ID of edge-name (required)
        :param EdgeSchema edge: edgebody object (required)
        :param str x_iam_token: authentication header object
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_healthbot_organization_site_edge_edge_by_id_with_http_info(organization_name, site_name, edge_name, edge, **kwargs)  # noqa: E501
        else:
            (data) = self.update_healthbot_organization_site_edge_edge_by_id_with_http_info(organization_name, site_name, edge_name, edge, **kwargs)  # noqa: E501
            return data

    def update_healthbot_organization_site_edge_edge_by_id_with_http_info(self, organization_name, site_name, edge_name, edge, **kwargs):  # noqa: E501
        """Update edge by ID  # noqa: E501

        Update operation of resource: edge  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_healthbot_organization_site_edge_edge_by_id_with_http_info(organization_name, site_name, edge_name, edge, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str organization_name: ID of organization-name (required)
        :param str site_name: ID of site-name (required)
        :param str edge_name: ID of edge-name (required)
        :param EdgeSchema edge: edgebody object (required)
        :param str x_iam_token: authentication header object
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['organization_name', 'site_name', 'edge_name', 'edge', 'x_iam_token']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'organization_name' in params:
            path_params['organization_name'] = params['organization_name']  # noqa: E501
        if 'site_name' in params:
            path_params['site_name'] = params['site_name']  # noqa: E501
        if 'edge_name' in params:
            path_params['edge_name'] = params['edge_name']  # noqa: E501

        query_params = []

        header_params = {}
        if 'x_iam_token' in params:
            header_params['x-iam-token'] = params['x_iam_token']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/config/organization/{organization_name}/site/{site_name}/edge/{edge_name}/', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_healthbot_organization_site_site_by_id(self, organization_name, site_name, site, **kwargs):  # noqa: E501
        """Update site by ID  # noqa: E501

        Update operation of resource: site  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_healthbot_organization_site_site_by_id(organization_name, site_name, site, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str organization_name: ID of organization-name (required)
        :param str site_name: ID of site-name (required)
        :param SiteSchema site: sitebody object (required)
        :param str x_iam_token: authentication header object
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_healthbot_organization_site_site_by_id_with_http_info(organization_name, site_name, site, **kwargs)  # noqa: E501
        else:
            (data) = self.update_healthbot_organization_site_site_by_id_with_http_info(organization_name, site_name, site, **kwargs)  # noqa: E501
            return data

    def update_healthbot_organization_site_site_by_id_with_http_info(self, organization_name, site_name, site, **kwargs):  # noqa: E501
        """Update site by ID  # noqa: E501

        Update operation of resource: site  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_healthbot_organization_site_site_by_id_with_http_info(organization_name, site_name, site, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str organization_name: ID of organization-name (required)
        :param str site_name: ID of site-name (required)
        :param SiteSchema site: sitebody object (required)
        :param str x_iam_token: authentication header object
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['organization_name', 'site_name', 'site', 'x_iam_token']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_iam_token' in params:
            header_params['x-iam-token'] = params['x_iam_token']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/config/organization/{organization_name}/site/{site_name}/', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)
