types/cpp/source.pb.h

535 lines
18 KiB
C
Raw Normal View History

// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: source.proto
#ifndef PROTOBUF_INCLUDED_source_2eproto
#define PROTOBUF_INCLUDED_source_2eproto
#include <string>
#include <google/protobuf/stubs/common.h>
#if GOOGLE_PROTOBUF_VERSION < 3006000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3006000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/inlined_string_field.h>
#include <google/protobuf/metadata.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/generated_enum_reflection.h>
#include <google/protobuf/unknown_field_set.h>
// @@protoc_insertion_point(includes)
#define PROTOBUF_INTERNAL_EXPORT_protobuf_source_2eproto
namespace protobuf_source_2eproto {
// Internal implementation detail -- do not use these members.
struct TableStruct {
static const ::google::protobuf::internal::ParseTableField entries[];
static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
static const ::google::protobuf::internal::ParseTable schema[1];
static const ::google::protobuf::internal::FieldMetadata field_metadata[];
static const ::google::protobuf::internal::SerializationTable serialization_table[];
static const ::google::protobuf::uint32 offsets[];
};
void AddDescriptors();
} // namespace protobuf_source_2eproto
namespace pb {
class Source;
class SourceDefaultTypeInternal;
extern SourceDefaultTypeInternal _Source_default_instance_;
} // namespace pb
namespace google {
namespace protobuf {
template<> ::pb::Source* Arena::CreateMaybeMessage<::pb::Source>(Arena*);
} // namespace protobuf
} // namespace google
namespace pb {
enum Source_Version {
Source_Version_UNKNOWN_VERSION = 0,
Source_Version__0_0_1 = 1
};
bool Source_Version_IsValid(int value);
const Source_Version Source_Version_Version_MIN = Source_Version_UNKNOWN_VERSION;
const Source_Version Source_Version_Version_MAX = Source_Version__0_0_1;
const int Source_Version_Version_ARRAYSIZE = Source_Version_Version_MAX + 1;
const ::google::protobuf::EnumDescriptor* Source_Version_descriptor();
inline const ::std::string& Source_Version_Name(Source_Version value) {
return ::google::protobuf::internal::NameOfEnum(
Source_Version_descriptor(), value);
}
inline bool Source_Version_Parse(
const ::std::string& name, Source_Version* value) {
return ::google::protobuf::internal::ParseNamedEnum<Source_Version>(
Source_Version_descriptor(), name, value);
}
enum Source_SourceTypes {
Source_SourceTypes_UNKNOWN_SOURCE_TYPE = 0,
Source_SourceTypes_lbry_sd_hash = 1
};
bool Source_SourceTypes_IsValid(int value);
const Source_SourceTypes Source_SourceTypes_SourceTypes_MIN = Source_SourceTypes_UNKNOWN_SOURCE_TYPE;
const Source_SourceTypes Source_SourceTypes_SourceTypes_MAX = Source_SourceTypes_lbry_sd_hash;
const int Source_SourceTypes_SourceTypes_ARRAYSIZE = Source_SourceTypes_SourceTypes_MAX + 1;
const ::google::protobuf::EnumDescriptor* Source_SourceTypes_descriptor();
inline const ::std::string& Source_SourceTypes_Name(Source_SourceTypes value) {
return ::google::protobuf::internal::NameOfEnum(
Source_SourceTypes_descriptor(), value);
}
inline bool Source_SourceTypes_Parse(
const ::std::string& name, Source_SourceTypes* value) {
return ::google::protobuf::internal::ParseNamedEnum<Source_SourceTypes>(
Source_SourceTypes_descriptor(), name, value);
}
// ===================================================================
class Source : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pb.Source) */ {
public:
Source();
virtual ~Source();
Source(const Source& from);
inline Source& operator=(const Source& from) {
CopyFrom(from);
return *this;
}
#if LANG_CXX11
Source(Source&& from) noexcept
: Source() {
*this = ::std::move(from);
}
inline Source& operator=(Source&& from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
#endif
inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
return _internal_metadata_.unknown_fields();
}
inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
return _internal_metadata_.mutable_unknown_fields();
}
static const ::google::protobuf::Descriptor* descriptor();
static const Source& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const Source* internal_default_instance() {
return reinterpret_cast<const Source*>(
&_Source_default_instance_);
}
static constexpr int kIndexInFileMessages =
0;
void Swap(Source* other);
friend void swap(Source& a, Source& b) {
a.Swap(&b);
}
// implements Message ----------------------------------------------
inline Source* New() const final {
return CreateMaybeMessage<Source>(NULL);
}
Source* New(::google::protobuf::Arena* arena) const final {
return CreateMaybeMessage<Source>(arena);
}
void CopyFrom(const ::google::protobuf::Message& from) final;
void MergeFrom(const ::google::protobuf::Message& from) final;
void CopyFrom(const Source& from);
void MergeFrom(const Source& from);
void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
bool MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) final;
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const final;
::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(Source* other);
private:
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
return NULL;
}
inline void* MaybeArenaPtr() const {
return NULL;
}
public:
::google::protobuf::Metadata GetMetadata() const final;
// nested types ----------------------------------------------------
typedef Source_Version Version;
static const Version UNKNOWN_VERSION =
Source_Version_UNKNOWN_VERSION;
static const Version _0_0_1 =
Source_Version__0_0_1;
static inline bool Version_IsValid(int value) {
return Source_Version_IsValid(value);
}
static const Version Version_MIN =
Source_Version_Version_MIN;
static const Version Version_MAX =
Source_Version_Version_MAX;
static const int Version_ARRAYSIZE =
Source_Version_Version_ARRAYSIZE;
static inline const ::google::protobuf::EnumDescriptor*
Version_descriptor() {
return Source_Version_descriptor();
}
static inline const ::std::string& Version_Name(Version value) {
return Source_Version_Name(value);
}
static inline bool Version_Parse(const ::std::string& name,
Version* value) {
return Source_Version_Parse(name, value);
}
typedef Source_SourceTypes SourceTypes;
static const SourceTypes UNKNOWN_SOURCE_TYPE =
Source_SourceTypes_UNKNOWN_SOURCE_TYPE;
static const SourceTypes lbry_sd_hash =
Source_SourceTypes_lbry_sd_hash;
static inline bool SourceTypes_IsValid(int value) {
return Source_SourceTypes_IsValid(value);
}
static const SourceTypes SourceTypes_MIN =
Source_SourceTypes_SourceTypes_MIN;
static const SourceTypes SourceTypes_MAX =
Source_SourceTypes_SourceTypes_MAX;
static const int SourceTypes_ARRAYSIZE =
Source_SourceTypes_SourceTypes_ARRAYSIZE;
static inline const ::google::protobuf::EnumDescriptor*
SourceTypes_descriptor() {
return Source_SourceTypes_descriptor();
}
static inline const ::std::string& SourceTypes_Name(SourceTypes value) {
return Source_SourceTypes_Name(value);
}
static inline bool SourceTypes_Parse(const ::std::string& name,
SourceTypes* value) {
return Source_SourceTypes_Parse(name, value);
}
// accessors -------------------------------------------------------
// required bytes source = 3;
bool has_source() const;
void clear_source();
static const int kSourceFieldNumber = 3;
const ::std::string& source() const;
void set_source(const ::std::string& value);
#if LANG_CXX11
void set_source(::std::string&& value);
#endif
void set_source(const char* value);
void set_source(const void* value, size_t size);
::std::string* mutable_source();
::std::string* release_source();
void set_allocated_source(::std::string* source);
// required string contentType = 4;
bool has_contenttype() const;
void clear_contenttype();
static const int kContentTypeFieldNumber = 4;
const ::std::string& contenttype() const;
void set_contenttype(const ::std::string& value);
#if LANG_CXX11
void set_contenttype(::std::string&& value);
#endif
void set_contenttype(const char* value);
void set_contenttype(const char* value, size_t size);
::std::string* mutable_contenttype();
::std::string* release_contenttype();
void set_allocated_contenttype(::std::string* contenttype);
// required .pb.Source.Version version = 1;
bool has_version() const;
void clear_version();
static const int kVersionFieldNumber = 1;
::pb::Source_Version version() const;
void set_version(::pb::Source_Version value);
// required .pb.Source.SourceTypes sourceType = 2;
bool has_sourcetype() const;
void clear_sourcetype();
static const int kSourceTypeFieldNumber = 2;
::pb::Source_SourceTypes sourcetype() const;
void set_sourcetype(::pb::Source_SourceTypes value);
// @@protoc_insertion_point(class_scope:pb.Source)
private:
void set_has_version();
void clear_has_version();
void set_has_sourcetype();
void clear_has_sourcetype();
void set_has_source();
void clear_has_source();
void set_has_contenttype();
void clear_has_contenttype();
// helper for ByteSizeLong()
size_t RequiredFieldsByteSizeFallback() const;
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
::google::protobuf::internal::HasBits<1> _has_bits_;
mutable ::google::protobuf::internal::CachedSize _cached_size_;
::google::protobuf::internal::ArenaStringPtr source_;
::google::protobuf::internal::ArenaStringPtr contenttype_;
int version_;
int sourcetype_;
friend struct ::protobuf_source_2eproto::TableStruct;
};
// ===================================================================
// ===================================================================
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__
// Source
// required .pb.Source.Version version = 1;
inline bool Source::has_version() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
inline void Source::set_has_version() {
_has_bits_[0] |= 0x00000004u;
}
inline void Source::clear_has_version() {
_has_bits_[0] &= ~0x00000004u;
}
inline void Source::clear_version() {
version_ = 0;
clear_has_version();
}
inline ::pb::Source_Version Source::version() const {
// @@protoc_insertion_point(field_get:pb.Source.version)
return static_cast< ::pb::Source_Version >(version_);
}
inline void Source::set_version(::pb::Source_Version value) {
assert(::pb::Source_Version_IsValid(value));
set_has_version();
version_ = value;
// @@protoc_insertion_point(field_set:pb.Source.version)
}
// required .pb.Source.SourceTypes sourceType = 2;
inline bool Source::has_sourcetype() const {
return (_has_bits_[0] & 0x00000008u) != 0;
}
inline void Source::set_has_sourcetype() {
_has_bits_[0] |= 0x00000008u;
}
inline void Source::clear_has_sourcetype() {
_has_bits_[0] &= ~0x00000008u;
}
inline void Source::clear_sourcetype() {
sourcetype_ = 0;
clear_has_sourcetype();
}
inline ::pb::Source_SourceTypes Source::sourcetype() const {
// @@protoc_insertion_point(field_get:pb.Source.sourceType)
return static_cast< ::pb::Source_SourceTypes >(sourcetype_);
}
inline void Source::set_sourcetype(::pb::Source_SourceTypes value) {
assert(::pb::Source_SourceTypes_IsValid(value));
set_has_sourcetype();
sourcetype_ = value;
// @@protoc_insertion_point(field_set:pb.Source.sourceType)
}
// required bytes source = 3;
inline bool Source::has_source() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void Source::set_has_source() {
_has_bits_[0] |= 0x00000001u;
}
inline void Source::clear_has_source() {
_has_bits_[0] &= ~0x00000001u;
}
inline void Source::clear_source() {
source_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_source();
}
inline const ::std::string& Source::source() const {
// @@protoc_insertion_point(field_get:pb.Source.source)
return source_.GetNoArena();
}
inline void Source::set_source(const ::std::string& value) {
set_has_source();
source_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:pb.Source.source)
}
#if LANG_CXX11
inline void Source::set_source(::std::string&& value) {
set_has_source();
source_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:pb.Source.source)
}
#endif
inline void Source::set_source(const char* value) {
GOOGLE_DCHECK(value != NULL);
set_has_source();
source_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:pb.Source.source)
}
inline void Source::set_source(const void* value, size_t size) {
set_has_source();
source_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:pb.Source.source)
}
inline ::std::string* Source::mutable_source() {
set_has_source();
// @@protoc_insertion_point(field_mutable:pb.Source.source)
return source_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* Source::release_source() {
// @@protoc_insertion_point(field_release:pb.Source.source)
if (!has_source()) {
return NULL;
}
clear_has_source();
return source_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void Source::set_allocated_source(::std::string* source) {
if (source != NULL) {
set_has_source();
} else {
clear_has_source();
}
source_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), source);
// @@protoc_insertion_point(field_set_allocated:pb.Source.source)
}
// required string contentType = 4;
inline bool Source::has_contenttype() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void Source::set_has_contenttype() {
_has_bits_[0] |= 0x00000002u;
}
inline void Source::clear_has_contenttype() {
_has_bits_[0] &= ~0x00000002u;
}
inline void Source::clear_contenttype() {
contenttype_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_contenttype();
}
inline const ::std::string& Source::contenttype() const {
// @@protoc_insertion_point(field_get:pb.Source.contentType)
return contenttype_.GetNoArena();
}
inline void Source::set_contenttype(const ::std::string& value) {
set_has_contenttype();
contenttype_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:pb.Source.contentType)
}
#if LANG_CXX11
inline void Source::set_contenttype(::std::string&& value) {
set_has_contenttype();
contenttype_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:pb.Source.contentType)
}
#endif
inline void Source::set_contenttype(const char* value) {
GOOGLE_DCHECK(value != NULL);
set_has_contenttype();
contenttype_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:pb.Source.contentType)
}
inline void Source::set_contenttype(const char* value, size_t size) {
set_has_contenttype();
contenttype_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:pb.Source.contentType)
}
inline ::std::string* Source::mutable_contenttype() {
set_has_contenttype();
// @@protoc_insertion_point(field_mutable:pb.Source.contentType)
return contenttype_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* Source::release_contenttype() {
// @@protoc_insertion_point(field_release:pb.Source.contentType)
if (!has_contenttype()) {
return NULL;
}
clear_has_contenttype();
return contenttype_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void Source::set_allocated_contenttype(::std::string* contenttype) {
if (contenttype != NULL) {
set_has_contenttype();
} else {
clear_has_contenttype();
}
contenttype_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), contenttype);
// @@protoc_insertion_point(field_set_allocated:pb.Source.contentType)
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif // __GNUC__
// @@protoc_insertion_point(namespace_scope)
} // namespace pb
namespace google {
namespace protobuf {
template <> struct is_proto_enum< ::pb::Source_Version> : ::std::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::pb::Source_Version>() {
return ::pb::Source_Version_descriptor();
}
template <> struct is_proto_enum< ::pb::Source_SourceTypes> : ::std::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::pb::Source_SourceTypes>() {
return ::pb::Source_SourceTypes_descriptor();
}
} // namespace protobuf
} // namespace google
// @@protoc_insertion_point(global_scope)
#endif // PROTOBUF_INCLUDED_source_2eproto