aws_sdk_iotwireless/types/
_ip.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct Ip {
7 pub ip_address: ::std::string::String,
9}
10impl Ip {
11 pub fn ip_address(&self) -> &str {
13 use std::ops::Deref;
14 self.ip_address.deref()
15 }
16}
17impl Ip {
18 pub fn builder() -> crate::types::builders::IpBuilder {
20 crate::types::builders::IpBuilder::default()
21 }
22}
23
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
26#[non_exhaustive]
27pub struct IpBuilder {
28 pub(crate) ip_address: ::std::option::Option<::std::string::String>,
29}
30impl IpBuilder {
31 pub fn ip_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
34 self.ip_address = ::std::option::Option::Some(input.into());
35 self
36 }
37 pub fn set_ip_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
39 self.ip_address = input;
40 self
41 }
42 pub fn get_ip_address(&self) -> &::std::option::Option<::std::string::String> {
44 &self.ip_address
45 }
46 pub fn build(self) -> ::std::result::Result<crate::types::Ip, ::aws_smithy_types::error::operation::BuildError> {
50 ::std::result::Result::Ok(crate::types::Ip {
51 ip_address: self.ip_address.ok_or_else(|| {
52 ::aws_smithy_types::error::operation::BuildError::missing_field(
53 "ip_address",
54 "ip_address was not specified but it is required when building Ip",
55 )
56 })?,
57 })
58 }
59}