Class: Google::Apis::CloudbuildV1::ApprovalResult

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudbuild_v1/classes.rb,
lib/google/apis/cloudbuild_v1/representations.rb,
lib/google/apis/cloudbuild_v1/representations.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ApprovalResult

Returns a new instance of ApprovalResult.



130
131
132
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 130

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#approval_timeString

Output only. The time when the approval decision was made. Corresponds to the JSON property approvalTime

Returns:

  • (String)


104
105
106
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 104

def approval_time
  @approval_time
end

#approver_accountString

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. Corresponds to the JSON property approverAccount

Returns:

  • (String)


110
111
112
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 110

def 
  @approver_account
end

#commentString

Optional. An optional comment for this manual approval result. Corresponds to the JSON property comment

Returns:

  • (String)


115
116
117
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 115

def comment
  @comment
end

#decisionString

Required. The decision of this manual approval. Corresponds to the JSON property decision

Returns:

  • (String)


120
121
122
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 120

def decision
  @decision
end

#urlString

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. Corresponds to the JSON property url

Returns:

  • (String)


128
129
130
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 128

def url
  @url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



135
136
137
138
139
140
141
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 135

def update!(**args)
  @approval_time = args[:approval_time] if args.key?(:approval_time)
  @approver_account = args[:approver_account] if args.key?(:approver_account)
  @comment = args[:comment] if args.key?(:comment)
  @decision = args[:decision] if args.key?(:decision)
  @url = args[:url] if args.key?(:url)
end