youtube  v3
live_stream_health_status.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-02-27, 01:46:08 UTC
18 // C++ generator version: 0.1.4
19 
20 // ----------------------------------------------------------------------------
21 // NOTE: This file is generated from Google APIs Discovery Service.
22 // Service:
23 // YouTube Data API (youtube/v3)
24 // Generated from:
25 // Version: v3
26 // Revision: 222
27 // Generated by:
28 // Tool: google-apis-code-generator 1.5.1
29 // C++: 0.1.4
30 #ifndef GOOGLE_YOUTUBE_API_LIVE_STREAM_HEALTH_STATUS_H_
31 #define GOOGLE_YOUTUBE_API_LIVE_STREAM_HEALTH_STATUS_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/youtube_api/live_stream_configuration_issue.h"
40 
41 namespace Json {
42 class Value;
43 } // namespace Json
44 
45 namespace google_youtube_api {
46 using namespace googleapis;
47 
53 class LiveStreamHealthStatus : public client::JsonCppData {
54  public:
60  static LiveStreamHealthStatus* New();
61 
67  explicit LiveStreamHealthStatus(const Json::Value& storage);
68 
74  explicit LiveStreamHealthStatus(Json::Value* storage);
75 
79  virtual ~LiveStreamHealthStatus();
80 
86  const StringPiece GetTypeName() const {
87  return StringPiece("google_youtube_api::LiveStreamHealthStatus");
88  }
89 
95  bool has_configuration_issues() const {
96  return Storage().isMember("configurationIssues");
97  }
98 
103  MutableStorage()->removeMember("configurationIssues");
104  }
105 
106 
111  const client::JsonCppArray<LiveStreamConfigurationIssue > get_configuration_issues() const;
112 
121  client::JsonCppArray<LiveStreamConfigurationIssue > mutable_configurationIssues();
122 
129  return Storage().isMember("lastUpdateTimeSeconds");
130  }
131 
136  MutableStorage()->removeMember("lastUpdateTimeSeconds");
137  }
138 
139 
144  const Json::Value& storage = Storage("lastUpdateTimeSeconds");
145  return client::JsonValueToCppValueHelper<uint64 >(storage);
146  }
147 
155  void set_last_update_time_seconds(uint64 value) {
156  client::SetJsonValueFromCppValueHelper<uint64 >(
157  value, MutableStorage("lastUpdateTimeSeconds"));
158  }
159 
165  bool has_status() const {
166  return Storage().isMember("status");
167  }
168 
172  void clear_status() {
173  MutableStorage()->removeMember("status");
174  }
175 
176 
180  const StringPiece get_status() const {
181  const Json::Value& v = Storage("status");
182  if (v == Json::Value::null) return StringPiece("");
183  return StringPiece(v.asCString());
184  }
185 
193  void set_status(const StringPiece& value) {
194  *MutableStorage("status") = value.data();
195  }
196 
197  private:
198  void operator=(const LiveStreamHealthStatus&);
199 }; // LiveStreamHealthStatus
200 } // namespace google_youtube_api
201 #endif // GOOGLE_YOUTUBE_API_LIVE_STREAM_HEALTH_STATUS_H_
Definition: access_policy.cc:40
Definition: live_stream_health_status.h:53
void clear_status()
Definition: live_stream_health_status.h:172
uint64 get_last_update_time_seconds() const
Definition: live_stream_health_status.h:143
void clear_last_update_time_seconds()
Definition: live_stream_health_status.h:135
const StringPiece GetTypeName() const
Definition: live_stream_health_status.h:86
Definition: access_policy.h:38
void set_last_update_time_seconds(uint64 value)
Definition: live_stream_health_status.h:155
bool has_last_update_time_seconds() const
Definition: live_stream_health_status.h:128
void set_status(const StringPiece &value)
Definition: live_stream_health_status.h:193
bool has_status() const
Definition: live_stream_health_status.h:165
bool has_configuration_issues() const
Definition: live_stream_health_status.h:95
const StringPiece get_status() const
Definition: live_stream_health_status.h:180
void clear_configuration_issues()
Definition: live_stream_health_status.h:102