"""
    Delphix DCT API

    Delphix DCT API  # noqa: E501

    The version of the OpenAPI document: 3.8.0
    Contact: support@delphix.com
    Generated by: https://openapi-generator.tech
"""


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

from delphix.api.gateway.api_client import ApiClient, Endpoint as _Endpoint
from delphix.api.gateway.model_utils import (  # noqa: F401
    check_allowed_values,
    check_validations,
    date,
    datetime,
    file_type,
    none_type,
    validate_and_convert_types
)
from delphix.api.gateway.model.bookmark_compatible_environments_response import BookmarkCompatibleEnvironmentsResponse
from delphix.api.gateway.model.bookmark_compatible_repository_request import BookmarkCompatibleRepositoryRequest
from delphix.api.gateway.model.create_environment_response import CreateEnvironmentResponse
from delphix.api.gateway.model.create_environment_user_response import CreateEnvironmentUserResponse
from delphix.api.gateway.model.create_host_response import CreateHostResponse
from delphix.api.gateway.model.delete_environment_response import DeleteEnvironmentResponse
from delphix.api.gateway.model.delete_environment_user_response import DeleteEnvironmentUserResponse
from delphix.api.gateway.model.delete_host_response import DeleteHostResponse
from delphix.api.gateway.model.delete_tag import DeleteTag
from delphix.api.gateway.model.disable_environment_response import DisableEnvironmentResponse
from delphix.api.gateway.model.enable_environment_response import EnableEnvironmentResponse
from delphix.api.gateway.model.environment import Environment
from delphix.api.gateway.model.environment_create_parameters import EnvironmentCreateParameters
from delphix.api.gateway.model.environment_update_parameters import EnvironmentUpdateParameters
from delphix.api.gateway.model.environment_user_params import EnvironmentUserParams
from delphix.api.gateway.model.host_create_parameters import HostCreateParameters
from delphix.api.gateway.model.host_update_parameters import HostUpdateParameters
from delphix.api.gateway.model.list_environment_users import ListEnvironmentUsers
from delphix.api.gateway.model.list_environments_response import ListEnvironmentsResponse
from delphix.api.gateway.model.location_compatible_environments_response import LocationCompatibleEnvironmentsResponse
from delphix.api.gateway.model.location_compatible_repository_request import LocationCompatibleRepositoryRequest
from delphix.api.gateway.model.primary_environment_user_response import PrimaryEnvironmentUserResponse
from delphix.api.gateway.model.refresh_environment_response import RefreshEnvironmentResponse
from delphix.api.gateway.model.search_body import SearchBody
from delphix.api.gateway.model.search_environments_response import SearchEnvironmentsResponse
from delphix.api.gateway.model.snapshot_compatible_environments_response import SnapshotCompatibleEnvironmentsResponse
from delphix.api.gateway.model.snapshot_compatible_repository_request import SnapshotCompatibleRepositoryRequest
from delphix.api.gateway.model.tags_request import TagsRequest
from delphix.api.gateway.model.tags_response import TagsResponse
from delphix.api.gateway.model.timestamp_compatible_environments_response import TimestampCompatibleEnvironmentsResponse
from delphix.api.gateway.model.timestamp_compatible_repository_request import TimestampCompatibleRepositoryRequest
from delphix.api.gateway.model.update_environment_response import UpdateEnvironmentResponse
from delphix.api.gateway.model.update_environment_user_response import UpdateEnvironmentUserResponse
from delphix.api.gateway.model.update_host_response import UpdateHostResponse
from delphix.api.gateway.model.update_repository_parameters import UpdateRepositoryParameters
from delphix.api.gateway.model.update_repository_response import UpdateRepositoryResponse


