aws_sdk_grafana/operation/disassociate_license/
_disassociate_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 DisassociateLicenseInput {
6    /// <p>The ID of the workspace to remove the Grafana Enterprise license from.</p>
7    pub workspace_id: ::std::option::Option<::std::string::String>,
8    /// <p>The type of license to remove from the workspace.</p>
9    pub license_type: ::std::option::Option<crate::types::LicenseType>,
10}
11impl DisassociateLicenseInput {
12    /// <p>The ID of the workspace to remove the Grafana Enterprise license from.</p>
13    pub fn workspace_id(&self) -> ::std::option::Option<&str> {
14        self.workspace_id.as_deref()
15    }
16    /// <p>The type of license to remove from the workspace.</p>
17    pub fn license_type(&self) -> ::std::option::Option<&crate::types::LicenseType> {
18        self.license_type.as_ref()
19    }
20}
21impl DisassociateLicenseInput {
22    /// Creates a new builder-style object to manufacture [`DisassociateLicenseInput`](crate::operation::disassociate_license::DisassociateLicenseInput).
23    pub fn builder() -> crate::operation::disassociate_license::builders::DisassociateLicenseInputBuilder {
24        crate::operation::disassociate_license::builders::DisassociateLicenseInputBuilder::default()
25    }
26}
27
28/// A builder for [`DisassociateLicenseInput`](crate::operation::disassociate_license::DisassociateLicenseInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DisassociateLicenseInputBuilder {
32    pub(crate) workspace_id: ::std::option::Option<::std::string::String>,
33    pub(crate) license_type: ::std::option::Option<crate::types::LicenseType>,
34}
35impl DisassociateLicenseInputBuilder {
36    /// <p>The ID of the workspace to remove the Grafana Enterprise license from.</p>
37    /// This field is required.
38    pub fn workspace_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.workspace_id = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The ID of the workspace to remove the Grafana Enterprise license from.</p>
43    pub fn set_workspace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.workspace_id = input;
45        self
46    }
47    /// <p>The ID of the workspace to remove the Grafana Enterprise license from.</p>
48    pub fn get_workspace_id(&self) -> &::std::option::Option<::std::string::String> {
49        &self.workspace_id
50    }
51    /// <p>The type of license to remove from the workspace.</p>
52    /// This field is required.
53    pub fn license_type(mut self, input: crate::types::LicenseType) -> Self {
54        self.license_type = ::std::option::Option::Some(input);
55        self
56    }
57    /// <p>The type of license to remove from the workspace.</p>
58    pub fn set_license_type(mut self, input: ::std::option::Option<crate::types::LicenseType>) -> Self {
59        self.license_type = input;
60        self
61    }
62    /// <p>The type of license to remove from the workspace.</p>
63    pub fn get_license_type(&self) -> &::std::option::Option<crate::types::LicenseType> {
64        &self.license_type
65    }
66    /// Consumes the builder and constructs a [`DisassociateLicenseInput`](crate::operation::disassociate_license::DisassociateLicenseInput).
67    pub fn build(
68        self,
69    ) -> ::std::result::Result<crate::operation::disassociate_license::DisassociateLicenseInput, ::aws_smithy_types::error::operation::BuildError>
70    {
71        ::std::result::Result::Ok(crate::operation::disassociate_license::DisassociateLicenseInput {
72            workspace_id: self.workspace_id,
73            license_type: self.license_type,
74        })
75    }
76}