aws-sdk-connect 1.167.0

AWS SDK for Amazon Connect Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A view resource object. Contains metadata and content necessary to render the view.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct View {
    /// <p>The identifier of the view.</p>
    pub id: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the view.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>The name of the view.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>Indicates the view status as either <code>SAVED</code> or <code>PUBLISHED</code>. The <code>PUBLISHED</code> status will initiate validation on the content.</p>
    pub status: ::std::option::Option<crate::types::ViewStatus>,
    /// <p>The type of the view - <code>CUSTOMER_MANAGED</code>.</p>
    pub r#type: ::std::option::Option<crate::types::ViewType>,
    /// <p>The description of the view.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>Current version of the view.</p>
    pub version: i32,
    /// <p>The description of the version.</p>
    pub version_description: ::std::option::Option<::std::string::String>,
    /// <p>View content containing all content necessary to render a view except for runtime input data.</p>
    pub content: ::std::option::Option<crate::types::ViewContent>,
    /// <p>The tags associated with the view resource (not specific to view version).</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The timestamp of when the view was created.</p>
    pub created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Latest timestamp of the <code>UpdateViewContent</code> or <code>CreateViewVersion</code> operations.</p>
    pub last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Indicates the checksum value of the latest published view content.</p>
    pub view_content_sha256: ::std::option::Option<::std::string::String>,
}
impl View {
    /// <p>The identifier of the view.</p>
    pub fn id(&self) -> ::std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the view.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The name of the view.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>Indicates the view status as either <code>SAVED</code> or <code>PUBLISHED</code>. The <code>PUBLISHED</code> status will initiate validation on the content.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::ViewStatus> {
        self.status.as_ref()
    }
    /// <p>The type of the view - <code>CUSTOMER_MANAGED</code>.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::ViewType> {
        self.r#type.as_ref()
    }
    /// <p>The description of the view.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Current version of the view.</p>
    pub fn version(&self) -> i32 {
        self.version
    }
    /// <p>The description of the version.</p>
    pub fn version_description(&self) -> ::std::option::Option<&str> {
        self.version_description.as_deref()
    }
    /// <p>View content containing all content necessary to render a view except for runtime input data.</p>
    pub fn content(&self) -> ::std::option::Option<&crate::types::ViewContent> {
        self.content.as_ref()
    }
    /// <p>The tags associated with the view resource (not specific to view version).</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>The timestamp of when the view was created.</p>
    pub fn created_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_time.as_ref()
    }
    /// <p>Latest timestamp of the <code>UpdateViewContent</code> or <code>CreateViewVersion</code> operations.</p>
    pub fn last_modified_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_modified_time.as_ref()
    }
    /// <p>Indicates the checksum value of the latest published view content.</p>
    pub fn view_content_sha256(&self) -> ::std::option::Option<&str> {
        self.view_content_sha256.as_deref()
    }
}
impl ::std::fmt::Debug for View {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("View");
        formatter.field("id", &self.id);
        formatter.field("arn", &self.arn);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("status", &self.status);
        formatter.field("r#type", &self.r#type);
        formatter.field("description", &self.description);
        formatter.field("version", &self.version);
        formatter.field("version_description", &self.version_description);
        formatter.field("content", &self.content);
        formatter.field("tags", &self.tags);
        formatter.field("created_time", &self.created_time);
        formatter.field("last_modified_time", &self.last_modified_time);
        formatter.field("view_content_sha256", &self.view_content_sha256);
        formatter.finish()
    }
}
impl View {
    /// Creates a new builder-style object to manufacture [`View`](crate::types::View).
    pub fn builder() -> crate::types::builders::ViewBuilder {
        crate::types::builders::ViewBuilder::default()
    }
}

