aws_sdk_licensemanager/operation/get_license/
_get_license_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 GetLicenseInput {
6    /// <p>Amazon Resource Name (ARN) of the license.</p>
7    pub license_arn: ::std::option::Option<::std::string::String>,
8    /// <p>License version.</p>
9    pub version: ::std::option::Option<::std::string::String>,
10}
11impl GetLicenseInput {
12    /// <p>Amazon Resource Name (ARN) of the license.</p>
13    pub fn license_arn(&self) -> ::std::option::Option<&str> {
14        self.license_arn.as_deref()
15    }
16    /// <p>License version.</p>
17    pub fn version(&self) -> ::std::option::Option<&str> {
18        self.version.as_deref()
19    }
20}
21impl GetLicenseInput {
22    /// Creates a new builder-style object to manufacture [`GetLicenseInput`](crate::operation::get_license::GetLicenseInput).
23    pub fn builder() -> crate::operation::get_license::builders::GetLicenseInputBuilder {
24        crate::operation::get_license::builders::GetLicenseInputBuilder::default()
25    }
26}
27
28/// A builder for [`GetLicenseInput`](crate::operation::get_license::GetLicenseInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct GetLicenseInputBuilder {
32    pub(crate) license_arn: ::std::option::Option<::std::string::String>,
33    pub(crate) version: ::std::option::Option<::std::string::String>,
34}
35impl GetLicenseInputBuilder {
36    /// <p>Amazon Resource Name (ARN) of the license.</p>
37    /// This field is required.
38    pub fn license_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.license_arn = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>Amazon Resource Name (ARN) of the license.</p>
43    pub fn set_license_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.license_arn = input;
45        self
46    }
47    /// <p>Amazon Resource Name (ARN) of the license.</p>
48    pub fn get_license_arn(&self) -> &::std::option::Option<::std::string::String> {
49        &self.license_arn
50    }
51    /// <p>License version.</p>
52    pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.version = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>License version.</p>
57    pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.version = input;
59        self
60    }
61    /// <p>License version.</p>
62    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
63        &self.version
64    }
65    /// Consumes the builder and constructs a [`GetLicenseInput`](crate::operation::get_license::GetLicenseInput).
66    pub fn build(self) -> ::std::result::Result<crate::operation::get_license::GetLicenseInput, ::aws_smithy_types::error::operation::BuildError> {
67        ::std::result::Result::Ok(crate::operation::get_license::GetLicenseInput {
68            license_arn: self.license_arn,
69            version: self.version,
70        })
71    }
72}