androidenterprise  v1
authentication_token.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_AUTHENTICATION_TOKEN_H_
31 #define GOOGLE_ANDROIDENTERPRISE_API_AUTHENTICATION_TOKEN_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 
51 class AuthenticationToken : public client::JsonCppData {
52  public:
58  static AuthenticationToken* New();
59 
65  explicit AuthenticationToken(const Json::Value& storage);
66 
72  explicit AuthenticationToken(Json::Value* storage);
73 
77  virtual ~AuthenticationToken();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_androidenterprise_api::AuthenticationToken");
86  }
87 
93  bool has_kind() const {
94  return Storage().isMember("kind");
95  }
96 
100  void clear_kind() {
101  MutableStorage()->removeMember("kind");
102  }
103 
104 
108  const StringPiece get_kind() const {
109  const Json::Value& v = Storage("kind");
110  if (v == Json::Value::null) return StringPiece("");
111  return StringPiece(v.asCString());
112  }
113 
118  void set_kind(const StringPiece& value) {
119  *MutableStorage("kind") = value.data();
120  }
121 
127  bool has_token() const {
128  return Storage().isMember("token");
129  }
130 
134  void clear_token() {
135  MutableStorage()->removeMember("token");
136  }
137 
138 
142  const StringPiece get_token() const {
143  const Json::Value& v = Storage("token");
144  if (v == Json::Value::null) return StringPiece("");
145  return StringPiece(v.asCString());
146  }
147 
157  void set_token(const StringPiece& value) {
158  *MutableStorage("token") = value.data();
159  }
160 
161  private:
162  void operator=(const AuthenticationToken&);
163 }; // AuthenticationToken
164 } // namespace google_androidenterprise_api
165 #endif // GOOGLE_ANDROIDENTERPRISE_API_AUTHENTICATION_TOKEN_H_
void set_token(const StringPiece &value)
Definition: authentication_token.h:157
bool has_token() const
Definition: authentication_token.h:127
bool has_kind() const
Definition: authentication_token.h:93
const StringPiece get_token() const
Definition: authentication_token.h:142
Definition: authentication_token.h:51
void set_kind(const StringPiece &value)
Definition: authentication_token.h:118
const StringPiece get_kind() const
Definition: authentication_token.h:108
Definition: administrator.h:38
Definition: administrator.cc:40
const StringPiece GetTypeName() const
Definition: authentication_token.h:84
void clear_kind()
Definition: authentication_token.h:100
void clear_token()
Definition: authentication_token.h:134