com.amazonaws.services.codeguruprofiler.model.BatchGetFrameMetricDataResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-codeguruprofiler 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.codeguruprofiler.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* The structure representing the BatchGetFrameMetricDataResponse.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class BatchGetFrameMetricDataResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The end time of the time period for the returned time series values. This is specified using the ISO 8601 format.
* For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.
*
*/
private java.util.Date endTime;
/**
*
* List of instances, or time steps, in the time series. For example, if the period
is one day (
* PT24H)
), and the resolution
is five minutes (PT5M
), then there are 288
* endTimes
in the list that are each five minutes appart.
*
*/
private java.util.List endTimes;
/**
*
* Details of the metrics to request a time series of values. The metric includes the name of the frame, the
* aggregation type to calculate the metric value for the frame, and the thread states to use to get the count for
* the metric value of the frame.
*
*/
private java.util.List frameMetricData;
/**
*
* Resolution or granularity of the profile data used to generate the time series. This is the value used to jump
* through time steps in a time series. There are 3 valid values.
*
*
* -
*
* P1D
— 1 day
*
*
* -
*
* PT1H
— 1 hour
*
*
* -
*
* PT5M
— 5 minutes
*
*
*
*/
private String resolution;
/**
*
* The start time of the time period for the returned time series values. This is specified using the ISO 8601
* format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.
*
*/
private java.util.Date startTime;
/**
*
* List of instances which remained unprocessed. This will create a missing time step in the list of end times.
*
*/
private java.util.Map> unprocessedEndTimes;
/**
*
* The end time of the time period for the returned time series values. This is specified using the ISO 8601 format.
* For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.
*
*
* @param endTime
* The end time of the time period for the returned time series values. This is specified using the ISO 8601
* format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.
*/
public void setEndTime(java.util.Date endTime) {
this.endTime = endTime;
}
/**
*
* The end time of the time period for the returned time series values. This is specified using the ISO 8601 format.
* For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.
*
*
* @return The end time of the time period for the returned time series values. This is specified using the ISO 8601
* format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.
*/
public java.util.Date getEndTime() {
return this.endTime;
}
/**
*
* The end time of the time period for the returned time series values. This is specified using the ISO 8601 format.
* For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.
*
*
* @param endTime
* The end time of the time period for the returned time series values. This is specified using the ISO 8601
* format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchGetFrameMetricDataResult withEndTime(java.util.Date endTime) {
setEndTime(endTime);
return this;
}
/**
*
* List of instances, or time steps, in the time series. For example, if the period
is one day (
* PT24H)
), and the resolution
is five minutes (PT5M
), then there are 288
* endTimes
in the list that are each five minutes appart.
*
*
* @return List of instances, or time steps, in the time series. For example, if the period
is one day
* (PT24H)
), and the resolution
is five minutes (PT5M
), then there
* are 288 endTimes
in the list that are each five minutes appart.
*/
public java.util.List getEndTimes() {
return endTimes;
}
/**
*
* List of instances, or time steps, in the time series. For example, if the period
is one day (
* PT24H)
), and the resolution
is five minutes (PT5M
), then there are 288
* endTimes
in the list that are each five minutes appart.
*
*
* @param endTimes
* List of instances, or time steps, in the time series. For example, if the period
is one day (
* PT24H)
), and the resolution
is five minutes (PT5M
), then there are
* 288 endTimes
in the list that are each five minutes appart.
*/
public void setEndTimes(java.util.Collection endTimes) {
if (endTimes == null) {
this.endTimes = null;
return;
}
this.endTimes = new java.util.ArrayList(endTimes);
}
/**
*
* List of instances, or time steps, in the time series. For example, if the period
is one day (
* PT24H)
), and the resolution
is five minutes (PT5M
), then there are 288
* endTimes
in the list that are each five minutes appart.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setEndTimes(java.util.Collection)} or {@link #withEndTimes(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param endTimes
* List of instances, or time steps, in the time series. For example, if the period
is one day (
* PT24H)
), and the resolution
is five minutes (PT5M
), then there are
* 288 endTimes
in the list that are each five minutes appart.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchGetFrameMetricDataResult withEndTimes(TimestampStructure... endTimes) {
if (this.endTimes == null) {
setEndTimes(new java.util.ArrayList(endTimes.length));
}
for (TimestampStructure ele : endTimes) {
this.endTimes.add(ele);
}
return this;
}
/**
*
* List of instances, or time steps, in the time series. For example, if the period
is one day (
* PT24H)
), and the resolution
is five minutes (PT5M
), then there are 288
* endTimes
in the list that are each five minutes appart.
*
*
* @param endTimes
* List of instances, or time steps, in the time series. For example, if the period
is one day (
* PT24H)
), and the resolution
is five minutes (PT5M
), then there are
* 288 endTimes
in the list that are each five minutes appart.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchGetFrameMetricDataResult withEndTimes(java.util.Collection endTimes) {
setEndTimes(endTimes);
return this;
}
/**
*
* Details of the metrics to request a time series of values. The metric includes the name of the frame, the
* aggregation type to calculate the metric value for the frame, and the thread states to use to get the count for
* the metric value of the frame.
*
*
* @return Details of the metrics to request a time series of values. The metric includes the name of the frame, the
* aggregation type to calculate the metric value for the frame, and the thread states to use to get the
* count for the metric value of the frame.
*/
public java.util.List getFrameMetricData() {
return frameMetricData;
}
/**
*
* Details of the metrics to request a time series of values. The metric includes the name of the frame, the
* aggregation type to calculate the metric value for the frame, and the thread states to use to get the count for
* the metric value of the frame.
*
*
* @param frameMetricData
* Details of the metrics to request a time series of values. The metric includes the name of the frame, the
* aggregation type to calculate the metric value for the frame, and the thread states to use to get the
* count for the metric value of the frame.
*/
public void setFrameMetricData(java.util.Collection frameMetricData) {
if (frameMetricData == null) {
this.frameMetricData = null;
return;
}
this.frameMetricData = new java.util.ArrayList(frameMetricData);
}
/**
*
* Details of the metrics to request a time series of values. The metric includes the name of the frame, the
* aggregation type to calculate the metric value for the frame, and the thread states to use to get the count for
* the metric value of the frame.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setFrameMetricData(java.util.Collection)} or {@link #withFrameMetricData(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param frameMetricData
* Details of the metrics to request a time series of values. The metric includes the name of the frame, the
* aggregation type to calculate the metric value for the frame, and the thread states to use to get the
* count for the metric value of the frame.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchGetFrameMetricDataResult withFrameMetricData(FrameMetricDatum... frameMetricData) {
if (this.frameMetricData == null) {
setFrameMetricData(new java.util.ArrayList(frameMetricData.length));
}
for (FrameMetricDatum ele : frameMetricData) {
this.frameMetricData.add(ele);
}
return this;
}
/**
*
* Details of the metrics to request a time series of values. The metric includes the name of the frame, the
* aggregation type to calculate the metric value for the frame, and the thread states to use to get the count for
* the metric value of the frame.
*
*
* @param frameMetricData
* Details of the metrics to request a time series of values. The metric includes the name of the frame, the
* aggregation type to calculate the metric value for the frame, and the thread states to use to get the
* count for the metric value of the frame.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchGetFrameMetricDataResult withFrameMetricData(java.util.Collection frameMetricData) {
setFrameMetricData(frameMetricData);
return this;
}
/**
*
* Resolution or granularity of the profile data used to generate the time series. This is the value used to jump
* through time steps in a time series. There are 3 valid values.
*
*
* -
*
* P1D
— 1 day
*
*
* -
*
* PT1H
— 1 hour
*
*
* -
*
* PT5M
— 5 minutes
*
*
*
*
* @param resolution
* Resolution or granularity of the profile data used to generate the time series. This is the value used to
* jump through time steps in a time series. There are 3 valid values.
*
* -
*
* P1D
— 1 day
*
*
* -
*
* PT1H
— 1 hour
*
*
* -
*
* PT5M
— 5 minutes
*
*
* @see AggregationPeriod
*/
public void setResolution(String resolution) {
this.resolution = resolution;
}
/**
*
* Resolution or granularity of the profile data used to generate the time series. This is the value used to jump
* through time steps in a time series. There are 3 valid values.
*
*
* -
*
* P1D
— 1 day
*
*
* -
*
* PT1H
— 1 hour
*
*
* -
*
* PT5M
— 5 minutes
*
*
*
*
* @return Resolution or granularity of the profile data used to generate the time series. This is the value used to
* jump through time steps in a time series. There are 3 valid values.
*
* -
*
* P1D
— 1 day
*
*
* -
*
* PT1H
— 1 hour
*
*
* -
*
* PT5M
— 5 minutes
*
*
* @see AggregationPeriod
*/
public String getResolution() {
return this.resolution;
}
/**
*
* Resolution or granularity of the profile data used to generate the time series. This is the value used to jump
* through time steps in a time series. There are 3 valid values.
*
*
* -
*
* P1D
— 1 day
*
*
* -
*
* PT1H
— 1 hour
*
*
* -
*
* PT5M
— 5 minutes
*
*
*
*
* @param resolution
* Resolution or granularity of the profile data used to generate the time series. This is the value used to
* jump through time steps in a time series. There are 3 valid values.
*
* -
*
* P1D
— 1 day
*
*
* -
*
* PT1H
— 1 hour
*
*
* -
*
* PT5M
— 5 minutes
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see AggregationPeriod
*/
public BatchGetFrameMetricDataResult withResolution(String resolution) {
setResolution(resolution);
return this;
}
/**
*
* Resolution or granularity of the profile data used to generate the time series. This is the value used to jump
* through time steps in a time series. There are 3 valid values.
*
*
* -
*
* P1D
— 1 day
*
*
* -
*
* PT1H
— 1 hour
*
*
* -
*
* PT5M
— 5 minutes
*
*
*
*
* @param resolution
* Resolution or granularity of the profile data used to generate the time series. This is the value used to
* jump through time steps in a time series. There are 3 valid values.
*
* -
*
* P1D
— 1 day
*
*
* -
*
* PT1H
— 1 hour
*
*
* -
*
* PT5M
— 5 minutes
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see AggregationPeriod
*/
public BatchGetFrameMetricDataResult withResolution(AggregationPeriod resolution) {
this.resolution = resolution.toString();
return this;
}
/**
*
* The start time of the time period for the returned time series values. This is specified using the ISO 8601
* format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.
*
*
* @param startTime
* The start time of the time period for the returned time series values. This is specified using the ISO
* 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM
* UTC.
*/
public void setStartTime(java.util.Date startTime) {
this.startTime = startTime;
}
/**
*
* The start time of the time period for the returned time series values. This is specified using the ISO 8601
* format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.
*
*
* @return The start time of the time period for the returned time series values. This is specified using the ISO
* 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM
* UTC.
*/
public java.util.Date getStartTime() {
return this.startTime;
}
/**
*
* The start time of the time period for the returned time series values. This is specified using the ISO 8601
* format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM UTC.
*
*
* @param startTime
* The start time of the time period for the returned time series values. This is specified using the ISO
* 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond past June 1, 2020 1:15:02 PM
* UTC.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchGetFrameMetricDataResult withStartTime(java.util.Date startTime) {
setStartTime(startTime);
return this;
}
/**
*
* List of instances which remained unprocessed. This will create a missing time step in the list of end times.
*
*
* @return List of instances which remained unprocessed. This will create a missing time step in the list of end
* times.
*/
public java.util.Map> getUnprocessedEndTimes() {
return unprocessedEndTimes;
}
/**
*
* List of instances which remained unprocessed. This will create a missing time step in the list of end times.
*
*
* @param unprocessedEndTimes
* List of instances which remained unprocessed. This will create a missing time step in the list of end
* times.
*/
public void setUnprocessedEndTimes(java.util.Map> unprocessedEndTimes) {
this.unprocessedEndTimes = unprocessedEndTimes;
}
/**
*
* List of instances which remained unprocessed. This will create a missing time step in the list of end times.
*
*
* @param unprocessedEndTimes
* List of instances which remained unprocessed. This will create a missing time step in the list of end
* times.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchGetFrameMetricDataResult withUnprocessedEndTimes(java.util.Map> unprocessedEndTimes) {
setUnprocessedEndTimes(unprocessedEndTimes);
return this;
}
/**
* Add a single UnprocessedEndTimes entry
*
* @see BatchGetFrameMetricDataResult#withUnprocessedEndTimes
* @returns a reference to this object so that method calls can be chained together.
*/
public BatchGetFrameMetricDataResult addUnprocessedEndTimesEntry(String key, java.util.List value) {
if (null == this.unprocessedEndTimes) {
this.unprocessedEndTimes = new java.util.HashMap>();
}
if (this.unprocessedEndTimes.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.unprocessedEndTimes.put(key, value);
return this;
}
/**
* Removes all the entries added into UnprocessedEndTimes.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchGetFrameMetricDataResult clearUnprocessedEndTimesEntries() {
this.unprocessedEndTimes = null;
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 (getEndTime() != null)
sb.append("EndTime: ").append(getEndTime()).append(",");
if (getEndTimes() != null)
sb.append("EndTimes: ").append(getEndTimes()).append(",");
if (getFrameMetricData() != null)
sb.append("FrameMetricData: ").append(getFrameMetricData()).append(",");
if (getResolution() != null)
sb.append("Resolution: ").append(getResolution()).append(",");
if (getStartTime() != null)
sb.append("StartTime: ").append(getStartTime()).append(",");
if (getUnprocessedEndTimes() != null)
sb.append("UnprocessedEndTimes: ").append(getUnprocessedEndTimes());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof BatchGetFrameMetricDataResult == false)
return false;
BatchGetFrameMetricDataResult other = (BatchGetFrameMetricDataResult) obj;
if (other.getEndTime() == null ^ this.getEndTime() == null)
return false;
if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == false)
return false;
if (other.getEndTimes() == null ^ this.getEndTimes() == null)
return false;
if (other.getEndTimes() != null && other.getEndTimes().equals(this.getEndTimes()) == false)
return false;
if (other.getFrameMetricData() == null ^ this.getFrameMetricData() == null)
return false;
if (other.getFrameMetricData() != null && other.getFrameMetricData().equals(this.getFrameMetricData()) == false)
return false;
if (other.getResolution() == null ^ this.getResolution() == null)
return false;
if (other.getResolution() != null && other.getResolution().equals(this.getResolution()) == false)
return false;
if (other.getStartTime() == null ^ this.getStartTime() == null)
return false;
if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false)
return false;
if (other.getUnprocessedEndTimes() == null ^ this.getUnprocessedEndTimes() == null)
return false;
if (other.getUnprocessedEndTimes() != null && other.getUnprocessedEndTimes().equals(this.getUnprocessedEndTimes()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
hashCode = prime * hashCode + ((getEndTimes() == null) ? 0 : getEndTimes().hashCode());
hashCode = prime * hashCode + ((getFrameMetricData() == null) ? 0 : getFrameMetricData().hashCode());
hashCode = prime * hashCode + ((getResolution() == null) ? 0 : getResolution().hashCode());
hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
hashCode = prime * hashCode + ((getUnprocessedEndTimes() == null) ? 0 : getUnprocessedEndTimes().hashCode());
return hashCode;
}
@Override
public BatchGetFrameMetricDataResult clone() {
try {
return (BatchGetFrameMetricDataResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}