/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.codeartifact.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CopyPackageVersionsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

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

*/ private String domain; /** *

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

*/ private String domainOwner; /** *

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

*/ private String sourceRepository; /** *

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

*/ private String destinationRepository; /** *

* The format of the package versions to be copied. *

*/ private String format; /** *

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

* */ private String namespace; /** *

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

*/ private String packageValue; /** *

* The versions of the package to be copied. *

* *

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

*
*/ private java.util.List versions; /** *

* 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. *

*
*/ private java.util.Map versionRevisions; /** *

* 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. *

*/ private Boolean allowOverwrite; /** *

* 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. *

*/ private Boolean includeFromUpstream; /** *

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

* * @param domain * The name of the domain that contains the source and destination repositories. */ public void setDomain(String domain) { this.domain = domain; } /** *

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

* * @return The name of the domain that contains the source and destination repositories. */ public String getDomain() { return this.domain; } /** *

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

* * @param domain * The name of the domain that contains the source and destination repositories. * @return Returns a reference to this object so that method calls can be chained together. */ public CopyPackageVersionsRequest withDomain(String domain) { setDomain(domain); return this; } /** *

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

* * @param domainOwner * The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include * dashes or spaces. */ public void setDomainOwner(String domainOwner) { this.domainOwner = domainOwner; } /** *

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

* * @return The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include * dashes or spaces. */ public String getDomainOwner() { return this.domainOwner; } /** *

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

* * @param domainOwner * The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include * dashes or spaces. * @return Returns a reference to this object so that method calls can be chained together. */ public CopyPackageVersionsRequest withDomainOwner(String domainOwner) { setDomainOwner(domainOwner); return this; } /** *

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

* * @param sourceRepository * The name of the repository that contains the package versions to be copied. */ public void setSourceRepository(String sourceRepository) { this.sourceRepository = sourceRepository; } /** *

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

* * @return The name of the repository that contains the package versions to be copied. */ public String getSourceRepository() { return this.sourceRepository; } /** *

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

* * @param sourceRepository * The name of the repository that contains the package versions to be copied. * @return Returns a reference to this object so that method calls can be chained together. */ public CopyPackageVersionsRequest withSourceRepository(String sourceRepository) { setSourceRepository(sourceRepository); return this; } /** *

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

* * @param destinationRepository * The name of the repository into which package versions are copied. */ public void setDestinationRepository(String destinationRepository) { this.destinationRepository = destinationRepository; } /** *

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

* * @return The name of the repository into which package versions are copied. */ public String getDestinationRepository() { return this.destinationRepository; } /** *

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

* * @param destinationRepository * The name of the repository into which package versions are copied. * @return Returns a reference to this object so that method calls can be chained together. */ public CopyPackageVersionsRequest withDestinationRepository(String destinationRepository) { setDestinationRepository(destinationRepository); return this; } /** *

* The format of the package versions to be copied. *

* * @param format * The format of the package versions to be copied. * @see PackageFormat */ public void setFormat(String format) { this.format = format; } /** *

* The format of the package versions to be copied. *

* * @return The format of the package versions to be copied. * @see PackageFormat */ public String getFormat() { return this.format; } /** *

* The format of the package versions to be copied. *

* * @param format * The format of the package versions to be copied. * @return Returns a reference to this object so that method calls can be chained together. * @see PackageFormat */ public CopyPackageVersionsRequest withFormat(String format) { setFormat(format); return this; } /** *

* The format of the package versions to be copied. *

* * @param format * The format of the package versions to be copied. * @return Returns a reference to this object so that method calls can be chained together. * @see PackageFormat */ public CopyPackageVersionsRequest withFormat(PackageFormat format) { this.format = format.toString(); 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: *

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

*