Skip to main content

nominal_api/conjure/objects/authorization/
register_in_workspace_request.rs

1#[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 RegisterInWorkspaceRequest {
16    #[builder(default, set(item(type = conjure_object::ResourceIdentifier)))]
17    #[serde(
18        rename = "resourceRids",
19        skip_serializing_if = "std::collections::BTreeSet::is_empty",
20        default
21    )]
22    resource_rids: std::collections::BTreeSet<conjure_object::ResourceIdentifier>,
23    #[serde(rename = "workspaceRid")]
24    workspace_rid: super::super::api::rids::WorkspaceRid,
25}
26impl RegisterInWorkspaceRequest {
27    /// Constructs a new instance of the type.
28    #[inline]
29    pub fn new(workspace_rid: super::super::api::rids::WorkspaceRid) -> Self {
30        Self::builder().workspace_rid(workspace_rid).build()
31    }
32    #[inline]
33    pub fn resource_rids(
34        &self,
35    ) -> &std::collections::BTreeSet<conjure_object::ResourceIdentifier> {
36        &self.resource_rids
37    }
38    #[inline]
39    pub fn workspace_rid(&self) -> &super::super::api::rids::WorkspaceRid {
40        &self.workspace_rid
41    }
42}