/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Http { class URI; } //namespace Http namespace CodeArtifact { namespace Model { /** */ class CopyPackageVersionsRequest : public CodeArtifactRequest { public: AWS_CODEARTIFACT_API CopyPackageVersionsRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CopyPackageVersions"; } AWS_CODEARTIFACT_API Aws::String SerializePayload() const override; AWS_CODEARTIFACT_API void AddQueryStringParameters(Aws::Http::URI& uri) const override; /** *

The name of the domain that contains the source and destination * repositories.

*/ inline const Aws::String& GetDomain() const{ return m_domain; } /** *

The name of the domain that contains the source and destination * repositories.

*/ inline bool DomainHasBeenSet() const { return m_domainHasBeenSet; } /** *

The name of the domain that contains the source and destination * repositories.

*/ inline void SetDomain(const Aws::String& value) { m_domainHasBeenSet = true; m_domain = value; } /** *

The name of the domain that contains the source and destination * repositories.

*/ inline void SetDomain(Aws::String&& value) { m_domainHasBeenSet = true; m_domain = std::move(value); } /** *

The name of the domain that contains the source and destination * repositories.

*/ inline void SetDomain(const char* value) { m_domainHasBeenSet = true; m_domain.assign(value); } /** *

The name of the domain that contains the source and destination * repositories.

*/ inline CopyPackageVersionsRequest& WithDomain(const Aws::String& value) { SetDomain(value); return *this;} /** *

The name of the domain that contains the source and destination * repositories.

*/ inline CopyPackageVersionsRequest& WithDomain(Aws::String&& value) { SetDomain(std::move(value)); return *this;} /** *

The name of the domain that contains the source and destination * repositories.

*/ inline CopyPackageVersionsRequest& WithDomain(const char* value) { SetDomain(value); return *this;} /** *

The 12-digit account number of the Amazon Web Services account that owns the * domain. It does not include dashes or spaces.

*/ inline const Aws::String& GetDomainOwner() const{ return m_domainOwner; } /** *

The 12-digit account number of the Amazon Web Services account that owns the * domain. It does not include dashes or spaces.

*/ inline bool DomainOwnerHasBeenSet() const { return m_domainOwnerHasBeenSet; } /** *

The 12-digit account number of the Amazon Web Services account that owns the * domain. It does not include dashes or spaces.

*/ inline void SetDomainOwner(const Aws::String& value) { m_domainOwnerHasBeenSet = true; m_domainOwner = value; } /** *

The 12-digit account number of the Amazon Web Services account that owns the * domain. It does not include dashes or spaces.

*/ inline void SetDomainOwner(Aws::String&& value) { m_domainOwnerHasBeenSet = true; m_domainOwner = std::move(value); } /** *

The 12-digit account number of the Amazon Web Services account that owns the * domain. It does not include dashes or spaces.

*/ inline void SetDomainOwner(const char* value) { m_domainOwnerHasBeenSet = true; m_domainOwner.assign(value); } /** *

The 12-digit account number of the Amazon Web Services account that owns the * domain. It does not include dashes or spaces.

*/ inline CopyPackageVersionsRequest& WithDomainOwner(const Aws::String& value) { SetDomainOwner(value); return *this;} /** *

The 12-digit account number of the Amazon Web Services account that owns the * domain. It does not include dashes or spaces.

*/ inline CopyPackageVersionsRequest& WithDomainOwner(Aws::String&& value) { SetDomainOwner(std::move(value)); return *this;} /** *

The 12-digit account number of the Amazon Web Services account that owns the * domain. It does not include dashes or spaces.

*/ inline CopyPackageVersionsRequest& WithDomainOwner(const char* value) { SetDomainOwner(value); return *this;} /** *

The name of the repository that contains the package versions to be copied. *

*/ inline const Aws::String& GetSourceRepository() const{ return m_sourceRepository; } /** *

The name of the repository that contains the package versions to be copied. *

*/ inline bool SourceRepositoryHasBeenSet() const { return m_sourceRepositoryHasBeenSet; } /** *

The name of the repository that contains the package versions to be copied. *

*/ inline void SetSourceRepository(const Aws::String& value) { m_sourceRepositoryHasBeenSet = true; m_sourceRepository = value; } /** *

The name of the repository that contains the package versions to be copied. *

*/ inline void SetSourceRepository(Aws::String&& value) { m_sourceRepositoryHasBeenSet = true; m_sourceRepository = std::move(value); } /** *

The name of the repository that contains the package versions to be copied. *

*/ inline void SetSourceRepository(const char* value) { m_sourceRepositoryHasBeenSet = true; m_sourceRepository.assign(value); } /** *

The name of the repository that contains the package versions to be copied. *

*/ inline CopyPackageVersionsRequest& WithSourceRepository(const Aws::String& value) { SetSourceRepository(value); return *this;} /** *

The name of the repository that contains the package versions to be copied. *

*/ inline CopyPackageVersionsRequest& WithSourceRepository(Aws::String&& value) { SetSourceRepository(std::move(value)); return *this;} /** *

The name of the repository that contains the package versions to be copied. *

*/ inline CopyPackageVersionsRequest& WithSourceRepository(const char* value) { SetSourceRepository(value); return *this;} /** *

The name of the repository into which package versions are copied.

*/ inline const Aws::String& GetDestinationRepository() const{ return m_destinationRepository; } /** *

The name of the repository into which package versions are copied.

*/ inline bool DestinationRepositoryHasBeenSet() const { return m_destinationRepositoryHasBeenSet; } /** *

The name of the repository into which package versions are copied.

*/ inline void SetDestinationRepository(const Aws::String& value) { m_destinationRepositoryHasBeenSet = true; m_destinationRepository = value; } /** *

The name of the repository into which package versions are copied.

*/ inline void SetDestinationRepository(Aws::String&& value) { m_destinationRepositoryHasBeenSet = true; m_destinationRepository = std::move(value); } /** *

The name of the repository into which package versions are copied.

*/ inline void SetDestinationRepository(const char* value) { m_destinationRepositoryHasBeenSet = true; m_destinationRepository.assign(value); } /** *

The name of the repository into which package versions are copied.

*/ inline CopyPackageVersionsRequest& WithDestinationRepository(const Aws::String& value) { SetDestinationRepository(value); return *this;} /** *

The name of the repository into which package versions are copied.

*/ inline CopyPackageVersionsRequest& WithDestinationRepository(Aws::String&& value) { SetDestinationRepository(std::move(value)); return *this;} /** *

The name of the repository into which package versions are copied.

*/ inline CopyPackageVersionsRequest& WithDestinationRepository(const char* value) { SetDestinationRepository(value); return *this;} /** *

The format of the package versions to be copied.

*/ inline const PackageFormat& GetFormat() const{ return m_format; } /** *

The format of the package versions to be copied.

*/ inline bool FormatHasBeenSet() const { return m_formatHasBeenSet; } /** *

The format of the package versions to be copied.

*/ inline void SetFormat(const PackageFormat& value) { m_formatHasBeenSet = true; m_format = value; } /** *

The format of the package versions to be copied.

*/ inline void SetFormat(PackageFormat&& value) { m_formatHasBeenSet = true; m_format = std::move(value); } /** *

The format of the package versions to be copied.

*/ inline CopyPackageVersionsRequest& WithFormat(const PackageFormat& value) { SetFormat(value); return *this;} /** *

The format of the package versions to be copied.

*/ inline CopyPackageVersionsRequest& WithFormat(PackageFormat&& value) { SetFormat(std::move(value)); return *this;} /** *

The namespace of the package versions to be copied. The package version * component that specifies its namespace depends on its type. For example:

*
  • The namespace of a Maven package version is its * groupId. The namespace is required when copying Maven package * versions.

  • The namespace of an npm package version is its * scope.

  • Python and NuGet package versions do not * contain a corresponding component, package versions of those formats do not have * a namespace.

  • The namespace of a generic package is its * namespace.

*/ inline const Aws::String& GetNamespace() const{ return m_namespace; } /** *

The namespace of the package versions to be copied. The package version * component that specifies its namespace depends on its type. For example:

*
  • The namespace of a Maven package version is its * groupId. The namespace is required when copying Maven package * versions.

  • The namespace of an npm package version is its * scope.

  • Python and NuGet package versions do not * contain a corresponding component, package versions of those formats do not have * a namespace.

  • The namespace of a generic package is its * namespace.

*/ inline bool NamespaceHasBeenSet() const { return m_namespaceHasBeenSet; } /** *

The namespace of the package versions to be copied. The package version * component that specifies its namespace depends on its type. For example:

*
  • The namespace of a Maven package version is its * groupId. The namespace is required when copying Maven package * versions.

  • The namespace of an npm package version is its * scope.

  • Python and NuGet package versions do not * contain a corresponding component, package versions of those formats do not have * a namespace.

  • The namespace of a generic package is its * namespace.

*/ inline void SetNamespace(const Aws::String& value) { m_namespaceHasBeenSet = true; m_namespace = value; } /** *

The namespace of the package versions to be copied. The package version * component that specifies its namespace depends on its type. For example:

*
  • The namespace of a Maven package version is its * groupId. The namespace is required when copying Maven package * versions.

  • The namespace of an npm package version is its * scope.

  • Python and NuGet package versions do not * contain a corresponding component, package versions of those formats do not have * a namespace.

  • The namespace of a generic package is its * namespace.

*/ inline void SetNamespace(Aws::String&& value) { m_namespaceHasBeenSet = true; m_namespace = std::move(value); } /** *

The namespace of the package versions to be copied. The package version * component that specifies its namespace depends on its type. For example:

*
  • The namespace of a Maven package version is its * groupId. The namespace is required when copying Maven package * versions.

  • The namespace of an npm package version is its * scope.

  • Python and NuGet package versions do not * contain a corresponding component, package versions of those formats do not have * a namespace.

  • The namespace of a generic package is its * namespace.

*/ inline void SetNamespace(const char* value) { m_namespaceHasBeenSet = true; m_namespace.assign(value); } /** *

The namespace of the package versions to be copied. The package version * component that specifies its namespace depends on its type. For example:

*
  • The namespace of a Maven package version is its * groupId. The namespace is required when copying Maven package * versions.

  • The namespace of an npm package version is its * scope.

  • Python and NuGet package versions do not * contain a corresponding component, package versions of those formats do not have * a namespace.

  • The namespace of a generic package is its * namespace.

*/ inline CopyPackageVersionsRequest& WithNamespace(const Aws::String& value) { SetNamespace(value); return *this;} /** *

The namespace of the package versions to be copied. The package version * component that specifies its namespace depends on its type. For example:

*
  • The namespace of a Maven package version is its * groupId. The namespace is required when copying Maven package * versions.

  • The namespace of an npm package version is its * scope.

  • Python and NuGet package versions do not * contain a corresponding component, package versions of those formats do not have * a namespace.

  • The namespace of a generic package is its * namespace.

*/ inline CopyPackageVersionsRequest& WithNamespace(Aws::String&& value) { SetNamespace(std::move(value)); return *this;} /** *

The namespace of the package versions to be copied. The package version * component that specifies its namespace depends on its type. For example:

*
  • The namespace of a Maven package version is its * groupId. The namespace is required when copying Maven package * versions.

  • The namespace of an npm package version is its * scope.

  • Python and NuGet package versions do not * contain a corresponding component, package versions of those formats do not have * a namespace.

  • The namespace of a generic package is its * namespace.

*/ inline CopyPackageVersionsRequest& WithNamespace(const char* value) { SetNamespace(value); return *this;} /** *

The name of the package that contains the versions to be copied.

*/ inline const Aws::String& GetPackage() const{ return m_package; } /** *

The name of the package that contains the versions to be copied.

*/ inline bool PackageHasBeenSet() const { return m_packageHasBeenSet; } /** *

The name of the package that contains the versions to be copied.

*/ inline void SetPackage(const Aws::String& value) { m_packageHasBeenSet = true; m_package = value; } /** *

The name of the package that contains the versions to be copied.

*/ inline void SetPackage(Aws::String&& value) { m_packageHasBeenSet = true; m_package = std::move(value); } /** *

The name of the package that contains the versions to be copied.

*/ inline void SetPackage(const char* value) { m_packageHasBeenSet = true; m_package.assign(value); } /** *

The name of the package that contains the versions to be copied.

*/ inline CopyPackageVersionsRequest& WithPackage(const Aws::String& value) { SetPackage(value); return *this;} /** *

The name of the package that contains the versions to be copied.

*/ inline CopyPackageVersionsRequest& WithPackage(Aws::String&& value) { SetPackage(std::move(value)); return *this;} /** *

The name of the package that contains the versions to be copied.

*/ inline CopyPackageVersionsRequest& WithPackage(const char* value) { SetPackage(value); return *this;} /** *

The versions of the package to be copied.

You must specify * versions or versionRevisions. You cannot specify both. *

*/ inline const Aws::Vector& GetVersions() const{ return m_versions; } /** *

The versions of the package to be copied.

You must specify * versions or versionRevisions. You cannot specify both. *

*/ inline bool VersionsHasBeenSet() const { return m_versionsHasBeenSet; } /** *

The versions of the package to be copied.

You must specify * versions or versionRevisions. You cannot specify both. *

*/ inline void SetVersions(const Aws::Vector& value) { m_versionsHasBeenSet = true; m_versions = value; } /** *

The versions of the package to be copied.

You must specify * versions or versionRevisions. You cannot specify both. *

*/ inline void SetVersions(Aws::Vector&& value) { m_versionsHasBeenSet = true; m_versions = std::move(value); } /** *

The versions of the package to be copied.

You must specify * versions or versionRevisions. You cannot specify both. *

*/ inline CopyPackageVersionsRequest& WithVersions(const Aws::Vector& value) { SetVersions(value); return *this;} /** *

The versions of the package to be copied.

You must specify * versions or versionRevisions. You cannot specify both. *

*/ inline CopyPackageVersionsRequest& WithVersions(Aws::Vector&& value) { SetVersions(std::move(value)); return *this;} /** *

The versions of the package to be copied.

You must specify * versions or versionRevisions. You cannot specify both. *

*/ inline CopyPackageVersionsRequest& AddVersions(const Aws::String& value) { m_versionsHasBeenSet = true; m_versions.push_back(value); return *this; } /** *

The versions of the package to be copied.

You must specify * versions or versionRevisions. You cannot specify both. *

*/ inline CopyPackageVersionsRequest& AddVersions(Aws::String&& value) { m_versionsHasBeenSet = true; m_versions.push_back(std::move(value)); return *this; } /** *

The versions of the package to be copied.

You must specify * versions or versionRevisions. You cannot specify both. *

*/ inline CopyPackageVersionsRequest& AddVersions(const char* value) { m_versionsHasBeenSet = true; m_versions.push_back(value); return *this; } /** *

A list of key-value pairs. The keys are package versions and the values are * package version revisions. A CopyPackageVersion operation succeeds * if the specified versions in the source repository match the specified package * version revision.

You must specify versions or * versionRevisions. You cannot specify both.

*/ inline const Aws::Map& GetVersionRevisions() const{ return m_versionRevisions; } /** *

A list of key-value pairs. The keys are package versions and the values are * package version revisions. A CopyPackageVersion operation succeeds * if the specified versions in the source repository match the specified package * version revision.

You must specify versions or * versionRevisions. You cannot specify both.

*/ inline bool VersionRevisionsHasBeenSet() const { return m_versionRevisionsHasBeenSet; } /** *

A list of key-value pairs. The keys are package versions and the values are * package version revisions. A CopyPackageVersion operation succeeds * if the specified versions in the source repository match the specified package * version revision.

You must specify versions or * versionRevisions. You cannot specify both.

*/ inline void SetVersionRevisions(const Aws::Map& value) { m_versionRevisionsHasBeenSet = true; m_versionRevisions = value; } /** *

A list of key-value pairs. The keys are package versions and the values are * package version revisions. A CopyPackageVersion operation succeeds * if the specified versions in the source repository match the specified package * version revision.

You must specify versions or * versionRevisions. You cannot specify both.

*/ inline void SetVersionRevisions(Aws::Map&& value) { m_versionRevisionsHasBeenSet = true; m_versionRevisions = std::move(value); } /** *

A list of key-value pairs. The keys are package versions and the values are * package version revisions. A CopyPackageVersion operation succeeds * if the specified versions in the source repository match the specified package * version revision.

You must specify versions or * versionRevisions. You cannot specify both.

*/ inline CopyPackageVersionsRequest& WithVersionRevisions(const Aws::Map& value) { SetVersionRevisions(value); return *this;} /** *

A list of key-value pairs. The keys are package versions and the values are * package version revisions. A CopyPackageVersion operation succeeds * if the specified versions in the source repository match the specified package * version revision.

You must specify versions or * versionRevisions. You cannot specify both.

*/ inline CopyPackageVersionsRequest& WithVersionRevisions(Aws::Map&& value) { SetVersionRevisions(std::move(value)); return *this;} /** *

A list of key-value pairs. The keys are package versions and the values are * package version revisions. A CopyPackageVersion operation succeeds * if the specified versions in the source repository match the specified package * version revision.

You must specify versions or * versionRevisions. You cannot specify both.

*/ inline CopyPackageVersionsRequest& AddVersionRevisions(const Aws::String& key, const Aws::String& value) { m_versionRevisionsHasBeenSet = true; m_versionRevisions.emplace(key, value); return *this; } /** *

A list of key-value pairs. The keys are package versions and the values are * package version revisions. A CopyPackageVersion operation succeeds * if the specified versions in the source repository match the specified package * version revision.

You must specify versions or * versionRevisions. You cannot specify both.

*/ inline CopyPackageVersionsRequest& AddVersionRevisions(Aws::String&& key, const Aws::String& value) { m_versionRevisionsHasBeenSet = true; m_versionRevisions.emplace(std::move(key), value); return *this; } /** *

A list of key-value pairs. The keys are package versions and the values are * package version revisions. A CopyPackageVersion operation succeeds * if the specified versions in the source repository match the specified package * version revision.

You must specify versions or * versionRevisions. You cannot specify both.

*/ inline CopyPackageVersionsRequest& AddVersionRevisions(const Aws::String& key, Aws::String&& value) { m_versionRevisionsHasBeenSet = true; m_versionRevisions.emplace(key, std::move(value)); return *this; } /** *

A list of key-value pairs. The keys are package versions and the values are * package version revisions. A CopyPackageVersion operation succeeds * if the specified versions in the source repository match the specified package * version revision.

You must specify versions or * versionRevisions. You cannot specify both.

*/ inline CopyPackageVersionsRequest& AddVersionRevisions(Aws::String&& key, Aws::String&& value) { m_versionRevisionsHasBeenSet = true; m_versionRevisions.emplace(std::move(key), std::move(value)); return *this; } /** *

A list of key-value pairs. The keys are package versions and the values are * package version revisions. A CopyPackageVersion operation succeeds * if the specified versions in the source repository match the specified package * version revision.

You must specify versions or * versionRevisions. You cannot specify both.

*/ inline CopyPackageVersionsRequest& AddVersionRevisions(const char* key, Aws::String&& value) { m_versionRevisionsHasBeenSet = true; m_versionRevisions.emplace(key, std::move(value)); return *this; } /** *

A list of key-value pairs. The keys are package versions and the values are * package version revisions. A CopyPackageVersion operation succeeds * if the specified versions in the source repository match the specified package * version revision.

You must specify versions or * versionRevisions. You cannot specify both.

*/ inline CopyPackageVersionsRequest& AddVersionRevisions(Aws::String&& key, const char* value) { m_versionRevisionsHasBeenSet = true; m_versionRevisions.emplace(std::move(key), value); return *this; } /** *

A list of key-value pairs. The keys are package versions and the values are * package version revisions. A CopyPackageVersion operation succeeds * if the specified versions in the source repository match the specified package * version revision.

You must specify versions or * versionRevisions. You cannot specify both.

*/ inline CopyPackageVersionsRequest& AddVersionRevisions(const char* key, const char* value) { m_versionRevisionsHasBeenSet = true; m_versionRevisions.emplace(key, value); return *this; } /** *

Set to true to overwrite a package version that already exists in the * destination repository. If set to false and the package version already exists * in the destination repository, the package version is returned in the * failedVersions field of the response with an * ALREADY_EXISTS error code.

*/ inline bool GetAllowOverwrite() const{ return m_allowOverwrite; } /** *

Set to true to overwrite a package version that already exists in the * destination repository. If set to false and the package version already exists * in the destination repository, the package version is returned in the * failedVersions field of the response with an * ALREADY_EXISTS error code.

*/ inline bool AllowOverwriteHasBeenSet() const { return m_allowOverwriteHasBeenSet; } /** *

Set to true to overwrite a package version that already exists in the * destination repository. If set to false and the package version already exists * in the destination repository, the package version is returned in the * failedVersions field of the response with an * ALREADY_EXISTS error code.

*/ inline void SetAllowOverwrite(bool value) { m_allowOverwriteHasBeenSet = true; m_allowOverwrite = value; } /** *

Set to true to overwrite a package version that already exists in the * destination repository. If set to false and the package version already exists * in the destination repository, the package version is returned in the * failedVersions field of the response with an * ALREADY_EXISTS error code.

*/ inline CopyPackageVersionsRequest& WithAllowOverwrite(bool value) { SetAllowOverwrite(value); return *this;} /** *

Set to true to copy packages from repositories that are upstream from the * source repository to the destination repository. The default setting is false. * For more information, see Working * with upstream repositories.

*/ inline bool GetIncludeFromUpstream() const{ return m_includeFromUpstream; } /** *

Set to true to copy packages from repositories that are upstream from the * source repository to the destination repository. The default setting is false. * For more information, see Working * with upstream repositories.

*/ inline bool IncludeFromUpstreamHasBeenSet() const { return m_includeFromUpstreamHasBeenSet; } /** *

Set to true to copy packages from repositories that are upstream from the * source repository to the destination repository. The default setting is false. * For more information, see Working * with upstream repositories.

*/ inline void SetIncludeFromUpstream(bool value) { m_includeFromUpstreamHasBeenSet = true; m_includeFromUpstream = value; } /** *

Set to true to copy packages from repositories that are upstream from the * source repository to the destination repository. The default setting is false. * For more information, see Working * with upstream repositories.

*/ inline CopyPackageVersionsRequest& WithIncludeFromUpstream(bool value) { SetIncludeFromUpstream(value); return *this;} private: Aws::String m_domain; bool m_domainHasBeenSet = false; Aws::String m_domainOwner; bool m_domainOwnerHasBeenSet = false; Aws::String m_sourceRepository; bool m_sourceRepositoryHasBeenSet = false; Aws::String m_destinationRepository; bool m_destinationRepositoryHasBeenSet = false; PackageFormat m_format; bool m_formatHasBeenSet = false; Aws::String m_namespace; bool m_namespaceHasBeenSet = false; Aws::String m_package; bool m_packageHasBeenSet = false; Aws::Vector m_versions; bool m_versionsHasBeenSet = false; Aws::Map m_versionRevisions; bool m_versionRevisionsHasBeenSet = false; bool m_allowOverwrite; bool m_allowOverwriteHasBeenSet = false; bool m_includeFromUpstream; bool m_includeFromUpstreamHasBeenSet = false; }; } // namespace Model } // namespace CodeArtifact } // namespace Aws