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

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

Go to download

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

There is a newer version: 1.12.782
Show newest version
/*
 * Copyright 2011-2016 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;

/**
 * 

* Describes an action that captures a CloudWatch metric. *

*/ public class CloudwatchMetricAction implements Serializable, Cloneable { /** *

* The IAM role that allows access to the CloudWatch metric. *

*/ private String roleArn; /** *

* The CloudWatch metric namespace name. *

*/ private String metricNamespace; /** *

* The CloudWatch metric name. *

*/ private String metricName; /** *

* The CloudWatch metric value. *

*/ private String metricValue; /** *

* The metric * unit supported by CloudWatch. *

*/ private String metricUnit; /** *

* An optional Unix * timestamp. *

*/ private String metricTimestamp; /** *

* The IAM role that allows access to the CloudWatch metric. *

* * @param roleArn * The IAM role that allows access to the CloudWatch metric. */ public void setRoleArn(String roleArn) { this.roleArn = roleArn; } /** *

* The IAM role that allows access to the CloudWatch metric. *

* * @return The IAM role that allows access to the CloudWatch metric. */ public String getRoleArn() { return this.roleArn; } /** *

* The IAM role that allows access to the CloudWatch metric. *

* * @param roleArn * The IAM role that allows access to the CloudWatch metric. * @return Returns a reference to this object so that method calls can be chained together. */ public CloudwatchMetricAction withRoleArn(String roleArn) { setRoleArn(roleArn); return this; } /** *

* The CloudWatch metric namespace name. *

* * @param metricNamespace * The CloudWatch metric namespace name. */ public void setMetricNamespace(String metricNamespace) { this.metricNamespace = metricNamespace; } /** *

* The CloudWatch metric namespace name. *

* * @return The CloudWatch metric namespace name. */ public String getMetricNamespace() { return this.metricNamespace; } /** *

* The CloudWatch metric namespace name. *

* * @param metricNamespace * The CloudWatch metric namespace name. * @return Returns a reference to this object so that method calls can be chained together. */ public CloudwatchMetricAction withMetricNamespace(String metricNamespace) { setMetricNamespace(metricNamespace); return this; } /** *

* The CloudWatch metric name. *

* * @param metricName * The CloudWatch metric name. */ public void setMetricName(String metricName) { this.metricName = metricName; } /** *

* The CloudWatch metric name. *

* * @return The CloudWatch metric name. */ public String getMetricName() { return this.metricName; } /** *

* The CloudWatch metric name. *

* * @param metricName * The CloudWatch metric name. * @return Returns a reference to this object so that method calls can be chained together. */ public CloudwatchMetricAction withMetricName(String metricName) { setMetricName(metricName); return this; } /** *

* The CloudWatch metric value. *

* * @param metricValue * The CloudWatch metric value. */ public void setMetricValue(String metricValue) { this.metricValue = metricValue; } /** *

* The CloudWatch metric value. *

* * @return The CloudWatch metric value. */ public String getMetricValue() { return this.metricValue; } /** *

* The CloudWatch metric value. *

* * @param metricValue * The CloudWatch metric value. * @return Returns a reference to this object so that method calls can be chained together. */ public CloudwatchMetricAction withMetricValue(String metricValue) { setMetricValue(metricValue); return this; } /** *

* The metric * unit supported by CloudWatch. *

* * @param metricUnit * The metric unit supported by CloudWatch. */ public void setMetricUnit(String metricUnit) { this.metricUnit = metricUnit; } /** *

* The metric * unit supported by CloudWatch. *

* * @return The metric unit supported by CloudWatch. */ public String getMetricUnit() { return this.metricUnit; } /** *

* The metric * unit supported by CloudWatch. *

* * @param metricUnit * The metric unit supported by CloudWatch. * @return Returns a reference to this object so that method calls can be chained together. */ public CloudwatchMetricAction withMetricUnit(String metricUnit) { setMetricUnit(metricUnit); return this; } /** *

* An optional Unix * timestamp. *

* * @param metricTimestamp * An optional Unix timestamp. */ public void setMetricTimestamp(String metricTimestamp) { this.metricTimestamp = metricTimestamp; } /** *

* An optional Unix * timestamp. *

* * @return An optional Unix timestamp. */ public String getMetricTimestamp() { return this.metricTimestamp; } /** *

* An optional Unix * timestamp. *

* * @param metricTimestamp * An optional Unix timestamp. * @return Returns a reference to this object so that method calls can be chained together. */ public CloudwatchMetricAction withMetricTimestamp(String metricTimestamp) { setMetricTimestamp(metricTimestamp); return this; } /** * Returns a string representation of this object; useful for testing and debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getRoleArn() != null) sb.append("RoleArn: " + getRoleArn() + ","); if (getMetricNamespace() != null) sb.append("MetricNamespace: " + getMetricNamespace() + ","); if (getMetricName() != null) sb.append("MetricName: " + getMetricName() + ","); if (getMetricValue() != null) sb.append("MetricValue: " + getMetricValue() + ","); if (getMetricUnit() != null) sb.append("MetricUnit: " + getMetricUnit() + ","); if (getMetricTimestamp() != null) sb.append("MetricTimestamp: " + getMetricTimestamp()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CloudwatchMetricAction == false) return false; CloudwatchMetricAction other = (CloudwatchMetricAction) obj; if (other.getRoleArn() == null ^ this.getRoleArn() == null) return false; if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false) return false; if (other.getMetricNamespace() == null ^ this.getMetricNamespace() == null) return false; if (other.getMetricNamespace() != null && other.getMetricNamespace().equals(this.getMetricNamespace()) == false) return false; if (other.getMetricName() == null ^ this.getMetricName() == null) return false; if (other.getMetricName() != null && other.getMetricName().equals(this.getMetricName()) == false) return false; if (other.getMetricValue() == null ^ this.getMetricValue() == null) return false; if (other.getMetricValue() != null && other.getMetricValue().equals(this.getMetricValue()) == false) return false; if (other.getMetricUnit() == null ^ this.getMetricUnit() == null) return false; if (other.getMetricUnit() != null && other.getMetricUnit().equals(this.getMetricUnit()) == false) return false; if (other.getMetricTimestamp() == null ^ this.getMetricTimestamp() == null) return false; if (other.getMetricTimestamp() != null && other.getMetricTimestamp().equals(this.getMetricTimestamp()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); hashCode = prime * hashCode + ((getMetricNamespace() == null) ? 0 : getMetricNamespace().hashCode()); hashCode = prime * hashCode + ((getMetricName() == null) ? 0 : getMetricName().hashCode()); hashCode = prime * hashCode + ((getMetricValue() == null) ? 0 : getMetricValue().hashCode()); hashCode = prime * hashCode + ((getMetricUnit() == null) ? 0 : getMetricUnit().hashCode()); hashCode = prime * hashCode + ((getMetricTimestamp() == null) ? 0 : getMetricTimestamp().hashCode()); return hashCode; } @Override public CloudwatchMetricAction clone() { try { return (CloudwatchMetricAction) 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