Package com.google.cloud.hadoop.gcsio
Class CreateObjectOptions
- java.lang.Object
-
- com.google.cloud.hadoop.gcsio.CreateObjectOptions
-
public abstract class CreateObjectOptions extends Object
Options that can be specified when creating a file in theGoogleCloudStorage.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCreateObjectOptions.Builder
-
Field Summary
Fields Modifier and Type Field Description static CreateObjectOptionsDEFAULT_NO_OVERWRITEstatic CreateObjectOptionsDEFAULT_OVERWRITE
-
Constructor Summary
Constructors Constructor Description CreateObjectOptions()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static CreateObjectOptions.Builderbuilder()abstract StringgetContentEncoding()Content encoding for the created object.abstract StringgetContentType()Content type for the created object.abstract StringgetKmsKeyName()A KMS key name to encrypt the created object.abstract com.google.common.collect.ImmutableMap<String,byte[]>getMetadata()A metadata to apply to the created object.abstract booleanisEnsureEmptyObjectsMetadataMatch()When creating an empty object and certain types of errors occur, any existing object is checked for an exact metadata match to the metadata in thisCreateObjectOptionsbefore accepting the creation as successful.abstract booleanisOverwriteExisting()Whether to overwrite any existing objects with the same nameabstract CreateObjectOptions.BuildertoBuilder()
-
-
-
Field Detail
-
DEFAULT_NO_OVERWRITE
public static final CreateObjectOptions DEFAULT_NO_OVERWRITE
-
DEFAULT_OVERWRITE
public static final CreateObjectOptions DEFAULT_OVERWRITE
-
-
Method Detail
-
builder
public static CreateObjectOptions.Builder builder()
-
toBuilder
public abstract CreateObjectOptions.Builder toBuilder()
-
getContentEncoding
@Nullable public abstract String getContentEncoding()
Content encoding for the created object.
-
getContentType
@Nullable public abstract String getContentType()
Content type for the created object.
-
isEnsureEmptyObjectsMetadataMatch
public abstract boolean isEnsureEmptyObjectsMetadataMatch()
When creating an empty object and certain types of errors occur, any existing object is checked for an exact metadata match to the metadata in thisCreateObjectOptionsbefore accepting the creation as successful. Iffalse, then on error for creating empty objects, as long as an appropriate empty object already exists, even if it holds different metadata than provided in thisCreateObjectOptionsinstance, it may be considered created successfully.
-
getKmsKeyName
@Nullable public abstract String getKmsKeyName()
A KMS key name to encrypt the created object.
-
getMetadata
public abstract com.google.common.collect.ImmutableMap<String,byte[]> getMetadata()
A metadata to apply to the created object.
-
isOverwriteExisting
public abstract boolean isOverwriteExisting()
Whether to overwrite any existing objects with the same name
-
-