licensing  v1
license_assignment.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-01-30, 01:47:43 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Licensing API (licensing/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 62
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_LICENSING_API_LICENSE_ASSIGNMENT_H_
31 #define GOOGLE_LICENSING_API_LICENSE_ASSIGNMENT_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_licensing_api {
43 using namespace googleapis;
44 
50 class LicenseAssignment : public client::JsonCppData {
51  public:
57  static LicenseAssignment* New();
58 
64  explicit LicenseAssignment(const Json::Value& storage);
65 
71  explicit LicenseAssignment(Json::Value* storage);
72 
76  virtual ~LicenseAssignment();
77 
83  const StringPiece GetTypeName() const {
84  return StringPiece("google_licensing_api::LicenseAssignment");
85  }
86 
92  bool has_etags() const {
93  return Storage().isMember("etags");
94  }
95 
99  void clear_etags() {
100  MutableStorage()->removeMember("etags");
101  }
102 
103 
107  const StringPiece get_etags() const {
108  const Json::Value& v = Storage("etags");
109  if (v == Json::Value::null) return StringPiece("");
110  return StringPiece(v.asCString());
111  }
112 
120  void set_etags(const StringPiece& value) {
121  *MutableStorage("etags") = value.data();
122  }
123 
129  bool has_kind() const {
130  return Storage().isMember("kind");
131  }
132 
136  void clear_kind() {
137  MutableStorage()->removeMember("kind");
138  }
139 
140 
144  const StringPiece get_kind() const {
145  const Json::Value& v = Storage("kind");
146  if (v == Json::Value::null) return StringPiece("");
147  return StringPiece(v.asCString());
148  }
149 
157  void set_kind(const StringPiece& value) {
158  *MutableStorage("kind") = value.data();
159  }
160 
166  bool has_product_id() const {
167  return Storage().isMember("productId");
168  }
169 
174  MutableStorage()->removeMember("productId");
175  }
176 
177 
181  const StringPiece get_product_id() const {
182  const Json::Value& v = Storage("productId");
183  if (v == Json::Value::null) return StringPiece("");
184  return StringPiece(v.asCString());
185  }
186 
195  void set_product_id(const StringPiece& value) {
196  *MutableStorage("productId") = value.data();
197  }
198 
204  bool has_product_name() const {
205  return Storage().isMember("productName");
206  }
207 
212  MutableStorage()->removeMember("productName");
213  }
214 
215 
219  const StringPiece get_product_name() const {
220  const Json::Value& v = Storage("productName");
221  if (v == Json::Value::null) return StringPiece("");
222  return StringPiece(v.asCString());
223  }
224 
232  void set_product_name(const StringPiece& value) {
233  *MutableStorage("productName") = value.data();
234  }
235 
241  bool has_self_link() const {
242  return Storage().isMember("selfLink");
243  }
244 
249  MutableStorage()->removeMember("selfLink");
250  }
251 
252 
256  const StringPiece get_self_link() const {
257  const Json::Value& v = Storage("selfLink");
258  if (v == Json::Value::null) return StringPiece("");
259  return StringPiece(v.asCString());
260  }
261 
269  void set_self_link(const StringPiece& value) {
270  *MutableStorage("selfLink") = value.data();
271  }
272 
278  bool has_sku_id() const {
279  return Storage().isMember("skuId");
280  }
281 
285  void clear_sku_id() {
286  MutableStorage()->removeMember("skuId");
287  }
288 
289 
293  const StringPiece get_sku_id() const {
294  const Json::Value& v = Storage("skuId");
295  if (v == Json::Value::null) return StringPiece("");
296  return StringPiece(v.asCString());
297  }
298 
307  void set_sku_id(const StringPiece& value) {
308  *MutableStorage("skuId") = value.data();
309  }
310 
316  bool has_sku_name() const {
317  return Storage().isMember("skuName");
318  }
319 
323  void clear_sku_name() {
324  MutableStorage()->removeMember("skuName");
325  }
326 
327 
331  const StringPiece get_sku_name() const {
332  const Json::Value& v = Storage("skuName");
333  if (v == Json::Value::null) return StringPiece("");
334  return StringPiece(v.asCString());
335  }
336 
344  void set_sku_name(const StringPiece& value) {
345  *MutableStorage("skuName") = value.data();
346  }
347 
353  bool has_user_id() const {
354  return Storage().isMember("userId");
355  }
356 
360  void clear_user_id() {
361  MutableStorage()->removeMember("userId");
362  }
363 
364 
368  const StringPiece get_user_id() const {
369  const Json::Value& v = Storage("userId");
370  if (v == Json::Value::null) return StringPiece("");
371  return StringPiece(v.asCString());
372  }
373 
385  void set_user_id(const StringPiece& value) {
386  *MutableStorage("userId") = value.data();
387  }
388 
389  private:
390  void operator=(const LicenseAssignment&);
391 }; // LicenseAssignment
392 } // namespace google_licensing_api
393 #endif // GOOGLE_LICENSING_API_LICENSE_ASSIGNMENT_H_
const StringPiece get_sku_name() const
Definition: license_assignment.h:331
void set_product_name(const StringPiece &value)
Definition: license_assignment.h:232
void set_user_id(const StringPiece &value)
Definition: license_assignment.h:385
bool has_self_link() const
Definition: license_assignment.h:241
const StringPiece get_user_id() const
Definition: license_assignment.h:368
const StringPiece get_self_link() const
Definition: license_assignment.h:256
void set_self_link(const StringPiece &value)
Definition: license_assignment.h:269
void set_kind(const StringPiece &value)
Definition: license_assignment.h:157
const StringPiece get_etags() const
Definition: license_assignment.h:107
bool has_product_id() const
Definition: license_assignment.h:166
void clear_sku_id()
Definition: license_assignment.h:285
Definition: license_assignment.h:50
const StringPiece GetTypeName() const
Definition: license_assignment.h:83
void clear_sku_name()
Definition: license_assignment.h:323
void clear_kind()
Definition: license_assignment.h:136
const StringPiece get_product_name() const
Definition: license_assignment.h:219
const StringPiece get_product_id() const
Definition: license_assignment.h:181
bool has_product_name() const
Definition: license_assignment.h:204
void clear_product_id()
Definition: license_assignment.h:173
void set_product_id(const StringPiece &value)
Definition: license_assignment.h:195
Definition: license_assignment.h:38
bool has_kind() const
Definition: license_assignment.h:129
bool has_sku_name() const
Definition: license_assignment.h:316
void clear_self_link()
Definition: license_assignment.h:248
void set_sku_name(const StringPiece &value)
Definition: license_assignment.h:344
bool has_user_id() const
Definition: license_assignment.h:353
const StringPiece get_sku_id() const
Definition: license_assignment.h:293
Definition: license_assignment.cc:40
void clear_user_id()
Definition: license_assignment.h:360
void set_sku_id(const StringPiece &value)
Definition: license_assignment.h:307
bool has_sku_id() const
Definition: license_assignment.h:278
void clear_product_name()
Definition: license_assignment.h:211
void set_etags(const StringPiece &value)
Definition: license_assignment.h:120
void clear_etags()
Definition: license_assignment.h:99
const StringPiece get_kind() const
Definition: license_assignment.h:144
bool has_etags() const
Definition: license_assignment.h:92