androidenterprise  v1
product_permission.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_PRODUCT_PERMISSION_H_
31 #define GOOGLE_ANDROIDENTERPRISE_API_PRODUCT_PERMISSION_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 
43 using namespace googleapis;
44 
55 class ProductPermission : public client::JsonCppData {
56  public:
62  static ProductPermission* New();
63 
69  explicit ProductPermission(const Json::Value& storage);
70 
76  explicit ProductPermission(Json::Value* storage);
77 
81  virtual ~ProductPermission();
82 
88  const StringPiece GetTypeName() const {
89  return StringPiece("google_androidenterprise_api::ProductPermission");
90  }
91 
97  bool has_permission_id() const {
98  return Storage().isMember("permissionId");
99  }
100 
105  MutableStorage()->removeMember("permissionId");
106  }
107 
108 
112  const StringPiece get_permission_id() const {
113  const Json::Value& v = Storage("permissionId");
114  if (v == Json::Value::null) return StringPiece("");
115  return StringPiece(v.asCString());
116  }
117 
125  void set_permission_id(const StringPiece& value) {
126  *MutableStorage("permissionId") = value.data();
127  }
128 
134  bool has_state() const {
135  return Storage().isMember("state");
136  }
137 
141  void clear_state() {
142  MutableStorage()->removeMember("state");
143  }
144 
145 
149  const StringPiece get_state() const {
150  const Json::Value& v = Storage("state");
151  if (v == Json::Value::null) return StringPiece("");
152  return StringPiece(v.asCString());
153  }
154 
162  void set_state(const StringPiece& value) {
163  *MutableStorage("state") = value.data();
164  }
165 
166  private:
167  void operator=(const ProductPermission&);
168 }; // ProductPermission
169 } // namespace google_androidenterprise_api
170 #endif // GOOGLE_ANDROIDENTERPRISE_API_PRODUCT_PERMISSION_H_
bool has_state() const
Definition: product_permission.h:134
void set_state(const StringPiece &value)
Definition: product_permission.h:162
void set_permission_id(const StringPiece &value)
Definition: product_permission.h:125
const StringPiece get_state() const
Definition: product_permission.h:149
Definition: product_permission.h:55
bool has_permission_id() const
Definition: product_permission.h:97
Definition: administrator.h:38
Definition: administrator.cc:40
const StringPiece get_permission_id() const
Definition: product_permission.h:112
void clear_permission_id()
Definition: product_permission.h:104
void clear_state()
Definition: product_permission.h:141
const StringPiece GetTypeName() const
Definition: product_permission.h:88