/* * 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 PutPackageOriginConfigurationRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The name of the domain that contains the repository that contains the package. *

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

*/ private String repository; /** *

* A format that specifies the type of the package to be updated. *

*/ private String format; /** *

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

* */ private String namespace; /** *

* The name of the package to be updated. *

*/ private String packageValue; /** *

* A * PackageOriginRestrictions object that contains information about the upstream and * publish package origin restrictions. The upstream restriction determines if new package * versions can be ingested or retained from external connections or upstream repositories. The publish * restriction determines if new package versions can be published directly to the repository. *

*

* You must include both the desired upstream and publish restrictions. *

*/ private PackageOriginRestrictions restrictions; /** *

* The name of the domain that contains the repository that contains the package. *

* * @param domain * The name of the domain that contains the repository that contains the package. */ public void setDomain(String domain) { this.domain = domain; } /** *

* The name of the domain that contains the repository that contains the package. *

* * @return The name of the domain that contains the repository that contains the package. */ public String getDomain() { return this.domain; } /** *

* The name of the domain that contains the repository that contains the package. *

* * @param domain * The name of the domain that contains the repository that contains the package. * @return Returns a reference to this object so that method calls can be chained together. */ public PutPackageOriginConfigurationRequest 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 PutPackageOriginConfigurationRequest withDomainOwner(String domainOwner) { setDomainOwner(domainOwner); return this; } /** *

* The name of the repository that contains the package. *

* * @param repository * The name of the repository that contains the package. */ public void setRepository(String repository) { this.repository = repository; } /** *

* The name of the repository that contains the package. *

* * @return The name of the repository that contains the package. */ public String getRepository() { return this.repository; } /** *

* The name of the repository that contains the package. *

* * @param repository * The name of the repository that contains the package. * @return Returns a reference to this object so that method calls can be chained together. */ public PutPackageOriginConfigurationRequest withRepository(String repository) { setRepository(repository); return this; } /** *

* A format that specifies the type of the package to be updated. *

* * @param format * A format that specifies the type of the package to be updated. * @see PackageFormat */ public void setFormat(String format) { this.format = format; } /** *

* A format that specifies the type of the package to be updated. *

* * @return A format that specifies the type of the package to be updated. * @see PackageFormat */ public String getFormat() { return this.format; } /** *

* A format that specifies the type of the package to be updated. *

* * @param format * A format that specifies the type of the package to be updated. * @return Returns a reference to this object so that method calls can be chained together. * @see PackageFormat */ public PutPackageOriginConfigurationRequest withFormat(String format) { setFormat(format); return this; } /** *

* A format that specifies the type of the package to be updated. *

* * @param format * A format that specifies the type of the package to be updated. * @return Returns a reference to this object so that method calls can be chained together. * @see PackageFormat */ public PutPackageOriginConfigurationRequest withFormat(PackageFormat format) { this.format = format.toString(); return this; } /** *

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

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

*