Skip to main content

aws_sdk_quicksight/operation/get_session_embed_url/
_get_session_embed_url_output.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)]
5pub struct GetSessionEmbedUrlOutput {
6    /// <p>A single-use URL that you can put into your server-side web page to embed your Quick session. This URL is valid for 5 minutes. The API operation provides the URL with an <code>auth_code</code> value that enables one (and only one) sign-on to a user session that is valid for 10 hours.</p>
7    pub embed_url: ::std::option::Option<::std::string::String>,
8    /// <p>The HTTP status of the request.</p>
9    pub status: i32,
10    /// <p>The Amazon Web Services request ID for this operation.</p>
11    pub request_id: ::std::option::Option<::std::string::String>,
12    _request_id: Option<String>,
13}
14impl GetSessionEmbedUrlOutput {
15    /// <p>A single-use URL that you can put into your server-side web page to embed your Quick session. This URL is valid for 5 minutes. The API operation provides the URL with an <code>auth_code</code> value that enables one (and only one) sign-on to a user session that is valid for 10 hours.</p>
16    pub fn embed_url(&self) -> ::std::option::Option<&str> {
17        self.embed_url.as_deref()
18    }
19    /// <p>The HTTP status of the request.</p>
20    pub fn status(&self) -> i32 {
21        self.status
22    }
23    /// <p>The Amazon Web Services request ID for this operation.</p>
24    pub fn request_id(&self) -> ::std::option::Option<&str> {
25        self.request_id.as_deref()
26    }
27}
28impl ::std::fmt::Debug for GetSessionEmbedUrlOutput {
29    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30        let mut formatter = f.debug_struct("GetSessionEmbedUrlOutput");
31        formatter.field("embed_url", &"*** Sensitive Data Redacted ***");
32        formatter.field("status", &self.status);
33        formatter.field("request_id", &self.request_id);
34        formatter.field("_request_id", &self._request_id);
35        formatter.finish()
36    }
37}
38impl ::aws_types::request_id::RequestId for GetSessionEmbedUrlOutput {
39    fn request_id(&self) -> Option<&str> {
40        self._request_id.as_deref()
41    }
42}
43impl GetSessionEmbedUrlOutput {
44    /// Creates a new builder-style object to manufacture [`GetSessionEmbedUrlOutput`](crate::operation::get_session_embed_url::GetSessionEmbedUrlOutput).
45    pub fn builder() -> crate::operation::get_session_embed_url::builders::GetSessionEmbedUrlOutputBuilder {
46        crate::operation::get_session_embed_url::builders::GetSessionEmbedUrlOutputBuilder::default()
47    }
48}
49
50/// A builder for [`GetSessionEmbedUrlOutput`](crate::operation::get_session_embed_url::GetSessionEmbedUrlOutput).
51#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
52#[non_exhaustive]
53pub struct GetSessionEmbedUrlOutputBuilder {
54    pub(crate) embed_url: ::std::option::Option<::std::string::String>,
55    pub(crate) status: ::std::option::Option<i32>,
56    pub(crate) request_id: ::std::option::Option<::std::string::String>,
57    _request_id: Option<String>,
58}
59impl GetSessionEmbedUrlOutputBuilder {
60    /// <p>A single-use URL that you can put into your server-side web page to embed your Quick session. This URL is valid for 5 minutes. The API operation provides the URL with an <code>auth_code</code> value that enables one (and only one) sign-on to a user session that is valid for 10 hours.</p>
61    pub fn embed_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62        self.embed_url = ::std::option::Option::Some(input.into());
63        self
64    }
65    /// <p>A single-use URL that you can put into your server-side web page to embed your Quick session. This URL is valid for 5 minutes. The API operation provides the URL with an <code>auth_code</code> value that enables one (and only one) sign-on to a user session that is valid for 10 hours.</p>
66    pub fn set_embed_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67        self.embed_url = input;
68        self
69    }
70    /// <p>A single-use URL that you can put into your server-side web page to embed your Quick session. This URL is valid for 5 minutes. The API operation provides the URL with an <code>auth_code</code> value that enables one (and only one) sign-on to a user session that is valid for 10 hours.</p>
71    pub fn get_embed_url(&self) -> &::std::option::Option<::std::string::String> {
72        &self.embed_url
73    }
74    /// <p>The HTTP status of the request.</p>
75    pub fn status(mut self, input: i32) -> Self {
76        self.status = ::std::option::Option::Some(input);
77        self
78    }
79    /// <p>The HTTP status of the request.</p>
80    pub fn set_status(mut self, input: ::std::option::Option<i32>) -> Self {
81        self.status = input;
82        self
83    }
84    /// <p>The HTTP status of the request.</p>
85    pub fn get_status(&self) -> &::std::option::Option<i32> {
86        &self.status
87    }
88    /// <p>The Amazon Web Services request ID for this operation.</p>
89    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        self.request_id = ::std::option::Option::Some(input.into());
91        self
92    }
93    /// <p>The Amazon Web Services request ID for this operation.</p>
94    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.request_id = input;
96        self
97    }
98    /// <p>The Amazon Web Services request ID for this operation.</p>
99    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
100        &self.request_id
101    }
102    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
103        self._request_id = Some(request_id.into());
104        self
105    }
106
107    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
108        self._request_id = request_id;
109        self
110    }
111    /// Consumes the builder and constructs a [`GetSessionEmbedUrlOutput`](crate::operation::get_session_embed_url::GetSessionEmbedUrlOutput).
112    pub fn build(self) -> crate::operation::get_session_embed_url::GetSessionEmbedUrlOutput {
113        crate::operation::get_session_embed_url::GetSessionEmbedUrlOutput {
114            embed_url: self.embed_url,
115            status: self.status.unwrap_or_default(),
116            request_id: self.request_id,
117            _request_id: self._request_id,
118        }
119    }
120}
121impl ::std::fmt::Debug for GetSessionEmbedUrlOutputBuilder {
122    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
123        let mut formatter = f.debug_struct("GetSessionEmbedUrlOutputBuilder");
124        formatter.field("embed_url", &"*** Sensitive Data Redacted ***");
125        formatter.field("status", &self.status);
126        formatter.field("request_id", &self.request_id);
127        formatter.field("_request_id", &self._request_id);
128        formatter.finish()
129    }
130}