nominal_api/proto/
nominal.nominalinstro.v1.rs1#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3pub struct GetPythonPackageRegistryRequest {}
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct GetPythonPackageRegistryResponse {
6 #[prost(string, tag = "1")]
7 pub registry_url: ::prost::alloc::string::String,
8 #[prost(string, optional, tag = "2")]
9 pub registry_token: ::core::option::Option<::prost::alloc::string::String>,
10}
11#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
12#[repr(i32)]
13pub enum NominalInstroPackageRegistryError {
14 Unspecified = 0,
15 NotAvailable = 1,
16}
17impl NominalInstroPackageRegistryError {
18 pub fn as_str_name(&self) -> &'static str {
23 match self {
24 Self::Unspecified => "NOMINAL_INSTRO_PACKAGE_REGISTRY_ERROR_UNSPECIFIED",
25 Self::NotAvailable => "NOMINAL_INSTRO_PACKAGE_REGISTRY_ERROR_NOT_AVAILABLE",
26 }
27 }
28 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
30 match value {
31 "NOMINAL_INSTRO_PACKAGE_REGISTRY_ERROR_UNSPECIFIED" => {
32 Some(Self::Unspecified)
33 }
34 "NOMINAL_INSTRO_PACKAGE_REGISTRY_ERROR_NOT_AVAILABLE" => {
35 Some(Self::NotAvailable)
36 }
37 _ => None,
38 }
39 }
40}
41pub mod nominal_instro_package_registry_service_client {
43 #![allow(
44 unused_variables,
45 dead_code,
46 missing_docs,
47 clippy::wildcard_imports,
48 clippy::let_unit_value,
49 )]
50 use tonic::codegen::*;
51 use tonic::codegen::http::Uri;
52 #[derive(Debug, Clone)]
56 pub struct NominalInstroPackageRegistryServiceClient<T> {
57 inner: tonic::client::Grpc<T>,
58 }
59 impl NominalInstroPackageRegistryServiceClient<tonic::transport::Channel> {
60 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
62 where
63 D: TryInto<tonic::transport::Endpoint>,
64 D::Error: Into<StdError>,
65 {
66 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
67 Ok(Self::new(conn))
68 }
69 }
70 impl<T> NominalInstroPackageRegistryServiceClient<T>
71 where
72 T: tonic::client::GrpcService<tonic::body::Body>,
73 T::Error: Into<StdError>,
74 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
75 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
76 {
77 pub fn new(inner: T) -> Self {
78 let inner = tonic::client::Grpc::new(inner);
79 Self { inner }
80 }
81 pub fn with_origin(inner: T, origin: Uri) -> Self {
82 let inner = tonic::client::Grpc::with_origin(inner, origin);
83 Self { inner }
84 }
85 pub fn with_interceptor<F>(
86 inner: T,
87 interceptor: F,
88 ) -> NominalInstroPackageRegistryServiceClient<InterceptedService<T, F>>
89 where
90 F: tonic::service::Interceptor,
91 T::ResponseBody: Default,
92 T: tonic::codegen::Service<
93 http::Request<tonic::body::Body>,
94 Response = http::Response<
95 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
96 >,
97 >,
98 <T as tonic::codegen::Service<
99 http::Request<tonic::body::Body>,
100 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
101 {
102 NominalInstroPackageRegistryServiceClient::new(
103 InterceptedService::new(inner, interceptor),
104 )
105 }
106 #[must_use]
111 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
112 self.inner = self.inner.send_compressed(encoding);
113 self
114 }
115 #[must_use]
117 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
118 self.inner = self.inner.accept_compressed(encoding);
119 self
120 }
121 #[must_use]
125 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
126 self.inner = self.inner.max_decoding_message_size(limit);
127 self
128 }
129 #[must_use]
133 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
134 self.inner = self.inner.max_encoding_message_size(limit);
135 self
136 }
137 pub async fn get_python_package_registry(
139 &mut self,
140 request: impl tonic::IntoRequest<super::GetPythonPackageRegistryRequest>,
141 ) -> std::result::Result<
142 tonic::Response<super::GetPythonPackageRegistryResponse>,
143 tonic::Status,
144 > {
145 self.inner
146 .ready()
147 .await
148 .map_err(|e| {
149 tonic::Status::unknown(
150 format!("Service was not ready: {}", e.into()),
151 )
152 })?;
153 let codec = tonic::codec::ProstCodec::default();
154 let path = http::uri::PathAndQuery::from_static(
155 "/nominal.nominalinstro.v1.NominalInstroPackageRegistryService/GetPythonPackageRegistry",
156 );
157 let mut req = request.into_request();
158 req.extensions_mut()
159 .insert(
160 GrpcMethod::new(
161 "nominal.nominalinstro.v1.NominalInstroPackageRegistryService",
162 "GetPythonPackageRegistry",
163 ),
164 );
165 self.inner.unary(req, path, codec).await
166 }
167 }
168}