initial commit

This commit is contained in:
Sean Chien 2022-07-12 15:53:59 +08:00
commit e387ff651a
22 changed files with 14665 additions and 0 deletions

7
README.md Normal file
View File

@ -0,0 +1,7 @@
# 作业题目
## 基本题目
请基于//gen目录下的桩代码基于自己熟悉的程序语言开发对应的服务端程序和客户端程序。
服务端程序提供PutPet、GetPet、DeletePet三个接口客户端访问这三个服务进行宠物数据的写入、查询和删除操作。

10
buf.gen.yaml Normal file
View File

@ -0,0 +1,10 @@
version: v1
plugins:
- name: cpp
out: gen/cpp
- name: java
out: gen/java
- name: go
out: gen/go
- name: python
out: gen/python

3
buf.work.yaml Normal file
View File

@ -0,0 +1,3 @@
version: v1
directories:
- proto

0
client/README.md Normal file
View File

View File

@ -0,0 +1,874 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/type/datetime.proto
#include "google/type/datetime.pb.h"
#include <algorithm>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
PROTOBUF_PRAGMA_INIT_SEG
namespace google {
namespace type {
constexpr DateTime::DateTime(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: year_(0)
, month_(0)
, day_(0)
, hours_(0)
, minutes_(0)
, seconds_(0)
, nanos_(0)
, _oneof_case_{}{}
struct DateTimeDefaultTypeInternal {
constexpr DateTimeDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~DateTimeDefaultTypeInternal() {}
union {
DateTime _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DateTimeDefaultTypeInternal _DateTime_default_instance_;
constexpr TimeZone::TimeZone(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, version_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
struct TimeZoneDefaultTypeInternal {
constexpr TimeZoneDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~TimeZoneDefaultTypeInternal() {}
union {
TimeZone _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TimeZoneDefaultTypeInternal _TimeZone_default_instance_;
} // namespace type
} // namespace google
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2ftype_2fdatetime_2eproto[2];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2ftype_2fdatetime_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2ftype_2fdatetime_2eproto = nullptr;
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2ftype_2fdatetime_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::google::type::DateTime, _internal_metadata_),
~0u, // no _extensions_
PROTOBUF_FIELD_OFFSET(::google::type::DateTime, _oneof_case_[0]),
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::google::type::DateTime, year_),
PROTOBUF_FIELD_OFFSET(::google::type::DateTime, month_),
PROTOBUF_FIELD_OFFSET(::google::type::DateTime, day_),
PROTOBUF_FIELD_OFFSET(::google::type::DateTime, hours_),
PROTOBUF_FIELD_OFFSET(::google::type::DateTime, minutes_),
PROTOBUF_FIELD_OFFSET(::google::type::DateTime, seconds_),
PROTOBUF_FIELD_OFFSET(::google::type::DateTime, nanos_),
::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
PROTOBUF_FIELD_OFFSET(::google::type::DateTime, time_offset_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::google::type::TimeZone, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::google::type::TimeZone, id_),
PROTOBUF_FIELD_OFFSET(::google::type::TimeZone, version_),
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(::google::type::DateTime)},
{ 15, -1, sizeof(::google::type::TimeZone)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::type::_DateTime_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::type::_TimeZone_default_instance_),
};
const char descriptor_table_protodef_google_2ftype_2fdatetime_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\032google/type/datetime.proto\022\013google.typ"
"e\032\036google/protobuf/duration.proto\"\247\002\n\010Da"
"teTime\022\022\n\004year\030\001 \001(\005R\004year\022\024\n\005month\030\002 \001("
"\005R\005month\022\020\n\003day\030\003 \001(\005R\003day\022\024\n\005hours\030\004 \001("
"\005R\005hours\022\030\n\007minutes\030\005 \001(\005R\007minutes\022\030\n\007se"
"conds\030\006 \001(\005R\007seconds\022\024\n\005nanos\030\007 \001(\005R\005nan"
"os\022:\n\nutc_offset\030\010 \001(\0132\031.google.protobuf"
".DurationH\000R\tutcOffset\0224\n\ttime_zone\030\t \001("
"\0132\025.google.type.TimeZoneH\000R\010timeZoneB\r\n\013"
"time_offset\"4\n\010TimeZone\022\016\n\002id\030\001 \001(\tR\002id\022"
"\030\n\007version\030\002 \001(\tR\007versionBi\n\017com.google."
"typeB\rDateTimeProtoP\001Z<google.golang.org"
"/genproto/googleapis/type/datetime;datet"
"ime\370\001\001\242\002\003GTPb\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_google_2ftype_2fdatetime_2eproto_deps[1] = {
&::descriptor_table_google_2fprotobuf_2fduration_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2ftype_2fdatetime_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2ftype_2fdatetime_2eproto = {
false, false, 540, descriptor_table_protodef_google_2ftype_2fdatetime_2eproto, "google/type/datetime.proto",
&descriptor_table_google_2ftype_2fdatetime_2eproto_once, descriptor_table_google_2ftype_2fdatetime_2eproto_deps, 1, 2,
schemas, file_default_instances, TableStruct_google_2ftype_2fdatetime_2eproto::offsets,
file_level_metadata_google_2ftype_2fdatetime_2eproto, file_level_enum_descriptors_google_2ftype_2fdatetime_2eproto, file_level_service_descriptors_google_2ftype_2fdatetime_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_google_2ftype_2fdatetime_2eproto_getter() {
return &descriptor_table_google_2ftype_2fdatetime_2eproto;
}
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_google_2ftype_2fdatetime_2eproto(&descriptor_table_google_2ftype_2fdatetime_2eproto);
namespace google {
namespace type {
// ===================================================================
class DateTime::_Internal {
public:
static const PROTOBUF_NAMESPACE_ID::Duration& utc_offset(const DateTime* msg);
static const ::google::type::TimeZone& time_zone(const DateTime* msg);
};
const PROTOBUF_NAMESPACE_ID::Duration&
DateTime::_Internal::utc_offset(const DateTime* msg) {
return *msg->time_offset_.utc_offset_;
}
const ::google::type::TimeZone&
DateTime::_Internal::time_zone(const DateTime* msg) {
return *msg->time_offset_.time_zone_;
}
void DateTime::set_allocated_utc_offset(PROTOBUF_NAMESPACE_ID::Duration* utc_offset) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
clear_time_offset();
if (utc_offset) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<
::PROTOBUF_NAMESPACE_ID::MessageLite>::GetOwningArena(
reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(utc_offset));
if (message_arena != submessage_arena) {
utc_offset = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, utc_offset, submessage_arena);
}
set_has_utc_offset();
time_offset_.utc_offset_ = utc_offset;
}
// @@protoc_insertion_point(field_set_allocated:google.type.DateTime.utc_offset)
}
void DateTime::clear_utc_offset() {
if (_internal_has_utc_offset()) {
if (GetArenaForAllocation() == nullptr) {
delete time_offset_.utc_offset_;
}
clear_has_time_offset();
}
}
void DateTime::set_allocated_time_zone(::google::type::TimeZone* time_zone) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
clear_time_offset();
if (time_zone) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::google::type::TimeZone>::GetOwningArena(time_zone);
if (message_arena != submessage_arena) {
time_zone = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, time_zone, submessage_arena);
}
set_has_time_zone();
time_offset_.time_zone_ = time_zone;
}
// @@protoc_insertion_point(field_set_allocated:google.type.DateTime.time_zone)
}
DateTime::DateTime(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:google.type.DateTime)
}
DateTime::DateTime(const DateTime& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&year_, &from.year_,
static_cast<size_t>(reinterpret_cast<char*>(&nanos_) -
reinterpret_cast<char*>(&year_)) + sizeof(nanos_));
clear_has_time_offset();
switch (from.time_offset_case()) {
case kUtcOffset: {
_internal_mutable_utc_offset()->PROTOBUF_NAMESPACE_ID::Duration::MergeFrom(from._internal_utc_offset());
break;
}
case kTimeZone: {
_internal_mutable_time_zone()->::google::type::TimeZone::MergeFrom(from._internal_time_zone());
break;
}
case TIME_OFFSET_NOT_SET: {
break;
}
}
// @@protoc_insertion_point(copy_constructor:google.type.DateTime)
}
inline void DateTime::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&year_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&nanos_) -
reinterpret_cast<char*>(&year_)) + sizeof(nanos_));
clear_has_time_offset();
}
DateTime::~DateTime() {
// @@protoc_insertion_point(destructor:google.type.DateTime)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void DateTime::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
if (has_time_offset()) {
clear_time_offset();
}
}
void DateTime::ArenaDtor(void* object) {
DateTime* _this = reinterpret_cast< DateTime* >(object);
(void)_this;
}
void DateTime::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void DateTime::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void DateTime::clear_time_offset() {
// @@protoc_insertion_point(one_of_clear_start:google.type.DateTime)
switch (time_offset_case()) {
case kUtcOffset: {
if (GetArenaForAllocation() == nullptr) {
delete time_offset_.utc_offset_;
}
break;
}
case kTimeZone: {
if (GetArenaForAllocation() == nullptr) {
delete time_offset_.time_zone_;
}
break;
}
case TIME_OFFSET_NOT_SET: {
break;
}
}
_oneof_case_[0] = TIME_OFFSET_NOT_SET;
}
void DateTime::Clear() {
// @@protoc_insertion_point(message_clear_start:google.type.DateTime)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
::memset(&year_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&nanos_) -
reinterpret_cast<char*>(&year_)) + sizeof(nanos_));
clear_time_offset();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* DateTime::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// int32 year = 1 [json_name = "year"];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
year_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int32 month = 2 [json_name = "month"];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
month_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int32 day = 3 [json_name = "day"];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
day_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int32 hours = 4 [json_name = "hours"];
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
hours_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int32 minutes = 5 [json_name = "minutes"];
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
minutes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int32 seconds = 6 [json_name = "seconds"];
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) {
seconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// int32 nanos = 7 [json_name = "nanos"];
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
nanos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// .google.protobuf.Duration utc_offset = 8 [json_name = "utcOffset"];
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) {
ptr = ctx->ParseMessage(_internal_mutable_utc_offset(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// .google.type.TimeZone time_zone = 9 [json_name = "timeZone"];
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) {
ptr = ctx->ParseMessage(_internal_mutable_time_zone(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
::PROTOBUF_NAMESPACE_ID::uint8* DateTime::_InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.type.DateTime)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// int32 year = 1 [json_name = "year"];
if (this->_internal_year() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_year(), target);
}
// int32 month = 2 [json_name = "month"];
if (this->_internal_month() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_month(), target);
}
// int32 day = 3 [json_name = "day"];
if (this->_internal_day() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_day(), target);
}
// int32 hours = 4 [json_name = "hours"];
if (this->_internal_hours() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_hours(), target);
}
// int32 minutes = 5 [json_name = "minutes"];
if (this->_internal_minutes() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_minutes(), target);
}
// int32 seconds = 6 [json_name = "seconds"];
if (this->_internal_seconds() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(6, this->_internal_seconds(), target);
}
// int32 nanos = 7 [json_name = "nanos"];
if (this->_internal_nanos() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->_internal_nanos(), target);
}
// .google.protobuf.Duration utc_offset = 8 [json_name = "utcOffset"];
if (_internal_has_utc_offset()) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
8, _Internal::utc_offset(this), target, stream);
}
// .google.type.TimeZone time_zone = 9 [json_name = "timeZone"];
if (_internal_has_time_zone()) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
9, _Internal::time_zone(this), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:google.type.DateTime)
return target;
}
size_t DateTime::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.type.DateTime)
size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// int32 year = 1 [json_name = "year"];
if (this->_internal_year() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
this->_internal_year());
}
// int32 month = 2 [json_name = "month"];
if (this->_internal_month() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
this->_internal_month());
}
// int32 day = 3 [json_name = "day"];
if (this->_internal_day() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
this->_internal_day());
}
// int32 hours = 4 [json_name = "hours"];
if (this->_internal_hours() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
this->_internal_hours());
}
// int32 minutes = 5 [json_name = "minutes"];
if (this->_internal_minutes() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
this->_internal_minutes());
}
// int32 seconds = 6 [json_name = "seconds"];
if (this->_internal_seconds() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
this->_internal_seconds());
}
// int32 nanos = 7 [json_name = "nanos"];
if (this->_internal_nanos() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
this->_internal_nanos());
}
switch (time_offset_case()) {
// .google.protobuf.Duration utc_offset = 8 [json_name = "utcOffset"];
case kUtcOffset: {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*time_offset_.utc_offset_);
break;
}
// .google.type.TimeZone time_zone = 9 [json_name = "timeZone"];
case kTimeZone: {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*time_offset_.time_zone_);
break;
}
case TIME_OFFSET_NOT_SET: {
break;
}
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
_internal_metadata_, total_size, &_cached_size_);
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData DateTime::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
DateTime::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*DateTime::GetClassData() const { return &_class_data_; }
void DateTime::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
const ::PROTOBUF_NAMESPACE_ID::Message&from) {
static_cast<DateTime *>(to)->MergeFrom(
static_cast<const DateTime &>(from));
}
void DateTime::MergeFrom(const DateTime& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.type.DateTime)
GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_year() != 0) {
_internal_set_year(from._internal_year());
}
if (from._internal_month() != 0) {
_internal_set_month(from._internal_month());
}
if (from._internal_day() != 0) {
_internal_set_day(from._internal_day());
}
if (from._internal_hours() != 0) {
_internal_set_hours(from._internal_hours());
}
if (from._internal_minutes() != 0) {
_internal_set_minutes(from._internal_minutes());
}
if (from._internal_seconds() != 0) {
_internal_set_seconds(from._internal_seconds());
}
if (from._internal_nanos() != 0) {
_internal_set_nanos(from._internal_nanos());
}
switch (from.time_offset_case()) {
case kUtcOffset: {
_internal_mutable_utc_offset()->PROTOBUF_NAMESPACE_ID::Duration::MergeFrom(from._internal_utc_offset());
break;
}
case kTimeZone: {
_internal_mutable_time_zone()->::google::type::TimeZone::MergeFrom(from._internal_time_zone());
break;
}
case TIME_OFFSET_NOT_SET: {
break;
}
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void DateTime::CopyFrom(const DateTime& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.type.DateTime)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool DateTime::IsInitialized() const {
return true;
}
void DateTime::InternalSwap(DateTime* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(DateTime, nanos_)
+ sizeof(DateTime::nanos_)
- PROTOBUF_FIELD_OFFSET(DateTime, year_)>(
reinterpret_cast<char*>(&year_),
reinterpret_cast<char*>(&other->year_));
swap(time_offset_, other->time_offset_);
swap(_oneof_case_[0], other->_oneof_case_[0]);
}
::PROTOBUF_NAMESPACE_ID::Metadata DateTime::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_google_2ftype_2fdatetime_2eproto_getter, &descriptor_table_google_2ftype_2fdatetime_2eproto_once,
file_level_metadata_google_2ftype_2fdatetime_2eproto[0]);
}
// ===================================================================
class TimeZone::_Internal {
public:
};
TimeZone::TimeZone(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:google.type.TimeZone)
}
TimeZone::TimeZone(const TimeZone& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from._internal_id().empty()) {
id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_id(),
GetArenaForAllocation());
}
version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (!from._internal_version().empty()) {
version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_version(),
GetArenaForAllocation());
}
// @@protoc_insertion_point(copy_constructor:google.type.TimeZone)
}
inline void TimeZone::SharedCtor() {
id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
version_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
TimeZone::~TimeZone() {
// @@protoc_insertion_point(destructor:google.type.TimeZone)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void TimeZone::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
version_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
void TimeZone::ArenaDtor(void* object) {
TimeZone* _this = reinterpret_cast< TimeZone* >(object);
(void)_this;
}
void TimeZone::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TimeZone::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void TimeZone::Clear() {
// @@protoc_insertion_point(message_clear_start:google.type.TimeZone)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
id_.ClearToEmpty();
version_.ClearToEmpty();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* TimeZone::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// string id = 1 [json_name = "id"];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
auto str = _internal_mutable_id();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.type.TimeZone.id"));
CHK_(ptr);
} else goto handle_unusual;
continue;
// string version = 2 [json_name = "version"];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
auto str = _internal_mutable_version();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.type.TimeZone.version"));
CHK_(ptr);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
::PROTOBUF_NAMESPACE_ID::uint8* TimeZone::_InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.type.TimeZone)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// string id = 1 [json_name = "id"];
if (!this->_internal_id().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_id().data(), static_cast<int>(this->_internal_id().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"google.type.TimeZone.id");
target = stream->WriteStringMaybeAliased(
1, this->_internal_id(), target);
}
// string version = 2 [json_name = "version"];
if (!this->_internal_version().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_version().data(), static_cast<int>(this->_internal_version().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"google.type.TimeZone.version");
target = stream->WriteStringMaybeAliased(
2, this->_internal_version(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:google.type.TimeZone)
return target;
}
size_t TimeZone::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.type.TimeZone)
size_t total_size = 0;
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// string id = 1 [json_name = "id"];
if (!this->_internal_id().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_id());
}
// string version = 2 [json_name = "version"];
if (!this->_internal_version().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_version());
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
_internal_metadata_, total_size, &_cached_size_);
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TimeZone::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
TimeZone::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TimeZone::GetClassData() const { return &_class_data_; }
void TimeZone::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to,
const ::PROTOBUF_NAMESPACE_ID::Message&from) {
static_cast<TimeZone *>(to)->MergeFrom(
static_cast<const TimeZone &>(from));
}
void TimeZone::MergeFrom(const TimeZone& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.type.TimeZone)
GOOGLE_DCHECK_NE(&from, this);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (!from._internal_id().empty()) {
_internal_set_id(from._internal_id());
}
if (!from._internal_version().empty()) {
_internal_set_version(from._internal_version());
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void TimeZone::CopyFrom(const TimeZone& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.type.TimeZone)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool TimeZone::IsInitialized() const {
return true;
}
void TimeZone::InternalSwap(TimeZone* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&id_, GetArenaForAllocation(),
&other->id_, other->GetArenaForAllocation()
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&version_, GetArenaForAllocation(),
&other->version_, other->GetArenaForAllocation()
);
}
::PROTOBUF_NAMESPACE_ID::Metadata TimeZone::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_google_2ftype_2fdatetime_2eproto_getter, &descriptor_table_google_2ftype_2fdatetime_2eproto_once,
file_level_metadata_google_2ftype_2fdatetime_2eproto[1]);
}
// @@protoc_insertion_point(namespace_scope)
} // namespace type
} // namespace google
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::google::type::DateTime* Arena::CreateMaybeMessage< ::google::type::DateTime >(Arena* arena) {
return Arena::CreateMessageInternal< ::google::type::DateTime >(arena);
}
template<> PROTOBUF_NOINLINE ::google::type::TimeZone* Arena::CreateMaybeMessage< ::google::type::TimeZone >(Arena* arena) {
return Arena::CreateMessageInternal< ::google::type::TimeZone >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>

View File

@ -0,0 +1,908 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/type/datetime.proto
#ifndef GOOGLE_PROTOBUF_INCLUDED_google_2ftype_2fdatetime_2eproto
#define GOOGLE_PROTOBUF_INCLUDED_google_2ftype_2fdatetime_2eproto
#include <limits>
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 3017000
#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 3017003 < 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/port_undef.inc>
#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/metadata_lite.h>
#include <google/protobuf/generated_message_reflection.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/unknown_field_set.h>
#include <google/protobuf/duration.pb.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#define PROTOBUF_INTERNAL_EXPORT_google_2ftype_2fdatetime_2eproto
PROTOBUF_NAMESPACE_OPEN
namespace internal {
class AnyMetadata;
} // namespace internal
PROTOBUF_NAMESPACE_CLOSE
// Internal implementation detail -- do not use these members.
struct TableStruct_google_2ftype_2fdatetime_2eproto {
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[2]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
};
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2ftype_2fdatetime_2eproto;
namespace google {
namespace type {
class DateTime;
struct DateTimeDefaultTypeInternal;
extern DateTimeDefaultTypeInternal _DateTime_default_instance_;
class TimeZone;
struct TimeZoneDefaultTypeInternal;
extern TimeZoneDefaultTypeInternal _TimeZone_default_instance_;
} // namespace type
} // namespace google
PROTOBUF_NAMESPACE_OPEN
template<> ::google::type::DateTime* Arena::CreateMaybeMessage<::google::type::DateTime>(Arena*);
template<> ::google::type::TimeZone* Arena::CreateMaybeMessage<::google::type::TimeZone>(Arena*);
PROTOBUF_NAMESPACE_CLOSE
namespace google {
namespace type {
// ===================================================================
class DateTime final :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.type.DateTime) */ {
public:
inline DateTime() : DateTime(nullptr) {}
~DateTime() override;
explicit constexpr DateTime(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
DateTime(const DateTime& from);
DateTime(DateTime&& from) noexcept
: DateTime() {
*this = ::std::move(from);
}
inline DateTime& operator=(const DateTime& from) {
CopyFrom(from);
return *this;
}
inline DateTime& operator=(DateTime&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return default_instance().GetMetadata().reflection;
}
static const DateTime& default_instance() {
return *internal_default_instance();
}
enum TimeOffsetCase {
kUtcOffset = 8,
kTimeZone = 9,
TIME_OFFSET_NOT_SET = 0,
};
static inline const DateTime* internal_default_instance() {
return reinterpret_cast<const DateTime*>(
&_DateTime_default_instance_);
}
static constexpr int kIndexInFileMessages =
0;
friend void swap(DateTime& a, DateTime& b) {
a.Swap(&b);
}
inline void Swap(DateTime* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(DateTime* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline DateTime* New() const final {
return new DateTime();
}
DateTime* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<DateTime>(arena);
}
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const DateTime& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
void MergeFrom(const DateTime& from);
private:
static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to, const ::PROTOBUF_NAMESPACE_ID::Message&from);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(DateTime* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "google.type.DateTime";
}
protected:
explicit DateTime(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned = false);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
static const ClassData _class_data_;
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kYearFieldNumber = 1,
kMonthFieldNumber = 2,
kDayFieldNumber = 3,
kHoursFieldNumber = 4,
kMinutesFieldNumber = 5,
kSecondsFieldNumber = 6,
kNanosFieldNumber = 7,
kUtcOffsetFieldNumber = 8,
kTimeZoneFieldNumber = 9,
};
// int32 year = 1 [json_name = "year"];
void clear_year();
::PROTOBUF_NAMESPACE_ID::int32 year() const;
void set_year(::PROTOBUF_NAMESPACE_ID::int32 value);
private:
::PROTOBUF_NAMESPACE_ID::int32 _internal_year() const;
void _internal_set_year(::PROTOBUF_NAMESPACE_ID::int32 value);
public:
// int32 month = 2 [json_name = "month"];
void clear_month();
::PROTOBUF_NAMESPACE_ID::int32 month() const;
void set_month(::PROTOBUF_NAMESPACE_ID::int32 value);
private:
::PROTOBUF_NAMESPACE_ID::int32 _internal_month() const;
void _internal_set_month(::PROTOBUF_NAMESPACE_ID::int32 value);
public:
// int32 day = 3 [json_name = "day"];
void clear_day();
::PROTOBUF_NAMESPACE_ID::int32 day() const;
void set_day(::PROTOBUF_NAMESPACE_ID::int32 value);
private:
::PROTOBUF_NAMESPACE_ID::int32 _internal_day() const;
void _internal_set_day(::PROTOBUF_NAMESPACE_ID::int32 value);
public:
// int32 hours = 4 [json_name = "hours"];
void clear_hours();
::PROTOBUF_NAMESPACE_ID::int32 hours() const;
void set_hours(::PROTOBUF_NAMESPACE_ID::int32 value);
private:
::PROTOBUF_NAMESPACE_ID::int32 _internal_hours() const;
void _internal_set_hours(::PROTOBUF_NAMESPACE_ID::int32 value);
public:
// int32 minutes = 5 [json_name = "minutes"];
void clear_minutes();
::PROTOBUF_NAMESPACE_ID::int32 minutes() const;
void set_minutes(::PROTOBUF_NAMESPACE_ID::int32 value);
private:
::PROTOBUF_NAMESPACE_ID::int32 _internal_minutes() const;
void _internal_set_minutes(::PROTOBUF_NAMESPACE_ID::int32 value);
public:
// int32 seconds = 6 [json_name = "seconds"];
void clear_seconds();
::PROTOBUF_NAMESPACE_ID::int32 seconds() const;
void set_seconds(::PROTOBUF_NAMESPACE_ID::int32 value);
private:
::PROTOBUF_NAMESPACE_ID::int32 _internal_seconds() const;
void _internal_set_seconds(::PROTOBUF_NAMESPACE_ID::int32 value);
public:
// int32 nanos = 7 [json_name = "nanos"];
void clear_nanos();
::PROTOBUF_NAMESPACE_ID::int32 nanos() const;
void set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value);
private:
::PROTOBUF_NAMESPACE_ID::int32 _internal_nanos() const;
void _internal_set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value);
public:
// .google.protobuf.Duration utc_offset = 8 [json_name = "utcOffset"];
bool has_utc_offset() const;
private:
bool _internal_has_utc_offset() const;
public:
void clear_utc_offset();
const PROTOBUF_NAMESPACE_ID::Duration& utc_offset() const;
PROTOBUF_MUST_USE_RESULT PROTOBUF_NAMESPACE_ID::Duration* release_utc_offset();
PROTOBUF_NAMESPACE_ID::Duration* mutable_utc_offset();
void set_allocated_utc_offset(PROTOBUF_NAMESPACE_ID::Duration* utc_offset);
private:
const PROTOBUF_NAMESPACE_ID::Duration& _internal_utc_offset() const;
PROTOBUF_NAMESPACE_ID::Duration* _internal_mutable_utc_offset();
public:
void unsafe_arena_set_allocated_utc_offset(
PROTOBUF_NAMESPACE_ID::Duration* utc_offset);
PROTOBUF_NAMESPACE_ID::Duration* unsafe_arena_release_utc_offset();
// .google.type.TimeZone time_zone = 9 [json_name = "timeZone"];
bool has_time_zone() const;
private:
bool _internal_has_time_zone() const;
public:
void clear_time_zone();
const ::google::type::TimeZone& time_zone() const;
PROTOBUF_MUST_USE_RESULT ::google::type::TimeZone* release_time_zone();
::google::type::TimeZone* mutable_time_zone();
void set_allocated_time_zone(::google::type::TimeZone* time_zone);
private:
const ::google::type::TimeZone& _internal_time_zone() const;
::google::type::TimeZone* _internal_mutable_time_zone();
public:
void unsafe_arena_set_allocated_time_zone(
::google::type::TimeZone* time_zone);
::google::type::TimeZone* unsafe_arena_release_time_zone();
void clear_time_offset();
TimeOffsetCase time_offset_case() const;
// @@protoc_insertion_point(class_scope:google.type.DateTime)
private:
class _Internal;
void set_has_utc_offset();
void set_has_time_zone();
inline bool has_time_offset() const;
inline void clear_has_time_offset();
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::int32 year_;
::PROTOBUF_NAMESPACE_ID::int32 month_;
::PROTOBUF_NAMESPACE_ID::int32 day_;
::PROTOBUF_NAMESPACE_ID::int32 hours_;
::PROTOBUF_NAMESPACE_ID::int32 minutes_;
::PROTOBUF_NAMESPACE_ID::int32 seconds_;
::PROTOBUF_NAMESPACE_ID::int32 nanos_;
union TimeOffsetUnion {
constexpr TimeOffsetUnion() : _constinit_{} {}
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_;
PROTOBUF_NAMESPACE_ID::Duration* utc_offset_;
::google::type::TimeZone* time_zone_;
} time_offset_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
::PROTOBUF_NAMESPACE_ID::uint32 _oneof_case_[1];
friend struct ::TableStruct_google_2ftype_2fdatetime_2eproto;
};
// -------------------------------------------------------------------
class TimeZone final :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.type.TimeZone) */ {
public:
inline TimeZone() : TimeZone(nullptr) {}
~TimeZone() override;
explicit constexpr TimeZone(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
TimeZone(const TimeZone& from);
TimeZone(TimeZone&& from) noexcept
: TimeZone() {
*this = ::std::move(from);
}
inline TimeZone& operator=(const TimeZone& from) {
CopyFrom(from);
return *this;
}
inline TimeZone& operator=(TimeZone&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()) {
InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return default_instance().GetMetadata().reflection;
}
static const TimeZone& default_instance() {
return *internal_default_instance();
}
static inline const TimeZone* internal_default_instance() {
return reinterpret_cast<const TimeZone*>(
&_TimeZone_default_instance_);
}
static constexpr int kIndexInFileMessages =
1;
friend void swap(TimeZone& a, TimeZone& b) {
a.Swap(&b);
}
inline void Swap(TimeZone* other) {
if (other == this) return;
if (GetOwningArena() == other->GetOwningArena()) {
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(TimeZone* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline TimeZone* New() const final {
return new TimeZone();
}
TimeZone* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<TimeZone>(arena);
}
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const TimeZone& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
void MergeFrom(const TimeZone& from);
private:
static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to, const ::PROTOBUF_NAMESPACE_ID::Message&from);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(TimeZone* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "google.type.TimeZone";
}
protected:
explicit TimeZone(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned = false);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
static const ClassData _class_data_;
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kIdFieldNumber = 1,
kVersionFieldNumber = 2,
};
// string id = 1 [json_name = "id"];
void clear_id();
const std::string& id() const;
template <typename ArgT0 = const std::string&, typename... ArgT>
void set_id(ArgT0&& arg0, ArgT... args);
std::string* mutable_id();
PROTOBUF_MUST_USE_RESULT std::string* release_id();
void set_allocated_id(std::string* id);
private:
const std::string& _internal_id() const;
inline PROTOBUF_ALWAYS_INLINE void _internal_set_id(const std::string& value);
std::string* _internal_mutable_id();
public:
// string version = 2 [json_name = "version"];
void clear_version();
const std::string& version() const;
template <typename ArgT0 = const std::string&, typename... ArgT>
void set_version(ArgT0&& arg0, ArgT... args);
std::string* mutable_version();
PROTOBUF_MUST_USE_RESULT std::string* release_version();
void set_allocated_version(std::string* version);
private:
const std::string& _internal_version() const;
inline PROTOBUF_ALWAYS_INLINE void _internal_set_version(const std::string& value);
std::string* _internal_mutable_version();
public:
// @@protoc_insertion_point(class_scope:google.type.TimeZone)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr id_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr version_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_google_2ftype_2fdatetime_2eproto;
};
// ===================================================================
// ===================================================================
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__
// DateTime
// int32 year = 1 [json_name = "year"];
inline void DateTime::clear_year() {
year_ = 0;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 DateTime::_internal_year() const {
return year_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 DateTime::year() const {
// @@protoc_insertion_point(field_get:google.type.DateTime.year)
return _internal_year();
}
inline void DateTime::_internal_set_year(::PROTOBUF_NAMESPACE_ID::int32 value) {
year_ = value;
}
inline void DateTime::set_year(::PROTOBUF_NAMESPACE_ID::int32 value) {
_internal_set_year(value);
// @@protoc_insertion_point(field_set:google.type.DateTime.year)
}
// int32 month = 2 [json_name = "month"];
inline void DateTime::clear_month() {
month_ = 0;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 DateTime::_internal_month() const {
return month_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 DateTime::month() const {
// @@protoc_insertion_point(field_get:google.type.DateTime.month)
return _internal_month();
}
inline void DateTime::_internal_set_month(::PROTOBUF_NAMESPACE_ID::int32 value) {
month_ = value;
}
inline void DateTime::set_month(::PROTOBUF_NAMESPACE_ID::int32 value) {
_internal_set_month(value);
// @@protoc_insertion_point(field_set:google.type.DateTime.month)
}
// int32 day = 3 [json_name = "day"];
inline void DateTime::clear_day() {
day_ = 0;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 DateTime::_internal_day() const {
return day_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 DateTime::day() const {
// @@protoc_insertion_point(field_get:google.type.DateTime.day)
return _internal_day();
}
inline void DateTime::_internal_set_day(::PROTOBUF_NAMESPACE_ID::int32 value) {
day_ = value;
}
inline void DateTime::set_day(::PROTOBUF_NAMESPACE_ID::int32 value) {
_internal_set_day(value);
// @@protoc_insertion_point(field_set:google.type.DateTime.day)
}
// int32 hours = 4 [json_name = "hours"];
inline void DateTime::clear_hours() {
hours_ = 0;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 DateTime::_internal_hours() const {
return hours_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 DateTime::hours() const {
// @@protoc_insertion_point(field_get:google.type.DateTime.hours)
return _internal_hours();
}
inline void DateTime::_internal_set_hours(::PROTOBUF_NAMESPACE_ID::int32 value) {
hours_ = value;
}
inline void DateTime::set_hours(::PROTOBUF_NAMESPACE_ID::int32 value) {
_internal_set_hours(value);
// @@protoc_insertion_point(field_set:google.type.DateTime.hours)
}
// int32 minutes = 5 [json_name = "minutes"];
inline void DateTime::clear_minutes() {
minutes_ = 0;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 DateTime::_internal_minutes() const {
return minutes_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 DateTime::minutes() const {
// @@protoc_insertion_point(field_get:google.type.DateTime.minutes)
return _internal_minutes();
}
inline void DateTime::_internal_set_minutes(::PROTOBUF_NAMESPACE_ID::int32 value) {
minutes_ = value;
}
inline void DateTime::set_minutes(::PROTOBUF_NAMESPACE_ID::int32 value) {
_internal_set_minutes(value);
// @@protoc_insertion_point(field_set:google.type.DateTime.minutes)
}
// int32 seconds = 6 [json_name = "seconds"];
inline void DateTime::clear_seconds() {
seconds_ = 0;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 DateTime::_internal_seconds() const {
return seconds_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 DateTime::seconds() const {
// @@protoc_insertion_point(field_get:google.type.DateTime.seconds)
return _internal_seconds();
}
inline void DateTime::_internal_set_seconds(::PROTOBUF_NAMESPACE_ID::int32 value) {
seconds_ = value;
}
inline void DateTime::set_seconds(::PROTOBUF_NAMESPACE_ID::int32 value) {
_internal_set_seconds(value);
// @@protoc_insertion_point(field_set:google.type.DateTime.seconds)
}
// int32 nanos = 7 [json_name = "nanos"];
inline void DateTime::clear_nanos() {
nanos_ = 0;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 DateTime::_internal_nanos() const {
return nanos_;
}
inline ::PROTOBUF_NAMESPACE_ID::int32 DateTime::nanos() const {
// @@protoc_insertion_point(field_get:google.type.DateTime.nanos)
return _internal_nanos();
}
inline void DateTime::_internal_set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value) {
nanos_ = value;
}
inline void DateTime::set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value) {
_internal_set_nanos(value);
// @@protoc_insertion_point(field_set:google.type.DateTime.nanos)
}
// .google.protobuf.Duration utc_offset = 8 [json_name = "utcOffset"];
inline bool DateTime::_internal_has_utc_offset() const {
return time_offset_case() == kUtcOffset;
}
inline bool DateTime::has_utc_offset() const {
return _internal_has_utc_offset();
}
inline void DateTime::set_has_utc_offset() {
_oneof_case_[0] = kUtcOffset;
}
inline PROTOBUF_NAMESPACE_ID::Duration* DateTime::release_utc_offset() {
// @@protoc_insertion_point(field_release:google.type.DateTime.utc_offset)
if (_internal_has_utc_offset()) {
clear_has_time_offset();
PROTOBUF_NAMESPACE_ID::Duration* temp = time_offset_.utc_offset_;
if (GetArenaForAllocation() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
}
time_offset_.utc_offset_ = nullptr;
return temp;
} else {
return nullptr;
}
}
inline const PROTOBUF_NAMESPACE_ID::Duration& DateTime::_internal_utc_offset() const {
return _internal_has_utc_offset()
? *time_offset_.utc_offset_
: reinterpret_cast< PROTOBUF_NAMESPACE_ID::Duration&>(PROTOBUF_NAMESPACE_ID::_Duration_default_instance_);
}
inline const PROTOBUF_NAMESPACE_ID::Duration& DateTime::utc_offset() const {
// @@protoc_insertion_point(field_get:google.type.DateTime.utc_offset)
return _internal_utc_offset();
}
inline PROTOBUF_NAMESPACE_ID::Duration* DateTime::unsafe_arena_release_utc_offset() {
// @@protoc_insertion_point(field_unsafe_arena_release:google.type.DateTime.utc_offset)
if (_internal_has_utc_offset()) {
clear_has_time_offset();
PROTOBUF_NAMESPACE_ID::Duration* temp = time_offset_.utc_offset_;
time_offset_.utc_offset_ = nullptr;
return temp;
} else {
return nullptr;
}
}
inline void DateTime::unsafe_arena_set_allocated_utc_offset(PROTOBUF_NAMESPACE_ID::Duration* utc_offset) {
clear_time_offset();
if (utc_offset) {
set_has_utc_offset();
time_offset_.utc_offset_ = utc_offset;
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.type.DateTime.utc_offset)
}
inline PROTOBUF_NAMESPACE_ID::Duration* DateTime::_internal_mutable_utc_offset() {
if (!_internal_has_utc_offset()) {
clear_time_offset();
set_has_utc_offset();
time_offset_.utc_offset_ = CreateMaybeMessage< PROTOBUF_NAMESPACE_ID::Duration >(GetArenaForAllocation());
}
return time_offset_.utc_offset_;
}
inline PROTOBUF_NAMESPACE_ID::Duration* DateTime::mutable_utc_offset() {
PROTOBUF_NAMESPACE_ID::Duration* _msg = _internal_mutable_utc_offset();
// @@protoc_insertion_point(field_mutable:google.type.DateTime.utc_offset)
return _msg;
}
// .google.type.TimeZone time_zone = 9 [json_name = "timeZone"];
inline bool DateTime::_internal_has_time_zone() const {
return time_offset_case() == kTimeZone;
}
inline bool DateTime::has_time_zone() const {
return _internal_has_time_zone();
}
inline void DateTime::set_has_time_zone() {
_oneof_case_[0] = kTimeZone;
}
inline void DateTime::clear_time_zone() {
if (_internal_has_time_zone()) {
if (GetArenaForAllocation() == nullptr) {
delete time_offset_.time_zone_;
}
clear_has_time_offset();
}
}
inline ::google::type::TimeZone* DateTime::release_time_zone() {
// @@protoc_insertion_point(field_release:google.type.DateTime.time_zone)
if (_internal_has_time_zone()) {
clear_has_time_offset();
::google::type::TimeZone* temp = time_offset_.time_zone_;
if (GetArenaForAllocation() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
}
time_offset_.time_zone_ = nullptr;
return temp;
} else {
return nullptr;
}
}
inline const ::google::type::TimeZone& DateTime::_internal_time_zone() const {
return _internal_has_time_zone()
? *time_offset_.time_zone_
: reinterpret_cast< ::google::type::TimeZone&>(::google::type::_TimeZone_default_instance_);
}
inline const ::google::type::TimeZone& DateTime::time_zone() const {
// @@protoc_insertion_point(field_get:google.type.DateTime.time_zone)
return _internal_time_zone();
}
inline ::google::type::TimeZone* DateTime::unsafe_arena_release_time_zone() {
// @@protoc_insertion_point(field_unsafe_arena_release:google.type.DateTime.time_zone)
if (_internal_has_time_zone()) {
clear_has_time_offset();
::google::type::TimeZone* temp = time_offset_.time_zone_;
time_offset_.time_zone_ = nullptr;
return temp;
} else {
return nullptr;
}
}
inline void DateTime::unsafe_arena_set_allocated_time_zone(::google::type::TimeZone* time_zone) {
clear_time_offset();
if (time_zone) {
set_has_time_zone();
time_offset_.time_zone_ = time_zone;
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.type.DateTime.time_zone)
}
inline ::google::type::TimeZone* DateTime::_internal_mutable_time_zone() {
if (!_internal_has_time_zone()) {
clear_time_offset();
set_has_time_zone();
time_offset_.time_zone_ = CreateMaybeMessage< ::google::type::TimeZone >(GetArenaForAllocation());
}
return time_offset_.time_zone_;
}
inline ::google::type::TimeZone* DateTime::mutable_time_zone() {
::google::type::TimeZone* _msg = _internal_mutable_time_zone();
// @@protoc_insertion_point(field_mutable:google.type.DateTime.time_zone)
return _msg;
}
inline bool DateTime::has_time_offset() const {
return time_offset_case() != TIME_OFFSET_NOT_SET;
}
inline void DateTime::clear_has_time_offset() {
_oneof_case_[0] = TIME_OFFSET_NOT_SET;
}
inline DateTime::TimeOffsetCase DateTime::time_offset_case() const {
return DateTime::TimeOffsetCase(_oneof_case_[0]);
}
// -------------------------------------------------------------------
// TimeZone
// string id = 1 [json_name = "id"];
inline void TimeZone::clear_id() {
id_.ClearToEmpty();
}
inline const std::string& TimeZone::id() const {
// @@protoc_insertion_point(field_get:google.type.TimeZone.id)
return _internal_id();
}
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void TimeZone::set_id(ArgT0&& arg0, ArgT... args) {
id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.type.TimeZone.id)
}
inline std::string* TimeZone::mutable_id() {
std::string* _s = _internal_mutable_id();
// @@protoc_insertion_point(field_mutable:google.type.TimeZone.id)
return _s;
}
inline const std::string& TimeZone::_internal_id() const {
return id_.Get();
}
inline void TimeZone::_internal_set_id(const std::string& value) {
id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation());
}
inline std::string* TimeZone::_internal_mutable_id() {
return id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
}
inline std::string* TimeZone::release_id() {
// @@protoc_insertion_point(field_release:google.type.TimeZone.id)
return id_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
}
inline void TimeZone::set_allocated_id(std::string* id) {
if (id != nullptr) {
} else {
}
id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), id,
GetArenaForAllocation());
// @@protoc_insertion_point(field_set_allocated:google.type.TimeZone.id)
}
// string version = 2 [json_name = "version"];
inline void TimeZone::clear_version() {
version_.ClearToEmpty();
}
inline const std::string& TimeZone::version() const {
// @@protoc_insertion_point(field_get:google.type.TimeZone.version)
return _internal_version();
}
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void TimeZone::set_version(ArgT0&& arg0, ArgT... args) {
version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:google.type.TimeZone.version)
}
inline std::string* TimeZone::mutable_version() {
std::string* _s = _internal_mutable_version();
// @@protoc_insertion_point(field_mutable:google.type.TimeZone.version)
return _s;
}
inline const std::string& TimeZone::_internal_version() const {
return version_.Get();
}
inline void TimeZone::_internal_set_version(const std::string& value) {
version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation());
}
inline std::string* TimeZone::_internal_mutable_version() {
return version_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
}
inline std::string* TimeZone::release_version() {
// @@protoc_insertion_point(field_release:google.type.TimeZone.version)
return version_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
}
inline void TimeZone::set_allocated_version(std::string* version) {
if (version != nullptr) {
} else {
}
version_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), version,
GetArenaForAllocation());
// @@protoc_insertion_point(field_set_allocated:google.type.TimeZone.version)
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif // __GNUC__
// -------------------------------------------------------------------
// @@protoc_insertion_point(namespace_scope)
} // namespace type
} // namespace google
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2ftype_2fdatetime_2eproto

1775
gen/cpp/pet/v1/pet.pb.cc Normal file

File diff suppressed because it is too large Load Diff

1784
gen/cpp/pet/v1/pet.pb.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,400 @@
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.19.1
// source: google/type/datetime.proto
package datetime
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Represents civil time (or occasionally physical time).
//
// This type can represent a civil time in one of a few possible ways:
//
// * When utc_offset is set and time_zone is unset: a civil time on a calendar
// day with a particular offset from UTC.
// * When time_zone is set and utc_offset is unset: a civil time on a calendar
// day in a particular time zone.
// * When neither time_zone nor utc_offset is set: a civil time on a calendar
// day in local time.
//
// The date is relative to the Proleptic Gregorian Calendar.
//
// If year is 0, the DateTime is considered not to have a specific year. month
// and day must have valid, non-zero values.
//
// This type may also be used to represent a physical time if all the date and
// time fields are set and either case of the `time_offset` oneof is set.
// Consider using `Timestamp` message for physical time instead. If your use
// case also would like to store the user's timezone, that can be done in
// another field.
//
// This type is more flexible than some applications may want. Make sure to
// document and validate your application's limitations.
type DateTime struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a
// datetime without a year.
Year int32 `protobuf:"varint,1,opt,name=year,proto3" json:"year,omitempty"`
// Required. Month of year. Must be from 1 to 12.
Month int32 `protobuf:"varint,2,opt,name=month,proto3" json:"month,omitempty"`
// Required. Day of month. Must be from 1 to 31 and valid for the year and
// month.
Day int32 `protobuf:"varint,3,opt,name=day,proto3" json:"day,omitempty"`
// Required. Hours of day in 24 hour format. Should be from 0 to 23. An API
// may choose to allow the value "24:00:00" for scenarios like business
// closing time.
Hours int32 `protobuf:"varint,4,opt,name=hours,proto3" json:"hours,omitempty"`
// Required. Minutes of hour of day. Must be from 0 to 59.
Minutes int32 `protobuf:"varint,5,opt,name=minutes,proto3" json:"minutes,omitempty"`
// Required. Seconds of minutes of the time. Must normally be from 0 to 59. An
// API may allow the value 60 if it allows leap-seconds.
Seconds int32 `protobuf:"varint,6,opt,name=seconds,proto3" json:"seconds,omitempty"`
// Required. Fractions of seconds in nanoseconds. Must be from 0 to
// 999,999,999.
Nanos int32 `protobuf:"varint,7,opt,name=nanos,proto3" json:"nanos,omitempty"`
// Optional. Specifies either the UTC offset or the time zone of the DateTime.
// Choose carefully between them, considering that time zone data may change
// in the future (for example, a country modifies their DST start/end dates,
// and future DateTimes in the affected range had already been stored).
// If omitted, the DateTime is considered to be in local time.
//
// Types that are assignable to TimeOffset:
// *DateTime_UtcOffset
// *DateTime_TimeZone
TimeOffset isDateTime_TimeOffset `protobuf_oneof:"time_offset"`
}
func (x *DateTime) Reset() {
*x = DateTime{}
if protoimpl.UnsafeEnabled {
mi := &file_google_type_datetime_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DateTime) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DateTime) ProtoMessage() {}
func (x *DateTime) ProtoReflect() protoreflect.Message {
mi := &file_google_type_datetime_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DateTime.ProtoReflect.Descriptor instead.
func (*DateTime) Descriptor() ([]byte, []int) {
return file_google_type_datetime_proto_rawDescGZIP(), []int{0}
}
func (x *DateTime) GetYear() int32 {
if x != nil {
return x.Year
}
return 0
}
func (x *DateTime) GetMonth() int32 {
if x != nil {
return x.Month
}
return 0
}
func (x *DateTime) GetDay() int32 {
if x != nil {
return x.Day
}
return 0
}
func (x *DateTime) GetHours() int32 {
if x != nil {
return x.Hours
}
return 0
}
func (x *DateTime) GetMinutes() int32 {
if x != nil {
return x.Minutes
}
return 0
}
func (x *DateTime) GetSeconds() int32 {
if x != nil {
return x.Seconds
}
return 0
}
func (x *DateTime) GetNanos() int32 {
if x != nil {
return x.Nanos
}
return 0
}
func (m *DateTime) GetTimeOffset() isDateTime_TimeOffset {
if m != nil {
return m.TimeOffset
}
return nil
}
func (x *DateTime) GetUtcOffset() *durationpb.Duration {
if x, ok := x.GetTimeOffset().(*DateTime_UtcOffset); ok {
return x.UtcOffset
}
return nil
}
func (x *DateTime) GetTimeZone() *TimeZone {
if x, ok := x.GetTimeOffset().(*DateTime_TimeZone); ok {
return x.TimeZone
}
return nil
}
type isDateTime_TimeOffset interface {
isDateTime_TimeOffset()
}
type DateTime_UtcOffset struct {
// UTC offset. Must be whole seconds, between -18 hours and +18 hours.
// For example, a UTC offset of -4:00 would be represented as
// { seconds: -14400 }.
UtcOffset *durationpb.Duration `protobuf:"bytes,8,opt,name=utc_offset,json=utcOffset,proto3,oneof"`
}
type DateTime_TimeZone struct {
// Time zone.
TimeZone *TimeZone `protobuf:"bytes,9,opt,name=time_zone,json=timeZone,proto3,oneof"`
}
func (*DateTime_UtcOffset) isDateTime_TimeOffset() {}
func (*DateTime_TimeZone) isDateTime_TimeOffset() {}
// Represents a time zone from the
// [IANA Time Zone Database](https://www.iana.org/time-zones).
type TimeZone struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// IANA Time Zone Database time zone, e.g. "America/New_York".
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Optional. IANA Time Zone Database version number, e.g. "2019a".
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
}
func (x *TimeZone) Reset() {
*x = TimeZone{}
if protoimpl.UnsafeEnabled {
mi := &file_google_type_datetime_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TimeZone) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TimeZone) ProtoMessage() {}
func (x *TimeZone) ProtoReflect() protoreflect.Message {
mi := &file_google_type_datetime_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TimeZone.ProtoReflect.Descriptor instead.
func (*TimeZone) Descriptor() ([]byte, []int) {
return file_google_type_datetime_proto_rawDescGZIP(), []int{1}
}
func (x *TimeZone) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *TimeZone) GetVersion() string {
if x != nil {
return x.Version
}
return ""
}
var File_google_type_datetime_proto protoreflect.FileDescriptor
var file_google_type_datetime_proto_rawDesc = []byte{
0x0a, 0x1a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x64, 0x61,
0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa7, 0x02, 0x0a, 0x08, 0x44, 0x61,
0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x01,
0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x79, 0x65, 0x61, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f,
0x6e, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x6f, 0x6e, 0x74, 0x68,
0x12, 0x10, 0x0a, 0x03, 0x64, 0x61, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x64,
0x61, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x68, 0x6f, 0x75, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
0x05, 0x52, 0x05, 0x68, 0x6f, 0x75, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x75,
0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x75, 0x74,
0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x06, 0x20,
0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05,
0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6e, 0x61, 0x6e,
0x6f, 0x73, 0x12, 0x3a, 0x0a, 0x0a, 0x75, 0x74, 0x63, 0x5f, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74,
0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x48, 0x00, 0x52, 0x09, 0x75, 0x74, 0x63, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x34,
0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
0x54, 0x69, 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x48, 0x00, 0x52, 0x08, 0x74, 0x69, 0x6d, 0x65,
0x5a, 0x6f, 0x6e, 0x65, 0x42, 0x0d, 0x0a, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6f, 0x66, 0x66,
0x73, 0x65, 0x74, 0x22, 0x34, 0x0a, 0x08, 0x54, 0x69, 0x6d, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x12,
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,
0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x69, 0x0a, 0x0f, 0x63, 0x6f, 0x6d,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x42, 0x0d, 0x44, 0x61,
0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67,
0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x61, 0x70, 0x69, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69,
0x6d, 0x65, 0x3b, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0xf8, 0x01, 0x01, 0xa2, 0x02,
0x03, 0x47, 0x54, 0x50, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_google_type_datetime_proto_rawDescOnce sync.Once
file_google_type_datetime_proto_rawDescData = file_google_type_datetime_proto_rawDesc
)
func file_google_type_datetime_proto_rawDescGZIP() []byte {
file_google_type_datetime_proto_rawDescOnce.Do(func() {
file_google_type_datetime_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_type_datetime_proto_rawDescData)
})
return file_google_type_datetime_proto_rawDescData
}
var file_google_type_datetime_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_google_type_datetime_proto_goTypes = []interface{}{
(*DateTime)(nil), // 0: google.type.DateTime
(*TimeZone)(nil), // 1: google.type.TimeZone
(*durationpb.Duration)(nil), // 2: google.protobuf.Duration
}
var file_google_type_datetime_proto_depIdxs = []int32{
2, // 0: google.type.DateTime.utc_offset:type_name -> google.protobuf.Duration
1, // 1: google.type.DateTime.time_zone:type_name -> google.type.TimeZone
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_google_type_datetime_proto_init() }
func file_google_type_datetime_proto_init() {
if File_google_type_datetime_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_google_type_datetime_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DateTime); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_google_type_datetime_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TimeZone); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_google_type_datetime_proto_msgTypes[0].OneofWrappers = []interface{}{
(*DateTime_UtcOffset)(nil),
(*DateTime_TimeZone)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_google_type_datetime_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_google_type_datetime_proto_goTypes,
DependencyIndexes: file_google_type_datetime_proto_depIdxs,
MessageInfos: file_google_type_datetime_proto_msgTypes,
}.Build()
File_google_type_datetime_proto = out.File
file_google_type_datetime_proto_rawDesc = nil
file_google_type_datetime_proto_goTypes = nil
file_google_type_datetime_proto_depIdxs = nil
}

