compute  v1
backend_service_cdn_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_BACKEND_SERVICE_CDN_POLICY_H_
31 #define GOOGLE_COMPUTE_API_BACKEND_SERVICE_CDN_POLICY_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 #include "google/compute_api/cache_key_policy.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_compute_api {
46 using namespace googleapis;
47 
53 class BackendServiceCdnPolicy : public client::JsonCppData {
54  public:
60  static BackendServiceCdnPolicy* New();
61 
67  explicit BackendServiceCdnPolicy(const Json::Value& storage);
68 
74  explicit BackendServiceCdnPolicy(Json::Value* storage);
75 
79  virtual ~BackendServiceCdnPolicy();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_compute_api::BackendServiceCdnPolicy");
88  }
89 
95  bool has_cache_key_policy() const {
96  return Storage().isMember("cacheKeyPolicy");
97  }
98 
103  MutableStorage()->removeMember("cacheKeyPolicy");
104  }
105 
106 
111  const CacheKeyPolicy get_cache_key_policy() const;
112 
121  CacheKeyPolicy mutable_cacheKeyPolicy();
122 
130  return Storage().isMember("signedUrlCacheMaxAgeSec");
131  }
132 
137  MutableStorage()->removeMember("signedUrlCacheMaxAgeSec");
138  }
139 
140 
145  const Json::Value& storage = Storage("signedUrlCacheMaxAgeSec");
146  return client::JsonValueToCppValueHelper<int64 >(storage);
147  }
148 
163  client::SetJsonValueFromCppValueHelper<int64 >(
164  value, MutableStorage("signedUrlCacheMaxAgeSec"));
165  }
166 
173  return Storage().isMember("signedUrlKeyNames");
174  }
175 
180  MutableStorage()->removeMember("signedUrlKeyNames");
181  }
182 
183 
188  const client::JsonCppArray<string > get_signed_url_key_names() const {
189  const Json::Value& storage = Storage("signedUrlKeyNames");
190  return client::JsonValueToCppValueHelper<client::JsonCppArray<string > >(storage);
191  }
192 
201  client::JsonCppArray<string > mutable_signedUrlKeyNames() {
202  Json::Value* storage = MutableStorage("signedUrlKeyNames");
203  return client::JsonValueToMutableCppValueHelper<client::JsonCppArray<string > >(storage);
204  }
205 
206  private:
207  void operator=(const BackendServiceCdnPolicy&);
208 }; // BackendServiceCdnPolicy
209 } // namespace google_compute_api
210 #endif // GOOGLE_COMPUTE_API_BACKEND_SERVICE_CDN_POLICY_H_
void set_signed_url_cache_max_age_sec(int64 value)
Definition: backend_service_cdn_policy.h:162
int64 get_signed_url_cache_max_age_sec() const
Definition: backend_service_cdn_policy.h:144
void clear_cache_key_policy()
Definition: backend_service_cdn_policy.h:102
client::JsonCppArray< string > mutable_signedUrlKeyNames()
Definition: backend_service_cdn_policy.h:201
bool has_cache_key_policy() const
Definition: backend_service_cdn_policy.h:95
Definition: accelerator_config.h:39
const client::JsonCppArray< string > get_signed_url_key_names() const
Definition: backend_service_cdn_policy.h:188
const StringPiece GetTypeName() const
Definition: backend_service_cdn_policy.h:86
bool has_signed_url_cache_max_age_sec() const
Definition: backend_service_cdn_policy.h:129
Definition: backend_service_cdn_policy.h:53
Definition: cache_key_policy.h:51
void clear_signed_url_cache_max_age_sec()
Definition: backend_service_cdn_policy.h:136
Definition: accelerator_config.cc:41
void clear_signed_url_key_names()
Definition: backend_service_cdn_policy.h:179
bool has_signed_url_key_names() const
Definition: backend_service_cdn_policy.h:172