com.amazonaws.services.codegurureviewer.model.ListRepositoryAssociationsRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-codegurureviewer Show documentation
/*
* Copyright 2015-2020 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.codegurureviewer.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 ListRepositoryAssociationsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* List of provider types to use as a filter.
*
*/
private java.util.List providerTypes;
/**
*
* List of states to use as a filter.
*
*/
private java.util.List states;
/**
*
* List of names to use as a filter.
*
*/
private java.util.List names;
/**
*
* List of owners to use as a filter. For AWS CodeCommit, the owner is the AWS account id. For GitHub, it is the
* GitHub account name.
*
*/
private java.util.List owners;
/**
*
* The maximum number of repository association results returned by ListRepositoryAssociations
in
* paginated output. When this parameter is used, ListRepositoryAssociations
only returns
* maxResults
results in a single page along with a nextToken
response element. The
* remaining results of the initial request can be seen by sending another ListRepositoryAssociations
* request with the returned nextToken
value. This value can be between 1 and 100. If this parameter is
* not used, then ListRepositoryAssociations
returns up to 100 results and a nextToken
* value if applicable.
*
*/
private Integer maxResults;
/**
*
* The nextToken
value returned from a previous paginated ListRepositoryAssociations
* request where maxResults
was used and the results exceeded the value of that parameter. Pagination
* continues from the end of the previous results that returned the nextToken
value.
*
*
*
* This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and
* not for other programmatic purposes.
*
*
*/
private String nextToken;
/**
*
* List of provider types to use as a filter.
*
*
* @return List of provider types to use as a filter.
* @see ProviderType
*/
public java.util.List getProviderTypes() {
return providerTypes;
}
/**
*
* List of provider types to use as a filter.
*
*
* @param providerTypes
* List of provider types to use as a filter.
* @see ProviderType
*/
public void setProviderTypes(java.util.Collection providerTypes) {
if (providerTypes == null) {
this.providerTypes = null;
return;
}
this.providerTypes = new java.util.ArrayList(providerTypes);
}
/**
*
* List of provider types to use as a filter.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setProviderTypes(java.util.Collection)} or {@link #withProviderTypes(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param providerTypes
* List of provider types to use as a filter.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ProviderType
*/
public ListRepositoryAssociationsRequest withProviderTypes(String... providerTypes) {
if (this.providerTypes == null) {
setProviderTypes(new java.util.ArrayList(providerTypes.length));
}
for (String ele : providerTypes) {
this.providerTypes.add(ele);
}
return this;
}
/**
*
* List of provider types to use as a filter.
*
*
* @param providerTypes
* List of provider types to use as a filter.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ProviderType
*/
public ListRepositoryAssociationsRequest withProviderTypes(java.util.Collection providerTypes) {
setProviderTypes(providerTypes);
return this;
}
/**
*
* List of provider types to use as a filter.
*
*
* @param providerTypes
* List of provider types to use as a filter.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ProviderType
*/
public ListRepositoryAssociationsRequest withProviderTypes(ProviderType... providerTypes) {
java.util.ArrayList providerTypesCopy = new java.util.ArrayList(providerTypes.length);
for (ProviderType value : providerTypes) {
providerTypesCopy.add(value.toString());
}
if (getProviderTypes() == null) {
setProviderTypes(providerTypesCopy);
} else {
getProviderTypes().addAll(providerTypesCopy);
}
return this;
}
/**
*
* List of states to use as a filter.
*
*
* @return List of states to use as a filter.
* @see RepositoryAssociationState
*/
public java.util.List getStates() {
return states;
}
/**
*
* List of states to use as a filter.
*
*
* @param states
* List of states to use as a filter.
* @see RepositoryAssociationState
*/
public void setStates(java.util.Collection states) {
if (states == null) {
this.states = null;
return;
}
this.states = new java.util.ArrayList(states);
}
/**
*
* List of states to use as a filter.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setStates(java.util.Collection)} or {@link #withStates(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param states
* List of states to use as a filter.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RepositoryAssociationState
*/
public ListRepositoryAssociationsRequest withStates(String... states) {
if (this.states == null) {
setStates(new java.util.ArrayList(states.length));
}
for (String ele : states) {
this.states.add(ele);
}
return this;
}
/**
*
* List of states to use as a filter.
*
*
* @param states
* List of states to use as a filter.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RepositoryAssociationState
*/
public ListRepositoryAssociationsRequest withStates(java.util.Collection states) {
setStates(states);
return this;
}
/**
*
* List of states to use as a filter.
*
*
* @param states
* List of states to use as a filter.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RepositoryAssociationState
*/
public ListRepositoryAssociationsRequest withStates(RepositoryAssociationState... states) {
java.util.ArrayList statesCopy = new java.util.ArrayList(states.length);
for (RepositoryAssociationState value : states) {
statesCopy.add(value.toString());
}
if (getStates() == null) {
setStates(statesCopy);
} else {
getStates().addAll(statesCopy);
}
return this;
}
/**
*
* List of names to use as a filter.
*
*
* @return List of names to use as a filter.
*/
public java.util.List getNames() {
return names;
}
/**
*
* List of names to use as a filter.
*
*
* @param names
* List of names to use as a filter.
*/
public void setNames(java.util.Collection names) {
if (names == null) {
this.names = null;
return;
}
this.names = new java.util.ArrayList(names);
}
/**
*
* List of names to use as a filter.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setNames(java.util.Collection)} or {@link #withNames(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param names
* List of names to use as a filter.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListRepositoryAssociationsRequest withNames(String... names) {
if (this.names == null) {
setNames(new java.util.ArrayList(names.length));
}
for (String ele : names) {
this.names.add(ele);
}
return this;
}
/**
*
* List of names to use as a filter.
*
*
* @param names
* List of names to use as a filter.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListRepositoryAssociationsRequest withNames(java.util.Collection names) {
setNames(names);
return this;
}
/**
*
* List of owners to use as a filter. For AWS CodeCommit, the owner is the AWS account id. For GitHub, it is the
* GitHub account name.
*
*
* @return List of owners to use as a filter. For AWS CodeCommit, the owner is the AWS account id. For GitHub, it is
* the GitHub account name.
*/
public java.util.List getOwners() {
return owners;
}
/**
*
* List of owners to use as a filter. For AWS CodeCommit, the owner is the AWS account id. For GitHub, it is the
* GitHub account name.
*
*
* @param owners
* List of owners to use as a filter. For AWS CodeCommit, the owner is the AWS account id. For GitHub, it is
* the GitHub account name.
*/
public void setOwners(java.util.Collection owners) {
if (owners == null) {
this.owners = null;
return;
}
this.owners = new java.util.ArrayList(owners);
}
/**
*
* List of owners to use as a filter. For AWS CodeCommit, the owner is the AWS account id. For GitHub, it is the
* GitHub account name.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setOwners(java.util.Collection)} or {@link #withOwners(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param owners
* List of owners to use as a filter. For AWS CodeCommit, the owner is the AWS account id. For GitHub, it is
* the GitHub account name.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListRepositoryAssociationsRequest withOwners(String... owners) {
if (this.owners == null) {
setOwners(new java.util.ArrayList(owners.length));
}
for (String ele : owners) {
this.owners.add(ele);
}
return this;
}
/**
*
* List of owners to use as a filter. For AWS CodeCommit, the owner is the AWS account id. For GitHub, it is the
* GitHub account name.
*
*
* @param owners
* List of owners to use as a filter. For AWS CodeCommit, the owner is the AWS account id. For GitHub, it is
* the GitHub account name.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListRepositoryAssociationsRequest withOwners(java.util.Collection owners) {
setOwners(owners);
return this;
}
/**
*
* The maximum number of repository association results returned by ListRepositoryAssociations
in
* paginated output. When this parameter is used, ListRepositoryAssociations
only returns
* maxResults
results in a single page along with a nextToken
response element. The
* remaining results of the initial request can be seen by sending another ListRepositoryAssociations
* request with the returned nextToken
value. This value can be between 1 and 100. If this parameter is
* not used, then ListRepositoryAssociations
returns up to 100 results and a nextToken
* value if applicable.
*
*
* @param maxResults
* The maximum number of repository association results returned by ListRepositoryAssociations
* in paginated output. When this parameter is used, ListRepositoryAssociations
only returns
* maxResults
results in a single page along with a nextToken
response element. The
* remaining results of the initial request can be seen by sending another
* ListRepositoryAssociations
request with the returned nextToken
value. This value
* can be between 1 and 100. If this parameter is not used, then ListRepositoryAssociations
* returns up to 100 results and a nextToken
value if applicable.
*/
public void setMaxResults(Integer maxResults) {
this.maxResults = maxResults;
}
/**
*
* The maximum number of repository association results returned by ListRepositoryAssociations
in
* paginated output. When this parameter is used, ListRepositoryAssociations
only returns
* maxResults
results in a single page along with a nextToken
response element. The
* remaining results of the initial request can be seen by sending another ListRepositoryAssociations
* request with the returned nextToken
value. This value can be between 1 and 100. If this parameter is
* not used, then ListRepositoryAssociations
returns up to 100 results and a nextToken
* value if applicable.
*
*
* @return The maximum number of repository association results returned by ListRepositoryAssociations
* in paginated output. When this parameter is used, ListRepositoryAssociations
only returns
* maxResults
results in a single page along with a nextToken
response element.
* The remaining results of the initial request can be seen by sending another
* ListRepositoryAssociations
request with the returned nextToken
value. This
* value can be between 1 and 100. If this parameter is not used, then
* ListRepositoryAssociations
returns up to 100 results and a nextToken
value if
* applicable.
*/
public Integer getMaxResults() {
return this.maxResults;
}
/**
*
* The maximum number of repository association results returned by ListRepositoryAssociations
in
* paginated output. When this parameter is used, ListRepositoryAssociations
only returns
* maxResults
results in a single page along with a nextToken
response element. The
* remaining results of the initial request can be seen by sending another ListRepositoryAssociations
* request with the returned nextToken
value. This value can be between 1 and 100. If this parameter is
* not used, then ListRepositoryAssociations
returns up to 100 results and a nextToken
* value if applicable.
*
*
* @param maxResults
* The maximum number of repository association results returned by ListRepositoryAssociations
* in paginated output. When this parameter is used, ListRepositoryAssociations
only returns
* maxResults
results in a single page along with a nextToken
response element. The
* remaining results of the initial request can be seen by sending another
* ListRepositoryAssociations
request with the returned nextToken
value. This value
* can be between 1 and 100. If this parameter is not used, then ListRepositoryAssociations
* returns up to 100 results and a nextToken
value if applicable.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListRepositoryAssociationsRequest withMaxResults(Integer maxResults) {
setMaxResults(maxResults);
return this;
}
/**
*
* The nextToken
value returned from a previous paginated ListRepositoryAssociations
* request where maxResults
was used and the results exceeded the value of that parameter. Pagination
* continues from the end of the previous results that returned the nextToken
value.
*
*
*
* This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and
* not for other programmatic purposes.
*
*
*
* @param nextToken
* The nextToken
value returned from a previous paginated
* ListRepositoryAssociations
request where maxResults
was used and the results
* exceeded the value of that parameter. Pagination continues from the end of the previous results that
* returned the nextToken
value.
*
* This token should be treated as an opaque identifier that is only used to retrieve the next items in a
* list and not for other programmatic purposes.
*
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
*
* The nextToken
value returned from a previous paginated ListRepositoryAssociations
* request where maxResults
was used and the results exceeded the value of that parameter. Pagination
* continues from the end of the previous results that returned the nextToken
value.
*
*
*
* This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and
* not for other programmatic purposes.
*
*
*
* @return The nextToken
value returned from a previous paginated
* ListRepositoryAssociations
request where maxResults
was used and the results
* exceeded the value of that parameter. Pagination continues from the end of the previous results that
* returned the nextToken
value.
*
* This token should be treated as an opaque identifier that is only used to retrieve the next items in a
* list and not for other programmatic purposes.
*
*/
public String getNextToken() {
return this.nextToken;
}
/**
*
* The nextToken
value returned from a previous paginated ListRepositoryAssociations
* request where maxResults
was used and the results exceeded the value of that parameter. Pagination
* continues from the end of the previous results that returned the nextToken
value.
*
*
*
* This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and
* not for other programmatic purposes.
*
*
*
* @param nextToken
* The nextToken
value returned from a previous paginated
* ListRepositoryAssociations
request where maxResults
was used and the results
* exceeded the value of that parameter. Pagination continues from the end of the previous results that
* returned the nextToken
value.
*
* This token should be treated as an opaque identifier that is only used to retrieve the next items in a
* list and not for other programmatic purposes.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListRepositoryAssociationsRequest withNextToken(String nextToken) {
setNextToken(nextToken);
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 (getProviderTypes() != null)
sb.append("ProviderTypes: ").append(getProviderTypes()).append(",");
if (getStates() != null)
sb.append("States: ").append(getStates()).append(",");
if (getNames() != null)
sb.append("Names: ").append(getNames()).append(",");
if (getOwners() != null)
sb.append("Owners: ").append(getOwners()).append(",");
if (getMaxResults() != null)
sb.append("MaxResults: ").append(getMaxResults()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ListRepositoryAssociationsRequest == false)
return false;
ListRepositoryAssociationsRequest other = (ListRepositoryAssociationsRequest) obj;
if (other.getProviderTypes() == null ^ this.getProviderTypes() == null)
return false;
if (other.getProviderTypes() != null && other.getProviderTypes().equals(this.getProviderTypes()) == false)
return false;
if (other.getStates() == null ^ this.getStates() == null)
return false;
if (other.getStates() != null && other.getStates().equals(this.getStates()) == false)
return false;
if (other.getNames() == null ^ this.getNames() == null)
return false;
if (other.getNames() != null && other.getNames().equals(this.getNames()) == false)
return false;
if (other.getOwners() == null ^ this.getOwners() == null)
return false;
if (other.getOwners() != null && other.getOwners().equals(this.getOwners()) == 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;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getProviderTypes() == null) ? 0 : getProviderTypes().hashCode());
hashCode = prime * hashCode + ((getStates() == null) ? 0 : getStates().hashCode());
hashCode = prime * hashCode + ((getNames() == null) ? 0 : getNames().hashCode());
hashCode = prime * hashCode + ((getOwners() == null) ? 0 : getOwners().hashCode());
hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
return hashCode;
}
@Override
public ListRepositoryAssociationsRequest clone() {
return (ListRepositoryAssociationsRequest) super.clone();
}
}