/// A builder for [`View`](crate::types::View).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct ViewBuilder {
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::ViewStatus>,
    pub(crate) r#type: ::std::option::Option<crate::types::ViewType>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) version: ::std::option::Option<i32>,
    pub(crate) version_description: ::std::option::Option<::std::string::String>,
    pub(crate) content: ::std::option::Option<crate::types::ViewContent>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) view_content_sha256: ::std::option::Option<::std::string::String>,
}
impl ViewBuilder {
    /// <p>The identifier of the view.</p>
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the view.</p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p>The identifier of the view.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>The Amazon Resource Name (ARN) of the view.</p>
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the view.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the view.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The name of the view.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the view.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the view.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>Indicates the view status as either <code>SAVED</code> or <code>PUBLISHED</code>. The <code>PUBLISHED</code> status will initiate validation on the content.</p>
    pub fn status(mut self, input: crate::types::ViewStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates the view status as either <code>SAVED</code> or <code>PUBLISHED</code>. The <code>PUBLISHED</code> status will initiate validation on the content.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ViewStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>Indicates the view status as either <code>SAVED</code> or <code>PUBLISHED</code>. The <code>PUBLISHED</code> status will initiate validation on the content.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::ViewStatus> {
        &self.status
    }
    /// <p>The type of the view - <code>CUSTOMER_MANAGED</code>.</p>
    pub fn r#type(mut self, input: crate::types::ViewType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of the view - <code>CUSTOMER_MANAGED</code>.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::ViewType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of the view - <code>CUSTOMER_MANAGED</code>.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::ViewType> {
        &self.r#type
    }
    /// <p>The description of the view.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the view.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the view.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>Current version of the view.</p>
    pub fn version(mut self, input: i32) -> Self {
        self.version = ::std::option::Option::Some(input);
        self
    }
    /// <p>Current version of the view.</p>
    pub fn set_version(mut self, input: ::std::option::Option<i32>) -> Self {
        self.version = input;
        self
    }
    /// <p>Current version of the view.</p>
    pub fn get_version(&self) -> &::std::option::Option<i32> {
        &self.version
    }
    /// <p>The description of the version.</p>
    pub fn version_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.version_description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the version.</p>
    pub fn set_version_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.version_description = input;
        self
    }
    /// <p>The description of the version.</p>
    pub fn get_version_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.version_description
    }
    /// <p>View content containing all content necessary to render a view except for runtime input data.</p>
    pub fn content(mut self, input: crate::types::ViewContent) -> Self {
        self.content = ::std::option::Option::Some(input);
        self
    }
    /// <p>View content containing all content necessary to render a view except for runtime input data.</p>
    pub fn set_content(mut self, input: ::std::option::Option<crate::types::ViewContent>) -> Self {
        self.content = input;
        self
    }
    /// <p>View content containing all content necessary to render a view except for runtime input data.</p>
    pub fn get_content(&self) -> &::std::option::Option<crate::types::ViewContent> {
        &self.content
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags associated with the view resource (not specific to view version).</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The tags associated with the view resource (not specific to view version).</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The tags associated with the view resource (not specific to view version).</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// <p>The timestamp of when the view was created.</p>
    pub fn created_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp of when the view was created.</p>
    pub fn set_created_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_time = input;
        self
    }
    /// <p>The timestamp of when the view was created.</p>
    pub fn get_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_time
    }
    /// <p>Latest timestamp of the <code>UpdateViewContent</code> or <code>CreateViewVersion</code> operations.</p>
    pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_modified_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>Latest timestamp of the <code>UpdateViewContent</code> or <code>CreateViewVersion</code> operations.</p>
    pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_modified_time = input;
        self
    }
    /// <p>Latest timestamp of the <code>UpdateViewContent</code> or <code>CreateViewVersion</code> operations.</p>
    pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_modified_time
    }
    /// <p>Indicates the checksum value of the latest published view content.</p>
    pub fn view_content_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.view_content_sha256 = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Indicates the checksum value of the latest published view content.</p>
    pub fn set_view_content_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.view_content_sha256 = input;
        self
    }
    /// <p>Indicates the checksum value of the latest published view content.</p>
    pub fn get_view_content_sha256(&self) -> &::std::option::Option<::std::string::String> {
        &self.view_content_sha256
    }
    /// Consumes the builder and constructs a [`View`](crate::types::View).
    pub fn build(self) -> crate::types::View {
        crate::types::View {
            id: self.id,
            arn: self.arn,
            name: self.name,
            status: self.status,
            r#type: self.r#type,
            description: self.description,
            version: self.version.unwrap_or_default(),
            version_description: self.version_description,
            content: self.content,
            tags: self.tags,
            created_time: self.created_time,
            last_modified_time: self.last_modified_time,
            view_content_sha256: self.view_content_sha256,
        }
    }
}
impl ::std::fmt::Debug for ViewBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("ViewBuilder");
        formatter.field("id", &self.id);
        formatter.field("arn", &self.arn);
        formatter.field("name", &"*** Sensitive Data Redacted ***");
        formatter.field("status", &self.status);
        formatter.field("r#type", &self.r#type);
        formatter.field("description", &self.description);
        formatter.field("version", &self.version);
        formatter.field("version_description", &self.version_description);
        formatter.field("content", &self.content);
        formatter.field("tags", &self.tags);
        formatter.field("created_time", &self.created_time);
        formatter.field("last_modified_time", &self.last_modified_time);
        formatter.field("view_content_sha256", &self.view_content_sha256);
        formatter.finish()
    }
}