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