nominal-api 0.1239.0

API bindings for the Nominal platform
Documentation
#[derive(
    Debug,
    Clone,
    conjure_object::serde::Serialize,
    conjure_object::serde::Deserialize,
    PartialEq,
    Eq,
    PartialOrd,
    Ord,
    Hash
)]
#[serde(crate = "conjure_object::serde")]
#[conjure_object::private::staged_builder::staged_builder]
#[builder(crate = conjure_object::private::staged_builder, update, inline)]
pub struct CreateIntegrationRequest {
    #[builder(into)]
    #[serde(rename = "name")]
    name: String,
    #[builder(default, into)]
    #[serde(rename = "description", skip_serializing_if = "Option::is_none", default)]
    description: Option<String>,
    #[builder(custom(type = super::CreateIntegrationDetails, convert = Box::new))]
    #[serde(rename = "createIntegrationDetails")]
    create_integration_details: Box<super::CreateIntegrationDetails>,
    #[builder(default, into)]
    #[serde(rename = "workspace", skip_serializing_if = "Option::is_none", default)]
    workspace: Option<super::super::super::super::api::rids::WorkspaceRid>,
}
impl CreateIntegrationRequest {
    /// Constructs a new instance of the type.
    #[inline]
    pub fn new(
        name: impl Into<String>,
        create_integration_details: super::CreateIntegrationDetails,
    ) -> Self {
        Self::builder()
            .name(name)
            .create_integration_details(create_integration_details)
            .build()
    }
    #[inline]
    pub fn name(&self) -> &str {
        &*self.name
    }
    #[inline]
    pub fn description(&self) -> Option<&str> {
        self.description.as_ref().map(|o| &**o)
    }
    #[inline]
    pub fn create_integration_details(&self) -> &super::CreateIntegrationDetails {
        &*self.create_integration_details
    }
    /// The workspace in which to create the integration. If not provided, the integration will be created in the default workspace for
    /// the user's organization, if the default workspace for the organization is configured.
    #[inline]
    pub fn workspace(
        &self,
    ) -> Option<&super::super::super::super::api::rids::WorkspaceRid> {
        self.workspace.as_ref().map(|o| &*o)
    }
}