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.



84
85
86
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 84

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

Instance Attribute Details

#assigneeString

Optional. 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

#enable_gemini_in_bigqueryBoolean Also known as: enable_gemini_in_bigquery?

Optional. Deprecated: "Gemini in BigQuery" is now available by default for all BigQuery editions and should not be explicitly set. Controls if "Gemini in BigQuery" (https://cloud.google.com/gemini/docs/bigquery/overview) features should be enabled for this reservation assignment. Corresponds to the JSON property enableGeminiInBigquery

Returns:

  • (Boolean)


42
43
44
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 42

def enable_gemini_in_bigquery
  @enable_gemini_in_bigquery
end

#job_typeString

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

Returns:

  • (String)


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

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)


56
57
58
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 56

def name
  @name
end

#principalString

Optional. Represents the principal for this assignment. If not empty, jobs run by this principal will utilize the associated reservation. Otherwise, jobs will fall back to using the reservation assigned to the project, folder, or organization (in that order). If no reservation is assigned at any of these levels, on-demand capacity will be used. The supported formats are: * principal://goog/subject/USER_EMAIL_ADDRESS for users, * principal://iam. googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESS for service accounts, * principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/ global/workloadIdentityPools/POOL_ID/subject/SUBJECT_ID for workload identity pool identities. * The special value unknown_or_deleted_user represents principals which cannot be read from the user info service, for example deleted users. Corresponds to the JSON property principal

Returns:

  • (String)


72
73
74
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 72

def principal
  @principal
end

#scheduling_policyGoogle::Apis::BigqueryreservationV1::SchedulingPolicy

The scheduling policy controls how a reservation's resources are distributed. Corresponds to the JSON property schedulingPolicy



77
78
79
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 77

def scheduling_policy
  @scheduling_policy
end

#stateString

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

Returns:

  • (String)


82
83
84
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 82

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



89
90
91
92
93
94
95
96
97
# File 'lib/google/apis/bigqueryreservation_v1/classes.rb', line 89

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