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

com.amazonaws.services.mediastoredata.model.PutObjectRequest Maven / Gradle / Ivy

/*
 * Copyright 2016-2021 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.mediastoredata.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.auth.SignerTypeAware;

/**
 * 
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class PutObjectRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable, SignerTypeAware {

    /**
     * 

* The bytes to be stored. *

*/ private java.io.InputStream body; /** *

* The path (including the file name) where the object is stored in the container. Format: <folder * name>/<folder name>/<file name> *

*

* For example, to upload the file mlaw.avi to the folder path premium\canada in the * container movies, enter the path premium/canada/mlaw.avi. *

*

* Do not include the container name in this path. *

*

* If the path includes any folders that don't exist yet, the service creates them. For example, suppose you have an * existing premium/usa subfolder. If you specify premium/canada, the service creates a * canada subfolder in the premium folder. You then have two subfolders, usa * and canada, in the premium folder. *

*

* There is no correlation between the path to the source and the path (folders) in the container in AWS Elemental * MediaStore. *

*

* For more information about folders and how they exist in a container, see the AWS Elemental MediaStore User Guide. *

*

* The file name is the name that is assigned to the file that you upload. The file can have the same name inside * and outside of AWS Elemental MediaStore, or it can have the same name. The file name can include or omit an * extension. *

*/ private String path; /** *

* The content type of the object. *

*/ private String contentType; /** *

* An optional CacheControl header that allows the caller to control the object's cache behavior. * Headers can be passed in as specified in the HTTP at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9. *

*

* Headers with a custom user-defined value are also accepted. *

*/ private String cacheControl; /** *

* Indicates the storage class of a Put request. Defaults to high-performance temporal storage class, * and objects are persisted into durable storage shortly after being received. *

*/ private String storageClass; /** *

* Indicates the availability of an object while it is still uploading. If the value is set to * streaming, the object is available for downloading after some initial buffering but before the * object is uploaded completely. If the value is set to standard, the object is available for * downloading only when it is uploaded completely. The default value for this header is standard. *

*

* To use this header, you must also set the HTTP Transfer-Encoding header to chunked. *

*/ private String uploadAvailability; /** *

* The bytes to be stored. *

* * @param body * The bytes to be stored. */ public void setBody(java.io.InputStream body) { this.body = body; } /** *

* The bytes to be stored. *

* * @return The bytes to be stored. */ public java.io.InputStream getBody() { return this.body; } /** *

* The bytes to be stored. *

* * @param body * The bytes to be stored. * @return Returns a reference to this object so that method calls can be chained together. */ public PutObjectRequest withBody(java.io.InputStream body) { setBody(body); return this; } /** *

* The path (including the file name) where the object is stored in the container. Format: <folder * name>/<folder name>/<file name> *

*

* For example, to upload the file mlaw.avi to the folder path premium\canada in the * container movies, enter the path premium/canada/mlaw.avi. *

*

* Do not include the container name in this path. *

*

* If the path includes any folders that don't exist yet, the service creates them. For example, suppose you have an * existing premium/usa subfolder. If you specify premium/canada, the service creates a * canada subfolder in the premium folder. You then have two subfolders, usa * and canada, in the premium folder. *

*

* There is no correlation between the path to the source and the path (folders) in the container in AWS Elemental * MediaStore. *

*

* For more information about folders and how they exist in a container, see the AWS Elemental MediaStore User Guide. *

*

* The file name is the name that is assigned to the file that you upload. The file can have the same name inside * and outside of AWS Elemental MediaStore, or it can have the same name. The file name can include or omit an * extension. *

* * @param path * The path (including the file name) where the object is stored in the container. Format: <folder * name>/<folder name>/<file name>

*

* For example, to upload the file mlaw.avi to the folder path premium\canada in * the container movies, enter the path premium/canada/mlaw.avi. *

*

* Do not include the container name in this path. *

*

* If the path includes any folders that don't exist yet, the service creates them. For example, suppose you * have an existing premium/usa subfolder. If you specify premium/canada, the * service creates a canada subfolder in the premium folder. You then have two * subfolders, usa and canada, in the premium folder. *

*

* There is no correlation between the path to the source and the path (folders) in the container in AWS * Elemental MediaStore. *

*

* For more information about folders and how they exist in a container, see the AWS Elemental MediaStore User Guide. *

*

* The file name is the name that is assigned to the file that you upload. The file can have the same name * inside and outside of AWS Elemental MediaStore, or it can have the same name. The file name can include or * omit an extension. */ public void setPath(String path) { this.path = path; } /** *

* The path (including the file name) where the object is stored in the container. Format: <folder * name>/<folder name>/<file name> *

*

* For example, to upload the file mlaw.avi to the folder path premium\canada in the * container movies, enter the path premium/canada/mlaw.avi. *

*

* Do not include the container name in this path. *

*

* If the path includes any folders that don't exist yet, the service creates them. For example, suppose you have an * existing premium/usa subfolder. If you specify premium/canada, the service creates a * canada subfolder in the premium folder. You then have two subfolders, usa * and canada, in the premium folder. *

*

* There is no correlation between the path to the source and the path (folders) in the container in AWS Elemental * MediaStore. *

*

* For more information about folders and how they exist in a container, see the AWS Elemental MediaStore User Guide. *

*

* The file name is the name that is assigned to the file that you upload. The file can have the same name inside * and outside of AWS Elemental MediaStore, or it can have the same name. The file name can include or omit an * extension. *

* * @return The path (including the file name) where the object is stored in the container. Format: <folder * name>/<folder name>/<file name>

*

* For example, to upload the file mlaw.avi to the folder path premium\canada in * the container movies, enter the path premium/canada/mlaw.avi. *

*

* Do not include the container name in this path. *

*

* If the path includes any folders that don't exist yet, the service creates them. For example, suppose you * have an existing premium/usa subfolder. If you specify premium/canada, the * service creates a canada subfolder in the premium folder. You then have two * subfolders, usa and canada, in the premium folder. *

*

* There is no correlation between the path to the source and the path (folders) in the container in AWS * Elemental MediaStore. *

*

* For more information about folders and how they exist in a container, see the AWS Elemental MediaStore User Guide. *

*

* The file name is the name that is assigned to the file that you upload. The file can have the same name * inside and outside of AWS Elemental MediaStore, or it can have the same name. The file name can include * or omit an extension. */ public String getPath() { return this.path; } /** *

* The path (including the file name) where the object is stored in the container. Format: <folder * name>/<folder name>/<file name> *

*

* For example, to upload the file mlaw.avi to the folder path premium\canada in the * container movies, enter the path premium/canada/mlaw.avi. *

*

* Do not include the container name in this path. *

*

* If the path includes any folders that don't exist yet, the service creates them. For example, suppose you have an * existing premium/usa subfolder. If you specify premium/canada, the service creates a * canada subfolder in the premium folder. You then have two subfolders, usa * and canada, in the premium folder. *

*

* There is no correlation between the path to the source and the path (folders) in the container in AWS Elemental * MediaStore. *

*

* For more information about folders and how they exist in a container, see the AWS Elemental MediaStore User Guide. *

*

* The file name is the name that is assigned to the file that you upload. The file can have the same name inside * and outside of AWS Elemental MediaStore, or it can have the same name. The file name can include or omit an * extension. *

* * @param path * The path (including the file name) where the object is stored in the container. Format: <folder * name>/<folder name>/<file name>

*

* For example, to upload the file mlaw.avi to the folder path premium\canada in * the container movies, enter the path premium/canada/mlaw.avi. *

*

* Do not include the container name in this path. *

*

* If the path includes any folders that don't exist yet, the service creates them. For example, suppose you * have an existing premium/usa subfolder. If you specify premium/canada, the * service creates a canada subfolder in the premium folder. You then have two * subfolders, usa and canada, in the premium folder. *

*

* There is no correlation between the path to the source and the path (folders) in the container in AWS * Elemental MediaStore. *

*

* For more information about folders and how they exist in a container, see the AWS Elemental MediaStore User Guide. *

*

* The file name is the name that is assigned to the file that you upload. The file can have the same name * inside and outside of AWS Elemental MediaStore, or it can have the same name. The file name can include or * omit an extension. * @return Returns a reference to this object so that method calls can be chained together. */ public PutObjectRequest withPath(String path) { setPath(path); return this; } /** *

* The content type of the object. *

* * @param contentType * The content type of the object. */ public void setContentType(String contentType) { this.contentType = contentType; } /** *

* The content type of the object. *

* * @return The content type of the object. */ public String getContentType() { return this.contentType; } /** *

* The content type of the object. *

* * @param contentType * The content type of the object. * @return Returns a reference to this object so that method calls can be chained together. */ public PutObjectRequest withContentType(String contentType) { setContentType(contentType); return this; } /** *

* An optional CacheControl header that allows the caller to control the object's cache behavior. * Headers can be passed in as specified in the HTTP at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9. *

*

* Headers with a custom user-defined value are also accepted. *

* * @param cacheControl * An optional CacheControl header that allows the caller to control the object's cache * behavior. Headers can be passed in as specified in the HTTP at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

*

* Headers with a custom user-defined value are also accepted. */ public void setCacheControl(String cacheControl) { this.cacheControl = cacheControl; } /** *

* An optional CacheControl header that allows the caller to control the object's cache behavior. * Headers can be passed in as specified in the HTTP at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9. *

*

* Headers with a custom user-defined value are also accepted. *

* * @return An optional CacheControl header that allows the caller to control the object's cache * behavior. Headers can be passed in as specified in the HTTP at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

*

* Headers with a custom user-defined value are also accepted. */ public String getCacheControl() { return this.cacheControl; } /** *

* An optional CacheControl header that allows the caller to control the object's cache behavior. * Headers can be passed in as specified in the HTTP at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9. *

*

* Headers with a custom user-defined value are also accepted. *

* * @param cacheControl * An optional CacheControl header that allows the caller to control the object's cache * behavior. Headers can be passed in as specified in the HTTP at https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

*

* Headers with a custom user-defined value are also accepted. * @return Returns a reference to this object so that method calls can be chained together. */ public PutObjectRequest withCacheControl(String cacheControl) { setCacheControl(cacheControl); return this; } /** *

* Indicates the storage class of a Put request. Defaults to high-performance temporal storage class, * and objects are persisted into durable storage shortly after being received. *

* * @param storageClass * Indicates the storage class of a Put request. Defaults to high-performance temporal storage * class, and objects are persisted into durable storage shortly after being received. * @see StorageClass */ public void setStorageClass(String storageClass) { this.storageClass = storageClass; } /** *

* Indicates the storage class of a Put request. Defaults to high-performance temporal storage class, * and objects are persisted into durable storage shortly after being received. *

* * @return Indicates the storage class of a Put request. Defaults to high-performance temporal storage * class, and objects are persisted into durable storage shortly after being received. * @see StorageClass */ public String getStorageClass() { return this.storageClass; } /** *

* Indicates the storage class of a Put request. Defaults to high-performance temporal storage class, * and objects are persisted into durable storage shortly after being received. *

* * @param storageClass * Indicates the storage class of a Put request. Defaults to high-performance temporal storage * class, and objects are persisted into durable storage shortly after being received. * @return Returns a reference to this object so that method calls can be chained together. * @see StorageClass */ public PutObjectRequest withStorageClass(String storageClass) { setStorageClass(storageClass); return this; } /** *

* Indicates the storage class of a Put request. Defaults to high-performance temporal storage class, * and objects are persisted into durable storage shortly after being received. *

* * @param storageClass * Indicates the storage class of a Put request. Defaults to high-performance temporal storage * class, and objects are persisted into durable storage shortly after being received. * @return Returns a reference to this object so that method calls can be chained together. * @see StorageClass */ public PutObjectRequest withStorageClass(StorageClass storageClass) { this.storageClass = storageClass.toString(); return this; } /** *

* Indicates the availability of an object while it is still uploading. If the value is set to * streaming, the object is available for downloading after some initial buffering but before the * object is uploaded completely. If the value is set to standard, the object is available for * downloading only when it is uploaded completely. The default value for this header is standard. *

*

* To use this header, you must also set the HTTP Transfer-Encoding header to chunked. *

* * @param uploadAvailability * Indicates the availability of an object while it is still uploading. If the value is set to * streaming, the object is available for downloading after some initial buffering but before * the object is uploaded completely. If the value is set to standard, the object is available * for downloading only when it is uploaded completely. The default value for this header is * standard.

*

* To use this header, you must also set the HTTP Transfer-Encoding header to * chunked. * @see UploadAvailability */ public void setUploadAvailability(String uploadAvailability) { this.uploadAvailability = uploadAvailability; } /** *

* Indicates the availability of an object while it is still uploading. If the value is set to * streaming, the object is available for downloading after some initial buffering but before the * object is uploaded completely. If the value is set to standard, the object is available for * downloading only when it is uploaded completely. The default value for this header is standard. *

*

* To use this header, you must also set the HTTP Transfer-Encoding header to chunked. *

* * @return Indicates the availability of an object while it is still uploading. If the value is set to * streaming, the object is available for downloading after some initial buffering but before * the object is uploaded completely. If the value is set to standard, the object is available * for downloading only when it is uploaded completely. The default value for this header is * standard.

*

* To use this header, you must also set the HTTP Transfer-Encoding header to * chunked. * @see UploadAvailability */ public String getUploadAvailability() { return this.uploadAvailability; } /** *

* Indicates the availability of an object while it is still uploading. If the value is set to * streaming, the object is available for downloading after some initial buffering but before the * object is uploaded completely. If the value is set to standard, the object is available for * downloading only when it is uploaded completely. The default value for this header is standard. *

*

* To use this header, you must also set the HTTP Transfer-Encoding header to chunked. *

* * @param uploadAvailability * Indicates the availability of an object while it is still uploading. If the value is set to * streaming, the object is available for downloading after some initial buffering but before * the object is uploaded completely. If the value is set to standard, the object is available * for downloading only when it is uploaded completely. The default value for this header is * standard.

*

* To use this header, you must also set the HTTP Transfer-Encoding header to * chunked. * @return Returns a reference to this object so that method calls can be chained together. * @see UploadAvailability */ public PutObjectRequest withUploadAvailability(String uploadAvailability) { setUploadAvailability(uploadAvailability); return this; } /** *

* Indicates the availability of an object while it is still uploading. If the value is set to * streaming, the object is available for downloading after some initial buffering but before the * object is uploaded completely. If the value is set to standard, the object is available for * downloading only when it is uploaded completely. The default value for this header is standard. *

*

* To use this header, you must also set the HTTP Transfer-Encoding header to chunked. *

* * @param uploadAvailability * Indicates the availability of an object while it is still uploading. If the value is set to * streaming, the object is available for downloading after some initial buffering but before * the object is uploaded completely. If the value is set to standard, the object is available * for downloading only when it is uploaded completely. The default value for this header is * standard.

*

* To use this header, you must also set the HTTP Transfer-Encoding header to * chunked. * @return Returns a reference to this object so that method calls can be chained together. * @see UploadAvailability */ public PutObjectRequest withUploadAvailability(UploadAvailability uploadAvailability) { this.uploadAvailability = uploadAvailability.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 (getBody() != null) sb.append("Body: ").append(getBody()).append(","); if (getPath() != null) sb.append("Path: ").append(getPath()).append(","); if (getContentType() != null) sb.append("ContentType: ").append(getContentType()).append(","); if (getCacheControl() != null) sb.append("CacheControl: ").append(getCacheControl()).append(","); if (getStorageClass() != null) sb.append("StorageClass: ").append(getStorageClass()).append(","); if (getUploadAvailability() != null) sb.append("UploadAvailability: ").append(getUploadAvailability()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PutObjectRequest == false) return false; PutObjectRequest other = (PutObjectRequest) obj; if (other.getBody() == null ^ this.getBody() == null) return false; if (other.getBody() != null && other.getBody().equals(this.getBody()) == false) return false; if (other.getPath() == null ^ this.getPath() == null) return false; if (other.getPath() != null && other.getPath().equals(this.getPath()) == false) return false; if (other.getContentType() == null ^ this.getContentType() == null) return false; if (other.getContentType() != null && other.getContentType().equals(this.getContentType()) == false) return false; if (other.getCacheControl() == null ^ this.getCacheControl() == null) return false; if (other.getCacheControl() != null && other.getCacheControl().equals(this.getCacheControl()) == false) return false; if (other.getStorageClass() == null ^ this.getStorageClass() == null) return false; if (other.getStorageClass() != null && other.getStorageClass().equals(this.getStorageClass()) == false) return false; if (other.getUploadAvailability() == null ^ this.getUploadAvailability() == null) return false; if (other.getUploadAvailability() != null && other.getUploadAvailability().equals(this.getUploadAvailability()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBody() == null) ? 0 : getBody().hashCode()); hashCode = prime * hashCode + ((getPath() == null) ? 0 : getPath().hashCode()); hashCode = prime * hashCode + ((getContentType() == null) ? 0 : getContentType().hashCode()); hashCode = prime * hashCode + ((getCacheControl() == null) ? 0 : getCacheControl().hashCode()); hashCode = prime * hashCode + ((getStorageClass() == null) ? 0 : getStorageClass().hashCode()); hashCode = prime * hashCode + ((getUploadAvailability() == null) ? 0 : getUploadAvailability().hashCode()); return hashCode; } @Override public PutObjectRequest clone() { return (PutObjectRequest) super.clone(); } @Override public String getSignerType() { return "AWS4UnsignedPayloadSignerType"; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy