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

com.amazonaws.services.cloudtrail.model.ListInsightsMetricDataResult Maven / Gradle / Ivy

/*
 * 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.cloudtrail.model;

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

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

    /**
     * 

* The Amazon Web Services service to which the request was made, such as iam.amazonaws.com or * s3.amazonaws.com. *

*/ private String eventSource; /** *

* The name of the event, typically the Amazon Web Services API on which unusual levels of activity were recorded. *

*/ private String eventName; /** *

* The type of CloudTrail Insights event, which is either ApiCallRateInsight or * ApiErrorRateInsight. The ApiCallRateInsight Insights type analyzes write-only * management API calls that are aggregated per minute against a baseline API call volume. The * ApiErrorRateInsight Insights type analyzes management API calls that result in error codes. *

*/ private String insightType; /** *

* Only returned if InsightType parameter was set to ApiErrorRateInsight. *

*

* If returning metrics for the ApiErrorRateInsight Insights type, this is the error to retrieve data * for. For example, AccessDenied. *

*/ private String errorCode; /** *

* List of timestamps at intervals corresponding to the specified time period. *

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

* List of values representing the API call rate or error rate at each timestamp. The number of values is equal to * the number of timestamps. *

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

* Only returned if the full results could not be returned in a single query. You can set the NextToken * parameter in the next request to this value to continue retrieval. *

*/ private String nextToken; /** *

* The Amazon Web Services service to which the request was made, such as iam.amazonaws.com or * s3.amazonaws.com. *

* * @param eventSource * The Amazon Web Services service to which the request was made, such as iam.amazonaws.com or * s3.amazonaws.com. */ public void setEventSource(String eventSource) { this.eventSource = eventSource; } /** *

* The Amazon Web Services service to which the request was made, such as iam.amazonaws.com or * s3.amazonaws.com. *

* * @return The Amazon Web Services service to which the request was made, such as iam.amazonaws.com or * s3.amazonaws.com. */ public String getEventSource() { return this.eventSource; } /** *

* The Amazon Web Services service to which the request was made, such as iam.amazonaws.com or * s3.amazonaws.com. *

* * @param eventSource * The Amazon Web Services service to which the request was made, such as iam.amazonaws.com or * s3.amazonaws.com. * @return Returns a reference to this object so that method calls can be chained together. */ public ListInsightsMetricDataResult withEventSource(String eventSource) { setEventSource(eventSource); return this; } /** *

* The name of the event, typically the Amazon Web Services API on which unusual levels of activity were recorded. *

* * @param eventName * The name of the event, typically the Amazon Web Services API on which unusual levels of activity were * recorded. */ public void setEventName(String eventName) { this.eventName = eventName; } /** *

* The name of the event, typically the Amazon Web Services API on which unusual levels of activity were recorded. *

* * @return The name of the event, typically the Amazon Web Services API on which unusual levels of activity were * recorded. */ public String getEventName() { return this.eventName; } /** *

* The name of the event, typically the Amazon Web Services API on which unusual levels of activity were recorded. *

* * @param eventName * The name of the event, typically the Amazon Web Services API on which unusual levels of activity were * recorded. * @return Returns a reference to this object so that method calls can be chained together. */ public ListInsightsMetricDataResult withEventName(String eventName) { setEventName(eventName); return this; } /** *

* The type of CloudTrail Insights event, which is either ApiCallRateInsight or * ApiErrorRateInsight. The ApiCallRateInsight Insights type analyzes write-only * management API calls that are aggregated per minute against a baseline API call volume. The * ApiErrorRateInsight Insights type analyzes management API calls that result in error codes. *

* * @param insightType * The type of CloudTrail Insights event, which is either ApiCallRateInsight or * ApiErrorRateInsight. The ApiCallRateInsight Insights type analyzes write-only * management API calls that are aggregated per minute against a baseline API call volume. The * ApiErrorRateInsight Insights type analyzes management API calls that result in error codes. * @see InsightType */ public void setInsightType(String insightType) { this.insightType = insightType; } /** *

* The type of CloudTrail Insights event, which is either ApiCallRateInsight or * ApiErrorRateInsight. The ApiCallRateInsight Insights type analyzes write-only * management API calls that are aggregated per minute against a baseline API call volume. The * ApiErrorRateInsight Insights type analyzes management API calls that result in error codes. *

* * @return The type of CloudTrail Insights event, which is either ApiCallRateInsight or * ApiErrorRateInsight. The ApiCallRateInsight Insights type analyzes write-only * management API calls that are aggregated per minute against a baseline API call volume. The * ApiErrorRateInsight Insights type analyzes management API calls that result in error codes. * @see InsightType */ public String getInsightType() { return this.insightType; } /** *

* The type of CloudTrail Insights event, which is either ApiCallRateInsight or * ApiErrorRateInsight. The ApiCallRateInsight Insights type analyzes write-only * management API calls that are aggregated per minute against a baseline API call volume. The * ApiErrorRateInsight Insights type analyzes management API calls that result in error codes. *

* * @param insightType * The type of CloudTrail Insights event, which is either ApiCallRateInsight or * ApiErrorRateInsight. The ApiCallRateInsight Insights type analyzes write-only * management API calls that are aggregated per minute against a baseline API call volume. The * ApiErrorRateInsight Insights type analyzes management API calls that result in error codes. * @return Returns a reference to this object so that method calls can be chained together. * @see InsightType */ public ListInsightsMetricDataResult withInsightType(String insightType) { setInsightType(insightType); return this; } /** *

* The type of CloudTrail Insights event, which is either ApiCallRateInsight or * ApiErrorRateInsight. The ApiCallRateInsight Insights type analyzes write-only * management API calls that are aggregated per minute against a baseline API call volume. The * ApiErrorRateInsight Insights type analyzes management API calls that result in error codes. *

* * @param insightType * The type of CloudTrail Insights event, which is either ApiCallRateInsight or * ApiErrorRateInsight. The ApiCallRateInsight Insights type analyzes write-only * management API calls that are aggregated per minute against a baseline API call volume. The * ApiErrorRateInsight Insights type analyzes management API calls that result in error codes. * @return Returns a reference to this object so that method calls can be chained together. * @see InsightType */ public ListInsightsMetricDataResult withInsightType(InsightType insightType) { this.insightType = insightType.toString(); return this; } /** *

* Only returned if InsightType parameter was set to ApiErrorRateInsight. *

*

* If returning metrics for the ApiErrorRateInsight Insights type, this is the error to retrieve data * for. For example, AccessDenied. *

* * @param errorCode * Only returned if InsightType parameter was set to ApiErrorRateInsight.

*

* If returning metrics for the ApiErrorRateInsight Insights type, this is the error to retrieve * data for. For example, AccessDenied. */ public void setErrorCode(String errorCode) { this.errorCode = errorCode; } /** *

* Only returned if InsightType parameter was set to ApiErrorRateInsight. *

*

* If returning metrics for the ApiErrorRateInsight Insights type, this is the error to retrieve data * for. For example, AccessDenied. *

* * @return Only returned if InsightType parameter was set to ApiErrorRateInsight.

*

* If returning metrics for the ApiErrorRateInsight Insights type, this is the error to * retrieve data for. For example, AccessDenied. */ public String getErrorCode() { return this.errorCode; } /** *

* Only returned if InsightType parameter was set to ApiErrorRateInsight. *

*

* If returning metrics for the ApiErrorRateInsight Insights type, this is the error to retrieve data * for. For example, AccessDenied. *

* * @param errorCode * Only returned if InsightType parameter was set to ApiErrorRateInsight.

*

* If returning metrics for the ApiErrorRateInsight Insights type, this is the error to retrieve * data for. For example, AccessDenied. * @return Returns a reference to this object so that method calls can be chained together. */ public ListInsightsMetricDataResult withErrorCode(String errorCode) { setErrorCode(errorCode); return this; } /** *

* List of timestamps at intervals corresponding to the specified time period. *

* * @return List of timestamps at intervals corresponding to the specified time period. */ public java.util.List getTimestamps() { if (timestamps == null) { timestamps = new com.amazonaws.internal.SdkInternalList(); } return timestamps; } /** *

* List of timestamps at intervals corresponding to the specified time period. *

* * @param timestamps * List of timestamps at intervals corresponding to the specified time period. */ public void setTimestamps(java.util.Collection timestamps) { if (timestamps == null) { this.timestamps = null; return; } this.timestamps = new com.amazonaws.internal.SdkInternalList(timestamps); } /** *

* List of timestamps at intervals corresponding to the specified time period. *

*

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

* * @param timestamps * List of timestamps at intervals corresponding to the specified time period. * @return Returns a reference to this object so that method calls can be chained together. */ public ListInsightsMetricDataResult withTimestamps(java.util.Date... timestamps) { if (this.timestamps == null) { setTimestamps(new com.amazonaws.internal.SdkInternalList(timestamps.length)); } for (java.util.Date ele : timestamps) { this.timestamps.add(ele); } return this; } /** *

* List of timestamps at intervals corresponding to the specified time period. *

* * @param timestamps * List of timestamps at intervals corresponding to the specified time period. * @return Returns a reference to this object so that method calls can be chained together. */ public ListInsightsMetricDataResult withTimestamps(java.util.Collection timestamps) { setTimestamps(timestamps); return this; } /** *

* List of values representing the API call rate or error rate at each timestamp. The number of values is equal to * the number of timestamps. *

* * @return List of values representing the API call rate or error rate at each timestamp. The number of values is * equal to the number of timestamps. */ public java.util.List getValues() { if (values == null) { values = new com.amazonaws.internal.SdkInternalList(); } return values; } /** *

* List of values representing the API call rate or error rate at each timestamp. The number of values is equal to * the number of timestamps. *

* * @param values * List of values representing the API call rate or error rate at each timestamp. The number of values is * equal to the number of timestamps. */ public void setValues(java.util.Collection values) { if (values == null) { this.values = null; return; } this.values = new com.amazonaws.internal.SdkInternalList(values); } /** *

* List of values representing the API call rate or error rate at each timestamp. The number of values is equal to * the number of timestamps. *

*

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

* * @param values * List of values representing the API call rate or error rate at each timestamp. The number of values is * equal to the number of timestamps. * @return Returns a reference to this object so that method calls can be chained together. */ public ListInsightsMetricDataResult withValues(Double... values) { if (this.values == null) { setValues(new com.amazonaws.internal.SdkInternalList(values.length)); } for (Double ele : values) { this.values.add(ele); } return this; } /** *

* List of values representing the API call rate or error rate at each timestamp. The number of values is equal to * the number of timestamps. *

* * @param values * List of values representing the API call rate or error rate at each timestamp. The number of values is * equal to the number of timestamps. * @return Returns a reference to this object so that method calls can be chained together. */ public ListInsightsMetricDataResult withValues(java.util.Collection values) { setValues(values); return this; } /** *

* Only returned if the full results could not be returned in a single query. You can set the NextToken * parameter in the next request to this value to continue retrieval. *

* * @param nextToken * Only returned if the full results could not be returned in a single query. You can set the * NextToken parameter in the next request to this value to continue retrieval. */ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** *

