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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
// 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 UpdateScriptInput {
    /// <p>A unique identifier for the Realtime script to update. You can use either the script ID or ARN value.</p>
    pub script_id: ::std::option::Option<::std::string::String>,
    /// <p>A descriptive label that is associated with a script. Script names don't need to be unique.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>Version information associated with a build or script. Version strings don't need to be unique.</p>
    pub version: ::std::option::Option<::std::string::String>,
    /// <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 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 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>
    pub storage_location: ::std::option::Option<crate::types::S3Location>,
    /// <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>
    /// <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>
    pub zip_file: ::std::option::Option<::aws_smithy_types::Blob>,
}
impl UpdateScriptInput {
    /// <p>A unique identifier for the Realtime script to update. You can use either the script ID or ARN value.</p>
    pub fn script_id(&self) -> ::std::option::Option<&str> {
        self.script_id.as_deref()
    }
    /// <p>A descriptive label that is associated with a script. Script names don't need to be unique.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>Version information associated with a build or script. Version strings don't need to be unique.</p>
    pub fn version(&self) -> ::std::option::Option<&str> {
        self.version.as_deref()
    }
    /// <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 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 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>
    pub fn storage_location(&self) -> ::std::option::Option<&crate::types::S3Location> {
        self.storage_location.as_ref()
    }
    /// <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>
    /// <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>
    pub fn zip_file(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
        self.zip_file.as_ref()
    }
}
impl UpdateScriptInput {
    /// Creates a new builder-style object to manufacture [`UpdateScriptInput`](crate::operation::update_script::UpdateScriptInput).
    pub fn builder() -> crate::operation::update_script::builders::UpdateScriptInputBuilder {
        crate::operation::update_script::builders::UpdateScriptInputBuilder::default()
    }
}

/// A builder for [`UpdateScriptInput`](crate::operation::update_script::UpdateScriptInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UpdateScriptInputBuilder {
    pub(crate) script_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) version: ::std::option::Option<::std::string::String>,
    pub(crate) storage_location: ::std::option::Option<crate::types::S3Location>,
    pub(crate) zip_file: ::std::option::Option<::aws_smithy_types::Blob>,
}
impl UpdateScriptInputBuilder {
    /// <p>A unique identifier for the Realtime script to update. You can use either the script ID or ARN value.</p>
    /// This field is required.
    pub fn script_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.script_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique identifier for the Realtime script to update. You can use either the script ID or ARN value.</p>
    pub fn set_script_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.script_id = input;
        self
    }
    /// <p>A unique identifier for the Realtime script to update. You can use either the script ID or ARN value.</p>
    pub fn get_script_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.script_id
    }
    /// <p>A descriptive label that is associated with a script. Script names don't need to be unique.</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>A descriptive label that is associated with a script. Script names don't need to be unique.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>A descriptive label that is associated with a script. Script names don't need to be unique.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>Version information associated with a build or script. Version strings don't need to be unique.</p>
    pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Version information associated with a build or script. Version strings don't need to be unique.</p>
    pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.version = input;
        self
    }
    /// <p>Version information associated with a build or script. Version strings don't need to be unique.</p>
    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.version
    }
    /// <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 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 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>
    pub fn storage_location(mut self, input: crate::types::S3Location) -> Self {
        self.storage_location = ::std::option::Option::Some(input);
        self
    }
    /// <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 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 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>
    pub fn set_storage_location(mut self, input: ::std::option::Option<crate::types::S3Location>) -> Self {
        self.storage_location = input;
        self
    }
    /// <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 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 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>
    pub fn get_storage_location(&self) -> &::std::option::Option<crate::types::S3Location> {
        &self.storage_location
    }
    /// <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>
    /// <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>
    pub fn zip_file(mut self, input: ::aws_smithy_types::Blob) -> Self {
        self.zip_file = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    /// <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>
    pub fn set_zip_file(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
        self.zip_file = input;
        self
    }
    /// <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>
    /// <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>
    pub fn get_zip_file(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
        &self.zip_file
    }
    /// Consumes the builder and constructs a [`UpdateScriptInput`](crate::operation::update_script::UpdateScriptInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_script::UpdateScriptInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_script::UpdateScriptInput {
            script_id: self.script_id,
            name: self.name,
            version: self.version,
            storage_location: self.storage_location,
            zip_file: self.zip_file,
        })
    }
}