com.amazonaws.services.securityhub.model.StandardsSubscription Maven / Gradle / Ivy
Show all versions of aws-java-sdk-securityhub 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.securityhub.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* A resource that represents your subscription to a supported standard.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class StandardsSubscription implements Serializable, Cloneable, StructuredPojo {
/**
*
* The ARN of a resource that represents your subscription to a supported standard.
*
*/
private String standardsSubscriptionArn;
/**
*
* The ARN of a standard.
*
*/
private String standardsArn;
/**
*
* A key-value pair of input for the standard.
*
*/
private java.util.Map standardsInput;
/**
*
* The status of the standards subscription.
*
*/
private String standardsStatus;
/**
*
* The ARN of a resource that represents your subscription to a supported standard.
*
*
* @param standardsSubscriptionArn
* The ARN of a resource that represents your subscription to a supported standard.
*/
public void setStandardsSubscriptionArn(String standardsSubscriptionArn) {
this.standardsSubscriptionArn = standardsSubscriptionArn;
}
/**
*
* The ARN of a resource that represents your subscription to a supported standard.
*
*
* @return The ARN of a resource that represents your subscription to a supported standard.
*/
public String getStandardsSubscriptionArn() {
return this.standardsSubscriptionArn;
}
/**
*
* The ARN of a resource that represents your subscription to a supported standard.
*
*
* @param standardsSubscriptionArn
* The ARN of a resource that represents your subscription to a supported standard.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StandardsSubscription withStandardsSubscriptionArn(String standardsSubscriptionArn) {
setStandardsSubscriptionArn(standardsSubscriptionArn);
return this;
}
/**
*
* The ARN of a standard.
*
*
* @param standardsArn
* The ARN of a standard.
*/
public void setStandardsArn(String standardsArn) {
this.standardsArn = standardsArn;
}
/**
*
* The ARN of a standard.
*
*
* @return The ARN of a standard.
*/
public String getStandardsArn() {
return this.standardsArn;
}
/**
*
* The ARN of a standard.
*
*
* @param standardsArn
* The ARN of a standard.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StandardsSubscription withStandardsArn(String standardsArn) {
setStandardsArn(standardsArn);
return this;
}
/**
*
* A key-value pair of input for the standard.
*
*
* @return A key-value pair of input for the standard.
*/
public java.util.Map getStandardsInput() {
return standardsInput;
}
/**
*
* A key-value pair of input for the standard.
*
*
* @param standardsInput
* A key-value pair of input for the standard.
*/
public void setStandardsInput(java.util.Map standardsInput) {
this.standardsInput = standardsInput;
}
/**
*
* A key-value pair of input for the standard.
*
*
* @param standardsInput
* A key-value pair of input for the standard.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StandardsSubscription withStandardsInput(java.util.Map standardsInput) {
setStandardsInput(standardsInput);
return this;
}
/**
* Add a single StandardsInput entry
*
* @see StandardsSubscription#withStandardsInput
* @returns a reference to this object so that method calls can be chained together.
*/
public StandardsSubscription addStandardsInputEntry(String key, String value) {
if (null == this.standardsInput) {
this.standardsInput = new java.util.HashMap();
}
if (this.standardsInput.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.standardsInput.put(key, value);
return this;
}
/**
* Removes all the entries added into StandardsInput.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StandardsSubscription clearStandardsInputEntries() {
this.standardsInput = null;
return this;
}
/**
*
* The status of the standards subscription.
*
*
* @param standardsStatus
* The status of the standards subscription.
* @see StandardsStatus
*/
public void setStandardsStatus(String standardsStatus) {
this.standardsStatus = standardsStatus;
}
/**
*
* The status of the standards subscription.
*
*
* @return The status of the standards subscription.
* @see StandardsStatus
*/
public String getStandardsStatus() {
return this.standardsStatus;
}
/**
*
* The status of the standards subscription.
*
*
* @param standardsStatus
* The status of the standards subscription.
* @return Returns a reference to this object so that method calls can be chained together.
* @see StandardsStatus
*/
public StandardsSubscription withStandardsStatus(String standardsStatus) {
setStandardsStatus(standardsStatus);
return this;
}
/**
*
* The status of the standards subscription.
*
*
* @param standardsStatus
* The status of the standards subscription.
* @return Returns a reference to this object so that method calls can be chained together.
* @see StandardsStatus
*/
public StandardsSubscription withStandardsStatus(StandardsStatus standardsStatus) {
this.standardsStatus = standardsStatus.toString();
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 (getStandardsSubscriptionArn() != null)
sb.append("StandardsSubscriptionArn: ").append(getStandardsSubscriptionArn()).append(",");
if (getStandardsArn() != null)
sb.append("StandardsArn: ").append(getStandardsArn()).append(",");
if (getStandardsInput() != null)
sb.append("StandardsInput: ").append(getStandardsInput()).append(",");
if (getStandardsStatus() != null)
sb.append("StandardsStatus: ").append(getStandardsStatus());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof StandardsSubscription == false)
return false;
StandardsSubscription other = (StandardsSubscription) obj;
if (other.getStandardsSubscriptionArn() == null ^ this.getStandardsSubscriptionArn() == null)
return false;
if (other.getStandardsSubscriptionArn() != null && other.getStandardsSubscriptionArn().equals(this.getStandardsSubscriptionArn()) == false)
return false;
if (other.getStandardsArn() == null ^ this.getStandardsArn() == null)
return false;
if (other.getStandardsArn() != null && other.getStandardsArn().equals(this.getStandardsArn()) == false)
return false;
if (other.getStandardsInput() == null ^ this.getStandardsInput() == null)
return false;
if (other.getStandardsInput() != null && other.getStandardsInput().equals(this.getStandardsInput()) == false)
return false;
if (other.getStandardsStatus() == null ^ this.getStandardsStatus() == null)
return false;
if (other.getStandardsStatus() != null && other.getStandardsStatus().equals(this.getStandardsStatus()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getStandardsSubscriptionArn() == null) ? 0 : getStandardsSubscriptionArn().hashCode());
hashCode = prime * hashCode + ((getStandardsArn() == null) ? 0 : getStandardsArn().hashCode());
hashCode = prime * hashCode + ((getStandardsInput() == null) ? 0 : getStandardsInput().hashCode());
hashCode = prime * hashCode + ((getStandardsStatus() == null) ? 0 : getStandardsStatus().hashCode());
return hashCode;
}
@Override
public StandardsSubscription clone() {
try {
return (StandardsSubscription) 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.securityhub.model.transform.StandardsSubscriptionMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}