/// Creates an assignment object which allows the given project to submit jobs
/// of a certain type using slots from the specified reservation.
///
/// Currently a
/// resource (project, folder, organization) can only have one assignment per
/// each (job_type, location) combination, and that reservation will be used
/// for all jobs of the matching type.
///
/// Different assignments can be created on different levels of the
/// projects, folders or organization hierarchy.  During query execution,
/// the assignment is looked up at the project, folder and organization levels
/// in that order. The first assignment found is applied to the query.
///
/// When creating assignments, it does not matter if other assignments exist at
/// higher levels.
///
/// Example:
///
/// * The organization `organizationA` contains two projects, `project1`
///   and `project2`.
/// * Assignments for all three entities (`organizationA`, `project1`, and
///   `project2`) could all be created and mapped to the same or different
///   reservations.
///
/// "None" assignments represent an absence of the assignment. Projects
/// assigned to None use on-demand pricing. To create a "None" assignment, use
/// "none" as a reservation_id in the parent. Example parent:
/// `projects/myproject/locations/US/reservations/none`.
///
/// Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have
/// 'bigquery.admin' permissions on the project using the reservation
/// and the project that owns this reservation.
///
/// Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment
/// does not match location of the reservation.
Creates an assignment object which allows the given project to submit jobs
of a certain type using slots from the specified reservation.

Currently a
resource (project, folder, organization) can only have one assignment per
each (job_type, location) combination, and that reservation will be used
for all jobs of the matching type.

Different assignments can be created on different levels of the
projects, folders or organization hierarchy.  During query execution,
the assignment is looked up at the project, folder and organization levels
in that order. The first assignment found is applied to the query.

When creating assignments, it does not matter if other assignments exist at
higher levels.





"None" assignments represent an absence of the assignment. Projects
assigned to None use on-demand pricing. To create a "None" assignment, use
"none" as a reservation_id in the parent.

Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have
'bigquery.admin' permissions on the project using the reservation
and the project that owns this reservation.

Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment
does not match location of the reservation.
Creates an assignment object which allows the given project to submit jobs of a certain type using slots from the specified reservation . Currently a resource ( project folder organization ) can only have one assignment per each ( job_type location ) combination and that reservation will be used for all jobs of the matching type . Different assignments can be created on different levels of the projects folders or organization hierarchy . During query execution the assignment is looked up at the project folder and organization levels in that order . The first assignment found is applied to the query . When creating assignments it does not matter if other assignments exist at higher levels . " None " assignments represent an absence of the assignment . Projects assigned to None use on - demand pricing . To create a " None " assignment use " none " as a reservation_id in the parent . Returns ` google . rpc . Code . PERMISSION_DENIED ` if user does not have ' bigquery . admin ' permissions on the project using the reservation and the project that owns this reservation . Returns ` google . rpc . Code . INVALID_ARGUMENT ` when location of the assignment does not match location of the reservation .
pub async fn create_assignment(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateAssignmentRequest>,
        ) -> Result<tonic::Response<super::Assignment>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.bigquery.reservation.v1.ReservationService/CreateAssignment",
            );
            self.inner.unary(request.into_request(), path, codec).await
        }
pub async fn create_assignment ( & mut self , request : impl tonic :: IntoRequest < super :: CreateAssignmentRequest > , ) -> Result < tonic :: Response < super :: Assignment > , tonic :: Status > { self . inner . ready ( ) . await . map_err ( | e | { tonic :: Status :: new ( tonic :: Code :: Unknown , format ! ( " " e into ( ) ) , ) } ) ? ; let codec = tonic :: codec :: ProstCodec :: default ( ) ; let path = http :: uri :: PathAndQuery :: from_static ( " " , ) ; self . inner . unary ( request . into_request ( ) , path , codec ) . await }
Creates an assignment object which allows the given project to submit jobs
of a certain type using slots from the specified reservation.
Creates an assignment object which allows the given project to submit jobs of a certain type using slots from the specified reservation .
&mut self
request
impl tonic::IntoRequest<super::CreateAssignmentRequest>