aws_sdk_neptunegraph/operation/delete_graph/
_delete_graph_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteGraphInput {
6    /// <p>The unique identifier of the Neptune Analytics graph.</p>
7    pub graph_identifier: ::std::option::Option<::std::string::String>,
8    /// <p>Determines whether a final graph snapshot is created before the graph is deleted. If <code>true</code> is specified, no graph snapshot is created. If <code>false</code> is specified, a graph snapshot is created before the graph is deleted.</p>
9    pub skip_snapshot: ::std::option::Option<bool>,
10}
11impl DeleteGraphInput {
12    /// <p>The unique identifier of the Neptune Analytics graph.</p>
13    pub fn graph_identifier(&self) -> ::std::option::Option<&str> {
14        self.graph_identifier.as_deref()
15    }
16    /// <p>Determines whether a final graph snapshot is created before the graph is deleted. If <code>true</code> is specified, no graph snapshot is created. If <code>false</code> is specified, a graph snapshot is created before the graph is deleted.</p>
17    pub fn skip_snapshot(&self) -> ::std::option::Option<bool> {
18        self.skip_snapshot
19    }
20}
21impl DeleteGraphInput {
22    /// Creates a new builder-style object to manufacture [`DeleteGraphInput`](crate::operation::delete_graph::DeleteGraphInput).
23    pub fn builder() -> crate::operation::delete_graph::builders::DeleteGraphInputBuilder {
24        crate::operation::delete_graph::builders::DeleteGraphInputBuilder::default()
25    }
26}
27
28/// A builder for [`DeleteGraphInput`](crate::operation::delete_graph::DeleteGraphInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DeleteGraphInputBuilder {
32    pub(crate) graph_identifier: ::std::option::Option<::std::string::String>,
33    pub(crate) skip_snapshot: ::std::option::Option<bool>,
34}
35impl DeleteGraphInputBuilder {
36    /// <p>The unique identifier of the Neptune Analytics graph.</p>
37    /// This field is required.
38    pub fn graph_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.graph_identifier = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The unique identifier of the Neptune Analytics graph.</p>
43    pub fn set_graph_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.graph_identifier = input;
45        self
46    }
47    /// <p>The unique identifier of the Neptune Analytics graph.</p>
48    pub fn get_graph_identifier(&self) -> &::std::option::Option<::std::string::String> {
49        &self.graph_identifier
50    }
51    /// <p>Determines whether a final graph snapshot is created before the graph is deleted. If <code>true</code> is specified, no graph snapshot is created. If <code>false</code> is specified, a graph snapshot is created before the graph is deleted.</p>
52    /// This field is required.
53    pub fn skip_snapshot(mut self, input: bool) -> Self {
54        self.skip_snapshot = ::std::option::Option::Some(input);
55        self
56    }
57    /// <p>Determines whether a final graph snapshot is created before the graph is deleted. If <code>true</code> is specified, no graph snapshot is created. If <code>false</code> is specified, a graph snapshot is created before the graph is deleted.</p>
58    pub fn set_skip_snapshot(mut self, input: ::std::option::Option<bool>) -> Self {
59        self.skip_snapshot = input;
60        self
61    }
62    /// <p>Determines whether a final graph snapshot is created before the graph is deleted. If <code>true</code> is specified, no graph snapshot is created. If <code>false</code> is specified, a graph snapshot is created before the graph is deleted.</p>
63    pub fn get_skip_snapshot(&self) -> &::std::option::Option<bool> {
64        &self.skip_snapshot
65    }
66    /// Consumes the builder and constructs a [`DeleteGraphInput`](crate::operation::delete_graph::DeleteGraphInput).
67    pub fn build(self) -> ::std::result::Result<crate::operation::delete_graph::DeleteGraphInput, ::aws_smithy_types::error::operation::BuildError> {
68        ::std::result::Result::Ok(crate::operation::delete_graph::DeleteGraphInput {
69            graph_identifier: self.graph_identifier,
70            skip_snapshot: self.skip_snapshot,
71        })
72    }
73}