identitytoolkit  v3
idp_config.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-04-06, 12:09:29 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 Identity Toolkit API (identitytoolkit/v3)
24 // Generated from:
25 // Version: v3
26 // Revision: 368
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_IDENTITYTOOLKIT_API_IDP_CONFIG_H_
31 #define GOOGLE_IDENTITYTOOLKIT_API_IDP_CONFIG_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 namespace Json {
40 class Value;
41 } // namespace Json
42 
44 using namespace googleapis;
45 
51 class IdpConfig : public client::JsonCppData {
52  public:
58  static IdpConfig* New();
59 
65  explicit IdpConfig(const Json::Value& storage);
66 
72  explicit IdpConfig(Json::Value* storage);
73 
77  virtual ~IdpConfig();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_identitytoolkit_api::IdpConfig");
86  }
87 
93  bool has_client_id() const {
94  return Storage().isMember("clientId");
95  }
96 
101  MutableStorage()->removeMember("clientId");
102  }
103 
104 
108  const StringPiece get_client_id() const {
109  const Json::Value& v = Storage("clientId");
110  if (v == Json::Value::null) return StringPiece("");
111  return StringPiece(v.asCString());
112  }
113 
121  void set_client_id(const StringPiece& value) {
122  *MutableStorage("clientId") = value.data();
123  }
124 
130  bool has_enabled() const {
131  return Storage().isMember("enabled");
132  }
133 
137  void clear_enabled() {
138  MutableStorage()->removeMember("enabled");
139  }
140 
141 
145  bool get_enabled() const {
146  const Json::Value& storage = Storage("enabled");
147  return client::JsonValueToCppValueHelper<bool >(storage);
148  }
149 
157  void set_enabled(bool value) {
158  client::SetJsonValueFromCppValueHelper<bool >(
159  value, MutableStorage("enabled"));
160  }
161 
167  bool has_experiment_percent() const {
168  return Storage().isMember("experimentPercent");
169  }
170 
175  MutableStorage()->removeMember("experimentPercent");
176  }
177 
178 
182  int32 get_experiment_percent() const {
183  const Json::Value& storage = Storage("experimentPercent");
184  return client::JsonValueToCppValueHelper<int32 >(storage);
185  }
186 
195  void set_experiment_percent(int32 value) {
196  client::SetJsonValueFromCppValueHelper<int32 >(
197  value, MutableStorage("experimentPercent"));
198  }
199 
205  bool has_provider() const {
206  return Storage().isMember("provider");
207  }
208 
212  void clear_provider() {
213  MutableStorage()->removeMember("provider");
214  }
215 
216 
220  const StringPiece get_provider() const {
221  const Json::Value& v = Storage("provider");
222  if (v == Json::Value::null) return StringPiece("");
223  return StringPiece(v.asCString());
224  }
225 
233  void set_provider(const StringPiece& value) {
234  *MutableStorage("provider") = value.data();
235  }
236 
242  bool has_secret() const {
243  return Storage().isMember("secret");
244  }
245 
249  void clear_secret() {
250  MutableStorage()->removeMember("secret");
251  }
252 
253 
257  const StringPiece get_secret() const {
258  const Json::Value& v = Storage("secret");
259  if (v == Json::Value::null) return StringPiece("");
260  return StringPiece(v.asCString());
261  }
262 
270  void set_secret(const StringPiece& value) {
271  *MutableStorage("secret") = value.data();
272  }
273 
280  return Storage().isMember("whitelistedAudiences");
281  }
282 
287  MutableStorage()->removeMember("whitelistedAudiences");
288  }
289 
290 
295  const client::JsonCppArray<string > get_whitelisted_audiences() const {
296  const Json::Value& storage = Storage("whitelistedAudiences");
297  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
298  }
299 
308  client::JsonCppArray<string > mutable_whitelistedAudiences() {
309  Json::Value* storage = MutableStorage("whitelistedAudiences");
310  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
311  }
312 
313  private:
314  void operator=(const IdpConfig&);
315 }; // IdpConfig
316 } // namespace google_identitytoolkit_api
317 #endif // GOOGLE_IDENTITYTOOLKIT_API_IDP_CONFIG_H_
const StringPiece get_provider() const
Definition: idp_config.h:220
void clear_client_id()
Definition: idp_config.h:100
void set_enabled(bool value)
Definition: idp_config.h:157
void clear_secret()
Definition: idp_config.h:249
bool has_experiment_percent() const
Definition: idp_config.h:167
bool get_enabled() const
Definition: idp_config.h:145
void set_client_id(const StringPiece &value)
Definition: idp_config.h:121
Definition: create_auth_uri_response.cc:40
void set_experiment_percent(int32 value)
Definition: idp_config.h:195
int32 get_experiment_percent() const
Definition: idp_config.h:182
const client::JsonCppArray< string > get_whitelisted_audiences() const
Definition: idp_config.h:295
const StringPiece GetTypeName() const
Definition: idp_config.h:84
void clear_provider()
Definition: idp_config.h:212
const StringPiece get_secret() const
Definition: idp_config.h:257
Definition: idp_config.h:51
bool has_provider() const
Definition: idp_config.h:205
const StringPiece get_client_id() const
Definition: idp_config.h:108
void clear_experiment_percent()
Definition: idp_config.h:174
client::JsonCppArray< string > mutable_whitelistedAudiences()
Definition: idp_config.h:308
bool has_client_id() const
Definition: idp_config.h:93
bool has_whitelisted_audiences() const
Definition: idp_config.h:279
Definition: create_auth_uri_response.h:38
void clear_whitelisted_audiences()
Definition: idp_config.h:286
void set_secret(const StringPiece &value)
Definition: idp_config.h:270
void clear_enabled()
Definition: idp_config.h:137
bool has_enabled() const
Definition: idp_config.h:130
bool has_secret() const
Definition: idp_config.h:242
void set_provider(const StringPiece &value)
Definition: idp_config.h:233