1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: tensorflow/core/protobuf/named_tensor.proto
3 
4 #ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fnamed_5ftensor_2eproto
5 #define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fnamed_5ftensor_2eproto
6 
7 #include <cstdint>
8 #include <limits>
9 #include <string>
10 
11 #include <google/protobuf/port_def.inc>
12 #if PROTOBUF_VERSION < 3021000
13 #error This file was generated by a newer version of protoc which is
14 #error incompatible with your Protocol Buffer headers. Please update
15 #error your headers.
16 #endif
17 #if 3021012 < PROTOBUF_MIN_PROTOC_VERSION
18 #error This file was generated by an older version of protoc which is
19 #error incompatible with your Protocol Buffer headers. Please
20 #error regenerate this file with a newer version of protoc.
21 #endif
22 
23 #include <google/protobuf/port_undef.inc>
24 #include <google/protobuf/io/coded_stream.h>
25 #include <google/protobuf/arena.h>
26 #include <google/protobuf/arenastring.h>
27 #include <google/protobuf/generated_message_util.h>
28 #include <google/protobuf/metadata_lite.h>
29 #include <google/protobuf/message_lite.h>
30 #include <google/protobuf/repeated_field.h>  // IWYU pragma: export
31 #include <google/protobuf/extension_set.h>  // IWYU pragma: export
32 #include "tensorflow/core/framework/tensor.pb.h"
33 // @@protoc_insertion_point(includes)
34 #include <google/protobuf/port_def.inc>
35 #define PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fnamed_5ftensor_2eproto
36 PROTOBUF_NAMESPACE_OPEN
37 namespace internal {
38 class AnyMetadata;
39 }  // namespace internal
40 PROTOBUF_NAMESPACE_CLOSE
41 
42 // Internal implementation detail -- do not use these members.
43 struct TableStruct_tensorflow_2fcore_2fprotobuf_2fnamed_5ftensor_2eproto {
44   static const ::uint32_t offsets[];
45 };
46 namespace tensorflow {
47 class NamedTensorProto;
48 struct NamedTensorProtoDefaultTypeInternal;
49 extern NamedTensorProtoDefaultTypeInternal _NamedTensorProto_default_instance_;
50 }  // namespace tensorflow
51 PROTOBUF_NAMESPACE_OPEN
52 template<> ::tensorflow::NamedTensorProto* Arena::CreateMaybeMessage<::tensorflow::NamedTensorProto>(Arena*);
53 PROTOBUF_NAMESPACE_CLOSE
54 namespace tensorflow {
55 
56 // ===================================================================
57 
58 class NamedTensorProto final :
59     public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:tensorflow.NamedTensorProto) */ {
60  public:
NamedTensorProto()61   inline NamedTensorProto() : NamedTensorProto(nullptr) {}
62   ~NamedTensorProto() override;
63   explicit PROTOBUF_CONSTEXPR NamedTensorProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
64 
65   NamedTensorProto(const NamedTensorProto& from);
NamedTensorProto(NamedTensorProto && from)66   NamedTensorProto(NamedTensorProto&& from) noexcept
67     : NamedTensorProto() {
68     *this = ::std::move(from);
69   }
70 
71   inline NamedTensorProto& operator=(const NamedTensorProto& from) {
72     if (this == &from) return *this;
73     CopyFrom(from);
74     return *this;
75   }
76   inline NamedTensorProto& operator=(NamedTensorProto&& from) noexcept {
77     if (this == &from) return *this;
78     if (GetOwningArena() == from.GetOwningArena()
79   #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
80         && GetOwningArena() != nullptr
81   #endif  // !PROTOBUF_FORCE_COPY_IN_MOVE
82     ) {
83       InternalSwap(&from);
84     } else {
85       CopyFrom(from);
86     }
87     return *this;
88   }
89 
default_instance()90   static const NamedTensorProto& default_instance() {
91     return *internal_default_instance();
92   }
internal_default_instance()93   static inline const NamedTensorProto* internal_default_instance() {
94     return reinterpret_cast<const NamedTensorProto*>(
95                &_NamedTensorProto_default_instance_);
96   }
97   static constexpr int kIndexInFileMessages =
98     0;
99 
swap(NamedTensorProto & a,NamedTensorProto & b)100   friend void swap(NamedTensorProto& a, NamedTensorProto& b) {
101     a.Swap(&b);
102   }
Swap(NamedTensorProto * other)103   inline void Swap(NamedTensorProto* other) {
104     if (other == this) return;
105   #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
106     if (GetOwningArena() != nullptr &&
107         GetOwningArena() == other->GetOwningArena()) {
108    #else  // PROTOBUF_FORCE_COPY_IN_SWAP
109     if (GetOwningArena() == other->GetOwningArena()) {
110   #endif  // !PROTOBUF_FORCE_COPY_IN_SWAP
111       InternalSwap(other);
112     } else {
113       ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
114     }
115   }
116   void UnsafeArenaSwap(NamedTensorProto* other) {
117     if (other == this) return;
118     GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
119     InternalSwap(other);
120   }
121 
122   // implements Message ----------------------------------------------
123 
124   NamedTensorProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
125     return CreateMaybeMessage<NamedTensorProto>(arena);
126   }
127   NamedTensorProto* New() const {
128     return New(nullptr);
129   }
130   void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from)  final;
131   void CopyFrom(const NamedTensorProto& from);
132   void MergeFrom(const NamedTensorProto& from);
133   PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
134   bool IsInitialized() const final;
135 
136   size_t ByteSizeLong() const final;
137   const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
138   ::uint8_t* _InternalSerialize(
139       ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
140   int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
141 
142   private:
143   void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
144   void SharedDtor();
145   void SetCachedSize(int size) const;
146   void InternalSwap(NamedTensorProto* other);
147 
148   private:
149   friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
150   static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
151     return "tensorflow.NamedTensorProto";
152   }
153   protected:
154   explicit NamedTensorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
155                        bool is_message_owned = false);
156   public:
157 
158   std::string GetTypeName() const final;
159 
160   // nested types ----------------------------------------------------
161 
162   // accessors -------------------------------------------------------
163 
164   enum : int {
165     kNameFieldNumber = 1,
166     kTensorFieldNumber = 2,
167   };
168   // string name = 1;
169   void clear_name();
170   const std::string& name() const;
171   template <typename ArgT0 = const std::string&, typename... ArgT>
172   void set_name(ArgT0&& arg0, ArgT... args);
173   std::string* mutable_name();
174   PROTOBUF_NODISCARD std::string* release_name();
175   void set_allocated_name(std::string* name);
176   private:
177   const std::string& _internal_name() const;
178   inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value);
179   std::string* _internal_mutable_name();
180   public:
181 
182   // .tensorflow.TensorProto tensor = 2;
183   bool has_tensor() const;
184   private:
185   bool _internal_has_tensor() const;
186   public:
187   void clear_tensor();
188   const ::tensorflow::TensorProto& tensor() const;
189   PROTOBUF_NODISCARD ::tensorflow::TensorProto* release_tensor();
190   ::tensorflow::TensorProto* mutable_tensor();
191   void set_allocated_tensor(::tensorflow::TensorProto* tensor);
192   private:
193   const ::tensorflow::TensorProto& _internal_tensor() const;
194   ::tensorflow::TensorProto* _internal_mutable_tensor();
195   public:
196   void unsafe_arena_set_allocated_tensor(
197       ::tensorflow::TensorProto* tensor);
198   ::tensorflow::TensorProto* unsafe_arena_release_tensor();
199 
200   // @@protoc_insertion_point(class_scope:tensorflow.NamedTensorProto)
201  private:
202   class _Internal;
203 
204   template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
205   typedef void InternalArenaConstructable_;
206   typedef void DestructorSkippable_;
207   struct Impl_ {
208     ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
209     ::tensorflow::TensorProto* tensor_;
210     mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
211   };
212   union { Impl_ _impl_; };
213   friend struct ::TableStruct_tensorflow_2fcore_2fprotobuf_2fnamed_5ftensor_2eproto;
214 };
215 // ===================================================================
216 
217 
218 // ===================================================================
219 
220 #ifdef __GNUC__
221   #pragma GCC diagnostic push
222   #pragma GCC diagnostic ignored "-Wstrict-aliasing"
223 #endif  // __GNUC__
224 // NamedTensorProto
225 
226 // string name = 1;
clear_name()227 inline void NamedTensorProto::clear_name() {
228   _impl_.name_.ClearToEmpty();
229 }
name()230 inline const std::string& NamedTensorProto::name() const {
231   // @@protoc_insertion_point(field_get:tensorflow.NamedTensorProto.name)
232   return _internal_name();
233 }
234 template <typename ArgT0, typename... ArgT>
235 inline PROTOBUF_ALWAYS_INLINE
set_name(ArgT0 && arg0,ArgT...args)236 void NamedTensorProto::set_name(ArgT0&& arg0, ArgT... args) {
237 
238  _impl_.name_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
239   // @@protoc_insertion_point(field_set:tensorflow.NamedTensorProto.name)
240 }
mutable_name()241 inline std::string* NamedTensorProto::mutable_name() {
242   std::string* _s = _internal_mutable_name();
243   // @@protoc_insertion_point(field_mutable:tensorflow.NamedTensorProto.name)
244   return _s;
245 }
_internal_name()246 inline const std::string& NamedTensorProto::_internal_name() const {
247   return _impl_.name_.Get();
248 }
_internal_set_name(const std::string & value)249 inline void NamedTensorProto::_internal_set_name(const std::string& value) {
250 
251   _impl_.name_.Set(value, GetArenaForAllocation());
252 }
_internal_mutable_name()253 inline std::string* NamedTensorProto::_internal_mutable_name() {
254 
255   return _impl_.name_.Mutable(GetArenaForAllocation());
256 }
release_name()257 inline std::string* NamedTensorProto::release_name() {
258   // @@protoc_insertion_point(field_release:tensorflow.NamedTensorProto.name)
259   return _impl_.name_.Release();
260 }
set_allocated_name(std::string * name)261 inline void NamedTensorProto::set_allocated_name(std::string* name) {
262   _impl_.name_.SetAllocated(name, GetArenaForAllocation());
263 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
264   if (_impl_.name_.IsDefault()) {
265     _impl_.name_.Set("", GetArenaForAllocation());
266   }
267 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
268   // @@protoc_insertion_point(field_set_allocated:tensorflow.NamedTensorProto.name)
269 }
270 
271 // .tensorflow.TensorProto tensor = 2;
_internal_has_tensor()272 inline bool NamedTensorProto::_internal_has_tensor() const {
273   return this != internal_default_instance() && _impl_.tensor_ != nullptr;
274 }
has_tensor()275 inline bool NamedTensorProto::has_tensor() const {
276   return _internal_has_tensor();
277 }
_internal_tensor()278 inline const ::tensorflow::TensorProto& NamedTensorProto::_internal_tensor() const {
279   const ::tensorflow::TensorProto* p = _impl_.tensor_;
280   return p != nullptr ? *p : reinterpret_cast<const ::tensorflow::TensorProto&>(
281       ::tensorflow::_TensorProto_default_instance_);
282 }
tensor()283 inline const ::tensorflow::TensorProto& NamedTensorProto::tensor() const {
284   // @@protoc_insertion_point(field_get:tensorflow.NamedTensorProto.tensor)
285   return _internal_tensor();
286 }
unsafe_arena_set_allocated_tensor(::tensorflow::TensorProto * tensor)287 inline void NamedTensorProto::unsafe_arena_set_allocated_tensor(
288     ::tensorflow::TensorProto* tensor) {
289   if (GetArenaForAllocation() == nullptr) {
290     delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.tensor_);
291   }
292   _impl_.tensor_ = tensor;
293   // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.NamedTensorProto.tensor)
294 }
release_tensor()295 inline ::tensorflow::TensorProto* NamedTensorProto::release_tensor() {
296 
297   ::tensorflow::TensorProto* temp = _impl_.tensor_;
298   _impl_.tensor_ = nullptr;
299 #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
300   auto* old =  reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
301   temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
302   if (GetArenaForAllocation() == nullptr) { delete old; }
303 #else  // PROTOBUF_FORCE_COPY_IN_RELEASE
304   if (GetArenaForAllocation() != nullptr) {
305     temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
306   }
307 #endif  // !PROTOBUF_FORCE_COPY_IN_RELEASE
308   return temp;
309 }
unsafe_arena_release_tensor()310 inline ::tensorflow::TensorProto* NamedTensorProto::unsafe_arena_release_tensor() {
311   // @@protoc_insertion_point(field_release:tensorflow.NamedTensorProto.tensor)
312 
313   ::tensorflow::TensorProto* temp = _impl_.tensor_;
314   _impl_.tensor_ = nullptr;
315   return temp;
316 }
_internal_mutable_tensor()317 inline ::tensorflow::TensorProto* NamedTensorProto::_internal_mutable_tensor() {
318 
319   if (_impl_.tensor_ == nullptr) {
320     auto* p = CreateMaybeMessage<::tensorflow::TensorProto>(GetArenaForAllocation());
321     _impl_.tensor_ = p;
322   }
323   return _impl_.tensor_;
324 }
mutable_tensor()325 inline ::tensorflow::TensorProto* NamedTensorProto::mutable_tensor() {
326   ::tensorflow::TensorProto* _msg = _internal_mutable_tensor();
327   // @@protoc_insertion_point(field_mutable:tensorflow.NamedTensorProto.tensor)
328   return _msg;
329 }
set_allocated_tensor(::tensorflow::TensorProto * tensor)330 inline void NamedTensorProto::set_allocated_tensor(::tensorflow::TensorProto* tensor) {
331   ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
332   if (message_arena == nullptr) {
333     delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.tensor_);
334   }
335   if (tensor) {
336     ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
337         ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
338                 reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(tensor));
339     if (message_arena != submessage_arena) {
340       tensor = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
341           message_arena, tensor, submessage_arena);
342     }
343 
344   } else {
345 
346   }
347   _impl_.tensor_ = tensor;
348   // @@protoc_insertion_point(field_set_allocated:tensorflow.NamedTensorProto.tensor)
349 }
350 
351 #ifdef __GNUC__
352   #pragma GCC diagnostic pop
353 #endif  // __GNUC__
354 
355 // @@protoc_insertion_point(namespace_scope)
356 
357 }  // namespace tensorflow
358 
359 // @@protoc_insertion_point(global_scope)
360 
361 #include <google/protobuf/port_undef.inc>
362 #endif  // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2fcore_2fprotobuf_2fnamed_5ftensor_2eproto
363