
com.amazonaws.services.proton.model.CountsSummary Maven / Gradle / Ivy
/*
* 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.proton.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Summary counts of each Proton resource type.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CountsSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The total number of components in the Amazon Web Services account.
*
*
* The semantics of the components
field are different from the semantics of results for other
* infrastructure-provisioning resources. That's because at this time components don't have associated templates,
* therefore they don't have the concept of staleness. The components
object will only contain
* total
and failed
members.
*
*/
private ResourceCountsSummary components;
/**
*
* The total number of environment templates in the Amazon Web Services account. The
* environmentTemplates
object will only contain total
members.
*
*/
private ResourceCountsSummary environmentTemplates;
/**
*
* The staleness counts for Proton environments in the Amazon Web Services account. The environments
* object will only contain total
members.
*
*/
private ResourceCountsSummary environments;
/**
*
* The staleness counts for Proton pipelines in the Amazon Web Services account.
*
*/
private ResourceCountsSummary pipelines;
/**
*
* The staleness counts for Proton service instances in the Amazon Web Services account.
*
*/
private ResourceCountsSummary serviceInstances;
/**
*
* The total number of service templates in the Amazon Web Services account. The serviceTemplates
* object will only contain total
members.
*
*/
private ResourceCountsSummary serviceTemplates;
/**
*
* The staleness counts for Proton services in the Amazon Web Services account.
*
*/
private ResourceCountsSummary services;
/**
*
* The total number of components in the Amazon Web Services account.
*
*
* The semantics of the components
field are different from the semantics of results for other
* infrastructure-provisioning resources. That's because at this time components don't have associated templates,
* therefore they don't have the concept of staleness. The components
object will only contain
* total
and failed
members.
*
*
* @param components
* The total number of components in the Amazon Web Services account.
*
* The semantics of the components
field are different from the semantics of results for other
* infrastructure-provisioning resources. That's because at this time components don't have associated
* templates, therefore they don't have the concept of staleness. The components
object will
* only contain total
and failed
members.
*/
public void setComponents(ResourceCountsSummary components) {
this.components = components;
}
/**
*
* The total number of components in the Amazon Web Services account.
*
*
* The semantics of the components
field are different from the semantics of results for other
* infrastructure-provisioning resources. That's because at this time components don't have associated templates,
* therefore they don't have the concept of staleness. The components
object will only contain
* total
and failed
members.
*
*
* @return The total number of components in the Amazon Web Services account.
*
* The semantics of the components
field are different from the semantics of results for other
* infrastructure-provisioning resources. That's because at this time components don't have associated
* templates, therefore they don't have the concept of staleness. The components
object will
* only contain total
and failed
members.
*/
public ResourceCountsSummary getComponents() {
return this.components;
}
/**
*
* The total number of components in the Amazon Web Services account.
*
*
* The semantics of the components
field are different from the semantics of results for other
* infrastructure-provisioning resources. That's because at this time components don't have associated templates,
* therefore they don't have the concept of staleness. The components
object will only contain
* total
and failed
members.
*
*
* @param components
* The total number of components in the Amazon Web Services account.
*
* The semantics of the components
field are different from the semantics of results for other
* infrastructure-provisioning resources. That's because at this time components don't have associated
* templates, therefore they don't have the concept of staleness. The components
object will
* only contain total
and failed
members.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CountsSummary withComponents(ResourceCountsSummary components) {
setComponents(components);
return this;
}
/**
*
* The total number of environment templates in the Amazon Web Services account. The
* environmentTemplates
object will only contain total
members.
*
*
* @param environmentTemplates
* The total number of environment templates in the Amazon Web Services account. The
* environmentTemplates
object will only contain total
members.
*/
public void setEnvironmentTemplates(ResourceCountsSummary environmentTemplates) {
this.environmentTemplates = environmentTemplates;
}
/**
*
* The total number of environment templates in the Amazon Web Services account. The
* environmentTemplates
object will only contain total
members.
*
*
* @return The total number of environment templates in the Amazon Web Services account. The
* environmentTemplates
object will only contain total
members.
*/
public ResourceCountsSummary getEnvironmentTemplates() {
return this.environmentTemplates;
}
/**
*
* The total number of environment templates in the Amazon Web Services account. The
* environmentTemplates
object will only contain total
members.
*
*
* @param environmentTemplates
* The total number of environment templates in the Amazon Web Services account. The
* environmentTemplates
object will only contain total
members.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CountsSummary withEnvironmentTemplates(ResourceCountsSummary environmentTemplates) {
setEnvironmentTemplates(environmentTemplates);
return this;
}
/**
*
* The staleness counts for Proton environments in the Amazon Web Services account. The environments
* object will only contain total
members.
*
*
* @param environments
* The staleness counts for Proton environments in the Amazon Web Services account. The
* environments
object will only contain total
members.
*/
public void setEnvironments(ResourceCountsSummary environments) {
this.environments = environments;
}
/**
*
* The staleness counts for Proton environments in the Amazon Web Services account. The environments
* object will only contain total
members.
*
*
* @return The staleness counts for Proton environments in the Amazon Web Services account. The
* environments
object will only contain total
members.
*/
public ResourceCountsSummary getEnvironments() {
return this.environments;
}
/**
*
* The staleness counts for Proton environments in the Amazon Web Services account. The environments
* object will only contain total
members.
*
*
* @param environments
* The staleness counts for Proton environments in the Amazon Web Services account. The
* environments
object will only contain total
members.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CountsSummary withEnvironments(ResourceCountsSummary environments) {
setEnvironments(environments);
return this;
}
/**
*
* The staleness counts for Proton pipelines in the Amazon Web Services account.
*
*
* @param pipelines
* The staleness counts for Proton pipelines in the Amazon Web Services account.
*/
public void setPipelines(ResourceCountsSummary pipelines) {
this.pipelines = pipelines;
}
/**
*
* The staleness counts for Proton pipelines in the Amazon Web Services account.
*
*
* @return The staleness counts for Proton pipelines in the Amazon Web Services account.
*/
public ResourceCountsSummary getPipelines() {
return this.pipelines;
}
/**
*
* The staleness counts for Proton pipelines in the Amazon Web Services account.
*
*
* @param pipelines
* The staleness counts for Proton pipelines in the Amazon Web Services account.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CountsSummary withPipelines(ResourceCountsSummary pipelines) {
setPipelines(pipelines);
return this;
}
/**
*
* The staleness counts for Proton service instances in the Amazon Web Services account.
*
*
* @param serviceInstances
* The staleness counts for Proton service instances in the Amazon Web Services account.
*/
public void setServiceInstances(ResourceCountsSummary serviceInstances) {
this.serviceInstances = serviceInstances;
}
/**
*
* The staleness counts for Proton service instances in the Amazon Web Services account.
*
*
* @return The staleness counts for Proton service instances in the Amazon Web Services account.
*/
public ResourceCountsSummary getServiceInstances() {
return this.serviceInstances;
}
/**
*
* The staleness counts for Proton service instances in the Amazon Web Services account.
*
*
* @param serviceInstances
* The staleness counts for Proton service instances in the Amazon Web Services account.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CountsSummary withServiceInstances(ResourceCountsSummary serviceInstances) {
setServiceInstances(serviceInstances);
return this;
}
/**
*
* The total number of service templates in the Amazon Web Services account. The serviceTemplates
* object will only contain total
members.
*
*
* @param serviceTemplates
* The total number of service templates in the Amazon Web Services account. The
* serviceTemplates
object will only contain total
members.
*/
public void setServiceTemplates(ResourceCountsSummary serviceTemplates) {
this.serviceTemplates = serviceTemplates;
}
/**
*
* The total number of service templates in the Amazon Web Services account. The serviceTemplates
* object will only contain total
members.
*
*
* @return The total number of service templates in the Amazon Web Services account. The
* serviceTemplates
object will only contain total
members.
*/
public ResourceCountsSummary getServiceTemplates() {
return this.serviceTemplates;
}
/**
*
* The total number of service templates in the Amazon Web Services account. The serviceTemplates
* object will only contain total
members.
*
*
* @param serviceTemplates
* The total number of service templates in the Amazon Web Services account. The
* serviceTemplates
object will only contain total
members.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CountsSummary withServiceTemplates(ResourceCountsSummary serviceTemplates) {
setServiceTemplates(serviceTemplates);
return this;
}
/**
*
* The staleness counts for Proton services in the Amazon Web Services account.
*
*
* @param services
* The staleness counts for Proton services in the Amazon Web Services account.
*/
public void setServices(ResourceCountsSummary services) {
this.services = services;
}
/**
*
* The staleness counts for Proton services in the Amazon Web Services account.
*
*
* @return The staleness counts for Proton services in the Amazon Web Services account.
*/
public ResourceCountsSummary getServices() {
return this.services;
}
/**
*
* The staleness counts for Proton services in the Amazon Web Services account.
*
*
* @param services
* The staleness counts for Proton services in the Amazon Web Services account.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CountsSummary withServices(ResourceCountsSummary services) {
setServices(services);
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 (getComponents() != null)
sb.append("Components: ").append(getComponents()).append(",");
if (getEnvironmentTemplates() != null)
sb.append("EnvironmentTemplates: ").append(getEnvironmentTemplates()).append(",");
if (getEnvironments() != null)
sb.append("Environments: ").append(getEnvironments()).append(",");
if (getPipelines() != null)
sb.append("Pipelines: ").append(getPipelines()).append(",");
if (getServiceInstances() != null)
sb.append("ServiceInstances: ").append(getServiceInstances()).append(",");
if (getServiceTemplates() != null)
sb.append("ServiceTemplates: ").append(getServiceTemplates()).append(",");
if (getServices() != null)
sb.append("Services: ").append(getServices());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CountsSummary == false)
return false;
CountsSummary other = (CountsSummary) obj;
if (other.getComponents() == null ^ this.getComponents() == null)
return false;
if (other.getComponents() != null && other.getComponents().equals(this.getComponents()) == false)
return false;
if (other.getEnvironmentTemplates() == null ^ this.getEnvironmentTemplates() == null)
return false;
if (other.getEnvironmentTemplates() != null && other.getEnvironmentTemplates().equals(this.getEnvironmentTemplates()) == false)
return false;
if (other.getEnvironments() == null ^ this.getEnvironments() == null)
return false;
if (other.getEnvironments() != null && other.getEnvironments().equals(this.getEnvironments()) == false)
return false;
if (other.getPipelines() == null ^ this.getPipelines() == null)
return false;
if (other.getPipelines() != null && other.getPipelines().equals(this.getPipelines()) == false)
return false;
if (other.getServiceInstances() == null ^ this.getServiceInstances() == null)
return false;
if (other.getServiceInstances() != null && other.getServiceInstances().equals(this.getServiceInstances()) == false)
return false;
if (other.getServiceTemplates() == null ^ this.getServiceTemplates() == null)
return false;
if (other.getServiceTemplates() != null && other.getServiceTemplates().equals(this.getServiceTemplates()) == false)
return false;
if (other.getServices() == null ^ this.getServices() == null)
return false;
if (other.getServices() != null && other.getServices().equals(this.getServices()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getComponents() == null) ? 0 : getComponents().hashCode());
hashCode = prime * hashCode + ((getEnvironmentTemplates() == null) ? 0 : getEnvironmentTemplates().hashCode());
hashCode = prime * hashCode + ((getEnvironments() == null) ? 0 : getEnvironments().hashCode());
hashCode = prime * hashCode + ((getPipelines() == null) ? 0 : getPipelines().hashCode());
hashCode = prime * hashCode + ((getServiceInstances() == null) ? 0 : getServiceInstances().hashCode());
hashCode = prime * hashCode + ((getServiceTemplates() == null) ? 0 : getServiceTemplates().hashCode());
hashCode = prime * hashCode + ((getServices() == null) ? 0 : getServices().hashCode());
return hashCode;
}
@Override
public CountsSummary clone() {
try {
return (CountsSummary) 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.proton.model.transform.CountsSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}