YugabyteDB (2.13.1.0-b60, 21121d69985fbf76aa6958d8f04a9bfa936293b5)

Coverage Report

Created: 2022-03-22 16:43

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