analytics  v3
include_conditions.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, 05:27:32 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 Analytics API (analytics/v3)
24 // Generated from:
25 // Version: v3
26 // Revision: 169
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_ANALYTICS_API_INCLUDE_CONDITIONS_H_
31 #define GOOGLE_ANALYTICS_API_INCLUDE_CONDITIONS_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 
43 namespace google_analytics_api {
44 using namespace googleapis;
45 
51 class IncludeConditions : public client::JsonCppData {
52  public:
58  static IncludeConditions* New();
59 
65  explicit IncludeConditions(const Json::Value& storage);
66 
72  explicit IncludeConditions(Json::Value* storage);
73 
77  virtual ~IncludeConditions();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_analytics_api::IncludeConditions");
86  }
87 
93  bool has_days_to_look_back() const {
94  return Storage().isMember("daysToLookBack");
95  }
96 
101  MutableStorage()->removeMember("daysToLookBack");
102  }
103 
104 
108  int32 get_days_to_look_back() const {
109  const Json::Value& storage = Storage("daysToLookBack");
110  return client::JsonValueToCppValueHelper<int32 >(storage);
111  }
112 
125  void set_days_to_look_back(int32 value) {
126  client::SetJsonValueFromCppValueHelper<int32 >(
127  value, MutableStorage("daysToLookBack"));
128  }
129 
135  bool has_is_smart_list() const {
136  return Storage().isMember("isSmartList");
137  }
138 
143  MutableStorage()->removeMember("isSmartList");
144  }
145 
146 
150  bool get_is_smart_list() const {
151  const Json::Value& storage = Storage("isSmartList");
152  return client::JsonValueToCppValueHelper<bool >(storage);
153  }
154 
163  void set_is_smart_list(bool value) {
164  client::SetJsonValueFromCppValueHelper<bool >(
165  value, MutableStorage("isSmartList"));
166  }
167 
173  bool has_kind() const {
174  return Storage().isMember("kind");
175  }
176 
180  void clear_kind() {
181  MutableStorage()->removeMember("kind");
182  }
183 
184 
188  const StringPiece get_kind() const {
189  const Json::Value& v = Storage("kind");
190  if (v == Json::Value::null) return StringPiece("");
191  return StringPiece(v.asCString());
192  }
193 
201  void set_kind(const StringPiece& value) {
202  *MutableStorage("kind") = value.data();
203  }
204 
212  return Storage().isMember("membershipDurationDays");
213  }
214 
219  MutableStorage()->removeMember("membershipDurationDays");
220  }
221 
222 
227  const Json::Value& storage = Storage("membershipDurationDays");
228  return client::JsonValueToCppValueHelper<int32 >(storage);
229  }
230 
238  void set_membership_duration_days(int32 value) {
239  client::SetJsonValueFromCppValueHelper<int32 >(
240  value, MutableStorage("membershipDurationDays"));
241  }
242 
248  bool has_segment() const {
249  return Storage().isMember("segment");
250  }
251 
255  void clear_segment() {
256  MutableStorage()->removeMember("segment");
257  }
258 
259 
263  const StringPiece get_segment() const {
264  const Json::Value& v = Storage("segment");
265  if (v == Json::Value::null) return StringPiece("");
266  return StringPiece(v.asCString());
267  }
268 
276  void set_segment(const StringPiece& value) {
277  *MutableStorage("segment") = value.data();
278  }
279 
280  private:
281  void operator=(const IncludeConditions&);
282 }; // IncludeConditions
283 } // namespace google_analytics_api
284 #endif // GOOGLE_ANALYTICS_API_INCLUDE_CONDITIONS_H_
const StringPiece get_kind() const
Definition: include_conditions.h:188
bool has_segment() const
Definition: include_conditions.h:248
bool has_is_smart_list() const
Definition: include_conditions.h:135
Definition: include_conditions.h:51
void clear_segment()
Definition: include_conditions.h:255
void clear_is_smart_list()
Definition: include_conditions.h:142
void clear_days_to_look_back()
Definition: include_conditions.h:100
const StringPiece GetTypeName() const
Definition: include_conditions.h:84
int32 get_membership_duration_days() const
Definition: include_conditions.h:226
const StringPiece get_segment() const
Definition: include_conditions.h:263
bool get_is_smart_list() const
Definition: include_conditions.h:150
void set_days_to_look_back(int32 value)
Definition: include_conditions.h:125
void clear_kind()
Definition: include_conditions.h:180
Definition: account.h:39
Definition: account.cc:41
void set_kind(const StringPiece &value)
Definition: include_conditions.h:201
int32 get_days_to_look_back() const
Definition: include_conditions.h:108
bool has_membership_duration_days() const
Definition: include_conditions.h:211
void set_is_smart_list(bool value)
Definition: include_conditions.h:163
void set_membership_duration_days(int32 value)
Definition: include_conditions.h:238
void set_segment(const StringPiece &value)
Definition: include_conditions.h:276
bool has_kind() const
Definition: include_conditions.h:173
bool has_days_to_look_back() const
Definition: include_conditions.h:93
void clear_membership_duration_days()
Definition: include_conditions.h:218