pub struct PolicyMethods<'a, S>where
S: 'a,{ /* private fields */ }
Expand description
A builder providing access to all methods supported on policy resources.
It is not used directly, but through the SASPortalTesting
hub.
§Example
Instantiate a resource builder
extern crate hyper;
extern crate hyper_rustls;
extern crate google_prod_tt_sasportal1_alpha1 as prod_tt_sasportal1_alpha1;
use std::default::Default;
use prod_tt_sasportal1_alpha1::{SASPortalTesting, oauth2, hyper, hyper_rustls, chrono, FieldMask};
let secret: oauth2::ApplicationSecret = Default::default();
let auth = oauth2::InstalledFlowAuthenticator::builder(
secret,
oauth2::InstalledFlowReturnMethod::HTTPRedirect,
).build().await.unwrap();
let mut hub = SASPortalTesting::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `get(...)`, `set(...)` and `test(...)`
// to build up your call.
let rb = hub.policies();
Implementations§
source§impl<'a, S> PolicyMethods<'a, S>
impl<'a, S> PolicyMethods<'a, S>
sourcepub fn get(&self, request: SasPortalGetPolicyRequest) -> PolicyGetCall<'a, S>
pub fn get(&self, request: SasPortalGetPolicyRequest) -> PolicyGetCall<'a, S>
Create a builder to help you perform the following task:
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
§Arguments
request
- No description provided.
sourcepub fn set(&self, request: SasPortalSetPolicyRequest) -> PolicySetCall<'a, S>
pub fn set(&self, request: SasPortalSetPolicyRequest) -> PolicySetCall<'a, S>
Create a builder to help you perform the following task:
Sets the access control policy on the specified resource. Replaces any existing policy.
§Arguments
request
- No description provided.
sourcepub fn test(
&self,
request: SasPortalTestPermissionsRequest
) -> PolicyTestCall<'a, S>
pub fn test( &self, request: SasPortalTestPermissionsRequest ) -> PolicyTestCall<'a, S>
Create a builder to help you perform the following task:
Returns permissions that a caller has on the specified resource.
§Arguments
request
- No description provided.
Trait Implementations§
impl<'a, S> MethodsBuilder for PolicyMethods<'a, S>
Auto Trait Implementations§
impl<'a, S> !RefUnwindSafe for PolicyMethods<'a, S>
impl<'a, S> Send for PolicyMethods<'a, S>where
S: Sync,
impl<'a, S> Sync for PolicyMethods<'a, S>where
S: Sync,
impl<'a, S> Unpin for PolicyMethods<'a, S>
impl<'a, S> !UnwindSafe for PolicyMethods<'a, S>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more