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

com.amazonaws.services.cloudwatch.model.PutInsightRuleRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon CloudWatch module holds the client classes that are used for communicating with Amazon CloudWatch Service

There is a newer version: 1.12.778
Show newest version
/*
 * 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.cloudwatch.model;

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

import com.amazonaws.AmazonWebServiceRequest;

/**
 * 
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class PutInsightRuleRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* A unique name for the rule. *

*/ private String ruleName; /** *

* The state of the rule. Valid values are ENABLED and DISABLED. *

*/ private String ruleState; /** *

* The definition of the rule, as a JSON object. For details on the valid syntax, see Contributor Insights Rule Syntax. *

*/ private String ruleDefinition; /** *

* A list of key-value pairs to associate with the Contributor Insights rule. You can associate as many as 50 tags * with a rule. *

*

* Tags can help you organize and categorize your resources. You can also use them to scope user permissions, by * granting a user permission to access or change only the resources that have certain tag values. *

*

* To be able to associate tags with a rule, you must have the cloudwatch:TagResource permission in * addition to the cloudwatch:PutInsightRule permission. *

*

* If you are using this operation to update an existing Contributor Insights rule, any tags you specify in this * parameter are ignored. To change the tags of an existing rule, use TagResource. *

*/ private com.amazonaws.internal.SdkInternalList tags; /** *

* A unique name for the rule. *

* * @param ruleName * A unique name for the rule. */ public void setRuleName(String ruleName) { this.ruleName = ruleName; } /** *

* A unique name for the rule. *

* * @return A unique name for the rule. */ public String getRuleName() { return this.ruleName; } /** *

* A unique name for the rule. *

* * @param ruleName * A unique name for the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public PutInsightRuleRequest withRuleName(String ruleName) { setRuleName(ruleName); return this; } /** *

* The state of the rule. Valid values are ENABLED and DISABLED. *

* * @param ruleState * The state of the rule. Valid values are ENABLED and DISABLED. */ public void setRuleState(String ruleState) { this.ruleState = ruleState; } /** *

* The state of the rule. Valid values are ENABLED and DISABLED. *

* * @return The state of the rule. Valid values are ENABLED and DISABLED. */ public String getRuleState() { return this.ruleState; } /** *

* The state of the rule. Valid values are ENABLED and DISABLED. *

* * @param ruleState * The state of the rule. Valid values are ENABLED and DISABLED. * @return Returns a reference to this object so that method calls can be chained together. */ public PutInsightRuleRequest withRuleState(String ruleState) { setRuleState(ruleState); return this; } /** *

* The definition of the rule, as a JSON object. For details on the valid syntax, see Contributor Insights Rule Syntax. *

* * @param ruleDefinition * The definition of the rule, as a JSON object. For details on the valid syntax, see Contributor Insights Rule Syntax. */ public void setRuleDefinition(String ruleDefinition) { this.ruleDefinition = ruleDefinition; } /** *

* The definition of the rule, as a JSON object. For details on the valid syntax, see Contributor Insights Rule Syntax. *

* * @return The definition of the rule, as a JSON object. For details on the valid syntax, see Contributor Insights Rule Syntax. */ public String getRuleDefinition() { return this.ruleDefinition; } /** *

* The definition of the rule, as a JSON object. For details on the valid syntax, see Contributor Insights Rule Syntax. *

* * @param ruleDefinition * The definition of the rule, as a JSON object. For details on the valid syntax, see Contributor Insights Rule Syntax. * @return Returns a reference to this object so that method calls can be chained together. */ public PutInsightRuleRequest withRuleDefinition(String ruleDefinition) { setRuleDefinition(ruleDefinition); return this; } /** *

* A list of key-value pairs to associate with the Contributor Insights rule. You can associate as many as 50 tags * with a rule. *

*

* Tags can help you organize and categorize your resources. You can also use them to scope user permissions, by * granting a user permission to access or change only the resources that have certain tag values. *

*

* To be able to associate tags with a rule, you must have the cloudwatch:TagResource permission in * addition to the cloudwatch:PutInsightRule permission. *

*

* If you are using this operation to update an existing Contributor Insights rule, any tags you specify in this * parameter are ignored. To change the tags of an existing rule, use TagResource. *

* * @return A list of key-value pairs to associate with the Contributor Insights rule. You can associate as many as * 50 tags with a rule.

*

* Tags can help you organize and categorize your resources. You can also use them to scope user * permissions, by granting a user permission to access or change only the resources that have certain tag * values. *

*

* To be able to associate tags with a rule, you must have the cloudwatch:TagResource * permission in addition to the cloudwatch:PutInsightRule permission. *

*

* If you are using this operation to update an existing Contributor Insights rule, any tags you specify in * this parameter are ignored. To change the tags of an existing rule, use TagResource. */ public java.util.List getTags() { if (tags == null) { tags = new com.amazonaws.internal.SdkInternalList(); } return tags; } /** *

* A list of key-value pairs to associate with the Contributor Insights rule. You can associate as many as 50 tags * with a rule. *

*

* Tags can help you organize and categorize your resources. You can also use them to scope user permissions, by * granting a user permission to access or change only the resources that have certain tag values. *

*

* To be able to associate tags with a rule, you must have the cloudwatch:TagResource permission in * addition to the cloudwatch:PutInsightRule permission. *

*

* If you are using this operation to update an existing Contributor Insights rule, any tags you specify in this * parameter are ignored. To change the tags of an existing rule, use TagResource. *

* * @param tags * A list of key-value pairs to associate with the Contributor Insights rule. You can associate as many as 50 * tags with a rule.

*

* Tags can help you organize and categorize your resources. You can also use them to scope user permissions, * by granting a user permission to access or change only the resources that have certain tag values. *

*

* To be able to associate tags with a rule, you must have the cloudwatch:TagResource permission * in addition to the cloudwatch:PutInsightRule permission. *

*

* If you are using this operation to update an existing Contributor Insights rule, any tags you specify in * this parameter are ignored. To change the tags of an existing rule, use TagResource. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new com.amazonaws.internal.SdkInternalList(tags); } /** *

* A list of key-value pairs to associate with the Contributor Insights rule. You can associate as many as 50 tags * with a rule. *

*

* Tags can help you organize and categorize your resources. You can also use them to scope user permissions, by * granting a user permission to access or change only the resources that have certain tag values. *

*

* To be able to associate tags with a rule, you must have the cloudwatch:TagResource permission in * addition to the cloudwatch:PutInsightRule permission. *

*

* If you are using this operation to update an existing Contributor Insights rule, any tags you specify in this * parameter are ignored. To change the tags of an existing rule, use TagResource. *

*

* 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 * A list of key-value pairs to associate with the Contributor Insights rule. You can associate as many as 50 * tags with a rule.

*

* Tags can help you organize and categorize your resources. You can also use them to scope user permissions, * by granting a user permission to access or change only the resources that have certain tag values. *

*

* To be able to associate tags with a rule, you must have the cloudwatch:TagResource permission * in addition to the cloudwatch:PutInsightRule permission. *

*

* If you are using this operation to update an existing Contributor Insights rule, any tags you specify in * this parameter are ignored. To change the tags of an existing rule, use TagResource. * @return Returns a reference to this object so that method calls can be chained together. */ public PutInsightRuleRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* A list of key-value pairs to associate with the Contributor Insights rule. You can associate as many as 50 tags * with a rule. *

