Class CreateBucketRequest.Builder (2.9.1)

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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CreateBucketRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
CreateBucketRequest.Builder
Overrides

build()

public CreateBucketRequest build()
Returns
TypeDescription
CreateBucketRequest

buildPartial()

public CreateBucketRequest buildPartial()
Returns
TypeDescription
CreateBucketRequest

clear()

public CreateBucketRequest.Builder clear()
Returns
TypeDescription
CreateBucketRequest.Builder
Overrides

clearBucket()

public CreateBucketRequest.Builder clearBucket()

Required. Properties of the new bucket being inserted. The project and name of the bucket are specified in the parent and bucket_id fields, respectively. Populating those fields in bucket will result in an error.

.google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
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
TypeDescription
CreateBucketRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public CreateBucketRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
CreateBucketRequest.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public CreateBucketRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
CreateBucketRequest.Builder

This builder for chaining.

clone()

public CreateBucketRequest.Builder clone()
Returns
TypeDescription
CreateBucketRequest.Builder
Overrides

getBucket()

public Bucket getBucket()

Required. Properties of the new bucket being inserted. The project and name of the bucket are specified in the parent and bucket_id fields, respectively. Populating those fields in bucket will result in an error.

.google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Bucket

The bucket.

getBucketBuilder()

public Bucket.Builder getBucketBuilder()

Required. Properties of the new bucket being inserted. The project and name of the bucket are specified in the parent and bucket_id fields, respectively. Populating those fields in bucket will result in an error.

.google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for bucketId.

getBucketOrBuilder()

public BucketOrBuilder getBucketOrBuilder()

Required. Properties of the new bucket being inserted. The project and name of the bucket are specified in the parent and bucket_id fields, respectively. Populating those fields in bucket will result in an error.

.google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
BucketOrBuilder

getDefaultInstanceForType()

public CreateBucketRequest getDefaultInstanceForType()
Returns
TypeDescription
CreateBucketRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for predefinedDefaultObjectAcl.

hasBucket()

public boolean hasBucket()

Required. Properties of the new bucket being inserted. The project and name of the bucket are specified in the parent and bucket_id fields, respectively. Populating those fields in bucket will result in an error.

.google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the bucket field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeBucket(Bucket value)

public CreateBucketRequest.Builder mergeBucket(Bucket value)

Required. Properties of the new bucket being inserted. The project and name of the bucket are specified in the parent and bucket_id fields, respectively. Populating those fields in bucket will result in an error.

.google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueBucket
Returns
TypeDescription
CreateBucketRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CreateBucketRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CreateBucketRequest.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public CreateBucketRequest.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
CreateBucketRequest.Builder
Overrides

mergeFrom(CreateBucketRequest other)

public CreateBucketRequest.Builder mergeFrom(CreateBucketRequest other)
Parameter
NameDescription
otherCreateBucketRequest
Returns
TypeDescription
CreateBucketRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CreateBucketRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
CreateBucketRequest.Builder
Overrides

setBucket(Bucket value)

public CreateBucketRequest.Builder setBucket(Bucket value)

Required. Properties of the new bucket being inserted. The project and name of the bucket are specified in the parent and bucket_id fields, respectively. Populating those fields in bucket will result in an error.

.google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueBucket
Returns
TypeDescription
CreateBucketRequest.Builder

setBucket(Bucket.Builder builderForValue)

public CreateBucketRequest.Builder setBucket(Bucket.Builder builderForValue)

Required. Properties of the new bucket being inserted. The project and name of the bucket are specified in the parent and bucket_id fields, respectively. Populating those fields in bucket will result in an error.

.google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValueBucket.Builder
Returns
TypeDescription
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
NameDescription
valueString

The bucketId to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for bucketId to set.

Returns
TypeDescription
CreateBucketRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public CreateBucketRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The parent to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for parent to set.

Returns
TypeDescription
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
NameDescription
valueString

The predefinedAcl to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for predefinedAcl to set.

Returns
TypeDescription
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
NameDescription
valueString

The predefinedDefaultObjectAcl to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for predefinedDefaultObjectAcl to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
CreateBucketRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final CreateBucketRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
CreateBucketRequest.Builder
Overrides