aws_sdk_devicefarm/operation/update_upload/
_update_upload_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 UpdateUploadInput {
6    /// <p>The Amazon Resource Name (ARN) of the uploaded test spec.</p>
7    pub arn: ::std::option::Option<::std::string::String>,
8    /// <p>The upload's test spec file name. The name must not contain any forward slashes (/). The test spec file name must end with the <code>.yaml</code> or <code>.yml</code> file extension.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>The upload's content type (for example, <code>application/x-yaml</code>).</p>
11    pub content_type: ::std::option::Option<::std::string::String>,
12    /// <p>Set to true if the YAML file has changed and must be updated. Otherwise, set to false.</p>
13    pub edit_content: ::std::option::Option<bool>,
14}
15impl UpdateUploadInput {
16    /// <p>The Amazon Resource Name (ARN) of the uploaded test spec.</p>
17    pub fn arn(&self) -> ::std::option::Option<&str> {
18        self.arn.as_deref()
19    }
20    /// <p>The upload's test spec file name. The name must not contain any forward slashes (/). The test spec file name must end with the <code>.yaml</code> or <code>.yml</code> file extension.</p>
21    pub fn name(&self) -> ::std::option::Option<&str> {
22        self.name.as_deref()
23    }
24    /// <p>The upload's content type (for example, <code>application/x-yaml</code>).</p>
25    pub fn content_type(&self) -> ::std::option::Option<&str> {
26        self.content_type.as_deref()
27    }
28    /// <p>Set to true if the YAML file has changed and must be updated. Otherwise, set to false.</p>
29    pub fn edit_content(&self) -> ::std::option::Option<bool> {
30        self.edit_content
31    }
32}
33impl UpdateUploadInput {
34    /// Creates a new builder-style object to manufacture [`UpdateUploadInput`](crate::operation::update_upload::UpdateUploadInput).
35    pub fn builder() -> crate::operation::update_upload::builders::UpdateUploadInputBuilder {
36        crate::operation::update_upload::builders::UpdateUploadInputBuilder::default()
37    }
38}
39
40/// A builder for [`UpdateUploadInput`](crate::operation::update_upload::UpdateUploadInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct UpdateUploadInputBuilder {
44    pub(crate) arn: ::std::option::Option<::std::string::String>,
45    pub(crate) name: ::std::option::Option<::std::string::String>,
46    pub(crate) content_type: ::std::option::Option<::std::string::String>,
47    pub(crate) edit_content: ::std::option::Option<bool>,
48}
49impl UpdateUploadInputBuilder {
50    /// <p>The Amazon Resource Name (ARN) of the uploaded test spec.</p>
51    /// This field is required.
52    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.arn = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>The Amazon Resource Name (ARN) of the uploaded test spec.</p>
57    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.arn = input;
59        self
60    }
61    /// <p>The Amazon Resource Name (ARN) of the uploaded test spec.</p>
62    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
63        &self.arn
64    }
65    /// <p>The upload's test spec file name. The name must not contain any forward slashes (/). The test spec file name must end with the <code>.yaml</code> or <code>.yml</code> file extension.</p>
66    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.name = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The upload's test spec file name. The name must not contain any forward slashes (/). The test spec file name must end with the <code>.yaml</code> or <code>.yml</code> file extension.</p>
71    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.name = input;
73        self
74    }
75    /// <p>The upload's test spec file name. The name must not contain any forward slashes (/). The test spec file name must end with the <code>.yaml</code> or <code>.yml</code> file extension.</p>
76    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
77        &self.name
78    }
79    /// <p>The upload's content type (for example, <code>application/x-yaml</code>).</p>
80    pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.content_type = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>The upload's content type (for example, <code>application/x-yaml</code>).</p>
85    pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.content_type = input;
87        self
88    }
89    /// <p>The upload's content type (for example, <code>application/x-yaml</code>).</p>
90    pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
91        &self.content_type
92    }
93    /// <p>Set to true if the YAML file has changed and must be updated. Otherwise, set to false.</p>
94    pub fn edit_content(mut self, input: bool) -> Self {
95        self.edit_content = ::std::option::Option::Some(input);
96        self
97    }
98    /// <p>Set to true if the YAML file has changed and must be updated. Otherwise, set to false.</p>
99    pub fn set_edit_content(mut self, input: ::std::option::Option<bool>) -> Self {
100        self.edit_content = input;
101        self
102    }
103    /// <p>Set to true if the YAML file has changed and must be updated. Otherwise, set to false.</p>
104    pub fn get_edit_content(&self) -> &::std::option::Option<bool> {
105        &self.edit_content
106    }
107    /// Consumes the builder and constructs a [`UpdateUploadInput`](crate::operation::update_upload::UpdateUploadInput).
108    pub fn build(
109        self,
110    ) -> ::std::result::Result<crate::operation::update_upload::UpdateUploadInput, ::aws_smithy_types::error::operation::BuildError> {
111        ::std::result::Result::Ok(crate::operation::update_upload::UpdateUploadInput {
112            arn: self.arn,
113            name: self.name,
114            content_type: self.content_type,
115            edit_content: self.edit_content,
116        })
117    }
118}