"Main interface for forecastquery Client"
from __future__ import annotations

from typing import Dict
from botocore.client import BaseClient
from botocore.exceptions import ClientError as Boto3ClientError

# pylint: disable=import-self
import mypy_boto3_forecastquery.client as client_scope
from mypy_boto3_forecastquery.type_defs import ClientQueryForecastResponseTypeDef


__all__ = ("Client",)


class Client(BaseClient):
    exceptions: client_scope.Exceptions

    # pylint: disable=arguments-differ,redefined-outer-name,redefined-builtin
    def can_paginate(self, operation_name: str) -> None:
        """
        Check if an operation can be paginated.

        :type operation_name: string
        :param operation_name: The operation name.  This is the same name
            as the method name on the client.  For example, if the
            method name is ``create_foo``, and you'd normally invoke the
            operation as ``client.create_foo(**kwargs)``, if the
            ``create_foo`` operation can be paginated, you can use the
            call ``client.get_paginator("create_foo")``.

        :return: ``True`` if the operation can be paginated,
            ``False`` otherwise.
        """

    # pylint: disable=arguments-differ,redefined-outer-name,redefined-builtin
    def generate_presigned_url(
        self,
        ClientMethod: str,
        Params: Dict = None,
        ExpiresIn: int = 3600,
        HttpMethod: str = None,
    ) -> None:
        """
        Generate a presigned url given a client, its method, and arguments

        :type ClientMethod: string
        :param ClientMethod: The client method to presign for

        :type Params: dict
        :param Params: The parameters normally passed to
            ``ClientMethod``.

        :type ExpiresIn: int
        :param ExpiresIn: The number of seconds the presigned url is valid
            for. By default it expires in an hour (3600 seconds)

        :type HttpMethod: string
        :param HttpMethod: The http method to use on the generated url. By
            default, the http method is whatever is used in the method's model.

        :returns: The presigned url
        """

    # pylint: disable=arguments-differ,redefined-outer-name,redefined-builtin
    def query_forecast(
        self,
        ForecastArn: str,
        Filters: Dict[str, str],
        StartDate: str = None,
        EndDate: str = None,
        NextToken: str = None,
    ) -> ClientQueryForecastResponseTypeDef:
        """
        Retrieves a forecast filtered by the supplied criteria.

        The criteria is a key-value pair. The key is either ``item_id`` (or the equivalent non-timestamp,
        non-target field) from the ``TARGET_TIME_SERIES`` dataset, or one of the forecast dimensions
        specified as part of the ``FeaturizationConfig`` object.

        By default, the complete date range of the filtered forecast is returned. Optionally, you can
        request a specific date range within the forecast.

        .. note::

          The forecasts generated by Amazon Forecast are in the same timezone as the dataset that was used
          to create the predictor.

        See also: `AWS API Documentation
        <https://docs.aws.amazon.com/goto/WebAPI/forecastquery-2018-06-26/QueryForecast>`_

        **Request Syntax**
        ::

          response = client.query_forecast(
              ForecastArn='string',
              StartDate='string',
              EndDate='string',
              Filters={
                  'string': 'string'
              },
              NextToken='string'
          )
        :type ForecastArn: string
        :param ForecastArn: **[REQUIRED]**

          The Amazon Resource Name (ARN) of the forecast to query.

        :type StartDate: string
        :param StartDate:

          The start date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss'Z'
          (ISO 8601 format) For example, "1970-01-01T00:00:00Z."

        :type EndDate: string
        :param EndDate:

          The end date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss'Z' (ISO
          8601 format). For example, "1970-01-01T00:00:00Z."

        :type Filters: dict
        :param Filters: **[REQUIRED]**

          The filtering criteria to apply when retrieving the forecast. For example:

          * To get a forecast for a specific item specify the following:  ``{"item_id" : "client_1"}``

          * To get a forecast for a specific item sold in a specific location, specify the following:
          ``{"item_id" : "client_1", "location" : "ny"}``

          * To get a forecast for all blue items sold in a specific location, specify the following:  ``{
          "location" : "ny", "color":"blue"}``

          To get the full forecast, use the operation.

          - *(string) --*

            - *(string) --*

        :type NextToken: string
        :param NextToken:

          If the result of the previous request was truncated, the response includes a ``NextToken`` . To
          retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.

        :rtype: dict
        :returns:

          **Response Syntax**

          ::

            {
                'Forecast': {
                    'Predictions': {
                        'string': [
                            {
                                'Timestamp': 'string',
                                'Value': 123.0
                            },
                        ]
                    }
                }
            }
          **Response Structure**

          - *(dict) --*

            - **Forecast** *(dict) --*

              The forecast.

              - **Predictions** *(dict) --*

                The forecast.

                The *string* of the string to array map is one of the following values:

                * mean

                * p10

                * p50

                * p90

                - *(string) --*

                  - *(list) --*

                    - *(dict) --*

                      The forecast value for a specific date. Part of the  Forecast object.

                      - **Timestamp** *(string) --*

                        The timestamp of the specific forecast.

                      - **Value** *(float) --*

                        The forecast value.

        """


class Exceptions:
    ClientError: Boto3ClientError
    InvalidInputException: Boto3ClientError
    InvalidNextTokenException: Boto3ClientError
    LimitExceededException: Boto3ClientError
    ResourceInUseException: Boto3ClientError
    ResourceNotFoundException: Boto3ClientError
