aws-sdk-securityhub 1.110.0

AWS SDK for AWS SecurityHub
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateTicketV2Input {
    /// <p>The UUID of the connectorV2 to identify connectorV2 resource.</p>
    pub connector_id: ::std::option::Option<::std::string::String>,
    /// <p>The the unique ID for the finding.</p>
    pub finding_metadata_uid: ::std::option::Option<::std::string::String>,
    /// <p>The client idempotency token.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
    /// <p>The mode for ticket creation. When set to DRYRUN, the ticket is created using a Security Hub owned template test finding to verify the integration is working correctly.</p>
    pub mode: ::std::option::Option<crate::types::TicketCreationMode>,
}
impl CreateTicketV2Input {
    /// <p>The UUID of the connectorV2 to identify connectorV2 resource.</p>
    pub fn connector_id(&self) -> ::std::option::Option<&str> {
        self.connector_id.as_deref()
    }
    /// <p>The the unique ID for the finding.</p>
    pub fn finding_metadata_uid(&self) -> ::std::option::Option<&str> {
        self.finding_metadata_uid.as_deref()
    }
    /// <p>The client idempotency token.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>The mode for ticket creation. When set to DRYRUN, the ticket is created using a Security Hub owned template test finding to verify the integration is working correctly.</p>
    pub fn mode(&self) -> ::std::option::Option<&crate::types::TicketCreationMode> {
        self.mode.as_ref()
    }
}
impl CreateTicketV2Input {
    /// Creates a new builder-style object to manufacture [`CreateTicketV2Input`](crate::operation::create_ticket_v2::CreateTicketV2Input).
    pub fn builder() -> crate::operation::create_ticket_v2::builders::CreateTicketV2InputBuilder {
        crate::operation::create_ticket_v2::builders::CreateTicketV2InputBuilder::default()
    }
}

/// A builder for [`CreateTicketV2Input`](crate::operation::create_ticket_v2::CreateTicketV2Input).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateTicketV2InputBuilder {
    pub(crate) connector_id: ::std::option::Option<::std::string::String>,
    pub(crate) finding_metadata_uid: ::std::option::Option<::std::string::String>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) mode: ::std::option::Option<crate::types::TicketCreationMode>,
}
impl CreateTicketV2InputBuilder {
    /// <p>The UUID of the connectorV2 to identify connectorV2 resource.</p>
    /// This field is required.
    pub fn connector_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.connector_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The UUID of the connectorV2 to identify connectorV2 resource.</p>
    pub fn set_connector_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.connector_id = input;
        self
    }
    /// <p>The UUID of the connectorV2 to identify connectorV2 resource.</p>
    pub fn get_connector_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.connector_id
    }
    /// <p>The the unique ID for the finding.</p>
    /// This field is required.
    pub fn finding_metadata_uid(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.finding_metadata_uid = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The the unique ID for the finding.</p>
    pub fn set_finding_metadata_uid(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.finding_metadata_uid = input;
        self
    }
    /// <p>The the unique ID for the finding.</p>
    pub fn get_finding_metadata_uid(&self) -> &::std::option::Option<::std::string::String> {
        &self.finding_metadata_uid
    }
    /// <p>The client idempotency token.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The client idempotency token.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>The client idempotency token.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// <p>The mode for ticket creation. When set to DRYRUN, the ticket is created using a Security Hub owned template test finding to verify the integration is working correctly.</p>
    pub fn mode(mut self, input: crate::types::TicketCreationMode) -> Self {
        self.mode = ::std::option::Option::Some(input);
        self
    }
    /// <p>The mode for ticket creation. When set to DRYRUN, the ticket is created using a Security Hub owned template test finding to verify the integration is working correctly.</p>
    pub fn set_mode(mut self, input: ::std::option::Option<crate::types::TicketCreationMode>) -> Self {
        self.mode = input;
        self
    }
    /// <p>The mode for ticket creation. When set to DRYRUN, the ticket is created using a Security Hub owned template test finding to verify the integration is working correctly.</p>
    pub fn get_mode(&self) -> &::std::option::Option<crate::types::TicketCreationMode> {
        &self.mode
    }
    /// Consumes the builder and constructs a [`CreateTicketV2Input`](crate::operation::create_ticket_v2::CreateTicketV2Input).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_ticket_v2::CreateTicketV2Input, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_ticket_v2::CreateTicketV2Input {
            connector_id: self.connector_id,
            finding_metadata_uid: self.finding_metadata_uid,
            client_token: self.client_token,
            mode: self.mode,
        })
    }
}