storage  v1
hmac_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: 2020-03-14, 18:33:41 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Cloud Storage JSON API (storage/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 171
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_STORAGE_API_HMAC_KEY_H_
31 #define GOOGLE_STORAGE_API_HMAC_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 #include "google/storage_api/hmac_key_metadata.h"
39 
40 namespace Json {
41 class Value;
42 } // namespace Json
43 
44 namespace google_storage_api {
45 using namespace googleapis;
46 
52 class HmacKey : public client::JsonCppData {
53  public:
59  static HmacKey* New();
60 
66  explicit HmacKey(const Json::Value& storage);
67 
73  explicit HmacKey(Json::Value* storage);
74 
78  virtual ~HmacKey();
79 
85  const StringPiece GetTypeName() const {
86  return StringPiece("google_storage_api::HmacKey");
87  }
88 
94  bool has_kind() const {
95  return Storage().isMember("kind");
96  }
97 
101  void clear_kind() {
102  MutableStorage()->removeMember("kind");
103  }
104 
105 
109  const StringPiece get_kind() const {
110  const Json::Value& v = Storage("kind");
111  if (v == Json::Value::null) return StringPiece("");
112  return StringPiece(v.asCString());
113  }
114 
122  void set_kind(const StringPiece& value) {
123  *MutableStorage("kind") = value.data();
124  }
125 
131  bool has_metadata() const {
132  return Storage().isMember("metadata");
133  }
134 
138  void clear_metadata() {
139  MutableStorage()->removeMember("metadata");
140  }
141 
142 
146  const HmacKeyMetadata get_metadata() const;
147 
156  HmacKeyMetadata mutable_metadata();
157 
163  bool has_secret() const {
164  return Storage().isMember("secret");
165  }
166 
170  void clear_secret() {
171  MutableStorage()->removeMember("secret");
172  }
173 
174 
178  const StringPiece get_secret() const {
179  const Json::Value& v = Storage("secret");
180  if (v == Json::Value::null) return StringPiece("");
181  return StringPiece(v.asCString());
182  }
183 
191  void set_secret(const StringPiece& value) {
192  *MutableStorage("secret") = value.data();
193  }
194 
195  private:
196  void operator=(const HmacKey&);
197 }; // HmacKey
198 } // namespace google_storage_api
199 #endif // GOOGLE_STORAGE_API_HMAC_KEY_H_
void clear_kind()
Definition: hmac_key.h:101
Definition: hmac_key.h:52
const StringPiece get_secret() const
Definition: hmac_key.h:178
void clear_metadata()
Definition: hmac_key.h:138
void set_secret(const StringPiece &value)
Definition: hmac_key.h:191
Definition: hmac_key_metadata.h:51
const StringPiece get_kind() const
Definition: hmac_key.h:109
Definition: bucket.h:43
bool has_secret() const
Definition: hmac_key.h:163
void set_kind(const StringPiece &value)
Definition: hmac_key.h:122
Definition: bucket.cc:45
bool has_metadata() const
Definition: hmac_key.h:131
void clear_secret()
Definition: hmac_key.h:170
bool has_kind() const
Definition: hmac_key.h:94
const StringPiece GetTypeName() const
Definition: hmac_key.h:85