com.amazonaws.services.auditmanager.model.ControlMetadata Maven / Gradle / Ivy
Show all versions of aws-java-sdk-auditmanager 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.auditmanager.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The metadata that's associated with the standard control or custom control.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ControlMetadata implements Serializable, Cloneable, StructuredPojo {
/**
*
* The Amazon Resource Name (ARN) of the control.
*
*/
private String arn;
/**
*
* The unique identifier for the control.
*
*/
private String id;
/**
*
* The name of the control.
*
*/
private String name;
/**
*
* The data source that determines where Audit Manager collects evidence from for the control.
*
*/
private String controlSources;
/**
*
* The time when the control was created.
*
*/
private java.util.Date createdAt;
/**
*
* The time when the control was most recently updated.
*
*/
private java.util.Date lastUpdatedAt;
/**
*
* The Amazon Resource Name (ARN) of the control.
*
*
* @param arn
* The Amazon Resource Name (ARN) of the control.
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The Amazon Resource Name (ARN) of the control.
*
*
* @return The Amazon Resource Name (ARN) of the control.
*/
public String getArn() {
return this.arn;
}
/**
*
* The Amazon Resource Name (ARN) of the control.
*
*
* @param arn
* The Amazon Resource Name (ARN) of the control.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ControlMetadata withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* The unique identifier for the control.
*
*
* @param id
* The unique identifier for the control.
*/
public void setId(String id) {
this.id = id;
}
/**
*
* The unique identifier for the control.
*
*
* @return The unique identifier for the control.
*/
public String getId() {
return this.id;
}
/**
*
* The unique identifier for the control.
*
*
* @param id
* The unique identifier for the control.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ControlMetadata withId(String id) {
setId(id);
return this;
}
/**
*
* The name of the control.
*
*
* @param name
* The name of the control.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the control.
*
*
* @return The name of the control.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the control.
*
*
* @param name
* The name of the control.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ControlMetadata withName(String name) {
setName(name);
return this;
}
/**
*
* The data source that determines where Audit Manager collects evidence from for the control.
*
*
* @param controlSources
* The data source that determines where Audit Manager collects evidence from for the control.
*/
public void setControlSources(String controlSources) {
this.controlSources = controlSources;
}
/**
*
* The data source that determines where Audit Manager collects evidence from for the control.
*
*
* @return The data source that determines where Audit Manager collects evidence from for the control.
*/
public String getControlSources() {
return this.controlSources;
}
/**
*
* The data source that determines where Audit Manager collects evidence from for the control.
*
*
* @param controlSources
* The data source that determines where Audit Manager collects evidence from for the control.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ControlMetadata withControlSources(String controlSources) {
setControlSources(controlSources);
return this;
}
/**
*
* The time when the control was created.
*
*
* @param createdAt
* The time when the control was created.
*/
public void setCreatedAt(java.util.Date createdAt) {
this.createdAt = createdAt;
}
/**
*
* The time when the control was created.
*
*
* @return The time when the control was created.
*/
public java.util.Date getCreatedAt() {
return this.createdAt;
}
/**
*
* The time when the control was created.
*
*
* @param createdAt
* The time when the control was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ControlMetadata withCreatedAt(java.util.Date createdAt) {
setCreatedAt(createdAt);
return this;
}
/**
*
* The time when the control was most recently updated.
*
*
* @param lastUpdatedAt
* The time when the control was most recently updated.
*/
public void setLastUpdatedAt(java.util.Date lastUpdatedAt) {
this.lastUpdatedAt = lastUpdatedAt;
}
/**
*
* The time when the control was most recently updated.
*
*
* @return The time when the control was most recently updated.
*/
public java.util.Date getLastUpdatedAt() {
return this.lastUpdatedAt;
}
/**
*
* The time when the control was most recently updated.
*
*
* @param lastUpdatedAt
* The time when the control was most recently updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ControlMetadata withLastUpdatedAt(java.util.Date lastUpdatedAt) {
setLastUpdatedAt(lastUpdatedAt);
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 (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getId() != null)
sb.append("Id: ").append(getId()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getControlSources() != null)
sb.append("ControlSources: ").append(getControlSources()).append(",");
if (getCreatedAt() != null)
sb.append("CreatedAt: ").append(getCreatedAt()).append(",");
if (getLastUpdatedAt() != null)
sb.append("LastUpdatedAt: ").append(getLastUpdatedAt());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ControlMetadata == false)
return false;
ControlMetadata other = (ControlMetadata) obj;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == false)
return false;
if (other.getId() == null ^ this.getId() == null)
return false;
if (other.getId() != null && other.getId().equals(this.getId()) == 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.getControlSources() == null ^ this.getControlSources() == null)
return false;
if (other.getControlSources() != null && other.getControlSources().equals(this.getControlSources()) == false)
return false;
if (other.getCreatedAt() == null ^ this.getCreatedAt() == null)
return false;
if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false)
return false;
if (other.getLastUpdatedAt() == null ^ this.getLastUpdatedAt() == null)
return false;
if (other.getLastUpdatedAt() != null && other.getLastUpdatedAt().equals(this.getLastUpdatedAt()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode());
hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getControlSources() == null) ? 0 : getControlSources().hashCode());
hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
hashCode = prime * hashCode + ((getLastUpdatedAt() == null) ? 0 : getLastUpdatedAt().hashCode());
return hashCode;
}
@Override
public ControlMetadata clone() {
try {
return (ControlMetadata) 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.auditmanager.model.transform.ControlMetadataMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}