aws-sdk-context 1.0.0

AWS SDK for AWS Context
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 UpdateAgentContextInput {
    /// <p>The agent context to update, by its ID or ARN.</p>
    pub agent_context_id: ::std::option::Option<::std::string::String>,
    /// <p>The new name. If you omit it, the name is unchanged.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The new description. Absent leaves the description unchanged. An empty string removes it.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The connection mappings for this agent context, 0–20 entries. If you provide a list, it replaces the stored set: AWS Context removes entries that are not in the list, adds new entries, and overwrites retained entries with exactly the values that you provide, without merging fields. An empty list removes all connection links. If you omit this member, the existing links are unchanged.</p>
    /// <p>Each newly referenced connection must exist, be owned by your account, and be <code>ACTIVE</code>. Order is significant. When several connections reach the same AWS Glue Data Catalog table, AWS Context tries the connection mapped first, with its own access, and then the next.</p>
    pub connection_mappings: ::std::option::Option<::std::vec::Vec<crate::types::ConnectionMapping>>,
    /// <p>Merged into the agent context's trace analysis settings: an absent member leaves its stored value unchanged. <code>status</code> ENABLED requires a role, supplied here or already on the agent context. A role supplied without <code>status</code> requires the agent context's <code>status</code> to read ENABLED.</p>
    pub trace_analysis_config: ::std::option::Option<crate::types::TraceAnalysisConfig>,
    /// <p>Merged into the agent context's workforce sign-in settings: an absent member leaves its stored value unchanged. <code>signInUrl</code> replaces the stored URL and reads ENABLED. <code>status</code> DISABLED removes the stored URL. <code>status</code> ENABLED requires a URL, supplied here or already on the agent context.</p>
    pub workforce_sign_in_config: ::std::option::Option<crate::types::WorkforceSignInConfig>,
    /// <p>Merged into the agent context's entity resolution settings: an absent member leaves its stored value unchanged.</p>
    pub entity_resolution_config: ::std::option::Option<crate::types::EntityResolutionConfig>,
    /// <p>Identity sources to trust in addition to your account. A present list replaces the stored list, <code>\[\]</code> clears it so only your account is trusted, and an absent field leaves it unchanged. Order is not significant: a list with the stored entries in another order changes nothing. A change takes effect within about a minute.</p>
    pub trusted_identity_sources: ::std::option::Option<::std::vec::Vec<crate::types::TrustedIdentitySource>>,
}
impl UpdateAgentContextInput {
    /// <p>The agent context to update, by its ID or ARN.</p>
    pub fn agent_context_id(&self) -> ::std::option::Option<&str> {
        self.agent_context_id.as_deref()
    }
    /// <p>The new name. If you omit it, the name is unchanged.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The new description. Absent leaves the description unchanged. An empty string removes it.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The connection mappings for this agent context, 0–20 entries. If you provide a list, it replaces the stored set: AWS Context removes entries that are not in the list, adds new entries, and overwrites retained entries with exactly the values that you provide, without merging fields. An empty list removes all connection links. If you omit this member, the existing links are unchanged.</p>
    /// <p>Each newly referenced connection must exist, be owned by your account, and be <code>ACTIVE</code>. Order is significant. When several connections reach the same AWS Glue Data Catalog table, AWS Context tries the connection mapped first, with its own access, and then the next.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.connection_mappings.is_none()`.
    pub fn connection_mappings(&self) -> &[crate::types::ConnectionMapping] {
        self.connection_mappings.as_deref().unwrap_or_default()
    }
    /// <p>Merged into the agent context's trace analysis settings: an absent member leaves its stored value unchanged. <code>status</code> ENABLED requires a role, supplied here or already on the agent context. A role supplied without <code>status</code> requires the agent context's <code>status</code> to read ENABLED.</p>
    pub fn trace_analysis_config(&self) -> ::std::option::Option<&crate::types::TraceAnalysisConfig> {
        self.trace_analysis_config.as_ref()
    }
    /// <p>Merged into the agent context's workforce sign-in settings: an absent member leaves its stored value unchanged. <code>signInUrl</code> replaces the stored URL and reads ENABLED. <code>status</code> DISABLED removes the stored URL. <code>status</code> ENABLED requires a URL, supplied here or already on the agent context.</p>
    pub fn workforce_sign_in_config(&self) -> ::std::option::Option<&crate::types::WorkforceSignInConfig> {
        self.workforce_sign_in_config.as_ref()
    }
    /// <p>Merged into the agent context's entity resolution settings: an absent member leaves its stored value unchanged.</p>
    pub fn entity_resolution_config(&self) -> ::std::option::Option<&crate::types::EntityResolutionConfig> {
        self.entity_resolution_config.as_ref()
    }
    /// <p>Identity sources to trust in addition to your account. A present list replaces the stored list, <code>\[\]</code> clears it so only your account is trusted, and an absent field leaves it unchanged. Order is not significant: a list with the stored entries in another order changes nothing. A change takes effect within about a minute.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.trusted_identity_sources.is_none()`.
    pub fn trusted_identity_sources(&self) -> &[crate::types::TrustedIdentitySource] {
        self.trusted_identity_sources.as_deref().unwrap_or_default()
    }
}
impl UpdateAgentContextInput {
    /// Creates a new builder-style object to manufacture [`UpdateAgentContextInput`](crate::operation::update_agent_context::UpdateAgentContextInput).
    pub fn builder() -> crate::operation::update_agent_context::builders::UpdateAgentContextInputBuilder {
        crate::operation::update_agent_context::builders::UpdateAgentContextInputBuilder::default()
    }
}

