Class CreateAttachmentRequest.Builder (1.53.0)

public static final class CreateAttachmentRequest.Builder extends GeneratedMessageV3.Builder<CreateAttachmentRequest.Builder> implements CreateAttachmentRequestOrBuilder

The request to create a new attachment.

Protobuf type google.devtools.artifactregistry.v1.CreateAttachmentRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public CreateAttachmentRequest build()
Returns
Type Description
CreateAttachmentRequest

buildPartial()

public CreateAttachmentRequest buildPartial()
Returns
Type Description
CreateAttachmentRequest

clear()

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

clearAttachment()

public CreateAttachmentRequest.Builder clearAttachment()

Required. The attachment to be created.

.google.devtools.artifactregistry.v1.Attachment attachment = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CreateAttachmentRequest.Builder

clearAttachmentId()

public CreateAttachmentRequest.Builder clearAttachmentId()

Required. The attachment id to use for this attachment.

string attachment_id = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CreateAttachmentRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearParent()

public CreateAttachmentRequest.Builder clearParent()

Required. The name of the parent resource where the attachment will be created.

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

Returns
Type Description
CreateAttachmentRequest.Builder

This builder for chaining.

clone()

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

getAttachment()

public Attachment getAttachment()

Required. The attachment to be created.

.google.devtools.artifactregistry.v1.Attachment attachment = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Attachment

The attachment.

getAttachmentBuilder()

public Attachment.Builder getAttachmentBuilder()

Required. The attachment to be created.

.google.devtools.artifactregistry.v1.Attachment attachment = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Attachment.Builder

getAttachmentId()

public String getAttachmentId()

Required. The attachment id to use for this attachment.

string attachment_id = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The attachmentId.

getAttachmentIdBytes()

public ByteString getAttachmentIdBytes()

Required. The attachment id to use for this attachment.

string attachment_id = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for attachmentId.

getAttachmentOrBuilder()

public AttachmentOrBuilder getAttachmentOrBuilder()

Required. The attachment to be created.

.google.devtools.artifactregistry.v1.Attachment attachment = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AttachmentOrBuilder

getDefaultInstanceForType()

public CreateAttachmentRequest getDefaultInstanceForType()
Returns
Type Description
CreateAttachmentRequest

getDescriptorForType()

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

getParent()

public String getParent()

Required. The name of the parent resource where the attachment will be created.

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

Returns
Type Description
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. The name of the parent resource where the attachment will be created.

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

Returns
Type Description
ByteString

The bytes for parent.

hasAttachment()

public boolean hasAttachment()

Required. The attachment to be created.

.google.devtools.artifactregistry.v1.Attachment attachment = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the attachment field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeAttachment(Attachment value)

public CreateAttachmentRequest.Builder mergeAttachment(Attachment value)

Required. The attachment to be created.

.google.devtools.artifactregistry.v1.Attachment attachment = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Attachment
Returns
Type Description
CreateAttachmentRequest.Builder

mergeFrom(CreateAttachmentRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAttachment(Attachment value)

public CreateAttachmentRequest.Builder setAttachment(Attachment value)

Required. The attachment to be created.

.google.devtools.artifactregistry.v1.Attachment attachment = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Attachment
Returns
Type Description
CreateAttachmentRequest.Builder

setAttachment(Attachment.Builder builderForValue)

public CreateAttachmentRequest.Builder setAttachment(Attachment.Builder builderForValue)

Required. The attachment to be created.

.google.devtools.artifactregistry.v1.Attachment attachment = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Attachment.Builder
Returns
Type Description
CreateAttachmentRequest.Builder

setAttachmentId(String value)

public CreateAttachmentRequest.Builder setAttachmentId(String value)

Required. The attachment id to use for this attachment.

string attachment_id = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The attachmentId to set.

Returns
Type Description
CreateAttachmentRequest.Builder

This builder for chaining.

setAttachmentIdBytes(ByteString value)

public CreateAttachmentRequest.Builder setAttachmentIdBytes(ByteString value)

Required. The attachment id to use for this attachment.

string attachment_id = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for attachmentId to set.

Returns
Type Description
CreateAttachmentRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setParent(String value)

public CreateAttachmentRequest.Builder setParent(String value)

Required. The name of the parent resource where the attachment will be created.

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

Parameter
Name Description
value String

The parent to set.

Returns
Type Description
CreateAttachmentRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public CreateAttachmentRequest.Builder setParentBytes(ByteString value)

Required. The name of the parent resource where the attachment will be created.

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
CreateAttachmentRequest.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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