com.amazonaws.services.codegurureviewer.model.RepositoryAssociation 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.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Information about a repository association.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class RepositoryAssociation implements Serializable, Cloneable, StructuredPojo {
/**
*
* The id of the repository association.
*
*/
private String associationId;
/**
*
* The Amazon Resource Name (ARN) identifying the repository association.
*
*/
private String associationArn;
/**
*
* The name of the repository.
*
*/
private String name;
/**
*
* The owner of the repository.
*
*/
private String owner;
/**
*
* The provider type of the repository association.
*
*/
private String providerType;
/**
*
* The state of the repository association.
*
*/
private String state;
/**
*
* A description of why the repository association is in the current state.
*
*/
private String stateReason;
/**
*
* The time, in milliseconds since the epoch, when the repository association was last updated.
*
*/
private java.util.Date lastUpdatedTimeStamp;
/**
*
* The time, in milliseconds since the epoch, when the repository association was created.
*
*/
private java.util.Date createdTimeStamp;
/**
*
* The id of the repository association.
*
*
* @param associationId
* The id of the repository association.
*/
public void setAssociationId(String associationId) {
this.associationId = associationId;
}
/**
*
* The id of the repository association.
*
*
* @return The id of the repository association.
*/
public String getAssociationId() {
return this.associationId;
}
/**
*
* The id of the repository association.
*
*
* @param associationId
* The id of the repository association.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RepositoryAssociation withAssociationId(String associationId) {
setAssociationId(associationId);
return this;
}
/**
*
* The Amazon Resource Name (ARN) identifying the repository association.
*
*
* @param associationArn
* The Amazon Resource Name (ARN) identifying the repository association.
*/
public void setAssociationArn(String associationArn) {
this.associationArn = associationArn;
}
/**
*
* The Amazon Resource Name (ARN) identifying the repository association.
*
*
* @return The Amazon Resource Name (ARN) identifying the repository association.
*/
public String getAssociationArn() {
return this.associationArn;
}
/**
*
* The Amazon Resource Name (ARN) identifying the repository association.
*
*
* @param associationArn
* The Amazon Resource Name (ARN) identifying the repository association.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RepositoryAssociation withAssociationArn(String associationArn) {
setAssociationArn(associationArn);
return this;
}
/**
*
* The name of the repository.
*
*
* @param name
* The name of the repository.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the repository.
*
*
* @return The name of the repository.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the repository.
*
*
* @param name
* The name of the repository.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RepositoryAssociation withName(String name) {
setName(name);
return this;
}
/**
*
* The owner of the repository.
*
*
* @param owner
* The owner of the repository.
*/
public void setOwner(String owner) {
this.owner = owner;
}
/**
*
* The owner of the repository.
*
*
* @return The owner of the repository.
*/
public String getOwner() {
return this.owner;
}
/**
*
* The owner of the repository.
*
*
* @param owner
* The owner of the repository.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RepositoryAssociation withOwner(String owner) {
setOwner(owner);
return this;
}
/**
*
* The provider type of the repository association.
*
*
* @param providerType
* The provider type of the repository association.
* @see ProviderType
*/
public void setProviderType(String providerType) {
this.providerType = providerType;
}
/**
*
* The provider type of the repository association.
*
*
* @return The provider type of the repository association.
* @see ProviderType
*/
public String getProviderType() {
return this.providerType;
}
/**
*
* The provider type of the repository association.
*
*
* @param providerType
* The provider type of the repository association.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ProviderType
*/
public RepositoryAssociation withProviderType(String providerType) {
setProviderType(providerType);
return this;
}
/**
*
* The provider type of the repository association.
*
*
* @param providerType
* The provider type of the repository association.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ProviderType
*/
public RepositoryAssociation withProviderType(ProviderType providerType) {
this.providerType = providerType.toString();
return this;
}
/**
*
* The state of the repository association.
*
*
* @param state
* The state of the repository association.
* @see RepositoryAssociationState
*/
public void setState(String state) {
this.state = state;
}
/**
*
* The state of the repository association.
*
*
* @return The state of the repository association.
* @see RepositoryAssociationState
*/
public String getState() {
return this.state;
}
/**
*
* The state of the repository association.
*
*
* @param state
* The state of the repository association.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RepositoryAssociationState
*/
public RepositoryAssociation withState(String state) {
setState(state);
return this;
}
/**
*
* The state of the repository association.
*
*
* @param state
* The state of the repository association.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RepositoryAssociationState
*/
public RepositoryAssociation withState(RepositoryAssociationState state) {
this.state = state.toString();
return this;
}
/**
*
* A description of why the repository association is in the current state.
*
*
* @param stateReason
* A description of why the repository association is in the current state.
*/
public void setStateReason(String stateReason) {
this.stateReason = stateReason;
}
/**
*
* A description of why the repository association is in the current state.
*
*
* @return A description of why the repository association is in the current state.
*/
public String getStateReason() {
return this.stateReason;
}
/**
*
* A description of why the repository association is in the current state.
*
*
* @param stateReason
* A description of why the repository association is in the current state.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RepositoryAssociation withStateReason(String stateReason) {
setStateReason(stateReason);
return this;
}
/**
*
* The time, in milliseconds since the epoch, when the repository association was last updated.
*
*
* @param lastUpdatedTimeStamp
* The time, in milliseconds since the epoch, when the repository association was last updated.
*/
public void setLastUpdatedTimeStamp(java.util.Date lastUpdatedTimeStamp) {
this.lastUpdatedTimeStamp = lastUpdatedTimeStamp;
}
/**
*
* The time, in milliseconds since the epoch, when the repository association was last updated.
*
*
* @return The time, in milliseconds since the epoch, when the repository association was last updated.
*/
public java.util.Date getLastUpdatedTimeStamp() {
return this.lastUpdatedTimeStamp;
}
/**
*
* The time, in milliseconds since the epoch, when the repository association was last updated.
*
*
* @param lastUpdatedTimeStamp
* The time, in milliseconds since the epoch, when the repository association was last updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RepositoryAssociation withLastUpdatedTimeStamp(java.util.Date lastUpdatedTimeStamp) {
setLastUpdatedTimeStamp(lastUpdatedTimeStamp);
return this;
}
/**
*
* The time, in milliseconds since the epoch, when the repository association was created.
*
*
* @param createdTimeStamp
* The time, in milliseconds since the epoch, when the repository association was created.
*/
public void setCreatedTimeStamp(java.util.Date createdTimeStamp) {
this.createdTimeStamp = createdTimeStamp;
}
/**
*
* The time, in milliseconds since the epoch, when the repository association was created.
*
*
* @return The time, in milliseconds since the epoch, when the repository association was created.
*/
public java.util.Date getCreatedTimeStamp() {
return this.createdTimeStamp;
}
/**
*
* The time, in milliseconds since the epoch, when the repository association was created.
*
*
* @param createdTimeStamp
* The time, in milliseconds since the epoch, when the repository association was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RepositoryAssociation withCreatedTimeStamp(java.util.Date createdTimeStamp) {
setCreatedTimeStamp(createdTimeStamp);
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 (getAssociationId() != null)
sb.append("AssociationId: ").append(getAssociationId()).append(",");
if (getAssociationArn() != null)
sb.append("AssociationArn: ").append(getAssociationArn()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getOwner() != null)
sb.append("Owner: ").append(getOwner()).append(",");
if (getProviderType() != null)
sb.append("ProviderType: ").append(getProviderType()).append(",");
if (getState() != null)
sb.append("State: ").append(getState()).append(",");
if (getStateReason() != null)
sb.append("StateReason: ").append(getStateReason()).append(",");
if (getLastUpdatedTimeStamp() != null)
sb.append("LastUpdatedTimeStamp: ").append(getLastUpdatedTimeStamp()).append(",");
if (getCreatedTimeStamp() != null)
sb.append("CreatedTimeStamp: ").append(getCreatedTimeStamp());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof RepositoryAssociation == false)
return false;
RepositoryAssociation other = (RepositoryAssociation) obj;
if (other.getAssociationId() == null ^ this.getAssociationId() == null)
return false;
if (other.getAssociationId() != null && other.getAssociationId().equals(this.getAssociationId()) == false)
return false;
if (other.getAssociationArn() == null ^ this.getAssociationArn() == null)
return false;
if (other.getAssociationArn() != null && other.getAssociationArn().equals(this.getAssociationArn()) == false)
return false;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getOwner() == null ^ this.getOwner() == null)
return false;
if (other.getOwner() != null && other.getOwner().equals(this.getOwner()) == false)
return false;
if (other.getProviderType() == null ^ this.getProviderType() == null)
return false;
if (other.getProviderType() != null && other.getProviderType().equals(this.getProviderType()) == false)
return false;
if (other.getState() == null ^ this.getState() == null)
return false;
if (other.getState() != null && other.getState().equals(this.getState()) == false)
return false;
if (other.getStateReason() == null ^ this.getStateReason() == null)
return false;
if (other.getStateReason() != null && other.getStateReason().equals(this.getStateReason()) == false)
return false;
if (other.getLastUpdatedTimeStamp() == null ^ this.getLastUpdatedTimeStamp() == null)
return false;
if (other.getLastUpdatedTimeStamp() != null && other.getLastUpdatedTimeStamp().equals(this.getLastUpdatedTimeStamp()) == false)
return false;
if (other.getCreatedTimeStamp() == null ^ this.getCreatedTimeStamp() == null)
return false;
if (other.getCreatedTimeStamp() != null && other.getCreatedTimeStamp().equals(this.getCreatedTimeStamp()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAssociationId() == null) ? 0 : getAssociationId().hashCode());
hashCode = prime * hashCode + ((getAssociationArn() == null) ? 0 : getAssociationArn().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getOwner() == null) ? 0 : getOwner().hashCode());
hashCode = prime * hashCode + ((getProviderType() == null) ? 0 : getProviderType().hashCode());
hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode());
hashCode = prime * hashCode + ((getStateReason() == null) ? 0 : getStateReason().hashCode());
hashCode = prime * hashCode + ((getLastUpdatedTimeStamp() == null) ? 0 : getLastUpdatedTimeStamp().hashCode());
hashCode = prime * hashCode + ((getCreatedTimeStamp() == null) ? 0 : getCreatedTimeStamp().hashCode());
return hashCode;
}
@Override
public RepositoryAssociation clone() {
try {
return (RepositoryAssociation) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.codegurureviewer.model.transform.RepositoryAssociationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}