"""
    Delphix DCT API

    Delphix DCT API  # noqa: E501

    The version of the OpenAPI document: 3.24.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.delete_tag import DeleteTag
from delphix.api.gateway.model.delete_timeflow_parameters import DeleteTimeflowParameters
from delphix.api.gateway.model.delete_timeflow_response import DeleteTimeflowResponse
from delphix.api.gateway.model.list_timeflows_response import ListTimeflowsResponse
from delphix.api.gateway.model.search_body import SearchBody
from delphix.api.gateway.model.search_timeflows_response import SearchTimeflowsResponse
from delphix.api.gateway.model.snapshots_day_ranges_response import SnapshotsDayRangesResponse
from delphix.api.gateway.model.tags_request import TagsRequest
from delphix.api.gateway.model.tags_response import TagsResponse
from delphix.api.gateway.model.timeflow import Timeflow
from delphix.api.gateway.model.timeflow_repair_request import TimeflowRepairRequest
from delphix.api.gateway.model.timeflow_repair_response import TimeflowRepairResponse
from delphix.api.gateway.model.update_timeflow_parameters import UpdateTimeflowParameters
from delphix.api.gateway.model.update_timeflow_response import UpdateTimeflowResponse


class TimeflowsApi(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 __create_timeflow_tags(
            self,
            timeflow_id,
            tags_request,
            **kwargs
        ):
            """Create tags for a Timeflow.  # 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_timeflow_tags(timeflow_id, tags_request, async_req=True)
            >>> result = thread.get()

            Args:
                timeflow_id (str): The ID of the timeflow.
                tags_request (TagsRequest): Tags information for Timeflow.

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

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

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

        def __delete_timeflow(
            self,
            timeflow_id,
            **kwargs
        ):
            """Delete a timeflow.  # 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_timeflow(timeflow_id, async_req=True)
            >>> result = thread.get()

            Args:
                timeflow_id (str): The ID of the timeflow.

            Keyword Args:
                delete_timeflow_parameters (DeleteTimeflowParameters): [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:
                DeleteTimeflowResponse
                    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['timeflow_id'] = \
                timeflow_id
            return self.call_with_http_info(**kwargs)

        self.delete_timeflow = _Endpoint(
            settings={
                'response_type': (DeleteTimeflowResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/timeflows/{timeflowId}',
                'operation_id': 'delete_timeflow',
                'http_method': 'DELETE',
                'servers': None,
            },
            params_map={
                'all': [
                    'timeflow_id',
                    'delete_timeflow_parameters',
                ],
                'required': [
                    'timeflow_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'timeflow_id',
                ]
            },
            root_map={
                'validations': {
                    ('timeflow_id',): {

                        'min_length': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'timeflow_id':
                        (str,),
                    'delete_timeflow_parameters':
                        (DeleteTimeflowParameters,),
                },
                'attribute_map': {
                    'timeflow_id': 'timeflowId',
                },
                'location_map': {
                    'timeflow_id': 'path',
                    'delete_timeflow_parameters': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__delete_timeflow
        )

        def __delete_timeflow_tags(
            self,
            timeflow_id,
            **kwargs
        ):
            """Delete tags for a Timeflow.  # 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_timeflow_tags(timeflow_id, async_req=True)
            >>> result = thread.get()

            Args:
                timeflow_id (str): The ID of the timeflow.

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

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

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

        def __get_timeflow_by_id(
            self,
            timeflow_id,
            **kwargs
        ):
            """Get a Timeflow 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_timeflow_by_id(timeflow_id, async_req=True)
            >>> result = thread.get()

            Args:
                timeflow_id (str): The ID of the timeflow.

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

        self.get_timeflow_by_id = _Endpoint(
            settings={
                'response_type': (Timeflow,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/timeflows/{timeflowId}',
                'operation_id': 'get_timeflow_by_id',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'timeflow_id',
                ],
                'required': [
                    'timeflow_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'timeflow_id',
                ]
            },
            root_map={
                'validations': {
                    ('timeflow_id',): {

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

        def __get_timeflow_snapshot_day_range(
            self,
            timeflow_id,
            **kwargs
        ):
            """Returns the count of TimeFlow snapshots of the Timeflow aggregated by day.  # 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_timeflow_snapshot_day_range(timeflow_id, async_req=True)
            >>> result = thread.get()

            Args:
                timeflow_id (str): The ID of the timeflow.

            Keyword Args:
                timezone (str): The timezone in which the snapshot timestamps are to be interpreted. This property gets precedence over timezone_offset. If the timezone in this property is unknown to the application, the timezone_offset is used as fallback to interpret the snapshot timestamps.. [optional]
                timezone_offset (int): The offset in seconds of timezone in which the snapshot timestamps are to be interpreted. This property is used as fallback to interpret the snapshot timestamps if timezone is not valid.. [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:
                SnapshotsDayRangesResponse
                    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['timeflow_id'] = \
                timeflow_id
            return self.call_with_http_info(**kwargs)

        self.get_timeflow_snapshot_day_range = _Endpoint(
            settings={
                'response_type': (SnapshotsDayRangesResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/timeflows/{timeflowId}/timeflowSnapshotDayRange',
                'operation_id': 'get_timeflow_snapshot_day_range',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'timeflow_id',
                    'timezone',
                    'timezone_offset',
                ],
                'required': [
                    'timeflow_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'timeflow_id',
                    'timezone_offset',
                ]
            },
            root_map={
                'validations': {
                    ('timeflow_id',): {

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

                        'inclusive_maximum': 64800,
                        'inclusive_minimum': -64800,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'timeflow_id':
                        (str,),
                    'timezone':
                        (str,),
                    'timezone_offset':
                        (int,),
                },
                'attribute_map': {
                    'timeflow_id': 'timeflowId',
                    'timezone': 'timezone',
                    'timezone_offset': 'timezone_offset',
                },
                'location_map': {
                    'timeflow_id': 'path',
                    'timezone': 'query',
                    'timezone_offset': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_timeflow_snapshot_day_range
        )

        def __get_timeflow_tags(
            self,
            timeflow_id,
            **kwargs
        ):
            """Get tags for a Timeflow.  # 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_timeflow_tags(timeflow_id, async_req=True)
            >>> result = thread.get()

            Args:
                timeflow_id (str): The ID of the timeflow.

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

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

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

        def __get_timeflows(
            self,
            **kwargs
        ):
            """Retrieve the list of timeflows.  # 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_timeflows(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:
                ListTimeflowsResponse
                    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_timeflows = _Endpoint(
            settings={
                'response_type': (ListTimeflowsResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/timeflows',
                'operation_id': 'get_timeflows',
                '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",
                        "ENGINE_ID": "engine_id",
                        "-ENGINE_ID": "-engine_id",
                        "NAMESPACE": "namespace",
                        "-NAMESPACE": "-namespace",
                        "NAME": "name",
                        "-NAME": "-name",
                        "DATASET_ID": "dataset_id",
                        "-DATASET_ID": "-dataset_id",
                        "CREATION_TYPE": "creation_type",
                        "-CREATION_TYPE": "-creation_type",
                        "PARENT_SNAPSHOT_ID": "parent_snapshot_id",
                        "-PARENT_SNAPSHOT_ID": "-parent_snapshot_id",
                        "PARENT_POINT_LOCATION": "parent_point_location",
                        "-PARENT_POINT_LOCATION": "-parent_point_location",
                        "PARENT_POINT_TIMESTAMP": "parent_point_timestamp",
                        "-PARENT_POINT_TIMESTAMP": "-parent_point_timestamp",
                        "PARENT_POINT_TIMEFLOW_ID": "parent_point_timeflow_id",
                        "-PARENT_POINT_TIMEFLOW_ID": "-parent_point_timeflow_id",
                        "SOURCE_DATA_TIMESTAMP": "source_data_timestamp",
                        "-SOURCE_DATA_TIMESTAMP": "-source_data_timestamp",
                        "ORACLE_INCARNATION_ID": "oracle_incarnation_id",
                        "-ORACLE_INCARNATION_ID": "-oracle_incarnation_id",
                        "ORACLE_CDB_TIMEFLOW_ID": "oracle_cdb_timeflow_id",
                        "-ORACLE_CDB_TIMEFLOW_ID": "-oracle_cdb_timeflow_id",
                        "ORACLE_TDE_UUID": "oracle_tde_uuid",
                        "-ORACLE_TDE_UUID": "-oracle_tde_uuid",
                        "MSSQL_DATABASE_GUID": "mssql_database_guid",
                        "-MSSQL_DATABASE_GUID": "-mssql_database_guid",
                        "CREATION_TIMESTAMP": "creation_timestamp",
                        "-CREATION_TIMESTAMP": "-creation_timestamp",
                        "ACTIVATION_TIMESTAMP": "activation_timestamp",
                        "-ACTIVATION_TIMESTAMP": "-activation_timestamp",
                        "PARENT_VDB_ID": "parent_vdb_id",
                        "-PARENT_VDB_ID": "-parent_vdb_id",
                        "PARENT_DSOURCE_ID": "parent_dsource_id",
                        "-PARENT_DSOURCE_ID": "-parent_dsource_id",
                        "SOURCE_VDB_ID": "source_vdb_id",
                        "-SOURCE_VDB_ID": "-source_vdb_id",
                        "SOURCE_DSOURCE_ID": "source_dsource_id",
                        "-SOURCE_DSOURCE_ID": "-source_dsource_id"
                    },
                },
                '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_timeflows
        )

        def __search_timeflows(
            self,
            **kwargs
        ):
            """Search timeflows.  # 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_timeflows(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:
                SearchTimeflowsResponse
                    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_timeflows = _Endpoint(
            settings={
                'response_type': (SearchTimeflowsResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/timeflows/search',
                'operation_id': 'search_timeflows',
                '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",
                        "ENGINE_ID": "engine_id",
                        "-ENGINE_ID": "-engine_id",
                        "NAMESPACE": "namespace",
                        "-NAMESPACE": "-namespace",
                        "NAME": "name",
                        "-NAME": "-name",
                        "DATASET_ID": "dataset_id",
                        "-DATASET_ID": "-dataset_id",
                        "CREATION_TYPE": "creation_type",
                        "-CREATION_TYPE": "-creation_type",
                        "PARENT_SNAPSHOT_ID": "parent_snapshot_id",
                        "-PARENT_SNAPSHOT_ID": "-parent_snapshot_id",
                        "PARENT_POINT_LOCATION": "parent_point_location",
                        "-PARENT_POINT_LOCATION": "-parent_point_location",
                        "PARENT_POINT_TIMESTAMP": "parent_point_timestamp",
                        "-PARENT_POINT_TIMESTAMP": "-parent_point_timestamp",
                        "PARENT_POINT_TIMEFLOW_ID": "parent_point_timeflow_id",
                        "-PARENT_POINT_TIMEFLOW_ID": "-parent_point_timeflow_id",
                        "SOURCE_DATA_TIMESTAMP": "source_data_timestamp",
                        "-SOURCE_DATA_TIMESTAMP": "-source_data_timestamp",
                        "ORACLE_INCARNATION_ID": "oracle_incarnation_id",
                        "-ORACLE_INCARNATION_ID": "-oracle_incarnation_id",
                        "ORACLE_CDB_TIMEFLOW_ID": "oracle_cdb_timeflow_id",
                        "-ORACLE_CDB_TIMEFLOW_ID": "-oracle_cdb_timeflow_id",
                        "ORACLE_TDE_UUID": "oracle_tde_uuid",
                        "-ORACLE_TDE_UUID": "-oracle_tde_uuid",
                        "MSSQL_DATABASE_GUID": "mssql_database_guid",
                        "-MSSQL_DATABASE_GUID": "-mssql_database_guid",
                        "CREATION_TIMESTAMP": "creation_timestamp",
                        "-CREATION_TIMESTAMP": "-creation_timestamp",
                        "ACTIVATION_TIMESTAMP": "activation_timestamp",
                        "-ACTIVATION_TIMESTAMP": "-activation_timestamp",
                        "PARENT_VDB_ID": "parent_vdb_id",
                        "-PARENT_VDB_ID": "-parent_vdb_id",
                        "PARENT_DSOURCE_ID": "parent_dsource_id",
                        "-PARENT_DSOURCE_ID": "-parent_dsource_id",
                        "SOURCE_VDB_ID": "source_vdb_id",
                        "-SOURCE_VDB_ID": "-source_vdb_id",
                        "SOURCE_DSOURCE_ID": "source_dsource_id",
                        "-SOURCE_DSOURCE_ID": "-source_dsource_id"
                    },
                },
                '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_timeflows
        )

        def __timeflow_repair(
            self,
            timeflow_id,
            timeflow_repair_request,
            **kwargs
        ):
            """Repair a Timeflow.  # noqa: E501

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

            >>> thread = api.timeflow_repair(timeflow_id, timeflow_repair_request, async_req=True)
            >>> result = thread.get()

            Args:
                timeflow_id (str): The ID of the timeflow.
                timeflow_repair_request (TimeflowRepairRequest): Timeflow repair information.

            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:
                TimeflowRepairResponse
                    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['timeflow_id'] = \
                timeflow_id
            kwargs['timeflow_repair_request'] = \
                timeflow_repair_request
            return self.call_with_http_info(**kwargs)

        self.timeflow_repair = _Endpoint(
            settings={
                'response_type': (TimeflowRepairResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/timeflows/{timeflowId}/repair',
                'operation_id': 'timeflow_repair',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'timeflow_id',
                    'timeflow_repair_request',
                ],
                'required': [
                    'timeflow_id',
                    'timeflow_repair_request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'timeflow_id',
                ]
            },
            root_map={
                'validations': {
                    ('timeflow_id',): {

                        'min_length': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'timeflow_id':
                        (str,),
                    'timeflow_repair_request':
                        (TimeflowRepairRequest,),
                },
                'attribute_map': {
                    'timeflow_id': 'timeflowId',
                },
                'location_map': {
                    'timeflow_id': 'path',
                    'timeflow_repair_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__timeflow_repair
        )

        def __update_timeflow(
            self,
            timeflow_id,
            **kwargs
        ):
            """Update values of a timeflow.  # 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_timeflow(timeflow_id, async_req=True)
            >>> result = thread.get()

            Args:
                timeflow_id (str): The ID of the timeflow.

            Keyword Args:
                update_timeflow_parameters (UpdateTimeflowParameters): The new data to update a timeflow.. [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:
                UpdateTimeflowResponse
                    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['timeflow_id'] = \
                timeflow_id
            return self.call_with_http_info(**kwargs)

        self.update_timeflow = _Endpoint(
            settings={
                'response_type': (UpdateTimeflowResponse,),
                'auth': [
                    'ApiKeyAuth'
                ],
                'endpoint_path': '/timeflows/{timeflowId}',
                'operation_id': 'update_timeflow',
                'http_method': 'PATCH',
                'servers': None,
            },
            params_map={
                'all': [
                    'timeflow_id',
                    'update_timeflow_parameters',
                ],
                'required': [
                    'timeflow_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'timeflow_id',
                ]
            },
            root_map={
                'validations': {
                    ('timeflow_id',): {

                        'min_length': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'timeflow_id':
                        (str,),
                    'update_timeflow_parameters':
                        (UpdateTimeflowParameters,),
                },
                'attribute_map': {
                    'timeflow_id': 'timeflowId',
                },
                'location_map': {
                    'timeflow_id': 'path',
                    'update_timeflow_parameters': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client,
            callable=__update_timeflow
        )
