#[non_exhaustive]pub struct Assignment {
pub name: String,
pub assignee: String,
pub job_type: JobType,
pub state: State,
pub enable_gemini_in_bigquery: bool,
pub scheduling_policy: Option<SchedulingPolicy>,
pub principal: String,
/* private fields */
}Expand description
An assignment allows a project to submit jobs of a certain type using slots from the specified reservation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringOutput 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.
assignee: StringOptional. The resource which will use the reservation. E.g.
projects/myproject, folders/123, or organizations/456.
job_type: JobTypeOptional. Which type of jobs will use the reservation.
state: StateOutput only. State of the assignment.
enable_gemini_in_bigquery: boolOptional. 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.
scheduling_policy: Option<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.
principal: StringOptional. 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_ADDRESSfor users,principal://iam.googleapis.com/projects/-/serviceAccounts/SA_EMAIL_ADDRESSfor service accounts,principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL_ID/subject/SUBJECT_IDfor workload identity pool identities.- The special value
unknown_or_deleted_userrepresents principals which cannot be read from the user info service, for example deleted users.
Implementations§
Source§impl Assignment
impl Assignment
Sourcepub fn set_assignee<T: Into<String>>(self, v: T) -> Self
pub fn set_assignee<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_job_type<T: Into<JobType>>(self, v: T) -> Self
pub fn set_job_type<T: Into<JobType>>(self, v: T) -> Self
Sourcepub fn set_enable_gemini_in_bigquery<T: Into<bool>>(self, v: T) -> Self
👎Deprecated
pub fn set_enable_gemini_in_bigquery<T: Into<bool>>(self, v: T) -> Self
Sets the value of enable_gemini_in_bigquery.
§Example
let x = Assignment::new().set_enable_gemini_in_bigquery(true);Sourcepub fn set_scheduling_policy<T>(self, v: T) -> Selfwhere
T: Into<SchedulingPolicy>,
pub fn set_scheduling_policy<T>(self, v: T) -> Selfwhere
T: Into<SchedulingPolicy>,
Sets the value of scheduling_policy.
§Example
use google_cloud_bigquery_reservation_v1::model::SchedulingPolicy;
let x = Assignment::new().set_scheduling_policy(SchedulingPolicy::default()/* use setters */);Sourcepub fn set_or_clear_scheduling_policy<T>(self, v: Option<T>) -> Selfwhere
T: Into<SchedulingPolicy>,
pub fn set_or_clear_scheduling_policy<T>(self, v: Option<T>) -> Selfwhere
T: Into<SchedulingPolicy>,
Sets or clears the value of scheduling_policy.
§Example
use google_cloud_bigquery_reservation_v1::model::SchedulingPolicy;
let x = Assignment::new().set_or_clear_scheduling_policy(Some(SchedulingPolicy::default()/* use setters */));
let x = Assignment::new().set_or_clear_scheduling_policy(None::<SchedulingPolicy>);Trait Implementations§
Source§impl Clone for Assignment
impl Clone for Assignment
Source§fn clone(&self) -> Assignment
fn clone(&self) -> Assignment
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more