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 ContainerAnalysis hub.

§Example

Instantiate a resource builder

extern crate hyper;
extern crate hyper_rustls;
extern crate google_containeranalysis1_beta1 as containeranalysis1_beta1;

use containeranalysis1_beta1::{ContainerAnalysis, FieldMask, hyper_rustls, hyper_util, yup_oauth2};

let secret: yup_oauth2::ApplicationSecret = Default::default();
let auth = yup_oauth2::InstalledFlowAuthenticator::builder(
    secret,
    yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
).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_http1()
        .build()
);
let mut hub = ContainerAnalysis::new(client, auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `locations_notes_get(...)`, `locations_notes_list(...)`, `locations_notes_occurrences_list(...)`, `locations_occurrences_get(...)`, `locations_occurrences_get_notes(...)`, `locations_occurrences_get_vulnerability_summary(...)`, `locations_occurrences_list(...)`, `locations_resources_export_sbom(...)`, `locations_resources_generate_packages_summary(...)`, `notes_batch_create(...)`, `notes_create(...)`, `notes_delete(...)`, `notes_get(...)`, `notes_get_iam_policy(...)`, `notes_list(...)`, `notes_occurrences_list(...)`, `notes_patch(...)`, `notes_set_iam_policy(...)`, `notes_test_iam_permissions(...)`, `occurrences_batch_create(...)`, `occurrences_create(...)`, `occurrences_delete(...)`, `occurrences_get(...)`, `occurrences_get_iam_policy(...)`, `occurrences_get_notes(...)`, `occurrences_get_vulnerability_summary(...)`, `occurrences_list(...)`, `occurrences_patch(...)`, `occurrences_set_iam_policy(...)`, `occurrences_test_iam_permissions(...)`, `resources_export_sbom(...)` and `resources_generate_packages_summary(...)`
// to build up your call.
let rb = hub.projects();

Implementations§

Source§

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

Source

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

Create a builder to help you perform the following task:

Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note.

§Arguments
  • name - Required. The name of the note to list occurrences for in the form of projects/[PROVIDER_ID]/notes/[NOTE_ID].
Source

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

Create a builder to help you perform the following task:

Gets the specified note.

§Arguments
  • name - Required. The name of the note in the form of projects/[PROVIDER_ID]/notes/[NOTE_ID].
Source

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

Create a builder to help you perform the following task:

Lists notes for the specified project.

§Arguments
  • parent - Required. The name of the project to list notes for in the form of projects/[PROJECT_ID].
Source

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

Create a builder to help you perform the following task:

Gets the specified occurrence.

§Arguments
  • name - Required. The name of the occurrence in the form of projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID].
Source

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

Create a builder to help you perform the following task:

Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project.

§Arguments
  • name - Required. The name of the occurrence in the form of projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID].
Source

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

Create a builder to help you perform the following task:

Gets a summary of the number and severity of occurrences.

§Arguments
  • parent - Required. The name of the project to get a vulnerability summary for in the form of projects/[PROJECT_ID].
Source

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

Create a builder to help you perform the following task:

Lists occurrences for the specified project.

§Arguments
  • parent - Required. The name of the project to list occurrences for in the form of projects/[PROJECT_ID].
Source

pub fn locations_resources_export_sbom( &self, request: ExportSBOMRequest, name: &str, ) -> ProjectLocationResourceExportSBOMCall<'a, C>

Create a builder to help you perform the following task:

Generates an SBOM and other dependency information for the given resource.

§Arguments
  • request - No description provided.
  • name - Required. The name of the resource in the form of projects/[PROJECT_ID]/resources/[RESOURCE_URL].
Source

pub fn locations_resources_generate_packages_summary( &self, request: GeneratePackagesSummaryRequest, name: &str, ) -> ProjectLocationResourceGeneratePackagesSummaryCall<'a, C>

Create a builder to help you perform the following task:

Gets a summary of the packages within a given resource.

§Arguments
  • request - No description provided.
  • name - Required. The name of the resource to get a packages summary for in the form of projects/[PROJECT_ID]/resources/[RESOURCE_URL].
Source

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

Create a builder to help you perform the following task:

Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note.

§Arguments
  • name - Required. The name of the note to list occurrences for in the form of projects/[PROVIDER_ID]/notes/[NOTE_ID].
Source

pub fn notes_batch_create( &self, request: BatchCreateNotesRequest, parent: &str, ) -> ProjectNoteBatchCreateCall<'a, C>

Create a builder to help you perform the following task:

Creates new notes in batch.

§Arguments
  • request - No description provided.
  • parent - Required. The name of the project in the form of projects/[PROJECT_ID], under which the notes are to be created.
Source

pub fn notes_create( &self, request: Note, parent: &str, ) -> ProjectNoteCreateCall<'a, C>

Create a builder to help you perform the following task:

Creates a new note.

§Arguments
  • request - No description provided.
  • parent - Required. The name of the project in the form of projects/[PROJECT_ID], under which the note is to be created.
Source

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

Create a builder to help you perform the following task:

Deletes the specified note.

§Arguments
  • name - Required. The name of the note in the form of projects/[PROVIDER_ID]/notes/[NOTE_ID].
Source

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

Create a builder to help you perform the following task:

Gets the specified note.

§Arguments
  • name - Required. The name of the note in the form of projects/[PROVIDER_ID]/notes/[NOTE_ID].
Source

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

Create a builder to help you perform the following task:

Gets the access control policy for a note or an occurrence resource. Requires containeranalysis.notes.setIamPolicy or containeranalysis.occurrences.setIamPolicy permission if the resource is a note or occurrence, respectively. The resource takes the format projects/[PROJECT_ID]/notes/[NOTE_ID] for notes and projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID] for occurrences.

