Class: Google::Apis::BigqueryreservationV1alpha2::ReservationGrant

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/bigqueryreservation_v1alpha2/classes.rb,
generated/google/apis/bigqueryreservation_v1alpha2/representations.rb,
generated/google/apis/bigqueryreservation_v1alpha2/representations.rb

Overview

A ReservationGrant allows a project to submit jobs of a certain type using slots from the specified reservation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ReservationGrant

Returns a new instance of ReservationGrant.


282
283
284
# File 'generated/google/apis/bigqueryreservation_v1alpha2/classes.rb', line 282

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

Instance Attribute Details

#granteeString

The resource which will use the reservation. E.g. projects/myproject, folders/ 123, organizations/456. Corresponds to the JSON property grantee

Returns:

  • (String)

257
258
259
# File 'generated/google/apis/bigqueryreservation_v1alpha2/classes.rb', line 257

def grantee
  @grantee
end

#job_typeString

Which type of jobs will use the reservation. Corresponds to the JSON property jobType

Returns:

  • (String)

262
263
264
# File 'generated/google/apis/bigqueryreservation_v1alpha2/classes.rb', line 262

def job_type
  @job_type
end

#nameString

Output only. Name of the resource. E.g.: projects/myproject/locations/eu/ reservationGrants/123. Corresponds to the JSON property name

Returns:

  • (String)

268
269
270
# File 'generated/google/apis/bigqueryreservation_v1alpha2/classes.rb', line 268

def name
  @name
end

#reservationString

Resource name of the reservation. E.g., projects/myproject/locations/eu/ reservations/my_reservation. This reservation must be in the same location as the grant. This reservation should belong to the same parent project. Corresponds to the JSON property reservation

Returns:

  • (String)

275
276
277
# File 'generated/google/apis/bigqueryreservation_v1alpha2/classes.rb', line 275

def reservation
  @reservation
end

#stateString

Output only. State of the ReservationGrant. Corresponds to the JSON property state

Returns:

  • (String)

280
281
282
# File 'generated/google/apis/bigqueryreservation_v1alpha2/classes.rb', line 280

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


287
288
289
290
291
292
293
# File 'generated/google/apis/bigqueryreservation_v1alpha2/classes.rb', line 287

def update!(**args)
  @grantee = args[:grantee] if args.key?(:grantee)
  @job_type = args[:job_type] if args.key?(:job_type)
  @name = args[:name] if args.key?(:name)
  @reservation = args[:reservation] if args.key?(:reservation)
  @state = args[:state] if args.key?(:state)
end