com.amazonaws.services.computeoptimizer.model.GetECSServiceRecommendationProjectedMetricsRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-computeoptimizer 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.computeoptimizer.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetECSServiceRecommendationProjectedMetricsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The ARN that identifies the Amazon ECS service.
*
*
* The following is the format of the ARN:
*
*
* arn:aws:ecs:region:aws_account_id:service/cluster-name/service-name
*
*/
private String serviceArn;
/**
*
* The statistic of the projected metrics.
*
*/
private String stat;
/**
*
* The granularity, in seconds, of the projected metrics data points.
*
*/
private Integer period;
/**
*
* The timestamp of the first projected metrics data point to return.
*
*/
private java.util.Date startTime;
/**
*
* The timestamp of the last projected metrics data point to return.
*
*/
private java.util.Date endTime;
/**
*
* The ARN that identifies the Amazon ECS service.
*
*
* The following is the format of the ARN:
*
*
* arn:aws:ecs:region:aws_account_id:service/cluster-name/service-name
*
*
* @param serviceArn
* The ARN that identifies the Amazon ECS service.
*
* The following is the format of the ARN:
*
*
* arn:aws:ecs:region:aws_account_id:service/cluster-name/service-name
*/
public void setServiceArn(String serviceArn) {
this.serviceArn = serviceArn;
}
/**
*
* The ARN that identifies the Amazon ECS service.
*
*
* The following is the format of the ARN:
*
*
* arn:aws:ecs:region:aws_account_id:service/cluster-name/service-name
*
*
* @return The ARN that identifies the Amazon ECS service.
*
* The following is the format of the ARN:
*
*
* arn:aws:ecs:region:aws_account_id:service/cluster-name/service-name
*/
public String getServiceArn() {
return this.serviceArn;
}
/**
*
* The ARN that identifies the Amazon ECS service.
*
*
* The following is the format of the ARN:
*
*
* arn:aws:ecs:region:aws_account_id:service/cluster-name/service-name
*
*
* @param serviceArn
* The ARN that identifies the Amazon ECS service.
*
* The following is the format of the ARN:
*
*
* arn:aws:ecs:region:aws_account_id:service/cluster-name/service-name
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetECSServiceRecommendationProjectedMetricsRequest withServiceArn(String serviceArn) {
setServiceArn(serviceArn);
return this;
}
/**
*
* The statistic of the projected metrics.
*
*
* @param stat
* The statistic of the projected metrics.
* @see MetricStatistic
*/
public void setStat(String stat) {
this.stat = stat;
}
/**
*
* The statistic of the projected metrics.
*
*
* @return The statistic of the projected metrics.
* @see MetricStatistic
*/
public String getStat() {
return this.stat;
}
/**
*
* The statistic of the projected metrics.
*
*
* @param stat
* The statistic of the projected metrics.
* @return Returns a reference to this object so that method calls can be chained together.
* @see MetricStatistic
*/
public GetECSServiceRecommendationProjectedMetricsRequest withStat(String stat) {
setStat(stat);
return this;
}
/**
*
* The statistic of the projected metrics.
*
*
* @param stat
* The statistic of the projected metrics.
* @return Returns a reference to this object so that method calls can be chained together.
* @see MetricStatistic
*/
public GetECSServiceRecommendationProjectedMetricsRequest withStat(MetricStatistic stat) {
this.stat = stat.toString();
return this;
}
/**
*
* The granularity, in seconds, of the projected metrics data points.
*
*
* @param period
* The granularity, in seconds, of the projected metrics data points.
*/
public void setPeriod(Integer period) {
this.period = period;
}
/**
*
* The granularity, in seconds, of the projected metrics data points.
*
*
* @return The granularity, in seconds, of the projected metrics data points.
*/
public Integer getPeriod() {
return this.period;
}
/**
*
* The granularity, in seconds, of the projected metrics data points.
*
*
* @param period
* The granularity, in seconds, of the projected metrics data points.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetECSServiceRecommendationProjectedMetricsRequest withPeriod(Integer period) {
setPeriod(period);
return this;
}
/**
*
* The timestamp of the first projected metrics data point to return.
*
*
* @param startTime
* The timestamp of the first projected metrics data point to return.
*/
public void setStartTime(java.util.Date startTime) {
this.startTime = startTime;
}
/**
*
* The timestamp of the first projected metrics data point to return.
*
*
* @return The timestamp of the first projected metrics data point to return.
*/
public java.util.Date getStartTime() {
return this.startTime;
}
/**
*
* The timestamp of the first projected metrics data point to return.
*
*
* @param startTime
* The timestamp of the first projected metrics data point to return.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetECSServiceRecommendationProjectedMetricsRequest withStartTime(java.util.Date startTime) {
setStartTime(startTime);
return this;
}
/**
*
* The timestamp of the last projected metrics data point to return.
*
*
* @param endTime
* The timestamp of the last projected metrics data point to return.
*/
public void setEndTime(java.util.Date endTime) {
this.endTime = endTime;
}
/**
*
* The timestamp of the last projected metrics data point to return.
*
*
* @return The timestamp of the last projected metrics data point to return.
*/
public java.util.Date getEndTime() {
return this.endTime;
}
/**
*
* The timestamp of the last projected metrics data point to return.
*
*
* @param endTime
* The timestamp of the last projected metrics data point to return.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetECSServiceRecommendationProjectedMetricsRequest withEndTime(java.util.Date endTime) {
setEndTime(endTime);
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 (getServiceArn() != null)
sb.append("ServiceArn: ").append(getServiceArn()).append(",");
if (getStat() != null)
sb.append("Stat: ").append(getStat()).append(",");
if (getPeriod() != null)
sb.append("Period: ").append(getPeriod()).append(",");
if (getStartTime() != null)
sb.append("StartTime: ").append(getStartTime()).append(",");
if (getEndTime() != null)
sb.append("EndTime: ").append(getEndTime());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetECSServiceRecommendationProjectedMetricsRequest == false)
return false;
GetECSServiceRecommendationProjectedMetricsRequest other = (GetECSServiceRecommendationProjectedMetricsRequest) obj;
if (other.getServiceArn() == null ^ this.getServiceArn() == null)
return false;
if (other.getServiceArn() != null && other.getServiceArn().equals(this.getServiceArn()) == false)
return false;
if (other.getStat() == null ^ this.getStat() == null)
return false;
if (other.getStat() != null && other.getStat().equals(this.getStat()) == false)
return false;
if (other.getPeriod() == null ^ this.getPeriod() == null)
return false;
if (other.getPeriod() != null && other.getPeriod().equals(this.getPeriod()) == 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.getEndTime() == null ^ this.getEndTime() == null)
return false;
if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getServiceArn() == null) ? 0 : getServiceArn().hashCode());
hashCode = prime * hashCode + ((getStat() == null) ? 0 : getStat().hashCode());
hashCode = prime * hashCode + ((getPeriod() == null) ? 0 : getPeriod().hashCode());
hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
return hashCode;
}
@Override
public GetECSServiceRecommendationProjectedMetricsRequest clone() {
return (GetECSServiceRecommendationProjectedMetricsRequest) super.clone();
}
}