*

* Tags can help you organize and categorize your resources. You can also use them to scope user permissions, by * granting a user permission to access or change only the resources that have certain tag values. *

*

* To be able to associate tags with a rule, you must have the cloudwatch:TagResource permission in * addition to the cloudwatch:PutInsightRule permission. *

*

* If you are using this operation to update an existing Contributor Insights rule, any tags you specify in this * parameter are ignored. To change the tags of an existing rule, use TagResource. *

* * @param tags * A list of key-value pairs to associate with the Contributor Insights rule. You can associate as many as 50 * tags with a rule.

*

* Tags can help you organize and categorize your resources. You can also use them to scope user permissions, * by granting a user permission to access or change only the resources that have certain tag values. *

*

* To be able to associate tags with a rule, you must have the cloudwatch:TagResource permission * in addition to the cloudwatch:PutInsightRule permission. *

*

* If you are using this operation to update an existing Contributor Insights rule, any tags you specify in * this parameter are ignored. To change the tags of an existing rule, use TagResource. * @return Returns a reference to this object so that method calls can be chained together. */ public PutInsightRuleRequest 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 (getRuleName() != null) sb.append("RuleName: ").append(getRuleName()).append(","); if (getRuleState() != null) sb.append("RuleState: ").append(getRuleState()).append(","); if (getRuleDefinition() != null) sb.append("RuleDefinition: ").append(getRuleDefinition()).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 PutInsightRuleRequest == false) return false; PutInsightRuleRequest other = (PutInsightRuleRequest) obj; if (other.getRuleName() == null ^ this.getRuleName() == null) return false; if (other.getRuleName() != null && other.getRuleName().equals(this.getRuleName()) == false) return false; if (other.getRuleState() == null ^ this.getRuleState() == null) return false; if (other.getRuleState() != null && other.getRuleState().equals(this.getRuleState()) == false) return false; if (other.getRuleDefinition() == null ^ this.getRuleDefinition() == null) return false; if (other.getRuleDefinition() != null && other.getRuleDefinition().equals(this.getRuleDefinition()) == 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 + ((getRuleName() == null) ? 0 : getRuleName().hashCode()); hashCode = prime * hashCode + ((getRuleState() == null) ? 0 : getRuleState().hashCode()); hashCode = prime * hashCode + ((getRuleDefinition() == null) ? 0 : getRuleDefinition().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public PutInsightRuleRequest clone() { return (PutInsightRuleRequest) super.clone(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy