com.amazonaws.services.kinesis.model.DisableEnhancedMonitoringResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-kinesis Show documentation
/*
* 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.kinesis.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* Represents the output for EnableEnhancedMonitoring and DisableEnhancedMonitoring.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DisableEnhancedMonitoringResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The name of the Kinesis data stream.
*
*/
private String streamName;
/**
*
* Represents the current state of the metrics that are in the enhanced state before the operation.
*
*/
private com.amazonaws.internal.SdkInternalList currentShardLevelMetrics;
/**
*
* Represents the list of all the metrics that would be in the enhanced state after the operation.
*
*/
private com.amazonaws.internal.SdkInternalList desiredShardLevelMetrics;
/**
*
* The ARN of the stream.
*
*/
private String streamARN;
/**
*
* The name of the Kinesis data stream.
*
*
* @param streamName
* The name of the Kinesis data stream.
*/
public void setStreamName(String streamName) {
this.streamName = streamName;
}
/**
*
* The name of the Kinesis data stream.
*
*
* @return The name of the Kinesis data stream.
*/
public String getStreamName() {
return this.streamName;
}
/**
*
* The name of the Kinesis data stream.
*
*
* @param streamName
* The name of the Kinesis data stream.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DisableEnhancedMonitoringResult withStreamName(String streamName) {
setStreamName(streamName);
return this;
}
/**
*
* Represents the current state of the metrics that are in the enhanced state before the operation.
*
*
* @return Represents the current state of the metrics that are in the enhanced state before the operation.
* @see MetricsName
*/
public java.util.List getCurrentShardLevelMetrics() {
if (currentShardLevelMetrics == null) {
currentShardLevelMetrics = new com.amazonaws.internal.SdkInternalList();
}
return currentShardLevelMetrics;
}
/**
*
* Represents the current state of the metrics that are in the enhanced state before the operation.
*
*
* @param currentShardLevelMetrics
* Represents the current state of the metrics that are in the enhanced state before the operation.
* @see MetricsName
*/
public void setCurrentShardLevelMetrics(java.util.Collection currentShardLevelMetrics) {
if (currentShardLevelMetrics == null) {
this.currentShardLevelMetrics = null;
return;
}
this.currentShardLevelMetrics = new com.amazonaws.internal.SdkInternalList(currentShardLevelMetrics);
}
/**
*
* Represents the current state of the metrics that are in the enhanced state before the operation.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setCurrentShardLevelMetrics(java.util.Collection)} or
* {@link #withCurrentShardLevelMetrics(java.util.Collection)} if you want to override the existing values.
*
*
* @param currentShardLevelMetrics
* Represents the current state of the metrics that are in the enhanced state before the operation.
* @return Returns a reference to this object so that method calls can be chained together.
* @see MetricsName
*/
public DisableEnhancedMonitoringResult withCurrentShardLevelMetrics(String... currentShardLevelMetrics) {
if (this.currentShardLevelMetrics == null) {
setCurrentShardLevelMetrics(new com.amazonaws.internal.SdkInternalList(currentShardLevelMetrics.length));
}
for (String ele : currentShardLevelMetrics) {
this.currentShardLevelMetrics.add(ele);
}
return this;
}
/**
*
* Represents the current state of the metrics that are in the enhanced state before the operation.
*
*
* @param currentShardLevelMetrics
* Represents the current state of the metrics that are in the enhanced state before the operation.
* @return Returns a reference to this object so that method calls can be chained together.
* @see MetricsName
*/
public DisableEnhancedMonitoringResult withCurrentShardLevelMetrics(java.util.Collection currentShardLevelMetrics) {
setCurrentShardLevelMetrics(currentShardLevelMetrics);
return this;
}
/**
*
* Represents the current state of the metrics that are in the enhanced state before the operation.
*
*
* @param currentShardLevelMetrics
* Represents the current state of the metrics that are in the enhanced state before the operation.
* @return Returns a reference to this object so that method calls can be chained together.
* @see MetricsName
*/
public DisableEnhancedMonitoringResult withCurrentShardLevelMetrics(MetricsName... currentShardLevelMetrics) {
com.amazonaws.internal.SdkInternalList currentShardLevelMetricsCopy = new com.amazonaws.internal.SdkInternalList(
currentShardLevelMetrics.length);
for (MetricsName value : currentShardLevelMetrics) {
currentShardLevelMetricsCopy.add(value.toString());
}
if (getCurrentShardLevelMetrics() == null) {
setCurrentShardLevelMetrics(currentShardLevelMetricsCopy);
} else {
getCurrentShardLevelMetrics().addAll(currentShardLevelMetricsCopy);
}
return this;
}
/**
*
* Represents the list of all the metrics that would be in the enhanced state after the operation.
*
*
* @return Represents the list of all the metrics that would be in the enhanced state after the operation.
* @see MetricsName
*/
public java.util.List getDesiredShardLevelMetrics() {
if (desiredShardLevelMetrics == null) {
desiredShardLevelMetrics = new com.amazonaws.internal.SdkInternalList();
}
return desiredShardLevelMetrics;
}
/**
*
* Represents the list of all the metrics that would be in the enhanced state after the operation.
*
*
* @param desiredShardLevelMetrics
* Represents the list of all the metrics that would be in the enhanced state after the operation.
* @see MetricsName
*/
public void setDesiredShardLevelMetrics(java.util.Collection desiredShardLevelMetrics) {
if (desiredShardLevelMetrics == null) {
this.desiredShardLevelMetrics = null;
return;
}
this.desiredShardLevelMetrics = new com.amazonaws.internal.SdkInternalList(desiredShardLevelMetrics);
}
/**
*
* Represents the list of all the metrics that would be in the enhanced state after the operation.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setDesiredShardLevelMetrics(java.util.Collection)} or
* {@link #withDesiredShardLevelMetrics(java.util.Collection)} if you want to override the existing values.
*
*
* @param desiredShardLevelMetrics
* Represents the list of all the metrics that would be in the enhanced state after the operation.
* @return Returns a reference to this object so that method calls can be chained together.
* @see MetricsName
*/
public DisableEnhancedMonitoringResult withDesiredShardLevelMetrics(String... desiredShardLevelMetrics) {
if (this.desiredShardLevelMetrics == null) {
setDesiredShardLevelMetrics(new com.amazonaws.internal.SdkInternalList(desiredShardLevelMetrics.length));
}
for (String ele : desiredShardLevelMetrics) {
this.desiredShardLevelMetrics.add(ele);
}
return this;
}
/**
*
* Represents the list of all the metrics that would be in the enhanced state after the operation.
*
*
* @param desiredShardLevelMetrics
* Represents the list of all the metrics that would be in the enhanced state after the operation.
* @return Returns a reference to this object so that method calls can be chained together.
* @see MetricsName
*/
public DisableEnhancedMonitoringResult withDesiredShardLevelMetrics(java.util.Collection desiredShardLevelMetrics) {
setDesiredShardLevelMetrics(desiredShardLevelMetrics);
return this;
}
/**
*
* Represents the list of all the metrics that would be in the enhanced state after the operation.
*
*
* @param desiredShardLevelMetrics
* Represents the list of all the metrics that would be in the enhanced state after the operation.
* @return Returns a reference to this object so that method calls can be chained together.
* @see MetricsName
*/
public DisableEnhancedMonitoringResult withDesiredShardLevelMetrics(MetricsName... desiredShardLevelMetrics) {
com.amazonaws.internal.SdkInternalList desiredShardLevelMetricsCopy = new com.amazonaws.internal.SdkInternalList(
desiredShardLevelMetrics.length);
for (MetricsName value : desiredShardLevelMetrics) {
desiredShardLevelMetricsCopy.add(value.toString());
}
if (getDesiredShardLevelMetrics() == null) {
setDesiredShardLevelMetrics(desiredShardLevelMetricsCopy);
} else {
getDesiredShardLevelMetrics().addAll(desiredShardLevelMetricsCopy);
}
return this;
}
/**
*
* The ARN of the stream.
*
*
* @param streamARN
* The ARN of the stream.
*/
public void setStreamARN(String streamARN) {
this.streamARN = streamARN;
}
/**
*
* The ARN of the stream.
*
*
* @return The ARN of the stream.
*/
public String getStreamARN() {
return this.streamARN;
}
/**
*
* The ARN of the stream.
*
*
* @param streamARN
* The ARN of the stream.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DisableEnhancedMonitoringResult withStreamARN(String streamARN) {
setStreamARN(streamARN);
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 (getStreamName() != null)
sb.append("StreamName: ").append(getStreamName()).append(",");
if (getCurrentShardLevelMetrics() != null)
sb.append("CurrentShardLevelMetrics: ").append(getCurrentShardLevelMetrics()).append(",");
if (getDesiredShardLevelMetrics() != null)
sb.append("DesiredShardLevelMetrics: ").append(getDesiredShardLevelMetrics()).append(",");
if (getStreamARN() != null)
sb.append("StreamARN: ").append(getStreamARN());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DisableEnhancedMonitoringResult == false)
return false;
DisableEnhancedMonitoringResult other = (DisableEnhancedMonitoringResult) obj;
if (other.getStreamName() == null ^ this.getStreamName() == null)
return false;
if (other.getStreamName() != null && other.getStreamName().equals(this.getStreamName()) == false)
return false;
if (other.getCurrentShardLevelMetrics() == null ^ this.getCurrentShardLevelMetrics() == null)
return false;
if (other.getCurrentShardLevelMetrics() != null && other.getCurrentShardLevelMetrics().equals(this.getCurrentShardLevelMetrics()) == false)
return false;
if (other.getDesiredShardLevelMetrics() == null ^ this.getDesiredShardLevelMetrics() == null)
return false;
if (other.getDesiredShardLevelMetrics() != null && other.getDesiredShardLevelMetrics().equals(this.getDesiredShardLevelMetrics()) == false)
return false;
if (other.getStreamARN() == null ^ this.getStreamARN() == null)
return false;
if (other.getStreamARN() != null && other.getStreamARN().equals(this.getStreamARN()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getStreamName() == null) ? 0 : getStreamName().hashCode());
hashCode = prime * hashCode + ((getCurrentShardLevelMetrics() == null) ? 0 : getCurrentShardLevelMetrics().hashCode());
hashCode = prime * hashCode + ((getDesiredShardLevelMetrics() == null) ? 0 : getDesiredShardLevelMetrics().hashCode());
hashCode = prime * hashCode + ((getStreamARN() == null) ? 0 : getStreamARN().hashCode());
return hashCode;
}
@Override
public DisableEnhancedMonitoringResult clone() {
try {
return (DisableEnhancedMonitoringResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}