com.amazonaws.services.deadline.model.GetBudgetResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-deadline 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.deadline.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetBudgetResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The budget actions for the budget.
*
*/
private java.util.List actions;
/**
*
* The consumed usage limit for the budget.
*
*/
private Float approximateDollarLimit;
/**
*
* The budget ID.
*
*/
private String budgetId;
/**
*
* The date and time the resource was created.
*
*/
private java.util.Date createdAt;
/**
*
* The user or system that created this resource.
*
*/
private String createdBy;
/**
*
* The description of the budget.
*
*/
private String description;
/**
*
* The display name of the budget.
*
*/
private String displayName;
/**
*
* The date and time the queue stopped.
*
*/
private java.util.Date queueStoppedAt;
/**
*
* The budget schedule.
*
*/
private BudgetSchedule schedule;
/**
*
* The status of the budget.
*
*
* -
*
* ACTIVE
–Get a budget being evaluated.
*
*
* -
*
* INACTIVE
–Get an inactive budget. This can include expired, canceled, or deleted statuses.
*
*
*
*/
private String status;
/**
*
* The date and time the resource was updated.
*
*/
private java.util.Date updatedAt;
/**
*
* The user or system that updated this resource.
*
*/
private String updatedBy;
/**
*
* The resource that the budget is tracking usage for.
*
*/
private UsageTrackingResource usageTrackingResource;
/**
*
* The usages of the budget.
*
*/
private ConsumedUsages usages;
/**
*
* The budget actions for the budget.
*
*
* @return The budget actions for the budget.
*/
public java.util.List getActions() {
return actions;
}
/**
*
* The budget actions for the budget.
*
*
* @param actions
* The budget actions for the budget.
*/
public void setActions(java.util.Collection actions) {
if (actions == null) {
this.actions = null;
return;
}
this.actions = new java.util.ArrayList(actions);
}
/**
*
* The budget actions for the budget.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setActions(java.util.Collection)} or {@link #withActions(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param actions
* The budget actions for the budget.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetBudgetResult withActions(ResponseBudgetAction... actions) {
if (this.actions == null) {
setActions(new java.util.ArrayList(actions.length));
}
for (ResponseBudgetAction ele : actions) {
this.actions.add(ele);
}
return this;
}
/**
*
* The budget actions for the budget.
*
*
* @param actions
* The budget actions for the budget.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetBudgetResult withActions(java.util.Collection actions) {
setActions(actions);
return this;
}
/**
*
* The consumed usage limit for the budget.
*
*
* @param approximateDollarLimit
* The consumed usage limit for the budget.
*/
public void setApproximateDollarLimit(Float approximateDollarLimit) {
this.approximateDollarLimit = approximateDollarLimit;
}
/**
*
* The consumed usage limit for the budget.
*
*
* @return The consumed usage limit for the budget.
*/
public Float getApproximateDollarLimit() {
return this.approximateDollarLimit;
}
/**
*
* The consumed usage limit for the budget.
*
*
* @param approximateDollarLimit
* The consumed usage limit for the budget.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetBudgetResult withApproximateDollarLimit(Float approximateDollarLimit) {
setApproximateDollarLimit(approximateDollarLimit);
return this;
}
/**
*
* The budget ID.
*
*
* @param budgetId
* The budget ID.
*/
public void setBudgetId(String budgetId) {
this.budgetId = budgetId;
}
/**
*
* The budget ID.
*
*
* @return The budget ID.
*/
public String getBudgetId() {
return this.budgetId;
}
/**
*
* The budget ID.
*
*
* @param budgetId
* The budget ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetBudgetResult withBudgetId(String budgetId) {
setBudgetId(budgetId);
return this;
}
/**
*
* The date and time the resource was created.
*
*
* @param createdAt
* The date and time the resource was created.
*/
public void setCreatedAt(java.util.Date createdAt) {
this.createdAt = createdAt;
}
/**
*
* The date and time the resource was created.
*
*
* @return The date and time the resource was created.
*/
public java.util.Date getCreatedAt() {
return this.createdAt;
}
/**
*
* The date and time the resource was created.
*
*
* @param createdAt
* The date and time the resource was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetBudgetResult withCreatedAt(java.util.Date createdAt) {
setCreatedAt(createdAt);
return this;
}
/**
*
* The user or system that created this resource.
*
*
* @param createdBy
* The user or system that created this resource.
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
*
* The user or system that created this resource.
*
*
* @return The user or system that created this resource.
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
*
* The user or system that created this resource.
*
*
* @param createdBy
* The user or system that created this resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetBudgetResult withCreatedBy(String createdBy) {
setCreatedBy(createdBy);
return this;
}
/**
*
* The description of the budget.
*
*
* @param description
* The description of the budget.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* The description of the budget.
*
*
* @return The description of the budget.
*/
public String getDescription() {
return this.description;
}
/**
*
* The description of the budget.
*
*
* @param description
* The description of the budget.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetBudgetResult withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The display name of the budget.
*
*
* @param displayName
* The display name of the budget.
*/
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
/**
*
* The display name of the budget.
*
*
* @return The display name of the budget.
*/
public String getDisplayName() {
return this.displayName;
}
/**
*
* The display name of the budget.
*
*
* @param displayName
* The display name of the budget.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetBudgetResult withDisplayName(String displayName) {
setDisplayName(displayName);
return this;
}
/**
*
* The date and time the queue stopped.
*
*
* @param queueStoppedAt
* The date and time the queue stopped.
*/
public void setQueueStoppedAt(java.util.Date queueStoppedAt) {
this.queueStoppedAt = queueStoppedAt;
}
/**
*
* The date and time the queue stopped.
*
*
* @return The date and time the queue stopped.
*/
public java.util.Date getQueueStoppedAt() {
return this.queueStoppedAt;
}
/**
*
* The date and time the queue stopped.
*
*
* @param queueStoppedAt
* The date and time the queue stopped.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetBudgetResult withQueueStoppedAt(java.util.Date queueStoppedAt) {
setQueueStoppedAt(queueStoppedAt);
return this;
}
/**
*
* The budget schedule.
*
*
* @param schedule
* The budget schedule.
*/
public void setSchedule(BudgetSchedule schedule) {
this.schedule = schedule;
}
/**
*
* The budget schedule.
*
*
* @return The budget schedule.
*/
public BudgetSchedule getSchedule() {
return this.schedule;
}
/**
*
* The budget schedule.
*
*
* @param schedule
* The budget schedule.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetBudgetResult withSchedule(BudgetSchedule schedule) {
setSchedule(schedule);
return this;
}
/**
*
* The status of the budget.
*
*
* -
*
* ACTIVE
–Get a budget being evaluated.
*
*
* -
*
* INACTIVE
–Get an inactive budget. This can include expired, canceled, or deleted statuses.
*
*
*
*
* @param status
* The status of the budget.
*
* -
*
* ACTIVE
–Get a budget being evaluated.
*
*
* -
*
* INACTIVE
–Get an inactive budget. This can include expired, canceled, or deleted statuses.
*
*
* @see BudgetStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status of the budget.
*
*
* -
*
* ACTIVE
–Get a budget being evaluated.
*
*
* -
*
* INACTIVE
–Get an inactive budget. This can include expired, canceled, or deleted statuses.
*
*
*
*
* @return The status of the budget.
*
* -
*
* ACTIVE
–Get a budget being evaluated.
*
*
* -
*
* INACTIVE
–Get an inactive budget. This can include expired, canceled, or deleted statuses.
*
*
* @see BudgetStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The status of the budget.
*
*
* -
*
* ACTIVE
–Get a budget being evaluated.
*
*
* -
*
* INACTIVE
–Get an inactive budget. This can include expired, canceled, or deleted statuses.
*
*
*
*
* @param status
* The status of the budget.
*
* -
*
* ACTIVE
–Get a budget being evaluated.
*
*
* -
*
* INACTIVE
–Get an inactive budget. This can include expired, canceled, or deleted statuses.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see BudgetStatus
*/
public GetBudgetResult withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The status of the budget.
*
*
* -
*
* ACTIVE
–Get a budget being evaluated.
*
*
* -
*
* INACTIVE
–Get an inactive budget. This can include expired, canceled, or deleted statuses.
*
*
*
*
* @param status
* The status of the budget.
*
* -
*
* ACTIVE
–Get a budget being evaluated.
*
*
* -
*
* INACTIVE
–Get an inactive budget. This can include expired, canceled, or deleted statuses.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see BudgetStatus
*/
public GetBudgetResult withStatus(BudgetStatus status) {
this.status = status.toString();
return this;
}
/**
*
* The date and time the resource was updated.
*
*
* @param updatedAt
* The date and time the resource was updated.
*/
public void setUpdatedAt(java.util.Date updatedAt) {
this.updatedAt = updatedAt;
}
/**
*
* The date and time the resource was updated.
*
*
* @return The date and time the resource was updated.
*/
public java.util.Date getUpdatedAt() {
return this.updatedAt;
}
/**
*
* The date and time the resource was updated.
*
*
* @param updatedAt
* The date and time the resource was updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetBudgetResult withUpdatedAt(java.util.Date updatedAt) {
setUpdatedAt(updatedAt);
return this;
}
/**
*
* The user or system that updated this resource.
*
*
* @param updatedBy
* The user or system that updated this resource.
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
*
* The user or system that updated this resource.
*
*
* @return The user or system that updated this resource.
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
*
* The user or system that updated this resource.
*
*
* @param updatedBy
* The user or system that updated this resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetBudgetResult withUpdatedBy(String updatedBy) {
setUpdatedBy(updatedBy);
return this;
}
/**
*
* The resource that the budget is tracking usage for.
*
*
* @param usageTrackingResource
* The resource that the budget is tracking usage for.
*/
public void setUsageTrackingResource(UsageTrackingResource usageTrackingResource) {
this.usageTrackingResource = usageTrackingResource;
}
/**
*
* The resource that the budget is tracking usage for.
*
*
* @return The resource that the budget is tracking usage for.
*/
public UsageTrackingResource getUsageTrackingResource() {
return this.usageTrackingResource;
}
/**
*
* The resource that the budget is tracking usage for.
*
*
* @param usageTrackingResource
* The resource that the budget is tracking usage for.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetBudgetResult withUsageTrackingResource(UsageTrackingResource usageTrackingResource) {
setUsageTrackingResource(usageTrackingResource);
return this;
}
/**
*
* The usages of the budget.
*
*
* @param usages
* The usages of the budget.
*/
public void setUsages(ConsumedUsages usages) {
this.usages = usages;
}
/**
*
* The usages of the budget.
*
*
* @return The usages of the budget.
*/
public ConsumedUsages getUsages() {
return this.usages;
}
/**
*
* The usages of the budget.
*
*
* @param usages
* The usages of the budget.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetBudgetResult withUsages(ConsumedUsages usages) {
setUsages(usages);
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 (getActions() != null)
sb.append("Actions: ").append(getActions()).append(",");
if (getApproximateDollarLimit() != null)
sb.append("ApproximateDollarLimit: ").append(getApproximateDollarLimit()).append(",");
if (getBudgetId() != null)
sb.append("BudgetId: ").append(getBudgetId()).append(",");
if (getCreatedAt() != null)
sb.append("CreatedAt: ").append(getCreatedAt()).append(",");
if (getCreatedBy() != null)
sb.append("CreatedBy: ").append(getCreatedBy()).append(",");
if (getDescription() != null)
sb.append("Description: ").append("***Sensitive Data Redacted***").append(",");
if (getDisplayName() != null)
sb.append("DisplayName: ").append(getDisplayName()).append(",");
if (getQueueStoppedAt() != null)
sb.append("QueueStoppedAt: ").append(getQueueStoppedAt()).append(",");
if (getSchedule() != null)
sb.append("Schedule: ").append(getSchedule()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getUpdatedAt() != null)
sb.append("UpdatedAt: ").append(getUpdatedAt()).append(",");
if (getUpdatedBy() != null)
sb.append("UpdatedBy: ").append(getUpdatedBy()).append(",");
if (getUsageTrackingResource() != null)
sb.append("UsageTrackingResource: ").append(getUsageTrackingResource()).append(",");
if (getUsages() != null)
sb.append("Usages: ").append(getUsages());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetBudgetResult == false)
return false;
GetBudgetResult other = (GetBudgetResult) obj;
if (other.getActions() == null ^ this.getActions() == null)
return false;
if (other.getActions() != null && other.getActions().equals(this.getActions()) == false)
return false;
if (other.getApproximateDollarLimit() == null ^ this.getApproximateDollarLimit() == null)
return false;
if (other.getApproximateDollarLimit() != null && other.getApproximateDollarLimit().equals(this.getApproximateDollarLimit()) == false)
return false;
if (other.getBudgetId() == null ^ this.getBudgetId() == null)
return false;
if (other.getBudgetId() != null && other.getBudgetId().equals(this.getBudgetId()) == false)
return false;
if (other.getCreatedAt() == null ^ this.getCreatedAt() == null)
return false;
if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false)
return false;
if (other.getCreatedBy() == null ^ this.getCreatedBy() == null)
return false;
if (other.getCreatedBy() != null && other.getCreatedBy().equals(this.getCreatedBy()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getDisplayName() == null ^ this.getDisplayName() == null)
return false;
if (other.getDisplayName() != null && other.getDisplayName().equals(this.getDisplayName()) == false)
return false;
if (other.getQueueStoppedAt() == null ^ this.getQueueStoppedAt() == null)
return false;
if (other.getQueueStoppedAt() != null && other.getQueueStoppedAt().equals(this.getQueueStoppedAt()) == false)
return false;
if (other.getSchedule() == null ^ this.getSchedule() == null)
return false;
if (other.getSchedule() != null && other.getSchedule().equals(this.getSchedule()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
if (other.getUpdatedAt() == null ^ this.getUpdatedAt() == null)
return false;
if (other.getUpdatedAt() != null && other.getUpdatedAt().equals(this.getUpdatedAt()) == false)
return false;
if (other.getUpdatedBy() == null ^ this.getUpdatedBy() == null)
return false;
if (other.getUpdatedBy() != null && other.getUpdatedBy().equals(this.getUpdatedBy()) == false)
return false;
if (other.getUsageTrackingResource() == null ^ this.getUsageTrackingResource() == null)
return false;
if (other.getUsageTrackingResource() != null && other.getUsageTrackingResource().equals(this.getUsageTrackingResource()) == false)
return false;
if (other.getUsages() == null ^ this.getUsages() == null)
return false;
if (other.getUsages() != null && other.getUsages().equals(this.getUsages()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getActions() == null) ? 0 : getActions().hashCode());
hashCode = prime * hashCode + ((getApproximateDollarLimit() == null) ? 0 : getApproximateDollarLimit().hashCode());
hashCode = prime * hashCode + ((getBudgetId() == null) ? 0 : getBudgetId().hashCode());
hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
hashCode = prime * hashCode + ((getCreatedBy() == null) ? 0 : getCreatedBy().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getDisplayName() == null) ? 0 : getDisplayName().hashCode());
hashCode = prime * hashCode + ((getQueueStoppedAt() == null) ? 0 : getQueueStoppedAt().hashCode());
hashCode = prime * hashCode + ((getSchedule() == null) ? 0 : getSchedule().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
hashCode = prime * hashCode + ((getUpdatedBy() == null) ? 0 : getUpdatedBy().hashCode());
hashCode = prime * hashCode + ((getUsageTrackingResource() == null) ? 0 : getUsageTrackingResource().hashCode());
hashCode = prime * hashCode + ((getUsages() == null) ? 0 : getUsages().hashCode());
return hashCode;
}
@Override
public GetBudgetResult clone() {
try {
return (GetBudgetResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}