com.amazonaws.services.snowball.model.TGWOnDeviceServiceConfiguration Maven / Gradle / Ivy
Show all versions of aws-java-sdk-snowball 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.snowball.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* An object that represents the metadata and configuration settings for the Storage Gateway service Tape Gateway type
* on an Amazon Web Services Snow Family device.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class TGWOnDeviceServiceConfiguration implements Serializable, Cloneable, StructuredPojo {
/**
*
* The maximum number of virtual tapes to store on one Snow Family device. Due to physical resource limitations,
* this value must be set to 80 for Snowball Edge.
*
*/
private Integer storageLimit;
/**
*
* The scale unit of the virtual tapes on the device.
*
*/
private String storageUnit;
/**
*
* The maximum number of virtual tapes to store on one Snow Family device. Due to physical resource limitations,
* this value must be set to 80 for Snowball Edge.
*
*
* @param storageLimit
* The maximum number of virtual tapes to store on one Snow Family device. Due to physical resource
* limitations, this value must be set to 80 for Snowball Edge.
*/
public void setStorageLimit(Integer storageLimit) {
this.storageLimit = storageLimit;
}
/**
*
* The maximum number of virtual tapes to store on one Snow Family device. Due to physical resource limitations,
* this value must be set to 80 for Snowball Edge.
*
*
* @return The maximum number of virtual tapes to store on one Snow Family device. Due to physical resource
* limitations, this value must be set to 80 for Snowball Edge.
*/
public Integer getStorageLimit() {
return this.storageLimit;
}
/**
*
* The maximum number of virtual tapes to store on one Snow Family device. Due to physical resource limitations,
* this value must be set to 80 for Snowball Edge.
*
*
* @param storageLimit
* The maximum number of virtual tapes to store on one Snow Family device. Due to physical resource
* limitations, this value must be set to 80 for Snowball Edge.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TGWOnDeviceServiceConfiguration withStorageLimit(Integer storageLimit) {
setStorageLimit(storageLimit);
return this;
}
/**
*
* The scale unit of the virtual tapes on the device.
*
*
* @param storageUnit
* The scale unit of the virtual tapes on the device.
* @see StorageUnit
*/
public void setStorageUnit(String storageUnit) {
this.storageUnit = storageUnit;
}
/**
*
* The scale unit of the virtual tapes on the device.
*
*
* @return The scale unit of the virtual tapes on the device.
* @see StorageUnit
*/
public String getStorageUnit() {
return this.storageUnit;
}
/**
*
* The scale unit of the virtual tapes on the device.
*
*
* @param storageUnit
* The scale unit of the virtual tapes on the device.
* @return Returns a reference to this object so that method calls can be chained together.
* @see StorageUnit
*/
public TGWOnDeviceServiceConfiguration withStorageUnit(String storageUnit) {
setStorageUnit(storageUnit);
return this;
}
/**
*
* The scale unit of the virtual tapes on the device.
*
*
* @param storageUnit
* The scale unit of the virtual tapes on the device.
* @return Returns a reference to this object so that method calls can be chained together.
* @see StorageUnit
*/
public TGWOnDeviceServiceConfiguration withStorageUnit(StorageUnit storageUnit) {
this.storageUnit = storageUnit.toString();
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 (getStorageLimit() != null)
sb.append("StorageLimit: ").append(getStorageLimit()).append(",");
if (getStorageUnit() != null)
sb.append("StorageUnit: ").append(getStorageUnit());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof TGWOnDeviceServiceConfiguration == false)
return false;
TGWOnDeviceServiceConfiguration other = (TGWOnDeviceServiceConfiguration) obj;
if (other.getStorageLimit() == null ^ this.getStorageLimit() == null)
return false;
if (other.getStorageLimit() != null && other.getStorageLimit().equals(this.getStorageLimit()) == false)
return false;
if (other.getStorageUnit() == null ^ this.getStorageUnit() == null)
return false;
if (other.getStorageUnit() != null && other.getStorageUnit().equals(this.getStorageUnit()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getStorageLimit() == null) ? 0 : getStorageLimit().hashCode());
hashCode = prime * hashCode + ((getStorageUnit() == null) ? 0 : getStorageUnit().hashCode());
return hashCode;
}
@Override
public TGWOnDeviceServiceConfiguration clone() {
try {
return (TGWOnDeviceServiceConfiguration) 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.snowball.model.transform.TGWOnDeviceServiceConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}