class EnvironmentsApi(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

        def __compatible_repositories_by_location(
            self,
            location_compatible_repository_request,
            **kwargs
        ):
            """Get compatible repositories corresponding to the location.  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.compatible_repositories_by_location(location_compatible_repository_request, async_req=True)
            >>> result = thread.get()

            Args:
                location_compatible_repository_request (LocationCompatibleRepositoryRequest): The request to get compatible repositories for provisioning a new VDB by location.

            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.
                _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:
                LocationCompatibleEnvironmentsResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['location_compatible_repository_request'] = \
                location_compatible_repository_request
            return self.call_with_http_info(**kwargs)

        self.compatible_repositories_by_location = _Endpoint(
            settings={
                'response_type': (LocationCompatibleEnvironmentsResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/compatible_repositories_by_location',
                'operation_id': 'compatible_repositories_by_location',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'location_compatible_repository_request',
                ],
                'required': [
                    'location_compatible_repository_request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'location_compatible_repository_request':
                        (LocationCompatibleRepositoryRequest,),
                },
                'attribute_map': {
                },
                'location_map': {
                    'location_compatible_repository_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__compatible_repositories_by_location
        )

        def __compatible_repositories_by_snapshot(
            self,
            snapshot_compatible_repository_request,
            **kwargs
        ):
            """Get compatible repositories corresponding to the snapshot.  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.compatible_repositories_by_snapshot(snapshot_compatible_repository_request, async_req=True)
            >>> result = thread.get()

            Args:
                snapshot_compatible_repository_request (SnapshotCompatibleRepositoryRequest): The request to get compatible repositories for provisioning a new VDB by snapshot.

            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.
                _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:
                SnapshotCompatibleEnvironmentsResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['snapshot_compatible_repository_request'] = \
                snapshot_compatible_repository_request
            return self.call_with_http_info(**kwargs)

        self.compatible_repositories_by_snapshot = _Endpoint(
            settings={
                'response_type': (SnapshotCompatibleEnvironmentsResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/compatible_repositories_by_snapshot',
                'operation_id': 'compatible_repositories_by_snapshot',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'snapshot_compatible_repository_request',
                ],
                'required': [
                    'snapshot_compatible_repository_request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'snapshot_compatible_repository_request':
                        (SnapshotCompatibleRepositoryRequest,),
                },
                'attribute_map': {
                },
                'location_map': {
                    'snapshot_compatible_repository_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__compatible_repositories_by_snapshot
        )

        def __compatible_repositories_by_timestamp(
            self,
            timestamp_compatible_repository_request,
            **kwargs
        ):
            """Get compatible repositories corresponding to the timestamp.  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.compatible_repositories_by_timestamp(timestamp_compatible_repository_request, async_req=True)
            >>> result = thread.get()

            Args:
                timestamp_compatible_repository_request (TimestampCompatibleRepositoryRequest): The request to get compatible repositories for provisioning a new VDB by timestamp.

            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.
                _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:
                TimestampCompatibleEnvironmentsResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['timestamp_compatible_repository_request'] = \
                timestamp_compatible_repository_request
            return self.call_with_http_info(**kwargs)

        self.compatible_repositories_by_timestamp = _Endpoint(
            settings={
                'response_type': (TimestampCompatibleEnvironmentsResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/compatible_repositories_by_timestamp',
                'operation_id': 'compatible_repositories_by_timestamp',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'timestamp_compatible_repository_request',
                ],
                'required': [
                    'timestamp_compatible_repository_request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'timestamp_compatible_repository_request':
                        (TimestampCompatibleRepositoryRequest,),
                },
                'attribute_map': {
                },
                'location_map': {
                    'timestamp_compatible_repository_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__compatible_repositories_by_timestamp
        )

        def __compatible_repositories_from_bookmark(
            self,
            bookmark_compatible_repository_request,
            **kwargs
        ):
            """Get compatible repositories corresponding to the bookmark.  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.compatible_repositories_from_bookmark(bookmark_compatible_repository_request, async_req=True)
            >>> result = thread.get()

            Args:
                bookmark_compatible_repository_request (BookmarkCompatibleRepositoryRequest): The request to get compatible repositories for provisioning a new VDB by bookmark.

            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.
                _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:
                BookmarkCompatibleEnvironmentsResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['bookmark_compatible_repository_request'] = \
                bookmark_compatible_repository_request
            return self.call_with_http_info(**kwargs)

        self.compatible_repositories_from_bookmark = _Endpoint(
            settings={
                'response_type': (BookmarkCompatibleEnvironmentsResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/compatible_repositories_from_bookmark',
                'operation_id': 'compatible_repositories_from_bookmark',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'bookmark_compatible_repository_request',
                ],
                'required': [
                    'bookmark_compatible_repository_request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'bookmark_compatible_repository_request':
                        (BookmarkCompatibleRepositoryRequest,),
                },
                'attribute_map': {
                },
                'location_map': {
                    'bookmark_compatible_repository_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__compatible_repositories_from_bookmark
        )

        def __create_environment(
            self,
            environment_create_parameters,
            **kwargs
        ):
            """Create an environment.  # 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_environment(environment_create_parameters, async_req=True)
            >>> result = thread.get()

            Args:
                environment_create_parameters (EnvironmentCreateParameters): The parameters to create an environment.

            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.
                _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:
                CreateEnvironmentResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['environment_create_parameters'] = \
                environment_create_parameters
            return self.call_with_http_info(**kwargs)

        self.create_environment = _Endpoint(
            settings={
                'response_type': (CreateEnvironmentResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments',
                'operation_id': 'create_environment',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'environment_create_parameters',
                ],
                'required': [
                    'environment_create_parameters',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'environment_create_parameters':
                        (EnvironmentCreateParameters,),
                },
                'attribute_map': {
                },
                'location_map': {
                    'environment_create_parameters': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__create_environment
        )

        def __create_environment_tags(
            self,
            environment_id,
            tags_request,
            **kwargs
        ):
            """Create tags for an Environment.  # 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_environment_tags(environment_id, tags_request, async_req=True)
            >>> result = thread.get()

            Args:
                environment_id (str): The ID of the environment.
                tags_request (TagsRequest): Tags information for Environment.

            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.
                _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:
                TagsResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['environment_id'] = \
                environment_id
            kwargs['tags_request'] = \
                tags_request
            return self.call_with_http_info(**kwargs)

        self.create_environment_tags = _Endpoint(
            settings={
                'response_type': (TagsResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/{environmentId}/tags',
                'operation_id': 'create_environment_tags',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'environment_id',
                    'tags_request',
                ],
                'required': [
                    'environment_id',
                    'tags_request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'environment_id',
                ]
            },
            root_map={
                'validations': {
                    ('environment_id',): {

                        'min_length': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'environment_id':
                        (str,),
                    'tags_request':
                        (TagsRequest,),
                },
                'attribute_map': {
                    'environment_id': 'environmentId',
                },
                'location_map': {
                    'environment_id': 'path',
                    'tags_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__create_environment_tags
        )

        def __create_environment_user(
            self,
            environment_id,
            **kwargs
        ):
            """Create environment user.  # 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_environment_user(environment_id, async_req=True)
            >>> result = thread.get()

            Args:
                environment_id (str): The ID of the environment.

            Keyword Args:
                environment_user_params (EnvironmentUserParams): The parameters to create an environment user.. [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.
                _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:
                CreateEnvironmentUserResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['environment_id'] = \
                environment_id
            return self.call_with_http_info(**kwargs)

        self.create_environment_user = _Endpoint(
            settings={
                'response_type': (CreateEnvironmentUserResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/{environmentId}/users',
                'operation_id': 'create_environment_user',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'environment_id',
                    'environment_user_params',
                ],
                'required': [
                    'environment_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'environment_id',
                ]
            },
            root_map={
                'validations': {
                    ('environment_id',): {

                        'min_length': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'environment_id':
                        (str,),
                    'environment_user_params':
                        (EnvironmentUserParams,),
                },
                'attribute_map': {
                    'environment_id': 'environmentId',
                },
                'location_map': {
                    'environment_id': 'path',
                    'environment_user_params': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__create_environment_user
        )

        def __create_host(
            self,
            environment_id,
            host_create_parameters,
            **kwargs
        ):
            """Create a new Host.  # 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_host(environment_id, host_create_parameters, async_req=True)
            >>> result = thread.get()

            Args:
                environment_id (str): The ID of the environment.
                host_create_parameters (HostCreateParameters):

            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.
                _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:
                CreateHostResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['environment_id'] = \
                environment_id
            kwargs['host_create_parameters'] = \
                host_create_parameters
            return self.call_with_http_info(**kwargs)

        self.create_host = _Endpoint(
            settings={
                'response_type': (CreateHostResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/{environmentId}/hosts',
                'operation_id': 'create_host',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'environment_id',
                    'host_create_parameters',
                ],
                'required': [
                    'environment_id',
                    'host_create_parameters',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'environment_id',
                ]
            },
            root_map={
                'validations': {
                    ('environment_id',): {

                        'min_length': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'environment_id':
                        (str,),
                    'host_create_parameters':
                        (HostCreateParameters,),
                },
                'attribute_map': {
                    'environment_id': 'environmentId',
                },
                'location_map': {
                    'environment_id': 'path',
                    'host_create_parameters': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__create_host
        )

        def __delete_environment(
            self,
            environment_id,
            **kwargs
        ):
            """Delete an environment by ID.  # 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_environment(environment_id, async_req=True)
            >>> result = thread.get()

            Args:
                environment_id (str): The ID of the environment.

            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.
                _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:
                DeleteEnvironmentResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['environment_id'] = \
                environment_id
            return self.call_with_http_info(**kwargs)

        self.delete_environment = _Endpoint(
            settings={
                'response_type': (DeleteEnvironmentResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/{environmentId}',
                'operation_id': 'delete_environment',
                'http_method': 'DELETE',
                'servers': None,
            },
            params_map={
                'all': [
                    'environment_id',
                ],
                'required': [
                    'environment_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'environment_id',
                ]
            },
            root_map={
                'validations': {
                    ('environment_id',): {

                        'min_length': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'environment_id':
                        (str,),
                },
                'attribute_map': {
                    'environment_id': 'environmentId',
                },
                'location_map': {
                    'environment_id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__delete_environment
        )

        def __delete_environment_tags(
            self,
            environment_id,
            **kwargs
        ):
            """Delete tags for an Environment.  # 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_environment_tags(environment_id, async_req=True)
            >>> result = thread.get()

            Args:
                environment_id (str): The ID of the environment.

            Keyword Args:
                delete_tag (DeleteTag): The parameters to delete tags. [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.
                _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['_host_index'] = kwargs.get('_host_index')
            kwargs['environment_id'] = \
                environment_id
            return self.call_with_http_info(**kwargs)

        self.delete_environment_tags = _Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/{environmentId}/tags/delete',
                'operation_id': 'delete_environment_tags',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'environment_id',
                    'delete_tag',
                ],
                'required': [
                    'environment_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'environment_id',
                ]
            },
            root_map={
                'validations': {
                    ('environment_id',): {

                        'min_length': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'environment_id':
                        (str,),
                    'delete_tag':
                        (DeleteTag,),
                },
                'attribute_map': {
                    'environment_id': 'environmentId',
                },
                'location_map': {
                    'environment_id': 'path',
                    'delete_tag': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__delete_environment_tags
        )

        def __delete_environment_user(
            self,
            environment_id,
            user_ref,
            **kwargs
        ):
            """Delete environment user.  # 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_environment_user(environment_id, user_ref, async_req=True)
            >>> result = thread.get()

            Args:
                environment_id (str): The ID of the environment.
                user_ref (str): Environment user reference.

            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.
                _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:
                DeleteEnvironmentUserResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['environment_id'] = \
                environment_id
            kwargs['user_ref'] = \
                user_ref
            return self.call_with_http_info(**kwargs)

        self.delete_environment_user = _Endpoint(
            settings={
                'response_type': (DeleteEnvironmentUserResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/{environmentId}/users/{userRef}',
                'operation_id': 'delete_environment_user',
                'http_method': 'DELETE',
                'servers': None,
            },
            params_map={
                'all': [
                    'environment_id',
                    'user_ref',
                ],
                'required': [
                    'environment_id',
                    'user_ref',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'environment_id',
                    'user_ref',
                ]
            },
            root_map={
                'validations': {
                    ('environment_id',): {

                        'min_length': 1,
                    },
                    ('user_ref',): {

                        'min_length': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'environment_id':
                        (str,),
                    'user_ref':
                        (str,),
                },
                'attribute_map': {
                    'environment_id': 'environmentId',
                    'user_ref': 'userRef',
                },
                'location_map': {
                    'environment_id': 'path',
                    'user_ref': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__delete_environment_user
        )

        def __delete_host(
            self,
            environment_id,
            host_id,
            **kwargs
        ):
            """Delete a Host.  # 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_host(environment_id, host_id, async_req=True)
            >>> result = thread.get()

            Args:
                environment_id (str): The ID of the environment.
                host_id (str): The ID of the host.

            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.
                _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:
                DeleteHostResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['environment_id'] = \
                environment_id
            kwargs['host_id'] = \
                host_id
            return self.call_with_http_info(**kwargs)

        self.delete_host = _Endpoint(
            settings={
                'response_type': (DeleteHostResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/{environmentId}/hosts/{hostId}',
                'operation_id': 'delete_host',
                'http_method': 'DELETE',
                'servers': None,
            },
            params_map={
                'all': [
                    'environment_id',
                    'host_id',
                ],
                'required': [
                    'environment_id',
                    'host_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'environment_id',
                    'host_id',
                ]
            },
            root_map={
                'validations': {
                    ('environment_id',): {

                        'min_length': 1,
                    },
                    ('host_id',): {
                        'max_length': 256,
                        'min_length': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'environment_id':
                        (str,),
                    'host_id':
                        (str,),
                },
                'attribute_map': {
                    'environment_id': 'environmentId',
                    'host_id': 'hostId',
                },
                'location_map': {
                    'environment_id': 'path',
                    'host_id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__delete_host
        )

        def __disable_environment(
            self,
            environment_id,
            **kwargs
        ):
            """Disable environment.  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.disable_environment(environment_id, async_req=True)
            >>> result = thread.get()

            Args:
                environment_id (str): The ID of the environment.

            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.
                _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:
                DisableEnvironmentResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['environment_id'] = \
                environment_id
            return self.call_with_http_info(**kwargs)

        self.disable_environment = _Endpoint(
            settings={
                'response_type': (DisableEnvironmentResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/{environmentId}/disable',
                'operation_id': 'disable_environment',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'environment_id',
                ],
                'required': [
                    'environment_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'environment_id',
                ]
            },
            root_map={
                'validations': {
                    ('environment_id',): {

                        'min_length': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'environment_id':
                        (str,),
                },
                'attribute_map': {
                    'environment_id': 'environmentId',
                },
                'location_map': {
                    'environment_id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__disable_environment
        )

        def __enable_environment(
            self,
            environment_id,
            **kwargs
        ):
            """Enable a disabled environment.  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.enable_environment(environment_id, async_req=True)
            >>> result = thread.get()

            Args:
                environment_id (str): The ID of the environment.

            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.
                _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:
                EnableEnvironmentResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['environment_id'] = \
                environment_id
            return self.call_with_http_info(**kwargs)

        self.enable_environment = _Endpoint(
            settings={
                'response_type': (EnableEnvironmentResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/{environmentId}/enable',
                'operation_id': 'enable_environment',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'environment_id',
                ],
                'required': [
                    'environment_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'environment_id',
                ]
            },
            root_map={
                'validations': {
                    ('environment_id',): {

                        'min_length': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'environment_id':
                        (str,),
                },
                'attribute_map': {
                    'environment_id': 'environmentId',
                },
                'location_map': {
                    'environment_id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__enable_environment
        )

        def __get_environment_by_id(
            self,
            environment_id,
            **kwargs
        ):
            """Returns an environment by ID.  # 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_environment_by_id(environment_id, async_req=True)
            >>> result = thread.get()

            Args:
                environment_id (str): The ID of the environment.

            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.
                _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:
                Environment
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['environment_id'] = \
                environment_id
            return self.call_with_http_info(**kwargs)

        self.get_environment_by_id = _Endpoint(
            settings={
                'response_type': (Environment,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/{environmentId}',
                'operation_id': 'get_environment_by_id',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'environment_id',
                ],
                'required': [
                    'environment_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'environment_id',
                ]
            },
            root_map={
                'validations': {
                    ('environment_id',): {

                        'min_length': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'environment_id':
                        (str,),
                },
                'attribute_map': {
                    'environment_id': 'environmentId',
                },
                'location_map': {
                    'environment_id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_environment_by_id
        )

        def __get_environments(
            self,
            **kwargs
        ):
            """List all environments.  # 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_environments(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                limit (int): Maximum number of objects to return per query. The value must be between 1 and 1000. Default is 100.. [optional] if omitted the server will use the default value of 100
                cursor (str): Cursor to fetch the next or previous page of results. The value of this property must be extracted from the 'prev_cursor' or 'next_cursor' property of a PaginatedResponseMetadata which is contained in the response of list and search API endpoints.. [optional]
                sort (str, none_type): The field to sort results by. A property name with a prepended '-' signifies descending order.. [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.
                _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:
                ListEnvironmentsResponse
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.get_environments = _Endpoint(
            settings={
                'response_type': (ListEnvironmentsResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments',
                'operation_id': 'get_environments',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'limit',
                    'cursor',
                    'sort',
                ],
                'required': [],
                'nullable': [
                    'sort',
                ],
                'enum': [
                    'sort',
                ],
                'validation': [
                    'limit',
                    'cursor',
                ]
            },
            root_map={
                'validations': {
                    ('limit',): {

                        'inclusive_maximum': 1000,
                        'inclusive_minimum': 1,
                    },
                    ('cursor',): {
                        'max_length': 4096,
                        'min_length': 1,
                    },
                },
                'allowed_values': {
                    ('sort',): {
                        'None': None,
                        "ID": "id",
                        "-ID": "-id",
                        "NAME": "name",
                        "-NAME": "-name",
                        "NAMESPACE": "namespace",
                        "-NAMESPACE": "-namespace",
                        "ENGINE_ID": "engine_id",
                        "-ENGINE_ID": "-engine_id",
                        "ENABLED": "enabled",
                        "-ENABLED": "-enabled",
                        "IS_CLUSTER": "is_cluster",
                        "-IS_CLUSTER": "-is_cluster"
                    },
                },
                'openapi_types': {
                    'limit':
                        (int,),
                    'cursor':
                        (str,),
                    'sort':
                        (str, none_type,),
                },
                'attribute_map': {
                    'limit': 'limit',
                    'cursor': 'cursor',
                    'sort': 'sort',
                },
                'location_map': {
                    'limit': 'query',
                    'cursor': 'query',
                    'sort': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_environments
        )

        def __get_tags_environment(
            self,
            environment_id,
            **kwargs
        ):
            """Get tags for an Environment.  # 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_tags_environment(environment_id, async_req=True)
            >>> result = thread.get()

            Args:
                environment_id (str): The ID of the environment.

            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.
                _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:
                TagsResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['environment_id'] = \
                environment_id
            return self.call_with_http_info(**kwargs)

        self.get_tags_environment = _Endpoint(
            settings={
                'response_type': (TagsResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/{environmentId}/tags',
                'operation_id': 'get_tags_environment',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'environment_id',
                ],
                'required': [
                    'environment_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'environment_id',
                ]
            },
            root_map={
                'validations': {
                    ('environment_id',): {

                        'min_length': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'environment_id':
                        (str,),
                },
                'attribute_map': {
                    'environment_id': 'environmentId',
                },
                'location_map': {
                    'environment_id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_tags_environment
        )

        def __list_environment_users(
            self,
            environment_id,
            **kwargs
        ):
            """List environment users.  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.list_environment_users(environment_id, async_req=True)
            >>> result = thread.get()

            Args:
                environment_id (str): The ID of the environment.

            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.
                _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:
                ListEnvironmentUsers
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['environment_id'] = \
                environment_id
            return self.call_with_http_info(**kwargs)

        self.list_environment_users = _Endpoint(
            settings={
                'response_type': (ListEnvironmentUsers,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/{environmentId}/users',
                'operation_id': 'list_environment_users',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'environment_id',
                ],
                'required': [
                    'environment_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'environment_id',
                ]
            },
            root_map={
                'validations': {
                    ('environment_id',): {

                        'min_length': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'environment_id':
                        (str,),
                },
                'attribute_map': {
                    'environment_id': 'environmentId',
                },
                'location_map': {
                    'environment_id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__list_environment_users
        )

        def __primary_environment_user(
            self,
            environment_id,
            user_ref,
            **kwargs
        ):
            """Set primary environment user.  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.primary_environment_user(environment_id, user_ref, async_req=True)
            >>> result = thread.get()

            Args:
                environment_id (str): The ID of the environment.
                user_ref (str): Environment user reference.

            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.
                _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:
                PrimaryEnvironmentUserResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['environment_id'] = \
                environment_id
            kwargs['user_ref'] = \
                user_ref
            return self.call_with_http_info(**kwargs)

        self.primary_environment_user = _Endpoint(
            settings={
                'response_type': (PrimaryEnvironmentUserResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/{environmentId}/users/{userRef}/primary',
                'operation_id': 'primary_environment_user',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'environment_id',
                    'user_ref',
                ],
                'required': [
                    'environment_id',
                    'user_ref',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'environment_id',
                    'user_ref',
                ]
            },
            root_map={
                'validations': {
                    ('environment_id',): {

                        'min_length': 1,
                    },
                    ('user_ref',): {

                        'min_length': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'environment_id':
                        (str,),
                    'user_ref':
                        (str,),
                },
                'attribute_map': {
                    'environment_id': 'environmentId',
                    'user_ref': 'userRef',
                },
                'location_map': {
                    'environment_id': 'path',
                    'user_ref': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__primary_environment_user
        )

        def __refresh_environment(
            self,
            environment_id,
            **kwargs
        ):
            """Refresh environment.  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

            >>> thread = api.refresh_environment(environment_id, async_req=True)
            >>> result = thread.get()

            Args:
                environment_id (str): The ID of the environment.

            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.
                _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:
                RefreshEnvironmentResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['environment_id'] = \
                environment_id
            return self.call_with_http_info(**kwargs)

        self.refresh_environment = _Endpoint(
            settings={
                'response_type': (RefreshEnvironmentResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/{environmentId}/refresh',
                'operation_id': 'refresh_environment',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'environment_id',
                ],
                'required': [
                    'environment_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'environment_id',
                ]
            },
            root_map={
                'validations': {
                    ('environment_id',): {

                        'min_length': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'environment_id':
                        (str,),
                },
                'attribute_map': {
                    'environment_id': 'environmentId',
                },
                'location_map': {
                    'environment_id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__refresh_environment
        )

        def __search_environments(
            self,
            **kwargs
        ):
            """Search for environments.  # noqa: E501

            This method makes a synchronous HTTP request by default. To make an
            asynchronous HTTP request, please pass async_req=True

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


            Keyword Args:
                limit (int): Maximum number of objects to return per query. The value must be between 1 and 1000. Default is 100.. [optional] if omitted the server will use the default value of 100
                cursor (str): Cursor to fetch the next or previous page of results. The value of this property must be extracted from the 'prev_cursor' or 'next_cursor' property of a PaginatedResponseMetadata which is contained in the response of list and search API endpoints.. [optional]
                sort (str, none_type): The field to sort results by. A property name with a prepended '-' signifies descending order.. [optional]
                search_body (SearchBody): A request body containing a filter expression. This enables searching for items matching arbitrarily complex conditions. The list of attributes which can be used in filter expressions is available in the x-filterable vendor extension.  # Filter Expression Overview **Note: All keywords are case-insensitive**  ## Comparison Operators | Operator | Description | Example | | --- | --- | --- | | CONTAINS | Substring or membership testing for string and list attributes respectively. | field3 CONTAINS 'foobar', field4 CONTAINS TRUE  | | IN | Tests if field is a member of a list literal. List can contain a maximum of 100 values | field2 IN ['Goku', 'Vegeta'] | | GE | Tests if a field is greater than or equal to a literal value | field1 GE 1.2e-2 | | GT | Tests if a field is greater than a literal value | field1 GT 1.2e-2 | | LE | Tests if a field is less than or equal to a literal value | field1 LE 9000 | | LT | Tests if a field is less than a literal value | field1 LT 9.02 | | NE | Tests if a field is not equal to a literal value | field1 NE 42 | | EQ | Tests if a field is equal to a literal value | field1 EQ 42 |  ## Search Operator The SEARCH operator filters for items which have any filterable attribute that contains the input string as a substring, comparison is done case-insensitively. This is not restricted to attributes with string values. Specifically `SEARCH '12'` would match an item with an attribute with an integer value of `123`.  ## Logical Operators Ordered by precedence. | Operator | Description | Example | | --- | --- | --- | | NOT | Logical NOT (Right associative) | NOT field1 LE 9000 | | AND | Logical AND (Left Associative) | field1 GT 9000 AND field2 EQ 'Goku' | | OR | Logical OR (Left Associative) | field1 GT 9000 OR field2 EQ 'Goku' |  ## Grouping Parenthesis `()` can be used to override operator precedence.  For example: NOT (field1 LT 1234 AND field2 CONTAINS 'foo')  ## Literal Values | Literal      | Description | Examples | | --- | --- | --- | | Nil | Represents the absence of a value | nil, Nil, nIl, NIL | | Boolean | true/false boolean | true, false, True, False, TRUE, FALSE | | Number | Signed integer and floating point numbers. Also supports scientific notation. | 0, 1, -1, 1.2, 0.35, 1.2e-2, -1.2e+2 | | String | Single or double quoted | \"foo\", \"bar\", \"foo bar\", 'foo', 'bar', 'foo bar' | | Datetime | Formatted according to [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) | 2018-04-27T18:39:26.397237+00:00 | | List | Comma-separated literals wrapped in square brackets | [0], [0, 1], ['foo', \"bar\"] |  ## Limitations - A maximum of 8 unique identifiers may be used inside a filter expression. . [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.
                _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:
                SearchEnvironmentsResponse
                    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['_host_index'] = kwargs.get('_host_index')
            return self.call_with_http_info(**kwargs)

        self.search_environments = _Endpoint(
            settings={
                'response_type': (SearchEnvironmentsResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/search',
                'operation_id': 'search_environments',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'limit',
                    'cursor',
                    'sort',
                    'search_body',
                ],
                'required': [],
                'nullable': [
                    'sort',
                ],
                'enum': [
                    'sort',
                ],
                'validation': [
                    'limit',
                    'cursor',
                ]
            },
            root_map={
                'validations': {
                    ('limit',): {

                        'inclusive_maximum': 1000,
                        'inclusive_minimum': 1,
                    },
                    ('cursor',): {
                        'max_length': 4096,
                        'min_length': 1,
                    },
                },
                'allowed_values': {
                    ('sort',): {
                        'None': None,
                        "ID": "id",
                        "-ID": "-id",
                        "NAME": "name",
                        "-NAME": "-name",
                        "NAMESPACE": "namespace",
                        "-NAMESPACE": "-namespace",
                        "ENGINE_ID": "engine_id",
                        "-ENGINE_ID": "-engine_id",
                        "ENABLED": "enabled",
                        "-ENABLED": "-enabled",
                        "IS_CLUSTER": "is_cluster",
                        "-IS_CLUSTER": "-is_cluster"
                    },
                },
                'openapi_types': {
                    'limit':
                        (int,),
                    'cursor':
                        (str,),
                    'sort':
                        (str, none_type,),
                    'search_body':
                        (SearchBody,),
                },
                'attribute_map': {
                    'limit': 'limit',
                    'cursor': 'cursor',
                    'sort': 'sort',
                },
                'location_map': {
                    'limit': 'query',
                    'cursor': 'query',
                    'sort': 'query',
                    'search_body': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__search_environments
        )

        def __update_environment(
            self,
            environment_id,
            **kwargs
        ):
            """Update an environment by ID.  # 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_environment(environment_id, async_req=True)
            >>> result = thread.get()

            Args:
                environment_id (str): The ID of the environment.

            Keyword Args:
                environment_update_parameters (EnvironmentUpdateParameters): the parameters to update an environment. [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.
                _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:
                UpdateEnvironmentResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['environment_id'] = \
                environment_id
            return self.call_with_http_info(**kwargs)

        self.update_environment = _Endpoint(
            settings={
                'response_type': (UpdateEnvironmentResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/{environmentId}',
                'operation_id': 'update_environment',
                'http_method': 'PATCH',
                'servers': None,
            },
            params_map={
                'all': [
                    'environment_id',
                    'environment_update_parameters',
                ],
                'required': [
                    'environment_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'environment_id',
                ]
            },
            root_map={
                'validations': {
                    ('environment_id',): {

                        'min_length': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'environment_id':
                        (str,),
                    'environment_update_parameters':
                        (EnvironmentUpdateParameters,),
                },
                'attribute_map': {
                    'environment_id': 'environmentId',
                },
                'location_map': {
                    'environment_id': 'path',
                    'environment_update_parameters': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__update_environment
        )

        def __update_environment_user(
            self,
            environment_id,
            user_ref,
            **kwargs
        ):
            """Update environment user.  # 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_environment_user(environment_id, user_ref, async_req=True)
            >>> result = thread.get()

            Args:
                environment_id (str): The ID of the environment.
                user_ref (str): Environment user reference.

            Keyword Args:
                environment_user_params (EnvironmentUserParams): The parameters to create an environment user.. [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.
                _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:
                UpdateEnvironmentUserResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['environment_id'] = \
                environment_id
            kwargs['user_ref'] = \
                user_ref
            return self.call_with_http_info(**kwargs)

        self.update_environment_user = _Endpoint(
            settings={
                'response_type': (UpdateEnvironmentUserResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/{environmentId}/users/{userRef}',
                'operation_id': 'update_environment_user',
                'http_method': 'PUT',
                'servers': None,
            },
            params_map={
                'all': [
                    'environment_id',
                    'user_ref',
                    'environment_user_params',
                ],
                'required': [
                    'environment_id',
                    'user_ref',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'environment_id',
                    'user_ref',
                ]
            },
            root_map={
                'validations': {
                    ('environment_id',): {

                        'min_length': 1,
                    },
                    ('user_ref',): {

                        'min_length': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'environment_id':
                        (str,),
                    'user_ref':
                        (str,),
                    'environment_user_params':
                        (EnvironmentUserParams,),
                },
                'attribute_map': {
                    'environment_id': 'environmentId',
                    'user_ref': 'userRef',
                },
                'location_map': {
                    'environment_id': 'path',
                    'user_ref': 'path',
                    'environment_user_params': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__update_environment_user
        )

        def __update_host(
            self,
            environment_id,
            host_id,
            host_update_parameters,
            **kwargs
        ):
            """Update a Host.  # 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_host(environment_id, host_id, host_update_parameters, async_req=True)
            >>> result = thread.get()

            Args:
                environment_id (str): The ID of the environment.
                host_id (str): The ID of the host.
                host_update_parameters (HostUpdateParameters): the parameters to update a host.

            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.
                _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:
                UpdateHostResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['environment_id'] = \
                environment_id
            kwargs['host_id'] = \
                host_id
            kwargs['host_update_parameters'] = \
                host_update_parameters
            return self.call_with_http_info(**kwargs)

        self.update_host = _Endpoint(
            settings={
                'response_type': (UpdateHostResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/{environmentId}/hosts/{hostId}',
                'operation_id': 'update_host',
                'http_method': 'PATCH',
                'servers': None,
            },
            params_map={
                'all': [
                    'environment_id',
                    'host_id',
                    'host_update_parameters',
                ],
                'required': [
                    'environment_id',
                    'host_id',
                    'host_update_parameters',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'environment_id',
                    'host_id',
                ]
            },
            root_map={
                'validations': {
                    ('environment_id',): {

                        'min_length': 1,
                    },
                    ('host_id',): {
                        'max_length': 256,
                        'min_length': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'environment_id':
                        (str,),
                    'host_id':
                        (str,),
                    'host_update_parameters':
                        (HostUpdateParameters,),
                },
                'attribute_map': {
                    'environment_id': 'environmentId',
                    'host_id': 'hostId',
                },
                'location_map': {
                    'environment_id': 'path',
                    'host_id': 'path',
                    'host_update_parameters': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__update_host
        )

        def __update_repository(
            self,
            environment_id,
            repository_id,
            update_repository_parameters,
            **kwargs
        ):
            """Update a Repository.  # 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_repository(environment_id, repository_id, update_repository_parameters, async_req=True)
            >>> result = thread.get()

            Args:
                environment_id (str): The ID of the environment.
                repository_id (str): The ID of the repository.
                update_repository_parameters (UpdateRepositoryParameters):

            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.
                _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:
                UpdateRepositoryResponse
                    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['_host_index'] = kwargs.get('_host_index')
            kwargs['environment_id'] = \
                environment_id
            kwargs['repository_id'] = \
                repository_id
            kwargs['update_repository_parameters'] = \
                update_repository_parameters
            return self.call_with_http_info(**kwargs)

        self.update_repository = _Endpoint(
            settings={
                'response_type': (UpdateRepositoryResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/environments/{environmentId}/repository/{repositoryId}',
                'operation_id': 'update_repository',
                'http_method': 'PATCH',
                'servers': None,
            },
            params_map={
                'all': [
                    'environment_id',
                    'repository_id',
                    'update_repository_parameters',
                ],
                'required': [
                    'environment_id',
                    'repository_id',
                    'update_repository_parameters',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'environment_id',
                    'repository_id',
                ]
            },
            root_map={
                'validations': {
                    ('environment_id',): {

                        'min_length': 1,
                    },
                    ('repository_id',): {
                        'max_length': 256,
                        'min_length': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'environment_id':
                        (str,),
                    'repository_id':
                        (str,),
                    'update_repository_parameters':
                        (UpdateRepositoryParameters,),
                },
                'attribute_map': {
                    'environment_id': 'environmentId',
                    'repository_id': 'repositoryId',
                },
                'location_map': {
                    'environment_id': 'path',
                    'repository_id': 'path',
                    'update_repository_parameters': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__update_repository
        )
