nominal_api/conjure/errors/scout/compute/api/
not_authorized.rs1#[derive(
2 Debug,
3 Clone,
4 conjure_object::serde::Serialize,
5 conjure_object::serde::Deserialize,
6 PartialEq,
7 Eq,
8 PartialOrd,
9 Ord,
10 Hash
11)]
12#[serde(crate = "conjure_object::serde")]
13#[conjure_object::private::staged_builder::staged_builder]
14#[builder(crate = conjure_object::private::staged_builder, update, inline)]
15pub struct NotAuthorized {
16 #[builder(
17 default,
18 set(
19 item(
20 type = super::super::super::super::super::objects::api::rids::DataSourceRid
21 )
22 )
23 )]
24 #[serde(
25 rename = "dataSourceRids",
26 skip_serializing_if = "std::collections::BTreeSet::is_empty",
27 default
28 )]
29 data_source_rids: std::collections::BTreeSet<
30 super::super::super::super::super::objects::api::rids::DataSourceRid,
31 >,
32}
33impl NotAuthorized {
34 #[inline]
36 pub fn new() -> Self {
37 Self::builder().build()
38 }
39 #[inline]
40 pub fn data_source_rids(
41 &self,
42 ) -> &std::collections::BTreeSet<
43 super::super::super::super::super::objects::api::rids::DataSourceRid,
44 > {
45 &self.data_source_rids
46 }
47}
48impl conjure_error::ErrorType for NotAuthorized {
49 #[inline]
50 fn code() -> conjure_error::ErrorCode {
51 conjure_error::ErrorCode::PermissionDenied
52 }
53 #[inline]
54 fn name() -> &'static str {
55 "Compute:NotAuthorized"
56 }
57 #[inline]
58 fn safe_args() -> &'static [&'static str] {
59 &["dataSourceRids"]
60 }
61}