# WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
# See https://github.com/aws-beam/aws-codegen for more details.

defmodule AWS.IVSRealTime do
  @moduledoc """
  The Amazon Interactive Video Service (IVS) real-time API is REST compatible,
  using a standard HTTP
  API and an AWS EventBridge event stream for responses.

  JSON is used for both requests and responses,
  including errors.

  ## Key Concepts

    *

  **Stage** — A virtual space where participants can exchange video in real time.

    *

  **Participant token** — A token that authenticates a participant when they join
  a stage.

    *

  **Participant object** — Represents participants (people) in the stage and
  contains information about them. When a token is created, it includes a
  participant ID;
  when a participant uses that token to join a stage, the participant is
  associated with
  that participant ID. There is a 1:1 mapping between participant tokens and
  participants.

  For server-side composition:

    *

  **Composition process** — Composites participants
  of a stage into a single video and forwards it to a set of outputs (e.g., IVS
  channels).
  Composition operations support this process.

    *

  **Composition** — Controls the look of the outputs,
  including how participants are positioned in the video.

  For participant replication:

    *

  **Source stage** — The stage where the participant originally joined, which is
  used as the source for
  replication.

    *

  **Destination stage** — The stage to which the participant is replicated.

    *

  **Replicated participant** — A participant in a stage that is replicated to one
  or more destination stages.

    *

  **Replica participant** — A participant in a destination stage that is
  replicated from another stage
  (the source stage).

  For more information about your IVS live stream, also see [Getting Started with Amazon IVS Real-Time
  Streaming](https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/getting-started.html).

  ## Tagging

  A *tag* is a metadata label that you assign to an AWS resource. A tag
  comprises a *key* and a *value*, both set by you. For
  example, you might set a tag as `topic:nature` to label a particular video
  category. See [Best practices and strategies](https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html)
  in *Tagging AWS Resources and Tag Editor* for details, including restrictions
  that apply to tags and "Tag naming
  limits and requirements"; Amazon IVS stages has no service-specific constraints
  beyond what is documented there.

  Tags can help you identify and organize your AWS resources. For example, you can
  use the
  same tag for different resources to indicate that they are related. You can also
  use tags to
  manage access (see [Access Tags](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_tags.html)).

  The Amazon IVS real-time API has these tag-related operations: `TagResource`,
  `UntagResource`, and
  `ListTagsForResource`. The following resource supports tagging: Stage.

  At most 50 tags can be applied to a resource.
  """

  alias AWS.Client
  alias AWS.Request

  @typedoc """

  ## Example:

      video() :: %{
        "bitrate" => integer(),
        "framerate" => float(),
        "height" => integer(),
        "width" => integer()
      }

  """
  @type video() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      update_stage_request() :: %{
        optional("autoParticipantRecordingConfiguration") => auto_participant_recording_configuration(),
        optional("name") => String.t() | atom(),
        required("arn") => String.t() | atom()
      }

  """
  @type update_stage_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      list_participant_replicas_response() :: %{
        "nextToken" => String.t() | atom(),
        "replicas" => list(participant_replica())
      }

  """
  @type list_participant_replicas_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      ingest_configuration() :: %{
        "arn" => String.t() | atom(),
        "attributes" => map(),
        "ingestProtocol" => list(any()),
        "name" => String.t() | atom(),
        "participantId" => String.t() | atom(),
        "stageArn" => String.t() | atom(),
        "state" => String.t() | atom(),
        "streamKey" => String.t() | atom(),
        "tags" => map(),
        "userId" => String.t() | atom()
      }

  """
  @type ingest_configuration() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      get_composition_response() :: %{
        "composition" => composition()
      }

  """
  @type get_composition_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      stage() :: %{
        "activeSessionId" => String.t() | atom(),
        "arn" => String.t() | atom(),
        "autoParticipantRecordingConfiguration" => auto_participant_recording_configuration(),
        "endpoints" => stage_endpoints(),
        "name" => String.t() | atom(),
        "tags" => map()
      }

  """
  @type stage() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      tag_resource_request() :: %{
        required("tags") => map()
      }

  """
  @type tag_resource_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      list_stages_request() :: %{
        optional("maxResults") => integer(),
        optional("nextToken") => String.t() | atom()
      }

  """
  @type list_stages_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      composition() :: %{
        "arn" => String.t() | atom(),
        "destinations" => list(destination()),
        "endTime" => non_neg_integer(),
        "layout" => layout_configuration(),
        "stageArn" => String.t() | atom(),
        "startTime" => non_neg_integer(),
        "state" => String.t() | atom(),
        "tags" => map()
      }

  """
  @type composition() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      get_storage_configuration_response() :: %{
        "storageConfiguration" => storage_configuration()
      }

  """
  @type get_storage_configuration_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      create_stage_response() :: %{
        optional("participantTokens") => list(participant_token()),
        optional("stage") => stage()
      }

  """
  @type create_stage_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      recording_configuration() :: %{
        "format" => String.t() | atom(),
        "hlsConfiguration" => composition_recording_hls_configuration()
      }

  """
  @type recording_configuration() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      participant() :: %{
        "attributes" => map(),
        "browserName" => String.t() | atom(),
        "browserVersion" => String.t() | atom(),
        "firstJoinTime" => non_neg_integer(),
        "ispName" => String.t() | atom(),
        "osName" => String.t() | atom(),
        "osVersion" => String.t() | atom(),
        "participantId" => String.t() | atom(),
        "protocol" => list(any()),
        "published" => boolean(),
        "recordingS3BucketName" => String.t() | atom(),
        "recordingS3Prefix" => String.t() | atom(),
        "recordingState" => String.t() | atom(),
        "replicationState" => String.t() | atom(),
        "replicationType" => String.t() | atom(),
        "sdkVersion" => String.t() | atom(),
        "sourceSessionId" => String.t() | atom(),
        "sourceStageArn" => String.t() | atom(),
        "state" => String.t() | atom(),
        "userId" => String.t() | atom()
      }

  """
  @type participant() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      create_ingest_configuration_response() :: %{
        "ingestConfiguration" => ingest_configuration()
      }

  """
  @type create_ingest_configuration_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      participant_replica() :: %{
        "destinationSessionId" => String.t() | atom(),
        "destinationStageArn" => String.t() | atom(),
        "participantId" => String.t() | atom(),
        "replicationState" => String.t() | atom(),
        "sourceSessionId" => String.t() | atom(),
        "sourceStageArn" => String.t() | atom()
      }

  """
  @type participant_replica() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      get_stage_response() :: %{
        optional("stage") => stage()
      }

  """
  @type get_stage_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      stop_composition_request() :: %{
        required("arn") => String.t() | atom()
      }

  """
  @type stop_composition_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      create_ingest_configuration_request() :: %{
        optional("attributes") => map(),
        optional("insecureIngest") => boolean(),
        optional("name") => String.t() | atom(),
        optional("stageArn") => String.t() | atom(),
        optional("tags") => map(),
        optional("userId") => String.t() | atom(),
        required("ingestProtocol") => list(any())
      }

  """
  @type create_ingest_configuration_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      untag_resource_response() :: %{}

  """
  @type untag_resource_response() :: %{}

  @typedoc """

  ## Example:

      pip_configuration() :: %{
        "featuredParticipantAttribute" => String.t() | atom(),
        "gridGap" => integer(),
        "omitStoppedVideo" => boolean(),
        "participantOrderAttribute" => String.t() | atom(),
        "pipBehavior" => list(any()),
        "pipHeight" => integer(),
        "pipOffset" => integer(),
        "pipParticipantAttribute" => String.t() | atom(),
        "pipPosition" => list(any()),
        "pipWidth" => integer(),
        "videoFillMode" => list(any())
      }

  """
  @type pip_configuration() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      list_compositions_response() :: %{
        "compositions" => list(composition_summary()),
        "nextToken" => String.t() | atom()
      }

  """
  @type list_compositions_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      list_public_keys_response() :: %{
        "nextToken" => String.t() | atom(),
        "publicKeys" => list(public_key_summary())
      }

  """
  @type list_public_keys_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      delete_encoder_configuration_request() :: %{
        required("arn") => String.t() | atom()
      }

  """
  @type delete_encoder_configuration_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      get_storage_configuration_request() :: %{
        required("arn") => String.t() | atom()
      }

  """
  @type get_storage_configuration_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      get_ingest_configuration_response() :: %{
        "ingestConfiguration" => ingest_configuration()
      }

  """
  @type get_ingest_configuration_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      list_compositions_request() :: %{
        optional("filterByEncoderConfigurationArn") => String.t() | atom(),
        optional("filterByStageArn") => String.t() | atom(),
        optional("maxResults") => integer(),
        optional("nextToken") => String.t() | atom()
      }

  """
  @type list_compositions_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      participant_summary() :: %{
        "firstJoinTime" => non_neg_integer(),
        "participantId" => String.t() | atom(),
        "published" => boolean(),
        "recordingState" => String.t() | atom(),
        "replicationState" => String.t() | atom(),
        "replicationType" => String.t() | atom(),
        "sourceSessionId" => String.t() | atom(),
        "sourceStageArn" => String.t() | atom(),
        "state" => String.t() | atom(),
        "userId" => String.t() | atom()
      }

  """
  @type participant_summary() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      list_ingest_configurations_response() :: %{
        "ingestConfigurations" => list(ingest_configuration_summary()),
        "nextToken" => String.t() | atom()
      }

  """
  @type list_ingest_configurations_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      disconnect_participant_response() :: %{}

  """
  @type disconnect_participant_response() :: %{}

  @typedoc """

  ## Example:

      stage_endpoints() :: %{
        "events" => String.t() | atom(),
        "rtmp" => String.t() | atom(),
        "rtmps" => String.t() | atom(),
        "whip" => String.t() | atom()
      }

  """
  @type stage_endpoints() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      get_stage_session_request() :: %{
        required("sessionId") => String.t() | atom(),
        required("stageArn") => String.t() | atom()
      }

  """
  @type get_stage_session_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      get_stage_session_response() :: %{
        "stageSession" => stage_session()
      }

  """
  @type get_stage_session_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      list_participant_replicas_request() :: %{
        optional("maxResults") => integer(),
        optional("nextToken") => String.t() | atom(),
        required("participantId") => String.t() | atom(),
        required("sourceStageArn") => String.t() | atom()
      }

  """
  @type list_participant_replicas_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      update_stage_response() :: %{
        optional("stage") => stage()
      }

  """
  @type update_stage_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      participant_token_configuration() :: %{
        "attributes" => map(),
        "capabilities" => list(String.t() | atom()),
        "duration" => integer(),
        "userId" => String.t() | atom()
      }

  """
  @type participant_token_configuration() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      update_ingest_configuration_request() :: %{
        optional("stageArn") => String.t() | atom(),
        required("arn") => String.t() | atom()
      }

  """
  @type update_ingest_configuration_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      storage_configuration_summary() :: %{
        "arn" => String.t() | atom(),
        "name" => String.t() | atom(),
        "s3" => s3_storage_configuration(),
        "tags" => map()
      }

  """
  @type storage_configuration_summary() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      untag_resource_request() :: %{
        required("tagKeys") => list(String.t() | atom())
      }

  """
  @type untag_resource_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      import_public_key_response() :: %{
        "publicKey" => public_key()
      }

  """
  @type import_public_key_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      list_encoder_configurations_request() :: %{
        optional("maxResults") => integer(),
        optional("nextToken") => String.t() | atom()
      }

  """
  @type list_encoder_configurations_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      get_stage_request() :: %{
        required("arn") => String.t() | atom()
      }

  """
  @type get_stage_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      list_public_keys_request() :: %{
        optional("maxResults") => integer(),
        optional("nextToken") => String.t() | atom()
      }

  """
  @type list_public_keys_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      start_composition_response() :: %{
        "composition" => composition()
      }

  """
  @type start_composition_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      start_composition_request() :: %{
        optional("idempotencyToken") => String.t() | atom(),
        optional("layout") => layout_configuration(),
        optional("tags") => map(),
        required("destinations") => list(destination_configuration()),
        required("stageArn") => String.t() | atom()
      }

  """
  @type start_composition_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      delete_stage_request() :: %{
        required("arn") => String.t() | atom()
      }

  """
  @type delete_stage_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      get_composition_request() :: %{
        required("arn") => String.t() | atom()
      }

  """
  @type get_composition_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      get_encoder_configuration_response() :: %{
        "encoderConfiguration" => encoder_configuration()
      }

  """
  @type get_encoder_configuration_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      list_storage_configurations_request() :: %{
        optional("maxResults") => integer(),
        optional("nextToken") => String.t() | atom()
      }

  """
  @type list_storage_configurations_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      disconnect_participant_request() :: %{
        optional("reason") => String.t() | atom(),
        required("participantId") => String.t() | atom(),
        required("stageArn") => String.t() | atom()
      }

  """
  @type disconnect_participant_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      start_participant_replication_response() :: %{
        "accessControlAllowOrigin" => String.t() | atom(),
        "accessControlExposeHeaders" => String.t() | atom(),
        "cacheControl" => String.t() | atom(),
        "contentSecurityPolicy" => String.t() | atom(),
        "strictTransportSecurity" => String.t() | atom(),
        "xContentTypeOptions" => String.t() | atom(),
        "xFrameOptions" => String.t() | atom()
      }

  """
  @type start_participant_replication_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      list_storage_configurations_response() :: %{
        "nextToken" => String.t() | atom(),
        "storageConfigurations" => list(storage_configuration_summary())
      }

  """
  @type list_storage_configurations_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      delete_public_key_request() :: %{
        required("arn") => String.t() | atom()
      }

  """
  @type delete_public_key_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      conflict_exception() :: %{
        "accessControlAllowOrigin" => String.t() | atom(),
        "accessControlExposeHeaders" => String.t() | atom(),
        "cacheControl" => String.t() | atom(),
        "contentSecurityPolicy" => String.t() | atom(),
        "exceptionMessage" => String.t() | atom(),
        "strictTransportSecurity" => String.t() | atom(),
        "xAmznErrorType" => String.t() | atom(),
        "xContentTypeOptions" => String.t() | atom(),
        "xFrameOptions" => String.t() | atom()
      }

  """
  @type conflict_exception() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      resource_not_found_exception() :: %{
        "accessControlAllowOrigin" => String.t() | atom(),
        "accessControlExposeHeaders" => String.t() | atom(),
        "cacheControl" => String.t() | atom(),
        "contentSecurityPolicy" => String.t() | atom(),
        "exceptionMessage" => String.t() | atom(),
        "strictTransportSecurity" => String.t() | atom(),
        "xAmznErrorType" => String.t() | atom(),
        "xContentTypeOptions" => String.t() | atom(),
        "xFrameOptions" => String.t() | atom()
      }

  """
  @type resource_not_found_exception() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      delete_ingest_configuration_request() :: %{
        optional("force") => boolean(),
        required("arn") => String.t() | atom()
      }

  """
  @type delete_ingest_configuration_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      list_participants_response() :: %{
        "nextToken" => String.t() | atom(),
        "participants" => list(participant_summary())
      }

  """
  @type list_participants_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      list_ingest_configurations_request() :: %{
        optional("filterByStageArn") => String.t() | atom(),
        optional("filterByState") => String.t() | atom(),
        optional("maxResults") => integer(),
        optional("nextToken") => String.t() | atom()
      }

  """
  @type list_ingest_configurations_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      channel_destination_configuration() :: %{
        "channelArn" => String.t() | atom(),
        "encoderConfigurationArn" => String.t() | atom()
      }

  """
  @type channel_destination_configuration() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      get_participant_response() :: %{
        "participant" => participant()
      }

  """
  @type get_participant_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      list_participants_request() :: %{
        optional("filterByPublished") => boolean(),
        optional("filterByRecordingState") => String.t() | atom(),
        optional("filterByState") => String.t() | atom(),
        optional("filterByUserId") => String.t() | atom(),
        optional("maxResults") => integer(),
        optional("nextToken") => String.t() | atom(),
        required("sessionId") => String.t() | atom(),
        required("stageArn") => String.t() | atom()
      }

  """
  @type list_participants_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      participant_recording_hls_configuration() :: %{
        "targetSegmentDurationSeconds" => integer()
      }

  """
  @type participant_recording_hls_configuration() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      service_quota_exceeded_exception() :: %{
        "accessControlAllowOrigin" => String.t() | atom(),
        "accessControlExposeHeaders" => String.t() | atom(),
        "cacheControl" => String.t() | atom(),
        "contentSecurityPolicy" => String.t() | atom(),
        "exceptionMessage" => String.t() | atom(),
        "strictTransportSecurity" => String.t() | atom(),
        "xAmznErrorType" => String.t() | atom(),
        "xContentTypeOptions" => String.t() | atom(),
        "xFrameOptions" => String.t() | atom()
      }

  """
  @type service_quota_exceeded_exception() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      list_stage_sessions_request() :: %{
        optional("maxResults") => integer(),
        optional("nextToken") => String.t() | atom(),
        required("stageArn") => String.t() | atom()
      }

  """
  @type list_stage_sessions_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      create_storage_configuration_response() :: %{
        "storageConfiguration" => storage_configuration()
      }

  """
  @type create_storage_configuration_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      auto_participant_recording_configuration() :: %{
        "hlsConfiguration" => participant_recording_hls_configuration(),
        "mediaTypes" => list(list(any())()),
        "recordParticipantReplicas" => boolean(),
        "recordingReconnectWindowSeconds" => integer(),
        "storageConfigurationArn" => String.t() | atom(),
        "thumbnailConfiguration" => participant_thumbnail_configuration()
      }

  """
  @type auto_participant_recording_configuration() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      create_participant_token_response() :: %{
        optional("participantToken") => participant_token()
      }

  """
  @type create_participant_token_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      s3_destination_configuration() :: %{
        "encoderConfigurationArns" => list(String.t() | atom()),
        "recordingConfiguration" => recording_configuration(),
        "storageConfigurationArn" => String.t() | atom(),
        "thumbnailConfigurations" => list(composition_thumbnail_configuration())
      }

  """
  @type s3_destination_configuration() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      destination_summary() :: %{
        "endTime" => non_neg_integer(),
        "id" => String.t() | atom(),
        "startTime" => non_neg_integer(),
        "state" => String.t() | atom()
      }

  """
  @type destination_summary() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      storage_configuration() :: %{
        "arn" => String.t() | atom(),
        "name" => String.t() | atom(),
        "s3" => s3_storage_configuration(),
        "tags" => map()
      }

  """
  @type storage_configuration() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      list_stage_sessions_response() :: %{
        "nextToken" => String.t() | atom(),
        "stageSessions" => list(stage_session_summary())
      }

  """
  @type list_stage_sessions_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      participant_thumbnail_configuration() :: %{
        "recordingMode" => list(any()),
        "storage" => list(list(any())()),
        "targetIntervalSeconds" => integer()
      }

  """
  @type participant_thumbnail_configuration() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      list_tags_for_resource_response() :: %{
        required("tags") => map()
      }

  """
  @type list_tags_for_resource_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      encoder_configuration() :: %{
        "arn" => String.t() | atom(),
        "name" => String.t() | atom(),
        "tags" => map(),
        "video" => video()
      }

  """
  @type encoder_configuration() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      public_key() :: %{
        "arn" => String.t() | atom(),
        "fingerprint" => String.t() | atom(),
        "name" => String.t() | atom(),
        "publicKeyMaterial" => String.t() | atom(),
        "tags" => map()
      }

  """
  @type public_key() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      encoder_configuration_summary() :: %{
        "arn" => String.t() | atom(),
        "name" => String.t() | atom(),
        "tags" => map()
      }

  """
  @type encoder_configuration_summary() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      update_ingest_configuration_response() :: %{
        "ingestConfiguration" => ingest_configuration()
      }

  """
  @type update_ingest_configuration_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      stage_session_summary() :: %{
        "endTime" => non_neg_integer(),
        "sessionId" => String.t() | atom(),
        "startTime" => non_neg_integer()
      }

  """
  @type stage_session_summary() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      delete_stage_response() :: %{}

  """
  @type delete_stage_response() :: %{}

  @typedoc """

  ## Example:

      create_stage_request() :: %{
        optional("autoParticipantRecordingConfiguration") => auto_participant_recording_configuration(),
        optional("name") => String.t() | atom(),
        optional("participantTokenConfigurations") => list(participant_token_configuration()),
        optional("tags") => map()
      }

  """
  @type create_stage_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      s3_detail() :: %{
        "recordingPrefix" => String.t() | atom()
      }

  """
  @type s3_detail() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      internal_server_exception() :: %{
        "accessControlAllowOrigin" => String.t() | atom(),
        "accessControlExposeHeaders" => String.t() | atom(),
        "cacheControl" => String.t() | atom(),
        "contentSecurityPolicy" => String.t() | atom(),
        "exceptionMessage" => String.t() | atom(),
        "strictTransportSecurity" => String.t() | atom(),
        "xAmznErrorType" => String.t() | atom(),
        "xContentTypeOptions" => String.t() | atom(),
        "xFrameOptions" => String.t() | atom()
      }

  """
  @type internal_server_exception() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      create_participant_token_request() :: %{
        optional("attributes") => map(),
        optional("capabilities") => list(String.t() | atom()),
        optional("duration") => integer(),
        optional("userId") => String.t() | atom(),
        required("stageArn") => String.t() | atom()
      }

  """
  @type create_participant_token_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      import_public_key_request() :: %{
        optional("name") => String.t() | atom(),
        optional("tags") => map(),
        required("publicKeyMaterial") => String.t() | atom()
      }

  """
  @type import_public_key_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      ingest_configuration_summary() :: %{
        "arn" => String.t() | atom(),
        "ingestProtocol" => list(any()),
        "name" => String.t() | atom(),
        "participantId" => String.t() | atom(),
        "stageArn" => String.t() | atom(),
        "state" => String.t() | atom(),
        "userId" => String.t() | atom()
      }

  """
  @type ingest_configuration_summary() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      delete_public_key_response() :: %{}

  """
  @type delete_public_key_response() :: %{}

  @typedoc """

  ## Example:

      list_stages_response() :: %{
        optional("nextToken") => String.t() | atom(),
        required("stages") => list(stage_summary())
      }

  """
  @type list_stages_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      event() :: %{
        "destinationSessionId" => String.t() | atom(),
        "destinationStageArn" => String.t() | atom(),
        "errorCode" => list(any()),
        "eventTime" => non_neg_integer(),
        "name" => String.t() | atom(),
        "participantId" => String.t() | atom(),
        "remoteParticipantId" => String.t() | atom(),
        "replica" => boolean()
      }

  """
  @type event() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      list_encoder_configurations_response() :: %{
        "encoderConfigurations" => list(encoder_configuration_summary()),
        "nextToken" => String.t() | atom()
      }

  """
  @type list_encoder_configurations_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      get_public_key_request() :: %{
        required("arn") => String.t() | atom()
      }

  """
  @type get_public_key_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      get_participant_request() :: %{
        required("participantId") => String.t() | atom(),
        required("sessionId") => String.t() | atom(),
        required("stageArn") => String.t() | atom()
      }

  """
  @type get_participant_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      get_public_key_response() :: %{
        "publicKey" => public_key()
      }

  """
  @type get_public_key_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      access_denied_exception() :: %{
        "accessControlAllowOrigin" => String.t() | atom(),
        "accessControlExposeHeaders" => String.t() | atom(),
        "cacheControl" => String.t() | atom(),
        "contentSecurityPolicy" => String.t() | atom(),
        "exceptionMessage" => String.t() | atom(),
        "strictTransportSecurity" => String.t() | atom(),
        "xAmznErrorType" => String.t() | atom(),
        "xContentTypeOptions" => String.t() | atom(),
        "xFrameOptions" => String.t() | atom()
      }

  """
  @type access_denied_exception() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      tag_resource_response() :: %{}

  """
  @type tag_resource_response() :: %{}

  @typedoc """

  ## Example:

      stop_participant_replication_request() :: %{
        required("destinationStageArn") => String.t() | atom(),
        required("participantId") => String.t() | atom(),
        required("sourceStageArn") => String.t() | atom()
      }

  """
  @type stop_participant_replication_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      delete_storage_configuration_response() :: %{}

  """
  @type delete_storage_configuration_response() :: %{}

  @typedoc """

  ## Example:

      list_participant_events_request() :: %{
        optional("maxResults") => integer(),
        optional("nextToken") => String.t() | atom(),
        required("participantId") => String.t() | atom(),
        required("sessionId") => String.t() | atom(),
        required("stageArn") => String.t() | atom()
      }

  """
  @type list_participant_events_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      stop_participant_replication_response() :: %{
        "accessControlAllowOrigin" => String.t() | atom(),
        "accessControlExposeHeaders" => String.t() | atom(),
        "cacheControl" => String.t() | atom(),
        "contentSecurityPolicy" => String.t() | atom(),
        "strictTransportSecurity" => String.t() | atom(),
        "xContentTypeOptions" => String.t() | atom(),
        "xFrameOptions" => String.t() | atom()
      }

  """
  @type stop_participant_replication_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      composition_recording_hls_configuration() :: %{
        "targetSegmentDurationSeconds" => integer()
      }

  """
  @type composition_recording_hls_configuration() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      grid_configuration() :: %{
        "featuredParticipantAttribute" => String.t() | atom(),
        "gridGap" => integer(),
        "omitStoppedVideo" => boolean(),
        "participantOrderAttribute" => String.t() | atom(),
        "videoAspectRatio" => list(any()),
        "videoFillMode" => list(any())
      }

  """
  @type grid_configuration() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      get_ingest_configuration_request() :: %{
        required("arn") => String.t() | atom()
      }

  """
  @type get_ingest_configuration_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      composition_thumbnail_configuration() :: %{
        "storage" => list(list(any())()),
        "targetIntervalSeconds" => integer()
      }

  """
  @type composition_thumbnail_configuration() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      validation_exception() :: %{
        "accessControlAllowOrigin" => String.t() | atom(),
        "accessControlExposeHeaders" => String.t() | atom(),
        "cacheControl" => String.t() | atom(),
        "contentSecurityPolicy" => String.t() | atom(),
        "exceptionMessage" => String.t() | atom(),
        "strictTransportSecurity" => String.t() | atom(),
        "xAmznErrorType" => String.t() | atom(),
        "xContentTypeOptions" => String.t() | atom(),
        "xFrameOptions" => String.t() | atom()
      }

  """
  @type validation_exception() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      list_tags_for_resource_request() :: %{}

  """
  @type list_tags_for_resource_request() :: %{}

  @typedoc """

  ## Example:

      destination() :: %{
        "configuration" => destination_configuration(),
        "detail" => destination_detail(),
        "endTime" => non_neg_integer(),
        "id" => String.t() | atom(),
        "startTime" => non_neg_integer(),
        "state" => String.t() | atom()
      }

  """
  @type destination() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      participant_token() :: %{
        "attributes" => map(),
        "capabilities" => list(String.t() | atom()),
        "duration" => integer(),
        "expirationTime" => non_neg_integer(),
        "participantId" => String.t() | atom(),
        "token" => String.t() | atom(),
        "userId" => String.t() | atom()
      }

  """
  @type participant_token() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      stop_composition_response() :: %{}

  """
  @type stop_composition_response() :: %{}

  @typedoc """

  ## Example:

      start_participant_replication_request() :: %{
        optional("attributes") => map(),
        optional("reconnectWindowSeconds") => integer(),
        required("destinationStageArn") => String.t() | atom(),
        required("participantId") => String.t() | atom(),
        required("sourceStageArn") => String.t() | atom()
      }

  """
  @type start_participant_replication_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      create_storage_configuration_request() :: %{
        optional("name") => String.t() | atom(),
        optional("tags") => map(),
        required("s3") => s3_storage_configuration()
      }

  """
  @type create_storage_configuration_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      destination_detail() :: %{
        "s3" => s3_detail()
      }

  """
  @type destination_detail() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      get_encoder_configuration_request() :: %{
        required("arn") => String.t() | atom()
      }

  """
  @type get_encoder_configuration_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      public_key_summary() :: %{
        "arn" => String.t() | atom(),
        "name" => String.t() | atom(),
        "tags" => map()
      }

  """
  @type public_key_summary() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      create_encoder_configuration_request() :: %{
        optional("name") => String.t() | atom(),
        optional("tags") => map(),
        optional("video") => video()
      }

  """
  @type create_encoder_configuration_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      s3_storage_configuration() :: %{
        "bucketName" => String.t() | atom()
      }

  """
  @type s3_storage_configuration() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      stage_session() :: %{
        "endTime" => non_neg_integer(),
        "sessionId" => String.t() | atom(),
        "startTime" => non_neg_integer()
      }

  """
  @type stage_session() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      stage_summary() :: %{
        "activeSessionId" => String.t() | atom(),
        "arn" => String.t() | atom(),
        "name" => String.t() | atom(),
        "tags" => map()
      }

  """
  @type stage_summary() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      delete_storage_configuration_request() :: %{
        required("arn") => String.t() | atom()
      }

  """
  @type delete_storage_configuration_request() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      composition_summary() :: %{
        "arn" => String.t() | atom(),
        "destinations" => list(destination_summary()),
        "endTime" => non_neg_integer(),
        "stageArn" => String.t() | atom(),
        "startTime" => non_neg_integer(),
        "state" => String.t() | atom(),
        "tags" => map()
      }

  """
  @type composition_summary() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      delete_encoder_configuration_response() :: %{}

  """
  @type delete_encoder_configuration_response() :: %{}

  @typedoc """

  ## Example:

      create_encoder_configuration_response() :: %{
        "encoderConfiguration" => encoder_configuration()
      }

  """
  @type create_encoder_configuration_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      layout_configuration() :: %{
        "grid" => grid_configuration(),
        "pip" => pip_configuration()
      }

  """
  @type layout_configuration() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      pending_verification() :: %{
        "accessControlAllowOrigin" => String.t() | atom(),
        "accessControlExposeHeaders" => String.t() | atom(),
        "cacheControl" => String.t() | atom(),
        "contentSecurityPolicy" => String.t() | atom(),
        "exceptionMessage" => String.t() | atom(),
        "strictTransportSecurity" => String.t() | atom(),
        "xAmznErrorType" => String.t() | atom(),
        "xContentTypeOptions" => String.t() | atom(),
        "xFrameOptions" => String.t() | atom()
      }

  """
  @type pending_verification() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      destination_configuration() :: %{
        "channel" => channel_destination_configuration(),
        "name" => String.t() | atom(),
        "s3" => s3_destination_configuration()
      }

  """
  @type destination_configuration() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      list_participant_events_response() :: %{
        "events" => list(event()),
        "nextToken" => String.t() | atom()
      }

  """
  @type list_participant_events_response() :: %{(String.t() | atom()) => any()}

  @typedoc """

  ## Example:

      delete_ingest_configuration_response() :: %{}

  """
  @type delete_ingest_configuration_response() :: %{}

  @type create_encoder_configuration_errors() ::
          pending_verification()
          | validation_exception()
          | access_denied_exception()
          | internal_server_exception()
          | service_quota_exceeded_exception()
          | resource_not_found_exception()
          | conflict_exception()

  @type create_ingest_configuration_errors() ::
          pending_verification()
          | validation_exception()
          | access_denied_exception()
          | service_quota_exceeded_exception()

  @type create_participant_token_errors() ::
          pending_verification()
          | validation_exception()
          | access_denied_exception()
          | service_quota_exceeded_exception()
          | resource_not_found_exception()

  @type create_stage_errors() ::
          pending_verification()
          | validation_exception()
          | access_denied_exception()
          | service_quota_exceeded_exception()

  @type create_storage_configuration_errors() ::
          pending_verification()
          | validation_exception()
          | access_denied_exception()
          | internal_server_exception()
          | service_quota_exceeded_exception()
          | resource_not_found_exception()
          | conflict_exception()

  @type delete_encoder_configuration_errors() ::
          validation_exception()
          | access_denied_exception()
          | internal_server_exception()
          | service_quota_exceeded_exception()
          | resource_not_found_exception()
          | conflict_exception()

  @type delete_ingest_configuration_errors() ::
          pending_verification()
          | validation_exception()
          | access_denied_exception()
          | resource_not_found_exception()
          | conflict_exception()

  @type delete_public_key_errors() ::
          pending_verification()
          | validation_exception()
          | access_denied_exception()
          | resource_not_found_exception()
          | conflict_exception()

  @type delete_stage_errors() ::
          pending_verification()
          | validation_exception()
          | access_denied_exception()
          | resource_not_found_exception()
          | conflict_exception()

  @type delete_storage_configuration_errors() ::
          validation_exception()
          | access_denied_exception()
          | internal_server_exception()
          | service_quota_exceeded_exception()
          | resource_not_found_exception()
          | conflict_exception()

  @type disconnect_participant_errors() ::
          pending_verification()
          | validation_exception()
          | access_denied_exception()
          | resource_not_found_exception()

  @type get_composition_errors() ::
          validation_exception()
          | access_denied_exception()
          | internal_server_exception()
          | service_quota_exceeded_exception()
          | resource_not_found_exception()
          | conflict_exception()

  @type get_encoder_configuration_errors() ::
          validation_exception()
          | access_denied_exception()
          | internal_server_exception()
          | service_quota_exceeded_exception()
          | resource_not_found_exception()
          | conflict_exception()

  @type get_ingest_configuration_errors() ::
          validation_exception() | access_denied_exception() | resource_not_found_exception()

  @type get_participant_errors() ::
          validation_exception() | access_denied_exception() | resource_not_found_exception()

  @type get_public_key_errors() ::
          validation_exception() | access_denied_exception() | resource_not_found_exception()

  @type get_stage_errors() ::
          validation_exception() | access_denied_exception() | resource_not_found_exception()

  @type get_stage_session_errors() ::
          validation_exception() | access_denied_exception() | resource_not_found_exception()

  @type get_storage_configuration_errors() ::
          validation_exception()
          | access_denied_exception()
          | internal_server_exception()
          | service_quota_exceeded_exception()
          | resource_not_found_exception()
          | conflict_exception()

  @type import_public_key_errors() ::
          pending_verification()
          | validation_exception()
          | access_denied_exception()
          | service_quota_exceeded_exception()
          | conflict_exception()

  @type list_compositions_errors() ::
          validation_exception()
          | access_denied_exception()
          | internal_server_exception()
          | service_quota_exceeded_exception()
          | conflict_exception()

  @type list_encoder_configurations_errors() ::
          validation_exception()
          | access_denied_exception()
          | internal_server_exception()
          | service_quota_exceeded_exception()
          | conflict_exception()

  @type list_ingest_configurations_errors() :: validation_exception() | access_denied_exception()

  @type list_participant_events_errors() :: validation_exception() | access_denied_exception()

  @type list_participant_replicas_errors() :: validation_exception() | access_denied_exception()

  @type list_participants_errors() :: validation_exception() | access_denied_exception()

  @type list_public_keys_errors() :: validation_exception() | access_denied_exception()

  @type list_stage_sessions_errors() :: validation_exception() | access_denied_exception()

  @type list_stages_errors() ::
          validation_exception() | access_denied_exception() | conflict_exception()

  @type list_storage_configurations_errors() ::
          validation_exception()
          | access_denied_exception()
          | internal_server_exception()
          | service_quota_exceeded_exception()
          | conflict_exception()

  @type list_tags_for_resource_errors() ::
          validation_exception() | internal_server_exception() | resource_not_found_exception()

  @type start_composition_errors() ::
          pending_verification()
          | validation_exception()
          | access_denied_exception()
          | internal_server_exception()
          | service_quota_exceeded_exception()
          | resource_not_found_exception()
          | conflict_exception()

  @type start_participant_replication_errors() ::
          pending_verification()
          | validation_exception()
          | access_denied_exception()
          | internal_server_exception()
          | service_quota_exceeded_exception()
          | resource_not_found_exception()
          | conflict_exception()

  @type stop_composition_errors() ::
          validation_exception()
          | access_denied_exception()
          | internal_server_exception()
          | service_quota_exceeded_exception()
          | resource_not_found_exception()
          | conflict_exception()

  @type stop_participant_replication_errors() ::
          validation_exception()
          | access_denied_exception()
          | internal_server_exception()
          | resource_not_found_exception()

  @type tag_resource_errors() ::
          validation_exception() | internal_server_exception() | resource_not_found_exception()

  @type untag_resource_errors() ::
          validation_exception() | internal_server_exception() | resource_not_found_exception()

  @type update_ingest_configuration_errors() ::
          pending_verification()
          | validation_exception()
          | access_denied_exception()
          | resource_not_found_exception()
          | conflict_exception()

  @type update_stage_errors() ::
          pending_verification()
          | validation_exception()
          | access_denied_exception()
          | service_quota_exceeded_exception()
          | resource_not_found_exception()
          | conflict_exception()

  def metadata do
    %{
      api_version: "2020-07-14",
      content_type: "application/x-amz-json-1.1",
      credential_scope: nil,
      endpoint_prefix: "ivsrealtime",
      global?: false,
      hostname: nil,
      protocol: "rest-json",
      service_id: "IVS RealTime",
      signature_version: "v4",
      signing_name: "ivs",
      target_prefix: nil
    }
  end

  @doc """
  Creates an EncoderConfiguration object.
  """
  @spec create_encoder_configuration(map(), create_encoder_configuration_request(), list()) ::
          {:ok, create_encoder_configuration_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, create_encoder_configuration_errors()}
  def create_encoder_configuration(%Client{} = client, input, options \\ []) do
    url_path = "/CreateEncoderConfiguration"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Creates a new IngestConfiguration resource, used to specify the ingest protocol
  for a stage.
  """
  @spec create_ingest_configuration(map(), create_ingest_configuration_request(), list()) ::
          {:ok, create_ingest_configuration_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, create_ingest_configuration_errors()}
  def create_ingest_configuration(%Client{} = client, input, options \\ []) do
    url_path = "/CreateIngestConfiguration"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Creates an additional token for a specified stage.

  This can be done after stage creation
  or when tokens expire. Tokens always are scoped to the stage for which they are
  created.

  Encryption keys are owned by Amazon IVS and never used directly by your
  application.
  """
  @spec create_participant_token(map(), create_participant_token_request(), list()) ::
          {:ok, create_participant_token_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, create_participant_token_errors()}
  def create_participant_token(%Client{} = client, input, options \\ []) do
    url_path = "/CreateParticipantToken"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Creates a new stage (and optionally participant tokens).
  """
  @spec create_stage(map(), create_stage_request(), list()) ::
          {:ok, create_stage_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, create_stage_errors()}
  def create_stage(%Client{} = client, input, options \\ []) do
    url_path = "/CreateStage"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Creates a new storage configuration, used to enable recording to Amazon S3.

  When a StorageConfiguration is created, IVS will modify the S3 bucketPolicy of
  the provided bucket.
  This will ensure that IVS has sufficient permissions to write content to the
  provided bucket.
  """
  @spec create_storage_configuration(map(), create_storage_configuration_request(), list()) ::
          {:ok, create_storage_configuration_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, create_storage_configuration_errors()}
  def create_storage_configuration(%Client{} = client, input, options \\ []) do
    url_path = "/CreateStorageConfiguration"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Deletes an EncoderConfiguration resource.

  Ensures that no Compositions are using this
  template; otherwise, returns an error.
  """
  @spec delete_encoder_configuration(map(), delete_encoder_configuration_request(), list()) ::
          {:ok, delete_encoder_configuration_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, delete_encoder_configuration_errors()}
  def delete_encoder_configuration(%Client{} = client, input, options \\ []) do
    url_path = "/DeleteEncoderConfiguration"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Deletes a specified IngestConfiguration, so it can no longer be used to
  broadcast.

  An IngestConfiguration cannot be deleted if the publisher is actively streaming
  to a stage, unless `force` is set to `true`.
  """
  @spec delete_ingest_configuration(map(), delete_ingest_configuration_request(), list()) ::
          {:ok, delete_ingest_configuration_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, delete_ingest_configuration_errors()}
  def delete_ingest_configuration(%Client{} = client, input, options \\ []) do
    url_path = "/DeleteIngestConfiguration"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Deletes the specified public key used to sign stage participant tokens.

  This invalidates future participant tokens generated using the key pair’s
  private key.
  """
  @spec delete_public_key(map(), delete_public_key_request(), list()) ::
          {:ok, delete_public_key_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, delete_public_key_errors()}
  def delete_public_key(%Client{} = client, input, options \\ []) do
    url_path = "/DeletePublicKey"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Shuts down and deletes the specified stage (disconnecting all participants).

  This operation also
  removes the `stageArn` from the associated `IngestConfiguration`, if there are
  participants
  using the IngestConfiguration to publish to the stage.
  """
  @spec delete_stage(map(), delete_stage_request(), list()) ::
          {:ok, delete_stage_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, delete_stage_errors()}
  def delete_stage(%Client{} = client, input, options \\ []) do
    url_path = "/DeleteStage"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Deletes the storage configuration for the specified ARN.

  If you try to delete a storage configuration that is used by a Composition, you
  will get an error (409 ConflictException).
  To avoid this, for all Compositions that reference the storage configuration,
  first use `StopComposition` and wait for it to complete,
  then use DeleteStorageConfiguration.
  """
  @spec delete_storage_configuration(map(), delete_storage_configuration_request(), list()) ::
          {:ok, delete_storage_configuration_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, delete_storage_configuration_errors()}
  def delete_storage_configuration(%Client{} = client, input, options \\ []) do
    url_path = "/DeleteStorageConfiguration"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Disconnects a specified participant from a specified stage.

  If the participant is publishing using
  an `IngestConfiguration`, DisconnectParticipant also updates the `stageArn`
  in the IngestConfiguration to be an empty string.
  """
  @spec disconnect_participant(map(), disconnect_participant_request(), list()) ::
          {:ok, disconnect_participant_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, disconnect_participant_errors()}
  def disconnect_participant(%Client{} = client, input, options \\ []) do
    url_path = "/DisconnectParticipant"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Get information about the specified Composition resource.
  """
  @spec get_composition(map(), get_composition_request(), list()) ::
          {:ok, get_composition_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, get_composition_errors()}
  def get_composition(%Client{} = client, input, options \\ []) do
    url_path = "/GetComposition"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Gets information about the specified EncoderConfiguration resource.
  """
  @spec get_encoder_configuration(map(), get_encoder_configuration_request(), list()) ::
          {:ok, get_encoder_configuration_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, get_encoder_configuration_errors()}
  def get_encoder_configuration(%Client{} = client, input, options \\ []) do
    url_path = "/GetEncoderConfiguration"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Gets information about the specified IngestConfiguration.
  """
  @spec get_ingest_configuration(map(), get_ingest_configuration_request(), list()) ::
          {:ok, get_ingest_configuration_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, get_ingest_configuration_errors()}
  def get_ingest_configuration(%Client{} = client, input, options \\ []) do
    url_path = "/GetIngestConfiguration"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Gets information about the specified participant token.
  """
  @spec get_participant(map(), get_participant_request(), list()) ::
          {:ok, get_participant_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, get_participant_errors()}
  def get_participant(%Client{} = client, input, options \\ []) do
    url_path = "/GetParticipant"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Gets information for the specified public key.
  """
  @spec get_public_key(map(), get_public_key_request(), list()) ::
          {:ok, get_public_key_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, get_public_key_errors()}
  def get_public_key(%Client{} = client, input, options \\ []) do
    url_path = "/GetPublicKey"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Gets information for the specified stage.
  """
  @spec get_stage(map(), get_stage_request(), list()) ::
          {:ok, get_stage_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, get_stage_errors()}
  def get_stage(%Client{} = client, input, options \\ []) do
    url_path = "/GetStage"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Gets information for the specified stage session.
  """
  @spec get_stage_session(map(), get_stage_session_request(), list()) ::
          {:ok, get_stage_session_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, get_stage_session_errors()}
  def get_stage_session(%Client{} = client, input, options \\ []) do
    url_path = "/GetStageSession"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Gets the storage configuration for the specified ARN.
  """
  @spec get_storage_configuration(map(), get_storage_configuration_request(), list()) ::
          {:ok, get_storage_configuration_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, get_storage_configuration_errors()}
  def get_storage_configuration(%Client{} = client, input, options \\ []) do
    url_path = "/GetStorageConfiguration"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Import a public key to be used for signing stage participant tokens.
  """
  @spec import_public_key(map(), import_public_key_request(), list()) ::
          {:ok, import_public_key_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, import_public_key_errors()}
  def import_public_key(%Client{} = client, input, options \\ []) do
    url_path = "/ImportPublicKey"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Gets summary information about all Compositions in your account, in the AWS
  region
  where the API request is processed.
  """
  @spec list_compositions(map(), list_compositions_request(), list()) ::
          {:ok, list_compositions_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, list_compositions_errors()}
  def list_compositions(%Client{} = client, input, options \\ []) do
    url_path = "/ListCompositions"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Gets summary information about all EncoderConfigurations in your account, in the
  AWS
  region where the API request is processed.
  """
  @spec list_encoder_configurations(map(), list_encoder_configurations_request(), list()) ::
          {:ok, list_encoder_configurations_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, list_encoder_configurations_errors()}
  def list_encoder_configurations(%Client{} = client, input, options \\ []) do
    url_path = "/ListEncoderConfigurations"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Lists all IngestConfigurations in your account, in the AWS region where the API
  request is processed.
  """
  @spec list_ingest_configurations(map(), list_ingest_configurations_request(), list()) ::
          {:ok, list_ingest_configurations_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, list_ingest_configurations_errors()}
  def list_ingest_configurations(%Client{} = client, input, options \\ []) do
    url_path = "/ListIngestConfigurations"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Lists events for a specified participant that occurred during a specified stage
  session.
  """
  @spec list_participant_events(map(), list_participant_events_request(), list()) ::
          {:ok, list_participant_events_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, list_participant_events_errors()}
  def list_participant_events(%Client{} = client, input, options \\ []) do
    url_path = "/ListParticipantEvents"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Lists all the replicas for a participant from a source stage.
  """
  @spec list_participant_replicas(map(), list_participant_replicas_request(), list()) ::
          {:ok, list_participant_replicas_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, list_participant_replicas_errors()}
  def list_participant_replicas(%Client{} = client, input, options \\ []) do
    url_path = "/ListParticipantReplicas"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Lists all participants in a specified stage session.
  """
  @spec list_participants(map(), list_participants_request(), list()) ::
          {:ok, list_participants_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, list_participants_errors()}
  def list_participants(%Client{} = client, input, options \\ []) do
    url_path = "/ListParticipants"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Gets summary information about all public keys in your account, in the AWS
  region where the API request is processed.
  """
  @spec list_public_keys(map(), list_public_keys_request(), list()) ::
          {:ok, list_public_keys_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, list_public_keys_errors()}
  def list_public_keys(%Client{} = client, input, options \\ []) do
    url_path = "/ListPublicKeys"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Gets all sessions for a specified stage.
  """
  @spec list_stage_sessions(map(), list_stage_sessions_request(), list()) ::
          {:ok, list_stage_sessions_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, list_stage_sessions_errors()}
  def list_stage_sessions(%Client{} = client, input, options \\ []) do
    url_path = "/ListStageSessions"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Gets summary information about all stages in your account, in the AWS region
  where the
  API request is processed.
  """
  @spec list_stages(map(), list_stages_request(), list()) ::
          {:ok, list_stages_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, list_stages_errors()}
  def list_stages(%Client{} = client, input, options \\ []) do
    url_path = "/ListStages"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Gets summary information about all storage configurations in your account,
  in the AWS region where the API request is processed.
  """
  @spec list_storage_configurations(map(), list_storage_configurations_request(), list()) ::
          {:ok, list_storage_configurations_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, list_storage_configurations_errors()}
  def list_storage_configurations(%Client{} = client, input, options \\ []) do
    url_path = "/ListStorageConfigurations"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Gets information about AWS tags for the specified ARN.
  """
  @spec list_tags_for_resource(map(), String.t() | atom(), list()) ::
          {:ok, list_tags_for_resource_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, list_tags_for_resource_errors()}
  def list_tags_for_resource(%Client{} = client, resource_arn, options \\ []) do
    url_path = "/tags/#{AWS.Util.encode_uri(resource_arn)}"
    headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(client, meta, :get, url_path, query_params, headers, nil, options, 200)
  end

  @doc """
  Starts a Composition from a stage based on the configuration provided in the
  request.

  A Composition is an ephemeral resource that exists after this operation returns
  successfully. Composition stops and the resource is deleted:

    *
  When `StopComposition` is called.

    *
  After a 1-minute timeout, when all participants are disconnected from the
  stage.

    *
  After a 1-minute timeout, if there are no participants in the stage when
  StartComposition is called.

    *
  When broadcasting to the IVS channel fails and all retries are exhausted.

    *
  When broadcasting is disconnected and all attempts to reconnect are
  exhausted.
  """
  @spec start_composition(map(), start_composition_request(), list()) ::
          {:ok, start_composition_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, start_composition_errors()}
  def start_composition(%Client{} = client, input, options \\ []) do
    url_path = "/StartComposition"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Starts replicating a publishing participant from a source stage to a destination
  stage.
  """
  @spec start_participant_replication(map(), start_participant_replication_request(), list()) ::
          {:ok, start_participant_replication_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, start_participant_replication_errors()}
  def start_participant_replication(%Client{} = client, input, options \\ []) do
    url_path = "/StartParticipantReplication"
    headers = []
    custom_headers = []
    query_params = []

    options =
      Keyword.put(
        options,
        :response_header_parameters,
        [
          {"Access-Control-Allow-Origin", "accessControlAllowOrigin"},
          {"Access-Control-Expose-Headers", "accessControlExposeHeaders"},
          {"Cache-Control", "cacheControl"},
          {"Content-Security-Policy", "contentSecurityPolicy"},
          {"Strict-Transport-Security", "strictTransportSecurity"},
          {"X-Content-Type-Options", "xContentTypeOptions"},
          {"X-Frame-Options", "xFrameOptions"}
        ]
      )

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Stops and deletes a Composition resource.

  Any broadcast from the Composition resource
  is stopped.
  """
  @spec stop_composition(map(), stop_composition_request(), list()) ::
          {:ok, stop_composition_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, stop_composition_errors()}
  def stop_composition(%Client{} = client, input, options \\ []) do
    url_path = "/StopComposition"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Stops a replicated participant session.
  """
  @spec stop_participant_replication(map(), stop_participant_replication_request(), list()) ::
          {:ok, stop_participant_replication_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, stop_participant_replication_errors()}
  def stop_participant_replication(%Client{} = client, input, options \\ []) do
    url_path = "/StopParticipantReplication"
    headers = []
    custom_headers = []
    query_params = []

    options =
      Keyword.put(
        options,
        :response_header_parameters,
        [
          {"Access-Control-Allow-Origin", "accessControlAllowOrigin"},
          {"Access-Control-Expose-Headers", "accessControlExposeHeaders"},
          {"Cache-Control", "cacheControl"},
          {"Content-Security-Policy", "contentSecurityPolicy"},
          {"Strict-Transport-Security", "strictTransportSecurity"},
          {"X-Content-Type-Options", "xContentTypeOptions"},
          {"X-Frame-Options", "xFrameOptions"}
        ]
      )

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Adds or updates tags for the AWS resource with the specified ARN.
  """
  @spec tag_resource(map(), String.t() | atom(), tag_resource_request(), list()) ::
          {:ok, tag_resource_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, tag_resource_errors()}
  def tag_resource(%Client{} = client, resource_arn, input, options \\ []) do
    url_path = "/tags/#{AWS.Util.encode_uri(resource_arn)}"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Removes tags from the resource with the specified ARN.
  """
  @spec untag_resource(map(), String.t() | atom(), untag_resource_request(), list()) ::
          {:ok, untag_resource_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, untag_resource_errors()}
  def untag_resource(%Client{} = client, resource_arn, input, options \\ []) do
    url_path = "/tags/#{AWS.Util.encode_uri(resource_arn)}"
    headers = []
    custom_headers = []

    {query_params, input} =
      [
        {"tagKeys", "tagKeys"}
      ]
      |> Request.build_params(input)

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :delete,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Updates a specified IngestConfiguration.

  Only the stage ARN attached to the IngestConfiguration can be updated. An
  IngestConfiguration that is active cannot be updated.
  """
  @spec update_ingest_configuration(map(), update_ingest_configuration_request(), list()) ::
          {:ok, update_ingest_configuration_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, update_ingest_configuration_errors()}
  def update_ingest_configuration(%Client{} = client, input, options \\ []) do
    url_path = "/UpdateIngestConfiguration"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end

  @doc """
  Updates a stage’s configuration.
  """
  @spec update_stage(map(), update_stage_request(), list()) ::
          {:ok, update_stage_response(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, update_stage_errors()}
  def update_stage(%Client{} = client, input, options \\ []) do
    url_path = "/UpdateStage"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

    Request.request_rest(
      client,
      meta,
      :post,
      url_path,
      query_params,
      custom_headers ++ headers,
      input,
      options,
      200
    )
  end
end
