nominal-api 0.1193.0

API bindings for the Nominal platform
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthorizedGroups {
    #[prost(string, repeated, tag = "1")]
    pub group_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Marking {
    #[prost(string, tag = "1")]
    pub rid: ::prost::alloc::string::String,
    /// Human-readable identifier for this marking.
    /// Must be unique within the organization.
    /// Must be lower case alphanumeric characters, optionally separated by hyphens.
    #[prost(string, tag = "2")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub description: ::prost::alloc::string::String,
    /// Group RIDs that are authorized to access data sources with this marking.
    #[prost(message, optional, tag = "4")]
    pub authorized_groups: ::core::option::Option<AuthorizedGroups>,
    /// Symbol and color to identify markings
    #[prost(message, optional, tag = "5")]
    pub symbol: ::core::option::Option<super::super::super::scout::elements::v1::Symbol>,
    #[prost(message, optional, tag = "6")]
    pub color: ::core::option::Option<super::super::super::scout::elements::v1::Color>,
    #[prost(message, optional, tag = "7")]
    pub created_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(message, optional, tag = "8")]
    pub updated_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(bool, tag = "9")]
    pub is_archived: bool,
}
/// A leaner representation of a Marking that doesn't include the authorized groups.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarkingMetadata {
    #[prost(string, tag = "1")]
    pub rid: ::prost::alloc::string::String,
    /// Human-readable identifier for this marking.
    /// Must be unique within the organization.
    /// Must be lower case alphanumeric characters, optionally separated by hyphens.
    #[prost(string, tag = "2")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub description: ::prost::alloc::string::String,
    /// Symbol and color to identify markings
    #[prost(message, optional, tag = "4")]
    pub symbol: ::core::option::Option<super::super::super::scout::elements::v1::Symbol>,
    #[prost(message, optional, tag = "5")]
    pub color: ::core::option::Option<super::super::super::scout::elements::v1::Color>,
    #[prost(message, optional, tag = "6")]
    pub created_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(message, optional, tag = "7")]
    pub updated_at: ::core::option::Option<
        super::super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(bool, tag = "8")]
    pub is_archived: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateMarkingRequest {
    /// Human-readable identifier for this marking.
    /// Must be unique within the organization.
    /// Must be lower case alphanumeric characters, optionally separated by hyphens.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    /// Group RIDs that are authorized to access data sources with this marking.
    #[prost(message, optional, tag = "3")]
    pub authorized_groups: ::core::option::Option<AuthorizedGroups>,
    #[prost(message, optional, tag = "4")]
    pub symbol: ::core::option::Option<super::super::super::scout::elements::v1::Symbol>,
    #[prost(message, optional, tag = "5")]
    pub color: ::core::option::Option<super::super::super::scout::elements::v1::Color>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateMarkingResponse {
    #[prost(message, optional, tag = "1")]
    pub marking: ::core::option::Option<Marking>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMarkingRequest {
    #[prost(string, tag = "1")]
    pub rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMarkingResponse {
    #[prost(message, optional, tag = "1")]
    pub marking: ::core::option::Option<Marking>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMarkingByIdRequest {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMarkingByIdResponse {
    #[prost(message, optional, tag = "1")]
    pub marking: ::core::option::Option<Marking>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetMarkingsRequest {
    #[prost(string, repeated, tag = "1")]
    pub marking_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetMarkingsResponse {
    #[prost(message, repeated, tag = "1")]
    pub markings: ::prost::alloc::vec::Vec<Marking>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetMarkingMetadataRequest {
    #[prost(string, repeated, tag = "1")]
    pub marking_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetMarkingMetadataResponse {
    #[prost(message, repeated, tag = "1")]
    pub marking_metadatas: ::prost::alloc::vec::Vec<MarkingMetadata>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAuthorizedGroupsByMarkingRequest {
    #[prost(string, repeated, tag = "1")]
    pub marking_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAuthorizedGroupsByMarkingResponse {
    #[prost(map = "string, message", tag = "1")]
    pub authorized_groups_by_marking: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        AuthorizedGroups,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchMarkingsQuery {
    #[prost(oneof = "search_markings_query::Query", tags = "1, 2, 3")]
    pub query: ::core::option::Option<search_markings_query::Query>,
}
/// Nested message and enum types in `SearchMarkingsQuery`.
pub mod search_markings_query {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Query {
        /// Search for markings with an ID that contains the given query as a substring.
        #[prost(string, tag = "1")]
        IdExactSubstringSearch(::prost::alloc::string::String),
        #[prost(message, tag = "2")]
        And(super::SearchMarkingsQueryList),
        #[prost(message, tag = "3")]
        Or(super::SearchMarkingsQueryList),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchMarkingsQueryList {
    #[prost(message, repeated, tag = "1")]
    pub queries: ::prost::alloc::vec::Vec<SearchMarkingsQuery>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchMarkingsRequest {
    #[prost(message, optional, tag = "1")]
    pub query: ::core::option::Option<SearchMarkingsQuery>,
    /// Page sizes greater than 1_000 will be rejected. Default pageSize is 100.
    #[prost(int32, optional, tag = "2")]
    pub page_size: ::core::option::Option<i32>,
    #[prost(string, optional, tag = "3")]
    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchMarkingsResponse {
    #[prost(message, repeated, tag = "1")]
    pub marking_metadatas: ::prost::alloc::vec::Vec<MarkingMetadata>,
    #[prost(string, optional, tag = "2")]
    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateMarkingRequest {
    #[prost(string, tag = "1")]
    pub rid: ::prost::alloc::string::String,
    /// Human-readable identifier for this marking.
    /// Must be unique within the organization.
    /// Must be lower case alphanumeric characters, optionally separated by hyphens.
    #[prost(string, optional, tag = "2")]
    pub id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "3")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    /// Group RIDs that are authorized to access data sources with this marking.
    #[prost(message, optional, tag = "4")]
    pub authorized_groups: ::core::option::Option<AuthorizedGroups>,
    #[prost(message, optional, tag = "5")]
    pub symbol: ::core::option::Option<
        update_marking_request::UpdateMarkingSymbolWrapper,
    >,
    #[prost(message, optional, tag = "6")]
    pub color: ::core::option::Option<update_marking_request::UpdateMarkingColorWrapper>,
}
/// Nested message and enum types in `UpdateMarkingRequest`.
pub mod update_marking_request {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct UpdateMarkingSymbolWrapper {
        #[prost(message, optional, tag = "1")]
        pub value: ::core::option::Option<
            super::super::super::super::scout::elements::v1::Symbol,
        >,
    }
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct UpdateMarkingColorWrapper {
        #[prost(message, optional, tag = "1")]
        pub value: ::core::option::Option<
            super::super::super::super::scout::elements::v1::Color,
        >,
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateMarkingResponse {
    #[prost(message, optional, tag = "1")]
    pub marking: ::core::option::Option<Marking>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArchiveMarkingsRequest {
    #[prost(string, repeated, tag = "1")]
    pub marking_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// intentionally empty
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ArchiveMarkingsResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnarchiveMarkingsRequest {
    #[prost(string, repeated, tag = "1")]
    pub marking_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// intentionally empty
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UnarchiveMarkingsResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateMarkingsOnResourceRequest {
    #[prost(string, tag = "1")]
    pub resource: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "2")]
    pub markings_to_apply: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, repeated, tag = "3")]
    pub markings_to_remove: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// intentionally empty
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UpdateMarkingsOnResourceResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetResourcesForMarkingRequest {
    #[prost(string, tag = "1")]
    pub marking_rid: ::prost::alloc::string::String,
    /// Page sizes greater than 1_000 will be rejected. Default pageSize is 100.
    #[prost(int32, optional, tag = "2")]
    pub page_size: ::core::option::Option<i32>,
    #[prost(string, optional, tag = "3")]
    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetResourcesForMarkingResponse {
    #[prost(message, repeated, tag = "1")]
    pub resources: ::prost::alloc::vec::Vec<
        get_resources_for_marking_response::MarkedResource,
    >,
    #[prost(string, optional, tag = "2")]
    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
/// Nested message and enum types in `GetResourcesForMarkingResponse`.
pub mod get_resources_for_marking_response {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct MarkedResource {
        /// nb: skipping field 1 in order to keep the door open to unify this message with "AppliedMarking" below
        #[prost(string, tag = "2")]
        pub resource: ::prost::alloc::string::String,
        #[prost(message, optional, tag = "3")]
        pub applied_at: ::core::option::Option<
            super::super::super::super::super::google::protobuf::Timestamp,
        >,
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMarkingsForResourcesRequest {
    /// The resources to get the markings for.
    #[prost(string, repeated, tag = "1")]
    pub resources: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMarkingsForResourcesResponse {
    /// A map from resource ID to the markings applied to them.
    #[prost(map = "string, message", tag = "1")]
    pub resource_to_markings: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        get_markings_for_resources_response::ResourceMarkingsList,
    >,
}
/// Nested message and enum types in `GetMarkingsForResourcesResponse`.
pub mod get_markings_for_resources_response {
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ResourceMarkingsList {
        #[prost(message, repeated, tag = "1")]
        pub applied_markings: ::prost::alloc::vec::Vec<
            resource_markings_list::AppliedMarking,
        >,
    }
    /// Nested message and enum types in `ResourceMarkingsList`.
    pub mod resource_markings_list {
        #[derive(Clone, PartialEq, ::prost::Message)]
        pub struct AppliedMarking {
            #[prost(string, tag = "1")]
            pub marking_rid: ::prost::alloc::string::String,
            /// nb: skipping field 2 in order to keep the door open to unify this message with "MarkedResource" above
            #[prost(message, optional, tag = "3")]
            pub applied_at: ::core::option::Option<
                super::super::super::super::super::super::google::protobuf::Timestamp,
            >,
        }
    }
}
/// Generated client implementations.
pub mod marking_service_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// This service manages Markings, which are a mechanism to restrict access to data sources.
    #[derive(Debug, Clone)]
    pub struct MarkingServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl MarkingServiceClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> MarkingServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::Body>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::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,
        ) -> MarkingServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::Body>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::Body>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            MarkingServiceClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// Creates a marking.
        /// Throws HTTP 409 / gRPC 6 if a marking with the same ID already exists.
        /// Throws HTTP 403 / gRPC 7 if the user does not have permission to create a marking.
        /// Throws HTTP 403 / gRPC 7 if the user does not have permission to read some of the specified groups.
        pub async fn create_marking(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateMarkingRequest>,
        ) -> std::result::Result<
            tonic::Response<super::CreateMarkingResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/CreateMarking",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "CreateMarking",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets a marking by its RID.
        /// Throws HTTP 403 / gRPC 7 if the user does not have permission to read the marking.
        /// Throws HTTP 403 / gRPC 5 if the marking is not found.
        pub async fn get_marking(
            &mut self,
            request: impl tonic::IntoRequest<super::GetMarkingRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetMarkingResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/GetMarking",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "GetMarking",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets a marking by its ID, a human-readable identifier unique within the org.
        /// Throws HTTP 403 / gRPC 7 if the user does not have permission to read the marking.
        /// Throws HTTP 403 / gRPC 5 if the marking is not found.
        pub async fn get_marking_by_id(
            &mut self,
            request: impl tonic::IntoRequest<super::GetMarkingByIdRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetMarkingByIdResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/GetMarkingById",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "GetMarkingById",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets multiple markings by RID.
        /// If a marking is not found or the user doesn't have permission to read it,
        /// it will not be included in the response.
        pub async fn batch_get_markings(
            &mut self,
            request: impl tonic::IntoRequest<super::BatchGetMarkingsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::BatchGetMarkingsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/BatchGetMarkings",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "BatchGetMarkings",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets metadata for multiple markings by RID. Metadata does not include the authorized groups.
        /// If a marking is not found or the user doesn't have permission to read it,
        /// it will not be included in the response.
        pub async fn batch_get_marking_metadata(
            &mut self,
            request: impl tonic::IntoRequest<super::BatchGetMarkingMetadataRequest>,
        ) -> std::result::Result<
            tonic::Response<super::BatchGetMarkingMetadataResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/BatchGetMarkingMetadata",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "BatchGetMarkingMetadata",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the authorized Groups for each of a set of Markings.
        /// Markings that are not found or for which the user does not have permission to read
        /// will be filtered from the response.
        /// Groups for which the user does not have permission to read will be filtered from the response.
        pub async fn get_authorized_groups_by_marking(
            &mut self,
            request: impl tonic::IntoRequest<super::GetAuthorizedGroupsByMarkingRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetAuthorizedGroupsByMarkingResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/GetAuthorizedGroupsByMarking",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "GetAuthorizedGroupsByMarking",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Search Markings, returning paged results.
        /// Throws HTTP 400 / gRPC 3 if the query is incorrectly formed.
        pub async fn search_markings(
            &mut self,
            request: impl tonic::IntoRequest<super::SearchMarkingsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SearchMarkingsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/SearchMarkings",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "SearchMarkings",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Updates a marking.
        /// Throws HTTP 403 / gRPC 7 if the user does not have permission to update the marking.
        /// Throws HTTP 403 / gRPC 7 if the user does not have permission to read any of the specified groups.
        /// Throws HTTP 403 / gRPC 5 if the marking is not found.
        /// Throws HTTP 409 / gRPC 6 if trying to update the ID of a marking to an ID that already exists.
        /// Throws HTTP 400 / gRPC 3 if trying to update an archived marking.
        pub async fn update_marking(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateMarkingRequest>,
        ) -> std::result::Result<
            tonic::Response<super::UpdateMarkingResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/UpdateMarking",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "UpdateMarking",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Archives markings. Archiving a marking is an idempotent operation that prevents further changes
        /// or applications of the marking.
        /// Archived markings will not appear in search but can be retrieved by `get` endpoints.
        /// Throws HTTP 403 / gRPC 7 if the user does not have permission to archive one or more of the markings
        /// or if any of the markings are not found.
        /// Throws HTTP 400 / gRPC 3 if the archived marking is currently applied to one or more resources.
        /// TODO(MGMT-489): this will throw 403 if any of the Markings don't exist, but we should throw 404 instead.
        pub async fn archive_markings(
            &mut self,
            request: impl tonic::IntoRequest<super::ArchiveMarkingsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ArchiveMarkingsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/ArchiveMarkings",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "ArchiveMarkings",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Unarchives markings. Restores ability to apply and modify marking.
        /// Throws HTTP 403 / gRPC 7 if the user does not have permission to unarchive one or more of the markings
        /// or if any of the markings are not found.
        /// TODO(MGMT-489): this will throw 403 if any of the Markings don't exist, but we should throw 404 instead.
        pub async fn unarchive_markings(
            &mut self,
            request: impl tonic::IntoRequest<super::UnarchiveMarkingsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::UnarchiveMarkingsResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/UnarchiveMarkings",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "UnarchiveMarkings",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Update the markings that are applied on a resource. Supports applying and removing markings at once.
        /// This endpoint can be used to atomically replace the markings on a resource, or bulk apply/remove markings.
        /// This operation is idempotent and will not throw an error if the marking is already applied/removed on the resource.
        /// If a resource marking pair is present in both `markings_to_apply` and `markings_to_remove`, this will throw.
        /// Throws HTTP 403 / gRPC 7 if the user does not have permission to change the markings on the resource.
        /// Throws HTTP 400 / gRPC 3 if trying to apply an archived marking.
        pub async fn update_markings_on_resource(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateMarkingsOnResourceRequest>,
        ) -> std::result::Result<
            tonic::Response<super::UpdateMarkingsOnResourceResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/UpdateMarkingsOnResource",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "UpdateMarkingsOnResource",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the resources that a Marking is applied to. This endpoint is paginated.
        /// Any unauthorized resources will be filtered from the response.
        /// Throws HTTP 403 / gRPC 7 if the user does not have permission to read the marking.
        pub async fn get_resources_for_marking(
            &mut self,
            request: impl tonic::IntoRequest<super::GetResourcesForMarkingRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetResourcesForMarkingResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/GetResourcesForMarking",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "GetResourcesForMarking",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets the requested resources and the markings applied to them. Since the number of markings applied
        /// to a resource is typically small, this endpoint will return all markings for each resource.
        /// Any unauthorized resources or markings will be filtered from the response.
        pub async fn get_markings_for_resources(
            &mut self,
            request: impl tonic::IntoRequest<super::GetMarkingsForResourcesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetMarkingsForResourcesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/nominal.authorization.markings.v1.MarkingService/GetMarkingsForResources",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.authorization.markings.v1.MarkingService",
                        "GetMarkingsForResources",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}