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.



292
293
294
# File 'generated/google/apis/bigqueryreservation_v1alpha2/classes.rb', line 292

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)


266
267
268
# File 'generated/google/apis/bigqueryreservation_v1alpha2/classes.rb', line 266

def grantee
  @grantee
end

#job_typeString

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

Returns:

  • (String)


271
272
273
# File 'generated/google/apis/bigqueryreservation_v1alpha2/classes.rb', line 271

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)


277
278
279
# File 'generated/google/apis/bigqueryreservation_v1alpha2/classes.rb', line 277

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)


285
286
287
# File 'generated/google/apis/bigqueryreservation_v1alpha2/classes.rb', line 285

def reservation
  @reservation
end

#stateString

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

Returns:

  • (String)


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

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



297
298
299
300
301
302
303
# File 'generated/google/apis/bigqueryreservation_v1alpha2/classes.rb', line 297

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