aws_sdk_gamelift/operation/update_script/_update_script_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 UpdateScriptInput {
6 /// <p>A unique identifier for the Realtime script to update. You can use either the script ID or ARN value.</p>
7 pub script_id: ::std::option::Option<::std::string::String>,
8 /// <p>A descriptive label that is associated with a script. Script 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 /// <p>The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored. The storage location must specify the Amazon S3 bucket name, the zip file name (the "key"), and a role ARN that allows Amazon GameLift Servers to access the Amazon S3 storage location. The S3 bucket must be in the same Region where you want to create a new script. By default, Amazon GameLift Servers uploads the latest version of the zip file; if you have S3 object versioning turned on, you can use the <code>ObjectVersion</code> parameter to specify an earlier version.</p>
13 pub storage_location: ::std::option::Option<crate::types::S3Location>,
14 /// <p>A data object containing your Realtime scripts and dependencies as a zip file. The zip file can have one or multiple files. Maximum size of a zip file is 5 MB.</p>
15 /// <p>When using the Amazon Web Services CLI tool to create a script, this parameter is set to the zip file name. It must be prepended with the string "fileb://" to indicate that the file data is a binary object. For example: <code>--zip-file fileb://myRealtimeScript.zip</code>.</p>
16 pub zip_file: ::std::option::Option<::aws_smithy_types::Blob>,
17}
18impl UpdateScriptInput {
19 /// <p>A unique identifier for the Realtime script to update. You can use either the script ID or ARN value.</p>
20 pub fn script_id(&self) -> ::std::option::Option<&str> {
21 self.script_id.as_deref()
22 }
23 /// <p>A descriptive label that is associated with a script. Script names do not need to be unique.</p>
24 pub fn name(&self) -> ::std::option::Option<&str> {
25 self.name.as_deref()
26 }
27 /// <p>Version information that is associated with a build or script. Version strings do not need to be unique.</p>
28 pub fn version(&self) -> ::std::option::Option<&str> {
29 self.version.as_deref()
30 }
31 /// <p>The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored. The storage location must specify the Amazon S3 bucket name, the zip file name (the "key"), and a role ARN that allows Amazon GameLift Servers to access the Amazon S3 storage location. The S3 bucket must be in the same Region where you want to create a new script. By default, Amazon GameLift Servers uploads the latest version of the zip file; if you have S3 object versioning turned on, you can use the <code>ObjectVersion</code> parameter to specify an earlier version.</p>
32 pub fn storage_location(&self) -> ::std::option::Option<&crate::types::S3Location> {
33 self.storage_location.as_ref()
34 }
35 /// <p>A data object containing your Realtime scripts and dependencies as a zip file. The zip file can have one or multiple files. Maximum size of a zip file is 5 MB.</p>
36 /// <p>When using the Amazon Web Services CLI tool to create a script, this parameter is set to the zip file name. It must be prepended with the string "fileb://" to indicate that the file data is a binary object. For example: <code>--zip-file fileb://myRealtimeScript.zip</code>.</p>
37 pub fn zip_file(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
38 self.zip_file.as_ref()
39 }
40}
41impl UpdateScriptInput {
42 /// Creates a new builder-style object to manufacture [`UpdateScriptInput`](crate::operation::update_script::UpdateScriptInput).
43 pub fn builder() -> crate::operation::update_script::builders::UpdateScriptInputBuilder {
44 crate::operation::update_script::builders::UpdateScriptInputBuilder::default()
45 }
46}
47
48/// A builder for [`UpdateScriptInput`](crate::operation::update_script::UpdateScriptInput).
49#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct UpdateScriptInputBuilder {
52 pub(crate) script_id: ::std::option::Option<::std::string::String>,
53 pub(crate) name: ::std::option::Option<::std::string::String>,
54 pub(crate) version: ::std::option::Option<::std::string::String>,
55 pub(crate) storage_location: ::std::option::Option<crate::types::S3Location>,
56 pub(crate) zip_file: ::std::option::Option<::aws_smithy_types::Blob>,
57}
58impl UpdateScriptInputBuilder {
59 /// <p>A unique identifier for the Realtime script to update. You can use either the script ID or ARN value.</p>
60 /// This field is required.
61 pub fn script_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62 self.script_id = ::std::option::Option::Some(input.into());
63 self
64 }
65 /// <p>A unique identifier for the Realtime script to update. You can use either the script ID or ARN value.</p>
66 pub fn set_script_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67 self.script_id = input;
68 self
69 }
70 /// <p>A unique identifier for the Realtime script to update. You can use either the script ID or ARN value.</p>
71 pub fn get_script_id(&self) -> &::std::option::Option<::std::string::String> {
72 &self.script_id
73 }
74 /// <p>A descriptive label that is associated with a script. Script names do not need to be unique.</p>
75 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76 self.name = ::std::option::Option::Some(input.into());
77 self
78 }
79 /// <p>A descriptive label that is associated with a script. Script names do not need to be unique.</p>
80 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81 self.name = input;
82 self
83 }
84 /// <p>A descriptive label that is associated with a script. Script names do not need to be unique.</p>
85 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
86 &self.name
87 }
88 /// <p>Version information that is associated with a build or script. Version strings do not need to be unique.</p>
89 pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90 self.version = ::std::option::Option::Some(input.into());
91 self
92 }
93 /// <p>Version information that is associated with a build or script. Version strings do not need to be unique.</p>
94 pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95 self.version = input;
96 self
97 }
98 /// <p>Version information that is associated with a build or script. Version strings do not need to be unique.</p>
99 pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
100 &self.version
101 }
102 /// <p>The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored. The storage location must specify the Amazon S3 bucket name, the zip file name (the "key"), and a role ARN that allows Amazon GameLift Servers to access the Amazon S3 storage location. The S3 bucket must be in the same Region where you want to create a new script. By default, Amazon GameLift Servers uploads the latest version of the zip file; if you have S3 object versioning turned on, you can use the <code>ObjectVersion</code> parameter to specify an earlier version.</p>
103 pub fn storage_location(mut self, input: crate::types::S3Location) -> Self {
104 self.storage_location = ::std::option::Option::Some(input);
105 self
106 }
107 /// <p>The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored. The storage location must specify the Amazon S3 bucket name, the zip file name (the "key"), and a role ARN that allows Amazon GameLift Servers to access the Amazon S3 storage location. The S3 bucket must be in the same Region where you want to create a new script. By default, Amazon GameLift Servers uploads the latest version of the zip file; if you have S3 object versioning turned on, you can use the <code>ObjectVersion</code> parameter to specify an earlier version.</p>
108 pub fn set_storage_location(mut self, input: ::std::option::Option<crate::types::S3Location>) -> Self {
109 self.storage_location = input;
110 self
111 }
112 /// <p>The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored. The storage location must specify the Amazon S3 bucket name, the zip file name (the "key"), and a role ARN that allows Amazon GameLift Servers to access the Amazon S3 storage location. The S3 bucket must be in the same Region where you want to create a new script. By default, Amazon GameLift Servers uploads the latest version of the zip file; if you have S3 object versioning turned on, you can use the <code>ObjectVersion</code> parameter to specify an earlier version.</p>
113 pub fn get_storage_location(&self) -> &::std::option::Option<crate::types::S3Location> {
114 &self.storage_location
115 }
116 /// <p>A data object containing your Realtime scripts and dependencies as a zip file. The zip file can have one or multiple files. Maximum size of a zip file is 5 MB.</p>
117 /// <p>When using the Amazon Web Services CLI tool to create a script, this parameter is set to the zip file name. It must be prepended with the string "fileb://" to indicate that the file data is a binary object. For example: <code>--zip-file fileb://myRealtimeScript.zip</code>.</p>
118 pub fn zip_file(mut self, input: ::aws_smithy_types::Blob) -> Self {
119 self.zip_file = ::std::option::Option::Some(input);
120 self
121 }
122 /// <p>A data object containing your Realtime scripts and dependencies as a zip file. The zip file can have one or multiple files. Maximum size of a zip file is 5 MB.</p>
123 /// <p>When using the Amazon Web Services CLI tool to create a script, this parameter is set to the zip file name. It must be prepended with the string "fileb://" to indicate that the file data is a binary object. For example: <code>--zip-file fileb://myRealtimeScript.zip</code>.</p>
124 pub fn set_zip_file(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
125 self.zip_file = input;
126 self
127 }
128 /// <p>A data object containing your Realtime scripts and dependencies as a zip file. The zip file can have one or multiple files. Maximum size of a zip file is 5 MB.</p>
129 /// <p>When using the Amazon Web Services CLI tool to create a script, this parameter is set to the zip file name. It must be prepended with the string "fileb://" to indicate that the file data is a binary object. For example: <code>--zip-file fileb://myRealtimeScript.zip</code>.</p>
130 pub fn get_zip_file(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
131 &self.zip_file
132 }
133 /// Consumes the builder and constructs a [`UpdateScriptInput`](crate::operation::update_script::UpdateScriptInput).
134 pub fn build(
135 self,
136 ) -> ::std::result::Result<crate::operation::update_script::UpdateScriptInput, ::aws_smithy_types::error::operation::BuildError> {
137 ::std::result::Result::Ok(crate::operation::update_script::UpdateScriptInput {
138 script_id: self.script_id,
139 name: self.name,
140 version: self.version,
141 storage_location: self.storage_location,
142 zip_file: self.zip_file,
143 })
144 }
145}