Class CreateObjectOptions


  • public abstract class CreateObjectOptions
    extends Object
    Options that can be specified when creating a file in the GoogleCloudStorage.
    • Constructor Detail

      • CreateObjectOptions

        public CreateObjectOptions()
    • Method Detail

      • 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 this CreateObjectOptions before accepting the creation as successful. If false, 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 this CreateObjectOptions instance, 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