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

com.amazonaws.services.kinesis.model.EnableEnhancedMonitoringResult Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.772
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.kinesis.model;

import java.io.Serializable;

/**
 * 

* Represents the output for EnableEnhancedMonitoring and DisableEnhancedMonitoring. *

*/ public class EnableEnhancedMonitoringResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* The name of the Amazon Kinesis 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 name of the Amazon Kinesis stream. *

* * @param streamName * The name of the Amazon Kinesis stream. */ public void setStreamName(String streamName) { this.streamName = streamName; } /** *

* The name of the Amazon Kinesis stream. *

* * @return The name of the Amazon Kinesis stream. */ public String getStreamName() { return this.streamName; } /** *

* The name of the Amazon Kinesis stream. *

* * @param streamName * The name of the Amazon Kinesis stream. * @return Returns a reference to this object so that method calls can be chained together. */ public EnableEnhancedMonitoringResult 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 EnableEnhancedMonitoringResult 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 EnableEnhancedMonitoringResult 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 EnableEnhancedMonitoringResult 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 EnableEnhancedMonitoringResult 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 EnableEnhancedMonitoringResult 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 EnableEnhancedMonitoringResult 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; } /** * 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 (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()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EnableEnhancedMonitoringResult == false) return false; EnableEnhancedMonitoringResult other = (EnableEnhancedMonitoringResult) 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; 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()); return hashCode; } @Override public EnableEnhancedMonitoringResult clone() { try { return (EnableEnhancedMonitoringResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy