1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/license-manager/LicenseManager_EXPORTS.h>
8 #include <aws/license-manager/LicenseManagerRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/core/utils/memory/stl/AWSVector.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace LicenseManager
16 {
17 namespace Model
18 {
19 
20   /**
21    */
22   class AWS_LICENSEMANAGER_API GetAccessTokenRequest : public LicenseManagerRequest
23   {
24   public:
25     GetAccessTokenRequest();
26 
27     // Service request name is the Operation name which will send this request out,
28     // each operation should has unique request name, so that we can get operation's name from this request.
29     // Note: this is not true for response, multiple operations may have the same response name,
30     // so we can not get operation's name from response.
GetServiceRequestName()31     inline virtual const char* GetServiceRequestName() const override { return "GetAccessToken"; }
32 
33     Aws::String SerializePayload() const override;
34 
35     Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
36 
37 
38     /**
39      * <p>Refresh token, encoded as a JWT token.</p>
40      */
GetToken()41     inline const Aws::String& GetToken() const{ return m_token; }
42 
43     /**
44      * <p>Refresh token, encoded as a JWT token.</p>
45      */
TokenHasBeenSet()46     inline bool TokenHasBeenSet() const { return m_tokenHasBeenSet; }
47 
48     /**
49      * <p>Refresh token, encoded as a JWT token.</p>
50      */
SetToken(const Aws::String & value)51     inline void SetToken(const Aws::String& value) { m_tokenHasBeenSet = true; m_token = value; }
52 
53     /**
54      * <p>Refresh token, encoded as a JWT token.</p>
55      */
SetToken(Aws::String && value)56     inline void SetToken(Aws::String&& value) { m_tokenHasBeenSet = true; m_token = std::move(value); }
57 
58     /**
59      * <p>Refresh token, encoded as a JWT token.</p>
60      */
SetToken(const char * value)61     inline void SetToken(const char* value) { m_tokenHasBeenSet = true; m_token.assign(value); }
62 
63     /**
64      * <p>Refresh token, encoded as a JWT token.</p>
65      */
WithToken(const Aws::String & value)66     inline GetAccessTokenRequest& WithToken(const Aws::String& value) { SetToken(value); return *this;}
67 
68     /**
69      * <p>Refresh token, encoded as a JWT token.</p>
70      */
WithToken(Aws::String && value)71     inline GetAccessTokenRequest& WithToken(Aws::String&& value) { SetToken(std::move(value)); return *this;}
72 
73     /**
74      * <p>Refresh token, encoded as a JWT token.</p>
75      */
WithToken(const char * value)76     inline GetAccessTokenRequest& WithToken(const char* value) { SetToken(value); return *this;}
77 
78 
79     /**
80      * <p>Token properties to validate against those present in the JWT token.</p>
81      */
GetTokenProperties()82     inline const Aws::Vector<Aws::String>& GetTokenProperties() const{ return m_tokenProperties; }
83 
84     /**
85      * <p>Token properties to validate against those present in the JWT token.</p>
86      */
TokenPropertiesHasBeenSet()87     inline bool TokenPropertiesHasBeenSet() const { return m_tokenPropertiesHasBeenSet; }
88 
89     /**
90      * <p>Token properties to validate against those present in the JWT token.</p>
91      */
SetTokenProperties(const Aws::Vector<Aws::String> & value)92     inline void SetTokenProperties(const Aws::Vector<Aws::String>& value) { m_tokenPropertiesHasBeenSet = true; m_tokenProperties = value; }
93 
94     /**
95      * <p>Token properties to validate against those present in the JWT token.</p>
96      */
SetTokenProperties(Aws::Vector<Aws::String> && value)97     inline void SetTokenProperties(Aws::Vector<Aws::String>&& value) { m_tokenPropertiesHasBeenSet = true; m_tokenProperties = std::move(value); }
98 
99     /**
100      * <p>Token properties to validate against those present in the JWT token.</p>
101      */
WithTokenProperties(const Aws::Vector<Aws::String> & value)102     inline GetAccessTokenRequest& WithTokenProperties(const Aws::Vector<Aws::String>& value) { SetTokenProperties(value); return *this;}
103 
104     /**
105      * <p>Token properties to validate against those present in the JWT token.</p>
106      */
WithTokenProperties(Aws::Vector<Aws::String> && value)107     inline GetAccessTokenRequest& WithTokenProperties(Aws::Vector<Aws::String>&& value) { SetTokenProperties(std::move(value)); return *this;}
108 
109     /**
110      * <p>Token properties to validate against those present in the JWT token.</p>
111      */
AddTokenProperties(const Aws::String & value)112     inline GetAccessTokenRequest& AddTokenProperties(const Aws::String& value) { m_tokenPropertiesHasBeenSet = true; m_tokenProperties.push_back(value); return *this; }
113 
114     /**
115      * <p>Token properties to validate against those present in the JWT token.</p>
116      */
AddTokenProperties(Aws::String && value)117     inline GetAccessTokenRequest& AddTokenProperties(Aws::String&& value) { m_tokenPropertiesHasBeenSet = true; m_tokenProperties.push_back(std::move(value)); return *this; }
118 
119     /**
120      * <p>Token properties to validate against those present in the JWT token.</p>
121      */
AddTokenProperties(const char * value)122     inline GetAccessTokenRequest& AddTokenProperties(const char* value) { m_tokenPropertiesHasBeenSet = true; m_tokenProperties.push_back(value); return *this; }
123 
124   private:
125 
126     Aws::String m_token;
127     bool m_tokenHasBeenSet;
128 
129     Aws::Vector<Aws::String> m_tokenProperties;
130     bool m_tokenPropertiesHasBeenSet;
131   };
132 
133 } // namespace Model
134 } // namespace LicenseManager
135 } // namespace Aws
136