aws_sdk_ec2/operation/delete_vpc/_delete_vpc_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 DeleteVpcInput {
6 /// <p>The ID of the VPC.</p>
7 pub vpc_id: ::std::option::Option<::std::string::String>,
8 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
9 pub dry_run: ::std::option::Option<bool>,
10}
11impl DeleteVpcInput {
12 /// <p>The ID of the VPC.</p>
13 pub fn vpc_id(&self) -> ::std::option::Option<&str> {
14 self.vpc_id.as_deref()
15 }
16 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
17 pub fn dry_run(&self) -> ::std::option::Option<bool> {
18 self.dry_run
19 }
20}
21impl DeleteVpcInput {
22 /// Creates a new builder-style object to manufacture [`DeleteVpcInput`](crate::operation::delete_vpc::DeleteVpcInput).
23 pub fn builder() -> crate::operation::delete_vpc::builders::DeleteVpcInputBuilder {
24 crate::operation::delete_vpc::builders::DeleteVpcInputBuilder::default()
25 }
26}
27
28/// A builder for [`DeleteVpcInput`](crate::operation::delete_vpc::DeleteVpcInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DeleteVpcInputBuilder {
32 pub(crate) vpc_id: ::std::option::Option<::std::string::String>,
33 pub(crate) dry_run: ::std::option::Option<bool>,
34}
35impl DeleteVpcInputBuilder {
36 /// <p>The ID of the VPC.</p>
37 /// This field is required.
38 pub fn vpc_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39 self.vpc_id = ::std::option::Option::Some(input.into());
40 self
41 }
42 /// <p>The ID of the VPC.</p>
43 pub fn set_vpc_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44 self.vpc_id = input;
45 self
46 }
47 /// <p>The ID of the VPC.</p>
48 pub fn get_vpc_id(&self) -> &::std::option::Option<::std::string::String> {
49 &self.vpc_id
50 }
51 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
52 pub fn dry_run(mut self, input: bool) -> Self {
53 self.dry_run = ::std::option::Option::Some(input);
54 self
55 }
56 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
57 pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
58 self.dry_run = input;
59 self
60 }
61 /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
62 pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
63 &self.dry_run
64 }
65 /// Consumes the builder and constructs a [`DeleteVpcInput`](crate::operation::delete_vpc::DeleteVpcInput).
66 pub fn build(self) -> ::std::result::Result<crate::operation::delete_vpc::DeleteVpcInput, ::aws_smithy_types::error::operation::BuildError> {
67 ::std::result::Result::Ok(crate::operation::delete_vpc::DeleteVpcInput {
68 vpc_id: self.vpc_id,
69 dry_run: self.dry_run,
70 })
71 }
72}