compute  v1
cache_key_policy.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: 2019-04-20, 05:56:52 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // Compute Engine API (compute/v1)
24 // Generated from:
25 // Version: v1
26 // Revision: 213
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_COMPUTE_API_CACHE_KEY_POLICY_H_
31 #define GOOGLE_COMPUTE_API_CACHE_KEY_POLICY_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 
42 namespace google_compute_api {
43 using namespace googleapis;
44 
51 class CacheKeyPolicy : public client::JsonCppData {
52  public:
58  static CacheKeyPolicy* New();
59 
65  explicit CacheKeyPolicy(const Json::Value& storage);
66 
72  explicit CacheKeyPolicy(Json::Value* storage);
73 
77  virtual ~CacheKeyPolicy();
78 
84  const StringPiece GetTypeName() const {
85  return StringPiece("google_compute_api::CacheKeyPolicy");
86  }
87 
93  bool has_include_host() const {
94  return Storage().isMember("includeHost");
95  }
96 
101  MutableStorage()->removeMember("includeHost");
102  }
103 
104 
108  bool get_include_host() const {
109  const Json::Value& storage = Storage("includeHost");
110  return client::JsonValueToCppValueHelper<bool >(storage);
111  }
112 
120  void set_include_host(bool value) {
121  client::SetJsonValueFromCppValueHelper<bool >(
122  value, MutableStorage("includeHost"));
123  }
124 
130  bool has_include_protocol() const {
131  return Storage().isMember("includeProtocol");
132  }
133 
138  MutableStorage()->removeMember("includeProtocol");
139  }
140 
141 
145  bool get_include_protocol() const {
146  const Json::Value& storage = Storage("includeProtocol");
147  return client::JsonValueToCppValueHelper<bool >(storage);
148  }
149 
157  void set_include_protocol(bool value) {
158  client::SetJsonValueFromCppValueHelper<bool >(
159  value, MutableStorage("includeProtocol"));
160  }
161 
168  return Storage().isMember("includeQueryString");
169  }
170 
175  MutableStorage()->removeMember("includeQueryString");
176  }
177 
178 
183  const Json::Value& storage = Storage("includeQueryString");
184  return client::JsonValueToCppValueHelper<bool >(storage);
185  }
186 
197  void set_include_query_string(bool value) {
198  client::SetJsonValueFromCppValueHelper<bool >(
199  value, MutableStorage("includeQueryString"));
200  }
201 
208  return Storage().isMember("queryStringBlacklist");
209  }
210 
215  MutableStorage()->removeMember("queryStringBlacklist");
216  }
217 
218 
223  const client::JsonCppArray<string > get_query_string_blacklist() const {
224  const Json::Value& storage = Storage("queryStringBlacklist");
225  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
226  }
227 
239  client::JsonCppArray<string > mutable_queryStringBlacklist() {
240  Json::Value* storage = MutableStorage("queryStringBlacklist");
241  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
242  }
243 
250  return Storage().isMember("queryStringWhitelist");
251  }
252 
257  MutableStorage()->removeMember("queryStringWhitelist");
258  }
259 
260 
265  const client::JsonCppArray<string > get_query_string_whitelist() const {
266  const Json::Value& storage = Storage("queryStringWhitelist");
267  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
268  }
269 
281  client::JsonCppArray<string > mutable_queryStringWhitelist() {
282  Json::Value* storage = MutableStorage("queryStringWhitelist");
283  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
284  }
285 
286  private:
287  void operator=(const CacheKeyPolicy&);
288 }; // CacheKeyPolicy
289 } // namespace google_compute_api
290 #endif // GOOGLE_COMPUTE_API_CACHE_KEY_POLICY_H_
bool get_include_protocol() const
Definition: cache_key_policy.h:145
bool has_include_protocol() const
Definition: cache_key_policy.h:130
bool has_query_string_whitelist() const
Definition: cache_key_policy.h:249
const client::JsonCppArray< string > get_query_string_blacklist() const
Definition: cache_key_policy.h:223
void clear_query_string_whitelist()
Definition: cache_key_policy.h:256
client::JsonCppArray< string > mutable_queryStringBlacklist()
Definition: cache_key_policy.h:239
bool get_include_query_string() const
Definition: cache_key_policy.h:182
const StringPiece GetTypeName() const
Definition: cache_key_policy.h:84
void set_include_host(bool value)
Definition: cache_key_policy.h:120
bool has_query_string_blacklist() const
Definition: cache_key_policy.h:207
Definition: accelerator_config.h:39
void clear_query_string_blacklist()
Definition: cache_key_policy.h:214
bool has_include_query_string() const
Definition: cache_key_policy.h:167
void set_include_query_string(bool value)
Definition: cache_key_policy.h:197
Definition: cache_key_policy.h:51
Definition: accelerator_config.cc:41
void set_include_protocol(bool value)
Definition: cache_key_policy.h:157
void clear_include_protocol()
Definition: cache_key_policy.h:137
void clear_include_query_string()
Definition: cache_key_policy.h:174
bool get_include_host() const
Definition: cache_key_policy.h:108
void clear_include_host()
Definition: cache_key_policy.h:100
client::JsonCppArray< string > mutable_queryStringWhitelist()
Definition: cache_key_policy.h:281
const client::JsonCppArray< string > get_query_string_whitelist() const
Definition: cache_key_policy.h:265
bool has_include_host() const
Definition: cache_key_policy.h:93