aws-sdk-glue 1.149.0

AWS SDK for AWS Glue
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 GetResourcePolicyOutput {
    /// <p>Contains the requested policy document, in JSON format.</p>
    pub policy_in_json: ::std::option::Option<::std::string::String>,
    /// <p>Contains the hash value associated with this policy.</p>
    pub policy_hash: ::std::option::Option<::std::string::String>,
    /// <p>The date and time at which the policy was created.</p>
    pub create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The date and time at which the policy was last updated.</p>
    pub update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl GetResourcePolicyOutput {
    /// <p>Contains the requested policy document, in JSON format.</p>
    pub fn policy_in_json(&self) -> ::std::option::Option<&str> {
        self.policy_in_json.as_deref()
    }
    /// <p>Contains the hash value associated with this policy.</p>
    pub fn policy_hash(&self) -> ::std::option::Option<&str> {
        self.policy_hash.as_deref()
    }
    /// <p>The date and time at which the policy was created.</p>
    pub fn create_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.create_time.as_ref()
    }
    /// <p>The date and time at which the policy was last updated.</p>
    pub fn update_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.update_time.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetResourcePolicyOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetResourcePolicyOutput {
    /// Creates a new builder-style object to manufacture [`GetResourcePolicyOutput`](crate::operation::get_resource_policy::GetResourcePolicyOutput).
    pub fn builder() -> crate::operation::get_resource_policy::builders::GetResourcePolicyOutputBuilder {
        crate::operation::get_resource_policy::builders::GetResourcePolicyOutputBuilder::default()
    }
}

/// A builder for [`GetResourcePolicyOutput`](crate::operation::get_resource_policy::GetResourcePolicyOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetResourcePolicyOutputBuilder {
    pub(crate) policy_in_json: ::std::option::Option<::std::string::String>,
    pub(crate) policy_hash: ::std::option::Option<::std::string::String>,
    pub(crate) create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl GetResourcePolicyOutputBuilder {
    /// <p>Contains the requested policy document, in JSON format.</p>
    pub fn policy_in_json(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.policy_in_json = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Contains the requested policy document, in JSON format.</p>
    pub fn set_policy_in_json(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.policy_in_json = input;
        self
    }
    /// <p>Contains the requested policy document, in JSON format.</p>
    pub fn get_policy_in_json(&self) -> &::std::option::Option<::std::string::String> {
        &self.policy_in_json
    }
    /// <p>Contains the hash value associated with this policy.</p>
    pub fn policy_hash(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.policy_hash = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Contains the hash value associated with this policy.</p>
    pub fn set_policy_hash(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.policy_hash = input;
        self
    }
    /// <p>Contains the hash value associated with this policy.</p>
    pub fn get_policy_hash(&self) -> &::std::option::Option<::std::string::String> {
        &self.policy_hash
    }
    /// <p>The date and time at which the policy was created.</p>
    pub fn create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.create_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time at which the policy was created.</p>
    pub fn set_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.create_time = input;
        self
    }
    /// <p>The date and time at which the policy was created.</p>
    pub fn get_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.create_time
    }
    /// <p>The date and time at which the policy was last updated.</p>
    pub fn update_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.update_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time at which the policy was last updated.</p>
    pub fn set_update_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.update_time = input;
        self
    }
    /// <p>The date and time at which the policy was last updated.</p>
    pub fn get_update_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.update_time
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetResourcePolicyOutput`](crate::operation::get_resource_policy::GetResourcePolicyOutput).
    pub fn build(self) -> crate::operation::get_resource_policy::GetResourcePolicyOutput {
        crate::operation::get_resource_policy::GetResourcePolicyOutput {
            policy_in_json: self.policy_in_json,
            policy_hash: self.policy_hash,
            create_time: self.create_time,
            update_time: self.update_time,
            _request_id: self._request_id,
        }
    }
}