ProjectMethods

Struct ProjectMethods 

Source
pub struct ProjectMethods<'a, C>
where C: 'a,
{ /* private fields */ }
Expand description

A builder providing access to all methods supported on project resources. It is not used directly, but through the ServiceDirectory hub.

§Example

Instantiate a resource builder

extern crate hyper;
extern crate hyper_rustls;
extern crate google_servicedirectory1_beta1 as servicedirectory1_beta1;

use servicedirectory1_beta1::{ServiceDirectory, FieldMask, hyper_rustls, hyper_util, yup_oauth2};

let secret: yup_oauth2::ApplicationSecret = Default::default();
let connector = hyper_rustls::HttpsConnectorBuilder::new()
    .with_native_roots()
    .unwrap()
    .https_only()
    .enable_http2()
    .build();

let executor = hyper_util::rt::TokioExecutor::new();
let auth = yup_oauth2::InstalledFlowAuthenticator::with_client(
    secret,
    yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
    yup_oauth2::client::CustomHyperClientBuilder::from(
        hyper_util::client::legacy::Client::builder(executor).build(connector),
    ),
).build().await.unwrap();

let client = hyper_util::client::legacy::Client::builder(
    hyper_util::rt::TokioExecutor::new()
)
.build(
    hyper_rustls::HttpsConnectorBuilder::new()
        .with_native_roots()
        .unwrap()
        .https_or_http()
        .enable_http2()
        .build()
);
let mut hub = ServiceDirectory::new(client, auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `locations_get(...)`, `locations_list(...)`, `locations_namespaces_create(...)`, `locations_namespaces_delete(...)`, `locations_namespaces_get(...)`, `locations_namespaces_get_iam_policy(...)`, `locations_namespaces_list(...)`, `locations_namespaces_patch(...)`, `locations_namespaces_services_create(...)`, `locations_namespaces_services_delete(...)`, `locations_namespaces_services_endpoints_create(...)`, `locations_namespaces_services_endpoints_delete(...)`, `locations_namespaces_services_endpoints_get(...)`, `locations_namespaces_services_endpoints_list(...)`, `locations_namespaces_services_endpoints_patch(...)`, `locations_namespaces_services_get(...)`, `locations_namespaces_services_get_iam_policy(...)`, `locations_namespaces_services_list(...)`, `locations_namespaces_services_patch(...)`, `locations_namespaces_services_resolve(...)`, `locations_namespaces_services_set_iam_policy(...)`, `locations_namespaces_services_test_iam_permissions(...)`, `locations_namespaces_set_iam_policy(...)`, `locations_namespaces_test_iam_permissions(...)`, `locations_namespaces_workloads_get_iam_policy(...)`, `locations_namespaces_workloads_set_iam_policy(...)` and `locations_namespaces_workloads_test_iam_permissions(...)`
// to build up your call.
let rb = hub.projects();

Implementations§

Source§

impl<'a, C> ProjectMethods<'a, C>

Source

pub fn locations_namespaces_services_endpoints_create( &self, request: Endpoint, parent: &str, ) -> ProjectLocationNamespaceServiceEndpointCreateCall<'a, C>

Create a builder to help you perform the following task:

Creates an endpoint, and returns the new endpoint.

§Arguments
  • request - No description provided.
  • parent - Required. The resource name of the service that this endpoint provides.
Source

pub fn locations_namespaces_services_endpoints_delete( &self, name: &str, ) -> ProjectLocationNamespaceServiceEndpointDeleteCall<'a, C>

Create a builder to help you perform the following task:

Deletes an endpoint.

§Arguments
  • name - Required. The name of the endpoint to delete.
Source

pub fn locations_namespaces_services_endpoints_get( &self, name: &str, ) -> ProjectLocationNamespaceServiceEndpointGetCall<'a, C>

Create a builder to help you perform the following task:

Gets an endpoint.

§Arguments
  • name - Required. The name of the endpoint to get.
Source

pub fn locations_namespaces_services_endpoints_list( &self, parent: &str, ) -> ProjectLocationNamespaceServiceEndpointListCall<'a, C>

Create a builder to help you perform the following task:

Lists all endpoints.

§Arguments
  • parent - Required. The resource name of the service whose endpoints you’d like to list.
Source

pub fn locations_namespaces_services_endpoints_patch( &self, request: Endpoint, name: &str, ) -> ProjectLocationNamespaceServiceEndpointPatchCall<'a, C>

Create a builder to help you perform the following task:

Updates an endpoint.

§Arguments
  • request - No description provided.
  • name - Immutable. The resource name for the endpoint in the format projects/*/locations/*/namespaces/*/services/*/endpoints/*.
Source

pub fn locations_namespaces_services_create( &self, request: Service, parent: &str, ) -> ProjectLocationNamespaceServiceCreateCall<'a, C>

Create a builder to help you perform the following task:

Creates a service, and returns the new service.

§Arguments
  • request - No description provided.
  • parent - Required. The resource name of the namespace this service will belong to.
Source

pub fn locations_namespaces_services_delete( &self, name: &str, ) -> ProjectLocationNamespaceServiceDeleteCall<'a, C>

Create a builder to help you perform the following task:

Deletes a service. This also deletes all endpoints associated with the service.

§Arguments
  • name - Required. The name of the service to delete.
Source

pub fn locations_namespaces_services_get( &self, name: &str, ) -> ProjectLocationNamespaceServiceGetCall<'a, C>

Create a builder to help you perform the following task:

Gets a service.

§Arguments
  • name - Required. The name of the service to get.
Source

pub fn locations_namespaces_services_get_iam_policy( &self, request: GetIamPolicyRequest, resource: &str, ) -> ProjectLocationNamespaceServiceGetIamPolicyCall<'a, C>

Create a builder to help you perform the following task:

Gets the IAM Policy for a resource

§Arguments
  • request - No description provided.
  • resource - REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.
Source

pub fn locations_namespaces_services_list( &self, parent: &str, ) -> ProjectLocationNamespaceServiceListCall<'a, C>

Create a builder to help you perform the following task:

Lists all services belonging to a namespace.

§Arguments
  • parent - Required. The resource name of the namespace whose services you’d like to list.
Source

pub fn locations_namespaces_services_patch( &self, request: Service, name: &str, ) -> ProjectLocationNamespaceServicePatchCall<'a, C>

Create a builder to help you perform the following task:

Updates a service.

§Arguments
  • request - No description provided.
  • name - Immutable. The resource name for the service in the format projects/*/locations/*/namespaces/*/services/*.
Source

pub fn locations_namespaces_services_resolve( &self, request: ResolveServiceRequest, name: &str, ) -> ProjectLocationNamespaceServiceResolveCall<'a, C>

Create a builder to help you perform the following task:

Returns a service and its associated endpoints. Resolving a service is not considered an active developer method.

§Arguments
  • request - No description provided.
  • name - Required. The name of the service to resolve.
Source

pub fn locations_namespaces_services_set_iam_policy( &self, request: SetIamPolicyRequest, resource: &str, ) -> ProjectLocationNamespaceServiceSetIamPolicyCall<'a, C>

Create a builder to help you perform the following task:

Sets the IAM Policy for a resource

§Arguments
  • request - No description provided.
  • resource - REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.
Source

pub fn locations_namespaces_services_test_iam_permissions( &self, request: TestIamPermissionsRequest, resource: &str, ) -> ProjectLocationNamespaceServiceTestIamPermissionCall<'a, C>

Create a builder to help you perform the following task:

Tests IAM permissions for a resource (namespace, service or service workload only).

§Arguments
  • request - No description provided.
  • resource - REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.
Source

pub fn locations_namespaces_workloads_get_iam_policy( &self, request: GetIamPolicyRequest, resource: &str, ) -> ProjectLocationNamespaceWorkloadGetIamPolicyCall<'a, C>

Create a builder to help you perform the following task:

Gets the IAM Policy for a resource

§Arguments
  • request - No description provided.
  • resource - REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.
Source

pub fn locations_namespaces_workloads_set_iam_policy( &self, request: SetIamPolicyRequest, resource: &str, ) -> ProjectLocationNamespaceWorkloadSetIamPolicyCall<'a, C>

Create a builder to help you perform the following task:

Sets the IAM Policy for a resource

§Arguments
  • request - No description provided.
  • resource - REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.
Source

pub fn locations_namespaces_workloads_test_iam_permissions( &self, request: TestIamPermissionsRequest, resource: &str, ) -> ProjectLocationNamespaceWorkloadTestIamPermissionCall<'a, C>

Create a builder to help you perform the following task:

Tests IAM permissions for a resource (namespace, service or service workload only).

§Arguments
  • request - No description provided.
  • resource - REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.
Source

pub fn locations_namespaces_create( &self, request: Namespace, parent: &str, ) -> ProjectLocationNamespaceCreateCall<'a, C>

Create a builder to help you perform the following task:

Creates a namespace, and returns the new namespace.

§Arguments
  • request - No description provided.
  • parent - Required. The resource name of the project and location the namespace will be created in.
Source

pub fn locations_namespaces_delete( &self, name: &str, ) -> ProjectLocationNamespaceDeleteCall<'a, C>

Create a builder to help you perform the following task:

Deletes a namespace. This also deletes all services and endpoints in the namespace.

§Arguments
  • name - Required. The name of the namespace to delete.
Source

pub fn locations_namespaces_get( &self, name: &str, ) -> ProjectLocationNamespaceGetCall<'a, C>

Create a builder to help you perform the following task:

Gets a namespace.

§Arguments
  • name - Required. The name of the namespace to retrieve.
Source

pub fn locations_namespaces_get_iam_policy( &self, request: GetIamPolicyRequest, resource: &str, ) -> ProjectLocationNamespaceGetIamPolicyCall<'a, C>

Create a builder to help you perform the following task:

Gets the IAM Policy for a resource

§Arguments
  • request - No description provided.
  • resource - REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.
Source

pub fn locations_namespaces_list( &self, parent: &str, ) -> ProjectLocationNamespaceListCall<'a, C>

Create a builder to help you perform the following task:

Lists all namespaces.

§Arguments
  • parent - Required. The resource name of the project and location whose namespaces you’d like to list.
Source

pub fn locations_namespaces_patch( &self, request: Namespace, name: &str, ) -> ProjectLocationNamespacePatchCall<'a, C>

Create a builder to help you perform the following task:

Updates a namespace.

§Arguments
  • request - No description provided.
  • name - Immutable. The resource name for the namespace in the format projects/*/locations/*/namespaces/*.
Source

pub fn locations_namespaces_set_iam_policy( &self, request: SetIamPolicyRequest, resource: &str, ) -> ProjectLocationNamespaceSetIamPolicyCall<'a, C>

Create a builder to help you perform the following task:

Sets the IAM Policy for a resource

§Arguments
  • request - No description provided.
  • resource - REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.
Source

pub fn locations_namespaces_test_iam_permissions( &self, request: TestIamPermissionsRequest, resource: &str, ) -> ProjectLocationNamespaceTestIamPermissionCall<'a, C>

Create a builder to help you perform the following task:

Tests IAM permissions for a resource (namespace, service or service workload only).

§Arguments
  • request - No description provided.
  • resource - REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.
Source

pub fn locations_get(&self, name: &str) -> ProjectLocationGetCall<'a, C>

Create a builder to help you perform the following task:

Gets information about a location.

§Arguments
  • name - Resource name for the location.
Source

pub fn locations_list(&self, name: &str) -> ProjectLocationListCall<'a, C>

Create a builder to help you perform the following task:

Lists information about the supported locations for this service.

§Arguments
  • name - The resource that owns the locations collection, if applicable.

Trait Implementations§

Source§

impl<'a, C> MethodsBuilder for ProjectMethods<'a, C>

Auto Trait Implementations§

§

impl<'a, C> Freeze for ProjectMethods<'a, C>

§

impl<'a, C> !RefUnwindSafe for ProjectMethods<'a, C>

§

impl<'a, C> Send for ProjectMethods<'a, C>
where C: Sync,

§

impl<'a, C> Sync for ProjectMethods<'a, C>
where C: Sync,

§

impl<'a, C> Unpin for ProjectMethods<'a, C>

§

impl<'a, C> !UnwindSafe for ProjectMethods<'a, C>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more