* Only returned if the full results could not be returned in a single query. You can set the NextToken * parameter in the next request to this value to continue retrieval. *

* * @return Only returned if the full results could not be returned in a single query. You can set the * NextToken parameter in the next request to this value to continue retrieval. */ public String getNextToken() { return this.nextToken; } /** *

* Only returned if the full results could not be returned in a single query. You can set the NextToken * parameter in the next request to this value to continue retrieval. *

* * @param nextToken * Only returned if the full results could not be returned in a single query. You can set the * NextToken parameter in the next request to this value to continue retrieval. * @return Returns a reference to this object so that method calls can be chained together. */ public ListInsightsMetricDataResult withNextToken(String nextToken) { setNextToken(nextToken); 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 (getEventSource() != null) sb.append("EventSource: ").append(getEventSource()).append(","); if (getEventName() != null) sb.append("EventName: ").append(getEventName()).append(","); if (getInsightType() != null) sb.append("InsightType: ").append(getInsightType()).append(","); if (getErrorCode() != null) sb.append("ErrorCode: ").append(getErrorCode()).append(","); if (getTimestamps() != null) sb.append("Timestamps: ").append(getTimestamps()).append(","); if (getValues() != null) sb.append("Values: ").append(getValues()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ListInsightsMetricDataResult == false) return false; ListInsightsMetricDataResult other = (ListInsightsMetricDataResult) obj; if (other.getEventSource() == null ^ this.getEventSource() == null) return false; if (other.getEventSource() != null && other.getEventSource().equals(this.getEventSource()) == false) return false; if (other.getEventName() == null ^ this.getEventName() == null) return false; if (other.getEventName() != null && other.getEventName().equals(this.getEventName()) == false) return false; if (other.getInsightType() == null ^ this.getInsightType() == null) return false; if (other.getInsightType() != null && other.getInsightType().equals(this.getInsightType()) == false) return false; if (other.getErrorCode() == null ^ this.getErrorCode() == null) return false; if (other.getErrorCode() != null && other.getErrorCode().equals(this.getErrorCode()) == false) return false; if (other.getTimestamps() == null ^ this.getTimestamps() == null) return false; if (other.getTimestamps() != null && other.getTimestamps().equals(this.getTimestamps()) == false) return false; if (other.getValues() == null ^ this.getValues() == null) return false; if (other.getValues() != null && other.getValues().equals(this.getValues()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEventSource() == null) ? 0 : getEventSource().hashCode()); hashCode = prime * hashCode + ((getEventName() == null) ? 0 : getEventName().hashCode()); hashCode = prime * hashCode + ((getInsightType() == null) ? 0 : getInsightType().hashCode()); hashCode = prime * hashCode + ((getErrorCode() == null) ? 0 : getErrorCode().hashCode()); hashCode = prime * hashCode + ((getTimestamps() == null) ? 0 : getTimestamps().hashCode()); hashCode = prime * hashCode + ((getValues() == null) ? 0 : getValues().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); return hashCode; } @Override public ListInsightsMetricDataResult clone() { try { return (ListInsightsMetricDataResult) 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