Class CreateBucketRequest.Builder (2.37.0)

public static final class CreateBucketRequest.Builder extends GeneratedMessageV3.Builder<CreateBucketRequest.Builder> implements CreateBucketRequestOrBuilder

Request message for CreateBucket.

Protobuf type google.storage.v2.CreateBucketRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CreateBucketRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CreateBucketRequest.Builder
Overrides

build()

public CreateBucketRequest build()
Returns
Type Description
CreateBucketRequest

buildPartial()

public CreateBucketRequest buildPartial()
Returns
Type Description
CreateBucketRequest

clear()

public CreateBucketRequest.Builder clear()
Returns
Type Description
CreateBucketRequest.Builder
Overrides

clearBucket()

public CreateBucketRequest.Builder clearBucket()

Properties of the new bucket being inserted. The name of the bucket is specified in the bucket_id field. Populating bucket.name field will result in an error. The project of the bucket must be specified in the bucket.project field. This field must be in projects/{projectIdentifier} format, {projectIdentifier} can be the project ID or project number. The parent field must be either empty or projects/_.

.google.storage.v2.Bucket bucket = 2;

Returns
Type Description
CreateBucketRequest.Builder

clearBucketId()

public CreateBucketRequest.Builder clearBucketId()

Required. The ID to use for this bucket, which will become the final component of the bucket's resource name. For example, the value foo might result in a bucket with the name projects/123456/buckets/foo.

string bucket_id = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CreateBucketRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public CreateBucketRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
CreateBucketRequest.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public CreateBucketRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
CreateBucketRequest.Builder
Overrides

clearParent()

public CreateBucketRequest.Builder clearParent()

Required. The project to which this bucket will belong.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
CreateBucketRequest.Builder

This builder for chaining.

clearPredefinedAcl()

public CreateBucketRequest.Builder clearPredefinedAcl()

Apply a predefined set of access controls to this bucket. Valid values are "authenticatedRead", "private", "projectPrivate", "publicRead", or "publicReadWrite".

string predefined_acl = 6;

Returns
Type Description
CreateBucketRequest.Builder

This builder for chaining.

clearPredefinedDefaultObjectAcl()

public CreateBucketRequest.Builder clearPredefinedDefaultObjectAcl()

Apply a predefined set of default object access controls to this bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", or "publicRead".

string predefined_default_object_acl = 7;

Returns
Type Description
CreateBucketRequest.Builder

This builder for chaining.

clone()

public CreateBucketRequest.Builder clone()
Returns
Type Description
CreateBucketRequest.Builder
Overrides

getBucket()

public Bucket getBucket()

Properties of the new bucket being inserted. The name of the bucket is specified in the bucket_id field. Populating bucket.name field will result in an error. The project of the bucket must be specified in the bucket.project field. This field must be in projects/{projectIdentifier} format, {projectIdentifier} can be the project ID or project number. The parent field must be either empty or projects/_.

.google.storage.v2.Bucket bucket = 2;

Returns
Type Description
Bucket

The bucket.

getBucketBuilder()

public Bucket.Builder getBucketBuilder()

Properties of the new bucket being inserted. The name of the bucket is specified in the bucket_id field. Populating bucket.name field will result in an error. The project of the bucket must be specified in the bucket.project field. This field must be in projects/{projectIdentifier} format, {projectIdentifier} can be the project ID or project number. The parent field must be either empty or projects/_.

.google.storage.v2.Bucket bucket = 2;

Returns
Type Description
Bucket.Builder

getBucketId()

public String getBucketId()

Required. The ID to use for this bucket, which will become the final component of the bucket's resource name. For example, the value foo might result in a bucket with the name projects/123456/buckets/foo.

string bucket_id = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The bucketId.

getBucketIdBytes()

public ByteString getBucketIdBytes()

Required. The ID to use for this bucket, which will become the final component of the bucket's resource name. For example, the value foo might result in a bucket with the name projects/123456/buckets/foo.

string bucket_id = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for bucketId.

getBucketOrBuilder()

public BucketOrBuilder getBucketOrBuilder()

Properties of the new bucket being inserted. The name of the bucket is specified in the bucket_id field. Populating bucket.name field will result in an error. The project of the bucket must be specified in the bucket.project field. This field must be in projects/{projectIdentifier} format, {projectIdentifier} can be the project ID or project number. The parent field must be either empty or projects/_.

.google.storage.v2.Bucket bucket = 2;

Returns
Type Description
BucketOrBuilder

getDefaultInstanceForType()

public CreateBucketRequest getDefaultInstanceForType()
Returns
Type Description
CreateBucketRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getParent()

public String getParent()

Required. The project to which this bucket will belong.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. The project to which this bucket will belong.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for parent.

getPredefinedAcl()

public String getPredefinedAcl()

Apply a predefined set of access controls to this bucket. Valid values are "authenticatedRead", "private", "projectPrivate", "publicRead", or "publicReadWrite".

string predefined_acl = 6;

Returns
Type Description
String

The predefinedAcl.

getPredefinedAclBytes()

public ByteString getPredefinedAclBytes()

Apply a predefined set of access controls to this bucket. Valid values are "authenticatedRead", "private", "projectPrivate", "publicRead", or "publicReadWrite".

string predefined_acl = 6;

Returns
Type Description
ByteString

The bytes for predefinedAcl.

getPredefinedDefaultObjectAcl()

public String getPredefinedDefaultObjectAcl()

Apply a predefined set of default object access controls to this bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", or "publicRead".

string predefined_default_object_acl = 7;

Returns
Type Description
String

The predefinedDefaultObjectAcl.

getPredefinedDefaultObjectAclBytes()

public ByteString getPredefinedDefaultObjectAclBytes()

Apply a predefined set of default object access controls to this bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", or "publicRead".

