aws_sdk_gamelift/operation/update_build/
_update_build_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 UpdateBuildInput {
6    /// <p>A unique identifier for the build to update. You can use either the build ID or ARN value.</p>
7    pub build_id: ::std::option::Option<::std::string::String>,
8    /// <p>A descriptive label that is associated with a build. Build names do not need to be unique.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>Version information that is associated with a build or script. Version strings do not need to be unique.</p>
11    pub version: ::std::option::Option<::std::string::String>,
12}
13impl UpdateBuildInput {
14    /// <p>A unique identifier for the build to update. You can use either the build ID or ARN value.</p>
15    pub fn build_id(&self) -> ::std::option::Option<&str> {
16        self.build_id.as_deref()
17    }
18    /// <p>A descriptive label that is associated with a build. Build names do not need to be unique.</p>
19    pub fn name(&self) -> ::std::option::Option<&str> {
20        self.name.as_deref()
21    }
22    /// <p>Version information that is associated with a build or script. Version strings do not need to be unique.</p>
23    pub fn version(&self) -> ::std::option::Option<&str> {
24        self.version.as_deref()
25    }
26}
27impl UpdateBuildInput {
28    /// Creates a new builder-style object to manufacture [`UpdateBuildInput`](crate::operation::update_build::UpdateBuildInput).
29    pub fn builder() -> crate::operation::update_build::builders::UpdateBuildInputBuilder {
30        crate::operation::update_build::builders::UpdateBuildInputBuilder::default()
31    }
32}
33
34/// A builder for [`UpdateBuildInput`](crate::operation::update_build::UpdateBuildInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct UpdateBuildInputBuilder {
38    pub(crate) build_id: ::std::option::Option<::std::string::String>,
39    pub(crate) name: ::std::option::Option<::std::string::String>,
40    pub(crate) version: ::std::option::Option<::std::string::String>,
41}
42impl UpdateBuildInputBuilder {
43    /// <p>A unique identifier for the build to update. You can use either the build ID or ARN value.</p>
44    /// This field is required.
45    pub fn build_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.build_id = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>A unique identifier for the build to update. You can use either the build ID or ARN value.</p>
50    pub fn set_build_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.build_id = input;
52        self
53    }
54    /// <p>A unique identifier for the build to update. You can use either the build ID or ARN value.</p>
55    pub fn get_build_id(&self) -> &::std::option::Option<::std::string::String> {
56        &self.build_id
57    }
58    /// <p>A descriptive label that is associated with a build. Build names do not need to be unique.</p>
59    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.name = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>A descriptive label that is associated with a build. Build names do not need to be unique.</p>
64    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.name = input;
66        self
67    }
68    /// <p>A descriptive label that is associated with a build. Build names do not need to be unique.</p>
69    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
70        &self.name
71    }
72    /// <p>Version information that is associated with a build or script. Version strings do not need to be unique.</p>
73    pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.version = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>Version information that is associated with a build or script. Version strings do not need to be unique.</p>
78    pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.version = input;
80        self
81    }
82    /// <p>Version information that is associated with a build or script. Version strings do not need to be unique.</p>
83    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
84        &self.version
85    }
86    /// Consumes the builder and constructs a [`UpdateBuildInput`](crate::operation::update_build::UpdateBuildInput).
87    pub fn build(self) -> ::std::result::Result<crate::operation::update_build::UpdateBuildInput, ::aws_smithy_types::error::operation::BuildError> {
88        ::std::result::Result::Ok(crate::operation::update_build::UpdateBuildInput {
89            build_id: self.build_id,
90            name: self.name,
91            version: self.version,
92        })
93    }
94}