com.amazonaws.services.codedeploy.model.ApplicationInfo Maven / Gradle / Ivy
Show all versions of aws-java-sdk-codedeploy Show documentation
/*
* Copyright 2012-2017 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.codedeploy.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Information about an application.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ApplicationInfo implements Serializable, Cloneable, StructuredPojo {
/**
*
* The application ID.
*
*/
private String applicationId;
/**
*
* The application name.
*
*/
private String applicationName;
/**
*
* The time at which the application was created.
*
*/
private java.util.Date createTime;
/**
*
* True if the user has authenticated with GitHub for the specified application; otherwise, false.
*
*/
private Boolean linkedToGitHub;
/**
*
* The name for a connection to a GitHub account.
*
*/
private String gitHubAccountName;
/**
*
* The application ID.
*
*
* @param applicationId
* The application ID.
*/
public void setApplicationId(String applicationId) {
this.applicationId = applicationId;
}
/**
*
* The application ID.
*
*
* @return The application ID.
*/
public String getApplicationId() {
return this.applicationId;
}
/**
*
* The application ID.
*
*
* @param applicationId
* The application ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApplicationInfo withApplicationId(String applicationId) {
setApplicationId(applicationId);
return this;
}
/**
*
* The application name.
*
*
* @param applicationName
* The application name.
*/
public void setApplicationName(String applicationName) {
this.applicationName = applicationName;
}
/**
*
* The application name.
*
*
* @return The application name.
*/
public String getApplicationName() {
return this.applicationName;
}
/**
*
* The application name.
*
*
* @param applicationName
* The application name.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApplicationInfo withApplicationName(String applicationName) {
setApplicationName(applicationName);
return this;
}
/**
*
* The time at which the application was created.
*
*
* @param createTime
* The time at which the application was created.
*/
public void setCreateTime(java.util.Date createTime) {
this.createTime = createTime;
}
/**
*
* The time at which the application was created.
*
*
* @return The time at which the application was created.
*/
public java.util.Date getCreateTime() {
return this.createTime;
}
/**
*
* The time at which the application was created.
*
*
* @param createTime
* The time at which the application was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApplicationInfo withCreateTime(java.util.Date createTime) {
setCreateTime(createTime);
return this;
}
/**
*
* True if the user has authenticated with GitHub for the specified application; otherwise, false.
*
*
* @param linkedToGitHub
* True if the user has authenticated with GitHub for the specified application; otherwise, false.
*/
public void setLinkedToGitHub(Boolean linkedToGitHub) {
this.linkedToGitHub = linkedToGitHub;
}
/**
*
* True if the user has authenticated with GitHub for the specified application; otherwise, false.
*
*
* @return True if the user has authenticated with GitHub for the specified application; otherwise, false.
*/
public Boolean getLinkedToGitHub() {
return this.linkedToGitHub;
}
/**
*
* True if the user has authenticated with GitHub for the specified application; otherwise, false.
*
*
* @param linkedToGitHub
* True if the user has authenticated with GitHub for the specified application; otherwise, false.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApplicationInfo withLinkedToGitHub(Boolean linkedToGitHub) {
setLinkedToGitHub(linkedToGitHub);
return this;
}
/**
*
* True if the user has authenticated with GitHub for the specified application; otherwise, false.
*
*
* @return True if the user has authenticated with GitHub for the specified application; otherwise, false.
*/
public Boolean isLinkedToGitHub() {
return this.linkedToGitHub;
}
/**
*
* The name for a connection to a GitHub account.
*
*
* @param gitHubAccountName
* The name for a connection to a GitHub account.
*/
public void setGitHubAccountName(String gitHubAccountName) {
this.gitHubAccountName = gitHubAccountName;
}
/**
*
* The name for a connection to a GitHub account.
*
*
* @return The name for a connection to a GitHub account.
*/
public String getGitHubAccountName() {
return this.gitHubAccountName;
}
/**
*
* The name for a connection to a GitHub account.
*
*
* @param gitHubAccountName
* The name for a connection to a GitHub account.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ApplicationInfo withGitHubAccountName(String gitHubAccountName) {
setGitHubAccountName(gitHubAccountName);
return this;
}
/**
* Returns a string representation of this object; useful for testing and debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getApplicationId() != null)
sb.append("ApplicationId: ").append(getApplicationId()).append(",");
if (getApplicationName() != null)
sb.append("ApplicationName: ").append(getApplicationName()).append(",");
if (getCreateTime() != null)
sb.append("CreateTime: ").append(getCreateTime()).append(",");
if (getLinkedToGitHub() != null)
sb.append("LinkedToGitHub: ").append(getLinkedToGitHub()).append(",");
if (getGitHubAccountName() != null)
sb.append("GitHubAccountName: ").append(getGitHubAccountName());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ApplicationInfo == false)
return false;
ApplicationInfo other = (ApplicationInfo) obj;
if (other.getApplicationId() == null ^ this.getApplicationId() == null)
return false;
if (other.getApplicationId() != null && other.getApplicationId().equals(this.getApplicationId()) == false)
return false;
if (other.getApplicationName() == null ^ this.getApplicationName() == null)
return false;
if (other.getApplicationName() != null && other.getApplicationName().equals(this.getApplicationName()) == false)
return false;
if (other.getCreateTime() == null ^ this.getCreateTime() == null)
return false;
if (other.getCreateTime() != null && other.getCreateTime().equals(this.getCreateTime()) == false)
return false;
if (other.getLinkedToGitHub() == null ^ this.getLinkedToGitHub() == null)
return false;
if (other.getLinkedToGitHub() != null && other.getLinkedToGitHub().equals(this.getLinkedToGitHub()) == false)
return false;
if (other.getGitHubAccountName() == null ^ this.getGitHubAccountName() == null)
return false;
if (other.getGitHubAccountName() != null && other.getGitHubAccountName().equals(this.getGitHubAccountName()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getApplicationId() == null) ? 0 : getApplicationId().hashCode());
hashCode = prime * hashCode + ((getApplicationName() == null) ? 0 : getApplicationName().hashCode());
hashCode = prime * hashCode + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
hashCode = prime * hashCode + ((getLinkedToGitHub() == null) ? 0 : getLinkedToGitHub().hashCode());
hashCode = prime * hashCode + ((getGitHubAccountName() == null) ? 0 : getGitHubAccountName().hashCode());
return hashCode;
}
@Override
public ApplicationInfo clone() {
try {
return (ApplicationInfo) 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.codedeploy.model.transform.ApplicationInfoMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}