com.amazonaws.services.networkmanager.model.OrganizationStatus Maven / Gradle / Ivy
Show all versions of aws-java-sdk-networkmanager 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.networkmanager.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The status of an Amazon Web Services Organization and the accounts within that organization.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class OrganizationStatus implements Serializable, Cloneable, StructuredPojo {
/**
*
* The ID of an Amazon Web Services Organization.
*
*/
private String organizationId;
/**
*
* The status of the organization's AWS service access. This will be ENABLED
or DISABLED
.
*
*/
private String organizationAwsServiceAccessStatus;
/**
*
* The status of the SLR deployment for the account. This will be either SUCCEEDED
or
* IN_PROGRESS
.
*
*/
private String sLRDeploymentStatus;
/**
*
* The current service-linked role (SLR) deployment status for an Amazon Web Services Organization's accounts. This
* will be either SUCCEEDED
or IN_PROGRESS
.
*
*/
private java.util.List accountStatusList;
/**
*
* The ID of an Amazon Web Services Organization.
*
*
* @param organizationId
* The ID of an Amazon Web Services Organization.
*/
public void setOrganizationId(String organizationId) {
this.organizationId = organizationId;
}
/**
*
* The ID of an Amazon Web Services Organization.
*
*
* @return The ID of an Amazon Web Services Organization.
*/
public String getOrganizationId() {
return this.organizationId;
}
/**
*
* The ID of an Amazon Web Services Organization.
*
*
* @param organizationId
* The ID of an Amazon Web Services Organization.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationStatus withOrganizationId(String organizationId) {
setOrganizationId(organizationId);
return this;
}
/**
*
* The status of the organization's AWS service access. This will be ENABLED
or DISABLED
.
*
*
* @param organizationAwsServiceAccessStatus
* The status of the organization's AWS service access. This will be ENABLED
or
* DISABLED
.
*/
public void setOrganizationAwsServiceAccessStatus(String organizationAwsServiceAccessStatus) {
this.organizationAwsServiceAccessStatus = organizationAwsServiceAccessStatus;
}
/**
*
* The status of the organization's AWS service access. This will be ENABLED
or DISABLED
.
*
*
* @return The status of the organization's AWS service access. This will be ENABLED
or
* DISABLED
.
*/
public String getOrganizationAwsServiceAccessStatus() {
return this.organizationAwsServiceAccessStatus;
}
/**
*
* The status of the organization's AWS service access. This will be ENABLED
or DISABLED
.
*
*
* @param organizationAwsServiceAccessStatus
* The status of the organization's AWS service access. This will be ENABLED
or
* DISABLED
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationStatus withOrganizationAwsServiceAccessStatus(String organizationAwsServiceAccessStatus) {
setOrganizationAwsServiceAccessStatus(organizationAwsServiceAccessStatus);
return this;
}
/**
*
* The status of the SLR deployment for the account. This will be either SUCCEEDED
or
* IN_PROGRESS
.
*
*
* @param sLRDeploymentStatus
* The status of the SLR deployment for the account. This will be either SUCCEEDED
or
* IN_PROGRESS
.
*/
public void setSLRDeploymentStatus(String sLRDeploymentStatus) {
this.sLRDeploymentStatus = sLRDeploymentStatus;
}
/**
*
* The status of the SLR deployment for the account. This will be either SUCCEEDED
or
* IN_PROGRESS
.
*
*
* @return The status of the SLR deployment for the account. This will be either SUCCEEDED
or
* IN_PROGRESS
.
*/
public String getSLRDeploymentStatus() {
return this.sLRDeploymentStatus;
}
/**
*
* The status of the SLR deployment for the account. This will be either SUCCEEDED
or
* IN_PROGRESS
.
*
*
* @param sLRDeploymentStatus
* The status of the SLR deployment for the account. This will be either SUCCEEDED
or
* IN_PROGRESS
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationStatus withSLRDeploymentStatus(String sLRDeploymentStatus) {
setSLRDeploymentStatus(sLRDeploymentStatus);
return this;
}
/**
*
* The current service-linked role (SLR) deployment status for an Amazon Web Services Organization's accounts. This
* will be either SUCCEEDED
or IN_PROGRESS
.
*
*
* @return The current service-linked role (SLR) deployment status for an Amazon Web Services Organization's
* accounts. This will be either SUCCEEDED
or IN_PROGRESS
.
*/
public java.util.List getAccountStatusList() {
return accountStatusList;
}
/**
*
* The current service-linked role (SLR) deployment status for an Amazon Web Services Organization's accounts. This
* will be either SUCCEEDED
or IN_PROGRESS
.
*
*
* @param accountStatusList
* The current service-linked role (SLR) deployment status for an Amazon Web Services Organization's
* accounts. This will be either SUCCEEDED
or IN_PROGRESS
.
*/
public void setAccountStatusList(java.util.Collection accountStatusList) {
if (accountStatusList == null) {
this.accountStatusList = null;
return;
}
this.accountStatusList = new java.util.ArrayList(accountStatusList);
}
/**
*
* The current service-linked role (SLR) deployment status for an Amazon Web Services Organization's accounts. This
* will be either SUCCEEDED
or IN_PROGRESS
.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAccountStatusList(java.util.Collection)} or {@link #withAccountStatusList(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param accountStatusList
* The current service-linked role (SLR) deployment status for an Amazon Web Services Organization's
* accounts. This will be either SUCCEEDED
or IN_PROGRESS
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationStatus withAccountStatusList(AccountStatus... accountStatusList) {
if (this.accountStatusList == null) {
setAccountStatusList(new java.util.ArrayList(accountStatusList.length));
}
for (AccountStatus ele : accountStatusList) {
this.accountStatusList.add(ele);
}
return this;
}
/**
*
* The current service-linked role (SLR) deployment status for an Amazon Web Services Organization's accounts. This
* will be either SUCCEEDED
or IN_PROGRESS
.
*
*
* @param accountStatusList
* The current service-linked role (SLR) deployment status for an Amazon Web Services Organization's
* accounts. This will be either SUCCEEDED
or IN_PROGRESS
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationStatus withAccountStatusList(java.util.Collection accountStatusList) {
setAccountStatusList(accountStatusList);
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 (getOrganizationId() != null)
sb.append("OrganizationId: ").append(getOrganizationId()).append(",");
if (getOrganizationAwsServiceAccessStatus() != null)
sb.append("OrganizationAwsServiceAccessStatus: ").append(getOrganizationAwsServiceAccessStatus()).append(",");
if (getSLRDeploymentStatus() != null)
sb.append("SLRDeploymentStatus: ").append(getSLRDeploymentStatus()).append(",");
if (getAccountStatusList() != null)
sb.append("AccountStatusList: ").append(getAccountStatusList());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof OrganizationStatus == false)
return false;
OrganizationStatus other = (OrganizationStatus) obj;
if (other.getOrganizationId() == null ^ this.getOrganizationId() == null)
return false;
if (other.getOrganizationId() != null && other.getOrganizationId().equals(this.getOrganizationId()) == false)
return false;
if (other.getOrganizationAwsServiceAccessStatus() == null ^ this.getOrganizationAwsServiceAccessStatus() == null)
return false;
if (other.getOrganizationAwsServiceAccessStatus() != null
&& other.getOrganizationAwsServiceAccessStatus().equals(this.getOrganizationAwsServiceAccessStatus()) == false)
return false;
if (other.getSLRDeploymentStatus() == null ^ this.getSLRDeploymentStatus() == null)
return false;
if (other.getSLRDeploymentStatus() != null && other.getSLRDeploymentStatus().equals(this.getSLRDeploymentStatus()) == false)
return false;
if (other.getAccountStatusList() == null ^ this.getAccountStatusList() == null)
return false;
if (other.getAccountStatusList() != null && other.getAccountStatusList().equals(this.getAccountStatusList()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getOrganizationId() == null) ? 0 : getOrganizationId().hashCode());
hashCode = prime * hashCode + ((getOrganizationAwsServiceAccessStatus() == null) ? 0 : getOrganizationAwsServiceAccessStatus().hashCode());
hashCode = prime * hashCode + ((getSLRDeploymentStatus() == null) ? 0 : getSLRDeploymentStatus().hashCode());
hashCode = prime * hashCode + ((getAccountStatusList() == null) ? 0 : getAccountStatusList().hashCode());
return hashCode;
}
@Override
public OrganizationStatus clone() {
try {
return (OrganizationStatus) 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.networkmanager.model.transform.OrganizationStatusMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}