#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RelatedUrl {
#[prost(string, tag = "1")]
pub url: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub label: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Signature {
#[prost(bytes = "vec", tag = "1")]
pub signature: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "2")]
pub public_key_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NoteKind {
Unspecified = 0,
Vulnerability = 1,
Build = 2,
Image = 3,
Package = 4,
Deployment = 5,
Discovery = 6,
Attestation = 7,
}
impl NoteKind {
pub fn as_str_name(&self) -> &'static str {
match self {
NoteKind::Unspecified => "NOTE_KIND_UNSPECIFIED",
NoteKind::Vulnerability => "VULNERABILITY",
NoteKind::Build => "BUILD",
NoteKind::Image => "IMAGE",
NoteKind::Package => "PACKAGE",
NoteKind::Deployment => "DEPLOYMENT",
NoteKind::Discovery => "DISCOVERY",
NoteKind::Attestation => "ATTESTATION",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NOTE_KIND_UNSPECIFIED" => Some(Self::Unspecified),
"VULNERABILITY" => Some(Self::Vulnerability),
"BUILD" => Some(Self::Build),
"IMAGE" => Some(Self::Image),
"PACKAGE" => Some(Self::Package),
"DEPLOYMENT" => Some(Self::Deployment),
"DISCOVERY" => Some(Self::Discovery),
"ATTESTATION" => Some(Self::Attestation),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Occurrence {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub resource: ::core::option::Option<Resource>,
#[prost(string, tag = "3")]
pub note_name: ::prost::alloc::string::String,
#[prost(enumeration = "NoteKind", tag = "4")]
pub kind: i32,
#[prost(string, tag = "5")]
pub remediation: ::prost::alloc::string::String,
#[prost(message, optional, tag = "6")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "7")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(oneof = "occurrence::Details", tags = "8, 9, 10, 11, 12, 13, 14")]
pub details: ::core::option::Option<occurrence::Details>,
}
pub mod occurrence {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Details {
#[prost(message, tag = "8")]
Vulnerability(super::vulnerability::Details),
#[prost(message, tag = "9")]
Build(super::build::Details),
#[prost(message, tag = "10")]
DerivedImage(super::image::Details),
#[prost(message, tag = "11")]
Installation(super::package::Details),
#[prost(message, tag = "12")]
Deployment(super::deployment::Details),
#[prost(message, tag = "13")]
Discovered(super::discovery::Details),
#[prost(message, tag = "14")]
Attestation(super::attestation::Details),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Resource {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub uri: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub content_hash: ::core::option::Option<provenance::Hash>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Note {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub short_description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub long_description: ::prost::alloc::string::String,
#[prost(enumeration = "NoteKind", tag = "4")]
pub kind: i32,
#[prost(message, repeated, tag = "5")]
pub related_url: ::prost::alloc::vec::Vec<RelatedUrl>,
#[prost(message, optional, tag = "6")]
pub expiration_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "7")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "8")]
pub update_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, repeated, tag = "9")]
pub related_note_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(oneof = "note::Type", tags = "10, 11, 12, 13, 14, 15, 16")]
pub r#type: ::core::option::Option<note::Type>,
}
pub mod note {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Type {
#[prost(message, tag = "10")]
Vulnerability(super::vulnerability::Vulnerability),
#[prost(message, tag = "11")]
Build(super::build::Build),
#[prost(message, tag = "12")]
BaseImage(super::image::Basis),
#[prost(message, tag = "13")]
Package(super::package::Package),
#[prost(message, tag = "14")]
Deployable(super::deployment::Deployable),
#[prost(message, tag = "15")]
Discovery(super::discovery::Discovery),
#[prost(message, tag = "16")]
AttestationAuthority(super::attestation::Authority),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetOccurrenceRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListOccurrencesRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub filter: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub page_size: i32,
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListOccurrencesResponse {
#[prost(message, repeated, tag = "1")]
pub occurrences: ::prost::alloc::vec::Vec<Occurrence>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteOccurrenceRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateOccurrenceRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub occurrence: ::core::option::Option<Occurrence>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateOccurrenceRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub occurrence: ::core::option::Option<Occurrence>,
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetNoteRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetOccurrenceNoteRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNotesRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub filter: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub page_size: i32,
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNotesResponse {
#[prost(message, repeated, tag = "1")]
pub notes: ::prost::alloc::vec::Vec<Note>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteNoteRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateNoteRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub note_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub note: ::core::option::Option<Note>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateNoteRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub note: ::core::option::Option<Note>,
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNoteOccurrencesRequest {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub filter: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub page_size: i32,
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNoteOccurrencesResponse {
#[prost(message, repeated, tag = "1")]
pub occurrences: ::prost::alloc::vec::Vec<Occurrence>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCreateNotesRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(map = "string, message", tag = "2")]
pub notes: ::std::collections::HashMap<::prost::alloc::string::String, Note>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCreateNotesResponse {
#[prost(message, repeated, tag = "1")]
pub notes: ::prost::alloc::vec::Vec<Note>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCreateOccurrencesRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub occurrences: ::prost::alloc::vec::Vec<Occurrence>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCreateOccurrencesResponse {
#[prost(message, repeated, tag = "1")]
pub occurrences: ::prost::alloc::vec::Vec<Occurrence>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetVulnerabilityOccurrencesSummaryRequest {
#[prost(string, tag = "1")]
pub parent: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VulnerabilityOccurrencesSummary {
#[prost(message, repeated, tag = "1")]
pub counts: ::prost::alloc::vec::Vec<
vulnerability_occurrences_summary::FixableTotalByDigest,
>,
}
pub mod vulnerability_occurrences_summary {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FixableTotalByDigest {
#[prost(message, optional, tag = "1")]
pub resource: ::core::option::Option<super::Resource>,
#[prost(enumeration = "super::vulnerability::Severity", tag = "2")]
pub severity: i32,
#[prost(int64, tag = "3")]
pub fixable_count: i64,
#[prost(int64, tag = "4")]
pub total_count: i64,
}
}
pub mod grafeas_v1_beta1_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct GrafeasV1Beta1Client<T> {
inner: tonic::client::Grpc<T>,
}
impl GrafeasV1Beta1Client<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> GrafeasV1Beta1Client<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> GrafeasV1Beta1Client<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
GrafeasV1Beta1Client::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
pub async fn get_occurrence(
&mut self,
request: impl tonic::IntoRequest<super::GetOccurrenceRequest>,
) -> Result<tonic::Response<super::Occurrence>, 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(
"/grafeas.v1beta1.GrafeasV1Beta1/GetOccurrence",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn list_occurrences(
&mut self,
request: impl tonic::IntoRequest<super::ListOccurrencesRequest>,
) -> Result<tonic::Response<super::ListOccurrencesResponse>, 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(
"/grafeas.v1beta1.GrafeasV1Beta1/ListOccurrences",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delete_occurrence(
&mut self,
request: impl tonic::IntoRequest<super::DeleteOccurrenceRequest>,
) -> Result<tonic::Response<()>, 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(
"/grafeas.v1beta1.GrafeasV1Beta1/DeleteOccurrence",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn create_occurrence(
&mut self,
request: impl tonic::IntoRequest<super::CreateOccurrenceRequest>,
) -> Result<tonic::Response<super::Occurrence>, 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(
"/grafeas.v1beta1.GrafeasV1Beta1/CreateOccurrence",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn batch_create_occurrences(
&mut self,
request: impl tonic::IntoRequest<super::BatchCreateOccurrencesRequest>,
) -> Result<
tonic::Response<super::BatchCreateOccurrencesResponse>,
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(
"/grafeas.v1beta1.GrafeasV1Beta1/BatchCreateOccurrences",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn update_occurrence(
&mut self,
request: impl tonic::IntoRequest<super::UpdateOccurrenceRequest>,
) -> Result<tonic::Response<super::Occurrence>, 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(
"/grafeas.v1beta1.GrafeasV1Beta1/UpdateOccurrence",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_occurrence_note(
&mut self,
request: impl tonic::IntoRequest<super::GetOccurrenceNoteRequest>,
) -> Result<tonic::Response<super::Note>, 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(
"/grafeas.v1beta1.GrafeasV1Beta1/GetOccurrenceNote",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_note(
&mut self,
request: impl tonic::IntoRequest<super::GetNoteRequest>,
) -> Result<tonic::Response<super::Note>, 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(
"/grafeas.v1beta1.GrafeasV1Beta1/GetNote",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn list_notes(
&mut self,
request: impl tonic::IntoRequest<super::ListNotesRequest>,
) -> Result<tonic::Response<super::ListNotesResponse>, 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(
"/grafeas.v1beta1.GrafeasV1Beta1/ListNotes",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn delete_note(
&mut self,
request: impl tonic::IntoRequest<super::DeleteNoteRequest>,
) -> Result<tonic::Response<()>, 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(
"/grafeas.v1beta1.GrafeasV1Beta1/DeleteNote",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn create_note(
&mut self,
request: impl tonic::IntoRequest<super::CreateNoteRequest>,
) -> Result<tonic::Response<super::Note>, 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(
"/grafeas.v1beta1.GrafeasV1Beta1/CreateNote",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn batch_create_notes(
&mut self,
request: impl tonic::IntoRequest<super::BatchCreateNotesRequest>,
) -> Result<tonic::Response<super::BatchCreateNotesResponse>, 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(
"/grafeas.v1beta1.GrafeasV1Beta1/BatchCreateNotes",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn update_note(
&mut self,
request: impl tonic::IntoRequest<super::UpdateNoteRequest>,
) -> Result<tonic::Response<super::Note>, 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(
"/grafeas.v1beta1.GrafeasV1Beta1/UpdateNote",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn list_note_occurrences(
&mut self,
request: impl tonic::IntoRequest<super::ListNoteOccurrencesRequest>,
) -> Result<tonic::Response<super::ListNoteOccurrencesResponse>, 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(
"/grafeas.v1beta1.GrafeasV1Beta1/ListNoteOccurrences",
);
self.inner.unary(request.into_request(), path, codec).await
}
pub async fn get_vulnerability_occurrences_summary(
&mut self,
request: impl tonic::IntoRequest<
super::GetVulnerabilityOccurrencesSummaryRequest,
>,
) -> Result<
tonic::Response<super::VulnerabilityOccurrencesSummary>,
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(
"/grafeas.v1beta1.GrafeasV1Beta1/GetVulnerabilityOccurrencesSummary",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}