com.amazonaws.services.codeartifact.model.ListPackageVersionsRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-codeartifact Show documentation
/*
* Copyright 2019-2024 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 ListPackageVersionsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The name of the domain that contains the repository that contains the requested package versions.
*
*/
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 requested package versions.
*
*/
private String repository;
/**
*
* The format of the package versions you want to list.
*
*/
private String format;
/**
*
* The namespace of the package that contains the requested package versions. The package component that specifies
* its namespace depends on its type. For example:
*
*
*
* The namespace is required when deleting package versions of the following formats:
*
*
* -
*
* Maven
*
*
* -
*
* Swift
*
*
* -
*
* generic
*
*
*
*
*
* -
*
* The namespace of a Maven package version is its groupId
.
*
*
* -
*
* The namespace of an npm or Swift package version is its scope
.
*
*
* -
*
* The namespace of a generic package is its namespace
.
*
*
* -
*
* Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of
* those formats do not have a namespace.
*
*
*
*/
private String namespace;
/**
*
* The name of the package for which you want to request package versions.
*
*/
private String packageValue;
/**
*
* A string that filters the requested package versions by status.
*
*/
private String status;
/**
*
* How to sort the requested list of package versions.
*
*/
private String sortBy;
/**
*
* The maximum number of results to return per page.
*
*/
private Integer maxResults;
/**
*
* The token for the next set of results. Use the value returned in the previous response in the next request to
* retrieve the next set of results.
*
*/
private String nextToken;
/**
*
* The originType
used to filter package versions. Only package versions with the provided
* originType
will be returned.
*
*/
private String originType;
/**
*
* The name of the domain that contains the repository that contains the requested package versions.
*
*
* @param domain
* The name of the domain that contains the repository that contains the requested package versions.
*/
public void setDomain(String domain) {
this.domain = domain;
}
/**
*
* The name of the domain that contains the repository that contains the requested package versions.
*
*
* @return The name of the domain that contains the repository that contains the requested package versions.
*/
public String getDomain() {
return this.domain;
}
/**
*
* The name of the domain that contains the repository that contains the requested package versions.
*
*
* @param domain
* The name of the domain that contains the repository that contains the requested package versions.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListPackageVersionsRequest 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 ListPackageVersionsRequest withDomainOwner(String domainOwner) {
setDomainOwner(domainOwner);
return this;
}
/**
*
* The name of the repository that contains the requested package versions.
*
*
* @param repository
* The name of the repository that contains the requested package versions.
*/
public void setRepository(String repository) {
this.repository = repository;
}
/**
*
* The name of the repository that contains the requested package versions.
*
*
* @return The name of the repository that contains the requested package versions.
*/
public String getRepository() {
return this.repository;
}
/**
*
* The name of the repository that contains the requested package versions.
*
*
* @param repository
* The name of the repository that contains the requested package versions.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListPackageVersionsRequest withRepository(String repository) {
setRepository(repository);
return this;
}
/**
*
* The format of the package versions you want to list.
*
*
* @param format
* The format of the package versions you want to list.
* @see PackageFormat
*/
public void setFormat(String format) {
this.format = format;
}
/**
*
* The format of the package versions you want to list.
*
*
* @return The format of the package versions you want to list.
* @see PackageFormat
*/
public String getFormat() {
return this.format;
}
/**
*
* The format of the package versions you want to list.
*
*
* @param format
* The format of the package versions you want to list.
* @return Returns a reference to this object so that method calls can be chained together.
* @see PackageFormat
*/
public ListPackageVersionsRequest withFormat(String format) {
setFormat(format);
return this;
}
/**
*
* The format of the package versions you want to list.
*
*
* @param format
* The format of the package versions you want to list.
* @return Returns a reference to this object so that method calls can be chained together.
* @see PackageFormat
*/
public ListPackageVersionsRequest withFormat(PackageFormat format) {
this.format = format.toString();
return this;
}
/**
*
* The namespace of the package that contains the requested package versions. The package component that specifies
* its namespace depends on its type. For example:
*
*
*
* The namespace is required when deleting package versions of the following formats:
*
*
* -
*
* Maven
*
*
* -
*
* Swift
*
*
* -
*
* generic
*
*
*
*
*
* -
*
* The namespace of a Maven package version is its groupId
.
*
*
* -
*
* The namespace of an npm or Swift package version is its scope
.
*
*
* -
*
* The namespace of a generic package is its namespace
.
*
*
* -
*
* Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of
* those formats do not have a namespace.
*
*
*
*
* @param namespace
* The namespace of the package that contains the requested package versions. The package component that
* specifies its namespace depends on its type. For example:
*
* The namespace is required when deleting package versions of the following formats:
*
*
* -
*
* Maven
*
*
* -
*
* Swift
*
*
* -
*
* generic
*
*
*
*
*
* -
*
* The namespace of a Maven package version is its groupId
.
*
*
* -
*
* The namespace of an npm or Swift package version is its scope
.
*
*
* -
*
* The namespace of a generic package is its namespace
.
*
*
* -
*
* Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions
* of those formats do not have a namespace.
*
*
*/
public void setNamespace(String namespace) {
this.namespace = namespace;
}
/**
*
* The namespace of the package that contains the requested package versions. The package component that specifies
* its namespace depends on its type. For example:
*
*
*
* The namespace is required when deleting package versions of the following formats:
*
*
* -
*
* Maven
*
*
* -
*
* Swift
*
*
* -
*
* generic
*
*
*
*
*
* -
*
* The namespace of a Maven package version is its groupId
.
*
*
* -
*
* The namespace of an npm or Swift package version is its scope
.
*
*
* -
*
* The namespace of a generic package is its namespace
.
*
*
* -
*
* Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of
* those formats do not have a namespace.
*
*
*
*
* @return The namespace of the package that contains the requested package versions. The package component that
* specifies its namespace depends on its type. For example:
*
* The namespace is required when deleting package versions of the following formats:
*
*
* -
*
* Maven
*
*
* -
*
* Swift
*
*
* -
*
* generic
*
*
*
*
*
* -
*
* The namespace of a Maven package version is its groupId
.
*
*
* -
*
* The namespace of an npm or Swift package version is its scope
.
*
*
* -
*
* The namespace of a generic package is its namespace
.
*
*
* -
*
* Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package
* versions of those formats do not have a namespace.
*
*
*/
public String getNamespace() {
return this.namespace;
}
/**
*
* The namespace of the package that contains the requested package versions. The package component that specifies
* its namespace depends on its type. For example:
*
*
*
* The namespace is required when deleting package versions of the following formats:
*
*
* -
*
* Maven
*
*
* -
*
* Swift
*
*
* -
*
* generic
*
*
*
*
*
* -
*
* The namespace of a Maven package version is its groupId
.
*
*
* -
*
* The namespace of an npm or Swift package version is its scope
.
*
*
* -
*
* The namespace of a generic package is its namespace
.
*
*
* -
*
* Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of
* those formats do not have a namespace.
*
*
*
*
* @param namespace
* The namespace of the package that contains the requested package versions. The package component that
* specifies its namespace depends on its type. For example:
*
* The namespace is required when deleting package versions of the following formats:
*
*
* -
*
* Maven
*
*
* -
*
* Swift
*
*
* -
*
* generic
*
*
*
*
*
* -
*
* The namespace of a Maven package version is its groupId
.
*
*
* -
*
* The namespace of an npm or Swift package version is its scope
.
*
*
* -
*
* The namespace of a generic package is its namespace
.
*
*
* -
*
* Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions
* of those formats do not have a namespace.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListPackageVersionsRequest withNamespace(String namespace) {
setNamespace(namespace);
return this;
}
/**
*
* The name of the package for which you want to request package versions.
*
*
* @param packageValue
* The name of the package for which you want to request package versions.
*/
public void setPackage(String packageValue) {
this.packageValue = packageValue;
}
/**
*
* The name of the package for which you want to request package versions.
*
*
* @return The name of the package for which you want to request package versions.
*/
public String getPackage() {
return this.packageValue;
}
/**
*
* The name of the package for which you want to request package versions.
*
*
* @param packageValue
* The name of the package for which you want to request package versions.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListPackageVersionsRequest withPackage(String packageValue) {
setPackage(packageValue);
return this;
}
/**
*
* A string that filters the requested package versions by status.
*
*
* @param status
* A string that filters the requested package versions by status.
* @see PackageVersionStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* A string that filters the requested package versions by status.
*
*
* @return A string that filters the requested package versions by status.
* @see PackageVersionStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* A string that filters the requested package versions by status.
*
*
* @param status
* A string that filters the requested package versions by status.
* @return Returns a reference to this object so that method calls can be chained together.
* @see PackageVersionStatus
*/
public ListPackageVersionsRequest withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* A string that filters the requested package versions by status.
*
*
* @param status
* A string that filters the requested package versions by status.
* @return Returns a reference to this object so that method calls can be chained together.
* @see PackageVersionStatus
*/
public ListPackageVersionsRequest withStatus(PackageVersionStatus status) {
this.status = status.toString();
return this;
}
/**
*
* How to sort the requested list of package versions.
*
*
* @param sortBy
* How to sort the requested list of package versions.
* @see PackageVersionSortType
*/
public void setSortBy(String sortBy) {
this.sortBy = sortBy;
}
/**
*
* How to sort the requested list of package versions.
*
*
* @return How to sort the requested list of package versions.
* @see PackageVersionSortType
*/
public String getSortBy() {
return this.sortBy;
}
/**
*
* How to sort the requested list of package versions.
*
*
* @param sortBy
* How to sort the requested list of package versions.
* @return Returns a reference to this object so that method calls can be chained together.
* @see PackageVersionSortType
*/
public ListPackageVersionsRequest withSortBy(String sortBy) {
setSortBy(sortBy);
return this;
}
/**
*
* How to sort the requested list of package versions.
*
*
* @param sortBy
* How to sort the requested list of package versions.
* @return Returns a reference to this object so that method calls can be chained together.
* @see PackageVersionSortType
*/
public ListPackageVersionsRequest withSortBy(PackageVersionSortType sortBy) {
this.sortBy = sortBy.toString();
return this;
}
/**
*
* The maximum number of results to return per page.
*
*
* @param maxResults
* The maximum number of results to return per page.
*/
public void setMaxResults(Integer maxResults) {
this.maxResults = maxResults;
}
/**
*
* The maximum number of results to return per page.
*
*
* @return The maximum number of results to return per page.
*/
public Integer getMaxResults() {
return this.maxResults;
}
/**
*
* The maximum number of results to return per page.
*
*
* @param maxResults
* The maximum number of results to return per page.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListPackageVersionsRequest withMaxResults(Integer maxResults) {
setMaxResults(maxResults);
return this;
}
/**
*
* The token for the next set of results. Use the value returned in the previous response in the next request to
* retrieve the next set of results.
*
*
* @param nextToken
* The token for the next set of results. Use the value returned in the previous response in the next request
* to retrieve the next set of results.
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
*
* The token for the next set of results. Use the value returned in the previous response in the next request to
* retrieve the next set of results.
*
*
* @return The token for the next set of results. Use the value returned in the previous response in the next
* request to retrieve the next set of results.
*/
public String getNextToken() {
return this.nextToken;
}
/**
*
* The token for the next set of results. Use the value returned in the previous response in the next request to
* retrieve the next set of results.
*
*
* @param nextToken
* The token for the next set of results. Use the value returned in the previous response in the next request
* to retrieve the next set of results.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListPackageVersionsRequest withNextToken(String nextToken) {
setNextToken(nextToken);
return this;
}
/**
*
* The originType
used to filter package versions. Only package versions with the provided
* originType
will be returned.
*
*
* @param originType
* The originType
used to filter package versions. Only package versions with the provided
* originType
will be returned.
* @see PackageVersionOriginType
*/
public void setOriginType(String originType) {
this.originType = originType;
}
/**
*
* The originType
used to filter package versions. Only package versions with the provided
* originType
will be returned.
*
*
* @return The originType
used to filter package versions. Only package versions with the provided
* originType
will be returned.
* @see PackageVersionOriginType
*/
public String getOriginType() {
return this.originType;
}
/**
*
* The originType
used to filter package versions. Only package versions with the provided
* originType
will be returned.
*
*
* @param originType
* The originType
used to filter package versions. Only package versions with the provided
* originType
will be returned.
* @return Returns a reference to this object so that method calls can be chained together.
* @see PackageVersionOriginType
*/
public ListPackageVersionsRequest withOriginType(String originType) {
setOriginType(originType);
return this;
}
/**
*
* The originType
used to filter package versions. Only package versions with the provided
* originType
will be returned.
*
*
* @param originType
* The originType
used to filter package versions. Only package versions with the provided
* originType
will be returned.
* @return Returns a reference to this object so that method calls can be chained together.
* @see PackageVersionOriginType
*/
public ListPackageVersionsRequest withOriginType(PackageVersionOriginType originType) {
this.originType = originType.toString();
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getDomain() != null)
sb.append("Domain: ").append(getDomain()).append(",");
if (getDomainOwner() != null)
sb.append("DomainOwner: ").append(getDomainOwner()).append(",");
if (getRepository() != null)
sb.append("Repository: ").append(getRepository()).append(",");
if (getFormat() != null)
sb.append("Format: ").append(getFormat()).append(",");
if (getNamespace() != null)
sb.append("Namespace: ").append(getNamespace()).append(",");
if (getPackage() != null)
sb.append("Package: ").append(getPackage()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getSortBy() != null)
sb.append("SortBy: ").append(getSortBy()).append(",");
if (getMaxResults() != null)
sb.append("MaxResults: ").append(getMaxResults()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken()).append(",");
if (getOriginType() != null)
sb.append("OriginType: ").append(getOriginType());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ListPackageVersionsRequest == false)
return false;
ListPackageVersionsRequest other = (ListPackageVersionsRequest) obj;
if (other.getDomain() == null ^ this.getDomain() == null)
return false;
if (other.getDomain() != null && other.getDomain().equals(this.getDomain()) == false)
return false;
if (other.getDomainOwner() == null ^ this.getDomainOwner() == null)
return false;
if (other.getDomainOwner() != null && other.getDomainOwner().equals(this.getDomainOwner()) == false)
return false;
if (other.getRepository() == null ^ this.getRepository() == null)
return false;
if (other.getRepository() != null && other.getRepository().equals(this.getRepository()) == false)
return false;
if (other.getFormat() == null ^ this.getFormat() == null)
return false;
if (other.getFormat() != null && other.getFormat().equals(this.getFormat()) == false)
return false;
if (other.getNamespace() == null ^ this.getNamespace() == null)
return false;
if (other.getNamespace() != null && other.getNamespace().equals(this.getNamespace()) == false)
return false;
if (other.getPackage() == null ^ this.getPackage() == null)
return false;
if (other.getPackage() != null && other.getPackage().equals(this.getPackage()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
if (other.getSortBy() == null ^ this.getSortBy() == null)
return false;
if (other.getSortBy() != null && other.getSortBy().equals(this.getSortBy()) == false)
return false;
if (other.getMaxResults() == null ^ this.getMaxResults() == null)
return false;
if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == false)
return false;
if (other.getNextToken() == null ^ this.getNextToken() == null)
return false;
if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
return false;
if (other.getOriginType() == null ^ this.getOriginType() == null)
return false;
if (other.getOriginType() != null && other.getOriginType().equals(this.getOriginType()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDomain() == null) ? 0 : getDomain().hashCode());
hashCode = prime * hashCode + ((getDomainOwner() == null) ? 0 : getDomainOwner().hashCode());
hashCode = prime * hashCode + ((getRepository() == null) ? 0 : getRepository().hashCode());
hashCode = prime * hashCode + ((getFormat() == null) ? 0 : getFormat().hashCode());
hashCode = prime * hashCode + ((getNamespace() == null) ? 0 : getNamespace().hashCode());
hashCode = prime * hashCode + ((getPackage() == null) ? 0 : getPackage().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getSortBy() == null) ? 0 : getSortBy().hashCode());
hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
hashCode = prime * hashCode + ((getOriginType() == null) ? 0 : getOriginType().hashCode());
return hashCode;
}
@Override
public ListPackageVersionsRequest clone() {
return (ListPackageVersionsRequest) super.clone();
}
}