aws_sdk_mobile/operation/update_project/
_update_project_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Request structure used for requests to update project configuration.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateProjectInput {
7    /// <p>ZIP or YAML file which contains project configuration to be updated. This should be the contents of the file downloaded from the URL provided in an export project operation.</p>
8    pub contents: ::std::option::Option<::aws_smithy_types::Blob>,
9    /// <p>Unique project identifier.</p>
10    pub project_id: ::std::option::Option<::std::string::String>,
11}
12impl UpdateProjectInput {
13    /// <p>ZIP or YAML file which contains project configuration to be updated. This should be the contents of the file downloaded from the URL provided in an export project operation.</p>
14    pub fn contents(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
15        self.contents.as_ref()
16    }
17    /// <p>Unique project identifier.</p>
18    pub fn project_id(&self) -> ::std::option::Option<&str> {
19        self.project_id.as_deref()
20    }
21}
22impl UpdateProjectInput {
23    /// Creates a new builder-style object to manufacture [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
24    pub fn builder() -> crate::operation::update_project::builders::UpdateProjectInputBuilder {
25        crate::operation::update_project::builders::UpdateProjectInputBuilder::default()
26    }
27}
28
29/// A builder for [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct UpdateProjectInputBuilder {
33    pub(crate) contents: ::std::option::Option<::aws_smithy_types::Blob>,
34    pub(crate) project_id: ::std::option::Option<::std::string::String>,
35}
36impl UpdateProjectInputBuilder {
37    /// <p>ZIP or YAML file which contains project configuration to be updated. This should be the contents of the file downloaded from the URL provided in an export project operation.</p>
38    pub fn contents(mut self, input: ::aws_smithy_types::Blob) -> Self {
39        self.contents = ::std::option::Option::Some(input);
40        self
41    }
42    /// <p>ZIP or YAML file which contains project configuration to be updated. This should be the contents of the file downloaded from the URL provided in an export project operation.</p>
43    pub fn set_contents(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
44        self.contents = input;
45        self
46    }
47    /// <p>ZIP or YAML file which contains project configuration to be updated. This should be the contents of the file downloaded from the URL provided in an export project operation.</p>
48    pub fn get_contents(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
49        &self.contents
50    }
51    /// <p>Unique project identifier.</p>
52    /// This field is required.
53    pub fn project_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.project_id = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>Unique project identifier.</p>
58    pub fn set_project_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.project_id = input;
60        self
61    }
62    /// <p>Unique project identifier.</p>
63    pub fn get_project_id(&self) -> &::std::option::Option<::std::string::String> {
64        &self.project_id
65    }
66    /// Consumes the builder and constructs a [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
67    pub fn build(
68        self,
69    ) -> ::std::result::Result<crate::operation::update_project::UpdateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
70        ::std::result::Result::Ok(crate::operation::update_project::UpdateProjectInput {
71            contents: self.contents,
72            project_id: self.project_id,
73        })
74    }
75}