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