1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AssociateLicenseInput {
/// <p>The ID of the workspace to associate the license with.</p>
pub workspace_id: ::std::option::Option<::std::string::String>,
/// <p>The type of license to associate with the workspace.</p><note>
/// <p>Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.</p>
/// </note>
pub license_type: ::std::option::Option<crate::types::LicenseType>,
/// <p>A token from Grafana Labs that ties your Amazon Web Services account with a Grafana Labs account. For more information, see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/upgrade-to-Grafana-Enterprise.html#AMG-workspace-register-enterprise">Register with Grafana Labs</a>.</p>
pub grafana_token: ::std::option::Option<::std::string::String>,
}
impl AssociateLicenseInput {
/// <p>The ID of the workspace to associate the license with.</p>
pub fn workspace_id(&self) -> ::std::option::Option<&str> {
self.workspace_id.as_deref()
}
/// <p>The type of license to associate with the workspace.</p><note>
/// <p>Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.</p>
/// </note>
pub fn license_type(&self) -> ::std::option::Option<&crate::types::LicenseType> {
self.license_type.as_ref()
}
/// <p>A token from Grafana Labs that ties your Amazon Web Services account with a Grafana Labs account. For more information, see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/upgrade-to-Grafana-Enterprise.html#AMG-workspace-register-enterprise">Register with Grafana Labs</a>.</p>
pub fn grafana_token(&self) -> ::std::option::Option<&str> {
self.grafana_token.as_deref()
}
}
impl AssociateLicenseInput {
/// Creates a new builder-style object to manufacture [`AssociateLicenseInput`](crate::operation::associate_license::AssociateLicenseInput).
pub fn builder() -> crate::operation::associate_license::builders::AssociateLicenseInputBuilder {
crate::operation::associate_license::builders::AssociateLicenseInputBuilder::default()
}
}
/// A builder for [`AssociateLicenseInput`](crate::operation::associate_license::AssociateLicenseInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AssociateLicenseInputBuilder {
pub(crate) workspace_id: ::std::option::Option<::std::string::String>,
pub(crate) license_type: ::std::option::Option<crate::types::LicenseType>,
pub(crate) grafana_token: ::std::option::Option<::std::string::String>,
}
impl AssociateLicenseInputBuilder {
/// <p>The ID of the workspace to associate the license with.</p>
/// This field is required.
pub fn workspace_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.workspace_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the workspace to associate the license with.</p>
pub fn set_workspace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.workspace_id = input;
self
}
/// <p>The ID of the workspace to associate the license with.</p>
pub fn get_workspace_id(&self) -> &::std::option::Option<::std::string::String> {
&self.workspace_id
}
/// <p>The type of license to associate with the workspace.</p><note>
/// <p>Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.</p>
/// </note>
/// This field is required.
pub fn license_type(mut self, input: crate::types::LicenseType) -> Self {
self.license_type = ::std::option::Option::Some(input);
self
}
/// <p>The type of license to associate with the workspace.</p><note>
/// <p>Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.</p>
/// </note>
pub fn set_license_type(mut self, input: ::std::option::Option<crate::types::LicenseType>) -> Self {
self.license_type = input;
self
}
/// <p>The type of license to associate with the workspace.</p><note>
/// <p>Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.</p>
/// </note>
pub fn get_license_type(&self) -> &::std::option::Option<crate::types::LicenseType> {
&self.license_type
}
/// <p>A token from Grafana Labs that ties your Amazon Web Services account with a Grafana Labs account. For more information, see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/upgrade-to-Grafana-Enterprise.html#AMG-workspace-register-enterprise">Register with Grafana Labs</a>.</p>
pub fn grafana_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.grafana_token = ::std::option::Option::Some(input.into());
self
}
/// <p>A token from Grafana Labs that ties your Amazon Web Services account with a Grafana Labs account. For more information, see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/upgrade-to-Grafana-Enterprise.html#AMG-workspace-register-enterprise">Register with Grafana Labs</a>.</p>
pub fn set_grafana_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.grafana_token = input;
self
}
/// <p>A token from Grafana Labs that ties your Amazon Web Services account with a Grafana Labs account. For more information, see <a href="https://docs.aws.amazon.com/grafana/latest/userguide/upgrade-to-Grafana-Enterprise.html#AMG-workspace-register-enterprise">Register with Grafana Labs</a>.</p>
pub fn get_grafana_token(&self) -> &::std::option::Option<::std::string::String> {
&self.grafana_token
}
/// Consumes the builder and constructs a [`AssociateLicenseInput`](crate::operation::associate_license::AssociateLicenseInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::associate_license::AssociateLicenseInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::associate_license::AssociateLicenseInput {
workspace_id: self.workspace_id,
license_type: self.license_type,
grafana_token: self.grafana_token,
})
}
}