com.amazonaws.services.pricing.model.ListPriceListsRequest 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.pricing.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 ListPriceListsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The service code or the Savings Plan service code for the attributes that you want to retrieve. For example, to
* get the list of applicable Amazon EC2 price lists, use AmazonEC2
. For a full list of service codes
* containing On-Demand and Reserved Instance (RI) pricing, use the DescribeServices API.
*
*
* To retrieve the Reserved Instance and Compute Savings Plan price lists, use ComputeSavingsPlans
.
*
*
* To retrieve Machine Learning Savings Plans price lists, use MachineLearningSavingsPlans
.
*
*/
private String serviceCode;
/**
*
* The date that the Price List file prices are effective from.
*
*/
private java.util.Date effectiveDate;
/**
*
* This is used to filter the Price List by Amazon Web Services Region. For example, to get the price list only for
* the US East (N. Virginia)
Region, use us-east-1
. If nothing is specified, you retrieve
* price lists for all applicable Regions. The available RegionCode
list can be retrieved from GetAttributeValues API.
*
*/
private String regionCode;
/**
*
* The three alphabetical character ISO-4217 currency code that the Price List files are denominated in.
*
*/
private String currencyCode;
/**
*
* The pagination token that indicates the next set of results that you want to retrieve.
*
*/
private String nextToken;
/**
*
* The maximum number of results to return in the response.
*
*/
private Integer maxResults;
/**
*
* The service code or the Savings Plan service code for the attributes that you want to retrieve. For example, to
* get the list of applicable Amazon EC2 price lists, use AmazonEC2
. For a full list of service codes
* containing On-Demand and Reserved Instance (RI) pricing, use the DescribeServices API.
*
*
* To retrieve the Reserved Instance and Compute Savings Plan price lists, use ComputeSavingsPlans
.
*
*
* To retrieve Machine Learning Savings Plans price lists, use MachineLearningSavingsPlans
.
*
*
* @param serviceCode
* The service code or the Savings Plan service code for the attributes that you want to retrieve. For
* example, to get the list of applicable Amazon EC2 price lists, use AmazonEC2
. For a full list
* of service codes containing On-Demand and Reserved Instance (RI) pricing, use the DescribeServices API.
*
* To retrieve the Reserved Instance and Compute Savings Plan price lists, use
* ComputeSavingsPlans
.
*
*
* To retrieve Machine Learning Savings Plans price lists, use MachineLearningSavingsPlans
.
*/
public void setServiceCode(String serviceCode) {
this.serviceCode = serviceCode;
}
/**
*
* The service code or the Savings Plan service code for the attributes that you want to retrieve. For example, to
* get the list of applicable Amazon EC2 price lists, use AmazonEC2
. For a full list of service codes
* containing On-Demand and Reserved Instance (RI) pricing, use the DescribeServices API.
*
*
* To retrieve the Reserved Instance and Compute Savings Plan price lists, use ComputeSavingsPlans
.
*
*
* To retrieve Machine Learning Savings Plans price lists, use MachineLearningSavingsPlans
.
*
*
* @return The service code or the Savings Plan service code for the attributes that you want to retrieve. For
* example, to get the list of applicable Amazon EC2 price lists, use AmazonEC2
. For a full
* list of service codes containing On-Demand and Reserved Instance (RI) pricing, use the DescribeServices API.
*
* To retrieve the Reserved Instance and Compute Savings Plan price lists, use
* ComputeSavingsPlans
.
*
*
* To retrieve Machine Learning Savings Plans price lists, use MachineLearningSavingsPlans
.
*/
public String getServiceCode() {
return this.serviceCode;
}
/**
*
* The service code or the Savings Plan service code for the attributes that you want to retrieve. For example, to
* get the list of applicable Amazon EC2 price lists, use AmazonEC2
. For a full list of service codes
* containing On-Demand and Reserved Instance (RI) pricing, use the DescribeServices API.
*
*
* To retrieve the Reserved Instance and Compute Savings Plan price lists, use ComputeSavingsPlans
.
*
*
* To retrieve Machine Learning Savings Plans price lists, use MachineLearningSavingsPlans
.
*
*
* @param serviceCode
* The service code or the Savings Plan service code for the attributes that you want to retrieve. For
* example, to get the list of applicable Amazon EC2 price lists, use AmazonEC2
. For a full list
* of service codes containing On-Demand and Reserved Instance (RI) pricing, use the DescribeServices API.
*
* To retrieve the Reserved Instance and Compute Savings Plan price lists, use
* ComputeSavingsPlans
.
*
*
* To retrieve Machine Learning Savings Plans price lists, use MachineLearningSavingsPlans
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListPriceListsRequest withServiceCode(String serviceCode) {
setServiceCode(serviceCode);
return this;
}
/**
*
* The date that the Price List file prices are effective from.
*
*
* @param effectiveDate
* The date that the Price List file prices are effective from.
*/
public void setEffectiveDate(java.util.Date effectiveDate) {
this.effectiveDate = effectiveDate;
}
/**
*
* The date that the Price List file prices are effective from.
*
*
* @return The date that the Price List file prices are effective from.
*/
public java.util.Date getEffectiveDate() {
return this.effectiveDate;
}
/**
*
* The date that the Price List file prices are effective from.
*
*
* @param effectiveDate
* The date that the Price List file prices are effective from.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListPriceListsRequest withEffectiveDate(java.util.Date effectiveDate) {
setEffectiveDate(effectiveDate);
return this;
}
/**
*
* This is used to filter the Price List by Amazon Web Services Region. For example, to get the price list only for
* the US East (N. Virginia)
Region, use us-east-1
. If nothing is specified, you retrieve
* price lists for all applicable Regions. The available RegionCode
list can be retrieved from GetAttributeValues API.
*
*
* @param regionCode
* This is used to filter the Price List by Amazon Web Services Region. For example, to get the price list
* only for the US East (N. Virginia)
Region, use us-east-1
. If nothing is
* specified, you retrieve price lists for all applicable Regions. The available RegionCode
list
* can be retrieved from GetAttributeValues API.
*/
public void setRegionCode(String regionCode) {
this.regionCode = regionCode;
}
/**
*
* This is used to filter the Price List by Amazon Web Services Region. For example, to get the price list only for
* the US East (N. Virginia)
Region, use us-east-1
. If nothing is specified, you retrieve
* price lists for all applicable Regions. The available RegionCode
list can be retrieved from GetAttributeValues API.
*
*
* @return This is used to filter the Price List by Amazon Web Services Region. For example, to get the price list
* only for the US East (N. Virginia)
Region, use us-east-1
. If nothing is
* specified, you retrieve price lists for all applicable Regions. The available RegionCode
* list can be retrieved from GetAttributeValues API.
*/
public String getRegionCode() {
return this.regionCode;
}
/**
*
* This is used to filter the Price List by Amazon Web Services Region. For example, to get the price list only for
* the US East (N. Virginia)
Region, use us-east-1
. If nothing is specified, you retrieve
* price lists for all applicable Regions. The available RegionCode
list can be retrieved from GetAttributeValues API.
*
*
* @param regionCode
* This is used to filter the Price List by Amazon Web Services Region. For example, to get the price list
* only for the US East (N. Virginia)
Region, use us-east-1
. If nothing is
* specified, you retrieve price lists for all applicable Regions. The available RegionCode
list
* can be retrieved from GetAttributeValues API.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListPriceListsRequest withRegionCode(String regionCode) {
setRegionCode(regionCode);
return this;
}
/**
*
* The three alphabetical character ISO-4217 currency code that the Price List files are denominated in.
*
*
* @param currencyCode
* The three alphabetical character ISO-4217 currency code that the Price List files are denominated in.
*/
public void setCurrencyCode(String currencyCode) {
this.currencyCode = currencyCode;
}
/**
*
* The three alphabetical character ISO-4217 currency code that the Price List files are denominated in.
*
*
* @return The three alphabetical character ISO-4217 currency code that the Price List files are denominated in.
*/
public String getCurrencyCode() {
return this.currencyCode;
}
/**
*
* The three alphabetical character ISO-4217 currency code that the Price List files are denominated in.
*
*
* @param currencyCode
* The three alphabetical character ISO-4217 currency code that the Price List files are denominated in.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListPriceListsRequest withCurrencyCode(String currencyCode) {
setCurrencyCode(currencyCode);
return this;
}
/**
*
* The pagination token that indicates the next set of results that you want to retrieve.
*
*
* @param nextToken
* The pagination token that indicates the next set of results that you want to retrieve.
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
*
* The pagination token that indicates the next set of results that you want to retrieve.
*
*
* @return The pagination token that indicates the next set of results that you want to retrieve.
*/
public String getNextToken() {
return this.nextToken;
}
/**
*
* The pagination token that indicates the next set of results that you want to retrieve.
*
*
* @param nextToken
* The pagination token that indicates the next set of results that you want to retrieve.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListPriceListsRequest withNextToken(String nextToken) {
setNextToken(nextToken);
return this;
}
/**
*
* The maximum number of results to return in the response.
*
*
* @param maxResults
* The maximum number of results to return in the response.
*/
public void setMaxResults(Integer maxResults) {
this.maxResults = maxResults;
}
/**
*
* The maximum number of results to return in the response.
*
*
* @return The maximum number of results to return in the response.
*/
public Integer getMaxResults() {
return this.maxResults;
}
/**
*
* The maximum number of results to return in the response.
*
*
* @param maxResults
* The maximum number of results to return in the response.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListPriceListsRequest withMaxResults(Integer maxResults) {
setMaxResults(maxResults);
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 (getServiceCode() != null)
sb.append("ServiceCode: ").append(getServiceCode()).append(",");
if (getEffectiveDate() != null)
sb.append("EffectiveDate: ").append(getEffectiveDate()).append(",");
if (getRegionCode() != null)
sb.append("RegionCode: ").append(getRegionCode()).append(",");
if (getCurrencyCode() != null)
sb.append("CurrencyCode: ").append(getCurrencyCode()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken()).append(",");
if (getMaxResults() != null)
sb.append("MaxResults: ").append(getMaxResults());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ListPriceListsRequest == false)
return false;
ListPriceListsRequest other = (ListPriceListsRequest) obj;
if (other.getServiceCode() == null ^ this.getServiceCode() == null)
return false;
if (other.getServiceCode() != null && other.getServiceCode().equals(this.getServiceCode()) == false)
return false;
if (other.getEffectiveDate() == null ^ this.getEffectiveDate() == null)
return false;
if (other.getEffectiveDate() != null && other.getEffectiveDate().equals(this.getEffectiveDate()) == false)
return false;
if (other.getRegionCode() == null ^ this.getRegionCode() == null)
return false;
if (other.getRegionCode() != null && other.getRegionCode().equals(this.getRegionCode()) == false)
return false;
if (other.getCurrencyCode() == null ^ this.getCurrencyCode() == null)
return false;
if (other.getCurrencyCode() != null && other.getCurrencyCode().equals(this.getCurrencyCode()) == false)
return false;
if (other.getNextToken() == null ^ this.getNextToken() == null)
return false;
if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
return false;
if (other.getMaxResults() == null ^ this.getMaxResults() == null)
return false;
if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getServiceCode() == null) ? 0 : getServiceCode().hashCode());
hashCode = prime * hashCode + ((getEffectiveDate() == null) ? 0 : getEffectiveDate().hashCode());
hashCode = prime * hashCode + ((getRegionCode() == null) ? 0 : getRegionCode().hashCode());
hashCode = prime * hashCode + ((getCurrencyCode() == null) ? 0 : getCurrencyCode().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode());
return hashCode;
}
@Override
public ListPriceListsRequest clone() {
return (ListPriceListsRequest) super.clone();
}
}