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



245
246
247
# File 'generated/google/apis/bigqueryreservation_v1alpha2/classes.rb', line 245

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)


224
225
226
# File 'generated/google/apis/bigqueryreservation_v1alpha2/classes.rb', line 224

def grantee
  @grantee
end

#job_typeString

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

Returns:

  • (String)


229
230
231
# File 'generated/google/apis/bigqueryreservation_v1alpha2/classes.rb', line 229

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)


235
236
237
# File 'generated/google/apis/bigqueryreservation_v1alpha2/classes.rb', line 235

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)


243
244
245
# File 'generated/google/apis/bigqueryreservation_v1alpha2/classes.rb', line 243

def reservation
  @reservation
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



250
251
252
253
254
255
# File 'generated/google/apis/bigqueryreservation_v1alpha2/classes.rb', line 250

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)
end