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 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Specifies the resource, the hook, and the hook version to be invoked.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ChangeSetHook {
/// <p>Specifies the points in provisioning logic where a hook is invoked.</p>
pub invocation_point: ::std::option::Option<crate::types::HookInvocationPoint>,
/// <p>Specify the hook failure mode for non-compliant resources in the followings ways.</p>
/// <ul>
/// <li>
/// <p><code>FAIL</code> Stops provisioning resources.</p></li>
/// <li>
/// <p><code>WARN</code> Allows provisioning to continue with a warning message.</p></li>
/// </ul>
pub failure_mode: ::std::option::Option<crate::types::HookFailureMode>,
/// <p>The unique name for your hook. Specifies a three-part namespace for your hook, with a recommended pattern of <code>Organization::Service::Hook</code>.</p><note>
/// <p>The following organization namespaces are reserved and can't be used in your hook type names:</p>
/// <ul>
/// <li>
/// <p><code>Alexa</code></p></li>
/// <li>
/// <p><code>AMZN</code></p></li>
/// <li>
/// <p><code>Amazon</code></p></li>
/// <li>
/// <p><code>ASK</code></p></li>
/// <li>
/// <p><code>AWS</code></p></li>
/// <li>
/// <p><code>Custom</code></p></li>
/// <li>
/// <p><code>Dev</code></p></li>
/// </ul>
/// </note>
pub type_name: ::std::option::Option<::std::string::String>,
/// <p>The version ID of the type specified.</p>
pub type_version_id: ::std::option::Option<::std::string::String>,
/// <p>The version ID of the type configuration.</p>
pub type_configuration_version_id: ::std::option::Option<::std::string::String>,
/// <p>Specifies details about the target that the hook will run against.</p>
pub target_details: ::std::option::Option<crate::types::ChangeSetHookTargetDetails>,
}
impl ChangeSetHook {
/// <p>Specifies the points in provisioning logic where a hook is invoked.</p>
pub fn invocation_point(&self) -> ::std::option::Option<&crate::types::HookInvocationPoint> {
self.invocation_point.as_ref()
}
/// <p>Specify the hook failure mode for non-compliant resources in the followings ways.</p>
/// <ul>
/// <li>
/// <p><code>FAIL</code> Stops provisioning resources.</p></li>
/// <li>
/// <p><code>WARN</code> Allows provisioning to continue with a warning message.</p></li>
/// </ul>
pub fn failure_mode(&self) -> ::std::option::Option<&crate::types::HookFailureMode> {
self.failure_mode.as_ref()
}
/// <p>The unique name for your hook. Specifies a three-part namespace for your hook, with a recommended pattern of <code>Organization::Service::Hook</code>.</p><note>
/// <p>The following organization namespaces are reserved and can't be used in your hook type names:</p>
/// <ul>
/// <li>
/// <p><code>Alexa</code></p></li>
/// <li>
/// <p><code>AMZN</code></p></li>
/// <li>
/// <p><code>Amazon</code></p></li>
/// <li>
/// <p><code>ASK</code></p></li>
/// <li>
/// <p><code>AWS</code></p></li>
/// <li>
/// <p><code>Custom</code></p></li>
/// <li>
/// <p><code>Dev</code></p></li>
/// </ul>
/// </note>
pub fn type_name(&self) -> ::std::option::Option<&str> {
self.type_name.as_deref()
}
/// <p>The version ID of the type specified.</p>
pub fn type_version_id(&self) -> ::std::option::Option<&str> {
self.type_version_id.as_deref()
}
/// <p>The version ID of the type configuration.</p>
pub fn type_configuration_version_id(&self) -> ::std::option::Option<&str> {
self.type_configuration_version_id.as_deref()
}
/// <p>Specifies details about the target that the hook will run against.</p>
pub fn target_details(&self) -> ::std::option::Option<&crate::types::ChangeSetHookTargetDetails> {
self.target_details.as_ref()
}
}
impl ChangeSetHook {
/// Creates a new builder-style object to manufacture [`ChangeSetHook`](crate::types::ChangeSetHook).
pub fn builder() -> crate::types::builders::ChangeSetHookBuilder {
crate::types::builders::ChangeSetHookBuilder::default()
}
}
/// A builder for [`ChangeSetHook`](crate::types::ChangeSetHook).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ChangeSetHookBuilder {
pub(crate) invocation_point: ::std::option::Option<crate::types::HookInvocationPoint>,
pub(crate) failure_mode: ::std::option::Option<crate::types::HookFailureMode>,
pub(crate) type_name: ::std::option::Option<::std::string::String>,
pub(crate) type_version_id: ::std::option::Option<::std::string::String>,
pub(crate) type_configuration_version_id: ::std::option::Option<::std::string::String>,
pub(crate) target_details: ::std::option::Option<crate::types::ChangeSetHookTargetDetails>,
}
impl ChangeSetHookBuilder {
/// <p>Specifies the points in provisioning logic where a hook is invoked.</p>
pub fn invocation_point(mut self, input: crate::types::HookInvocationPoint) -> Self {
self.invocation_point = ::std::option::Option::Some(input);
self
}
/// <p>Specifies the points in provisioning logic where a hook is invoked.</p>
pub fn set_invocation_point(mut self, input: ::std::option::Option<crate::types::HookInvocationPoint>) -> Self {
self.invocation_point = input;
self
}
/// <p>Specifies the points in provisioning logic where a hook is invoked.</p>
pub fn get_invocation_point(&self) -> &::std::option::Option<crate::types::HookInvocationPoint> {
&self.invocation_point
}
/// <p>Specify the hook failure mode for non-compliant resources in the followings ways.</p>
/// <ul>
/// <li>
/// <p><code>FAIL</code> Stops provisioning resources.</p></li>
/// <li>
/// <p><code>WARN</code> Allows provisioning to continue with a warning message.</p></li>
/// </ul>
pub fn failure_mode(mut self, input: crate::types::HookFailureMode) -> Self {
self.failure_mode = ::std::option::Option::Some(input);
self
}
/// <p>Specify the hook failure mode for non-compliant resources in the followings ways.</p>
/// <ul>
/// <li>
/// <p><code>FAIL</code> Stops provisioning resources.</p></li>
/// <li>
/// <p><code>WARN</code> Allows provisioning to continue with a warning message.</p></li>
/// </ul>
pub fn set_failure_mode(mut self, input: ::std::option::Option<crate::types::HookFailureMode>) -> Self {
self.failure_mode = input;
self
}
/// <p>Specify the hook failure mode for non-compliant resources in the followings ways.</p>
/// <ul>
/// <li>
/// <p><code>FAIL</code> Stops provisioning resources.</p></li>
/// <li>
/// <p><code>WARN</code> Allows provisioning to continue with a warning message.</p></li>
/// </ul>
pub fn get_failure_mode(&self) -> &::std::option::Option<crate::types::HookFailureMode> {
&self.failure_mode
}
/// <p>The unique name for your hook. Specifies a three-part namespace for your hook, with a recommended pattern of <code>Organization::Service::Hook</code>.</p><note>
/// <p>The following organization namespaces are reserved and can't be used in your hook type names:</p>
/// <ul>
/// <li>
/// <p><code>Alexa</code></p></li>
/// <li>
/// <p><code>AMZN</code></p></li>
/// <li>
/// <p><code>Amazon</code></p></li>
/// <li>
/// <p><code>ASK</code></p></li>
/// <li>
/// <p><code>AWS</code></p></li>
/// <li>
/// <p><code>Custom</code></p></li>
/// <li>
/// <p><code>Dev</code></p></li>
/// </ul>
/// </note>
pub fn type_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.type_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique name for your hook. Specifies a three-part namespace for your hook, with a recommended pattern of <code>Organization::Service::Hook</code>.</p><note>
/// <p>The following organization namespaces are reserved and can't be used in your hook type names:</p>
/// <ul>
/// <li>
/// <p><code>Alexa</code></p></li>
/// <li>
/// <p><code>AMZN</code></p></li>
/// <li>
/// <p><code>Amazon</code></p></li>
/// <li>
/// <p><code>ASK</code></p></li>
/// <li>
/// <p><code>AWS</code></p></li>
/// <li>
/// <p><code>Custom</code></p></li>
/// <li>
/// <p><code>Dev</code></p></li>
/// </ul>
/// </note>
pub fn set_type_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.type_name = input;
self
}
/// <p>The unique name for your hook. Specifies a three-part namespace for your hook, with a recommended pattern of <code>Organization::Service::Hook</code>.</p><note>
/// <p>The following organization namespaces are reserved and can't be used in your hook type names:</p>
/// <ul>
/// <li>
/// <p><code>Alexa</code></p></li>
/// <li>
/// <p><code>AMZN</code></p></li>
/// <li>
/// <p><code>Amazon</code></p></li>
/// <li>
/// <p><code>ASK</code></p></li>
/// <li>
/// <p><code>AWS</code></p></li>
/// <li>
/// <p><code>Custom</code></p></li>
/// <li>
/// <p><code>Dev</code></p></li>
/// </ul>
/// </note>
pub fn get_type_name(&self) -> &::std::option::Option<::std::string::String> {
&self.type_name
}
/// <p>The version ID of the type specified.</p>
pub fn type_version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.type_version_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The version ID of the type specified.</p>
pub fn set_type_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.type_version_id = input;
self
}
/// <p>The version ID of the type specified.</p>
pub fn get_type_version_id(&self) -> &::std::option::Option<::std::string::String> {
&self.type_version_id
}
/// <p>The version ID of the type configuration.</p>
pub fn type_configuration_version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.type_configuration_version_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The version ID of the type configuration.</p>
pub fn set_type_configuration_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.type_configuration_version_id = input;
self
}
/// <p>The version ID of the type configuration.</p>
pub fn get_type_configuration_version_id(&self) -> &::std::option::Option<::std::string::String> {
&self.type_configuration_version_id
}
/// <p>Specifies details about the target that the hook will run against.</p>
pub fn target_details(mut self, input: crate::types::ChangeSetHookTargetDetails) -> Self {
self.target_details = ::std::option::Option::Some(input);
self
}
/// <p>Specifies details about the target that the hook will run against.</p>
pub fn set_target_details(mut self, input: ::std::option::Option<crate::types::ChangeSetHookTargetDetails>) -> Self {
self.target_details = input;
self
}
/// <p>Specifies details about the target that the hook will run against.</p>
pub fn get_target_details(&self) -> &::std::option::Option<crate::types::ChangeSetHookTargetDetails> {
&self.target_details
}
/// Consumes the builder and constructs a [`ChangeSetHook`](crate::types::ChangeSetHook).
pub fn build(self) -> crate::types::ChangeSetHook {
crate::types::ChangeSetHook {
invocation_point: self.invocation_point,
failure_mode: self.failure_mode,
type_name: self.type_name,
type_version_id: self.type_version_id,
type_configuration_version_id: self.type_configuration_version_id,
target_details: self.target_details,
}
}
}