
com.amazonaws.services.snowball.model.UpdateJobRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-snowball Show documentation
/*
* Copyright 2011-2016 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 com.amazonaws.AmazonWebServiceRequest;
/**
*
*/
public class UpdateJobRequest extends AmazonWebServiceRequest implements
Serializable, Cloneable {
/**
*
* The job ID of the job that you want to update, for example
* JID123e4567-e89b-12d3-a456-426655440000
.
*
*/
private String jobId;
/**
*
* The new role Amazon Resource Name (ARN) that you want to associate with
* this job. To create a role ARN, use the CreateRole AWS Identity and Access Management (IAM) API action.
*
*/
private String roleARN;
/**
*
* The new or updated Notification object.
*
*/
private Notification notification;
/**
*
* The updated S3Resource object (for a single Amazon S3 bucket or
* key range), or the updated JobResource object (for multiple
* buckets or key ranges).
*
*/
private JobResource resources;
/**
*
* The ID of the updated Address object.
*
*/
private String addressId;
/**
*
* The updated shipping option value of this job's ShippingDetails
* object.
*
*/
private String shippingOption;
/**
*
* The updated description of this job's JobMetadata object.
*
*/
private String description;
/**
*
* The updated SnowballCapacityPreference
of this job's
* JobMetadata object. Note that the 50 TB Snowballs are only
* available in the US regions.
*
*/
private String snowballCapacityPreference;
/**
*
* The job ID of the job that you want to update, for example
* JID123e4567-e89b-12d3-a456-426655440000
.
*
*
* @param jobId
* The job ID of the job that you want to update, for example
* JID123e4567-e89b-12d3-a456-426655440000
.
*/
public void setJobId(String jobId) {
this.jobId = jobId;
}
/**
*
* The job ID of the job that you want to update, for example
* JID123e4567-e89b-12d3-a456-426655440000
.
*
*
* @return The job ID of the job that you want to update, for example
* JID123e4567-e89b-12d3-a456-426655440000
.
*/
public String getJobId() {
return this.jobId;
}
/**
*
* The job ID of the job that you want to update, for example
* JID123e4567-e89b-12d3-a456-426655440000
.
*
*
* @param jobId
* The job ID of the job that you want to update, for example
* JID123e4567-e89b-12d3-a456-426655440000
.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public UpdateJobRequest withJobId(String jobId) {
setJobId(jobId);
return this;
}
/**
*
* The new role Amazon Resource Name (ARN) that you want to associate with
* this job. To create a role ARN, use the CreateRole AWS Identity and Access Management (IAM) API action.
*
*
* @param roleARN
* The new role Amazon Resource Name (ARN) that you want to associate
* with this job. To create a role ARN, use the CreateRole AWS Identity and Access Management (IAM) API
* action.
*/
public void setRoleARN(String roleARN) {
this.roleARN = roleARN;
}
/**
*
* The new role Amazon Resource Name (ARN) that you want to associate with
* this job. To create a role ARN, use the CreateRole AWS Identity and Access Management (IAM) API action.
*
*
* @return The new role Amazon Resource Name (ARN) that you want to
* associate with this job. To create a role ARN, use the CreateRole AWS Identity and Access Management (IAM) API
* action.
*/
public String getRoleARN() {
return this.roleARN;
}
/**
*
* The new role Amazon Resource Name (ARN) that you want to associate with
* this job. To create a role ARN, use the CreateRole AWS Identity and Access Management (IAM) API action.
*
*
* @param roleARN
* The new role Amazon Resource Name (ARN) that you want to associate
* with this job. To create a role ARN, use the CreateRole AWS Identity and Access Management (IAM) API
* action.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public UpdateJobRequest withRoleARN(String roleARN) {
setRoleARN(roleARN);
return this;
}
/**
*
* The new or updated Notification object.
*
*
* @param notification
* The new or updated Notification object.
*/
public void setNotification(Notification notification) {
this.notification = notification;
}
/**
*
* The new or updated Notification object.
*
*
* @return The new or updated Notification object.
*/
public Notification getNotification() {
return this.notification;
}
/**
*
* The new or updated Notification object.
*
*
* @param notification
* The new or updated Notification object.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public UpdateJobRequest withNotification(Notification notification) {
setNotification(notification);
return this;
}
/**
*
* The updated S3Resource object (for a single Amazon S3 bucket or
* key range), or the updated JobResource object (for multiple
* buckets or key ranges).
*
*
* @param resources
* The updated S3Resource object (for a single Amazon S3
* bucket or key range), or the updated JobResource object
* (for multiple buckets or key ranges).
*/
public void setResources(JobResource resources) {
this.resources = resources;
}
/**
*
* The updated S3Resource object (for a single Amazon S3 bucket or
* key range), or the updated JobResource object (for multiple
* buckets or key ranges).
*
*
* @return The updated S3Resource object (for a single Amazon S3
* bucket or key range), or the updated JobResource object
* (for multiple buckets or key ranges).
*/
public JobResource getResources() {
return this.resources;
}
/**
*
* The updated S3Resource object (for a single Amazon S3 bucket or
* key range), or the updated JobResource object (for multiple
* buckets or key ranges).
*
*
* @param resources
* The updated S3Resource object (for a single Amazon S3
* bucket or key range), or the updated JobResource object
* (for multiple buckets or key ranges).
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public UpdateJobRequest withResources(JobResource resources) {
setResources(resources);
return this;
}
/**
*
* The ID of the updated Address object.
*
*
* @param addressId
* The ID of the updated Address object.
*/
public void setAddressId(String addressId) {
this.addressId = addressId;
}
/**
*
* The ID of the updated Address object.
*
*
* @return The ID of the updated Address object.
*/
public String getAddressId() {
return this.addressId;
}
/**
*
* The ID of the updated Address object.
*
*
* @param addressId
* The ID of the updated Address object.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public UpdateJobRequest withAddressId(String addressId) {
setAddressId(addressId);
return this;
}
/**
*
* The updated shipping option value of this job's ShippingDetails
* object.
*
*
* @param shippingOption
* The updated shipping option value of this job's
* ShippingDetails object.
* @see ShippingOption
*/
public void setShippingOption(String shippingOption) {
this.shippingOption = shippingOption;
}
/**
*
* The updated shipping option value of this job's ShippingDetails
* object.
*
*
* @return The updated shipping option value of this job's
* ShippingDetails object.
* @see ShippingOption
*/
public String getShippingOption() {
return this.shippingOption;
}
/**
*
* The updated shipping option value of this job's ShippingDetails
* object.
*
*
* @param shippingOption
* The updated shipping option value of this job's
* ShippingDetails object.
* @return Returns a reference to this object so that method calls can be
* chained together.
* @see ShippingOption
*/
public UpdateJobRequest withShippingOption(String shippingOption) {
setShippingOption(shippingOption);
return this;
}
/**
*
* The updated shipping option value of this job's ShippingDetails
* object.
*
*
* @param shippingOption
* The updated shipping option value of this job's
* ShippingDetails object.
* @see ShippingOption
*/
public void setShippingOption(ShippingOption shippingOption) {
this.shippingOption = shippingOption.toString();
}
/**
*
* The updated shipping option value of this job's ShippingDetails
* object.
*
*
* @param shippingOption
* The updated shipping option value of this job's
* ShippingDetails object.
* @return Returns a reference to this object so that method calls can be
* chained together.
* @see ShippingOption
*/
public UpdateJobRequest withShippingOption(ShippingOption shippingOption) {
setShippingOption(shippingOption);
return this;
}
/**
*
* The updated description of this job's JobMetadata object.
*
*
* @param description
* The updated description of this job's JobMetadata object.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* The updated description of this job's JobMetadata object.
*
*
* @return The updated description of this job's JobMetadata object.
*/
public String getDescription() {
return this.description;
}
/**
*
* The updated description of this job's JobMetadata object.
*
*
* @param description
* The updated description of this job's JobMetadata object.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public UpdateJobRequest withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The updated SnowballCapacityPreference
of this job's
* JobMetadata object. Note that the 50 TB Snowballs are only
* available in the US regions.
*
*
* @param snowballCapacityPreference
* The updated SnowballCapacityPreference
of this job's
* JobMetadata object. Note that the 50 TB Snowballs are only
* available in the US regions.
* @see SnowballCapacity
*/
public void setSnowballCapacityPreference(String snowballCapacityPreference) {
this.snowballCapacityPreference = snowballCapacityPreference;
}
/**
*
* The updated SnowballCapacityPreference
of this job's
* JobMetadata object. Note that the 50 TB Snowballs are only
* available in the US regions.
*
*
* @return The updated SnowballCapacityPreference
of this job's
* JobMetadata object. Note that the 50 TB Snowballs are only
* available in the US regions.
* @see SnowballCapacity
*/
public String getSnowballCapacityPreference() {
return this.snowballCapacityPreference;
}
/**
*
* The updated SnowballCapacityPreference
of this job's
* JobMetadata object. Note that the 50 TB Snowballs are only
* available in the US regions.
*
*
* @param snowballCapacityPreference
* The updated SnowballCapacityPreference
of this job's
* JobMetadata object. Note that the 50 TB Snowballs are only
* available in the US regions.
* @return Returns a reference to this object so that method calls can be
* chained together.
* @see SnowballCapacity
*/
public UpdateJobRequest withSnowballCapacityPreference(
String snowballCapacityPreference) {
setSnowballCapacityPreference(snowballCapacityPreference);
return this;
}
/**
*
* The updated SnowballCapacityPreference
of this job's
* JobMetadata object. Note that the 50 TB Snowballs are only
* available in the US regions.
*
*
* @param snowballCapacityPreference
* The updated SnowballCapacityPreference
of this job's
* JobMetadata object. Note that the 50 TB Snowballs are only
* available in the US regions.
* @see SnowballCapacity
*/
public void setSnowballCapacityPreference(
SnowballCapacity snowballCapacityPreference) {
this.snowballCapacityPreference = snowballCapacityPreference.toString();
}
/**
*
* The updated SnowballCapacityPreference
of this job's
* JobMetadata object. Note that the 50 TB Snowballs are only
* available in the US regions.
*
*
* @param snowballCapacityPreference
* The updated SnowballCapacityPreference
of this job's
* JobMetadata object. Note that the 50 TB Snowballs are only
* available in the US regions.
* @return Returns a reference to this object so that method calls can be
* chained together.
* @see SnowballCapacity
*/
public UpdateJobRequest withSnowballCapacityPreference(
SnowballCapacity snowballCapacityPreference) {
setSnowballCapacityPreference(snowballCapacityPreference);
return this;
}
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getJobId() != null)
sb.append("JobId: " + getJobId() + ",");
if (getRoleARN() != null)
sb.append("RoleARN: " + getRoleARN() + ",");
if (getNotification() != null)
sb.append("Notification: " + getNotification() + ",");
if (getResources() != null)
sb.append("Resources: " + getResources() + ",");
if (getAddressId() != null)
sb.append("AddressId: " + getAddressId() + ",");
if (getShippingOption() != null)
sb.append("ShippingOption: " + getShippingOption() + ",");
if (getDescription() != null)
sb.append("Description: " + getDescription() + ",");
if (getSnowballCapacityPreference() != null)
sb.append("SnowballCapacityPreference: "
+ getSnowballCapacityPreference());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateJobRequest == false)
return false;
UpdateJobRequest other = (UpdateJobRequest) obj;
if (other.getJobId() == null ^ this.getJobId() == null)
return false;
if (other.getJobId() != null
&& other.getJobId().equals(this.getJobId()) == false)
return false;
if (other.getRoleARN() == null ^ this.getRoleARN() == null)
return false;
if (other.getRoleARN() != null
&& other.getRoleARN().equals(this.getRoleARN()) == false)
return false;
if (other.getNotification() == null ^ this.getNotification() == null)
return false;
if (other.getNotification() != null
&& other.getNotification().equals(this.getNotification()) == false)
return false;
if (other.getResources() == null ^ this.getResources() == null)
return false;
if (other.getResources() != null
&& other.getResources().equals(this.getResources()) == false)
return false;
if (other.getAddressId() == null ^ this.getAddressId() == null)
return false;
if (other.getAddressId() != null
&& other.getAddressId().equals(this.getAddressId()) == false)
return false;
if (other.getShippingOption() == null
^ this.getShippingOption() == null)
return false;
if (other.getShippingOption() != null
&& other.getShippingOption().equals(this.getShippingOption()) == 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.getSnowballCapacityPreference() == null
^ this.getSnowballCapacityPreference() == null)
return false;
if (other.getSnowballCapacityPreference() != null
&& other.getSnowballCapacityPreference().equals(
this.getSnowballCapacityPreference()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode
+ ((getJobId() == null) ? 0 : getJobId().hashCode());
hashCode = prime * hashCode
+ ((getRoleARN() == null) ? 0 : getRoleARN().hashCode());
hashCode = prime
* hashCode
+ ((getNotification() == null) ? 0 : getNotification()
.hashCode());
hashCode = prime * hashCode
+ ((getResources() == null) ? 0 : getResources().hashCode());
hashCode = prime * hashCode
+ ((getAddressId() == null) ? 0 : getAddressId().hashCode());
hashCode = prime
* hashCode
+ ((getShippingOption() == null) ? 0 : getShippingOption()
.hashCode());
hashCode = prime
* hashCode
+ ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime
* hashCode
+ ((getSnowballCapacityPreference() == null) ? 0
: getSnowballCapacityPreference().hashCode());
return hashCode;
}
@Override
public UpdateJobRequest clone() {
return (UpdateJobRequest) super.clone();
}
}