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

com.amazonaws.services.iot.model.CreateSecurityProfileRequest 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;

import com.amazonaws.AmazonWebServiceRequest;

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

    /**
     * 

* The name you are giving to the security profile. *

*/ private String securityProfileName; /** *

* A 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; /** *

* Specifies the destinations to which alerts are sent. (Alerts are always sent to the console.) Alerts are * generated when a device (thing) violates a behavior. *

*/ 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 * profile's behaviors, but it is also retained for any metric specified here. *

*

* Note: This API field is deprecated. Please use * CreateSecurityProfileRequest$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; /** *

* Metadata that can be used to manage the security profile. *

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

* The name you are giving to the security profile. *

* * @param securityProfileName * The name you are giving to the security profile. */ public void setSecurityProfileName(String securityProfileName) { this.securityProfileName = securityProfileName; } /** *

* The name you are giving to the security profile. *

* * @return The name you are giving to the security profile. */ public String getSecurityProfileName() { return this.securityProfileName; } /** *

* The name you are giving to the security profile. *

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

* A description of the security profile. *

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

* A description of the security profile. *

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

* A description of the security profile. *

* * @param securityProfileDescription * A description of the security profile. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateSecurityProfileRequest 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 CreateSecurityProfileRequest 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 CreateSecurityProfileRequest withBehaviors(java.util.Collection behaviors) { setBehaviors(behaviors); return this; } /** *

* Specifies the destinations to which alerts are sent. (Alerts are always sent to the console.) Alerts are * generated when a device (thing) violates a behavior. *

* * @return Specifies the destinations to which alerts are sent. (Alerts are always sent to the console.) Alerts are * generated when a device (thing) violates a behavior. */ public java.util.Map getAlertTargets() { return alertTargets; } /** *

* Specifies the destinations to which alerts are sent. (Alerts are always sent to the console.) Alerts are * generated when a device (thing) violates a behavior. *

* * @param alertTargets * Specifies the destinations to which alerts are sent. (Alerts are always sent to the console.) Alerts are * generated when a device (thing) violates a behavior. */ public void setAlertTargets(java.util.Map alertTargets) { this.alertTargets = alertTargets; } /** *

* Specifies the destinations to which alerts are sent. (Alerts are always sent to the console.) Alerts are * generated when a device (thing) violates a behavior. *

* * @param alertTargets * Specifies the destinations to which alerts are sent. (Alerts are always sent to the console.) Alerts are * generated when a device (thing) violates a behavior. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateSecurityProfileRequest withAlertTargets(java.util.Map alertTargets) { setAlertTargets(alertTargets); return this; } /** * Add a single AlertTargets entry * * @see CreateSecurityProfileRequest#withAlertTargets * @returns a reference to this object so that method calls can be chained together. */ public CreateSecurityProfileRequest 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 CreateSecurityProfileRequest 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 * profile's behaviors, but it is also retained for any metric specified here. *

*

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

* * @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.

*

* Note: This API field is deprecated. Please use * CreateSecurityProfileRequest$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 * profile's behaviors, but it is also retained for any metric specified here. *

*

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

* * @param 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.

*

* Note: This API field is deprecated. Please use * CreateSecurityProfileRequest$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 * profile's behaviors, but it is also retained for any metric specified here. *

*

* Note: This API field is deprecated. Please use * CreateSecurityProfileRequest$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 * profile's behaviors, but it is also retained for any metric specified here.

*

* Note: This API field is deprecated. Please use * CreateSecurityProfileRequest$additionalMetricsToRetainV2 instead. * @return Returns a reference to this object so that method calls can be chained together. */ @Deprecated public CreateSecurityProfileRequest 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 * profile's behaviors, but it is also retained for any metric specified here. *

*

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

* * @param 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.

*

* Note: This API field is deprecated. Please use * CreateSecurityProfileRequest$additionalMetricsToRetainV2 instead. * @return Returns a reference to this object so that method calls can be chained together. */ @Deprecated public CreateSecurityProfileRequest 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 CreateSecurityProfileRequest 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 CreateSecurityProfileRequest withAdditionalMetricsToRetainV2(java.util.Collection additionalMetricsToRetainV2) { setAdditionalMetricsToRetainV2(additionalMetricsToRetainV2); return this; } /** *

* Metadata that can be used to manage the security profile. *

* * @return Metadata that can be used to manage the security profile. */ public java.util.List getTags() { return tags; } /** *

* Metadata that can be used to manage the security profile. *

* * @param tags * Metadata that can be used to manage the security profile. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new java.util.ArrayList(tags); } /** *

* Metadata that can be used to manage the security profile. *

*

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

* * @param tags * Metadata that can be used to manage the security profile. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateSecurityProfileRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* Metadata that can be used to manage the security profile. *

* * @param tags * Metadata that can be used to manage the security profile. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateSecurityProfileRequest withTags(java.util.Collection tags) { setTags(tags); 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 (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 (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateSecurityProfileRequest == false) return false; CreateSecurityProfileRequest other = (CreateSecurityProfileRequest) obj; if (other.getSecurityProfileName() == null ^ this.getSecurityProfileName() == null) return false; if (other.getSecurityProfileName() != null && other.getSecurityProfileName().equals(this.getSecurityProfileName()) == 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.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == 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 + ((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 + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public CreateSecurityProfileRequest clone() { return (CreateSecurityProfileRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy