aws-sdk-appsync 1.111.0

AWS SDK for AWS AppSync
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 GetIntrospectionSchemaInput {
    /// <p>The API ID.</p>
    pub api_id: ::std::option::Option<::std::string::String>,
    /// <p>The schema format: SDL or JSON.</p>
    pub format: ::std::option::Option<crate::types::OutputType>,
    /// <p>A flag that specifies whether the schema introspection should contain directives.</p>
    pub include_directives: ::std::option::Option<bool>,
}
impl GetIntrospectionSchemaInput {
    /// <p>The API ID.</p>
    pub fn api_id(&self) -> ::std::option::Option<&str> {
        self.api_id.as_deref()
    }
    /// <p>The schema format: SDL or JSON.</p>
    pub fn format(&self) -> ::std::option::Option<&crate::types::OutputType> {
        self.format.as_ref()
    }
    /// <p>A flag that specifies whether the schema introspection should contain directives.</p>
    pub fn include_directives(&self) -> ::std::option::Option<bool> {
        self.include_directives
    }
}
impl GetIntrospectionSchemaInput {
    /// Creates a new builder-style object to manufacture [`GetIntrospectionSchemaInput`](crate::operation::get_introspection_schema::GetIntrospectionSchemaInput).
    pub fn builder() -> crate::operation::get_introspection_schema::builders::GetIntrospectionSchemaInputBuilder {
        crate::operation::get_introspection_schema::builders::GetIntrospectionSchemaInputBuilder::default()
    }
}

/// A builder for [`GetIntrospectionSchemaInput`](crate::operation::get_introspection_schema::GetIntrospectionSchemaInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetIntrospectionSchemaInputBuilder {
    pub(crate) api_id: ::std::option::Option<::std::string::String>,
    pub(crate) format: ::std::option::Option<crate::types::OutputType>,
    pub(crate) include_directives: ::std::option::Option<bool>,
}
impl GetIntrospectionSchemaInputBuilder {
    /// <p>The API ID.</p>
    /// This field is required.
    pub fn api_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.api_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The API ID.</p>
    pub fn set_api_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.api_id = input;
        self
    }
    /// <p>The API ID.</p>
    pub fn get_api_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.api_id
    }
    /// <p>The schema format: SDL or JSON.</p>
    /// This field is required.
    pub fn format(mut self, input: crate::types::OutputType) -> Self {
        self.format = ::std::option::Option::Some(input);
        self
    }
    /// <p>The schema format: SDL or JSON.</p>
    pub fn set_format(mut self, input: ::std::option::Option<crate::types::OutputType>) -> Self {
        self.format = input;
        self
    }
    /// <p>The schema format: SDL or JSON.</p>
    pub fn get_format(&self) -> &::std::option::Option<crate::types::OutputType> {
        &self.format
    }
    /// <p>A flag that specifies whether the schema introspection should contain directives.</p>
    pub fn include_directives(mut self, input: bool) -> Self {
        self.include_directives = ::std::option::Option::Some(input);
        self
    }
    /// <p>A flag that specifies whether the schema introspection should contain directives.</p>
    pub fn set_include_directives(mut self, input: ::std::option::Option<bool>) -> Self {
        self.include_directives = input;
        self
    }
    /// <p>A flag that specifies whether the schema introspection should contain directives.</p>
    pub fn get_include_directives(&self) -> &::std::option::Option<bool> {
        &self.include_directives
    }
    /// Consumes the builder and constructs a [`GetIntrospectionSchemaInput`](crate::operation::get_introspection_schema::GetIntrospectionSchemaInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::get_introspection_schema::GetIntrospectionSchemaInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::get_introspection_schema::GetIntrospectionSchemaInput {
            api_id: self.api_id,
            format: self.format,
            include_directives: self.include_directives,
        })
    }
}