All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.iot.model.UpdateSecurityProfileResult Maven / Gradle / Ivy

/*
 * 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.iot.model;

import java.io.Serializable;
import javax.annotation.Generated;

@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UpdateSecurityProfileResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {

    /**
     * 

* The name of the security profile that was updated. *

*/ private String securityProfileName; /** *

* The ARN of the security profile that was updated. *

*/ private String securityProfileArn; /** *

* The description of the security profile. *

*/ private String securityProfileDescription; /** *

* Specifies the behaviors that, when violated by a device (thing), cause an alert. *

*/ private java.util.List behaviors; /** *

* Where the alerts are sent. (Alerts are always sent to the console.) *

*/ private java.util.Map alertTargets; /** *

* A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the * security profile's behaviors, but it is also retained for any metric specified here. *

*

* Note: This API field is deprecated. Please use * UpdateSecurityProfileResponse$additionalMetricsToRetainV2 instead. *

*/ @Deprecated private java.util.List additionalMetricsToRetain; /** *

* A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the * profile's behaviors, but it is also retained for any metric specified here. *

*/ private java.util.List additionalMetricsToRetainV2; /** *

* The updated version of the security profile. *

*/ private Long version; /** *

* The time the security profile was created. *

*/ private java.util.Date creationDate; /** *

* The time the security profile was last modified. *

*/ private java.util.Date lastModifiedDate; /** *

* The name of the security profile that was updated. *

* * @param securityProfileName * The name of the security profile that was updated. */ public void setSecurityProfileName(String securityProfileName) { this.securityProfileName = securityProfileName; } /** *

* The name of the security profile that was updated. *

* * @return The name of the security profile that was updated. */ public String getSecurityProfileName() { return this.securityProfileName; } /** *

* The name of the security profile that was updated. *

* * @param securityProfileName * The name of the security profile that was updated. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateSecurityProfileResult withSecurityProfileName(String securityProfileName) { setSecurityProfileName(securityProfileName); return this; } /** *

* The ARN of the security profile that was updated. *

* * @param securityProfileArn * The ARN of the security profile that was updated. */ public void setSecurityProfileArn(String securityProfileArn) { this.securityProfileArn = securityProfileArn; } /** *

* The ARN of the security profile that was updated. *

* * @return The ARN of the security profile that was updated. */ public String getSecurityProfileArn() { return this.securityProfileArn; } /** *

* The ARN of the security profile that was updated. *

* * @param securityProfileArn * The ARN of the security profile that was updated. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateSecurityProfileResult withSecurityProfileArn(String securityProfileArn) { setSecurityProfileArn(securityProfileArn); return this; } /** *

* The description of the security profile. *

* * @param securityProfileDescription * The description of the security profile. */ public void setSecurityProfileDescription(String securityProfileDescription) { this.securityProfileDescription = securityProfileDescription; } /** *

* The description of the security profile. *

* * @return The description of the security profile. */ public String getSecurityProfileDescription() { return this.securityProfileDescription; } /** *

* The description of the security profile. *

* * @param securityProfileDescription * The description of the security profile. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateSecurityProfileResult withSecurityProfileDescription(String securityProfileDescription) { setSecurityProfileDescription(securityProfileDescription); return this; } /** *

* Specifies the behaviors that, when violated by a device (thing), cause an alert. *

* * @return Specifies the behaviors that, when violated by a device (thing), cause an alert. */ public java.util.List getBehaviors() { return behaviors; } /** *

* Specifies the behaviors that, when violated by a device (thing), cause an alert. *

* * @param behaviors * Specifies the behaviors that, when violated by a device (thing), cause an alert. */ public void setBehaviors(java.util.Collection behaviors) { if (behaviors == null) { this.behaviors = null; return; } this.behaviors = new java.util.ArrayList(behaviors); } /** *

* Specifies the behaviors that, when violated by a device (thing), cause an alert. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setBehaviors(java.util.Collection)} or {@link #withBehaviors(java.util.Collection)} if you want to * override the existing values. *

* * @param behaviors * Specifies the behaviors that, when violated by a device (thing), cause an alert. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateSecurityProfileResult withBehaviors(Behavior... behaviors) { if (this.behaviors == null) { setBehaviors(new java.util.ArrayList(behaviors.length)); } for (Behavior ele : behaviors) { this.behaviors.add(ele); } return this; } /** *

* Specifies the behaviors that, when violated by a device (thing), cause an alert. *

* * @param behaviors * Specifies the behaviors that, when violated by a device (thing), cause an alert. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateSecurityProfileResult withBehaviors(java.util.Collection behaviors) { setBehaviors(behaviors); return this; } /** *

* Where the alerts are sent. (Alerts are always sent to the console.) *

* * @return Where the alerts are sent. (Alerts are always sent to the console.) */ public java.util.Map getAlertTargets() { return alertTargets; } /** *

* Where the alerts are sent. (Alerts are always sent to the console.) *

* * @param alertTargets * Where the alerts are sent. (Alerts are always sent to the console.) */ public void setAlertTargets(java.util.Map alertTargets) { this.alertTargets = alertTargets; } /** *

* Where the alerts are sent. (Alerts are always sent to the console.) *

* * @param alertTargets * Where the alerts are sent. (Alerts are always sent to the console.) * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateSecurityProfileResult withAlertTargets(java.util.Map alertTargets) { setAlertTargets(alertTargets); return this; } /** * Add a single AlertTargets entry * * @see UpdateSecurityProfileResult#withAlertTargets * @returns a reference to this object so that method calls can be chained together. */ public UpdateSecurityProfileResult addAlertTargetsEntry(String key, AlertTarget value) { if (null == this.alertTargets) { this.alertTargets = new java.util.HashMap(); } if (this.alertTargets.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.alertTargets.put(key, value); return this; } /** * Removes all the entries added into AlertTargets. * * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateSecurityProfileResult clearAlertTargetsEntries() { this.alertTargets = null; return this; } /** *

* A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the * security profile's behaviors, but it is also retained for any metric specified here. *

*

* Note: This API field is deprecated. Please use * UpdateSecurityProfileResponse$additionalMetricsToRetainV2 instead. *

* * @return A list of metrics whose data is retained (stored). By default, data is retained for any metric used in * the security profile's behaviors, but it is also retained for any metric specified here.

*

* Note: This API field is deprecated. Please use * UpdateSecurityProfileResponse$additionalMetricsToRetainV2 instead. */ @Deprecated public java.util.List getAdditionalMetricsToRetain() { return additionalMetricsToRetain; } /** *

* A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the * security profile's behaviors, but it is also retained for any metric specified here. *

*

* Note: This API field is deprecated. Please use * UpdateSecurityProfileResponse$additionalMetricsToRetainV2 instead. *

* * @param additionalMetricsToRetain * A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the * security profile's behaviors, but it is also retained for any metric specified here.

*

* Note: This API field is deprecated. Please use * UpdateSecurityProfileResponse$additionalMetricsToRetainV2 instead. */ @Deprecated public void setAdditionalMetricsToRetain(java.util.Collection additionalMetricsToRetain) { if (additionalMetricsToRetain == null) { this.additionalMetricsToRetain = null; return; } this.additionalMetricsToRetain = new java.util.ArrayList(additionalMetricsToRetain); } /** *

* A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the * security profile's behaviors, but it is also retained for any metric specified here. *

*

* Note: This API field is deprecated. Please use * UpdateSecurityProfileResponse$additionalMetricsToRetainV2 instead. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setAdditionalMetricsToRetain(java.util.Collection)} or * {@link #withAdditionalMetricsToRetain(java.util.Collection)} if you want to override the existing values. *

* * @param additionalMetricsToRetain * A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the * security profile's behaviors, but it is also retained for any metric specified here.

*

* Note: This API field is deprecated. Please use * UpdateSecurityProfileResponse$additionalMetricsToRetainV2 instead. * @return Returns a reference to this object so that method calls can be chained together. */ @Deprecated public UpdateSecurityProfileResult withAdditionalMetricsToRetain(String... additionalMetricsToRetain) { if (this.additionalMetricsToRetain == null) { setAdditionalMetricsToRetain(new java.util.ArrayList(additionalMetricsToRetain.length)); } for (String ele : additionalMetricsToRetain) { this.additionalMetricsToRetain.add(ele); } return this; } /** *

* A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the * security profile's behaviors, but it is also retained for any metric specified here. *

*

* Note: This API field is deprecated. Please use * UpdateSecurityProfileResponse$additionalMetricsToRetainV2 instead. *

* * @param additionalMetricsToRetain * A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the * security profile's behaviors, but it is also retained for any metric specified here.

*

* Note: This API field is deprecated. Please use * UpdateSecurityProfileResponse$additionalMetricsToRetainV2 instead. * @return Returns a reference to this object so that method calls can be chained together. */ @Deprecated public UpdateSecurityProfileResult withAdditionalMetricsToRetain(java.util.Collection additionalMetricsToRetain) { setAdditionalMetricsToRetain(additionalMetricsToRetain); return this; } /** *

* A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the * profile's behaviors, but it is also retained for any metric specified here. *

* * @return A list of metrics whose data is retained (stored). By default, data is retained for any metric used in * the profile's behaviors, but it is also retained for any metric specified here. */ public java.util.List getAdditionalMetricsToRetainV2() { return additionalMetricsToRetainV2; } /** *

* A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the * profile's behaviors, but it is also retained for any metric specified here. *

* * @param additionalMetricsToRetainV2 * A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the * profile's behaviors, but it is also retained for any metric specified here. */ public void setAdditionalMetricsToRetainV2(java.util.Collection additionalMetricsToRetainV2) { if (additionalMetricsToRetainV2 == null) { this.additionalMetricsToRetainV2 = null; return; } this.additionalMetricsToRetainV2 = new java.util.ArrayList(additionalMetricsToRetainV2); } /** *

* A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the * profile's behaviors, but it is also retained for any metric specified here. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setAdditionalMetricsToRetainV2(java.util.Collection)} or * {@link #withAdditionalMetricsToRetainV2(java.util.Collection)} if you want to override the existing values. *

* * @param additionalMetricsToRetainV2 * A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the * profile's behaviors, but it is also retained for any metric specified here. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateSecurityProfileResult withAdditionalMetricsToRetainV2(MetricToRetain... additionalMetricsToRetainV2) { if (this.additionalMetricsToRetainV2 == null) { setAdditionalMetricsToRetainV2(new java.util.ArrayList(additionalMetricsToRetainV2.length)); } for (MetricToRetain ele : additionalMetricsToRetainV2) { this.additionalMetricsToRetainV2.add(ele); } return this; } /** *

* A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the * profile's behaviors, but it is also retained for any metric specified here. *

* * @param additionalMetricsToRetainV2 * A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the * profile's behaviors, but it is also retained for any metric specified here. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateSecurityProfileResult withAdditionalMetricsToRetainV2(java.util.Collection additionalMetricsToRetainV2) { setAdditionalMetricsToRetainV2(additionalMetricsToRetainV2); return this; } /** *

* The updated version of the security profile. *

* * @param version * The updated version of the security profile. */ public void setVersion(Long version) { this.version = version; } /** *

* The updated version of the security profile. *

* * @return The updated version of the security profile. */ public Long getVersion() { return this.version; } /** *

* The updated version of the security profile. *

* * @param version * The updated version of the security profile. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateSecurityProfileResult withVersion(Long version) { setVersion(version); return this; } /** *

* The time the security profile was created. *

* * @param creationDate * The time the security profile was created. */ public void setCreationDate(java.util.Date creationDate) { this.creationDate = creationDate; } /** *

* The time the security profile was created. *

* * @return The time the security profile was created. */ public java.util.Date getCreationDate() { return this.creationDate; } /** *

* The time the security profile was created. *

* * @param creationDate * The time the security profile was created. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateSecurityProfileResult withCreationDate(java.util.Date creationDate) { setCreationDate(creationDate); return this; } /** *

* The time the security profile was last modified. *

* * @param lastModifiedDate * The time the security profile was last modified. */ public void setLastModifiedDate(java.util.Date lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; } /** *

* The time the security profile was last modified. *

* * @return The time the security profile was last modified. */ public java.util.Date getLastModifiedDate() { return this.lastModifiedDate; } /** *

* The time the security profile was last modified. *

* * @param lastModifiedDate * The time the security profile was last modified. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateSecurityProfileResult withLastModifiedDate(java.util.Date lastModifiedDate) { setLastModifiedDate(lastModifiedDate); 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 (getSecurityProfileName() != null) sb.append("SecurityProfileName: ").append(getSecurityProfileName()).append(","); if (getSecurityProfileArn() != null) sb.append("SecurityProfileArn: ").append(getSecurityProfileArn()).append(","); if (getSecurityProfileDescription() != null) sb.append("SecurityProfileDescription: ").append(getSecurityProfileDescription()).append(","); if (getBehaviors() != null) sb.append("Behaviors: ").append(getBehaviors()).append(","); if (getAlertTargets() != null) sb.append("AlertTargets: ").append(getAlertTargets()).append(","); if (getAdditionalMetricsToRetain() != null) sb.append("AdditionalMetricsToRetain: ").append(getAdditionalMetricsToRetain()).append(","); if (getAdditionalMetricsToRetainV2() != null) sb.append("AdditionalMetricsToRetainV2: ").append(getAdditionalMetricsToRetainV2()).append(","); if (getVersion() != null) sb.append("Version: ").append(getVersion()).append(","); if (getCreationDate() != null) sb.append("CreationDate: ").append(getCreationDate()).append(","); if (getLastModifiedDate() != null) sb.append("LastModifiedDate: ").append(getLastModifiedDate()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateSecurityProfileResult == false) return false; UpdateSecurityProfileResult other = (UpdateSecurityProfileResult) obj; if (other.getSecurityProfileName() == null ^ this.getSecurityProfileName() == null) return false; if (other.getSecurityProfileName() != null && other.getSecurityProfileName().equals(this.getSecurityProfileName()) == false) return false; if (other.getSecurityProfileArn() == null ^ this.getSecurityProfileArn() == null) return false; if (other.getSecurityProfileArn() != null && other.getSecurityProfileArn().equals(this.getSecurityProfileArn()) == false) return false; if (other.getSecurityProfileDescription() == null ^ this.getSecurityProfileDescription() == null) return false; if (other.getSecurityProfileDescription() != null && other.getSecurityProfileDescription().equals(this.getSecurityProfileDescription()) == false) return false; if (other.getBehaviors() == null ^ this.getBehaviors() == null) return false; if (other.getBehaviors() != null && other.getBehaviors().equals(this.getBehaviors()) == false) return false; if (other.getAlertTargets() == null ^ this.getAlertTargets() == null) return false; if (other.getAlertTargets() != null && other.getAlertTargets().equals(this.getAlertTargets()) == false) return false; if (other.getAdditionalMetricsToRetain() == null ^ this.getAdditionalMetricsToRetain() == null) return false; if (other.getAdditionalMetricsToRetain() != null && other.getAdditionalMetricsToRetain().equals(this.getAdditionalMetricsToRetain()) == false) return false; if (other.getAdditionalMetricsToRetainV2() == null ^ this.getAdditionalMetricsToRetainV2() == null) return false; if (other.getAdditionalMetricsToRetainV2() != null && other.getAdditionalMetricsToRetainV2().equals(this.getAdditionalMetricsToRetainV2()) == false) return false; if (other.getVersion() == null ^ this.getVersion() == null) return false; if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == false) return false; if (other.getCreationDate() == null ^ this.getCreationDate() == null) return false; if (other.getCreationDate() != null && other.getCreationDate().equals(this.getCreationDate()) == false) return false; if (other.getLastModifiedDate() == null ^ this.getLastModifiedDate() == null) return false; if (other.getLastModifiedDate() != null && other.getLastModifiedDate().equals(this.getLastModifiedDate()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSecurityProfileName() == null) ? 0 : getSecurityProfileName().hashCode()); hashCode = prime * hashCode + ((getSecurityProfileArn() == null) ? 0 : getSecurityProfileArn().hashCode()); hashCode = prime * hashCode + ((getSecurityProfileDescription() == null) ? 0 : getSecurityProfileDescription().hashCode()); hashCode = prime * hashCode + ((getBehaviors() == null) ? 0 : getBehaviors().hashCode()); hashCode = prime * hashCode + ((getAlertTargets() == null) ? 0 : getAlertTargets().hashCode()); hashCode = prime * hashCode + ((getAdditionalMetricsToRetain() == null) ? 0 : getAdditionalMetricsToRetain().hashCode()); hashCode = prime * hashCode + ((getAdditionalMetricsToRetainV2() == null) ? 0 : getAdditionalMetricsToRetainV2().hashCode()); hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode()); hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode()); hashCode = prime * hashCode + ((getLastModifiedDate() == null) ? 0 : getLastModifiedDate().hashCode()); return hashCode; } @Override public UpdateSecurityProfileResult clone() { try { return (UpdateSecurityProfileResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy