aws_sdk_iam/operation/get_instance_profile/_get_instance_profile_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetInstanceProfileInput {
6 /// <p>The name of the instance profile to get information about.</p>
7 /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
8 pub instance_profile_name: ::std::option::Option<::std::string::String>,
9}
10impl GetInstanceProfileInput {
11 /// <p>The name of the instance profile to get information about.</p>
12 /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
13 pub fn instance_profile_name(&self) -> ::std::option::Option<&str> {
14 self.instance_profile_name.as_deref()
15 }
16}
17impl GetInstanceProfileInput {
18 /// Creates a new builder-style object to manufacture [`GetInstanceProfileInput`](crate::operation::get_instance_profile::GetInstanceProfileInput).
19 pub fn builder() -> crate::operation::get_instance_profile::builders::GetInstanceProfileInputBuilder {
20 crate::operation::get_instance_profile::builders::GetInstanceProfileInputBuilder::default()
21 }
22}
23
24/// A builder for [`GetInstanceProfileInput`](crate::operation::get_instance_profile::GetInstanceProfileInput).
25#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
26#[non_exhaustive]
27pub struct GetInstanceProfileInputBuilder {
28 pub(crate) instance_profile_name: ::std::option::Option<::std::string::String>,
29}
30impl GetInstanceProfileInputBuilder {
31 /// <p>The name of the instance profile to get information about.</p>
32 /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
33 /// This field is required.
34 pub fn instance_profile_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
35 self.instance_profile_name = ::std::option::Option::Some(input.into());
36 self
37 }
38 /// <p>The name of the instance profile to get information about.</p>
39 /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
40 pub fn set_instance_profile_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
41 self.instance_profile_name = input;
42 self
43 }
44 /// <p>The name of the instance profile to get information about.</p>
45 /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
46 pub fn get_instance_profile_name(&self) -> &::std::option::Option<::std::string::String> {
47 &self.instance_profile_name
48 }
49 /// Consumes the builder and constructs a [`GetInstanceProfileInput`](crate::operation::get_instance_profile::GetInstanceProfileInput).
50 pub fn build(
51 self,
52 ) -> ::std::result::Result<crate::operation::get_instance_profile::GetInstanceProfileInput, ::aws_smithy_types::error::operation::BuildError>
53 {
54 ::std::result::Result::Ok(crate::operation::get_instance_profile::GetInstanceProfileInput {
55 instance_profile_name: self.instance_profile_name,
56 })
57 }
58}