Class Attachment.Builder (0.7.0)

public static final class Attachment.Builder extends GeneratedMessageV3.Builder<Attachment.Builder> implements AttachmentOrBuilder

Represents a file attached to a support case.

Protobuf type google.cloud.support.v2.Attachment

Implements

AttachmentOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Attachment build()
Returns
TypeDescription
Attachment

buildPartial()

public Attachment buildPartial()
Returns
TypeDescription
Attachment

clear()

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

clearCreateTime()

public Attachment.Builder clearCreateTime()

Output only. The time at which the attachment was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Attachment.Builder

clearCreator()

public Attachment.Builder clearCreator()

Output only. The user who uploaded the attachment. Note, the name and email will be obfuscated if the attachment was uploaded by Google support.

.google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Attachment.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearFilename()

public Attachment.Builder clearFilename()

The filename of the attachment (e.g. "graph.jpg").

string filename = 4;

Returns
TypeDescription
Attachment.Builder

This builder for chaining.

clearMimeType()

public Attachment.Builder clearMimeType()

Output only. The MIME type of the attachment (e.g. text/plain).

string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Attachment.Builder

This builder for chaining.

clearName()

public Attachment.Builder clearName()

Output only. The resource name of the attachment.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Attachment.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Attachment.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Attachment.Builder
Overrides

clearSizeBytes()

public Attachment.Builder clearSizeBytes()

Output only. The size of the attachment in bytes.

int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Attachment.Builder

This builder for chaining.

clone()

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

getCreateTime()

public Timestamp getCreateTime()

Output only. The time at which the attachment was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The time at which the attachment was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time at which the attachment was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getCreator()

public Actor getCreator()

Output only. The user who uploaded the attachment. Note, the name and email will be obfuscated if the attachment was uploaded by Google support.

.google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Actor

The creator.

getCreatorBuilder()

public Actor.Builder getCreatorBuilder()

Output only. The user who uploaded the attachment. Note, the name and email will be obfuscated if the attachment was uploaded by Google support.

.google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Actor.Builder

getCreatorOrBuilder()

public ActorOrBuilder getCreatorOrBuilder()

Output only. The user who uploaded the attachment. Note, the name and email will be obfuscated if the attachment was uploaded by Google support.

.google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ActorOrBuilder

getDefaultInstanceForType()

public Attachment getDefaultInstanceForType()
Returns
TypeDescription
Attachment

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getFilename()

public String getFilename()

The filename of the attachment (e.g. "graph.jpg").

string filename = 4;

Returns
TypeDescription
String

The filename.

getFilenameBytes()

public ByteString getFilenameBytes()

The filename of the attachment (e.g. "graph.jpg").

string filename = 4;

Returns
TypeDescription
ByteString

The bytes for filename.

getMimeType()

public String getMimeType()

Output only. The MIME type of the attachment (e.g. text/plain).

string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The mimeType.

getMimeTypeBytes()

public ByteString getMimeTypeBytes()

Output only. The MIME type of the attachment (e.g. text/plain).

string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for mimeType.

getName()

public String getName()

Output only. The resource name of the attachment.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The resource name of the attachment.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for name.

getSizeBytes()

public long getSizeBytes()

Output only. The size of the attachment in bytes.

int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
long

The sizeBytes.

hasCreateTime()

public boolean hasCreateTime()

Output only. The time at which the attachment was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasCreator()

public boolean hasCreator()

Output only. The user who uploaded the attachment. Note, the name and email will be obfuscated if the attachment was uploaded by Google support.

.google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the creator field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeCreateTime(Timestamp value)

public Attachment.Builder mergeCreateTime(Timestamp value)

Output only. The time at which the attachment was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Attachment.Builder

mergeCreator(Actor value)

public Attachment.Builder mergeCreator(Actor value)

Output only. The user who uploaded the attachment. Note, the name and email will be obfuscated if the attachment was uploaded by Google support.

.google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueActor
Returns
TypeDescription
Attachment.Builder

mergeFrom(Attachment other)

public Attachment.Builder mergeFrom(Attachment other)
Parameter
NameDescription
otherAttachment
Returns
TypeDescription
Attachment.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setCreateTime(Timestamp value)

public Attachment.Builder setCreateTime(Timestamp value)

Output only. The time at which the attachment was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Attachment.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Attachment.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The time at which the attachment was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Attachment.Builder

setCreator(Actor value)

public Attachment.Builder setCreator(Actor value)

Output only. The user who uploaded the attachment. Note, the name and email will be obfuscated if the attachment was uploaded by Google support.

.google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueActor
Returns
TypeDescription
Attachment.Builder

setCreator(Actor.Builder builderForValue)

public Attachment.Builder setCreator(Actor.Builder builderForValue)

Output only. The user who uploaded the attachment. Note, the name and email will be obfuscated if the attachment was uploaded by Google support.

.google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueActor.Builder
Returns
TypeDescription
Attachment.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setFilename(String value)

public Attachment.Builder setFilename(String value)

The filename of the attachment (e.g. "graph.jpg").

string filename = 4;

Parameter
NameDescription
valueString

The filename to set.

Returns
TypeDescription
Attachment.Builder

This builder for chaining.

setFilenameBytes(ByteString value)

public Attachment.Builder setFilenameBytes(ByteString value)

The filename of the attachment (e.g. "graph.jpg").

string filename = 4;

Parameter
NameDescription
valueByteString

The bytes for filename to set.

Returns
TypeDescription
Attachment.Builder

This builder for chaining.

setMimeType(String value)

public Attachment.Builder setMimeType(String value)

Output only. The MIME type of the attachment (e.g. text/plain).

string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The mimeType to set.

Returns
TypeDescription
Attachment.Builder

This builder for chaining.

setMimeTypeBytes(ByteString value)

public Attachment.Builder setMimeTypeBytes(ByteString value)

Output only. The MIME type of the attachment (e.g. text/plain).

string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for mimeType to set.

Returns
TypeDescription
Attachment.Builder

This builder for chaining.

setName(String value)

public Attachment.Builder setName(String value)

Output only. The resource name of the attachment.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Attachment.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Attachment.Builder setNameBytes(ByteString value)

Output only. The resource name of the attachment.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Attachment.Builder

This builder for chaining.

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

public Attachment.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Attachment.Builder
Overrides

setSizeBytes(long value)

public Attachment.Builder setSizeBytes(long value)

Output only. The size of the attachment in bytes.

int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valuelong

The sizeBytes to set.

Returns
TypeDescription
Attachment.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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