Class: Google::Apis::BigqueryreservationV1::Assignment

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

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Assignment

Returns a new instance of Assignment.



54
55
56
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 54

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

Instance Attribute Details

#assigneeString

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

Returns:

  • (String)


34
35
36
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 34

def assignee
  @assignee
end

#job_typeString

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

Returns:

  • (String)


39
40
41
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 39

def job_type
  @job_type
end

#nameString

Output only. Name of the resource. E.g.: projects/myproject/locations/US/ reservations/team1-prod/assignments/123. The assignment_id must only contain lower case alphanumeric characters or dashes and the max length is 64 characters. Corresponds to the JSON property name

Returns:

  • (String)


47
48
49
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 47

def name
  @name
end

#stateString

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

Returns:

  • (String)


52
53
54
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 52

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



59
60
61
62
63
64
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 59

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