compute  v1
customer_encryption_key.h
1 // Copyright 2010 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 // use this file except in compliance with the License. You may obtain a copy of
5 // the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 // License for the specific language governing permissions and limitations under
13 // the License.
14 
15 // This code was generated by google-apis-code-generator 1.5.1
16 // Build date: 2018-10-08 17:45:39 UTC
17 // on: 2019-05-15, 03:08:54 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Compute Engine API (compute/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 214
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_COMPUTE_API_CUSTOMER_ENCRYPTION_KEY_H_
31 #define GOOGLE_COMPUTE_API_CUSTOMER_ENCRYPTION_KEY_H_
32 
33 #include <string>
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/strings/stringpiece.h"
37 
38 namespace Json {
39 class Value;
40 } // namespace Json
41 
42 namespace google_compute_api {
43 using namespace googleapis;
44 
50 class CustomerEncryptionKey : public client::JsonCppData {
51  public:
57  static CustomerEncryptionKey* New();
58 
64  explicit CustomerEncryptionKey(const Json::Value& storage);
65 
71  explicit CustomerEncryptionKey(Json::Value* storage);
72 
76  virtual ~CustomerEncryptionKey();
77 
83  const StringPiece GetTypeName() const {
84  return StringPiece("google_compute_api::CustomerEncryptionKey");
85  }
86 
92  bool has_kms_key_name() const {
93  return Storage().isMember("kmsKeyName");
94  }
95 
100  MutableStorage()->removeMember("kmsKeyName");
101  }
102 
103 
107  const StringPiece get_kms_key_name() const {
108  const Json::Value& v = Storage("kmsKeyName");
109  if (v == Json::Value::null) return StringPiece("");
110  return StringPiece(v.asCString());
111  }
112 
120  void set_kms_key_name(const StringPiece& value) {
121  *MutableStorage("kmsKeyName") = value.data();
122  }
123 
129  bool has_raw_key() const {
130  return Storage().isMember("rawKey");
131  }
132 
136  void clear_raw_key() {
137  MutableStorage()->removeMember("rawKey");
138  }
139 
140 
144  const StringPiece get_raw_key() const {
145  const Json::Value& v = Storage("rawKey");
146  if (v == Json::Value::null) return StringPiece("");
147  return StringPiece(v.asCString());
148  }
149 
158  void set_raw_key(const StringPiece& value) {
159  *MutableStorage("rawKey") = value.data();
160  }
161 
167  bool has_sha256() const {
168  return Storage().isMember("sha256");
169  }
170 
174  void clear_sha256() {
175  MutableStorage()->removeMember("sha256");
176  }
177 
178 
182  const StringPiece get_sha256() const {
183  const Json::Value& v = Storage("sha256");
184  if (v == Json::Value::null) return StringPiece("");
185  return StringPiece(v.asCString());
186  }
187 
196  void set_sha256(const StringPiece& value) {
197  *MutableStorage("sha256") = value.data();
198  }
199 
200  private:
201  void operator=(const CustomerEncryptionKey&);
202 }; // CustomerEncryptionKey
203 } // namespace google_compute_api
204 #endif // GOOGLE_COMPUTE_API_CUSTOMER_ENCRYPTION_KEY_H_
const StringPiece GetTypeName() const
Definition: customer_encryption_key.h:83
void clear_raw_key()
Definition: customer_encryption_key.h:136
bool has_kms_key_name() const
Definition: customer_encryption_key.h:92
void clear_sha256()
Definition: customer_encryption_key.h:174
void set_kms_key_name(const StringPiece &value)
Definition: customer_encryption_key.h:120
Definition: customer_encryption_key.h:50
void set_raw_key(const StringPiece &value)
Definition: customer_encryption_key.h:158
const StringPiece get_sha256() const
Definition: customer_encryption_key.h:182
void set_sha256(const StringPiece &value)
Definition: customer_encryption_key.h:196
Definition: accelerator_config.h:39
bool has_sha256() const
Definition: customer_encryption_key.h:167
Definition: accelerator_config.cc:41
const StringPiece get_kms_key_name() const
Definition: customer_encryption_key.h:107
const StringPiece get_raw_key() const
Definition: customer_encryption_key.h:144
void clear_kms_key_name()
Definition: customer_encryption_key.h:99
bool has_raw_key() const
Definition: customer_encryption_key.h:129