1#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct PreferredRefNameConfiguration {
4 #[prost(message, repeated, tag = "1")]
5 pub v1: ::prost::alloc::vec::Vec<super::super::types::RefNameAndType>,
6}
7#[derive(Clone, PartialEq, ::prost::Message)]
8pub struct ProcedureSettings {
9 #[prost(oneof = "procedure_settings::ProcedureSettings", tags = "1")]
10 pub procedure_settings: ::core::option::Option<
11 procedure_settings::ProcedureSettings,
12 >,
13}
14pub mod procedure_settings {
16 #[derive(Clone, PartialEq, ::prost::Oneof)]
17 pub enum ProcedureSettings {
18 #[prost(message, tag = "1")]
19 V1(super::ProcedureSettingsV1),
20 }
21}
22#[derive(Clone, PartialEq, ::prost::Message)]
23pub struct ProcedureSettingsV1 {
24 #[prost(string, repeated, tag = "1")]
25 pub workspace_procedures: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
26}
27#[derive(Clone, Copy, PartialEq, ::prost::Message)]
28pub struct RemoveType {}
29#[derive(Clone, PartialEq, ::prost::Message)]
30pub struct UpdateOrRemoveWorkspaceDisplayName {
31 #[prost(
32 oneof = "update_or_remove_workspace_display_name::UpdateOrRemoveWorkspaceDisplayName",
33 tags = "1, 2"
34 )]
35 pub update_or_remove_workspace_display_name: ::core::option::Option<
36 update_or_remove_workspace_display_name::UpdateOrRemoveWorkspaceDisplayName,
37 >,
38}
39pub mod update_or_remove_workspace_display_name {
41 #[derive(Clone, PartialEq, ::prost::Oneof)]
42 pub enum UpdateOrRemoveWorkspaceDisplayName {
43 #[prost(string, tag = "1")]
44 DisplayName(::prost::alloc::string::String),
45 #[prost(message, tag = "2")]
46 RemoveType(super::RemoveType),
47 }
48}
49#[derive(Clone, PartialEq, ::prost::Message)]
50pub struct UpdateOrRemoveWorkspaceSymbol {
51 #[prost(
52 oneof = "update_or_remove_workspace_symbol::UpdateOrRemoveWorkspaceSymbol",
53 tags = "1, 2"
54 )]
55 pub update_or_remove_workspace_symbol: ::core::option::Option<
56 update_or_remove_workspace_symbol::UpdateOrRemoveWorkspaceSymbol,
57 >,
58}
59pub mod update_or_remove_workspace_symbol {
61 #[derive(Clone, PartialEq, ::prost::Oneof)]
62 pub enum UpdateOrRemoveWorkspaceSymbol {
63 #[prost(message, tag = "1")]
64 Symbol(super::WorkspaceSymbol),
65 #[prost(message, tag = "2")]
66 RemoveType(super::RemoveType),
67 }
68}
69#[derive(Clone, PartialEq, ::prost::Message)]
70pub struct UpdateWorkspaceRequest {
71 #[prost(message, optional, tag = "1")]
72 pub display_name: ::core::option::Option<UpdateOrRemoveWorkspaceDisplayName>,
73 #[prost(message, optional, tag = "2")]
74 pub symbol: ::core::option::Option<UpdateOrRemoveWorkspaceSymbol>,
75 #[prost(message, optional, tag = "3")]
76 pub settings: ::core::option::Option<WorkspaceSettings>,
77}
78#[derive(Clone, PartialEq, ::prost::Message)]
79pub struct Workspace {
80 #[prost(string, tag = "1")]
81 pub id: ::prost::alloc::string::String,
82 #[prost(string, tag = "2")]
83 pub rid: ::prost::alloc::string::String,
84 #[prost(string, tag = "3")]
85 pub org: ::prost::alloc::string::String,
86 #[prost(string, optional, tag = "4")]
87 pub display_name: ::core::option::Option<::prost::alloc::string::String>,
88 #[prost(message, optional, tag = "5")]
89 pub symbol: ::core::option::Option<WorkspaceSymbol>,
90 #[prost(message, optional, tag = "6")]
91 pub settings: ::core::option::Option<WorkspaceSettings>,
92}
93#[derive(Clone, PartialEq, ::prost::Message)]
94pub struct WorkspaceSettings {
95 #[prost(message, optional, tag = "1")]
96 pub ref_names: ::core::option::Option<PreferredRefNameConfiguration>,
97 #[prost(message, optional, tag = "2")]
98 pub procedures: ::core::option::Option<ProcedureSettings>,
99}
100#[derive(Clone, PartialEq, ::prost::Message)]
101pub struct WorkspaceSymbol {
102 #[prost(oneof = "workspace_symbol::WorkspaceSymbol", tags = "1, 2, 3")]
103 pub workspace_symbol: ::core::option::Option<workspace_symbol::WorkspaceSymbol>,
104}
105pub mod workspace_symbol {
107 #[derive(Clone, PartialEq, ::prost::Oneof)]
108 pub enum WorkspaceSymbol {
109 #[prost(string, tag = "1")]
110 Icon(::prost::alloc::string::String),
111 #[prost(string, tag = "2")]
112 Emoji(::prost::alloc::string::String),
113 #[prost(string, tag = "3")]
114 Image(::prost::alloc::string::String),
115 }
116}
117#[derive(Clone, Copy, PartialEq, ::prost::Message)]
118pub struct GetWorkspacesRequest {
119 #[prost(bool, optional, tag = "1")]
120 pub filter_by_session_org: ::core::option::Option<bool>,
121 #[prost(bool, optional, tag = "2")]
122 pub include_guest_workspaces: ::core::option::Option<bool>,
123}
124#[derive(Clone, PartialEq, ::prost::Message)]
125pub struct GetWorkspacesResponse {
126 #[prost(message, repeated, tag = "1")]
127 pub workspaces: ::prost::alloc::vec::Vec<Workspace>,
128}
129#[derive(Clone, PartialEq, ::prost::Message)]
130pub struct GetWorkspaceRequest {
131 #[prost(string, tag = "1")]
132 pub workspace_rid: ::prost::alloc::string::String,
133}
134#[derive(Clone, PartialEq, ::prost::Message)]
135pub struct GetWorkspaceResponse {
136 #[prost(message, optional, tag = "1")]
137 pub workspace: ::core::option::Option<Workspace>,
138}
139#[derive(Clone, PartialEq, ::prost::Message)]
140pub struct UpdateWorkspaceRequestWrapper {
141 #[prost(string, tag = "1")]
142 pub rid: ::prost::alloc::string::String,
143 #[prost(message, optional, tag = "2")]
144 pub request: ::core::option::Option<UpdateWorkspaceRequest>,
145}
146#[derive(Clone, PartialEq, ::prost::Message)]
147pub struct UpdateWorkspaceResponse {
148 #[prost(message, optional, tag = "1")]
149 pub workspace: ::core::option::Option<Workspace>,
150}
151#[derive(Clone, Copy, PartialEq, ::prost::Message)]
152pub struct GetDefaultWorkspaceRequest {}
153#[derive(Clone, PartialEq, ::prost::Message)]
154pub struct GetDefaultWorkspaceResponse {
155 #[prost(message, optional, tag = "1")]
156 pub workspace: ::core::option::Option<Workspace>,
157}
158#[derive(Clone, PartialEq, ::prost::Message)]
159pub struct GetWorkspaceBannerRequest {
160 #[prost(string, tag = "1")]
161 pub workspace_rid: ::prost::alloc::string::String,
162}
163#[derive(Clone, Copy, PartialEq, ::prost::Message)]
164pub struct GetWorkspaceBannerResponse {
165 #[prost(message, optional, tag = "1")]
166 pub banner_config: ::core::option::Option<BannerConfig>,
167}
168#[derive(Clone, Copy, PartialEq, ::prost::Message)]
169pub struct BannerConfig {
170 #[prost(oneof = "banner_config::BannerConfig", tags = "1, 2, 3")]
171 pub banner_config: ::core::option::Option<banner_config::BannerConfig>,
172}
173pub mod banner_config {
175 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
176 pub enum BannerConfig {
177 #[prost(message, tag = "1")]
178 Cui(super::CuiBannerConfig),
179 #[prost(message, tag = "2")]
180 NoItar(super::NoItarBannerConfig),
181 #[prost(message, tag = "3")]
182 Secret(super::SecretBannerConfig),
183 }
184}
185#[derive(Clone, Copy, PartialEq, ::prost::Message)]
186pub struct CuiBannerConfig {}
187#[derive(Clone, Copy, PartialEq, ::prost::Message)]
188pub struct NoItarBannerConfig {}
189#[derive(Clone, Copy, PartialEq, ::prost::Message)]
190pub struct SecretBannerConfig {}
191#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
192#[repr(i32)]
193pub enum SecurityError {
194 ForbiddenCrossWorkspaceOperation = 0,
195 WorkspaceNotFound = 1,
196 WorkspaceNotSpecified = 2,
197}
198impl SecurityError {
199 pub fn as_str_name(&self) -> &'static str {
204 match self {
205 Self::ForbiddenCrossWorkspaceOperation => {
206 "SECURITY_ERROR_FORBIDDEN_CROSS_WORKSPACE_OPERATION"
207 }
208 Self::WorkspaceNotFound => "SECURITY_ERROR_WORKSPACE_NOT_FOUND",
209 Self::WorkspaceNotSpecified => "SECURITY_ERROR_WORKSPACE_NOT_SPECIFIED",
210 }
211 }
212 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
214 match value {
215 "SECURITY_ERROR_FORBIDDEN_CROSS_WORKSPACE_OPERATION" => {
216 Some(Self::ForbiddenCrossWorkspaceOperation)
217 }
218 "SECURITY_ERROR_WORKSPACE_NOT_FOUND" => Some(Self::WorkspaceNotFound),
219 "SECURITY_ERROR_WORKSPACE_NOT_SPECIFIED" => Some(Self::WorkspaceNotSpecified),
220 _ => None,
221 }
222 }
223}
224pub mod workspace_service_client {
226 #![allow(
227 unused_variables,
228 dead_code,
229 missing_docs,
230 clippy::wildcard_imports,
231 clippy::let_unit_value,
232 )]
233 use tonic::codegen::*;
234 use tonic::codegen::http::Uri;
235 #[derive(Debug, Clone)]
236 pub struct WorkspaceServiceClient<T> {
237 inner: tonic::client::Grpc<T>,
238 }
239 impl WorkspaceServiceClient<tonic::transport::Channel> {
240 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
242 where
243 D: TryInto<tonic::transport::Endpoint>,
244 D::Error: Into<StdError>,
245 {
246 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
247 Ok(Self::new(conn))
248 }
249 }
250 impl<T> WorkspaceServiceClient<T>
251 where
252 T: tonic::client::GrpcService<tonic::body::Body>,
253 T::Error: Into<StdError>,
254 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
255 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
256 {
257 pub fn new(inner: T) -> Self {
258 let inner = tonic::client::Grpc::new(inner);
259 Self { inner }
260 }
261 pub fn with_origin(inner: T, origin: Uri) -> Self {
262 let inner = tonic::client::Grpc::with_origin(inner, origin);
263 Self { inner }
264 }
265 pub fn with_interceptor<F>(
266 inner: T,
267 interceptor: F,
268 ) -> WorkspaceServiceClient<InterceptedService<T, F>>
269 where
270 F: tonic::service::Interceptor,
271 T::ResponseBody: Default,
272 T: tonic::codegen::Service<
273 http::Request<tonic::body::Body>,
274 Response = http::Response<
275 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
276 >,
277 >,
278 <T as tonic::codegen::Service<
279 http::Request<tonic::body::Body>,
280 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
281 {
282 WorkspaceServiceClient::new(InterceptedService::new(inner, interceptor))
283 }
284 #[must_use]
289 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
290 self.inner = self.inner.send_compressed(encoding);
291 self
292 }
293 #[must_use]
295 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
296 self.inner = self.inner.accept_compressed(encoding);
297 self
298 }
299 #[must_use]
303 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
304 self.inner = self.inner.max_decoding_message_size(limit);
305 self
306 }
307 #[must_use]
311 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
312 self.inner = self.inner.max_encoding_message_size(limit);
313 self
314 }
315 pub async fn get_workspaces(
316 &mut self,
317 request: impl tonic::IntoRequest<super::GetWorkspacesRequest>,
318 ) -> std::result::Result<
319 tonic::Response<super::GetWorkspacesResponse>,
320 tonic::Status,
321 > {
322 self.inner
323 .ready()
324 .await
325 .map_err(|e| {
326 tonic::Status::unknown(
327 format!("Service was not ready: {}", e.into()),
328 )
329 })?;
330 let codec = tonic::codec::ProstCodec::default();
331 let path = http::uri::PathAndQuery::from_static(
332 "/nominal.workspaces.v1.WorkspaceService/GetWorkspaces",
333 );
334 let mut req = request.into_request();
335 req.extensions_mut()
336 .insert(
337 GrpcMethod::new(
338 "nominal.workspaces.v1.WorkspaceService",
339 "GetWorkspaces",
340 ),
341 );
342 self.inner.unary(req, path, codec).await
343 }
344 pub async fn get_workspace(
345 &mut self,
346 request: impl tonic::IntoRequest<super::GetWorkspaceRequest>,
347 ) -> std::result::Result<
348 tonic::Response<super::GetWorkspaceResponse>,
349 tonic::Status,
350 > {
351 self.inner
352 .ready()
353 .await
354 .map_err(|e| {
355 tonic::Status::unknown(
356 format!("Service was not ready: {}", e.into()),
357 )
358 })?;
359 let codec = tonic::codec::ProstCodec::default();
360 let path = http::uri::PathAndQuery::from_static(
361 "/nominal.workspaces.v1.WorkspaceService/GetWorkspace",
362 );
363 let mut req = request.into_request();
364 req.extensions_mut()
365 .insert(
366 GrpcMethod::new(
367 "nominal.workspaces.v1.WorkspaceService",
368 "GetWorkspace",
369 ),
370 );
371 self.inner.unary(req, path, codec).await
372 }
373 pub async fn update_workspace(
374 &mut self,
375 request: impl tonic::IntoRequest<super::UpdateWorkspaceRequestWrapper>,
376 ) -> std::result::Result<
377 tonic::Response<super::UpdateWorkspaceResponse>,
378 tonic::Status,
379 > {
380 self.inner
381 .ready()
382 .await
383 .map_err(|e| {
384 tonic::Status::unknown(
385 format!("Service was not ready: {}", e.into()),
386 )
387 })?;
388 let codec = tonic::codec::ProstCodec::default();
389 let path = http::uri::PathAndQuery::from_static(
390 "/nominal.workspaces.v1.WorkspaceService/UpdateWorkspace",
391 );
392 let mut req = request.into_request();
393 req.extensions_mut()
394 .insert(
395 GrpcMethod::new(
396 "nominal.workspaces.v1.WorkspaceService",
397 "UpdateWorkspace",
398 ),
399 );
400 self.inner.unary(req, path, codec).await
401 }
402 pub async fn get_default_workspace(
403 &mut self,
404 request: impl tonic::IntoRequest<super::GetDefaultWorkspaceRequest>,
405 ) -> std::result::Result<
406 tonic::Response<super::GetDefaultWorkspaceResponse>,
407 tonic::Status,
408 > {
409 self.inner
410 .ready()
411 .await
412 .map_err(|e| {
413 tonic::Status::unknown(
414 format!("Service was not ready: {}", e.into()),
415 )
416 })?;
417 let codec = tonic::codec::ProstCodec::default();
418 let path = http::uri::PathAndQuery::from_static(
419 "/nominal.workspaces.v1.WorkspaceService/GetDefaultWorkspace",
420 );
421 let mut req = request.into_request();
422 req.extensions_mut()
423 .insert(
424 GrpcMethod::new(
425 "nominal.workspaces.v1.WorkspaceService",
426 "GetDefaultWorkspace",
427 ),
428 );
429 self.inner.unary(req, path, codec).await
430 }
431 pub async fn get_workspace_banner(
432 &mut self,
433 request: impl tonic::IntoRequest<super::GetWorkspaceBannerRequest>,
434 ) -> std::result::Result<
435 tonic::Response<super::GetWorkspaceBannerResponse>,
436 tonic::Status,
437 > {
438 self.inner
439 .ready()
440 .await
441 .map_err(|e| {
442 tonic::Status::unknown(
443 format!("Service was not ready: {}", e.into()),
444 )
445 })?;
446 let codec = tonic::codec::ProstCodec::default();
447 let path = http::uri::PathAndQuery::from_static(
448 "/nominal.workspaces.v1.WorkspaceService/GetWorkspaceBanner",
449 );
450 let mut req = request.into_request();
451 req.extensions_mut()
452 .insert(
453 GrpcMethod::new(
454 "nominal.workspaces.v1.WorkspaceService",
455 "GetWorkspaceBanner",
456 ),
457 );
458 self.inner.unary(req, path, codec).await
459 }
460 }
461}