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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>A specific property that is impacted by a warning.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct WarningProperty {
/// <p>The path of the property. For example, if this is for the <code>S3Bucket</code> member of the <code>Code</code> property, the property path would be <code>Code/S3Bucket</code>.</p>
pub property_path: ::std::option::Option<::std::string::String>,
/// <p>If <code>true</code>, the specified property is required.</p>
pub required: ::std::option::Option<bool>,
/// <p>The description of the property from the resource provider schema.</p>
pub description: ::std::option::Option<::std::string::String>,
}
impl WarningProperty {
/// <p>The path of the property. For example, if this is for the <code>S3Bucket</code> member of the <code>Code</code> property, the property path would be <code>Code/S3Bucket</code>.</p>
pub fn property_path(&self) -> ::std::option::Option<&str> {
self.property_path.as_deref()
}
/// <p>If <code>true</code>, the specified property is required.</p>
pub fn required(&self) -> ::std::option::Option<bool> {
self.required
}
/// <p>The description of the property from the resource provider schema.</p>
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
}
impl WarningProperty {
/// Creates a new builder-style object to manufacture [`WarningProperty`](crate::types::WarningProperty).
pub fn builder() -> crate::types::builders::WarningPropertyBuilder {
crate::types::builders::WarningPropertyBuilder::default()
}
}
/// A builder for [`WarningProperty`](crate::types::WarningProperty).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct WarningPropertyBuilder {
pub(crate) property_path: ::std::option::Option<::std::string::String>,
pub(crate) required: ::std::option::Option<bool>,
pub(crate) description: ::std::option::Option<::std::string::String>,
}
impl WarningPropertyBuilder {
/// <p>The path of the property. For example, if this is for the <code>S3Bucket</code> member of the <code>Code</code> property, the property path would be <code>Code/S3Bucket</code>.</p>
pub fn property_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.property_path = ::std::option::Option::Some(input.into());
self
}
/// <p>The path of the property. For example, if this is for the <code>S3Bucket</code> member of the <code>Code</code> property, the property path would be <code>Code/S3Bucket</code>.</p>
pub fn set_property_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.property_path = input;
self
}
/// <p>The path of the property. For example, if this is for the <code>S3Bucket</code> member of the <code>Code</code> property, the property path would be <code>Code/S3Bucket</code>.</p>
pub fn get_property_path(&self) -> &::std::option::Option<::std::string::String> {
&self.property_path
}
/// <p>If <code>true</code>, the specified property is required.</p>
pub fn required(mut self, input: bool) -> Self {
self.required = ::std::option::Option::Some(input);
self
}
/// <p>If <code>true</code>, the specified property is required.</p>
pub fn set_required(mut self, input: ::std::option::Option<bool>) -> Self {
self.required = input;
self
}
/// <p>If <code>true</code>, the specified property is required.</p>
pub fn get_required(&self) -> &::std::option::Option<bool> {
&self.required
}
/// <p>The description of the property from the resource provider schema.</p>
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
/// <p>The description of the property from the resource provider schema.</p>
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
/// <p>The description of the property from the resource provider schema.</p>
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
/// Consumes the builder and constructs a [`WarningProperty`](crate::types::WarningProperty).
pub fn build(self) -> crate::types::WarningProperty {
crate::types::WarningProperty {
property_path: self.property_path,
required: self.required,
description: self.description,
}
}
}