/// A builder for [`UpdateAgentContextInput`](crate::operation::update_agent_context::UpdateAgentContextInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateAgentContextInputBuilder {
    pub(crate) agent_context_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) connection_mappings: ::std::option::Option<::std::vec::Vec<crate::types::ConnectionMapping>>,
    pub(crate) trace_analysis_config: ::std::option::Option<crate::types::TraceAnalysisConfig>,
    pub(crate) workforce_sign_in_config: ::std::option::Option<crate::types::WorkforceSignInConfig>,
    pub(crate) entity_resolution_config: ::std::option::Option<crate::types::EntityResolutionConfig>,
    pub(crate) trusted_identity_sources: ::std::option::Option<::std::vec::Vec<crate::types::TrustedIdentitySource>>,
}
impl UpdateAgentContextInputBuilder {
    /// <p>The agent context to update, by its ID or ARN.</p>
    /// This field is required.
    pub fn agent_context_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_context_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The agent context to update, by its ID or ARN.</p>
    pub fn set_agent_context_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_context_id = input;
        self
    }
    /// <p>The agent context to update, by its ID or ARN.</p>
    pub fn get_agent_context_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_context_id
    }
    /// <p>The new name. If you omit it, the name is unchanged.</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 new name. If you omit it, the name is unchanged.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The new name. If you omit it, the name is unchanged.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The new description. Absent leaves the description unchanged. An empty string removes it.</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 new description. Absent leaves the description unchanged. An empty string removes it.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The new description. Absent leaves the description unchanged. An empty string removes it.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Appends an item to `connection_mappings`.
    ///
    /// To override the contents of this collection use [`set_connection_mappings`](Self::set_connection_mappings).
    ///
    /// <p>The connection mappings for this agent context, 0–20 entries. If you provide a list, it replaces the stored set: AWS Context removes entries that are not in the list, adds new entries, and overwrites retained entries with exactly the values that you provide, without merging fields. An empty list removes all connection links. If you omit this member, the existing links are unchanged.</p>
    /// <p>Each newly referenced connection must exist, be owned by your account, and be <code>ACTIVE</code>. Order is significant. When several connections reach the same AWS Glue Data Catalog table, AWS Context tries the connection mapped first, with its own access, and then the next.</p>
    pub fn connection_mappings(mut self, input: crate::types::ConnectionMapping) -> Self {
        let mut v = self.connection_mappings.unwrap_or_default();
        v.push(input);
        self.connection_mappings = ::std::option::Option::Some(v);
        self
    }
    /// <p>The connection mappings for this agent context, 0–20 entries. If you provide a list, it replaces the stored set: AWS Context removes entries that are not in the list, adds new entries, and overwrites retained entries with exactly the values that you provide, without merging fields. An empty list removes all connection links. If you omit this member, the existing links are unchanged.</p>
    /// <p>Each newly referenced connection must exist, be owned by your account, and be <code>ACTIVE</code>. Order is significant. When several connections reach the same AWS Glue Data Catalog table, AWS Context tries the connection mapped first, with its own access, and then the next.</p>
    pub fn set_connection_mappings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ConnectionMapping>>) -> Self {
        self.connection_mappings = input;
        self
    }
    /// <p>The connection mappings for this agent context, 0–20 entries. If you provide a list, it replaces the stored set: AWS Context removes entries that are not in the list, adds new entries, and overwrites retained entries with exactly the values that you provide, without merging fields. An empty list removes all connection links. If you omit this member, the existing links are unchanged.</p>
    /// <p>Each newly referenced connection must exist, be owned by your account, and be <code>ACTIVE</code>. Order is significant. When several connections reach the same AWS Glue Data Catalog table, AWS Context tries the connection mapped first, with its own access, and then the next.</p>
    pub fn get_connection_mappings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ConnectionMapping>> {
        &self.connection_mappings
    }
    /// <p>Merged into the agent context's trace analysis settings: an absent member leaves its stored value unchanged. <code>status</code> ENABLED requires a role, supplied here or already on the agent context. A role supplied without <code>status</code> requires the agent context's <code>status</code> to read ENABLED.</p>
    pub fn trace_analysis_config(mut self, input: crate::types::TraceAnalysisConfig) -> Self {
        self.trace_analysis_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Merged into the agent context's trace analysis settings: an absent member leaves its stored value unchanged. <code>status</code> ENABLED requires a role, supplied here or already on the agent context. A role supplied without <code>status</code> requires the agent context's <code>status</code> to read ENABLED.</p>
    pub fn set_trace_analysis_config(mut self, input: ::std::option::Option<crate::types::TraceAnalysisConfig>) -> Self {
        self.trace_analysis_config = input;
        self
    }
    /// <p>Merged into the agent context's trace analysis settings: an absent member leaves its stored value unchanged. <code>status</code> ENABLED requires a role, supplied here or already on the agent context. A role supplied without <code>status</code> requires the agent context's <code>status</code> to read ENABLED.</p>
    pub fn get_trace_analysis_config(&self) -> &::std::option::Option<crate::types::TraceAnalysisConfig> {
        &self.trace_analysis_config
    }
    /// <p>Merged into the agent context's workforce sign-in settings: an absent member leaves its stored value unchanged. <code>signInUrl</code> replaces the stored URL and reads ENABLED. <code>status</code> DISABLED removes the stored URL. <code>status</code> ENABLED requires a URL, supplied here or already on the agent context.</p>
    pub fn workforce_sign_in_config(mut self, input: crate::types::WorkforceSignInConfig) -> Self {
        self.workforce_sign_in_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Merged into the agent context's workforce sign-in settings: an absent member leaves its stored value unchanged. <code>signInUrl</code> replaces the stored URL and reads ENABLED. <code>status</code> DISABLED removes the stored URL. <code>status</code> ENABLED requires a URL, supplied here or already on the agent context.</p>
    pub fn set_workforce_sign_in_config(mut self, input: ::std::option::Option<crate::types::WorkforceSignInConfig>) -> Self {
        self.workforce_sign_in_config = input;
        self
    }
    /// <p>Merged into the agent context's workforce sign-in settings: an absent member leaves its stored value unchanged. <code>signInUrl</code> replaces the stored URL and reads ENABLED. <code>status</code> DISABLED removes the stored URL. <code>status</code> ENABLED requires a URL, supplied here or already on the agent context.</p>
    pub fn get_workforce_sign_in_config(&self) -> &::std::option::Option<crate::types::WorkforceSignInConfig> {
        &self.workforce_sign_in_config
    }
    /// <p>Merged into the agent context's entity resolution settings: an absent member leaves its stored value unchanged.</p>
    pub fn entity_resolution_config(mut self, input: crate::types::EntityResolutionConfig) -> Self {
        self.entity_resolution_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Merged into the agent context's entity resolution settings: an absent member leaves its stored value unchanged.</p>
    pub fn set_entity_resolution_config(mut self, input: ::std::option::Option<crate::types::EntityResolutionConfig>) -> Self {
        self.entity_resolution_config = input;
        self
    }
    /// <p>Merged into the agent context's entity resolution settings: an absent member leaves its stored value unchanged.</p>
    pub fn get_entity_resolution_config(&self) -> &::std::option::Option<crate::types::EntityResolutionConfig> {
        &self.entity_resolution_config
    }
    /// Appends an item to `trusted_identity_sources`.
    ///
    /// To override the contents of this collection use [`set_trusted_identity_sources`](Self::set_trusted_identity_sources).
    ///
    /// <p>Identity sources to trust in addition to your account. A present list replaces the stored list, <code>\[\]</code> clears it so only your account is trusted, and an absent field leaves it unchanged. Order is not significant: a list with the stored entries in another order changes nothing. A change takes effect within about a minute.</p>
    pub fn trusted_identity_sources(mut self, input: crate::types::TrustedIdentitySource) -> Self {
        let mut v = self.trusted_identity_sources.unwrap_or_default();
        v.push(input);
        self.trusted_identity_sources = ::std::option::Option::Some(v);
        self
    }
    /// <p>Identity sources to trust in addition to your account. A present list replaces the stored list, <code>\[\]</code> clears it so only your account is trusted, and an absent field leaves it unchanged. Order is not significant: a list with the stored entries in another order changes nothing. A change takes effect within about a minute.</p>
    pub fn set_trusted_identity_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TrustedIdentitySource>>) -> Self {
        self.trusted_identity_sources = input;
        self
    }
    /// <p>Identity sources to trust in addition to your account. A present list replaces the stored list, <code>\[\]</code> clears it so only your account is trusted, and an absent field leaves it unchanged. Order is not significant: a list with the stored entries in another order changes nothing. A change takes effect within about a minute.</p>
    pub fn get_trusted_identity_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TrustedIdentitySource>> {
        &self.trusted_identity_sources
    }
    /// Consumes the builder and constructs a [`UpdateAgentContextInput`](crate::operation::update_agent_context::UpdateAgentContextInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_agent_context::UpdateAgentContextInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_agent_context::UpdateAgentContextInput {
            agent_context_id: self.agent_context_id,
            name: self.name,
            description: self.description,
            connection_mappings: self.connection_mappings,
            trace_analysis_config: self.trace_analysis_config,
            workforce_sign_in_config: self.workforce_sign_in_config,
            entity_resolution_config: self.entity_resolution_config,
            trusted_identity_sources: self.trusted_identity_sources,
        })
    }
}