compute  v1
autoscaling_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-05-15, 03:08:54 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: 214
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_COMPUTE_API_AUTOSCALING_POLICY_H_
31 #define GOOGLE_COMPUTE_API_AUTOSCALING_POLICY_H_
32 
33 #include "googleapis/base/integral_types.h"
34 #include "googleapis/base/macros.h"
35 #include "googleapis/client/data/jsoncpp_data.h"
36 #include "googleapis/strings/stringpiece.h"
37 
38 #include "google/compute_api/autoscaling_policy_cpu_utilization.h"
39 #include "google/compute_api/autoscaling_policy_custom_metric_utilization.h"
40 #include "google/compute_api/autoscaling_policy_load_balancing_utilization.h"
41 
42 namespace Json {
43 class Value;
44 } // namespace Json
45 
46 namespace google_compute_api {
47 using namespace googleapis;
48 
54 class AutoscalingPolicy : public client::JsonCppData {
55  public:
61  static AutoscalingPolicy* New();
62 
68  explicit AutoscalingPolicy(const Json::Value& storage);
69 
75  explicit AutoscalingPolicy(Json::Value* storage);
76 
80  virtual ~AutoscalingPolicy();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_compute_api::AutoscalingPolicy");
89  }
90 
96  bool has_cool_down_period_sec() const {
97  return Storage().isMember("coolDownPeriodSec");
98  }
99 
104  MutableStorage()->removeMember("coolDownPeriodSec");
105  }
106 
107 
111  int32 get_cool_down_period_sec() const {
112  const Json::Value& storage = Storage("coolDownPeriodSec");
113  return client::JsonValueToCppValueHelper<int32 >(storage);
114  }
115 
131  void set_cool_down_period_sec(int32 value) {
132  client::SetJsonValueFromCppValueHelper<int32 >(
133  value, MutableStorage("coolDownPeriodSec"));
134  }
135 
141  bool has_cpu_utilization() const {
142  return Storage().isMember("cpuUtilization");
143  }
144 
149  MutableStorage()->removeMember("cpuUtilization");
150  }
151 
152 
157  const AutoscalingPolicyCpuUtilization get_cpu_utilization() const;
158 
168  AutoscalingPolicyCpuUtilization mutable_cpuUtilization();
169 
177  return Storage().isMember("customMetricUtilizations");
178  }
179 
184  MutableStorage()->removeMember("customMetricUtilizations");
185  }
186 
187 
192  const client::JsonCppArray<AutoscalingPolicyCustomMetricUtilization > get_custom_metric_utilizations() const;
193 
202  client::JsonCppArray<AutoscalingPolicyCustomMetricUtilization > mutable_customMetricUtilizations();
203 
211  return Storage().isMember("loadBalancingUtilization");
212  }
213 
218  MutableStorage()->removeMember("loadBalancingUtilization");
219  }
220 
221 
226  const AutoscalingPolicyLoadBalancingUtilization get_load_balancing_utilization() const;
227 
236  AutoscalingPolicyLoadBalancingUtilization mutable_loadBalancingUtilization();
237 
243  bool has_max_num_replicas() const {
244  return Storage().isMember("maxNumReplicas");
245  }
246 
251  MutableStorage()->removeMember("maxNumReplicas");
252  }
253 
254 
258  int32 get_max_num_replicas() const {
259  const Json::Value& storage = Storage("maxNumReplicas");
260  return client::JsonValueToCppValueHelper<int32 >(storage);
261  }
262 
272  void set_max_num_replicas(int32 value) {
273  client::SetJsonValueFromCppValueHelper<int32 >(
274  value, MutableStorage("maxNumReplicas"));
275  }
276 
282  bool has_min_num_replicas() const {
283  return Storage().isMember("minNumReplicas");
284  }
285 
290  MutableStorage()->removeMember("minNumReplicas");
291  }
292 
293 
297  int32 get_min_num_replicas() const {
298  const Json::Value& storage = Storage("minNumReplicas");
299  return client::JsonValueToCppValueHelper<int32 >(storage);
300  }
301 
311  void set_min_num_replicas(int32 value) {
312  client::SetJsonValueFromCppValueHelper<int32 >(
313  value, MutableStorage("minNumReplicas"));
314  }
315 
316  private:
317  void operator=(const AutoscalingPolicy&);
318 }; // AutoscalingPolicy
319 } // namespace google_compute_api
320 #endif // GOOGLE_COMPUTE_API_AUTOSCALING_POLICY_H_
void clear_min_num_replicas()
Definition: autoscaling_policy.h:289
Definition: autoscaling_policy.h:54
Definition: autoscaling_policy_cpu_utilization.h:49
bool has_cool_down_period_sec() const
Definition: autoscaling_policy.h:96
int32 get_max_num_replicas() const
Definition: autoscaling_policy.h:258
void set_max_num_replicas(int32 value)
Definition: autoscaling_policy.h:272
void clear_max_num_replicas()
Definition: autoscaling_policy.h:250
bool has_load_balancing_utilization() const
Definition: autoscaling_policy.h:210
Definition: autoscaling_policy_load_balancing_utilization.h:49
int32 get_cool_down_period_sec() const
Definition: autoscaling_policy.h:111
void clear_load_balancing_utilization()
Definition: autoscaling_policy.h:217
bool has_cpu_utilization() const
Definition: autoscaling_policy.h:141
bool has_min_num_replicas() const
Definition: autoscaling_policy.h:282
void clear_cpu_utilization()
Definition: autoscaling_policy.h:148
void clear_custom_metric_utilizations()
Definition: autoscaling_policy.h:183
bool has_custom_metric_utilizations() const
Definition: autoscaling_policy.h:176
bool has_max_num_replicas() const
Definition: autoscaling_policy.h:243
Definition: accelerator_config.h:39
void set_min_num_replicas(int32 value)
Definition: autoscaling_policy.h:311
Definition: accelerator_config.cc:41
const StringPiece GetTypeName() const
Definition: autoscaling_policy.h:87
void clear_cool_down_period_sec()
Definition: autoscaling_policy.h:103
int32 get_min_num_replicas() const
Definition: autoscaling_policy.h:297
void set_cool_down_period_sec(int32 value)
Definition: autoscaling_policy.h:131