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

com.amazonaws.services.devopsguru.model.ServiceResourceCost Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.778
Show newest version
/*
 * 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.devopsguru.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* An object that contains information about the estimated monthly cost to analyze an Amazon Web Services resource. For * more information, see Estimate * your Amazon DevOps Guru costs and Amazon DevOps Guru * pricing. *

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

* The type of the Amazon Web Services resource. *

*/ private String type; /** *

* The state of the resource. The resource is ACTIVE if it produces metrics, events, or logs within an * hour, otherwise it is INACTIVE. You pay for the number of active Amazon Web Services resource hours * analyzed for each resource. Inactive resources are not charged. *

*/ private String state; /** *

* The number of active resources analyzed for this service to create a monthly cost estimate. *

*/ private Integer count; /** *

* The price per hour to analyze the resources in the service. For more information, see Estimate your Amazon DevOps * Guru costs and Amazon DevOps Guru pricing. *

*/ private Double unitCost; /** *

* The total estimated monthly cost to analyze the active resources for this resource. *

*/ private Double cost; /** *

* The type of the Amazon Web Services resource. *

* * @param type * The type of the Amazon Web Services resource. */ public void setType(String type) { this.type = type; } /** *

* The type of the Amazon Web Services resource. *

* * @return The type of the Amazon Web Services resource. */ public String getType() { return this.type; } /** *

* The type of the Amazon Web Services resource. *

* * @param type * The type of the Amazon Web Services resource. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceResourceCost withType(String type) { setType(type); return this; } /** *

* The state of the resource. The resource is ACTIVE if it produces metrics, events, or logs within an * hour, otherwise it is INACTIVE. You pay for the number of active Amazon Web Services resource hours * analyzed for each resource. Inactive resources are not charged. *

* * @param state * The state of the resource. The resource is ACTIVE if it produces metrics, events, or logs * within an hour, otherwise it is INACTIVE. You pay for the number of active Amazon Web * Services resource hours analyzed for each resource. Inactive resources are not charged. * @see CostEstimationServiceResourceState */ public void setState(String state) { this.state = state; } /** *

* The state of the resource. The resource is ACTIVE if it produces metrics, events, or logs within an * hour, otherwise it is INACTIVE. You pay for the number of active Amazon Web Services resource hours * analyzed for each resource. Inactive resources are not charged. *

* * @return The state of the resource. The resource is ACTIVE if it produces metrics, events, or logs * within an hour, otherwise it is INACTIVE. You pay for the number of active Amazon Web * Services resource hours analyzed for each resource. Inactive resources are not charged. * @see CostEstimationServiceResourceState */ public String getState() { return this.state; } /** *

* The state of the resource. The resource is ACTIVE if it produces metrics, events, or logs within an * hour, otherwise it is INACTIVE. You pay for the number of active Amazon Web Services resource hours * analyzed for each resource. Inactive resources are not charged. *

* * @param state * The state of the resource. The resource is ACTIVE if it produces metrics, events, or logs * within an hour, otherwise it is INACTIVE. You pay for the number of active Amazon Web * Services resource hours analyzed for each resource. Inactive resources are not charged. * @return Returns a reference to this object so that method calls can be chained together. * @see CostEstimationServiceResourceState */ public ServiceResourceCost withState(String state) { setState(state); return this; } /** *

* The state of the resource. The resource is ACTIVE if it produces metrics, events, or logs within an * hour, otherwise it is INACTIVE. You pay for the number of active Amazon Web Services resource hours * analyzed for each resource. Inactive resources are not charged. *

* * @param state * The state of the resource. The resource is ACTIVE if it produces metrics, events, or logs * within an hour, otherwise it is INACTIVE. You pay for the number of active Amazon Web * Services resource hours analyzed for each resource. Inactive resources are not charged. * @return Returns a reference to this object so that method calls can be chained together. * @see CostEstimationServiceResourceState */ public ServiceResourceCost withState(CostEstimationServiceResourceState state) { this.state = state.toString(); return this; } /** *

* The number of active resources analyzed for this service to create a monthly cost estimate. *

* * @param count * The number of active resources analyzed for this service to create a monthly cost estimate. */ public void setCount(Integer count) { this.count = count; } /** *

* The number of active resources analyzed for this service to create a monthly cost estimate. *

* * @return The number of active resources analyzed for this service to create a monthly cost estimate. */ public Integer getCount() { return this.count; } /** *

* The number of active resources analyzed for this service to create a monthly cost estimate. *

* * @param count * The number of active resources analyzed for this service to create a monthly cost estimate. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceResourceCost withCount(Integer count) { setCount(count); return this; } /** *

* The price per hour to analyze the resources in the service. For more information, see Estimate your Amazon DevOps * Guru costs and Amazon DevOps Guru pricing. *

* * @param unitCost * The price per hour to analyze the resources in the service. For more information, see Estimate your Amazon * DevOps Guru costs and Amazon DevOps Guru * pricing. */ public void setUnitCost(Double unitCost) { this.unitCost = unitCost; } /** *

* The price per hour to analyze the resources in the service. For more information, see Estimate your Amazon DevOps * Guru costs and Amazon DevOps Guru pricing. *

* * @return The price per hour to analyze the resources in the service. For more information, see Estimate your Amazon * DevOps Guru costs and Amazon DevOps Guru * pricing. */ public Double getUnitCost() { return this.unitCost; } /** *

* The price per hour to analyze the resources in the service. For more information, see Estimate your Amazon DevOps * Guru costs and Amazon DevOps Guru pricing. *

* * @param unitCost * The price per hour to analyze the resources in the service. For more information, see Estimate your Amazon * DevOps Guru costs and Amazon DevOps Guru * pricing. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceResourceCost withUnitCost(Double unitCost) { setUnitCost(unitCost); return this; } /** *

* The total estimated monthly cost to analyze the active resources for this resource. *

* * @param cost * The total estimated monthly cost to analyze the active resources for this resource. */ public void setCost(Double cost) { this.cost = cost; } /** *

* The total estimated monthly cost to analyze the active resources for this resource. *

* * @return The total estimated monthly cost to analyze the active resources for this resource. */ public Double getCost() { return this.cost; } /** *

* The total estimated monthly cost to analyze the active resources for this resource. *

* * @param cost * The total estimated monthly cost to analyze the active resources for this resource. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceResourceCost withCost(Double cost) { setCost(cost); 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 (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getCount() != null) sb.append("Count: ").append(getCount()).append(","); if (getUnitCost() != null) sb.append("UnitCost: ").append(getUnitCost()).append(","); if (getCost() != null) sb.append("Cost: ").append(getCost()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ServiceResourceCost == false) return false; ServiceResourceCost other = (ServiceResourceCost) obj; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == false) return false; if (other.getCount() == null ^ this.getCount() == null) return false; if (other.getCount() != null && other.getCount().equals(this.getCount()) == false) return false; if (other.getUnitCost() == null ^ this.getUnitCost() == null) return false; if (other.getUnitCost() != null && other.getUnitCost().equals(this.getUnitCost()) == false) return false; if (other.getCost() == null ^ this.getCost() == null) return false; if (other.getCost() != null && other.getCost().equals(this.getCost()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getCount() == null) ? 0 : getCount().hashCode()); hashCode = prime * hashCode + ((getUnitCost() == null) ? 0 : getUnitCost().hashCode()); hashCode = prime * hashCode + ((getCost() == null) ? 0 : getCost().hashCode()); return hashCode; } @Override public ServiceResourceCost clone() { try { return (ServiceResourceCost) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.devopsguru.model.transform.ServiceResourceCostMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy