stedi_sdk_client_exchange_credentials/
model.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// Describes one specific validation failure for an input member.
4#[non_exhaustive]
5#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
6pub struct ValidationExceptionField {
7    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
8    #[doc(hidden)]
9    pub path: std::option::Option<std::string::String>,
10    /// A detailed description of the validation failure.
11    #[doc(hidden)]
12    pub message: std::option::Option<std::string::String>,
13}
14impl ValidationExceptionField {
15    /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
16    pub fn path(&self) -> std::option::Option<&str> {
17        self.path.as_deref()
18    }
19    /// A detailed description of the validation failure.
20    pub fn message(&self) -> std::option::Option<&str> {
21        self.message.as_deref()
22    }
23}
24/// See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
25pub mod validation_exception_field {
26
27    /// A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField).
28    #[non_exhaustive]
29    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
30    pub struct Builder {
31        pub(crate) path: std::option::Option<std::string::String>,
32        pub(crate) message: std::option::Option<std::string::String>,
33    }
34    impl Builder {
35        /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
36        pub fn path(mut self, input: impl Into<std::string::String>) -> Self {
37            self.path = Some(input.into());
38            self
39        }
40        /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
41        pub fn set_path(mut self, input: std::option::Option<std::string::String>) -> Self {
42            self.path = input;
43            self
44        }
45        /// A detailed description of the validation failure.
46        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
47            self.message = Some(input.into());
48            self
49        }
50        /// A detailed description of the validation failure.
51        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
52            self.message = input;
53            self
54        }
55        /// Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField).
56        pub fn build(self) -> crate::model::ValidationExceptionField {
57            crate::model::ValidationExceptionField {
58                path: self.path,
59                message: self.message,
60            }
61        }
62    }
63}
64impl ValidationExceptionField {
65    /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
66    pub fn builder() -> crate::model::validation_exception_field::Builder {
67        crate::model::validation_exception_field::Builder::default()
68    }
69}