# BigQuery Reservation V1 API - Class Google::Cloud::Bigquery::Reservation::V1::Assignment (v1.12.0)

1.12.0 (latest) 1.11.0 1.10.0 1.9.2 1.8.0 1.7.0 1.6.0 1.5.0 1.4.1 1.3.0 1.2.0 1.1.0 1.0.1 0.12.0 0.11.2 0.10.0 0.9.0 0.8.1 0.7.0 0.6.0 0.5.0 0.4.2 Reference documentation and code samples for the BigQuery Reservation V1 API class Google::Cloud::Bigquery::Reservation::V1::Assignment.

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

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #assignee

    def assignee() -> ::String

**Returns**

- (::String) --- Optional. The resource which will use the reservation. E.g. `projects/myproject`, `folders/123`, or `organizations/456`.

### #assignee=

    def assignee=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. The resource which will use the reservation. E.g. `projects/myproject`, `folders/123`, or `organizations/456`.
**Returns**

- (::String) --- Optional. The resource which will use the reservation. E.g. `projects/myproject`, `folders/123`, or `organizations/456`.

### #enable_gemini_in_bigquery

    def enable_gemini_in_bigquery() -> ::Boolean

**Returns**

- (::Boolean) --- 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.

### #enable_gemini_in_bigquery=

    def enable_gemini_in_bigquery=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- 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.
**Returns**

- (::Boolean) --- 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.

### #job_type

    def job_type() -> ::Google::Cloud::Bigquery::Reservation::V1::Assignment::JobType

**Returns**

- ([::Google::Cloud::Bigquery::Reservation::V1::Assignment::JobType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery-reservation-v1/latest/Google-Cloud-Bigquery-Reservation-V1-Assignment-JobType)) --- Optional. Which type of jobs will use the reservation.

### #job_type=

    def job_type=(value) -> ::Google::Cloud::Bigquery::Reservation::V1::Assignment::JobType

**Parameter**

- **value** ([::Google::Cloud::Bigquery::Reservation::V1::Assignment::JobType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery-reservation-v1/latest/Google-Cloud-Bigquery-Reservation-V1-Assignment-JobType)) --- Optional. Which type of jobs will use the reservation.
**Returns**

- ([::Google::Cloud::Bigquery::Reservation::V1::Assignment::JobType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery-reservation-v1/latest/Google-Cloud-Bigquery-Reservation-V1-Assignment-JobType)) --- Optional. Which type of jobs will use the reservation.

### #name

    def name() -> ::String

**Returns**

- (::String) --- 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.

### #principal

    def principal() -> ::String

**Returns**

- (::String) --- 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.

### #principal=

    def principal=(value) -> ::String

**Parameter**

- **value** (::String) ---

  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.
**Returns**

- (::String) --- 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.

### #scheduling_policy

    def scheduling_policy() -> ::Google::Cloud::Bigquery::Reservation::V1::SchedulingPolicy

**Returns**

- ([::Google::Cloud::Bigquery::Reservation::V1::SchedulingPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery-reservation-v1/latest/Google-Cloud-Bigquery-Reservation-V1-SchedulingPolicy)) --- Optional. The scheduling policy to use for jobs and queries of this assignee when running under the associated reservation. The scheduling policy controls how the reservation's resources are distributed. This overrides the default scheduling policy specified on the reservation.


  This feature is not yet generally available.

### #scheduling_policy=

    def scheduling_policy=(value) -> ::Google::Cloud::Bigquery::Reservation::V1::SchedulingPolicy

**Parameter**

- **value** ([::Google::Cloud::Bigquery::Reservation::V1::SchedulingPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery-reservation-v1/latest/Google-Cloud-Bigquery-Reservation-V1-SchedulingPolicy)) --- Optional. The scheduling policy to use for jobs and queries of this assignee when running under the associated reservation. The scheduling policy controls how the reservation's resources are distributed. This overrides the default scheduling policy specified on the reservation.


  This feature is not yet generally available.
**Returns**

- ([::Google::Cloud::Bigquery::Reservation::V1::SchedulingPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery-reservation-v1/latest/Google-Cloud-Bigquery-Reservation-V1-SchedulingPolicy)) --- Optional. The scheduling policy to use for jobs and queries of this assignee when running under the associated reservation. The scheduling policy controls how the reservation's resources are distributed. This overrides the default scheduling policy specified on the reservation.


  This feature is not yet generally available.

### #state

    def state() -> ::Google::Cloud::Bigquery::Reservation::V1::Assignment::State

**Returns**

- ([::Google::Cloud::Bigquery::Reservation::V1::Assignment::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-bigquery-reservation-v1/latest/Google-Cloud-Bigquery-Reservation-V1-Assignment-State)) --- Output only. State of the assignment.