Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5,046 changes: 3,444 additions & 1,602 deletions src/generated/cloud/aiplatform/v1/src/convert.rs

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions src/generated/cloud/aiplatform/v1/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,20 @@ pub(crate) mod prost {
include!("prost/includes.rs");
}

#[cfg(any(
feature = "feature-online-store-service",
feature = "featurestore-online-serving-service",
feature = "prediction-service",
feature = "reasoning-engine-execution-service",
feature = "tensorboard-service",
))]
#[doc(hidden)]
#[allow(clippy::all)]
#[allow(unused_imports)]
#[allow(dead_code)]
#[allow(missing_docs)]
pub(crate) mod convert;

/// The default host used by the service.
#[cfg(any(
feature = "data-foundry-service",
Expand Down
1 change: 0 additions & 1 deletion src/generated/cloud/aiplatform/v1/src/prost/includes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ pub mod google {
pub mod aiplatform {
pub mod v1 {
include!("google.cloud.aiplatform.v1.rs");
include!("../convert.rs");
}
}
}
Expand Down
142 changes: 76 additions & 66 deletions src/generated/cloud/apigeeconnect/v1/src/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@
//
// Code generated by sidekick. DO NOT EDIT.

use super::prost::google::cloud::apigeeconnect::v1::*;

impl gaxi::prost::ToProto<crate::prost::google::rpc::Status> for google_cloud_rpc::model::Status {
type Output = crate::prost::google::rpc::Status;
fn to_proto(self) -> std::result::Result<crate::prost::google::rpc::Status, gaxi::prost::ConvertError> {
fn to_proto(
self,
) -> std::result::Result<crate::prost::google::rpc::Status, gaxi::prost::ConvertError> {
Ok(Self::Output {
code: self.code,
message: self.message,
Expand All @@ -30,7 +34,9 @@ impl gaxi::prost::ToProto<crate::prost::google::rpc::Status> for google_cloud_rp
}

impl gaxi::prost::FromProto<google_cloud_rpc::model::Status> for crate::prost::google::rpc::Status {
fn cnv(self) -> std::result::Result<google_cloud_rpc::model::Status, gaxi::prost::ConvertError> {
fn cnv(
self,
) -> std::result::Result<google_cloud_rpc::model::Status, gaxi::prost::ConvertError> {
let mut status = google_cloud_rpc::model::Status::new();
status = status.set_code(self.code);
status = status.set_message(self.message);
Expand All @@ -47,21 +53,30 @@ impl gaxi::prost::FromProto<google_cloud_rpc::model::Status> for crate::prost::g
impl gaxi::prost::ToProto<Action> for crate::model::Action {
type Output = i32;
fn to_proto(self) -> std::result::Result<Self::Output, gaxi::prost::ConvertError> {
self.value().ok_or(gaxi::prost::ConvertError::EnumNoIntegerValue("crate::model::Action"))
self.value()
.ok_or(gaxi::prost::ConvertError::EnumNoIntegerValue(
"crate::model::Action",
))
}
}

impl gaxi::prost::ToProto<TetherEndpoint> for crate::model::TetherEndpoint {
type Output = i32;
fn to_proto(self) -> std::result::Result<Self::Output, gaxi::prost::ConvertError> {
self.value().ok_or(gaxi::prost::ConvertError::EnumNoIntegerValue("crate::model::TetherEndpoint"))
self.value()
.ok_or(gaxi::prost::ConvertError::EnumNoIntegerValue(
"crate::model::TetherEndpoint",
))
}
}

impl gaxi::prost::ToProto<Scheme> for crate::model::Scheme {
type Output = i32;
fn to_proto(self) -> std::result::Result<Self::Output, gaxi::prost::ConvertError> {
self.value().ok_or(gaxi::prost::ConvertError::EnumNoIntegerValue("crate::model::Scheme"))
self.value()
.ok_or(gaxi::prost::ConvertError::EnumNoIntegerValue(
"crate::model::Scheme",
))
}
}

Expand All @@ -81,15 +96,13 @@ impl gaxi::prost::ToProto<EgressRequest> for crate::model::EgressRequest {

impl gaxi::prost::FromProto<crate::model::EgressRequest> for EgressRequest {
fn cnv(self) -> std::result::Result<crate::model::EgressRequest, gaxi::prost::ConvertError> {
Ok(
crate::model::EgressRequest::new()
.set_id(self.id)
.set_or_clear_payload(self.payload.map(|v| v.cnv()).transpose()?)
.set_endpoint(self.endpoint)
.set_project(self.project)
.set_trace_id(self.trace_id)
.set_or_clear_timeout(self.timeout.map(|v| v.cnv()).transpose()?)
)
Ok(crate::model::EgressRequest::new()
.set_id(self.id)
.set_or_clear_payload(self.payload.map(|v| v.cnv()).transpose()?)
.set_endpoint(self.endpoint)
.set_project(self.project)
.set_trace_id(self.trace_id)
.set_or_clear_timeout(self.timeout.map(|v| v.cnv()).transpose()?))
}
}

Expand Down Expand Up @@ -126,10 +139,7 @@ impl gaxi::prost::ToProto<Payload> for crate::model::Payload {

impl gaxi::prost::FromProto<crate::model::Payload> for Payload {
fn cnv(self) -> std::result::Result<crate::model::Payload, gaxi::prost::ConvertError> {
Ok(
crate::model::Payload::new()
.set_kind(self.kind.map(|v| v.cnv()).transpose()?)
)
Ok(crate::model::Payload::new().set_kind(self.kind.map(|v| v.cnv()).transpose()?))
}
}

Expand All @@ -144,10 +154,7 @@ impl gaxi::prost::ToProto<StreamInfo> for crate::model::StreamInfo {

impl gaxi::prost::FromProto<crate::model::StreamInfo> for StreamInfo {
fn cnv(self) -> std::result::Result<crate::model::StreamInfo, gaxi::prost::ConvertError> {
Ok(
crate::model::StreamInfo::new()
.set_id(self.id)
)
Ok(crate::model::StreamInfo::new().set_id(self.id))
}
}

Expand All @@ -168,16 +175,14 @@ impl gaxi::prost::ToProto<EgressResponse> for crate::model::EgressResponse {

impl gaxi::prost::FromProto<crate::model::EgressResponse> for EgressResponse {
fn cnv(self) -> std::result::Result<crate::model::EgressResponse, gaxi::prost::ConvertError> {
Ok(
crate::model::EgressResponse::new()
.set_id(self.id)
.set_or_clear_http_response(self.http_response.map(|v| v.cnv()).transpose()?)
.set_or_clear_status(self.status.map(|v| v.cnv()).transpose()?)
.set_project(self.project)
.set_trace_id(self.trace_id)
.set_endpoint(self.endpoint)
.set_name(self.name)
)
Ok(crate::model::EgressResponse::new()
.set_id(self.id)
.set_or_clear_http_response(self.http_response.map(|v| v.cnv()).transpose()?)
.set_or_clear_status(self.status.map(|v| v.cnv()).transpose()?)
.set_project(self.project)
.set_trace_id(self.trace_id)
.set_endpoint(self.endpoint)
.set_name(self.name))
}
}

Expand All @@ -188,7 +193,8 @@ impl gaxi::prost::ToProto<HttpRequest> for crate::model::HttpRequest {
id: self.id.to_proto()?,
method: self.method.to_proto()?,
url: self.url.map(|v| v.to_proto()).transpose()?,
headers: self.headers
headers: self
.headers
.into_iter()
.map(|v| v.to_proto())
.collect::<std::result::Result<std::vec::Vec<_>, _>>()?,
Expand All @@ -199,15 +205,17 @@ impl gaxi::prost::ToProto<HttpRequest> for crate::model::HttpRequest {

impl gaxi::prost::FromProto<crate::model::HttpRequest> for HttpRequest {
fn cnv(self) -> std::result::Result<crate::model::HttpRequest, gaxi::prost::ConvertError> {
Ok(
crate::model::HttpRequest::new()
.set_id(self.id)
.set_method(self.method)
.set_or_clear_url(self.url.map(|v| v.cnv()).transpose()?)
.set_headers(self.headers.into_iter().map(|v| v.cnv())
.collect::<std::result::Result<std::vec::Vec<_>, _>>()?)
.set_body(self.body)
)
Ok(crate::model::HttpRequest::new()
.set_id(self.id)
.set_method(self.method)
.set_or_clear_url(self.url.map(|v| v.cnv()).transpose()?)
.set_headers(
self.headers
.into_iter()
.map(|v| v.cnv())
.collect::<std::result::Result<std::vec::Vec<_>, _>>()?,
)
.set_body(self.body))
}
}

Expand All @@ -224,12 +232,10 @@ impl gaxi::prost::ToProto<Url> for crate::model::Url {

impl gaxi::prost::FromProto<crate::model::Url> for Url {
fn cnv(self) -> std::result::Result<crate::model::Url, gaxi::prost::ConvertError> {
Ok(
crate::model::Url::new()
.set_scheme(self.scheme)
.set_host(self.host)
.set_path(self.path)
)
Ok(crate::model::Url::new()
.set_scheme(self.scheme)
.set_host(self.host)
.set_path(self.path))
}
}

Expand All @@ -238,7 +244,8 @@ impl gaxi::prost::ToProto<Header> for crate::model::Header {
fn to_proto(self) -> std::result::Result<Header, gaxi::prost::ConvertError> {
Ok(Self::Output {
key: self.key.to_proto()?,
values: self.values
values: self
.values
.into_iter()
.map(|v| v.to_proto())
.collect::<std::result::Result<std::vec::Vec<_>, _>>()?,
Expand All @@ -248,12 +255,12 @@ impl gaxi::prost::ToProto<Header> for crate::model::Header {

impl gaxi::prost::FromProto<crate::model::Header> for Header {
fn cnv(self) -> std::result::Result<crate::model::Header, gaxi::prost::ConvertError> {
Ok(
crate::model::Header::new()
.set_key(self.key)
.set_values(self.values.into_iter().map(|v| v.cnv())
.collect::<std::result::Result<std::vec::Vec<_>, _>>()?)
)
Ok(crate::model::Header::new().set_key(self.key).set_values(
self.values
.into_iter()
.map(|v| v.cnv())
.collect::<std::result::Result<std::vec::Vec<_>, _>>()?,
))
}
}

Expand All @@ -265,7 +272,8 @@ impl gaxi::prost::ToProto<HttpResponse> for crate::model::HttpResponse {
status: self.status.to_proto()?,
status_code: self.status_code.to_proto()?,
body: self.body.to_proto()?,
headers: self.headers
headers: self
.headers
.into_iter()
.map(|v| v.to_proto())
.collect::<std::result::Result<std::vec::Vec<_>, _>>()?,
Expand All @@ -276,15 +284,17 @@ impl gaxi::prost::ToProto<HttpResponse> for crate::model::HttpResponse {

impl gaxi::prost::FromProto<crate::model::HttpResponse> for HttpResponse {
fn cnv(self) -> std::result::Result<crate::model::HttpResponse, gaxi::prost::ConvertError> {
Ok(
crate::model::HttpResponse::new()
.set_id(self.id)
.set_status(self.status)
.set_status_code(self.status_code)
.set_body(self.body)
.set_headers(self.headers.into_iter().map(|v| v.cnv())
.collect::<std::result::Result<std::vec::Vec<_>, _>>()?)
.set_content_length(self.content_length)
)
Ok(crate::model::HttpResponse::new()
.set_id(self.id)
.set_status(self.status)
.set_status_code(self.status_code)
.set_body(self.body)
.set_headers(
self.headers
.into_iter()
.map(|v| v.cnv())
.collect::<std::result::Result<std::vec::Vec<_>, _>>()?,
)
.set_content_length(self.content_length))
}
}
7 changes: 7 additions & 0 deletions src/generated/cloud/apigeeconnect/v1/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ pub(crate) mod prost {
include!("prost/includes.rs");
}

#[doc(hidden)]
#[allow(clippy::all)]
#[allow(unused_imports)]
#[allow(dead_code)]
#[allow(missing_docs)]
pub(crate) mod convert;

/// The default host used by the service.
const DEFAULT_HOST: &str = "https://apigeeconnect.googleapis.com/";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ pub mod google {
pub mod apigeeconnect {
pub mod v1 {
include!("google.cloud.apigeeconnect.v1.rs");
include!("../convert.rs");
}
}
}
Expand Down
Loading
Loading