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

com.amazonaws.services.snowball.model.JobMetadata Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Snowball module holds the client classes that are used for communicating with Amazon Snowball.

There is a newer version: 1.12.788
Show newest version
/*
 * 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;

/**
 * 

* Contains information about a specific job including shipping information, job * status, and other important metadata. This information is returned as a part * of the response syntax of the DescribeJob action. *

*/ public class JobMetadata implements Serializable, Cloneable { /** *

* The automatically generated ID for a job. For example * JID123e4567-e89b-12d3-a456-426655440000. *

*/ private String jobId; /** *

*

*/ private String jobState; /** *

*

*/ private String jobType; /** *

*

*/ private java.util.Date creationDate; /** *

*

*/ private JobResource resources; /** *

*

*/ private String description; /** *

*

*/ private String kmsKeyARN; /** *

*

*/ private String roleARN; /** *

*

*/ private String addressId; /** *

*

*/ private ShippingDetails shippingDetails; /** *

*

*/ private String snowballCapacityPreference; /** *

*

*/ private Notification notification; /** *

*

*/ private DataTransfer dataTransferProgress; /** *

*

*/ private JobLogs jobLogInfo; /** *

* The automatically generated ID for a job. For example * JID123e4567-e89b-12d3-a456-426655440000. *

* * @param jobId * The automatically generated ID for a job. For example * JID123e4567-e89b-12d3-a456-426655440000. */ public void setJobId(String jobId) { this.jobId = jobId; } /** *

* The automatically generated ID for a job. For example * JID123e4567-e89b-12d3-a456-426655440000. *

* * @return The automatically generated ID for a job. For example * JID123e4567-e89b-12d3-a456-426655440000. */ public String getJobId() { return this.jobId; } /** *

* The automatically generated ID for a job. For example * JID123e4567-e89b-12d3-a456-426655440000. *

* * @param jobId * The automatically generated ID for a job. For example * JID123e4567-e89b-12d3-a456-426655440000. * @return Returns a reference to this object so that method calls can be * chained together. */ public JobMetadata withJobId(String jobId) { setJobId(jobId); return this; } /** *

*

* * @param jobState * @see JobState */ public void setJobState(String jobState) { this.jobState = jobState; } /** *

*

* * @return * @see JobState */ public String getJobState() { return this.jobState; } /** *

*

* * @param jobState * @return Returns a reference to this object so that method calls can be * chained together. * @see JobState */ public JobMetadata withJobState(String jobState) { setJobState(jobState); return this; } /** *

*

* * @param jobState * @see JobState */ public void setJobState(JobState jobState) { this.jobState = jobState.toString(); } /** *

*

* * @param jobState * @return Returns a reference to this object so that method calls can be * chained together. * @see JobState */ public JobMetadata withJobState(JobState jobState) { setJobState(jobState); return this; } /** *

*

* * @param jobType * @see JobType */ public void setJobType(String jobType) { this.jobType = jobType; } /** *

*

* * @return * @see JobType */ public String getJobType() { return this.jobType; } /** *

*

* * @param jobType * @return Returns a reference to this object so that method calls can be * chained together. * @see JobType */ public JobMetadata withJobType(String jobType) { setJobType(jobType); return this; } /** *

*

* * @param jobType * @see JobType */ public void setJobType(JobType jobType) { this.jobType = jobType.toString(); } /** *

*

* * @param jobType * @return Returns a reference to this object so that method calls can be * chained together. * @see JobType */ public JobMetadata withJobType(JobType jobType) { setJobType(jobType); return this; } /** *

*

* * @param creationDate */ public void setCreationDate(java.util.Date creationDate) { this.creationDate = creationDate; } /** *

*

* * @return */ public java.util.Date getCreationDate() { return this.creationDate; } /** *

*

* * @param creationDate * @return Returns a reference to this object so that method calls can be * chained together. */ public JobMetadata withCreationDate(java.util.Date creationDate) { setCreationDate(creationDate); return this; } /** *

*

* * @param resources */ public void setResources(JobResource resources) { this.resources = resources; } /** *

*

* * @return */ public JobResource getResources() { return this.resources; } /** *

*

* * @param resources * @return Returns a reference to this object so that method calls can be * chained together. */ public JobMetadata withResources(JobResource resources) { setResources(resources); return this; } /** *

*

* * @param description */ public void setDescription(String description) { this.description = description; } /** *

*

* * @return */ public String getDescription() { return this.description; } /** *

*

* * @param description * @return Returns a reference to this object so that method calls can be * chained together. */ public JobMetadata withDescription(String description) { setDescription(description); return this; } /** *

*

* * @param kmsKeyARN */ public void setKmsKeyARN(String kmsKeyARN) { this.kmsKeyARN = kmsKeyARN; } /** *

*

* * @return */ public String getKmsKeyARN() { return this.kmsKeyARN; } /** *

*

* * @param kmsKeyARN * @return Returns a reference to this object so that method calls can be * chained together. */ public JobMetadata withKmsKeyARN(String kmsKeyARN) { setKmsKeyARN(kmsKeyARN); return this; } /** *

*

* * @param roleARN */ public void setRoleARN(String roleARN) { this.roleARN = roleARN; } /** *

*

* * @return */ public String getRoleARN() { return this.roleARN; } /** *

*

* * @param roleARN * @return Returns a reference to this object so that method calls can be * chained together. */ public JobMetadata withRoleARN(String roleARN) { setRoleARN(roleARN); return this; } /** *

*

* * @param addressId */ public void setAddressId(String addressId) { this.addressId = addressId; } /** *

*

* * @return */ public String getAddressId() { return this.addressId; } /** *

*

* * @param addressId * @return Returns a reference to this object so that method calls can be * chained together. */ public JobMetadata withAddressId(String addressId) { setAddressId(addressId); return this; } /** *

*

* * @param shippingDetails */ public void setShippingDetails(ShippingDetails shippingDetails) { this.shippingDetails = shippingDetails; } /** *

*

* * @return */ public ShippingDetails getShippingDetails() { return this.shippingDetails; } /** *

*

* * @param shippingDetails * @return Returns a reference to this object so that method calls can be * chained together. */ public JobMetadata withShippingDetails(ShippingDetails shippingDetails) { setShippingDetails(shippingDetails); return this; } /** *

*

* * @param snowballCapacityPreference * @see SnowballCapacity */ public void setSnowballCapacityPreference(String snowballCapacityPreference) { this.snowballCapacityPreference = snowballCapacityPreference; } /** *

*

* * @return * @see SnowballCapacity */ public String getSnowballCapacityPreference() { return this.snowballCapacityPreference; } /** *

*

* * @param snowballCapacityPreference * @return Returns a reference to this object so that method calls can be * chained together. * @see SnowballCapacity */ public JobMetadata withSnowballCapacityPreference( String snowballCapacityPreference) { setSnowballCapacityPreference(snowballCapacityPreference); return this; } /** *

*

* * @param snowballCapacityPreference * @see SnowballCapacity */ public void setSnowballCapacityPreference( SnowballCapacity snowballCapacityPreference) { this.snowballCapacityPreference = snowballCapacityPreference.toString(); } /** *

*

* * @param snowballCapacityPreference * @return Returns a reference to this object so that method calls can be * chained together. * @see SnowballCapacity */ public JobMetadata withSnowballCapacityPreference( SnowballCapacity snowballCapacityPreference) { setSnowballCapacityPreference(snowballCapacityPreference); return this; } /** *

*

* * @param notification */ public void setNotification(Notification notification) { this.notification = notification; } /** *

*

* * @return */ public Notification getNotification() { return this.notification; } /** *

*

* * @param notification * @return Returns a reference to this object so that method calls can be * chained together. */ public JobMetadata withNotification(Notification notification) { setNotification(notification); return this; } /** *

*

* * @param dataTransferProgress */ public void setDataTransferProgress(DataTransfer dataTransferProgress) { this.dataTransferProgress = dataTransferProgress; } /** *

*

* * @return */ public DataTransfer getDataTransferProgress() { return this.dataTransferProgress; } /** *

*

* * @param dataTransferProgress * @return Returns a reference to this object so that method calls can be * chained together. */ public JobMetadata withDataTransferProgress( DataTransfer dataTransferProgress) { setDataTransferProgress(dataTransferProgress); return this; } /** *

*

* * @param jobLogInfo */ public void setJobLogInfo(JobLogs jobLogInfo) { this.jobLogInfo = jobLogInfo; } /** *

*

* * @return */ public JobLogs getJobLogInfo() { return this.jobLogInfo; } /** *

*

* * @param jobLogInfo * @return Returns a reference to this object so that method calls can be * chained together. */ public JobMetadata withJobLogInfo(JobLogs jobLogInfo) { setJobLogInfo(jobLogInfo); 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 (getJobState() != null) sb.append("JobState: " + getJobState() + ","); if (getJobType() != null) sb.append("JobType: " + getJobType() + ","); if (getCreationDate() != null) sb.append("CreationDate: " + getCreationDate() + ","); if (getResources() != null) sb.append("Resources: " + getResources() + ","); if (getDescription() != null) sb.append("Description: " + getDescription() + ","); if (getKmsKeyARN() != null) sb.append("KmsKeyARN: " + getKmsKeyARN() + ","); if (getRoleARN() != null) sb.append("RoleARN: " + getRoleARN() + ","); if (getAddressId() != null) sb.append("AddressId: " + getAddressId() + ","); if (getShippingDetails() != null) sb.append("ShippingDetails: " + getShippingDetails() + ","); if (getSnowballCapacityPreference() != null) sb.append("SnowballCapacityPreference: " + getSnowballCapacityPreference() + ","); if (getNotification() != null) sb.append("Notification: " + getNotification() + ","); if (getDataTransferProgress() != null) sb.append("DataTransferProgress: " + getDataTransferProgress() + ","); if (getJobLogInfo() != null) sb.append("JobLogInfo: " + getJobLogInfo()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof JobMetadata == false) return false; JobMetadata other = (JobMetadata) obj; if (other.getJobId() == null ^ this.getJobId() == null) return false; if (other.getJobId() != null && other.getJobId().equals(this.getJobId()) == false) return false; if (other.getJobState() == null ^ this.getJobState() == null) return false; if (other.getJobState() != null && other.getJobState().equals(this.getJobState()) == false) return false; if (other.getJobType() == null ^ this.getJobType() == null) return false; if (other.getJobType() != null && other.getJobType().equals(this.getJobType()) == false) return false; if (other.getCreationDate() == null ^ this.getCreationDate() == null) return false; if (other.getCreationDate() != null && other.getCreationDate().equals(this.getCreationDate()) == 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.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getKmsKeyARN() == null ^ this.getKmsKeyARN() == null) return false; if (other.getKmsKeyARN() != null && other.getKmsKeyARN().equals(this.getKmsKeyARN()) == 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.getAddressId() == null ^ this.getAddressId() == null) return false; if (other.getAddressId() != null && other.getAddressId().equals(this.getAddressId()) == false) return false; if (other.getShippingDetails() == null ^ this.getShippingDetails() == null) return false; if (other.getShippingDetails() != null && other.getShippingDetails().equals(this.getShippingDetails()) == false) return false; if (other.getSnowballCapacityPreference() == null ^ this.getSnowballCapacityPreference() == null) return false; if (other.getSnowballCapacityPreference() != null && other.getSnowballCapacityPreference().equals( this.getSnowballCapacityPreference()) == 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.getDataTransferProgress() == null ^ this.getDataTransferProgress() == null) return false; if (other.getDataTransferProgress() != null && other.getDataTransferProgress().equals( this.getDataTransferProgress()) == false) return false; if (other.getJobLogInfo() == null ^ this.getJobLogInfo() == null) return false; if (other.getJobLogInfo() != null && other.getJobLogInfo().equals(this.getJobLogInfo()) == 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 + ((getJobState() == null) ? 0 : getJobState().hashCode()); hashCode = prime * hashCode + ((getJobType() == null) ? 0 : getJobType().hashCode()); hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate() .hashCode()); hashCode = prime * hashCode + ((getResources() == null) ? 0 : getResources().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getKmsKeyARN() == null) ? 0 : getKmsKeyARN().hashCode()); hashCode = prime * hashCode + ((getRoleARN() == null) ? 0 : getRoleARN().hashCode()); hashCode = prime * hashCode + ((getAddressId() == null) ? 0 : getAddressId().hashCode()); hashCode = prime * hashCode + ((getShippingDetails() == null) ? 0 : getShippingDetails() .hashCode()); hashCode = prime * hashCode + ((getSnowballCapacityPreference() == null) ? 0 : getSnowballCapacityPreference().hashCode()); hashCode = prime * hashCode + ((getNotification() == null) ? 0 : getNotification() .hashCode()); hashCode = prime * hashCode + ((getDataTransferProgress() == null) ? 0 : getDataTransferProgress().hashCode()); hashCode = prime * hashCode + ((getJobLogInfo() == null) ? 0 : getJobLogInfo().hashCode()); return hashCode; } @Override public JobMetadata clone() { try { return (JobMetadata) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException( "Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy