androidenterprise  v1
web_app.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-02-11, 20:26:36 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Google Play EMM API (androidenterprise/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 218
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_ANDROIDENTERPRISE_API_WEB_APP_H_
31 #define GOOGLE_ANDROIDENTERPRISE_API_WEB_APP_H_
32 
33 #include <string>
34 #include "googleapis/base/integral_types.h"
35 #include "googleapis/base/macros.h"
36 #include "googleapis/client/data/jsoncpp_data.h"
37 #include "googleapis/strings/stringpiece.h"
38 
39 #include "google/androidenterprise_api/web_app_icon.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
46 using namespace googleapis;
47 
55 class WebApp : public client::JsonCppData {
56  public:
62  static WebApp* New();
63 
69  explicit WebApp(const Json::Value& storage);
70 
76  explicit WebApp(Json::Value* storage);
77 
81  virtual ~WebApp();
82 
88  const StringPiece GetTypeName() const {
89  return StringPiece("google_androidenterprise_api::WebApp");
90  }
91 
97  bool has_display_mode() const {
98  return Storage().isMember("displayMode");
99  }
100 
105  MutableStorage()->removeMember("displayMode");
106  }
107 
108 
112  const StringPiece get_display_mode() const {
113  const Json::Value& v = Storage("displayMode");
114  if (v == Json::Value::null) return StringPiece("");
115  return StringPiece(v.asCString());
116  }
117 
136  void set_display_mode(const StringPiece& value) {
137  *MutableStorage("displayMode") = value.data();
138  }
139 
145  bool has_icons() const {
146  return Storage().isMember("icons");
147  }
148 
152  void clear_icons() {
153  MutableStorage()->removeMember("icons");
154  }
155 
156 
160  const client::JsonCppArray<WebAppIcon > get_icons() const;
161 
170  client::JsonCppArray<WebAppIcon > mutable_icons();
171 
177  bool has_is_published() const {
178  return Storage().isMember("isPublished");
179  }
180 
185  MutableStorage()->removeMember("isPublished");
186  }
187 
188 
192  bool get_is_published() const {
193  const Json::Value& storage = Storage("isPublished");
194  return client::JsonValueToCppValueHelper<bool >(storage);
195  }
196 
204  void set_is_published(bool value) {
205  client::SetJsonValueFromCppValueHelper<bool >(
206  value, MutableStorage("isPublished"));
207  }
208 
214  bool has_start_url() const {
215  return Storage().isMember("startUrl");
216  }
217 
222  MutableStorage()->removeMember("startUrl");
223  }
224 
225 
229  const StringPiece get_start_url() const {
230  const Json::Value& v = Storage("startUrl");
231  if (v == Json::Value::null) return StringPiece("");
232  return StringPiece(v.asCString());
233  }
234 
243  void set_start_url(const StringPiece& value) {
244  *MutableStorage("startUrl") = value.data();
245  }
246 
252  bool has_title() const {
253  return Storage().isMember("title");
254  }
255 
259  void clear_title() {
260  MutableStorage()->removeMember("title");
261  }
262 
263 
267  const StringPiece get_title() const {
268  const Json::Value& v = Storage("title");
269  if (v == Json::Value::null) return StringPiece("");
270  return StringPiece(v.asCString());
271  }
272 
281  void set_title(const StringPiece& value) {
282  *MutableStorage("title") = value.data();
283  }
284 
290  bool has_version_code() const {
291  return Storage().isMember("versionCode");
292  }
293 
298  MutableStorage()->removeMember("versionCode");
299  }
300 
301 
305  int64 get_version_code() const {
306  const Json::Value& storage = Storage("versionCode");
307  return client::JsonValueToCppValueHelper<int64 >(storage);
308  }
309 
322  void set_version_code(int64 value) {
323  client::SetJsonValueFromCppValueHelper<int64 >(
324  value, MutableStorage("versionCode"));
325  }
326 
332  bool has_web_app_id() const {
333  return Storage().isMember("webAppId");
334  }
335 
340  MutableStorage()->removeMember("webAppId");
341  }
342 
343 
347  const StringPiece get_web_app_id() const {
348  const Json::Value& v = Storage("webAppId");
349  if (v == Json::Value::null) return StringPiece("");
350  return StringPiece(v.asCString());
351  }
352 
362  void set_web_app_id(const StringPiece& value) {
363  *MutableStorage("webAppId") = value.data();
364  }
365 
366  private:
367  void operator=(const WebApp&);
368 }; // WebApp
369 } // namespace google_androidenterprise_api
370 #endif // GOOGLE_ANDROIDENTERPRISE_API_WEB_APP_H_
bool has_display_mode() const
Definition: web_app.h:97
void clear_display_mode()
Definition: web_app.h:104
void clear_icons()
Definition: web_app.h:152
void set_display_mode(const StringPiece &value)
Definition: web_app.h:136
Definition: web_app.h:55
bool has_icons() const
Definition: web_app.h:145
const StringPiece get_display_mode() const
Definition: web_app.h:112
void clear_version_code()
Definition: web_app.h:297
bool has_title() const
Definition: web_app.h:252
void clear_is_published()
Definition: web_app.h:184
bool get_is_published() const
Definition: web_app.h:192
bool has_is_published() const
Definition: web_app.h:177
void clear_start_url()
Definition: web_app.h:221
bool has_web_app_id() const
Definition: web_app.h:332
void set_version_code(int64 value)
Definition: web_app.h:322
void set_web_app_id(const StringPiece &value)
Definition: web_app.h:362
Definition: administrator.h:38
Definition: administrator.cc:40
const StringPiece get_title() const
Definition: web_app.h:267
void set_is_published(bool value)
Definition: web_app.h:204
void set_title(const StringPiece &value)
Definition: web_app.h:281
bool has_start_url() const
Definition: web_app.h:214
void clear_title()
Definition: web_app.h:259
const StringPiece GetTypeName() const
Definition: web_app.h:88
void set_start_url(const StringPiece &value)
Definition: web_app.h:243
const StringPiece get_web_app_id() const
Definition: web_app.h:347
const StringPiece get_start_url() const
Definition: web_app.h:229
void clear_web_app_id()
Definition: web_app.h:339
bool has_version_code() const
Definition: web_app.h:290
int64 get_version_code() const
Definition: web_app.h:305