aws_sdk_opensearch/operation/get_index/
_get_index_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetIndexOutput {
6 pub index_schema: ::aws_smithy_types::Document,
8 _request_id: Option<String>,
9}
10impl GetIndexOutput {
11 pub fn index_schema(&self) -> &::aws_smithy_types::Document {
13 &self.index_schema
14 }
15}
16impl ::aws_types::request_id::RequestId for GetIndexOutput {
17 fn request_id(&self) -> Option<&str> {
18 self._request_id.as_deref()
19 }
20}
21impl GetIndexOutput {
22 pub fn builder() -> crate::operation::get_index::builders::GetIndexOutputBuilder {
24 crate::operation::get_index::builders::GetIndexOutputBuilder::default()
25 }
26}
27
28#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct GetIndexOutputBuilder {
32 pub(crate) index_schema: ::std::option::Option<::aws_smithy_types::Document>,
33 _request_id: Option<String>,
34}
35impl GetIndexOutputBuilder {
36 pub fn index_schema(mut self, input: ::aws_smithy_types::Document) -> Self {
39 self.index_schema = ::std::option::Option::Some(input);
40 self
41 }
42 pub fn set_index_schema(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
44 self.index_schema = input;
45 self
46 }
47 pub fn get_index_schema(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
49 &self.index_schema
50 }
51 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
52 self._request_id = Some(request_id.into());
53 self
54 }
55
56 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
57 self._request_id = request_id;
58 self
59 }
60 pub fn build(self) -> ::std::result::Result<crate::operation::get_index::GetIndexOutput, ::aws_smithy_types::error::operation::BuildError> {
64 ::std::result::Result::Ok(crate::operation::get_index::GetIndexOutput {
65 index_schema: self.index_schema.ok_or_else(|| {
66 ::aws_smithy_types::error::operation::BuildError::missing_field(
67 "index_schema",
68 "index_schema was not specified but it is required when building GetIndexOutput",
69 )
70 })?,
71 _request_id: self._request_id,
72 })
73 }
74}