string predefined_default_object_acl = 7;

Returns
Type Description
ByteString

The bytes for predefinedDefaultObjectAcl.

hasBucket()

public boolean hasBucket()

Properties of the new bucket being inserted. The name of the bucket is specified in the bucket_id field. Populating bucket.name field will result in an error. The project of the bucket must be specified in the bucket.project field. This field must be in projects/{projectIdentifier} format, {projectIdentifier} can be the project ID or project number. The parent field must be either empty or projects/_.

.google.storage.v2.Bucket bucket = 2;

Returns
Type Description
boolean

Whether the bucket field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeBucket(Bucket value)

public CreateBucketRequest.Builder mergeBucket(Bucket value)

Properties of the new bucket being inserted. The name of the bucket is specified in the bucket_id field. Populating bucket.name field will result in an error. The project of the bucket must be specified in the bucket.project field. This field must be in projects/{projectIdentifier} format, {projectIdentifier} can be the project ID or project number. The parent field must be either empty or projects/_.

.google.storage.v2.Bucket bucket = 2;

Parameter
Name Description
value Bucket
Returns
Type Description
CreateBucketRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CreateBucketRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CreateBucketRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public CreateBucketRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
CreateBucketRequest.Builder
Overrides

mergeFrom(CreateBucketRequest other)

public CreateBucketRequest.Builder mergeFrom(CreateBucketRequest other)
Parameter
Name Description
other CreateBucketRequest
Returns
Type Description
CreateBucketRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CreateBucketRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CreateBucketRequest.Builder
Overrides

setBucket(Bucket value)

public CreateBucketRequest.Builder setBucket(Bucket value)

Properties of the new bucket being inserted. The name of the bucket is specified in the bucket_id field. Populating bucket.name field will result in an error. The project of the bucket must be specified in the bucket.project field. This field must be in projects/{projectIdentifier} format, {projectIdentifier} can be the project ID or project number. The parent field must be either empty or projects/_.

.google.storage.v2.Bucket bucket = 2;

Parameter
Name Description
value Bucket
Returns
Type Description
CreateBucketRequest.Builder

setBucket(Bucket.Builder builderForValue)

public CreateBucketRequest.Builder setBucket(Bucket.Builder builderForValue)

Properties of the new bucket being inserted. The name of the bucket is specified in the bucket_id field. Populating bucket.name field will result in an error. The project of the bucket must be specified in the bucket.project field. This field must be in projects/{projectIdentifier} format, {projectIdentifier} can be the project ID or project number. The parent field must be either empty or projects/_.

.google.storage.v2.Bucket bucket = 2;

Parameter
Name Description
builderForValue Bucket.Builder
Returns
Type Description
CreateBucketRequest.Builder

setBucketId(String value)

public CreateBucketRequest.Builder setBucketId(String value)

Required. The ID to use for this bucket, which will become the final component of the bucket's resource name. For example, the value foo might result in a bucket with the name projects/123456/buckets/foo.

string bucket_id = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The bucketId to set.

Returns
Type Description
CreateBucketRequest.Builder

This builder for chaining.

setBucketIdBytes(ByteString value)

public CreateBucketRequest.Builder setBucketIdBytes(ByteString value)

Required. The ID to use for this bucket, which will become the final component of the bucket's resource name. For example, the value foo might result in a bucket with the name projects/123456/buckets/foo.

string bucket_id = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for bucketId to set.

Returns
Type Description
CreateBucketRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public CreateBucketRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
CreateBucketRequest.Builder
Overrides

setParent(String value)

public CreateBucketRequest.Builder setParent(String value)

Required. The project to which this bucket will belong.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The parent to set.

Returns
Type Description
CreateBucketRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public CreateBucketRequest.Builder setParentBytes(ByteString value)

Required. The project to which this bucket will belong.

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for parent to set.

Returns
Type Description
CreateBucketRequest.Builder

This builder for chaining.

setPredefinedAcl(String value)

public CreateBucketRequest.Builder setPredefinedAcl(String value)

Apply a predefined set of access controls to this bucket. Valid values are "authenticatedRead", "private", "projectPrivate", "publicRead", or "publicReadWrite".

string predefined_acl = 6;

Parameter
Name Description
value String

The predefinedAcl to set.

Returns
Type Description
CreateBucketRequest.Builder

This builder for chaining.

setPredefinedAclBytes(ByteString value)

public CreateBucketRequest.Builder setPredefinedAclBytes(ByteString value)

Apply a predefined set of access controls to this bucket. Valid values are "authenticatedRead", "private", "projectPrivate", "publicRead", or "publicReadWrite".

string predefined_acl = 6;

Parameter
Name Description
value ByteString

The bytes for predefinedAcl to set.

Returns
Type Description
CreateBucketRequest.Builder

This builder for chaining.

setPredefinedDefaultObjectAcl(String value)

public CreateBucketRequest.Builder setPredefinedDefaultObjectAcl(String value)

Apply a predefined set of default object access controls to this bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", or "publicRead".

string predefined_default_object_acl = 7;

Parameter
Name Description
value String

The predefinedDefaultObjectAcl to set.

Returns
Type Description
CreateBucketRequest.Builder

This builder for chaining.

setPredefinedDefaultObjectAclBytes(ByteString value)

public CreateBucketRequest.Builder setPredefinedDefaultObjectAclBytes(ByteString value)

Apply a predefined set of default object access controls to this bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", or "publicRead".

string predefined_default_object_acl = 7;

Parameter
Name Description
value ByteString

The bytes for predefinedDefaultObjectAcl to set.

Returns
Type Description
CreateBucketRequest.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public CreateBucketRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
CreateBucketRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final CreateBucketRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
CreateBucketRequest.Builder
Overrides