lib/aws/generated/amplify.ex

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

defmodule AWS.Amplify do
  @moduledoc """
  Amplify enables developers to develop and deploy cloud-powered mobile and web
  apps.

  Amplify Hosting provides a continuous delivery and hosting service for web
  applications.
  For more information, see the [Amplify Hosting User Guide](https://docs.aws.amazon.com/amplify/latest/userguide/welcome.html). The
  Amplify Framework is a comprehensive set of SDKs, libraries, tools, and
  documentation
  for client app development. For more information, see the [Amplify Framework.](https://docs.amplify.aws/)
  """

  alias AWS.Client
  alias AWS.Request

  @typedoc """

  ## Example:

      app() :: %{
        "appArn" => String.t() | atom(),
        "appId" => String.t() | atom(),
        "autoBranchCreationConfig" => auto_branch_creation_config(),
        "autoBranchCreationPatterns" => list(String.t() | atom()),
        "basicAuthCredentials" => String.t() | atom(),
        "buildSpec" => String.t() | atom(),
        "cacheConfig" => cache_config(),
        "computeRoleArn" => String.t() | atom(),
        "createTime" => non_neg_integer(),
        "customHeaders" => String.t() | atom(),
        "customRules" => list(custom_rule()),
        "defaultDomain" => String.t() | atom(),
        "description" => String.t() | atom(),
        "enableAutoBranchCreation" => boolean(),
        "enableBasicAuth" => boolean(),
        "enableBranchAutoBuild" => boolean(),
        "enableBranchAutoDeletion" => boolean(),
        "environmentVariables" => map(),
        "iamServiceRoleArn" => String.t() | atom(),
        "jobConfig" => job_config(),
        "name" => String.t() | atom(),
        "platform" => list(any()),
        "productionBranch" => production_branch(),
        "repository" => String.t() | atom(),
        "repositoryCloneMethod" => list(any()),
        "tags" => map(),
        "updateTime" => non_neg_integer(),
        "wafConfiguration" => waf_configuration(),
        "webhookCreateTime" => non_neg_integer()
      }

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

  @typedoc """

  ## Example:

      branch() :: %{
        "activeJobId" => String.t() | atom(),
        "associatedResources" => list(String.t() | atom()),
        "backend" => backend(),
        "backendEnvironmentArn" => String.t() | atom(),
        "basicAuthCredentials" => String.t() | atom(),
        "branchArn" => String.t() | atom(),
        "branchName" => String.t() | atom(),
        "buildSpec" => String.t() | atom(),
        "computeRoleArn" => String.t() | atom(),
        "createTime" => non_neg_integer(),
        "customDomains" => list(String.t() | atom()),
        "description" => String.t() | atom(),
        "destinationBranch" => String.t() | atom(),
        "displayName" => String.t() | atom(),
        "enableAutoBuild" => boolean(),
        "enableBasicAuth" => boolean(),
        "enableNotification" => boolean(),
        "enablePerformanceMode" => boolean(),
        "enablePullRequestPreview" => boolean(),
        "enableSkewProtection" => boolean(),
        "environmentVariables" => map(),
        "framework" => String.t() | atom(),
        "pullRequestEnvironmentName" => String.t() | atom(),
        "sourceBranch" => String.t() | atom(),
        "stage" => list(any()),
        "tags" => map(),
        "thumbnailUrl" => String.t() | atom(),
        "totalNumberOfJobs" => String.t() | atom(),
        "ttl" => String.t() | atom(),
        "updateTime" => non_neg_integer()
      }

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

  @typedoc """

  ## Example:

      start_job_result() :: %{
        "jobSummary" => job_summary()
      }

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

  @typedoc """

  ## Example:

      get_domain_association_request() :: %{}

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

  @typedoc """

  ## Example:

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

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

  @typedoc """

  ## Example:

      internal_failure_exception() :: %{
        "message" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      generate_access_logs_result() :: %{
        "logUrl" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      sub_domain() :: %{
        "dnsRecord" => String.t() | atom(),
        "subDomainSetting" => sub_domain_setting(),
        "verified" => boolean()
      }

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

  @typedoc """

  ## Example:

      create_app_request() :: %{
        optional("accessToken") => String.t() | atom(),
        optional("autoBranchCreationConfig") => auto_branch_creation_config(),
        optional("autoBranchCreationPatterns") => list(String.t() | atom()),
        optional("basicAuthCredentials") => String.t() | atom(),
        optional("buildSpec") => String.t() | atom(),
        optional("cacheConfig") => cache_config(),
        optional("computeRoleArn") => String.t() | atom(),
        optional("customHeaders") => String.t() | atom(),
        optional("customRules") => list(custom_rule()),
        optional("description") => String.t() | atom(),
        optional("enableAutoBranchCreation") => boolean(),
        optional("enableBasicAuth") => boolean(),
        optional("enableBranchAutoBuild") => boolean(),
        optional("enableBranchAutoDeletion") => boolean(),
        optional("environmentVariables") => map(),
        optional("iamServiceRoleArn") => String.t() | atom(),
        optional("jobConfig") => job_config(),
        optional("oauthToken") => String.t() | atom(),
        optional("platform") => list(any()),
        optional("repository") => String.t() | atom(),
        optional("tags") => map(),
        required("name") => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      unauthorized_exception() :: %{
        "message" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      create_branch_request() :: %{
        optional("backend") => backend(),
        optional("backendEnvironmentArn") => String.t() | atom(),
        optional("basicAuthCredentials") => String.t() | atom(),
        optional("buildSpec") => String.t() | atom(),
        optional("computeRoleArn") => String.t() | atom(),
        optional("description") => String.t() | atom(),
        optional("displayName") => String.t() | atom(),
        optional("enableAutoBuild") => boolean(),
        optional("enableBasicAuth") => boolean(),
        optional("enableNotification") => boolean(),
        optional("enablePerformanceMode") => boolean(),
        optional("enablePullRequestPreview") => boolean(),
        optional("enableSkewProtection") => boolean(),
        optional("environmentVariables") => map(),
        optional("framework") => String.t() | atom(),
        optional("pullRequestEnvironmentName") => String.t() | atom(),
        optional("stage") => list(any()),
        optional("tags") => map(),
        optional("ttl") => String.t() | atom(),
        required("branchName") => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      list_jobs_result() :: %{
        "jobSummaries" => list(job_summary()),
        "nextToken" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      create_backend_environment_result() :: %{
        "backendEnvironment" => backend_environment()
      }

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

  @typedoc """

  ## Example:

      update_domain_association_request() :: %{
        optional("autoSubDomainCreationPatterns") => list(String.t() | atom()),
        optional("autoSubDomainIAMRole") => String.t() | atom(),
        optional("certificateSettings") => certificate_settings(),
        optional("enableAutoSubDomain") => boolean(),
        optional("subDomainSettings") => list(sub_domain_setting())
      }

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

  @typedoc """

  ## Example:

      create_domain_association_request() :: %{
        optional("autoSubDomainCreationPatterns") => list(String.t() | atom()),
        optional("autoSubDomainIAMRole") => String.t() | atom(),
        optional("certificateSettings") => certificate_settings(),
        optional("enableAutoSubDomain") => boolean(),
        required("domainName") => String.t() | atom(),
        required("subDomainSettings") => list(sub_domain_setting())
      }

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

  @typedoc """

  ## Example:

      untag_resource_response() :: %{}

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

  @typedoc """

  ## Example:

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

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

  @typedoc """

  ## Example:

      backend() :: %{
        "stackArn" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      create_webhook_result() :: %{
        "webhook" => webhook()
      }

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

  @typedoc """

  ## Example:

      create_deployment_request() :: %{
        optional("fileMap") => map()
      }

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

  @typedoc """

  ## Example:

      delete_job_result() :: %{
        "jobSummary" => job_summary()
      }

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

  @typedoc """

  ## Example:

      generate_access_logs_request() :: %{
        optional("endTime") => non_neg_integer(),
        optional("startTime") => non_neg_integer(),
        required("domainName") => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      list_branches_result() :: %{
        "branches" => list(branch()),
        "nextToken" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      get_artifact_url_request() :: %{}

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

  @typedoc """

  ## Example:

      stop_job_request() :: %{}

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

  @typedoc """

  ## Example:

      delete_domain_association_request() :: %{}

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

  @typedoc """

  ## Example:

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

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

  @typedoc """

  ## Example:

      list_backend_environments_result() :: %{
        "backendEnvironments" => list(backend_environment()),
        "nextToken" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      delete_webhook_request() :: %{}

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

  @typedoc """

  ## Example:

      list_apps_result() :: %{
        "apps" => list(app()),
        "nextToken" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      create_backend_environment_request() :: %{
        optional("deploymentArtifacts") => String.t() | atom(),
        optional("stackName") => String.t() | atom(),
        required("environmentName") => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      delete_backend_environment_result() :: %{
        "backendEnvironment" => backend_environment()
      }

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

  @typedoc """

  ## Example:

      get_job_result() :: %{
        "job" => job()
      }

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

  @typedoc """

  ## Example:

      get_app_request() :: %{}

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

  @typedoc """

  ## Example:

      job_summary() :: %{
        "commitId" => String.t() | atom(),
        "commitMessage" => String.t() | atom(),
        "commitTime" => non_neg_integer(),
        "endTime" => non_neg_integer(),
        "jobArn" => String.t() | atom(),
        "jobId" => String.t() | atom(),
        "jobType" => list(any()),
        "sourceUrl" => String.t() | atom(),
        "sourceUrlType" => list(any()),
        "startTime" => non_neg_integer(),
        "status" => list(any())
      }

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

  @typedoc """

  ## Example:

      sub_domain_setting() :: %{
        "branchName" => String.t() | atom(),
        "prefix" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      update_app_result() :: %{
        "app" => app()
      }

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

  @typedoc """

  ## Example:

      domain_association() :: %{
        "autoSubDomainCreationPatterns" => list(String.t() | atom()),
        "autoSubDomainIAMRole" => String.t() | atom(),
        "certificate" => certificate(),
        "certificateVerificationDNSRecord" => String.t() | atom(),
        "domainAssociationArn" => String.t() | atom(),
        "domainName" => String.t() | atom(),
        "domainStatus" => list(any()),
        "enableAutoSubDomain" => boolean(),
        "statusReason" => String.t() | atom(),
        "subDomains" => list(sub_domain()),
        "updateStatus" => list(any())
      }

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

  @typedoc """

  ## Example:

      get_backend_environment_result() :: %{
        "backendEnvironment" => backend_environment()
      }

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

  @typedoc """

  ## Example:

      start_deployment_result() :: %{
        "jobSummary" => job_summary()
      }

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

  @typedoc """

  ## Example:

      resource_not_found_exception() :: %{
        "code" => String.t() | atom(),
        "message" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      dependent_service_failure_exception() :: %{
        "message" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      delete_webhook_result() :: %{
        "webhook" => webhook()
      }

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

  @typedoc """

  ## Example:

      production_branch() :: %{
        "branchName" => String.t() | atom(),
        "lastDeployTime" => non_neg_integer(),
        "status" => String.t() | atom(),
        "thumbnailUrl" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      create_deployment_result() :: %{
        "fileUploadUrls" => map(),
        "jobId" => String.t() | atom(),
        "zipUploadUrl" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      update_webhook_request() :: %{
        optional("branchName") => String.t() | atom(),
        optional("description") => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      list_webhooks_result() :: %{
        "nextToken" => String.t() | atom(),
        "webhooks" => list(webhook())
      }

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

  @typedoc """

  ## Example:

      not_found_exception() :: %{
        "message" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      create_webhook_request() :: %{
        optional("description") => String.t() | atom(),
        required("branchName") => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      backend_environment() :: %{
        "backendEnvironmentArn" => String.t() | atom(),
        "createTime" => non_neg_integer(),
        "deploymentArtifacts" => String.t() | atom(),
        "environmentName" => String.t() | atom(),
        "stackName" => String.t() | atom(),
        "updateTime" => non_neg_integer()
      }

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

  @typedoc """

  ## Example:

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

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

  @typedoc """

  ## Example:

      waf_configuration() :: %{
        "statusReason" => String.t() | atom(),
        "wafStatus" => list(any()),
        "webAclArn" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      delete_app_result() :: %{
        "app" => app()
      }

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

  @typedoc """

  ## Example:

      update_branch_result() :: %{
        "branch" => branch()
      }

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

  @typedoc """

  ## Example:

      get_branch_request() :: %{}

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

  @typedoc """

  ## Example:

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

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

  @typedoc """

  ## Example:

      start_job_request() :: %{
        optional("commitId") => String.t() | atom(),
        optional("commitMessage") => String.t() | atom(),
        optional("commitTime") => non_neg_integer(),
        optional("jobId") => String.t() | atom(),
        optional("jobReason") => String.t() | atom(),
        required("jobType") => list(any())
      }

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

  @typedoc """

  ## Example:

      cache_config() :: %{
        "type" => list(any())
      }

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

  @typedoc """

  ## Example:

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

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

  @typedoc """

  ## Example:

      delete_backend_environment_request() :: %{}

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

  @typedoc """

  ## Example:

      custom_rule() :: %{
        "condition" => String.t() | atom(),
        "source" => String.t() | atom(),
        "status" => String.t() | atom(),
        "target" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      create_branch_result() :: %{
        "branch" => branch()
      }

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

  @typedoc """

  ## Example:

      certificate() :: %{
        "certificateVerificationDNSRecord" => String.t() | atom(),
        "customCertificateArn" => String.t() | atom(),
        "type" => list(any())
      }

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

  @typedoc """

  ## Example:

      delete_branch_request() :: %{}

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

  @typedoc """

  ## Example:

      get_webhook_request() :: %{}

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

  @typedoc """

  ## Example:

      delete_app_request() :: %{}

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

  @typedoc """

  ## Example:

      job_config() :: %{
        "buildComputeType" => list(any())
      }

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

  @typedoc """

  ## Example:

      update_branch_request() :: %{
        optional("backend") => backend(),
        optional("backendEnvironmentArn") => String.t() | atom(),
        optional("basicAuthCredentials") => String.t() | atom(),
        optional("buildSpec") => String.t() | atom(),
        optional("computeRoleArn") => String.t() | atom(),
        optional("description") => String.t() | atom(),
        optional("displayName") => String.t() | atom(),
        optional("enableAutoBuild") => boolean(),
        optional("enableBasicAuth") => boolean(),
        optional("enableNotification") => boolean(),
        optional("enablePerformanceMode") => boolean(),
        optional("enablePullRequestPreview") => boolean(),
        optional("enableSkewProtection") => boolean(),
        optional("environmentVariables") => map(),
        optional("framework") => String.t() | atom(),
        optional("pullRequestEnvironmentName") => String.t() | atom(),
        optional("stage") => list(any()),
        optional("ttl") => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      tag_resource_response() :: %{}

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

  @typedoc """

  ## Example:

      update_domain_association_result() :: %{
        "domainAssociation" => domain_association()
      }

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

  @typedoc """

  ## Example:

      delete_job_request() :: %{}

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

  @typedoc """

  ## Example:

      get_domain_association_result() :: %{
        "domainAssociation" => domain_association()
      }

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

  @typedoc """

  ## Example:

      list_tags_for_resource_request() :: %{}

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

  @typedoc """

  ## Example:

      job() :: %{
        "steps" => list(step()),
        "summary" => job_summary()
      }

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

  @typedoc """

  ## Example:

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

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

  @typedoc """

  ## Example:

      update_app_request() :: %{
        optional("accessToken") => String.t() | atom(),
        optional("autoBranchCreationConfig") => auto_branch_creation_config(),
        optional("autoBranchCreationPatterns") => list(String.t() | atom()),
        optional("basicAuthCredentials") => String.t() | atom(),
        optional("buildSpec") => String.t() | atom(),
        optional("cacheConfig") => cache_config(),
        optional("computeRoleArn") => String.t() | atom(),
        optional("customHeaders") => String.t() | atom(),
        optional("customRules") => list(custom_rule()),
        optional("description") => String.t() | atom(),
        optional("enableAutoBranchCreation") => boolean(),
        optional("enableBasicAuth") => boolean(),
        optional("enableBranchAutoBuild") => boolean(),
        optional("enableBranchAutoDeletion") => boolean(),
        optional("environmentVariables") => map(),
        optional("iamServiceRoleArn") => String.t() | atom(),
        optional("jobConfig") => job_config(),
        optional("name") => String.t() | atom(),
        optional("oauthToken") => String.t() | atom(),
        optional("platform") => list(any()),
        optional("repository") => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      get_job_request() :: %{}

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

  @typedoc """

  ## Example:

      certificate_settings() :: %{
        "customCertificateArn" => String.t() | atom(),
        "type" => list(any())
      }

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

  @typedoc """

  ## Example:

      limit_exceeded_exception() :: %{
        "message" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

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

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

  @typedoc """

  ## Example:

      get_app_result() :: %{
        "app" => app()
      }

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

  @typedoc """

  ## Example:

      bad_request_exception() :: %{
        "message" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      delete_domain_association_result() :: %{
        "domainAssociation" => domain_association()
      }

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

  @typedoc """

  ## Example:

      artifact() :: %{
        "artifactFileName" => String.t() | atom(),
        "artifactId" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      list_artifacts_result() :: %{
        "artifacts" => list(artifact()),
        "nextToken" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      get_webhook_result() :: %{
        "webhook" => webhook()
      }

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

  @typedoc """

  ## Example:

      step() :: %{
        "artifactsUrl" => String.t() | atom(),
        "context" => String.t() | atom(),
        "endTime" => non_neg_integer(),
        "logUrl" => String.t() | atom(),
        "screenshots" => map(),
        "startTime" => non_neg_integer(),
        "status" => list(any()),
        "statusReason" => String.t() | atom(),
        "stepName" => String.t() | atom(),
        "testArtifactsUrl" => String.t() | atom(),
        "testConfigUrl" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

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

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

  @typedoc """

  ## Example:

      get_branch_result() :: %{
        "branch" => branch()
      }

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

  @typedoc """

  ## Example:

      delete_branch_result() :: %{
        "branch" => branch()
      }

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

  @typedoc """

  ## Example:

      create_app_result() :: %{
        "app" => app()
      }

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

  @typedoc """

  ## Example:

      get_backend_environment_request() :: %{}

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

  @typedoc """

  ## Example:

      auto_branch_creation_config() :: %{
        "basicAuthCredentials" => String.t() | atom(),
        "buildSpec" => String.t() | atom(),
        "enableAutoBuild" => boolean(),
        "enableBasicAuth" => boolean(),
        "enablePerformanceMode" => boolean(),
        "enablePullRequestPreview" => boolean(),
        "environmentVariables" => map(),
        "framework" => String.t() | atom(),
        "pullRequestEnvironmentName" => String.t() | atom(),
        "stage" => list(any())
      }

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

  @typedoc """

  ## Example:

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

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

  @typedoc """

  ## Example:

      get_artifact_url_result() :: %{
        "artifactId" => String.t() | atom(),
        "artifactUrl" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      list_domain_associations_result() :: %{
        "domainAssociations" => list(domain_association()),
        "nextToken" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      webhook() :: %{
        "appId" => String.t() | atom(),
        "branchName" => String.t() | atom(),
        "createTime" => non_neg_integer(),
        "description" => String.t() | atom(),
        "updateTime" => non_neg_integer(),
        "webhookArn" => String.t() | atom(),
        "webhookId" => String.t() | atom(),
        "webhookUrl" => String.t() | atom()
      }

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

  @typedoc """

  ## Example:

      stop_job_result() :: %{
        "jobSummary" => job_summary()
      }

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

  @typedoc """

  ## Example:

      start_deployment_request() :: %{
        optional("jobId") => String.t() | atom(),
        optional("sourceUrl") => String.t() | atom(),
        optional("sourceUrlType") => list(any())
      }

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

  @typedoc """

  ## Example:

      create_domain_association_result() :: %{
        "domainAssociation" => domain_association()
      }

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

  @typedoc """

  ## Example:

      update_webhook_result() :: %{
        "webhook" => webhook()
      }

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

  @type create_app_errors() ::
          bad_request_exception()
          | limit_exceeded_exception()
          | dependent_service_failure_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type create_backend_environment_errors() ::
          bad_request_exception()
          | limit_exceeded_exception()
          | not_found_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type create_branch_errors() ::
          bad_request_exception()
          | limit_exceeded_exception()
          | not_found_exception()
          | dependent_service_failure_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type create_deployment_errors() ::
          bad_request_exception()
          | limit_exceeded_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type create_domain_association_errors() ::
          bad_request_exception()
          | limit_exceeded_exception()
          | not_found_exception()
          | dependent_service_failure_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type create_webhook_errors() ::
          bad_request_exception()
          | limit_exceeded_exception()
          | not_found_exception()
          | dependent_service_failure_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type delete_app_errors() ::
          bad_request_exception()
          | not_found_exception()
          | dependent_service_failure_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type delete_backend_environment_errors() ::
          bad_request_exception()
          | not_found_exception()
          | dependent_service_failure_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type delete_branch_errors() ::
          bad_request_exception()
          | not_found_exception()
          | dependent_service_failure_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type delete_domain_association_errors() ::
          bad_request_exception()
          | not_found_exception()
          | dependent_service_failure_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type delete_job_errors() ::
          bad_request_exception()
          | limit_exceeded_exception()
          | not_found_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type delete_webhook_errors() ::
          bad_request_exception()
          | limit_exceeded_exception()
          | not_found_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type generate_access_logs_errors() ::
          bad_request_exception()
          | not_found_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type get_app_errors() ::
          bad_request_exception()
          | not_found_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type get_artifact_url_errors() ::
          bad_request_exception()
          | limit_exceeded_exception()
          | not_found_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type get_backend_environment_errors() ::
          bad_request_exception()
          | not_found_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type get_branch_errors() ::
          bad_request_exception()
          | not_found_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type get_domain_association_errors() ::
          bad_request_exception()
          | not_found_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type get_job_errors() ::
          bad_request_exception()
          | limit_exceeded_exception()
          | not_found_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type get_webhook_errors() ::
          bad_request_exception()
          | limit_exceeded_exception()
          | not_found_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type list_apps_errors() ::
          bad_request_exception() | unauthorized_exception() | internal_failure_exception()

  @type list_artifacts_errors() ::
          bad_request_exception()
          | limit_exceeded_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type list_backend_environments_errors() ::
          bad_request_exception() | unauthorized_exception() | internal_failure_exception()

  @type list_branches_errors() ::
          bad_request_exception() | unauthorized_exception() | internal_failure_exception()

  @type list_domain_associations_errors() ::
          bad_request_exception() | unauthorized_exception() | internal_failure_exception()

  @type list_jobs_errors() ::
          bad_request_exception()
          | limit_exceeded_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type list_tags_for_resource_errors() ::
          bad_request_exception() | resource_not_found_exception() | internal_failure_exception()

  @type list_webhooks_errors() ::
          bad_request_exception()
          | limit_exceeded_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type start_deployment_errors() ::
          bad_request_exception()
          | limit_exceeded_exception()
          | not_found_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type start_job_errors() ::
          bad_request_exception()
          | limit_exceeded_exception()
          | not_found_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type stop_job_errors() ::
          bad_request_exception()
          | limit_exceeded_exception()
          | not_found_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type tag_resource_errors() ::
          bad_request_exception() | resource_not_found_exception() | internal_failure_exception()

  @type untag_resource_errors() ::
          bad_request_exception() | resource_not_found_exception() | internal_failure_exception()

  @type update_app_errors() ::
          bad_request_exception()
          | not_found_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type update_branch_errors() ::
          bad_request_exception()
          | not_found_exception()
          | dependent_service_failure_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type update_domain_association_errors() ::
          bad_request_exception()
          | not_found_exception()
          | dependent_service_failure_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  @type update_webhook_errors() ::
          bad_request_exception()
          | not_found_exception()
          | dependent_service_failure_exception()
          | unauthorized_exception()
          | internal_failure_exception()

  def metadata do
    %{
      api_version: "2017-07-25",
      content_type: "application/x-amz-json-1.1",
      credential_scope: nil,
      endpoint_prefix: "amplify",
      global?: false,
      hostname: nil,
      protocol: "rest-json",
      service_id: "Amplify",
      signature_version: "v4",
      signing_name: "amplify",
      target_prefix: nil
    }
  end

  @doc """
  Creates a new Amplify app.
  """
  @spec create_app(map(), create_app_request(), list()) ::
          {:ok, create_app_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, create_app_errors()}
  def create_app(%Client{} = client, input, options \\ []) do
    url_path = "/apps"
    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 backend environment for an Amplify app.

  This API is available only to Amplify Gen 1 applications where the
  backend is created using Amplify Studio or the Amplify
  command line interface (CLI). This API isn’t available to Amplify Gen 2
  applications. When you deploy an application with Amplify Gen 2, you provision
  the app's
  backend infrastructure using Typescript code.
  """
  @spec create_backend_environment(
          map(),
          String.t() | atom(),
          create_backend_environment_request(),
          list()
        ) ::
          {:ok, create_backend_environment_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, create_backend_environment_errors()}
  def create_backend_environment(%Client{} = client, app_id, input, options \\ []) do
    url_path = "/apps/#{AWS.Util.encode_uri(app_id)}/backendenvironments"
    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 branch for an Amplify app.
  """
  @spec create_branch(map(), String.t() | atom(), create_branch_request(), list()) ::
          {:ok, create_branch_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, create_branch_errors()}
  def create_branch(%Client{} = client, app_id, input, options \\ []) do
    url_path = "/apps/#{AWS.Util.encode_uri(app_id)}/branches"
    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 deployment for a manually deployed Amplify app.

  Manually deployed apps are
  not connected to a Git repository.

  The maximum duration between the `CreateDeployment` call and the
  `StartDeployment` call cannot exceed 8 hours. If the duration exceeds 8
  hours, the `StartDeployment` call and the associated `Job` will
  fail.
  """
  @spec create_deployment(
          map(),
          String.t() | atom(),
          String.t() | atom(),
          create_deployment_request(),
          list()
        ) ::
          {:ok, create_deployment_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, create_deployment_errors()}
  def create_deployment(%Client{} = client, app_id, branch_name, input, options \\ []) do
    url_path =
      "/apps/#{AWS.Util.encode_uri(app_id)}/branches/#{AWS.Util.encode_uri(branch_name)}/deployments"

    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 domain association for an Amplify app.

  This action associates a custom
  domain with the Amplify app
  """
  @spec create_domain_association(
          map(),
          String.t() | atom(),
          create_domain_association_request(),
          list()
        ) ::
          {:ok, create_domain_association_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, create_domain_association_errors()}
  def create_domain_association(%Client{} = client, app_id, input, options \\ []) do
    url_path = "/apps/#{AWS.Util.encode_uri(app_id)}/domains"
    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 webhook on an Amplify app.
  """
  @spec create_webhook(map(), String.t() | atom(), create_webhook_request(), list()) ::
          {:ok, create_webhook_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, create_webhook_errors()}
  def create_webhook(%Client{} = client, app_id, input, options \\ []) do
    url_path = "/apps/#{AWS.Util.encode_uri(app_id)}/webhooks"
    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 existing Amplify app specified by an app ID.
  """
  @spec delete_app(map(), String.t() | atom(), delete_app_request(), list()) ::
          {:ok, delete_app_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, delete_app_errors()}
  def delete_app(%Client{} = client, app_id, input, options \\ []) do
    url_path = "/apps/#{AWS.Util.encode_uri(app_id)}"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

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

  @doc """
  Deletes a backend environment for an Amplify app.

  This API is available only to Amplify Gen 1 applications where the
  backend is created using Amplify Studio or the Amplify
  command line interface (CLI). This API isn’t available to Amplify Gen 2
  applications. When you deploy an application with Amplify Gen 2, you provision
  the app's
  backend infrastructure using Typescript code.
  """
  @spec delete_backend_environment(
          map(),
          String.t() | atom(),
          String.t() | atom(),
          delete_backend_environment_request(),
          list()
        ) ::
          {:ok, delete_backend_environment_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, delete_backend_environment_errors()}
  def delete_backend_environment(
        %Client{} = client,
        app_id,
        environment_name,
        input,
        options \\ []
      ) do
    url_path =
      "/apps/#{AWS.Util.encode_uri(app_id)}/backendenvironments/#{AWS.Util.encode_uri(environment_name)}"

    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

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

  @doc """
  Deletes a branch for an Amplify app.
  """
  @spec delete_branch(
          map(),
          String.t() | atom(),
          String.t() | atom(),
          delete_branch_request(),
          list()
        ) ::
          {:ok, delete_branch_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, delete_branch_errors()}
  def delete_branch(%Client{} = client, app_id, branch_name, input, options \\ []) do
    url_path = "/apps/#{AWS.Util.encode_uri(app_id)}/branches/#{AWS.Util.encode_uri(branch_name)}"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

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

  @doc """
  Deletes a domain association for an Amplify app.
  """
  @spec delete_domain_association(
          map(),
          String.t() | atom(),
          String.t() | atom(),
          delete_domain_association_request(),
          list()
        ) ::
          {:ok, delete_domain_association_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, delete_domain_association_errors()}
  def delete_domain_association(%Client{} = client, app_id, domain_name, input, options \\ []) do
    url_path = "/apps/#{AWS.Util.encode_uri(app_id)}/domains/#{AWS.Util.encode_uri(domain_name)}"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

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

  @doc """
  Deletes a job for a branch of an Amplify app.
  """
  @spec delete_job(
          map(),
          String.t() | atom(),
          String.t() | atom(),
          String.t() | atom(),
          delete_job_request(),
          list()
        ) ::
          {:ok, delete_job_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, delete_job_errors()}
  def delete_job(%Client{} = client, app_id, branch_name, job_id, input, options \\ []) do
    url_path =
      "/apps/#{AWS.Util.encode_uri(app_id)}/branches/#{AWS.Util.encode_uri(branch_name)}/jobs/#{AWS.Util.encode_uri(job_id)}"

    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

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

  @doc """
  Deletes a webhook.
  """
  @spec delete_webhook(map(), String.t() | atom(), delete_webhook_request(), list()) ::
          {:ok, delete_webhook_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, delete_webhook_errors()}
  def delete_webhook(%Client{} = client, webhook_id, input, options \\ []) do
    url_path = "/webhooks/#{AWS.Util.encode_uri(webhook_id)}"
    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

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

  @doc """
  Returns the website access logs for a specific time range using a presigned URL.
  """
  @spec generate_access_logs(map(), String.t() | atom(), generate_access_logs_request(), list()) ::
          {:ok, generate_access_logs_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, generate_access_logs_errors()}
  def generate_access_logs(%Client{} = client, app_id, input, options \\ []) do
    url_path = "/apps/#{AWS.Util.encode_uri(app_id)}/accesslogs"
    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 """
  Returns an existing Amplify app specified by an app ID.
  """
  @spec get_app(map(), String.t() | atom(), list()) ::
          {:ok, get_app_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, get_app_errors()}
  def get_app(%Client{} = client, app_id, options \\ []) do
    url_path = "/apps/#{AWS.Util.encode_uri(app_id)}"
    headers = []
    query_params = []

    meta = metadata()

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

  @doc """
  Returns the artifact info that corresponds to an artifact id.
  """
  @spec get_artifact_url(map(), String.t() | atom(), list()) ::
          {:ok, get_artifact_url_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, get_artifact_url_errors()}
  def get_artifact_url(%Client{} = client, artifact_id, options \\ []) do
    url_path = "/artifacts/#{AWS.Util.encode_uri(artifact_id)}"
    headers = []
    query_params = []

    meta = metadata()

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

  @doc """
  Returns a backend environment for an Amplify app.

  This API is available only to Amplify Gen 1 applications where the
  backend is created using Amplify Studio or the Amplify
  command line interface (CLI). This API isn’t available to Amplify Gen 2
  applications. When you deploy an application with Amplify Gen 2, you provision
  the app's
  backend infrastructure using Typescript code.
  """
  @spec get_backend_environment(map(), String.t() | atom(), String.t() | atom(), list()) ::
          {:ok, get_backend_environment_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, get_backend_environment_errors()}
  def get_backend_environment(%Client{} = client, app_id, environment_name, options \\ []) do
    url_path =
      "/apps/#{AWS.Util.encode_uri(app_id)}/backendenvironments/#{AWS.Util.encode_uri(environment_name)}"

    headers = []
    query_params = []

    meta = metadata()

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

  @doc """
  Returns a branch for an Amplify app.
  """
  @spec get_branch(map(), String.t() | atom(), String.t() | atom(), list()) ::
          {:ok, get_branch_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, get_branch_errors()}
  def get_branch(%Client{} = client, app_id, branch_name, options \\ []) do
    url_path = "/apps/#{AWS.Util.encode_uri(app_id)}/branches/#{AWS.Util.encode_uri(branch_name)}"
    headers = []
    query_params = []

    meta = metadata()

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

  @doc """
  Returns the domain information for an Amplify app.
  """
  @spec get_domain_association(map(), String.t() | atom(), String.t() | atom(), list()) ::
          {:ok, get_domain_association_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, get_domain_association_errors()}
  def get_domain_association(%Client{} = client, app_id, domain_name, options \\ []) do
    url_path = "/apps/#{AWS.Util.encode_uri(app_id)}/domains/#{AWS.Util.encode_uri(domain_name)}"
    headers = []
    query_params = []

    meta = metadata()

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

  @doc """
  Returns a job for a branch of an Amplify app.
  """
  @spec get_job(map(), String.t() | atom(), String.t() | atom(), String.t() | atom(), list()) ::
          {:ok, get_job_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, get_job_errors()}
  def get_job(%Client{} = client, app_id, branch_name, job_id, options \\ []) do
    url_path =
      "/apps/#{AWS.Util.encode_uri(app_id)}/branches/#{AWS.Util.encode_uri(branch_name)}/jobs/#{AWS.Util.encode_uri(job_id)}"

    headers = []
    query_params = []

    meta = metadata()

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

  @doc """
  Returns the webhook information that corresponds to a specified webhook ID.
  """
  @spec get_webhook(map(), String.t() | atom(), list()) ::
          {:ok, get_webhook_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, get_webhook_errors()}
  def get_webhook(%Client{} = client, webhook_id, options \\ []) do
    url_path = "/webhooks/#{AWS.Util.encode_uri(webhook_id)}"
    headers = []
    query_params = []

    meta = metadata()

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

  @doc """
  Returns a list of the existing Amplify apps.
  """
  @spec list_apps(map(), String.t() | atom() | nil, String.t() | atom() | nil, list()) ::
          {:ok, list_apps_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, list_apps_errors()}
  def list_apps(%Client{} = client, max_results \\ nil, next_token \\ nil, options \\ []) do
    url_path = "/apps"
    headers = []
    query_params = []

    query_params =
      if !is_nil(next_token) do
        [{"nextToken", next_token} | query_params]
      else
        query_params
      end

    query_params =
      if !is_nil(max_results) do
        [{"maxResults", max_results} | query_params]
      else
        query_params
      end

    meta = metadata()

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

  @doc """
  Returns a list of end-to-end testing artifacts for a specified app, branch, and
  job.

  To return the build artifacts, use the
  [GetJob](https://docs.aws.amazon.com/amplify/latest/APIReference/API_GetJob.html) API.

  For more information about Amplify testing support, see [Setting up
  end-to-end Cypress tests for your Amplify
  application](https://docs.aws.amazon.com/amplify/latest/userguide/running-tests.html)
  in the
  *Amplify Hosting User Guide*.
  """
  @spec list_artifacts(
          map(),
          String.t() | atom(),
          String.t() | atom(),
          String.t() | atom(),
          String.t() | atom() | nil,
          String.t() | atom() | nil,
          list()
        ) ::
          {:ok, list_artifacts_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, list_artifacts_errors()}
  def list_artifacts(
        %Client{} = client,
        app_id,
        branch_name,
        job_id,
        max_results \\ nil,
        next_token \\ nil,
        options \\ []
      ) do
    url_path =
      "/apps/#{AWS.Util.encode_uri(app_id)}/branches/#{AWS.Util.encode_uri(branch_name)}/jobs/#{AWS.Util.encode_uri(job_id)}/artifacts"

    headers = []
    query_params = []

    query_params =
      if !is_nil(next_token) do
        [{"nextToken", next_token} | query_params]
      else
        query_params
      end

    query_params =
      if !is_nil(max_results) do
        [{"maxResults", max_results} | query_params]
      else
        query_params
      end

    meta = metadata()

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

  @doc """
  Lists the backend environments for an Amplify app.

  This API is available only to Amplify Gen 1 applications where the
  backend is created using Amplify Studio or the Amplify
  command line interface (CLI). This API isn’t available to Amplify Gen 2
  applications. When you deploy an application with Amplify Gen 2, you provision
  the app's
  backend infrastructure using Typescript code.
  """
  @spec list_backend_environments(
          map(),
          String.t() | atom(),
          String.t() | atom() | nil,
          String.t() | atom() | nil,
          String.t() | atom() | nil,
          list()
        ) ::
          {:ok, list_backend_environments_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, list_backend_environments_errors()}
  def list_backend_environments(
        %Client{} = client,
        app_id,
        environment_name \\ nil,
        max_results \\ nil,
        next_token \\ nil,
        options \\ []
      ) do
    url_path = "/apps/#{AWS.Util.encode_uri(app_id)}/backendenvironments"
    headers = []
    query_params = []

    query_params =
      if !is_nil(next_token) do
        [{"nextToken", next_token} | query_params]
      else
        query_params
      end

    query_params =
      if !is_nil(max_results) do
        [{"maxResults", max_results} | query_params]
      else
        query_params
      end

    query_params =
      if !is_nil(environment_name) do
        [{"environmentName", environment_name} | query_params]
      else
        query_params
      end

    meta = metadata()

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

  @doc """
  Lists the branches of an Amplify app.
  """
  @spec list_branches(
          map(),
          String.t() | atom(),
          String.t() | atom() | nil,
          String.t() | atom() | nil,
          list()
        ) ::
          {:ok, list_branches_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, list_branches_errors()}
  def list_branches(
        %Client{} = client,
        app_id,
        max_results \\ nil,
        next_token \\ nil,
        options \\ []
      ) do
    url_path = "/apps/#{AWS.Util.encode_uri(app_id)}/branches"
    headers = []
    query_params = []

    query_params =
      if !is_nil(next_token) do
        [{"nextToken", next_token} | query_params]
      else
        query_params
      end

    query_params =
      if !is_nil(max_results) do
        [{"maxResults", max_results} | query_params]
      else
        query_params
      end

    meta = metadata()

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

  @doc """
  Returns the domain associations for an Amplify app.
  """
  @spec list_domain_associations(
          map(),
          String.t() | atom(),
          String.t() | atom() | nil,
          String.t() | atom() | nil,
          list()
        ) ::
          {:ok, list_domain_associations_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, list_domain_associations_errors()}
  def list_domain_associations(
        %Client{} = client,
        app_id,
        max_results \\ nil,
        next_token \\ nil,
        options \\ []
      ) do
    url_path = "/apps/#{AWS.Util.encode_uri(app_id)}/domains"
    headers = []
    query_params = []

    query_params =
      if !is_nil(next_token) do
        [{"nextToken", next_token} | query_params]
      else
        query_params
      end

    query_params =
      if !is_nil(max_results) do
        [{"maxResults", max_results} | query_params]
      else
        query_params
      end

    meta = metadata()

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

  @doc """
  Lists the jobs for a branch of an Amplify app.
  """
  @spec list_jobs(
          map(),
          String.t() | atom(),
          String.t() | atom(),
          String.t() | atom() | nil,
          String.t() | atom() | nil,
          list()
        ) ::
          {:ok, list_jobs_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, list_jobs_errors()}
  def list_jobs(
        %Client{} = client,
        app_id,
        branch_name,
        max_results \\ nil,
        next_token \\ nil,
        options \\ []
      ) do
    url_path =
      "/apps/#{AWS.Util.encode_uri(app_id)}/branches/#{AWS.Util.encode_uri(branch_name)}/jobs"

    headers = []
    query_params = []

    query_params =
      if !is_nil(next_token) do
        [{"nextToken", next_token} | query_params]
      else
        query_params
      end

    query_params =
      if !is_nil(max_results) do
        [{"maxResults", max_results} | query_params]
      else
        query_params
      end

    meta = metadata()

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

  @doc """
  Returns a list of tags for a specified Amazon Resource Name (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 """
  Returns a list of webhooks for an Amplify app.
  """
  @spec list_webhooks(
          map(),
          String.t() | atom(),
          String.t() | atom() | nil,
          String.t() | atom() | nil,
          list()
        ) ::
          {:ok, list_webhooks_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, list_webhooks_errors()}
  def list_webhooks(
        %Client{} = client,
        app_id,
        max_results \\ nil,
        next_token \\ nil,
        options \\ []
      ) do
    url_path = "/apps/#{AWS.Util.encode_uri(app_id)}/webhooks"
    headers = []
    query_params = []

    query_params =
      if !is_nil(next_token) do
        [{"nextToken", next_token} | query_params]
      else
        query_params
      end

    query_params =
      if !is_nil(max_results) do
        [{"maxResults", max_results} | query_params]
      else
        query_params
      end

    meta = metadata()

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

  @doc """
  Starts a deployment for a manually deployed app.

  Manually deployed apps are not
  connected to a Git repository.

  The maximum duration between the `CreateDeployment` call and the
  `StartDeployment` call cannot exceed 8 hours. If the duration exceeds 8
  hours, the `StartDeployment` call and the associated `Job` will
  fail.
  """
  @spec start_deployment(
          map(),
          String.t() | atom(),
          String.t() | atom(),
          start_deployment_request(),
          list()
        ) ::
          {:ok, start_deployment_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, start_deployment_errors()}
  def start_deployment(%Client{} = client, app_id, branch_name, input, options \\ []) do
    url_path =
      "/apps/#{AWS.Util.encode_uri(app_id)}/branches/#{AWS.Util.encode_uri(branch_name)}/deployments/start"

    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 a new job for a branch of an Amplify app.
  """
  @spec start_job(map(), String.t() | atom(), String.t() | atom(), start_job_request(), list()) ::
          {:ok, start_job_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, start_job_errors()}
  def start_job(%Client{} = client, app_id, branch_name, input, options \\ []) do
    url_path =
      "/apps/#{AWS.Util.encode_uri(app_id)}/branches/#{AWS.Util.encode_uri(branch_name)}/jobs"

    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 job that is in progress for a branch of an Amplify app.
  """
  @spec stop_job(
          map(),
          String.t() | atom(),
          String.t() | atom(),
          String.t() | atom(),
          stop_job_request(),
          list()
        ) ::
          {:ok, stop_job_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, stop_job_errors()}
  def stop_job(%Client{} = client, app_id, branch_name, job_id, input, options \\ []) do
    url_path =
      "/apps/#{AWS.Util.encode_uri(app_id)}/branches/#{AWS.Util.encode_uri(branch_name)}/jobs/#{AWS.Util.encode_uri(job_id)}/stop"

    headers = []
    custom_headers = []
    query_params = []

    meta = metadata()

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

  @doc """
  Tags the resource with a tag key and value.
  """
  @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 """
  Untags a resource with a specified Amazon Resource Name (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 an existing Amplify app.
  """
  @spec update_app(map(), String.t() | atom(), update_app_request(), list()) ::
          {:ok, update_app_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, update_app_errors()}
  def update_app(%Client{} = client, app_id, input, options \\ []) do
    url_path = "/apps/#{AWS.Util.encode_uri(app_id)}"
    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 branch for an Amplify app.
  """
  @spec update_branch(
          map(),
          String.t() | atom(),
          String.t() | atom(),
          update_branch_request(),
          list()
        ) ::
          {:ok, update_branch_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, update_branch_errors()}
  def update_branch(%Client{} = client, app_id, branch_name, input, options \\ []) do
    url_path = "/apps/#{AWS.Util.encode_uri(app_id)}/branches/#{AWS.Util.encode_uri(branch_name)}"
    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 domain association for an Amplify app.
  """
  @spec update_domain_association(
          map(),
          String.t() | atom(),
          String.t() | atom(),
          update_domain_association_request(),
          list()
        ) ::
          {:ok, update_domain_association_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, update_domain_association_errors()}
  def update_domain_association(%Client{} = client, app_id, domain_name, input, options \\ []) do
    url_path = "/apps/#{AWS.Util.encode_uri(app_id)}/domains/#{AWS.Util.encode_uri(domain_name)}"
    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 webhook.
  """
  @spec update_webhook(map(), String.t() | atom(), update_webhook_request(), list()) ::
          {:ok, update_webhook_result(), any()}
          | {:error, {:unexpected_response, any()}}
          | {:error, term()}
          | {:error, update_webhook_errors()}
  def update_webhook(%Client{} = client, webhook_id, input, options \\ []) do
    url_path = "/webhooks/#{AWS.Util.encode_uri(webhook_id)}"
    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