644
gen/go/pet/v1/pet.pb.go Normal file
View File

@ -0,0 +1,644 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.19.1
// source: pet/v1/pet.proto
package v1
import (
datetime "google.golang.org/genproto/googleapis/type/datetime"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// PetType represents the different types of pets in the pet store.
type PetType int32
const (
PetType_PET_TYPE_UNSPECIFIED PetType = 0
PetType_PET_TYPE_CAT PetType = 1
PetType_PET_TYPE_DOG PetType = 2
PetType_PET_TYPE_SNAKE PetType = 3
PetType_PET_TYPE_HAMSTER PetType = 4
)
// Enum value maps for PetType.
var (
PetType_name = map[int32]string{
0: "PET_TYPE_UNSPECIFIED",
1: "PET_TYPE_CAT",
2: "PET_TYPE_DOG",
3: "PET_TYPE_SNAKE",
4: "PET_TYPE_HAMSTER",
}
PetType_value = map[string]int32{
"PET_TYPE_UNSPECIFIED": 0,
"PET_TYPE_CAT": 1,
"PET_TYPE_DOG": 2,
"PET_TYPE_SNAKE": 3,
"PET_TYPE_HAMSTER": 4,
}
)
func (x PetType) Enum() *PetType {
p := new(PetType)
*p = x
return p
}
func (x PetType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PetType) Descriptor() protoreflect.EnumDescriptor {
return file_pet_v1_pet_proto_enumTypes[0].Descriptor()
}
func (PetType) Type() protoreflect.EnumType {
return &file_pet_v1_pet_proto_enumTypes[0]
}
func (x PetType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PetType.Descriptor instead.
func (PetType) EnumDescriptor() ([]byte, []int) {
return file_pet_v1_pet_proto_rawDescGZIP(), []int{0}
}
// Pet represents a pet in the pet store.
type Pet struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PetType PetType `protobuf:"varint,1,opt,name=pet_type,json=petType,proto3,enum=pet.v1.PetType" json:"pet_type,omitempty"`
PetId string `protobuf:"bytes,2,opt,name=pet_id,json=petId,proto3" json:"pet_id,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
CreatedAt *datetime.DateTime `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
}
func (x *Pet) Reset() {
*x = Pet{}
if protoimpl.UnsafeEnabled {
mi := &file_pet_v1_pet_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Pet) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Pet) ProtoMessage() {}
func (x *Pet) ProtoReflect() protoreflect.Message {
mi := &file_pet_v1_pet_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Pet.ProtoReflect.Descriptor instead.
func (*Pet) Descriptor() ([]byte, []int) {
return file_pet_v1_pet_proto_rawDescGZIP(), []int{0}
}
func (x *Pet) GetPetType() PetType {
if x != nil {
return x.PetType
}
return PetType_PET_TYPE_UNSPECIFIED
}
func (x *Pet) GetPetId() string {
if x != nil {
return x.PetId
}
return ""
}
func (x *Pet) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Pet) GetCreatedAt() *datetime.DateTime {
if x != nil {
return x.CreatedAt
}
return nil
}
type GetPetRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PetId string `protobuf:"bytes,1,opt,name=pet_id,json=petId,proto3" json:"pet_id,omitempty"`
}
func (x *GetPetRequest) Reset() {
*x = GetPetRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_pet_v1_pet_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPetRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPetRequest) ProtoMessage() {}
func (x *GetPetRequest) ProtoReflect() protoreflect.Message {
mi := &file_pet_v1_pet_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPetRequest.ProtoReflect.Descriptor instead.
func (*GetPetRequest) Descriptor() ([]byte, []int) {
return file_pet_v1_pet_proto_rawDescGZIP(), []int{1}
}
func (x *GetPetRequest) GetPetId() string {
if x != nil {
return x.PetId
}
return ""
}
type GetPetResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Pet *Pet `protobuf:"bytes,1,opt,name=pet,proto3" json:"pet,omitempty"`
}
func (x *GetPetResponse) Reset() {
*x = GetPetResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_pet_v1_pet_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPetResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPetResponse) ProtoMessage() {}
func (x *GetPetResponse) ProtoReflect() protoreflect.Message {
mi := &file_pet_v1_pet_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPetResponse.ProtoReflect.Descriptor instead.
func (*GetPetResponse) Descriptor() ([]byte, []int) {
return file_pet_v1_pet_proto_rawDescGZIP(), []int{2}
}
func (x *GetPetResponse) GetPet() *Pet {
if x != nil {
return x.Pet
}
return nil
}
type PutPetRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PetType PetType `protobuf:"varint,1,opt,name=pet_type,json=petType,proto3,enum=pet.v1.PetType" json:"pet_type,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *PutPetRequest) Reset() {
*x = PutPetRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_pet_v1_pet_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PutPetRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PutPetRequest) ProtoMessage() {}
func (x *PutPetRequest) ProtoReflect() protoreflect.Message {
mi := &file_pet_v1_pet_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PutPetRequest.ProtoReflect.Descriptor instead.
func (*PutPetRequest) Descriptor() ([]byte, []int) {
return file_pet_v1_pet_proto_rawDescGZIP(), []int{3}
}
func (x *PutPetRequest) GetPetType() PetType {
if x != nil {
return x.PetType
}
return PetType_PET_TYPE_UNSPECIFIED
}
func (x *PutPetRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type PutPetResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Pet *Pet `protobuf:"bytes,1,opt,name=pet,proto3" json:"pet,omitempty"`
}
func (x *PutPetResponse) Reset() {
*x = PutPetResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_pet_v1_pet_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PutPetResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PutPetResponse) ProtoMessage() {}
func (x *PutPetResponse) ProtoReflect() protoreflect.Message {
mi := &file_pet_v1_pet_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PutPetResponse.ProtoReflect.Descriptor instead.
func (*PutPetResponse) Descriptor() ([]byte, []int) {
return file_pet_v1_pet_proto_rawDescGZIP(), []int{4}
}
func (x *PutPetResponse) GetPet() *Pet {
if x != nil {
return x.Pet
}
return nil
}
type DeletePetRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PetId string `protobuf:"bytes,1,opt,name=pet_id,json=petId,proto3" json:"pet_id,omitempty"`
}
func (x *DeletePetRequest) Reset() {
*x = DeletePetRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_pet_v1_pet_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeletePetRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeletePetRequest) ProtoMessage() {}
func (x *DeletePetRequest) ProtoReflect() protoreflect.Message {
mi := &file_pet_v1_pet_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeletePetRequest.ProtoReflect.Descriptor instead.
func (*DeletePetRequest) Descriptor() ([]byte, []int) {
return file_pet_v1_pet_proto_rawDescGZIP(), []int{5}
}
func (x *DeletePetRequest) GetPetId() string {
if x != nil {
return x.PetId
}
return ""
}
type DeletePetResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *DeletePetResponse) Reset() {
*x = DeletePetResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_pet_v1_pet_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeletePetResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeletePetResponse) ProtoMessage() {}
func (x *DeletePetResponse) ProtoReflect() protoreflect.Message {
mi := &file_pet_v1_pet_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeletePetResponse.ProtoReflect.Descriptor instead.
func (*DeletePetResponse) Descriptor() ([]byte, []int) {
return file_pet_v1_pet_proto_rawDescGZIP(), []int{6}
}
var File_pet_v1_pet_proto protoreflect.FileDescriptor
var file_pet_v1_pet_proto_rawDesc = []byte{
0x0a, 0x10, 0x70, 0x65, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x06, 0x70, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x1a, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x92, 0x01, 0x0a, 0x03, 0x50, 0x65, 0x74, 0x12, 0x2a,
0x0a, 0x08, 0x70, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
0x32, 0x0f, 0x2e, 0x70, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x74, 0x54, 0x79, 0x70,
0x65, 0x52, 0x07, 0x70, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x65,
0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x65, 0x74, 0x49,
0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65,
0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x26, 0x0a, 0x0d, 0x47,
0x65, 0x74, 0x50, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06,
0x70, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x65,
0x74, 0x49, 0x64, 0x22, 0x2f, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x74, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x03, 0x70, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x74, 0x52,
0x03, 0x70, 0x65, 0x74, 0x22, 0x4f, 0x0a, 0x0d, 0x50, 0x75, 0x74, 0x50, 0x65, 0x74, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x08, 0x70, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x70, 0x65, 0x74, 0x2e, 0x76, 0x31,
0x2e, 0x50, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x70, 0x65, 0x74, 0x54, 0x79, 0x70,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2f, 0x0a, 0x0e, 0x50, 0x75, 0x74, 0x50, 0x65, 0x74, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x03, 0x70, 0x65, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65,
0x74, 0x52, 0x03, 0x70, 0x65, 0x74, 0x22, 0x29, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x50, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x65,
0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x65, 0x74, 0x49,
0x64, 0x22, 0x13, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x65, 0x74, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x71, 0x0a, 0x07, 0x50, 0x65, 0x74, 0x54, 0x79, 0x70,
0x65, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e,
0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x50,
0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x41, 0x54, 0x10, 0x01, 0x12, 0x10, 0x0a,
0x0c, 0x50, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4f, 0x47, 0x10, 0x02, 0x12,
0x12, 0x0a, 0x0e, 0x50, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x4e, 0x41, 0x4b,
0x45, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f,
0x48, 0x41, 0x4d, 0x53, 0x54, 0x45, 0x52, 0x10, 0x04, 0x32, 0xcb, 0x01, 0x0a, 0x0f, 0x50, 0x65,
0x74, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x39, 0x0a,
0x06, 0x47, 0x65, 0x74, 0x50, 0x65, 0x74, 0x12, 0x15, 0x2e, 0x70, 0x65, 0x74, 0x2e, 0x76, 0x31,
0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
0x2e, 0x70, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x74, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x06, 0x50, 0x75, 0x74, 0x50,
0x65, 0x74, 0x12, 0x15, 0x2e, 0x70, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x74, 0x50,
0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x65, 0x74, 0x2e,
0x76, 0x31, 0x2e, 0x50, 0x75, 0x74, 0x50, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x09, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x65, 0x74,
0x12, 0x18, 0x2e, 0x70, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x50, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x65, 0x74,
0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x65, 0x74, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x08, 0x5a, 0x06, 0x70, 0x65, 0x74, 0x2f, 0x76,
0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_pet_v1_pet_proto_rawDescOnce sync.Once
file_pet_v1_pet_proto_rawDescData = file_pet_v1_pet_proto_rawDesc
)
func file_pet_v1_pet_proto_rawDescGZIP() []byte {
file_pet_v1_pet_proto_rawDescOnce.Do(func() {
file_pet_v1_pet_proto_rawDescData = protoimpl.X.CompressGZIP(file_pet_v1_pet_proto_rawDescData)
})
return file_pet_v1_pet_proto_rawDescData
}
var file_pet_v1_pet_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_pet_v1_pet_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_pet_v1_pet_proto_goTypes = []interface{}{
(PetType)(0), // 0: pet.v1.PetType
(*Pet)(nil), // 1: pet.v1.Pet
(*GetPetRequest)(nil), // 2: pet.v1.GetPetRequest
(*GetPetResponse)(nil), // 3: pet.v1.GetPetResponse
(*PutPetRequest)(nil), // 4: pet.v1.PutPetRequest
(*PutPetResponse)(nil), // 5: pet.v1.PutPetResponse
(*DeletePetRequest)(nil), // 6: pet.v1.DeletePetRequest
(*DeletePetResponse)(nil), // 7: pet.v1.DeletePetResponse
(*datetime.DateTime)(nil), // 8: google.type.DateTime
}
var file_pet_v1_pet_proto_depIdxs = []int32{
0, // 0: pet.v1.Pet.pet_type:type_name -> pet.v1.PetType
8, // 1: pet.v1.Pet.created_at:type_name -> google.type.DateTime
1, // 2: pet.v1.GetPetResponse.pet:type_name -> pet.v1.Pet
0, // 3: pet.v1.PutPetRequest.pet_type:type_name -> pet.v1.PetType
1, // 4: pet.v1.PutPetResponse.pet:type_name -> pet.v1.Pet
2, // 5: pet.v1.PetStoreService.GetPet:input_type -> pet.v1.GetPetRequest
4, // 6: pet.v1.PetStoreService.PutPet:input_type -> pet.v1.PutPetRequest
6, // 7: pet.v1.PetStoreService.DeletePet:input_type -> pet.v1.DeletePetRequest
3, // 8: pet.v1.PetStoreService.GetPet:output_type -> pet.v1.GetPetResponse
5, // 9: pet.v1.PetStoreService.PutPet:output_type -> pet.v1.PutPetResponse
7, // 10: pet.v1.PetStoreService.DeletePet:output_type -> pet.v1.DeletePetResponse
8, // [8:11] is the sub-list for method output_type
5, // [5:8] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_pet_v1_pet_proto_init() }
func file_pet_v1_pet_proto_init() {
if File_pet_v1_pet_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_pet_v1_pet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Pet); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pet_v1_pet_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPetRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pet_v1_pet_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPetResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pet_v1_pet_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PutPetRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pet_v1_pet_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PutPetResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pet_v1_pet_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeletePetRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_pet_v1_pet_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeletePetResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pet_v1_pet_proto_rawDesc,
NumEnums: 1,
NumMessages: 7,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_pet_v1_pet_proto_goTypes,
DependencyIndexes: file_pet_v1_pet_proto_depIdxs,
EnumInfos: file_pet_v1_pet_proto_enumTypes,
MessageInfos: file_pet_v1_pet_proto_msgTypes,
}.Build()
File_pet_v1_pet_proto = out.File
file_pet_v1_pet_proto_rawDesc = nil
file_pet_v1_pet_proto_goTypes = nil
file_pet_v1_pet_proto_depIdxs = nil
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,147 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/type/datetime.proto
package com.google.type;
public interface DateTimeOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.type.DateTime)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a
* datetime without a year.
* </pre>
*
* <code>int32 year = 1 [json_name = "year"];</code>
* @return The year.
*/
int getYear();
/**
* <pre>
* Required. Month of year. Must be from 1 to 12.
* </pre>
*
* <code>int32 month = 2 [json_name = "month"];</code>
* @return The month.
*/
int getMonth();
/**
* <pre>
* Required. Day of month. Must be from 1 to 31 and valid for the year and
* month.
* </pre>
*
* <code>int32 day = 3 [json_name = "day"];</code>
* @return The day.
*/
int getDay();
/**
* <pre>
* Required. Hours of day in 24 hour format. Should be from 0 to 23. An API
* may choose to allow the value "24:00:00" for scenarios like business
* closing time.
* </pre>
*
* <code>int32 hours = 4 [json_name = "hours"];</code>
* @return The hours.
*/
int getHours();
/**
* <pre>
* Required. Minutes of hour of day. Must be from 0 to 59.
* </pre>
*
* <code>int32 minutes = 5 [json_name = "minutes"];</code>
* @return The minutes.
*/
int getMinutes();
/**
* <pre>
* Required. Seconds of minutes of the time. Must normally be from 0 to 59. An
* API may allow the value 60 if it allows leap-seconds.
* </pre>
*
* <code>int32 seconds = 6 [json_name = "seconds"];</code>
* @return The seconds.
*/
int getSeconds();
/**
* <pre>
* Required. Fractions of seconds in nanoseconds. Must be from 0 to
* 999,999,999.
* </pre>
*
* <code>int32 nanos = 7 [json_name = "nanos"];</code>
* @return The nanos.
*/
int getNanos();
/**
* <pre>
* UTC offset. Must be whole seconds, between -18 hours and +18 hours.
* For example, a UTC offset of -4:00 would be represented as
* { seconds: -14400 }.
* </pre>
*
* <code>.google.protobuf.Duration utc_offset = 8 [json_name = "utcOffset"];</code>
* @return Whether the utcOffset field is set.
*/
boolean hasUtcOffset();
/**
* <pre>
* UTC offset. Must be whole seconds, between -18 hours and +18 hours.
* For example, a UTC offset of -4:00 would be represented as
* { seconds: -14400 }.
* </pre>
*
* <code>.google.protobuf.Duration utc_offset = 8 [json_name = "utcOffset"];</code>
* @return The utcOffset.
*/
com.google.protobuf.Duration getUtcOffset();
/**
* <pre>
* UTC offset. Must be whole seconds, between -18 hours and +18 hours.
* For example, a UTC offset of -4:00 would be represented as
* { seconds: -14400 }.
* </pre>
*
* <code>.google.protobuf.Duration utc_offset = 8 [json_name = "utcOffset"];</code>
*/
com.google.protobuf.DurationOrBuilder getUtcOffsetOrBuilder();
/**
* <pre>
* Time zone.
* </pre>
*
* <code>.google.type.TimeZone time_zone = 9 [json_name = "timeZone"];</code>
* @return Whether the timeZone field is set.
*/
boolean hasTimeZone();
/**
* <pre>
* Time zone.
* </pre>
*
* <code>.google.type.TimeZone time_zone = 9 [json_name = "timeZone"];</code>
* @return The timeZone.
*/
com.google.type.TimeZone getTimeZone();
/**
* <pre>
* Time zone.
* </pre>
*
* <code>.google.type.TimeZone time_zone = 9 [json_name = "timeZone"];</code>
*/
com.google.type.TimeZoneOrBuilder getTimeZoneOrBuilder();
public com.google.type.DateTime.TimeOffsetCase getTimeOffsetCase();
}

View File

@ -0,0 +1,72 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/type/datetime.proto
package com.google.type;
public final class DateTimeProto {
private DateTimeProto() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_type_DateTime_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_type_DateTime_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_type_TimeZone_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_type_TimeZone_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\032google/type/datetime.proto\022\013google.typ" +
"e\032\036google/protobuf/duration.proto\"\247\002\n\010Da" +
"teTime\022\022\n\004year\030\001 \001(\005R\004year\022\024\n\005month\030\002 \001(" +
"\005R\005month\022\020\n\003day\030\003 \001(\005R\003day\022\024\n\005hours\030\004 \001(" +
"\005R\005hours\022\030\n\007minutes\030\005 \001(\005R\007minutes\022\030\n\007se" +
"conds\030\006 \001(\005R\007seconds\022\024\n\005nanos\030\007 \001(\005R\005nan" +
"os\022:\n\nutc_offset\030\010 \001(\0132\031.google.protobuf" +
".DurationH\000R\tutcOffset\0224\n\ttime_zone\030\t \001(" +
"\0132\025.google.type.TimeZoneH\000R\010timeZoneB\r\n\013" +
"time_offset\"4\n\010TimeZone\022\016\n\002id\030\001 \001(\tR\002id\022" +
"\030\n\007version\030\002 \001(\tR\007versionBi\n\017com.google." +
"typeB\rDateTimeProtoP\001Z<google.golang.org" +
"/genproto/googleapis/type/datetime;datet" +
"ime\370\001\001\242\002\003GTPb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.protobuf.DurationProto.getDescriptor(),
});
internal_static_google_type_DateTime_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_google_type_DateTime_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_type_DateTime_descriptor,
new java.lang.String[] { "Year", "Month", "Day", "Hours", "Minutes", "Seconds", "Nanos", "UtcOffset", "TimeZone", "TimeOffset", });
internal_static_google_type_TimeZone_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_google_type_TimeZone_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_type_TimeZone_descriptor,
new java.lang.String[] { "Id", "Version", });
com.google.protobuf.DurationProto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@ -0,0 +1,761 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/type/datetime.proto
package com.google.type;
/**
* <pre>
* Represents a time zone from the
* [IANA Time Zone Database](https://www.iana.org/time-zones).
* </pre>
*
* Protobuf type {@code google.type.TimeZone}
*/
public final class TimeZone extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.type.TimeZone)
TimeZoneOrBuilder {
private static final long serialVersionUID = 0L;
// Use TimeZone.newBuilder() to construct.
private TimeZone(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private TimeZone() {
id_ = "";
version_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TimeZone();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TimeZone(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
id_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
version_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.type.DateTimeProto.internal_static_google_type_TimeZone_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.type.DateTimeProto.internal_static_google_type_TimeZone_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.type.TimeZone.class, com.google.type.TimeZone.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
* <pre>
* IANA Time Zone Database time zone, e.g. "America/New_York".
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
}
}
/**
* <pre>
* IANA Time Zone Database time zone, e.g. "America/New_York".
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VERSION_FIELD_NUMBER = 2;
private volatile java.lang.Object version_;
/**
* <pre>
* Optional. IANA Time Zone Database version number, e.g. "2019a".
* </pre>
*
* <code>string version = 2 [json_name = "version"];</code>
* @return The version.
*/
@java.lang.Override
public java.lang.String getVersion() {
java.lang.Object ref = version_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
version_ = s;
return s;
}
}
/**
* <pre>
* Optional. IANA Time Zone Database version number, e.g. "2019a".
* </pre>
*
* <code>string version = 2 [json_name = "version"];</code>
* @return The bytes for version.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getVersionBytes() {
java.lang.Object ref = version_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
version_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (!getVersionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (!getVersionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.type.TimeZone)) {
return super.equals(obj);
}
com.google.type.TimeZone other = (com.google.type.TimeZone) obj;
if (!getId()
.equals(other.getId())) return false;
if (!getVersion()
.equals(other.getVersion())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + getVersion().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.type.TimeZone parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.type.TimeZone parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.type.TimeZone parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.type.TimeZone parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.type.TimeZone parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.type.TimeZone parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.type.TimeZone parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.type.TimeZone parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.type.TimeZone parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.type.TimeZone parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.type.TimeZone parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.type.TimeZone parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.type.TimeZone prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* <pre>
* Represents a time zone from the
* [IANA Time Zone Database](https://www.iana.org/time-zones).
* </pre>
*
* Protobuf type {@code google.type.TimeZone}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:google.type.TimeZone)
com.google.type.TimeZoneOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.type.DateTimeProto.internal_static_google_type_TimeZone_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.type.DateTimeProto.internal_static_google_type_TimeZone_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.type.TimeZone.class, com.google.type.TimeZone.Builder.class);
}
// Construct using com.google.type.TimeZone.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
id_ = "";
version_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.type.DateTimeProto.internal_static_google_type_TimeZone_descriptor;
}
@java.lang.Override
public com.google.type.TimeZone getDefaultInstanceForType() {
return com.google.type.TimeZone.getDefaultInstance();
}
@java.lang.Override
public com.google.type.TimeZone build() {
com.google.type.TimeZone result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.type.TimeZone buildPartial() {
com.google.type.TimeZone result = new com.google.type.TimeZone(this);
result.id_ = id_;
result.version_ = version_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.type.TimeZone) {
return mergeFrom((com.google.type.TimeZone)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.type.TimeZone other) {
if (other == com.google.type.TimeZone.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (!other.getVersion().isEmpty()) {
version_ = other.version_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.type.TimeZone parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.type.TimeZone) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object id_ = "";
/**
* <pre>
* IANA Time Zone Database time zone, e.g. "America/New_York".
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* IANA Time Zone Database time zone, e.g. "America/New_York".
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* IANA Time Zone Database time zone, e.g. "America/New_York".
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
* <pre>
* IANA Time Zone Database time zone, e.g. "America/New_York".
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
* <pre>
* IANA Time Zone Database time zone, e.g. "America/New_York".
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private java.lang.Object version_ = "";
/**
* <pre>
* Optional. IANA Time Zone Database version number, e.g. "2019a".
* </pre>
*
* <code>string version = 2 [json_name = "version"];</code>
* @return The version.
*/
public java.lang.String getVersion() {
java.lang.Object ref = version_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
version_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* Optional. IANA Time Zone Database version number, e.g. "2019a".
* </pre>
*
* <code>string version = 2 [json_name = "version"];</code>
* @return The bytes for version.
*/
public com.google.protobuf.ByteString
getVersionBytes() {
java.lang.Object ref = version_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
version_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* Optional. IANA Time Zone Database version number, e.g. "2019a".
* </pre>
*
* <code>string version = 2 [json_name = "version"];</code>
* @param value The version to set.
* @return This builder for chaining.
*/
public Builder setVersion(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
version_ = value;
onChanged();
return this;
}
/**
* <pre>
* Optional. IANA Time Zone Database version number, e.g. "2019a".
* </pre>
*
* <code>string version = 2 [json_name = "version"];</code>
* @return This builder for chaining.
*/
public Builder clearVersion() {
version_ = getDefaultInstance().getVersion();
onChanged();
return this;
}
/**
* <pre>
* Optional. IANA Time Zone Database version number, e.g. "2019a".
* </pre>
*
* <code>string version = 2 [json_name = "version"];</code>
* @param value The bytes for version to set.
* @return This builder for chaining.
*/
public Builder setVersionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
version_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.type.TimeZone)
}
// @@protoc_insertion_point(class_scope:google.type.TimeZone)
private static final com.google.type.TimeZone DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.type.TimeZone();
}
public static com.google.type.TimeZone getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<TimeZone>
PARSER = new com.google.protobuf.AbstractParser<TimeZone>() {
@java.lang.Override
public TimeZone parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TimeZone(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<TimeZone> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<TimeZone> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.type.TimeZone getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}

View File

@ -0,0 +1,49 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/type/datetime.proto
package com.google.type;
public interface TimeZoneOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.type.TimeZone)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* IANA Time Zone Database time zone, e.g. "America/New_York".
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return The id.
*/
java.lang.String getId();
/**
* <pre>
* IANA Time Zone Database time zone, e.g. "America/New_York".
* </pre>
*
* <code>string id = 1 [json_name = "id"];</code>
* @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
/**
* <pre>
* Optional. IANA Time Zone Database version number, e.g. "2019a".
* </pre>
*
* <code>string version = 2 [json_name = "version"];</code>
* @return The version.
*/
java.lang.String getVersion();
/**
* <pre>
* Optional. IANA Time Zone Database version number, e.g. "2019a".
* </pre>
*
* <code>string version = 2 [json_name = "version"];</code>
* @return The bytes for version.
*/
com.google.protobuf.ByteString
getVersionBytes();
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,189 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/type/datetime.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='google/type/datetime.proto',
package='google.type',
syntax='proto3',
serialized_options=b'\n\017com.google.typeB\rDateTimeProtoP\001Z<google.golang.org/genproto/googleapis/type/datetime;datetime\370\001\001\242\002\003GTP',
create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x1agoogle/type/datetime.proto\x12\x0bgoogle.type\x1a\x1egoogle/protobuf/duration.proto\"\xa7\x02\n\x08\x44\x61teTime\x12\x12\n\x04year\x18\x01 \x01(\x05R\x04year\x12\x14\n\x05month\x18\x02 \x01(\x05R\x05month\x12\x10\n\x03\x64\x61y\x18\x03 \x01(\x05R\x03\x64\x61y\x12\x14\n\x05hours\x18\x04 \x01(\x05R\x05hours\x12\x18\n\x07minutes\x18\x05 \x01(\x05R\x07minutes\x12\x18\n\x07seconds\x18\x06 \x01(\x05R\x07seconds\x12\x14\n\x05nanos\x18\x07 \x01(\x05R\x05nanos\x12:\n\nutc_offset\x18\x08 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00R\tutcOffset\x12\x34\n\ttime_zone\x18\t \x01(\x0b\x32\x15.google.type.TimeZoneH\x00R\x08timeZoneB\r\n\x0btime_offset\"4\n\x08TimeZone\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x18\n\x07version\x18\x02 \x01(\tR\x07versionBi\n\x0f\x63om.google.typeB\rDateTimeProtoP\x01Z<google.golang.org/genproto/googleapis/type/datetime;datetime\xf8\x01\x01\xa2\x02\x03GTPb\x06proto3'
,
dependencies=[google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,])
_DATETIME = _descriptor.Descriptor(
name='DateTime',
full_name='google.type.DateTime',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='year', full_name='google.type.DateTime.year', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, json_name='year', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='month', full_name='google.type.DateTime.month', index=1,
number=2, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, json_name='month', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='day', full_name='google.type.DateTime.day', index=2,
number=3, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, json_name='day', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='hours', full_name='google.type.DateTime.hours', index=3,
number=4, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, json_name='hours', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='minutes', full_name='google.type.DateTime.minutes', index=4,
number=5, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, json_name='minutes', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='seconds', full_name='google.type.DateTime.seconds', index=5,
number=6, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, json_name='seconds', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='nanos', full_name='google.type.DateTime.nanos', index=6,
number=7, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, json_name='nanos', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='utc_offset', full_name='google.type.DateTime.utc_offset', index=7,
number=8, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, json_name='utcOffset', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='time_zone', full_name='google.type.DateTime.time_zone', index=8,
number=9, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, json_name='timeZone', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
_descriptor.OneofDescriptor(
name='time_offset', full_name='google.type.DateTime.time_offset',
index=0, containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[]),
],
serialized_start=76,
serialized_end=371,
)
_TIMEZONE = _descriptor.Descriptor(
name='TimeZone',
full_name='google.type.TimeZone',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='id', full_name='google.type.TimeZone.id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, json_name='id', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='version', full_name='google.type.TimeZone.version', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, json_name='version', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=373,
serialized_end=425,
)
_DATETIME.fields_by_name['utc_offset'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION
_DATETIME.fields_by_name['time_zone'].message_type = _TIMEZONE
_DATETIME.oneofs_by_name['time_offset'].fields.append(
_DATETIME.fields_by_name['utc_offset'])
_DATETIME.fields_by_name['utc_offset'].containing_oneof = _DATETIME.oneofs_by_name['time_offset']
_DATETIME.oneofs_by_name['time_offset'].fields.append(
_DATETIME.fields_by_name['time_zone'])
_DATETIME.fields_by_name['time_zone'].containing_oneof = _DATETIME.oneofs_by_name['time_offset']
DESCRIPTOR.message_types_by_name['DateTime'] = _DATETIME
DESCRIPTOR.message_types_by_name['TimeZone'] = _TIMEZONE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
DateTime = _reflection.GeneratedProtocolMessageType('DateTime', (_message.Message,), {
'DESCRIPTOR' : _DATETIME,
'__module__' : 'google.type.datetime_pb2'
# @@protoc_insertion_point(class_scope:google.type.DateTime)
})
_sym_db.RegisterMessage(DateTime)
TimeZone = _reflection.GeneratedProtocolMessageType('TimeZone', (_message.Message,), {
'DESCRIPTOR' : _TIMEZONE,
'__module__' : 'google.type.datetime_pb2'
# @@protoc_insertion_point(class_scope:google.type.TimeZone)
})
_sym_db.RegisterMessage(TimeZone)
DESCRIPTOR._options = None
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,433 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pet/v1/pet.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.type import datetime_pb2 as google_dot_type_dot_datetime__pb2
DESCRIPTOR = _descriptor.FileDescriptor(
name='pet/v1/pet.proto',
package='pet.v1',
syntax='proto3',
serialized_options=b'Z\006pet/v1',
create_key=_descriptor._internal_create_key,
serialized_pb=b'\n\x10pet/v1/pet.proto\x12\x06pet.v1\x1a\x1agoogle/type/datetime.proto\"\x92\x01\n\x03Pet\x12*\n\x08pet_type\x18\x01 \x01(\x0e\x32\x0f.pet.v1.PetTypeR\x07petType\x12\x15\n\x06pet_id\x18\x02 \x01(\tR\x05petId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x34\n\ncreated_at\x18\x04 \x01(\x0b\x32\x15.google.type.DateTimeR\tcreatedAt\"&\n\rGetPetRequest\x12\x15\n\x06pet_id\x18\x01 \x01(\tR\x05petId\"/\n\x0eGetPetResponse\x12\x1d\n\x03pet\x18\x01 \x01(\x0b\x32\x0b.pet.v1.PetR\x03pet\"O\n\rPutPetRequest\x12*\n\x08pet_type\x18\x01 \x01(\x0e\x32\x0f.pet.v1.PetTypeR\x07petType\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\"/\n\x0ePutPetResponse\x12\x1d\n\x03pet\x18\x01 \x01(\x0b\x32\x0b.pet.v1.PetR\x03pet\")\n\x10\x44\x65letePetRequest\x12\x15\n\x06pet_id\x18\x01 \x01(\tR\x05petId\"\x13\n\x11\x44\x65letePetResponse*q\n\x07PetType\x12\x18\n\x14PET_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cPET_TYPE_CAT\x10\x01\x12\x10\n\x0cPET_TYPE_DOG\x10\x02\x12\x12\n\x0ePET_TYPE_SNAKE\x10\x03\x12\x14\n\x10PET_TYPE_HAMSTER\x10\x04\x32\xcb\x01\n\x0fPetStoreService\x12\x39\n\x06GetPet\x12\x15.pet.v1.GetPetRequest\x1a\x16.pet.v1.GetPetResponse\"\x00\x12\x39\n\x06PutPet\x12\x15.pet.v1.PutPetRequest\x1a\x16.pet.v1.PutPetResponse\"\x00\x12\x42\n\tDeletePet\x12\x18.pet.v1.DeletePetRequest\x1a\x19.pet.v1.DeletePetResponse\"\x00\x42\x08Z\x06pet/v1b\x06proto3'
,
dependencies=[google_dot_type_dot_datetime__pb2.DESCRIPTOR,])
_PETTYPE = _descriptor.EnumDescriptor(
name='PetType',
full_name='pet.v1.PetType',
filename=None,
file=DESCRIPTOR,
create_key=_descriptor._internal_create_key,
values=[
_descriptor.EnumValueDescriptor(
name='PET_TYPE_UNSPECIFIED', index=0, number=0,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='PET_TYPE_CAT', index=1, number=1,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='PET_TYPE_DOG', index=2, number=2,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='PET_TYPE_SNAKE', index=3, number=3,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
_descriptor.EnumValueDescriptor(
name='PET_TYPE_HAMSTER', index=4, number=4,
serialized_options=None,
type=None,
create_key=_descriptor._internal_create_key),
],
containing_type=None,
serialized_options=None,
serialized_start=488,
serialized_end=601,
)
_sym_db.RegisterEnumDescriptor(_PETTYPE)
PetType = enum_type_wrapper.EnumTypeWrapper(_PETTYPE)
PET_TYPE_UNSPECIFIED = 0
PET_TYPE_CAT = 1
PET_TYPE_DOG = 2
PET_TYPE_SNAKE = 3
PET_TYPE_HAMSTER = 4
_PET = _descriptor.Descriptor(
name='Pet',
full_name='pet.v1.Pet',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='pet_type', full_name='pet.v1.Pet.pet_type', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, json_name='petType', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='pet_id', full_name='pet.v1.Pet.pet_id', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, json_name='petId', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='name', full_name='pet.v1.Pet.name', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, json_name='name', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='created_at', full_name='pet.v1.Pet.created_at', index=3,
number=4, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, json_name='createdAt', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=57,
serialized_end=203,
)
_GETPETREQUEST = _descriptor.Descriptor(
name='GetPetRequest',
full_name='pet.v1.GetPetRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='pet_id', full_name='pet.v1.GetPetRequest.pet_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, json_name='petId', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=205,
serialized_end=243,
)
_GETPETRESPONSE = _descriptor.Descriptor(
name='GetPetResponse',
full_name='pet.v1.GetPetResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='pet', full_name='pet.v1.GetPetResponse.pet', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, json_name='pet', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=245,
serialized_end=292,
)
_PUTPETREQUEST = _descriptor.Descriptor(
name='PutPetRequest',
full_name='pet.v1.PutPetRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='pet_type', full_name='pet.v1.PutPetRequest.pet_type', index=0,
number=1, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, json_name='petType', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
_descriptor.FieldDescriptor(
name='name', full_name='pet.v1.PutPetRequest.name', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, json_name='name', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=294,
serialized_end=373,
)
_PUTPETRESPONSE = _descriptor.Descriptor(
name='PutPetResponse',
full_name='pet.v1.PutPetResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='pet', full_name='pet.v1.PutPetResponse.pet', index=0,
number=1, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, json_name='pet', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=375,
serialized_end=422,
)
_DELETEPETREQUEST = _descriptor.Descriptor(
name='DeletePetRequest',
full_name='pet.v1.DeletePetRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
_descriptor.FieldDescriptor(
name='pet_id', full_name='pet.v1.DeletePetRequest.pet_id', index=0,
number=1, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=b"".decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
serialized_options=None, json_name='petId', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=424,
serialized_end=465,
)
_DELETEPETRESPONSE = _descriptor.Descriptor(
name='DeletePetResponse',
full_name='pet.v1.DeletePetResponse',
filename=None,
file=DESCRIPTOR,
containing_type=None,
create_key=_descriptor._internal_create_key,
fields=[
],
extensions=[
],
nested_types=[],
enum_types=[
],
serialized_options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=467,
serialized_end=486,
)
_PET.fields_by_name['pet_type'].enum_type = _PETTYPE
_PET.fields_by_name['created_at'].message_type = google_dot_type_dot_datetime__pb2._DATETIME
_GETPETRESPONSE.fields_by_name['pet'].message_type = _PET
_PUTPETREQUEST.fields_by_name['pet_type'].enum_type = _PETTYPE
_PUTPETRESPONSE.fields_by_name['pet'].message_type = _PET
DESCRIPTOR.message_types_by_name['Pet'] = _PET
DESCRIPTOR.message_types_by_name['GetPetRequest'] = _GETPETREQUEST
DESCRIPTOR.message_types_by_name['GetPetResponse'] = _GETPETRESPONSE
DESCRIPTOR.message_types_by_name['PutPetRequest'] = _PUTPETREQUEST
DESCRIPTOR.message_types_by_name['PutPetResponse'] = _PUTPETRESPONSE
DESCRIPTOR.message_types_by_name['DeletePetRequest'] = _DELETEPETREQUEST
DESCRIPTOR.message_types_by_name['DeletePetResponse'] = _DELETEPETRESPONSE
DESCRIPTOR.enum_types_by_name['PetType'] = _PETTYPE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
Pet = _reflection.GeneratedProtocolMessageType('Pet', (_message.Message,), {
'DESCRIPTOR' : _PET,
'__module__' : 'pet.v1.pet_pb2'
# @@protoc_insertion_point(class_scope:pet.v1.Pet)
})
_sym_db.RegisterMessage(Pet)
GetPetRequest = _reflection.GeneratedProtocolMessageType('GetPetRequest', (_message.Message,), {
'DESCRIPTOR' : _GETPETREQUEST,
'__module__' : 'pet.v1.pet_pb2'
# @@protoc_insertion_point(class_scope:pet.v1.GetPetRequest)
})
_sym_db.RegisterMessage(GetPetRequest)
GetPetResponse = _reflection.GeneratedProtocolMessageType('GetPetResponse', (_message.Message,), {
'DESCRIPTOR' : _GETPETRESPONSE,
'__module__' : 'pet.v1.pet_pb2'
# @@protoc_insertion_point(class_scope:pet.v1.GetPetResponse)
})
_sym_db.RegisterMessage(GetPetResponse)
PutPetRequest = _reflection.GeneratedProtocolMessageType('PutPetRequest', (_message.Message,), {
'DESCRIPTOR' : _PUTPETREQUEST,
'__module__' : 'pet.v1.pet_pb2'
# @@protoc_insertion_point(class_scope:pet.v1.PutPetRequest)
})
_sym_db.RegisterMessage(PutPetRequest)
PutPetResponse = _reflection.GeneratedProtocolMessageType('PutPetResponse', (_message.Message,), {
'DESCRIPTOR' : _PUTPETRESPONSE,
'__module__' : 'pet.v1.pet_pb2'
# @@protoc_insertion_point(class_scope:pet.v1.PutPetResponse)
})
_sym_db.RegisterMessage(PutPetResponse)
DeletePetRequest = _reflection.GeneratedProtocolMessageType('DeletePetRequest', (_message.Message,), {
'DESCRIPTOR' : _DELETEPETREQUEST,
'__module__' : 'pet.v1.pet_pb2'
# @@protoc_insertion_point(class_scope:pet.v1.DeletePetRequest)
})
_sym_db.RegisterMessage(DeletePetRequest)
DeletePetResponse = _reflection.GeneratedProtocolMessageType('DeletePetResponse', (_message.Message,), {
'DESCRIPTOR' : _DELETEPETRESPONSE,
'__module__' : 'pet.v1.pet_pb2'
# @@protoc_insertion_point(class_scope:pet.v1.DeletePetResponse)
})
_sym_db.RegisterMessage(DeletePetResponse)
DESCRIPTOR._options = None
_PETSTORESERVICE = _descriptor.ServiceDescriptor(
name='PetStoreService',
full_name='pet.v1.PetStoreService',
file=DESCRIPTOR,
index=0,
serialized_options=None,
create_key=_descriptor._internal_create_key,
serialized_start=604,
serialized_end=807,
methods=[
_descriptor.MethodDescriptor(
name='GetPet',
full_name='pet.v1.PetStoreService.GetPet',
index=0,
containing_service=None,
input_type=_GETPETREQUEST,
output_type=_GETPETRESPONSE,
serialized_options=None,
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='PutPet',
full_name='pet.v1.PetStoreService.PutPet',
index=1,
containing_service=None,
input_type=_PUTPETREQUEST,
output_type=_PUTPETRESPONSE,
serialized_options=None,
create_key=_descriptor._internal_create_key,
),
_descriptor.MethodDescriptor(
name='DeletePet',
full_name='pet.v1.PetStoreService.DeletePet',
index=2,
containing_service=None,
input_type=_DELETEPETREQUEST,
output_type=_DELETEPETRESPONSE,
serialized_options=None,
create_key=_descriptor._internal_create_key,
),
])
_sym_db.RegisterServiceDescriptor(_PETSTORESERVICE)
DESCRIPTOR.services_by_name['PetStoreService'] = _PETSTORESERVICE
# @@protoc_insertion_point(module_scope)

10
proto/buf.yaml Normal file
View File

@ -0,0 +1,10 @@
version: v1
name: github.com/jianxx/petstore
lint:
use:
- DEFAULT
ignore:
- google/type/datetime.proto
breaking:
use:
- FILE

View File

@ -0,0 +1,104 @@
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.type;
import "google/protobuf/duration.proto";
option cc_enable_arenas = true;
option go_package = "google.golang.org/genproto/googleapis/type/datetime;datetime";
option java_multiple_files = true;
option java_outer_classname = "DateTimeProto";
option java_package = "com.google.type";
option objc_class_prefix = "GTP";
// Represents civil time (or occasionally physical time).
//
// This type can represent a civil time in one of a few possible ways:
//
// * When utc_offset is set and time_zone is unset: a civil time on a calendar
// day with a particular offset from UTC.
// * When time_zone is set and utc_offset is unset: a civil time on a calendar
// day in a particular time zone.
// * When neither time_zone nor utc_offset is set: a civil time on a calendar
// day in local time.
//
// The date is relative to the Proleptic Gregorian Calendar.
//
// If year is 0, the DateTime is considered not to have a specific year. month
// and day must have valid, non-zero values.
//
// This type may also be used to represent a physical time if all the date and
// time fields are set and either case of the `time_offset` oneof is set.
// Consider using `Timestamp` message for physical time instead. If your use
// case also would like to store the user's timezone, that can be done in
// another field.
//
// This type is more flexible than some applications may want. Make sure to
// document and validate your application's limitations.
message DateTime {
// Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a
// datetime without a year.
int32 year = 1;
// Required. Month of year. Must be from 1 to 12.
int32 month = 2;
// Required. Day of month. Must be from 1 to 31 and valid for the year and
// month.
int32 day = 3;
// Required. Hours of day in 24 hour format. Should be from 0 to 23. An API
// may choose to allow the value "24:00:00" for scenarios like business
// closing time.
int32 hours = 4;
// Required. Minutes of hour of day. Must be from 0 to 59.
int32 minutes = 5;
// Required. Seconds of minutes of the time. Must normally be from 0 to 59. An
// API may allow the value 60 if it allows leap-seconds.
int32 seconds = 6;
// Required. Fractions of seconds in nanoseconds. Must be from 0 to
// 999,999,999.
int32 nanos = 7;
// Optional. Specifies either the UTC offset or the time zone of the DateTime.
// Choose carefully between them, considering that time zone data may change
// in the future (for example, a country modifies their DST start/end dates,
// and future DateTimes in the affected range had already been stored).
// If omitted, the DateTime is considered to be in local time.
oneof time_offset {
// UTC offset. Must be whole seconds, between -18 hours and +18 hours.
// For example, a UTC offset of -4:00 would be represented as
// { seconds: -14400 }.
google.protobuf.Duration utc_offset = 8;
// Time zone.
TimeZone time_zone = 9;
}
}
// Represents a time zone from the
// [IANA Time Zone Database](https://www.iana.org/time-zones).
message TimeZone {
// IANA Time Zone Database time zone, e.g. "America/New_York".
string id = 1;
// Optional. IANA Time Zone Database version number, e.g. "2019a".
string version = 2;
}

53
proto/pet/v1/pet.proto Normal file
View File

@ -0,0 +1,53 @@
syntax = "proto3";
package pet.v1;
option go_package = "pet/v1";
import "google/type/datetime.proto";
// PetType represents the different types of pets in the pet store.
enum PetType {
PET_TYPE_UNSPECIFIED = 0;
PET_TYPE_CAT = 1;
PET_TYPE_DOG = 2;
PET_TYPE_SNAKE = 3;
PET_TYPE_HAMSTER = 4;
}
// Pet represents a pet in the pet store.
message Pet {
PetType pet_type = 1;
string pet_id = 2;
string name = 3;
google.type.DateTime created_at = 4;
}
message GetPetRequest {
string pet_id = 1;
}
message GetPetResponse {
Pet pet = 1;
}
message PutPetRequest {
PetType pet_type = 1;
string name = 2;
}
message PutPetResponse {
Pet pet = 1;
}
message DeletePetRequest {
string pet_id = 1;
}
message DeletePetResponse {}
service PetStoreService {
rpc GetPet(GetPetRequest) returns (GetPetResponse) {}
rpc PutPet(PutPetRequest) returns (PutPetResponse) {}
rpc DeletePet(DeletePetRequest) returns (DeletePetResponse) {}
}

0
server/README.md Normal file
View File