compute  v1
interconnect_diagnostics.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_INTERCONNECT_DIAGNOSTICS_H_
31 #define GOOGLE_COMPUTE_API_INTERCONNECT_DIAGNOSTICS_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 #include "google/compute_api/interconnect_diagnostics_arpe_ntry.h"
39 #include "google/compute_api/interconnect_diagnostics_link_status.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_compute_api {
46 using namespace googleapis;
47 
54 class InterconnectDiagnostics : public client::JsonCppData {
55  public:
61  static InterconnectDiagnostics* New();
62 
68  explicit InterconnectDiagnostics(const Json::Value& storage);
69 
75  explicit InterconnectDiagnostics(Json::Value* storage);
76 
80  virtual ~InterconnectDiagnostics();
81 
87  const StringPiece GetTypeName() const {
88  return StringPiece("google_compute_api::InterconnectDiagnostics");
89  }
90 
96  bool has_arp_caches() const {
97  return Storage().isMember("arpCaches");
98  }
99 
104  MutableStorage()->removeMember("arpCaches");
105  }
106 
107 
111  const client::JsonCppArray<InterconnectDiagnosticsARPEntry > get_arp_caches() const;
112 
123  client::JsonCppArray<InterconnectDiagnosticsARPEntry > mutable_arpCaches();
124 
130  bool has_links() const {
131  return Storage().isMember("links");
132  }
133 
137  void clear_links() {
138  MutableStorage()->removeMember("links");
139  }
140 
141 
145  const client::JsonCppArray<InterconnectDiagnosticsLinkStatus > get_links() const;
146 
155  client::JsonCppArray<InterconnectDiagnosticsLinkStatus > mutable_links();
156 
162  bool has_mac_address() const {
163  return Storage().isMember("macAddress");
164  }
165 
170  MutableStorage()->removeMember("macAddress");
171  }
172 
173 
177  const StringPiece get_mac_address() const {
178  const Json::Value& v = Storage("macAddress");
179  if (v == Json::Value::null) return StringPiece("");
180  return StringPiece(v.asCString());
181  }
182 
190  void set_mac_address(const StringPiece& value) {
191  *MutableStorage("macAddress") = value.data();
192  }
193 
194  private:
195  void operator=(const InterconnectDiagnostics&);
196 }; // InterconnectDiagnostics
197 } // namespace google_compute_api
198 #endif // GOOGLE_COMPUTE_API_INTERCONNECT_DIAGNOSTICS_H_
Definition: interconnect_diagnostics.h:54
const StringPiece get_mac_address() const
Definition: interconnect_diagnostics.h:177
bool has_arp_caches() const
Definition: interconnect_diagnostics.h:96
bool has_mac_address() const
Definition: interconnect_diagnostics.h:162
void clear_mac_address()
Definition: interconnect_diagnostics.h:169
void clear_links()
Definition: interconnect_diagnostics.h:137
Definition: accelerator_config.h:39
Definition: accelerator_config.cc:41
bool has_links() const
Definition: interconnect_diagnostics.h:130
void clear_arp_caches()
Definition: interconnect_diagnostics.h:103
const StringPiece GetTypeName() const
Definition: interconnect_diagnostics.h:87
void set_mac_address(const StringPiece &value)
Definition: interconnect_diagnostics.h:190