AWS SDK for C++  0.14.3
AWS SDK for C++
CreateGrantRequest.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/kms/KMS_EXPORTS.h>
17 #include <aws/kms/KMSRequest.h>
22 
23 namespace Aws
24 {
25 namespace KMS
26 {
27 namespace Model
28 {
29 
33  {
34  public:
36  Aws::String SerializePayload() const override;
37 
38  Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
39 
48  inline const Aws::String& GetKeyId() const{ return m_keyId; }
49 
58  inline void SetKeyId(const Aws::String& value) { m_keyIdHasBeenSet = true; m_keyId = value; }
59 
68  inline void SetKeyId(Aws::String&& value) { m_keyIdHasBeenSet = true; m_keyId = value; }
69 
78  inline void SetKeyId(const char* value) { m_keyIdHasBeenSet = true; m_keyId.assign(value); }
79 
88  inline CreateGrantRequest& WithKeyId(const Aws::String& value) { SetKeyId(value); return *this;}
89 
98  inline CreateGrantRequest& WithKeyId(Aws::String&& value) { SetKeyId(value); return *this;}
99 
108  inline CreateGrantRequest& WithKeyId(const char* value) { SetKeyId(value); return *this;}
109 
121  inline const Aws::String& GetGranteePrincipal() const{ return m_granteePrincipal; }
122 
134  inline void SetGranteePrincipal(const Aws::String& value) { m_granteePrincipalHasBeenSet = true; m_granteePrincipal = value; }
135 
147  inline void SetGranteePrincipal(Aws::String&& value) { m_granteePrincipalHasBeenSet = true; m_granteePrincipal = value; }
148 
160  inline void SetGranteePrincipal(const char* value) { m_granteePrincipalHasBeenSet = true; m_granteePrincipal.assign(value); }
161 
173  inline CreateGrantRequest& WithGranteePrincipal(const Aws::String& value) { SetGranteePrincipal(value); return *this;}
174 
186  inline CreateGrantRequest& WithGranteePrincipal(Aws::String&& value) { SetGranteePrincipal(value); return *this;}
187 
199  inline CreateGrantRequest& WithGranteePrincipal(const char* value) { SetGranteePrincipal(value); return *this;}
200 
212  inline const Aws::String& GetRetiringPrincipal() const{ return m_retiringPrincipal; }
213 
225  inline void SetRetiringPrincipal(const Aws::String& value) { m_retiringPrincipalHasBeenSet = true; m_retiringPrincipal = value; }
226 
238  inline void SetRetiringPrincipal(Aws::String&& value) { m_retiringPrincipalHasBeenSet = true; m_retiringPrincipal = value; }
239 
251  inline void SetRetiringPrincipal(const char* value) { m_retiringPrincipalHasBeenSet = true; m_retiringPrincipal.assign(value); }
252 
264  inline CreateGrantRequest& WithRetiringPrincipal(const Aws::String& value) { SetRetiringPrincipal(value); return *this;}
265 
277  inline CreateGrantRequest& WithRetiringPrincipal(Aws::String&& value) { SetRetiringPrincipal(value); return *this;}
278 
290  inline CreateGrantRequest& WithRetiringPrincipal(const char* value) { SetRetiringPrincipal(value); return *this;}
291 
304  inline const Aws::Vector<GrantOperation>& GetOperations() const{ return m_operations; }
305 
318  inline void SetOperations(const Aws::Vector<GrantOperation>& value) { m_operationsHasBeenSet = true; m_operations = value; }
319 
332  inline void SetOperations(Aws::Vector<GrantOperation>&& value) { m_operationsHasBeenSet = true; m_operations = value; }
333 
346  inline CreateGrantRequest& WithOperations(const Aws::Vector<GrantOperation>& value) { SetOperations(value); return *this;}
347 
360  inline CreateGrantRequest& WithOperations(Aws::Vector<GrantOperation>&& value) { SetOperations(value); return *this;}
361 
374  inline CreateGrantRequest& AddOperations(const GrantOperation& value) { m_operationsHasBeenSet = true; m_operations.push_back(value); return *this; }
375 
388  inline CreateGrantRequest& AddOperations(GrantOperation&& value) { m_operationsHasBeenSet = true; m_operations.push_back(value); return *this; }
389 
398  inline const GrantConstraints& GetConstraints() const{ return m_constraints; }
399 
408  inline void SetConstraints(const GrantConstraints& value) { m_constraintsHasBeenSet = true; m_constraints = value; }
409 
418  inline void SetConstraints(GrantConstraints&& value) { m_constraintsHasBeenSet = true; m_constraints = value; }
419 
428  inline CreateGrantRequest& WithConstraints(const GrantConstraints& value) { SetConstraints(value); return *this;}
429 
438  inline CreateGrantRequest& WithConstraints(GrantConstraints&& value) { SetConstraints(value); return *this;}
439 
445  inline const Aws::Vector<Aws::String>& GetGrantTokens() const{ return m_grantTokens; }
446 
452  inline void SetGrantTokens(const Aws::Vector<Aws::String>& value) { m_grantTokensHasBeenSet = true; m_grantTokens = value; }
453 
459  inline void SetGrantTokens(Aws::Vector<Aws::String>&& value) { m_grantTokensHasBeenSet = true; m_grantTokens = value; }
460 
466  inline CreateGrantRequest& WithGrantTokens(const Aws::Vector<Aws::String>& value) { SetGrantTokens(value); return *this;}
467 
473  inline CreateGrantRequest& WithGrantTokens(Aws::Vector<Aws::String>&& value) { SetGrantTokens(value); return *this;}
474 
480  inline CreateGrantRequest& AddGrantTokens(const Aws::String& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
481 
487  inline CreateGrantRequest& AddGrantTokens(Aws::String&& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
488 
494  inline CreateGrantRequest& AddGrantTokens(const char* value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
495 
509  inline const Aws::String& GetName() const{ return m_name; }
510 
524  inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
525 
539  inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = value; }
540 
554  inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
555 
569  inline CreateGrantRequest& WithName(const Aws::String& value) { SetName(value); return *this;}
570 
584  inline CreateGrantRequest& WithName(Aws::String&& value) { SetName(value); return *this;}
585 
599  inline CreateGrantRequest& WithName(const char* value) { SetName(value); return *this;}
600 
601  private:
602  Aws::String m_keyId;
603  bool m_keyIdHasBeenSet;
604  Aws::String m_granteePrincipal;
605  bool m_granteePrincipalHasBeenSet;
606  Aws::String m_retiringPrincipal;
607  bool m_retiringPrincipalHasBeenSet;
608  Aws::Vector<GrantOperation> m_operations;
609  bool m_operationsHasBeenSet;
610  GrantConstraints m_constraints;
611  bool m_constraintsHasBeenSet;
612  Aws::Vector<Aws::String> m_grantTokens;
613  bool m_grantTokensHasBeenSet;
614  Aws::String m_name;
615  bool m_nameHasBeenSet;
616  };
617 
618 } // namespace Model
619 } // namespace KMS
620 } // namespace Aws
CreateGrantRequest & WithGranteePrincipal(const Aws::String &value)
const GrantConstraints & GetConstraints() const
CreateGrantRequest & WithConstraints(const GrantConstraints &value)
CreateGrantRequest & WithRetiringPrincipal(const char *value)
CreateGrantRequest & WithGranteePrincipal(const char *value)
const Aws::String & GetGranteePrincipal() const
void SetGrantTokens(const Aws::Vector< Aws::String > &value)
CreateGrantRequest & AddOperations(const GrantOperation &value)
CreateGrantRequest & WithGrantTokens(const Aws::Vector< Aws::String > &value)
void SetKeyId(Aws::String &&value)
void SetName(const Aws::String &value)
void SetRetiringPrincipal(const Aws::String &value)
const Aws::Vector< GrantOperation > & GetOperations() const
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
CreateGrantRequest & WithKeyId(const Aws::String &value)
CreateGrantRequest & WithRetiringPrincipal(const Aws::String &value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:63
CreateGrantRequest & AddGrantTokens(Aws::String &&value)
void SetConstraints(const GrantConstraints &value)
const Aws::String & GetKeyId() const
CreateGrantRequest & WithName(const Aws::String &value)
const Aws::Vector< Aws::String > & GetGrantTokens() const
void SetOperations(Aws::Vector< GrantOperation > &&value)
CreateGrantRequest & AddGrantTokens(const char *value)
void SetKeyId(const Aws::String &value)
CreateGrantRequest & WithGrantTokens(Aws::Vector< Aws::String > &&value)
void SetGrantTokens(Aws::Vector< Aws::String > &&value)
CreateGrantRequest & WithRetiringPrincipal(Aws::String &&value)
CreateGrantRequest & WithOperations(Aws::Vector< GrantOperation > &&value)
CreateGrantRequest & WithOperations(const Aws::Vector< GrantOperation > &value)
void SetGranteePrincipal(const Aws::String &value)
CreateGrantRequest & AddGrantTokens(const Aws::String &value)
const Aws::String & GetName() const
CreateGrantRequest & WithName(const char *value)
const Aws::String & GetRetiringPrincipal() const
CreateGrantRequest & WithConstraints(GrantConstraints &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetOperations(const Aws::Vector< GrantOperation > &value)
CreateGrantRequest & WithKeyId(const char *value)
void SetRetiringPrincipal(Aws::String &&value)
void SetGranteePrincipal(const char *value)
CreateGrantRequest & WithKeyId(Aws::String &&value)
void SetConstraints(GrantConstraints &&value)
#define AWS_KMS_API
Definition: KMS_EXPORTS.h:37
CreateGrantRequest & WithGranteePrincipal(Aws::String &&value)
CreateGrantRequest & WithName(Aws::String &&value)
void SetRetiringPrincipal(const char *value)
void SetGranteePrincipal(Aws::String &&value)
CreateGrantRequest & AddOperations(GrantOperation &&value)
JSON (JavaScript Object Notation).