
com.amazonaws.services.lightsail.model.BucketBundle Maven / Gradle / Ivy
/*
* Copyright 2018-2023 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.lightsail.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Describes the specifications of a bundle that can be applied to an Amazon Lightsail bucket.
*
*
* A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class BucketBundle implements Serializable, Cloneable, StructuredPojo {
/**
*
* The ID of the bundle.
*
*/
private String bundleId;
/**
*
* The name of the bundle.
*
*/
private String name;
/**
*
* The monthly price of the bundle, in US dollars.
*
*/
private Float price;
/**
*
* The storage size of the bundle, in GB.
*
*/
private Integer storagePerMonthInGb;
/**
*
* The monthly network transfer quota of the bundle.
*
*/
private Integer transferPerMonthInGb;
/**
*
* Indicates whether the bundle is active. Use for a new or existing bucket.
*
*/
private Boolean isActive;
/**
*
* The ID of the bundle.
*
*
* @param bundleId
* The ID of the bundle.
*/
public void setBundleId(String bundleId) {
this.bundleId = bundleId;
}
/**
*
* The ID of the bundle.
*
*
* @return The ID of the bundle.
*/
public String getBundleId() {
return this.bundleId;
}
/**
*
* The ID of the bundle.
*
*
* @param bundleId
* The ID of the bundle.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketBundle withBundleId(String bundleId) {
setBundleId(bundleId);
return this;
}
/**
*
* The name of the bundle.
*
*
* @param name
* The name of the bundle.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the bundle.
*
*
* @return The name of the bundle.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the bundle.
*
*
* @param name
* The name of the bundle.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketBundle withName(String name) {
setName(name);
return this;
}
/**
*
* The monthly price of the bundle, in US dollars.
*
*
* @param price
* The monthly price of the bundle, in US dollars.
*/
public void setPrice(Float price) {
this.price = price;
}
/**
*
* The monthly price of the bundle, in US dollars.
*
*
* @return The monthly price of the bundle, in US dollars.
*/
public Float getPrice() {
return this.price;
}
/**
*
* The monthly price of the bundle, in US dollars.
*
*
* @param price
* The monthly price of the bundle, in US dollars.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketBundle withPrice(Float price) {
setPrice(price);
return this;
}
/**
*
* The storage size of the bundle, in GB.
*
*
* @param storagePerMonthInGb
* The storage size of the bundle, in GB.
*/
public void setStoragePerMonthInGb(Integer storagePerMonthInGb) {
this.storagePerMonthInGb = storagePerMonthInGb;
}
/**
*
* The storage size of the bundle, in GB.
*
*
* @return The storage size of the bundle, in GB.
*/
public Integer getStoragePerMonthInGb() {
return this.storagePerMonthInGb;
}
/**
*
* The storage size of the bundle, in GB.
*
*
* @param storagePerMonthInGb
* The storage size of the bundle, in GB.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketBundle withStoragePerMonthInGb(Integer storagePerMonthInGb) {
setStoragePerMonthInGb(storagePerMonthInGb);
return this;
}
/**
*
* The monthly network transfer quota of the bundle.
*
*
* @param transferPerMonthInGb
* The monthly network transfer quota of the bundle.
*/
public void setTransferPerMonthInGb(Integer transferPerMonthInGb) {
this.transferPerMonthInGb = transferPerMonthInGb;
}
/**
*
* The monthly network transfer quota of the bundle.
*
*
* @return The monthly network transfer quota of the bundle.
*/
public Integer getTransferPerMonthInGb() {
return this.transferPerMonthInGb;
}
/**
*
* The monthly network transfer quota of the bundle.
*
*
* @param transferPerMonthInGb
* The monthly network transfer quota of the bundle.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketBundle withTransferPerMonthInGb(Integer transferPerMonthInGb) {
setTransferPerMonthInGb(transferPerMonthInGb);
return this;
}
/**
*
* Indicates whether the bundle is active. Use for a new or existing bucket.
*
*
* @param isActive
* Indicates whether the bundle is active. Use for a new or existing bucket.
*/
public void setIsActive(Boolean isActive) {
this.isActive = isActive;
}
/**
*
* Indicates whether the bundle is active. Use for a new or existing bucket.
*
*
* @return Indicates whether the bundle is active. Use for a new or existing bucket.
*/
public Boolean getIsActive() {
return this.isActive;
}
/**
*
* Indicates whether the bundle is active. Use for a new or existing bucket.
*
*
* @param isActive
* Indicates whether the bundle is active. Use for a new or existing bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BucketBundle withIsActive(Boolean isActive) {
setIsActive(isActive);
return this;
}
/**
*
* Indicates whether the bundle is active. Use for a new or existing bucket.
*
*
* @return Indicates whether the bundle is active. Use for a new or existing bucket.
*/
public Boolean isActive() {
return this.isActive;
}
/**
* 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 (getBundleId() != null)
sb.append("BundleId: ").append(getBundleId()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getPrice() != null)
sb.append("Price: ").append(getPrice()).append(",");
if (getStoragePerMonthInGb() != null)
sb.append("StoragePerMonthInGb: ").append(getStoragePerMonthInGb()).append(",");
if (getTransferPerMonthInGb() != null)
sb.append("TransferPerMonthInGb: ").append(getTransferPerMonthInGb()).append(",");
if (getIsActive() != null)
sb.append("IsActive: ").append(getIsActive());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof BucketBundle == false)
return false;
BucketBundle other = (BucketBundle) obj;
if (other.getBundleId() == null ^ this.getBundleId() == null)
return false;
if (other.getBundleId() != null && other.getBundleId().equals(this.getBundleId()) == false)
return false;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getPrice() == null ^ this.getPrice() == null)
return false;
if (other.getPrice() != null && other.getPrice().equals(this.getPrice()) == false)
return false;
if (other.getStoragePerMonthInGb() == null ^ this.getStoragePerMonthInGb() == null)
return false;
if (other.getStoragePerMonthInGb() != null && other.getStoragePerMonthInGb().equals(this.getStoragePerMonthInGb()) == false)
return false;
if (other.getTransferPerMonthInGb() == null ^ this.getTransferPerMonthInGb() == null)
return false;
if (other.getTransferPerMonthInGb() != null && other.getTransferPerMonthInGb().equals(this.getTransferPerMonthInGb()) == false)
return false;
if (other.getIsActive() == null ^ this.getIsActive() == null)
return false;
if (other.getIsActive() != null && other.getIsActive().equals(this.getIsActive()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getBundleId() == null) ? 0 : getBundleId().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getPrice() == null) ? 0 : getPrice().hashCode());
hashCode = prime * hashCode + ((getStoragePerMonthInGb() == null) ? 0 : getStoragePerMonthInGb().hashCode());
hashCode = prime * hashCode + ((getTransferPerMonthInGb() == null) ? 0 : getTransferPerMonthInGb().hashCode());
hashCode = prime * hashCode + ((getIsActive() == null) ? 0 : getIsActive().hashCode());
return hashCode;
}
@Override
public BucketBundle clone() {
try {
return (BucketBundle) 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.lightsail.model.transform.BucketBundleMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}