types/cpp/certificate.pb.h
2019-01-22 21:38:10 -03:00

426 lines
14 KiB
C++

// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: certificate.proto
#ifndef PROTOBUF_INCLUDED_certificate_2eproto
#define PROTOBUF_INCLUDED_certificate_2eproto
#include <string>
#include <google/protobuf/stubs/common.h>
#if GOOGLE_PROTOBUF_VERSION < 3006001
#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 3006001 < 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_certificate_2eproto
namespace protobuf_certificate_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_certificate_2eproto
namespace pb {
class Certificate;
class CertificateDefaultTypeInternal;
extern CertificateDefaultTypeInternal _Certificate_default_instance_;
} // namespace pb
namespace google {
namespace protobuf {
template<> ::pb::Certificate* Arena::CreateMaybeMessage<::pb::Certificate>(Arena*);
} // namespace protobuf
} // namespace google
namespace pb {
enum Certificate_Version {
Certificate_Version_UNKNOWN_VERSION = 0,
Certificate_Version__0_0_1 = 1
};
bool Certificate_Version_IsValid(int value);
const Certificate_Version Certificate_Version_Version_MIN = Certificate_Version_UNKNOWN_VERSION;
const Certificate_Version Certificate_Version_Version_MAX = Certificate_Version__0_0_1;
const int Certificate_Version_Version_ARRAYSIZE = Certificate_Version_Version_MAX + 1;
const ::google::protobuf::EnumDescriptor* Certificate_Version_descriptor();
inline const ::std::string& Certificate_Version_Name(Certificate_Version value) {
return ::google::protobuf::internal::NameOfEnum(
Certificate_Version_descriptor(), value);
}
inline bool Certificate_Version_Parse(
const ::std::string& name, Certificate_Version* value) {
return ::google::protobuf::internal::ParseNamedEnum<Certificate_Version>(
Certificate_Version_descriptor(), name, value);
}
enum KeyType {
UNKNOWN_PUBLIC_KEY_TYPE = 0,
NIST256p = 1,
NIST384p = 2,
SECP256k1 = 3
};
bool KeyType_IsValid(int value);
const KeyType KeyType_MIN = UNKNOWN_PUBLIC_KEY_TYPE;
const KeyType KeyType_MAX = SECP256k1;
const int KeyType_ARRAYSIZE = KeyType_MAX + 1;
const ::google::protobuf::EnumDescriptor* KeyType_descriptor();
inline const ::std::string& KeyType_Name(KeyType value) {
return ::google::protobuf::internal::NameOfEnum(
KeyType_descriptor(), value);
}
inline bool KeyType_Parse(
const ::std::string& name, KeyType* value) {
return ::google::protobuf::internal::ParseNamedEnum<KeyType>(
KeyType_descriptor(), name, value);
}
// ===================================================================
class Certificate : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:pb.Certificate) */ {
public:
Certificate();
virtual ~Certificate();
Certificate(const Certificate& from);
inline Certificate& operator=(const Certificate& from) {
CopyFrom(from);
return *this;
}
#if LANG_CXX11
Certificate(Certificate&& from) noexcept
: Certificate() {
*this = ::std::move(from);
}
inline Certificate& operator=(Certificate&& 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 Certificate& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const Certificate* internal_default_instance() {
return reinterpret_cast<const Certificate*>(
&_Certificate_default_instance_);
}
static constexpr int kIndexInFileMessages =
0;
void Swap(Certificate* other);
friend void swap(Certificate& a, Certificate& b) {
a.Swap(&b);
}
// implements Message ----------------------------------------------
inline Certificate* New() const final {
return CreateMaybeMessage<Certificate>(NULL);
}
Certificate* New(::google::protobuf::Arena* arena) const final {
return CreateMaybeMessage<Certificate>(arena);
}
void CopyFrom(const ::google::protobuf::Message& from) final;
void MergeFrom(const ::google::protobuf::Message& from) final;
void CopyFrom(const Certificate& from);
void MergeFrom(const Certificate& 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(Certificate* 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 Certificate_Version Version;
static const Version UNKNOWN_VERSION =
Certificate_Version_UNKNOWN_VERSION;
static const Version _0_0_1 =
Certificate_Version__0_0_1;
static inline bool Version_IsValid(int value) {
return Certificate_Version_IsValid(value);
}
static const Version Version_MIN =
Certificate_Version_Version_MIN;
static const Version Version_MAX =
Certificate_Version_Version_MAX;
static const int Version_ARRAYSIZE =
Certificate_Version_Version_ARRAYSIZE;
static inline const ::google::protobuf::EnumDescriptor*
Version_descriptor() {
return Certificate_Version_descriptor();
}
static inline const ::std::string& Version_Name(Version value) {
return Certificate_Version_Name(value);
}
static inline bool Version_Parse(const ::std::string& name,
Version* value) {
return Certificate_Version_Parse(name, value);
}
// accessors -------------------------------------------------------
// required bytes publicKey = 4;
bool has_publickey() const;
void clear_publickey();
static const int kPublicKeyFieldNumber = 4;
const ::std::string& publickey() const;
void set_publickey(const ::std::string& value);
#if LANG_CXX11
void set_publickey(::std::string&& value);
#endif
void set_publickey(const char* value);
void set_publickey(const void* value, size_t size);
::std::string* mutable_publickey();
::std::string* release_publickey();
void set_allocated_publickey(::std::string* publickey);
// required .pb.Certificate.Version version = 1;
bool has_version() const;
void clear_version();
static const int kVersionFieldNumber = 1;
::pb::Certificate_Version version() const;
void set_version(::pb::Certificate_Version value);
// required .pb.KeyType keyType = 2;
bool has_keytype() const;
void clear_keytype();
static const int kKeyTypeFieldNumber = 2;
::pb::KeyType keytype() const;
void set_keytype(::pb::KeyType value);
// @@protoc_insertion_point(class_scope:pb.Certificate)
private:
void set_has_version();
void clear_has_version();
void set_has_keytype();
void clear_has_keytype();
void set_has_publickey();
void clear_has_publickey();
// 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 publickey_;
int version_;
int keytype_;
friend struct ::protobuf_certificate_2eproto::TableStruct;
};
// ===================================================================
// ===================================================================
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__
// Certificate
// required .pb.Certificate.Version version = 1;
inline bool Certificate::has_version() const {
return (_has_bits_[0] & 0x00000002u) != 0;
}
inline void Certificate::set_has_version() {
_has_bits_[0] |= 0x00000002u;
}
inline void Certificate::clear_has_version() {
_has_bits_[0] &= ~0x00000002u;
}
inline void Certificate::clear_version() {
version_ = 0;
clear_has_version();
}
inline ::pb::Certificate_Version Certificate::version() const {
// @@protoc_insertion_point(field_get:pb.Certificate.version)
return static_cast< ::pb::Certificate_Version >(version_);
}
inline void Certificate::set_version(::pb::Certificate_Version value) {
assert(::pb::Certificate_Version_IsValid(value));
set_has_version();
version_ = value;
// @@protoc_insertion_point(field_set:pb.Certificate.version)
}
// required .pb.KeyType keyType = 2;
inline bool Certificate::has_keytype() const {
return (_has_bits_[0] & 0x00000004u) != 0;
}
inline void Certificate::set_has_keytype() {
_has_bits_[0] |= 0x00000004u;
}
inline void Certificate::clear_has_keytype() {
_has_bits_[0] &= ~0x00000004u;
}
inline void Certificate::clear_keytype() {
keytype_ = 0;
clear_has_keytype();
}
inline ::pb::KeyType Certificate::keytype() const {
// @@protoc_insertion_point(field_get:pb.Certificate.keyType)
return static_cast< ::pb::KeyType >(keytype_);
}
inline void Certificate::set_keytype(::pb::KeyType value) {
assert(::pb::KeyType_IsValid(value));
set_has_keytype();
keytype_ = value;
// @@protoc_insertion_point(field_set:pb.Certificate.keyType)
}
// required bytes publicKey = 4;
inline bool Certificate::has_publickey() const {
return (_has_bits_[0] & 0x00000001u) != 0;
}
inline void Certificate::set_has_publickey() {
_has_bits_[0] |= 0x00000001u;
}
inline void Certificate::clear_has_publickey() {
_has_bits_[0] &= ~0x00000001u;
}
inline void Certificate::clear_publickey() {
publickey_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_publickey();
}
inline const ::std::string& Certificate::publickey() const {
// @@protoc_insertion_point(field_get:pb.Certificate.publicKey)
return publickey_.GetNoArena();
}
inline void Certificate::set_publickey(const ::std::string& value) {
set_has_publickey();
publickey_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
// @@protoc_insertion_point(field_set:pb.Certificate.publicKey)
}
#if LANG_CXX11
inline void Certificate::set_publickey(::std::string&& value) {
set_has_publickey();
publickey_.SetNoArena(
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
// @@protoc_insertion_point(field_set_rvalue:pb.Certificate.publicKey)
}
#endif
inline void Certificate::set_publickey(const char* value) {
GOOGLE_DCHECK(value != NULL);
set_has_publickey();
publickey_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
// @@protoc_insertion_point(field_set_char:pb.Certificate.publicKey)
}
inline void Certificate::set_publickey(const void* value, size_t size) {
set_has_publickey();
publickey_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
::std::string(reinterpret_cast<const char*>(value), size));
// @@protoc_insertion_point(field_set_pointer:pb.Certificate.publicKey)
}
inline ::std::string* Certificate::mutable_publickey() {
set_has_publickey();
// @@protoc_insertion_point(field_mutable:pb.Certificate.publicKey)
return publickey_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline ::std::string* Certificate::release_publickey() {
// @@protoc_insertion_point(field_release:pb.Certificate.publicKey)
if (!has_publickey()) {
return NULL;
}
clear_has_publickey();
return publickey_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
inline void Certificate::set_allocated_publickey(::std::string* publickey) {
if (publickey != NULL) {
set_has_publickey();
} else {
clear_has_publickey();
}
publickey_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), publickey);
// @@protoc_insertion_point(field_set_allocated:pb.Certificate.publicKey)
}
#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::Certificate_Version> : ::std::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::pb::Certificate_Version>() {
return ::pb::Certificate_Version_descriptor();
}
template <> struct is_proto_enum< ::pb::KeyType> : ::std::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::pb::KeyType>() {
return ::pb::KeyType_descriptor();
}
} // namespace protobuf
} // namespace google
// @@protoc_insertion_point(global_scope)
#endif // PROTOBUF_INCLUDED_certificate_2eproto