Class ApprovalResult.Builder (3.22.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ApprovalResult build()
Returns
TypeDescription
ApprovalResult

buildPartial()

public ApprovalResult buildPartial()
Returns
TypeDescription
ApprovalResult

clear()

public ApprovalResult.Builder clear()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ApprovalResult.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

This builder for chaining.

clone()

public ApprovalResult.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
int

The enum numeric value on the wire for decision.

getDefaultInstanceForType()

public ApprovalResult getDefaultInstanceForType()
Returns
TypeDescription
ApprovalResult

getDescriptorForType()

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

Whether the approvalTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
ApprovalResult.Builder

mergeFrom(ApprovalResult other)

public ApprovalResult.Builder mergeFrom(ApprovalResult other)
Parameter
NameDescription
otherApprovalResult
Returns
TypeDescription
ApprovalResult.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ApprovalResult.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
valueString

The approverAccount to set.

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

The bytes for approverAccount to set.

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

The comment to set.

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

The bytes for comment to set.

Returns
TypeDescription
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
NameDescription
valueApprovalResult.Decision

The decision to set.

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

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

Returns
TypeDescription
ApprovalResult.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

public final ApprovalResult.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The url to set.

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

The bytes for url to set.

Returns
TypeDescription
ApprovalResult.Builder

This builder for chaining.