§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 notes_list(&self, parent: &str) -> ProjectNoteListCall<'a, C>

Create a builder to help you perform the following task:

Lists notes for the specified project.

§Arguments
  • parent - Required. The name of the project to list notes for in the form of projects/[PROJECT_ID].
Source

pub fn notes_patch( &self, request: Note, name: &str, ) -> ProjectNotePatchCall<'a, C>

Create a builder to help you perform the following task:

Updates the specified note.

§Arguments
  • request - No description provided.
  • name - Required. The name of the note in the form of projects/[PROVIDER_ID]/notes/[NOTE_ID].
Source

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

Create a builder to help you perform the following task:

Sets the access control policy on the specified note or occurrence. Requires containeranalysis.notes.setIamPolicy or containeranalysis.occurrences.setIamPolicy permission if the resource is a note or an occurrence, respectively. The resource takes the format projects/[PROJECT_ID]/notes/[NOTE_ID] for notes and projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID] for occurrences.

§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 notes_test_iam_permissions( &self, request: TestIamPermissionsRequest, resource: &str, ) -> ProjectNoteTestIamPermissionCall<'a, C>

Create a builder to help you perform the following task:

Returns the permissions that a caller has on the specified note or occurrence. Requires list permission on the project (for example, containeranalysis.notes.list). The resource takes the format projects/[PROJECT_ID]/notes/[NOTE_ID] for notes and projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID] for occurrences.

§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 occurrences_batch_create( &self, request: BatchCreateOccurrencesRequest, parent: &str, ) -> ProjectOccurrenceBatchCreateCall<'a, C>

Create a builder to help you perform the following task:

Creates new occurrences in batch.

§Arguments
  • request - No description provided.
  • parent - Required. The name of the project in the form of projects/[PROJECT_ID], under which the occurrences are to be created.
Source

pub fn occurrences_create( &self, request: Occurrence, parent: &str, ) -> ProjectOccurrenceCreateCall<'a, C>

Create a builder to help you perform the following task:

Creates a new occurrence.

§Arguments
  • request - No description provided.
  • parent - Required. The name of the project in the form of projects/[PROJECT_ID], under which the occurrence is to be created.
Source

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

Create a builder to help you perform the following task:

Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource.

§Arguments
  • name - Required. The name of the occurrence in the form of projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID].
Source

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

Create a builder to help you perform the following task:

Gets the specified occurrence.

§Arguments
  • name - Required. The name of the occurrence in the form of projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID].
Source

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

Create a builder to help you perform the following task:

Gets the access control policy for a note or an occurrence resource. Requires containeranalysis.notes.setIamPolicy or containeranalysis.occurrences.setIamPolicy permission if the resource is a note or occurrence, respectively. The resource takes the format projects/[PROJECT_ID]/notes/[NOTE_ID] for notes and projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID] for occurrences.

§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 occurrences_get_notes( &self, name: &str, ) -> ProjectOccurrenceGetNoteCall<'a, C>

Create a builder to help you perform the following task:

Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project.

§Arguments
  • name - Required. The name of the occurrence in the form of projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID].
Source

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

Create a builder to help you perform the following task:

Gets a summary of the number and severity of occurrences.

§Arguments
  • parent - Required. The name of the project to get a vulnerability summary for in the form of projects/[PROJECT_ID].
Source

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

Create a builder to help you perform the following task:

Lists occurrences for the specified project.

§Arguments
  • parent - Required. The name of the project to list occurrences for in the form of projects/[PROJECT_ID].
Source

pub fn occurrences_patch( &self, request: Occurrence, name: &str, ) -> ProjectOccurrencePatchCall<'a, C>

Create a builder to help you perform the following task:

Updates the specified occurrence.

§Arguments
  • request - No description provided.
  • name - Required. The name of the occurrence in the form of projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID].
Source

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

Create a builder to help you perform the following task:

Sets the access control policy on the specified note or occurrence. Requires containeranalysis.notes.setIamPolicy or containeranalysis.occurrences.setIamPolicy permission if the resource is a note or an occurrence, respectively. The resource takes the format projects/[PROJECT_ID]/notes/[NOTE_ID] for notes and projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID] for occurrences.

§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 occurrences_test_iam_permissions( &self, request: TestIamPermissionsRequest, resource: &str, ) -> ProjectOccurrenceTestIamPermissionCall<'a, C>

Create a builder to help you perform the following task:

Returns the permissions that a caller has on the specified note or occurrence. Requires list permission on the project (for example, containeranalysis.notes.list). The resource takes the format projects/[PROJECT_ID]/notes/[NOTE_ID] for notes and projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID] for occurrences.

§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 resources_export_sbom( &self, request: ExportSBOMRequest, name: &str, ) -> ProjectResourceExportSBOMCall<'a, C>

Create a builder to help you perform the following task:

Generates an SBOM and other dependency information for the given resource.

§Arguments
  • request - No description provided.
  • name - Required. The name of the resource in the form of projects/[PROJECT_ID]/resources/[RESOURCE_URL].
Source

pub fn resources_generate_packages_summary( &self, request: GeneratePackagesSummaryRequest, name: &str, ) -> ProjectResourceGeneratePackagesSummaryCall<'a, C>

Create a builder to help you perform the following task:

Gets a summary of the packages within a given resource.

§Arguments
  • request - No description provided.
  • name - Required. The name of the resource to get a packages summary for in the form of projects/[PROJECT_ID]/resources/[RESOURCE_URL].

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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
Source§

impl<T> ErasedDestructor for T
where T: 'static,