Class ApprovalResult.Builder (3.46.0)

public static final class ApprovalResult.Builder extends GeneratedMessageV3.Builder<ApprovalResult.Builder> implements ApprovalResultOrBuilder

ApprovalResult describes the decision and associated metadata of a manual approval of a build.

Protobuf type google.devtools.cloudbuild.v1.ApprovalResult

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ApprovalResult build()
Returns
Type Description
ApprovalResult

buildPartial()

public ApprovalResult buildPartial()
Returns
Type Description
ApprovalResult

clear()

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

clearApprovalTime()

public ApprovalResult.Builder clearApprovalTime()

Output only. The time when the approval decision was made.

.google.protobuf.Timestamp approval_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ApprovalResult.Builder

clearApproverAccount()

public ApprovalResult.Builder clearApproverAccount()

Output only. Email of the user that called the ApproveBuild API to approve or reject a build at the time that the API was called.

string approver_account = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ApprovalResult.Builder

This builder for chaining.

clearComment()

public ApprovalResult.Builder clearComment()

Optional. An optional comment for this manual approval result.

string comment = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ApprovalResult.Builder

This builder for chaining.

clearDecision()

public ApprovalResult.Builder clearDecision()

Required. The decision of this manual approval.

.google.devtools.cloudbuild.v1.ApprovalResult.Decision decision = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ApprovalResult.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearUrl()

public ApprovalResult.Builder clearUrl()

Optional. An optional URL tied to this manual approval result. This field is essentially the same as comment, except that it will be rendered by the UI differently. An example use case is a link to an external job that approved this Build.

string url = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ApprovalResult.Builder

This builder for chaining.

clone()

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

getApprovalTime()

public Timestamp getApprovalTime()

Output only. The time when the approval decision was made.

.google.protobuf.Timestamp approval_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The approvalTime.

getApprovalTimeBuilder()

public Timestamp.Builder getApprovalTimeBuilder()

Output only. The time when the approval decision was made.

.google.protobuf.Timestamp approval_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getApprovalTimeOrBuilder()

public TimestampOrBuilder getApprovalTimeOrBuilder()

Output only. The time when the approval decision was made.

.google.protobuf.Timestamp approval_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getApproverAccount()

public String getApproverAccount()

Output only. Email of the user that called the ApproveBuild API to approve or reject a build at the time that the API was called.

string approver_account = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The approverAccount.

getApproverAccountBytes()

public ByteString getApproverAccountBytes()

Output only. Email of the user that called the ApproveBuild API to approve or reject a build at the time that the API was called.

string approver_account = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for approverAccount.

getComment()

public String getComment()

Optional. An optional comment for this manual approval result.

string comment = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The comment.

getCommentBytes()

public ByteString getCommentBytes()

Optional. An optional comment for this manual approval result.

string comment = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for comment.

getDecision()

public ApprovalResult.Decision getDecision()

Required. The decision of this manual approval.

.google.devtools.cloudbuild.v1.ApprovalResult.Decision decision = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ApprovalResult.Decision

The decision.

getDecisionValue()

public int getDecisionValue()

Required. The decision of this manual approval.

.google.devtools.cloudbuild.v1.ApprovalResult.Decision decision = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for decision.

getDefaultInstanceForType()

public ApprovalResult getDefaultInstanceForType()
Returns
Type Description
ApprovalResult

getDescriptorForType()

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

getUrl()

public String getUrl()

Optional. An optional URL tied to this manual approval result. This field is essentially the same as comment, except that it will be rendered by the UI differently. An example use case is a link to an external job that approved this Build.

string url = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The url.

getUrlBytes()

public ByteString getUrlBytes()

Optional. An optional URL tied to this manual approval result. This field is essentially the same as comment, except that it will be rendered by the UI differently. An example use case is a link to an external job that approved this Build.

string url = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for url.

hasApprovalTime()

public boolean hasApprovalTime()

Output only. The time when the approval decision was made.

.google.protobuf.Timestamp approval_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the approvalTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeApprovalTime(Timestamp value)

public ApprovalResult.Builder mergeApprovalTime(Timestamp value)

Output only. The time when the approval decision was made.

.google.protobuf.Timestamp approval_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
ApprovalResult.Builder

mergeFrom(ApprovalResult other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setApprovalTime(Timestamp value)

public ApprovalResult.Builder setApprovalTime(Timestamp value)

Output only. The time when the approval decision was made.

.google.protobuf.Timestamp approval_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
ApprovalResult.Builder

setApprovalTime(Timestamp.Builder builderForValue)

public ApprovalResult.Builder setApprovalTime(Timestamp.Builder builderForValue)

Output only. The time when the approval decision was made.

.google.protobuf.Timestamp approval_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
ApprovalResult.Builder

setApproverAccount(String value)

public ApprovalResult.Builder setApproverAccount(String value)

Output only. Email of the user that called the ApproveBuild API to approve or reject a build at the time that the API was called.

string approver_account = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The approverAccount to set.

Returns
Type Description
ApprovalResult.Builder

This builder for chaining.

setApproverAccountBytes(ByteString value)

public ApprovalResult.Builder setApproverAccountBytes(ByteString value)

Output only. Email of the user that called the ApproveBuild API to approve or reject a build at the time that the API was called.

string approver_account = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for approverAccount to set.

Returns
Type Description
ApprovalResult.Builder

This builder for chaining.

setComment(String value)

public ApprovalResult.Builder setComment(String value)

Optional. An optional comment for this manual approval result.

string comment = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The comment to set.

Returns
Type Description
ApprovalResult.Builder

This builder for chaining.

setCommentBytes(ByteString value)

public ApprovalResult.Builder setCommentBytes(ByteString value)

Optional. An optional comment for this manual approval result.

string comment = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for comment to set.

Returns
Type Description
ApprovalResult.Builder

This builder for chaining.

setDecision(ApprovalResult.Decision value)

public ApprovalResult.Builder setDecision(ApprovalResult.Decision value)

Required. The decision of this manual approval.

.google.devtools.cloudbuild.v1.ApprovalResult.Decision decision = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ApprovalResult.Decision

The decision to set.

Returns
Type Description
ApprovalResult.Builder

This builder for chaining.

setDecisionValue(int value)

public ApprovalResult.Builder setDecisionValue(int value)

Required. The decision of this manual approval.

.google.devtools.cloudbuild.v1.ApprovalResult.Decision decision = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for decision to set.

Returns
Type Description
ApprovalResult.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setUrl(String value)

public ApprovalResult.Builder setUrl(String value)

Optional. An optional URL tied to this manual approval result. This field is essentially the same as comment, except that it will be rendered by the UI differently. An example use case is a link to an external job that approved this Build.

string url = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The url to set.

Returns
Type Description
ApprovalResult.Builder

This builder for chaining.

setUrlBytes(ByteString value)

public ApprovalResult.Builder setUrlBytes(ByteString value)

Optional. An optional URL tied to this manual approval result. This field is essentially the same as comment, except that it will be rendered by the UI differently. An example use case is a link to an external job that approved this Build.

string url = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for url to set.

Returns
Type Description
ApprovalResult.Builder

This builder for chaining.