YugabyteDB (2.13.0.0-b42, bfc6a6643e7399ac8a0e81d06a3ee6d6571b33ab)

Coverage Report

Created: 2022-03-09 17:30

/Users/deen/code/yugabyte-db/build/debugcov-clang-dynamic-arm64-ninja/src/yb/rpc/any.messages.h
Line
Count
Source (jump to first uncovered line)
1
// THIS FILE IS AUTOGENERATED FROM yb/rpc/any.proto
2
3
#ifndef YB_RPC_ANY_MESSAGES_H
4
#define YB_RPC_ANY_MESSAGES_H
5
6
#include <google/protobuf/any.pb.h>
7
#include "yb/rpc/lightweight_message.h"
8
#include "yb/util/memory/arena_list.h"
9
#include "yb/util/memory/mc_types.h"
10
#include "yb/rpc/any.pb.h"
11
12
namespace yb {
13
namespace rpc {
14
15
class LWAny;
16
17
YB_DEFINE_ENUM(AnyFields,
18
  (kTypeUrl)
19
  (kValue)
20
);
21
22
class LWAny : public ::yb::rpc::LightweightMessage {
23
 public:
24
  explicit LWAny(::yb::Arena* arena);
25
  LWAny(::yb::Arena* arena, const LWAny& rhs);
26
27
  LWAny(::yb::Arena* arena, const ::google::protobuf::Any& rhs) 
28
0
      : LWAny(arena) {
29
0
    CopyFrom(rhs);
30
0
  }
31
32
0
  void operator=(const LWAny& rhs) {
33
0
    CopyFrom(rhs);
34
0
  }
35
36
0
  void operator=(const ::google::protobuf::Any& rhs) {
37
0
    CopyFrom(rhs);
38
0
  }
39
40
  CHECKED_STATUS ParseFromCodedStream(google::protobuf::io::CodedInputStream* cis) override;
41
  size_t SerializedSize() const override;
42
  uint8_t* SerializeToArray(uint8_t* out) const override;
43
  void AppendToDebugString(std::string* out) const override;
44
45
  void Clear() override;
46
  void CopyFrom(const LWAny& rhs);
47
  void CopyFrom(const ::google::protobuf::Any& rhs);
48
49
  void ToGoogleProtobuf(::google::protobuf::Any* out) const;
50
51
0
  ::google::protobuf::Any ToGoogleProtobuf() const {
52
0
    ::google::protobuf::Any result;
53
0
    ToGoogleProtobuf(&result);
54
0
    return result;
55
0
  }
56
57
0
  ::yb::Slice type_url() const {
58
0
    return type_url_;
59
0
  }
60
61
0
  void dup_type_url(::yb::Slice value) {
62
0
    has_fields_.Set(AnyFields::kTypeUrl);
63
0
    type_url_ = arena_.DupSlice(value);
64
0
  }
65
66
0
  void ref_type_url(::yb::Slice value) {
67
0
    has_fields_.Set(AnyFields::kTypeUrl);
68
0
    type_url_ = value;
69
0
  }
70
71
0
  ::yb::Slice* mutable_type_url() {
72
0
    has_fields_.Set(AnyFields::kTypeUrl);
73
0
    return &type_url_;
74
0
  }
75
76
0
  bool has_type_url() const {
77
0
    return has_fields_.Test(AnyFields::kTypeUrl);
78
0
  }
79
80
1
  void clear_type_url() {
81
1
    type_url_ = ::yb::Slice();
82
1
    has_fields_.Reset(AnyFields::kTypeUrl);
83
1
  }
84
85
0
  ::yb::Slice value() const {
86
0
    return value_;
87
0
  }
88
89
0
  void dup_value(::yb::Slice value) {
90
0
    has_fields_.Set(AnyFields::kValue);
91
0
    value_ = arena_.DupSlice(value);
92
0
  }
93
94
0
  void ref_value(::yb::Slice value) {
95
0
    has_fields_.Set(AnyFields::kValue);
96
0
    value_ = value;
97
0
  }
98
99
0
  ::yb::Slice* mutable_value() {
100
0
    has_fields_.Set(AnyFields::kValue);
101
0
    return &value_;
102
0
  }
103
104
0
  bool has_value() const {
105
0
    return has_fields_.Test(AnyFields::kValue);
106
0
  }
107
108
1
  void clear_value() {
109
1
    value_ = ::yb::Slice();
110
1
    has_fields_.Reset(AnyFields::kValue);
111
1
  }
112
113
0
  ::yb::Arena& arena() const {
114
0
    return arena_;}
115
116
0
  size_t cached_size() const {
117
0
    return cached_size_;
118
0
  }
119
120
 private:
121
  ::yb::Arena& arena_;
122
  ::yb::EnumBitSet<AnyFields> has_fields_;
123
  mutable size_t cached_size_ = 0;
124
  ::yb::Slice type_url_ = ::yb::Slice();
125
  ::yb::Slice value_ = ::yb::Slice();
126
};
127
128
} // namespace rpc
129
} // namespace yb
130
131
#endif // YB_RPC_ANY_MESSAGES_H