commit e387ff651a121d85a7e82b3aa8b1581cb94b65d9 Author: Sean Chien Date: Tue Jul 12 15:53:59 2022 +0800 initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..425f7ba --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# 作业题目 + +## 基本题目 + +请基于//gen目录下的桩代码,基于自己熟悉的程序语言开发对应的服务端程序和客户端程序。 + +服务端程序提供PutPet、GetPet、DeletePet三个接口,客户端访问这三个服务进行宠物数据的写入、查询和删除操作。 diff --git a/buf.gen.yaml b/buf.gen.yaml new file mode 100644 index 0000000..5ca7ead --- /dev/null +++ b/buf.gen.yaml @@ -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 \ No newline at end of file diff --git a/buf.work.yaml b/buf.work.yaml new file mode 100644 index 0000000..1878b34 --- /dev/null +++ b/buf.work.yaml @@ -0,0 +1,3 @@ +version: v1 +directories: + - proto diff --git a/client/README.md b/client/README.md new file mode 100644 index 0000000..e69de29 diff --git a/gen/cpp/google/type/datetime.pb.cc b/gen/cpp/google/type/datetime.pb.cc new file mode 100644 index 0000000..4edd4a0 --- /dev/null +++ b/gen/cpp/google/type/datetime.pb.cc @@ -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 + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +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(&::google::type::_DateTime_default_instance_), + reinterpret_cast(&::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\001Ztime_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(reinterpret_cast(&nanos_) - + reinterpret_cast(&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(this) + static_cast( + reinterpret_cast(&year_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&nanos_) - + reinterpret_cast(&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( + reinterpret_cast(&nanos_) - + reinterpret_cast(&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(to)->MergeFrom( + static_cast(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(&year_), + reinterpret_cast(&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(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(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(to)->MergeFrom( + static_cast(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 diff --git a/gen/cpp/google/type/datetime.pb.h b/gen/cpp/google/type/datetime.pb.h new file mode 100644 index 0000000..df7b4a1 --- /dev/null +++ b/gen/cpp/google/type/datetime.pb.h @@ -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 +#include + +#include +#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 +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +// @@protoc_insertion_point(includes) +#include +#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( + &_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(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 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( + &_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(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 + 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 + 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 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 +inline PROTOBUF_ALWAYS_INLINE +void TimeZone::set_id(ArgT0&& arg0, ArgT... args) { + + id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(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 +inline PROTOBUF_ALWAYS_INLINE +void TimeZone::set_version(ArgT0&& arg0, ArgT... args) { + + version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(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 +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2ftype_2fdatetime_2eproto diff --git a/gen/cpp/pet/v1/pet.pb.cc b/gen/cpp/pet/v1/pet.pb.cc new file mode 100644 index 0000000..86f8c8b --- /dev/null +++ b/gen/cpp/pet/v1/pet.pb.cc @@ -0,0 +1,1775 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: pet/v1/pet.proto + +#include "pet/v1/pet.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG +namespace pet { +namespace v1 { +constexpr Pet::Pet( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : pet_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , created_at_(nullptr) + , pet_type_(0) +{} +struct PetDefaultTypeInternal { + constexpr PetDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~PetDefaultTypeInternal() {} + union { + Pet _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PetDefaultTypeInternal _Pet_default_instance_; +constexpr GetPetRequest::GetPetRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : pet_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct GetPetRequestDefaultTypeInternal { + constexpr GetPetRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~GetPetRequestDefaultTypeInternal() {} + union { + GetPetRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GetPetRequestDefaultTypeInternal _GetPetRequest_default_instance_; +constexpr GetPetResponse::GetPetResponse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : pet_(nullptr){} +struct GetPetResponseDefaultTypeInternal { + constexpr GetPetResponseDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~GetPetResponseDefaultTypeInternal() {} + union { + GetPetResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GetPetResponseDefaultTypeInternal _GetPetResponse_default_instance_; +constexpr PutPetRequest::PutPetRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , pet_type_(0) +{} +struct PutPetRequestDefaultTypeInternal { + constexpr PutPetRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~PutPetRequestDefaultTypeInternal() {} + union { + PutPetRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PutPetRequestDefaultTypeInternal _PutPetRequest_default_instance_; +constexpr PutPetResponse::PutPetResponse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : pet_(nullptr){} +struct PutPetResponseDefaultTypeInternal { + constexpr PutPetResponseDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~PutPetResponseDefaultTypeInternal() {} + union { + PutPetResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PutPetResponseDefaultTypeInternal _PutPetResponse_default_instance_; +constexpr DeletePetRequest::DeletePetRequest( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : pet_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct DeletePetRequestDefaultTypeInternal { + constexpr DeletePetRequestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~DeletePetRequestDefaultTypeInternal() {} + union { + DeletePetRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DeletePetRequestDefaultTypeInternal _DeletePetRequest_default_instance_; +constexpr DeletePetResponse::DeletePetResponse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){} +struct DeletePetResponseDefaultTypeInternal { + constexpr DeletePetResponseDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~DeletePetResponseDefaultTypeInternal() {} + union { + DeletePetResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DeletePetResponseDefaultTypeInternal _DeletePetResponse_default_instance_; +} // namespace v1 +} // namespace pet +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_pet_2fv1_2fpet_2eproto[7]; +static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_pet_2fv1_2fpet_2eproto[1]; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_pet_2fv1_2fpet_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_pet_2fv1_2fpet_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pet::v1::Pet, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pet::v1::Pet, pet_type_), + PROTOBUF_FIELD_OFFSET(::pet::v1::Pet, pet_id_), + PROTOBUF_FIELD_OFFSET(::pet::v1::Pet, name_), + PROTOBUF_FIELD_OFFSET(::pet::v1::Pet, created_at_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pet::v1::GetPetRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pet::v1::GetPetRequest, pet_id_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pet::v1::GetPetResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pet::v1::GetPetResponse, pet_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pet::v1::PutPetRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pet::v1::PutPetRequest, pet_type_), + PROTOBUF_FIELD_OFFSET(::pet::v1::PutPetRequest, name_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pet::v1::PutPetResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pet::v1::PutPetResponse, pet_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pet::v1::DeletePetRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::pet::v1::DeletePetRequest, pet_id_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::pet::v1::DeletePetResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(::pet::v1::Pet)}, + { 9, -1, sizeof(::pet::v1::GetPetRequest)}, + { 15, -1, sizeof(::pet::v1::GetPetResponse)}, + { 21, -1, sizeof(::pet::v1::PutPetRequest)}, + { 28, -1, sizeof(::pet::v1::PutPetResponse)}, + { 34, -1, sizeof(::pet::v1::DeletePetRequest)}, + { 40, -1, sizeof(::pet::v1::DeletePetResponse)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&::pet::v1::_Pet_default_instance_), + reinterpret_cast(&::pet::v1::_GetPetRequest_default_instance_), + reinterpret_cast(&::pet::v1::_GetPetResponse_default_instance_), + reinterpret_cast(&::pet::v1::_PutPetRequest_default_instance_), + reinterpret_cast(&::pet::v1::_PutPetResponse_default_instance_), + reinterpret_cast(&::pet::v1::_DeletePetRequest_default_instance_), + reinterpret_cast(&::pet::v1::_DeletePetResponse_default_instance_), +}; + +const char descriptor_table_protodef_pet_2fv1_2fpet_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\020pet/v1/pet.proto\022\006pet.v1\032\032google/type/" + "datetime.proto\"\222\001\n\003Pet\022*\n\010pet_type\030\001 \001(\016" + "2\017.pet.v1.PetTypeR\007petType\022\025\n\006pet_id\030\002 \001" + "(\tR\005petId\022\022\n\004name\030\003 \001(\tR\004name\0224\n\ncreated" + "_at\030\004 \001(\0132\025.google.type.DateTimeR\tcreate" + "dAt\"&\n\rGetPetRequest\022\025\n\006pet_id\030\001 \001(\tR\005pe" + "tId\"/\n\016GetPetResponse\022\035\n\003pet\030\001 \001(\0132\013.pet" + ".v1.PetR\003pet\"O\n\rPutPetRequest\022*\n\010pet_typ" + "e\030\001 \001(\0162\017.pet.v1.PetTypeR\007petType\022\022\n\004nam" + "e\030\002 \001(\tR\004name\"/\n\016PutPetResponse\022\035\n\003pet\030\001" + " \001(\0132\013.pet.v1.PetR\003pet\")\n\020DeletePetReque" + "st\022\025\n\006pet_id\030\001 \001(\tR\005petId\"\023\n\021DeletePetRe" + "sponse*q\n\007PetType\022\030\n\024PET_TYPE_UNSPECIFIE" + "D\020\000\022\020\n\014PET_TYPE_CAT\020\001\022\020\n\014PET_TYPE_DOG\020\002\022" + "\022\n\016PET_TYPE_SNAKE\020\003\022\024\n\020PET_TYPE_HAMSTER\020" + "\0042\313\001\n\017PetStoreService\0229\n\006GetPet\022\025.pet.v1" + ".GetPetRequest\032\026.pet.v1.GetPetResponse\"\000" + "\0229\n\006PutPet\022\025.pet.v1.PutPetRequest\032\026.pet." + "v1.PutPetResponse\"\000\022B\n\tDeletePet\022\030.pet.v" + "1.DeletePetRequest\032\031.pet.v1.DeletePetRes" + "ponse\"\000B\010Z\006pet/v1b\006proto3" + ; +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_pet_2fv1_2fpet_2eproto_deps[1] = { + &::descriptor_table_google_2ftype_2fdatetime_2eproto, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_pet_2fv1_2fpet_2eproto_once; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_pet_2fv1_2fpet_2eproto = { + false, false, 825, descriptor_table_protodef_pet_2fv1_2fpet_2eproto, "pet/v1/pet.proto", + &descriptor_table_pet_2fv1_2fpet_2eproto_once, descriptor_table_pet_2fv1_2fpet_2eproto_deps, 1, 7, + schemas, file_default_instances, TableStruct_pet_2fv1_2fpet_2eproto::offsets, + file_level_metadata_pet_2fv1_2fpet_2eproto, file_level_enum_descriptors_pet_2fv1_2fpet_2eproto, file_level_service_descriptors_pet_2fv1_2fpet_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_pet_2fv1_2fpet_2eproto_getter() { + return &descriptor_table_pet_2fv1_2fpet_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_pet_2fv1_2fpet_2eproto(&descriptor_table_pet_2fv1_2fpet_2eproto); +namespace pet { +namespace v1 { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PetType_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_pet_2fv1_2fpet_2eproto); + return file_level_enum_descriptors_pet_2fv1_2fpet_2eproto[0]; +} +bool PetType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + return true; + default: + return false; + } +} + + +// =================================================================== + +class Pet::_Internal { + public: + static const ::google::type::DateTime& created_at(const Pet* msg); +}; + +const ::google::type::DateTime& +Pet::_Internal::created_at(const Pet* msg) { + return *msg->created_at_; +} +void Pet::clear_created_at() { + if (GetArenaForAllocation() == nullptr && created_at_ != nullptr) { + delete created_at_; + } + created_at_ = nullptr; +} +Pet::Pet(::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:pet.v1.Pet) +} +Pet::Pet(const Pet& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + pet_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_pet_id().empty()) { + pet_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_pet_id(), + GetArenaForAllocation()); + } + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_name().empty()) { + name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), + GetArenaForAllocation()); + } + if (from._internal_has_created_at()) { + created_at_ = new ::google::type::DateTime(*from.created_at_); + } else { + created_at_ = nullptr; + } + pet_type_ = from.pet_type_; + // @@protoc_insertion_point(copy_constructor:pet.v1.Pet) +} + +inline void Pet::SharedCtor() { +pet_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&created_at_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&pet_type_) - + reinterpret_cast(&created_at_)) + sizeof(pet_type_)); +} + +Pet::~Pet() { + // @@protoc_insertion_point(destructor:pet.v1.Pet) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void Pet::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + pet_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete created_at_; +} + +void Pet::ArenaDtor(void* object) { + Pet* _this = reinterpret_cast< Pet* >(object); + (void)_this; +} +void Pet::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Pet::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void Pet::Clear() { +// @@protoc_insertion_point(message_clear_start:pet.v1.Pet) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + pet_id_.ClearToEmpty(); + name_.ClearToEmpty(); + if (GetArenaForAllocation() == nullptr && created_at_ != nullptr) { + delete created_at_; + } + created_at_ = nullptr; + pet_type_ = 0; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Pet::_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) { + // .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_pet_type(static_cast<::pet::v1::PetType>(val)); + } else goto handle_unusual; + continue; + // string pet_id = 2 [json_name = "petId"]; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_pet_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pet.v1.Pet.pet_id")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string name = 3 [json_name = "name"]; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pet.v1.Pet.name")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .google.type.DateTime created_at = 4 [json_name = "createdAt"]; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_created_at(), 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* Pet::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pet.v1.Pet) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + if (this->_internal_pet_type() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_pet_type(), target); + } + + // string pet_id = 2 [json_name = "petId"]; + if (!this->_internal_pet_id().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_pet_id().data(), static_cast(this->_internal_pet_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pet.v1.Pet.pet_id"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_pet_id(), target); + } + + // string name = 3 [json_name = "name"]; + if (!this->_internal_name().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pet.v1.Pet.name"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_name(), target); + } + + // .google.type.DateTime created_at = 4 [json_name = "createdAt"]; + if (this->_internal_has_created_at()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 4, _Internal::created_at(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:pet.v1.Pet) + return target; +} + +size_t Pet::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pet.v1.Pet) + 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 pet_id = 2 [json_name = "petId"]; + if (!this->_internal_pet_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_pet_id()); + } + + // string name = 3 [json_name = "name"]; + if (!this->_internal_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // .google.type.DateTime created_at = 4 [json_name = "createdAt"]; + if (this->_internal_has_created_at()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *created_at_); + } + + // .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + if (this->_internal_pet_type() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_pet_type()); + } + + 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 Pet::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + Pet::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Pet::GetClassData() const { return &_class_data_; } + +void Pet::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to, + const ::PROTOBUF_NAMESPACE_ID::Message&from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void Pet::MergeFrom(const Pet& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pet.v1.Pet) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_pet_id().empty()) { + _internal_set_pet_id(from._internal_pet_id()); + } + if (!from._internal_name().empty()) { + _internal_set_name(from._internal_name()); + } + if (from._internal_has_created_at()) { + _internal_mutable_created_at()->::google::type::DateTime::MergeFrom(from._internal_created_at()); + } + if (from._internal_pet_type() != 0) { + _internal_set_pet_type(from._internal_pet_type()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void Pet::CopyFrom(const Pet& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pet.v1.Pet) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Pet::IsInitialized() const { + return true; +} + +void Pet::InternalSwap(Pet* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &pet_id_, GetArenaForAllocation(), + &other->pet_id_, other->GetArenaForAllocation() + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &name_, GetArenaForAllocation(), + &other->name_, other->GetArenaForAllocation() + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Pet, pet_type_) + + sizeof(Pet::pet_type_) + - PROTOBUF_FIELD_OFFSET(Pet, created_at_)>( + reinterpret_cast(&created_at_), + reinterpret_cast(&other->created_at_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Pet::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_pet_2fv1_2fpet_2eproto_getter, &descriptor_table_pet_2fv1_2fpet_2eproto_once, + file_level_metadata_pet_2fv1_2fpet_2eproto[0]); +} + +// =================================================================== + +class GetPetRequest::_Internal { + public: +}; + +GetPetRequest::GetPetRequest(::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:pet.v1.GetPetRequest) +} +GetPetRequest::GetPetRequest(const GetPetRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + pet_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_pet_id().empty()) { + pet_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_pet_id(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:pet.v1.GetPetRequest) +} + +inline void GetPetRequest::SharedCtor() { +pet_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +GetPetRequest::~GetPetRequest() { + // @@protoc_insertion_point(destructor:pet.v1.GetPetRequest) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void GetPetRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + pet_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void GetPetRequest::ArenaDtor(void* object) { + GetPetRequest* _this = reinterpret_cast< GetPetRequest* >(object); + (void)_this; +} +void GetPetRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void GetPetRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void GetPetRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:pet.v1.GetPetRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + pet_id_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GetPetRequest::_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 pet_id = 1 [json_name = "petId"]; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_pet_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pet.v1.GetPetRequest.pet_id")); + 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* GetPetRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pet.v1.GetPetRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string pet_id = 1 [json_name = "petId"]; + if (!this->_internal_pet_id().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_pet_id().data(), static_cast(this->_internal_pet_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pet.v1.GetPetRequest.pet_id"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_pet_id(), 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:pet.v1.GetPetRequest) + return target; +} + +size_t GetPetRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pet.v1.GetPetRequest) + 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 pet_id = 1 [json_name = "petId"]; + if (!this->_internal_pet_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_pet_id()); + } + + 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 GetPetRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + GetPetRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetPetRequest::GetClassData() const { return &_class_data_; } + +void GetPetRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to, + const ::PROTOBUF_NAMESPACE_ID::Message&from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void GetPetRequest::MergeFrom(const GetPetRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pet.v1.GetPetRequest) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_pet_id().empty()) { + _internal_set_pet_id(from._internal_pet_id()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GetPetRequest::CopyFrom(const GetPetRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pet.v1.GetPetRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetPetRequest::IsInitialized() const { + return true; +} + +void GetPetRequest::InternalSwap(GetPetRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &pet_id_, GetArenaForAllocation(), + &other->pet_id_, other->GetArenaForAllocation() + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GetPetRequest::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_pet_2fv1_2fpet_2eproto_getter, &descriptor_table_pet_2fv1_2fpet_2eproto_once, + file_level_metadata_pet_2fv1_2fpet_2eproto[1]); +} + +// =================================================================== + +class GetPetResponse::_Internal { + public: + static const ::pet::v1::Pet& pet(const GetPetResponse* msg); +}; + +const ::pet::v1::Pet& +GetPetResponse::_Internal::pet(const GetPetResponse* msg) { + return *msg->pet_; +} +GetPetResponse::GetPetResponse(::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:pet.v1.GetPetResponse) +} +GetPetResponse::GetPetResponse(const GetPetResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_pet()) { + pet_ = new ::pet::v1::Pet(*from.pet_); + } else { + pet_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:pet.v1.GetPetResponse) +} + +inline void GetPetResponse::SharedCtor() { +pet_ = nullptr; +} + +GetPetResponse::~GetPetResponse() { + // @@protoc_insertion_point(destructor:pet.v1.GetPetResponse) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void GetPetResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete pet_; +} + +void GetPetResponse::ArenaDtor(void* object) { + GetPetResponse* _this = reinterpret_cast< GetPetResponse* >(object); + (void)_this; +} +void GetPetResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void GetPetResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void GetPetResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:pet.v1.GetPetResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && pet_ != nullptr) { + delete pet_; + } + pet_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GetPetResponse::_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) { + // .pet.v1.Pet pet = 1 [json_name = "pet"]; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_pet(), 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* GetPetResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pet.v1.GetPetResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .pet.v1.Pet pet = 1 [json_name = "pet"]; + if (this->_internal_has_pet()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::pet(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:pet.v1.GetPetResponse) + return target; +} + +size_t GetPetResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pet.v1.GetPetResponse) + 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; + + // .pet.v1.Pet pet = 1 [json_name = "pet"]; + if (this->_internal_has_pet()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *pet_); + } + + 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 GetPetResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + GetPetResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetPetResponse::GetClassData() const { return &_class_data_; } + +void GetPetResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to, + const ::PROTOBUF_NAMESPACE_ID::Message&from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void GetPetResponse::MergeFrom(const GetPetResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pet.v1.GetPetResponse) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_pet()) { + _internal_mutable_pet()->::pet::v1::Pet::MergeFrom(from._internal_pet()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GetPetResponse::CopyFrom(const GetPetResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pet.v1.GetPetResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GetPetResponse::IsInitialized() const { + return true; +} + +void GetPetResponse::InternalSwap(GetPetResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(pet_, other->pet_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GetPetResponse::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_pet_2fv1_2fpet_2eproto_getter, &descriptor_table_pet_2fv1_2fpet_2eproto_once, + file_level_metadata_pet_2fv1_2fpet_2eproto[2]); +} + +// =================================================================== + +class PutPetRequest::_Internal { + public: +}; + +PutPetRequest::PutPetRequest(::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:pet.v1.PutPetRequest) +} +PutPetRequest::PutPetRequest(const PutPetRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_name().empty()) { + name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), + GetArenaForAllocation()); + } + pet_type_ = from.pet_type_; + // @@protoc_insertion_point(copy_constructor:pet.v1.PutPetRequest) +} + +inline void PutPetRequest::SharedCtor() { +name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +pet_type_ = 0; +} + +PutPetRequest::~PutPetRequest() { + // @@protoc_insertion_point(destructor:pet.v1.PutPetRequest) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void PutPetRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void PutPetRequest::ArenaDtor(void* object) { + PutPetRequest* _this = reinterpret_cast< PutPetRequest* >(object); + (void)_this; +} +void PutPetRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void PutPetRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void PutPetRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:pet.v1.PutPetRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + name_.ClearToEmpty(); + pet_type_ = 0; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* PutPetRequest::_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) { + // .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_pet_type(static_cast<::pet::v1::PetType>(val)); + } else goto handle_unusual; + continue; + // string name = 2 [json_name = "name"]; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pet.v1.PutPetRequest.name")); + 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* PutPetRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pet.v1.PutPetRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + if (this->_internal_pet_type() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_pet_type(), target); + } + + // string name = 2 [json_name = "name"]; + if (!this->_internal_name().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pet.v1.PutPetRequest.name"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_name(), 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:pet.v1.PutPetRequest) + return target; +} + +size_t PutPetRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pet.v1.PutPetRequest) + 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 name = 2 [json_name = "name"]; + if (!this->_internal_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + if (this->_internal_pet_type() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_pet_type()); + } + + 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 PutPetRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + PutPetRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PutPetRequest::GetClassData() const { return &_class_data_; } + +void PutPetRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to, + const ::PROTOBUF_NAMESPACE_ID::Message&from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void PutPetRequest::MergeFrom(const PutPetRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pet.v1.PutPetRequest) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_name().empty()) { + _internal_set_name(from._internal_name()); + } + if (from._internal_pet_type() != 0) { + _internal_set_pet_type(from._internal_pet_type()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void PutPetRequest::CopyFrom(const PutPetRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pet.v1.PutPetRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PutPetRequest::IsInitialized() const { + return true; +} + +void PutPetRequest::InternalSwap(PutPetRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &name_, GetArenaForAllocation(), + &other->name_, other->GetArenaForAllocation() + ); + swap(pet_type_, other->pet_type_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata PutPetRequest::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_pet_2fv1_2fpet_2eproto_getter, &descriptor_table_pet_2fv1_2fpet_2eproto_once, + file_level_metadata_pet_2fv1_2fpet_2eproto[3]); +} + +// =================================================================== + +class PutPetResponse::_Internal { + public: + static const ::pet::v1::Pet& pet(const PutPetResponse* msg); +}; + +const ::pet::v1::Pet& +PutPetResponse::_Internal::pet(const PutPetResponse* msg) { + return *msg->pet_; +} +PutPetResponse::PutPetResponse(::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:pet.v1.PutPetResponse) +} +PutPetResponse::PutPetResponse(const PutPetResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_pet()) { + pet_ = new ::pet::v1::Pet(*from.pet_); + } else { + pet_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:pet.v1.PutPetResponse) +} + +inline void PutPetResponse::SharedCtor() { +pet_ = nullptr; +} + +PutPetResponse::~PutPetResponse() { + // @@protoc_insertion_point(destructor:pet.v1.PutPetResponse) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void PutPetResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete pet_; +} + +void PutPetResponse::ArenaDtor(void* object) { + PutPetResponse* _this = reinterpret_cast< PutPetResponse* >(object); + (void)_this; +} +void PutPetResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void PutPetResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void PutPetResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:pet.v1.PutPetResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && pet_ != nullptr) { + delete pet_; + } + pet_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* PutPetResponse::_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) { + // .pet.v1.Pet pet = 1 [json_name = "pet"]; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_pet(), 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* PutPetResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pet.v1.PutPetResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .pet.v1.Pet pet = 1 [json_name = "pet"]; + if (this->_internal_has_pet()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::pet(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:pet.v1.PutPetResponse) + return target; +} + +size_t PutPetResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pet.v1.PutPetResponse) + 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; + + // .pet.v1.Pet pet = 1 [json_name = "pet"]; + if (this->_internal_has_pet()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *pet_); + } + + 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 PutPetResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + PutPetResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PutPetResponse::GetClassData() const { return &_class_data_; } + +void PutPetResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to, + const ::PROTOBUF_NAMESPACE_ID::Message&from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void PutPetResponse::MergeFrom(const PutPetResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pet.v1.PutPetResponse) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_pet()) { + _internal_mutable_pet()->::pet::v1::Pet::MergeFrom(from._internal_pet()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void PutPetResponse::CopyFrom(const PutPetResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pet.v1.PutPetResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PutPetResponse::IsInitialized() const { + return true; +} + +void PutPetResponse::InternalSwap(PutPetResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(pet_, other->pet_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata PutPetResponse::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_pet_2fv1_2fpet_2eproto_getter, &descriptor_table_pet_2fv1_2fpet_2eproto_once, + file_level_metadata_pet_2fv1_2fpet_2eproto[4]); +} + +// =================================================================== + +class DeletePetRequest::_Internal { + public: +}; + +DeletePetRequest::DeletePetRequest(::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:pet.v1.DeletePetRequest) +} +DeletePetRequest::DeletePetRequest(const DeletePetRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + pet_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_pet_id().empty()) { + pet_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_pet_id(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:pet.v1.DeletePetRequest) +} + +inline void DeletePetRequest::SharedCtor() { +pet_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +DeletePetRequest::~DeletePetRequest() { + // @@protoc_insertion_point(destructor:pet.v1.DeletePetRequest) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void DeletePetRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + pet_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void DeletePetRequest::ArenaDtor(void* object) { + DeletePetRequest* _this = reinterpret_cast< DeletePetRequest* >(object); + (void)_this; +} +void DeletePetRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void DeletePetRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void DeletePetRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:pet.v1.DeletePetRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + pet_id_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* DeletePetRequest::_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 pet_id = 1 [json_name = "petId"]; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_pet_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "pet.v1.DeletePetRequest.pet_id")); + 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* DeletePetRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pet.v1.DeletePetRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string pet_id = 1 [json_name = "petId"]; + if (!this->_internal_pet_id().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_pet_id().data(), static_cast(this->_internal_pet_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "pet.v1.DeletePetRequest.pet_id"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_pet_id(), 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:pet.v1.DeletePetRequest) + return target; +} + +size_t DeletePetRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pet.v1.DeletePetRequest) + 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 pet_id = 1 [json_name = "petId"]; + if (!this->_internal_pet_id().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_pet_id()); + } + + 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 DeletePetRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + DeletePetRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*DeletePetRequest::GetClassData() const { return &_class_data_; } + +void DeletePetRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to, + const ::PROTOBUF_NAMESPACE_ID::Message&from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void DeletePetRequest::MergeFrom(const DeletePetRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pet.v1.DeletePetRequest) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_pet_id().empty()) { + _internal_set_pet_id(from._internal_pet_id()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void DeletePetRequest::CopyFrom(const DeletePetRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pet.v1.DeletePetRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DeletePetRequest::IsInitialized() const { + return true; +} + +void DeletePetRequest::InternalSwap(DeletePetRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &pet_id_, GetArenaForAllocation(), + &other->pet_id_, other->GetArenaForAllocation() + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata DeletePetRequest::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_pet_2fv1_2fpet_2eproto_getter, &descriptor_table_pet_2fv1_2fpet_2eproto_once, + file_level_metadata_pet_2fv1_2fpet_2eproto[5]); +} + +// =================================================================== + +class DeletePetResponse::_Internal { + public: +}; + +DeletePetResponse::DeletePetResponse(::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:pet.v1.DeletePetResponse) +} +DeletePetResponse::DeletePetResponse(const DeletePetResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:pet.v1.DeletePetResponse) +} + +inline void DeletePetResponse::SharedCtor() { +} + +DeletePetResponse::~DeletePetResponse() { + // @@protoc_insertion_point(destructor:pet.v1.DeletePetResponse) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void DeletePetResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void DeletePetResponse::ArenaDtor(void* object) { + DeletePetResponse* _this = reinterpret_cast< DeletePetResponse* >(object); + (void)_this; +} +void DeletePetResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void DeletePetResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void DeletePetResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:pet.v1.DeletePetResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* DeletePetResponse::_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); + 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; + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8* DeletePetResponse::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:pet.v1.DeletePetResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + 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:pet.v1.DeletePetResponse) + return target; +} + +size_t DeletePetResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:pet.v1.DeletePetResponse) + 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; + + 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 DeletePetResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + DeletePetResponse::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*DeletePetResponse::GetClassData() const { return &_class_data_; } + +void DeletePetResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to, + const ::PROTOBUF_NAMESPACE_ID::Message&from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void DeletePetResponse::MergeFrom(const DeletePetResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:pet.v1.DeletePetResponse) + GOOGLE_DCHECK_NE(&from, this); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void DeletePetResponse::CopyFrom(const DeletePetResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:pet.v1.DeletePetResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DeletePetResponse::IsInitialized() const { + return true; +} + +void DeletePetResponse::InternalSwap(DeletePetResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata DeletePetResponse::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_pet_2fv1_2fpet_2eproto_getter, &descriptor_table_pet_2fv1_2fpet_2eproto_once, + file_level_metadata_pet_2fv1_2fpet_2eproto[6]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace v1 +} // namespace pet +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::pet::v1::Pet* Arena::CreateMaybeMessage< ::pet::v1::Pet >(Arena* arena) { + return Arena::CreateMessageInternal< ::pet::v1::Pet >(arena); +} +template<> PROTOBUF_NOINLINE ::pet::v1::GetPetRequest* Arena::CreateMaybeMessage< ::pet::v1::GetPetRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::pet::v1::GetPetRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::pet::v1::GetPetResponse* Arena::CreateMaybeMessage< ::pet::v1::GetPetResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::pet::v1::GetPetResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::pet::v1::PutPetRequest* Arena::CreateMaybeMessage< ::pet::v1::PutPetRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::pet::v1::PutPetRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::pet::v1::PutPetResponse* Arena::CreateMaybeMessage< ::pet::v1::PutPetResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::pet::v1::PutPetResponse >(arena); +} +template<> PROTOBUF_NOINLINE ::pet::v1::DeletePetRequest* Arena::CreateMaybeMessage< ::pet::v1::DeletePetRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::pet::v1::DeletePetRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::pet::v1::DeletePetResponse* Arena::CreateMaybeMessage< ::pet::v1::DeletePetResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::pet::v1::DeletePetResponse >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/gen/cpp/pet/v1/pet.pb.h b/gen/cpp/pet/v1/pet.pb.h new file mode 100644 index 0000000..38be8b6 --- /dev/null +++ b/gen/cpp/pet/v1/pet.pb.h @@ -0,0 +1,1784 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: pet/v1/pet.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_pet_2fv1_2fpet_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_pet_2fv1_2fpet_2eproto + +#include +#include + +#include +#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 +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include "google/type/datetime.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_pet_2fv1_2fpet_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_pet_2fv1_2fpet_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[7] + 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_pet_2fv1_2fpet_2eproto; +namespace pet { +namespace v1 { +class DeletePetRequest; +struct DeletePetRequestDefaultTypeInternal; +extern DeletePetRequestDefaultTypeInternal _DeletePetRequest_default_instance_; +class DeletePetResponse; +struct DeletePetResponseDefaultTypeInternal; +extern DeletePetResponseDefaultTypeInternal _DeletePetResponse_default_instance_; +class GetPetRequest; +struct GetPetRequestDefaultTypeInternal; +extern GetPetRequestDefaultTypeInternal _GetPetRequest_default_instance_; +class GetPetResponse; +struct GetPetResponseDefaultTypeInternal; +extern GetPetResponseDefaultTypeInternal _GetPetResponse_default_instance_; +class Pet; +struct PetDefaultTypeInternal; +extern PetDefaultTypeInternal _Pet_default_instance_; +class PutPetRequest; +struct PutPetRequestDefaultTypeInternal; +extern PutPetRequestDefaultTypeInternal _PutPetRequest_default_instance_; +class PutPetResponse; +struct PutPetResponseDefaultTypeInternal; +extern PutPetResponseDefaultTypeInternal _PutPetResponse_default_instance_; +} // namespace v1 +} // namespace pet +PROTOBUF_NAMESPACE_OPEN +template<> ::pet::v1::DeletePetRequest* Arena::CreateMaybeMessage<::pet::v1::DeletePetRequest>(Arena*); +template<> ::pet::v1::DeletePetResponse* Arena::CreateMaybeMessage<::pet::v1::DeletePetResponse>(Arena*); +template<> ::pet::v1::GetPetRequest* Arena::CreateMaybeMessage<::pet::v1::GetPetRequest>(Arena*); +template<> ::pet::v1::GetPetResponse* Arena::CreateMaybeMessage<::pet::v1::GetPetResponse>(Arena*); +template<> ::pet::v1::Pet* Arena::CreateMaybeMessage<::pet::v1::Pet>(Arena*); +template<> ::pet::v1::PutPetRequest* Arena::CreateMaybeMessage<::pet::v1::PutPetRequest>(Arena*); +template<> ::pet::v1::PutPetResponse* Arena::CreateMaybeMessage<::pet::v1::PutPetResponse>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace pet { +namespace v1 { + +enum PetType : int { + PET_TYPE_UNSPECIFIED = 0, + PET_TYPE_CAT = 1, + PET_TYPE_DOG = 2, + PET_TYPE_SNAKE = 3, + PET_TYPE_HAMSTER = 4, + PetType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + PetType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool PetType_IsValid(int value); +constexpr PetType PetType_MIN = PET_TYPE_UNSPECIFIED; +constexpr PetType PetType_MAX = PET_TYPE_HAMSTER; +constexpr int PetType_ARRAYSIZE = PetType_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PetType_descriptor(); +template +inline const std::string& PetType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function PetType_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + PetType_descriptor(), enum_t_value); +} +inline bool PetType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, PetType* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + PetType_descriptor(), name, value); +} +// =================================================================== + +class Pet final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pet.v1.Pet) */ { + public: + inline Pet() : Pet(nullptr) {} + ~Pet() override; + explicit constexpr Pet(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Pet(const Pet& from); + Pet(Pet&& from) noexcept + : Pet() { + *this = ::std::move(from); + } + + inline Pet& operator=(const Pet& from) { + CopyFrom(from); + return *this; + } + inline Pet& operator=(Pet&& 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 Pet& default_instance() { + return *internal_default_instance(); + } + static inline const Pet* internal_default_instance() { + return reinterpret_cast( + &_Pet_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(Pet& a, Pet& b) { + a.Swap(&b); + } + inline void Swap(Pet* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Pet* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Pet* New() const final { + return new Pet(); + } + + Pet* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Pet& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const Pet& 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(Pet* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pet.v1.Pet"; + } + protected: + explicit Pet(::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 { + kPetIdFieldNumber = 2, + kNameFieldNumber = 3, + kCreatedAtFieldNumber = 4, + kPetTypeFieldNumber = 1, + }; + // string pet_id = 2 [json_name = "petId"]; + void clear_pet_id(); + const std::string& pet_id() const; + template + void set_pet_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_pet_id(); + PROTOBUF_MUST_USE_RESULT std::string* release_pet_id(); + void set_allocated_pet_id(std::string* pet_id); + private: + const std::string& _internal_pet_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_pet_id(const std::string& value); + std::string* _internal_mutable_pet_id(); + public: + + // string name = 3 [json_name = "name"]; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_MUST_USE_RESULT std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // .google.type.DateTime created_at = 4 [json_name = "createdAt"]; + bool has_created_at() const; + private: + bool _internal_has_created_at() const; + public: + void clear_created_at(); + const ::google::type::DateTime& created_at() const; + PROTOBUF_MUST_USE_RESULT ::google::type::DateTime* release_created_at(); + ::google::type::DateTime* mutable_created_at(); + void set_allocated_created_at(::google::type::DateTime* created_at); + private: + const ::google::type::DateTime& _internal_created_at() const; + ::google::type::DateTime* _internal_mutable_created_at(); + public: + void unsafe_arena_set_allocated_created_at( + ::google::type::DateTime* created_at); + ::google::type::DateTime* unsafe_arena_release_created_at(); + + // .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + void clear_pet_type(); + ::pet::v1::PetType pet_type() const; + void set_pet_type(::pet::v1::PetType value); + private: + ::pet::v1::PetType _internal_pet_type() const; + void _internal_set_pet_type(::pet::v1::PetType value); + public: + + // @@protoc_insertion_point(class_scope:pet.v1.Pet) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr pet_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::google::type::DateTime* created_at_; + int pet_type_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_pet_2fv1_2fpet_2eproto; +}; +// ------------------------------------------------------------------- + +class GetPetRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pet.v1.GetPetRequest) */ { + public: + inline GetPetRequest() : GetPetRequest(nullptr) {} + ~GetPetRequest() override; + explicit constexpr GetPetRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetPetRequest(const GetPetRequest& from); + GetPetRequest(GetPetRequest&& from) noexcept + : GetPetRequest() { + *this = ::std::move(from); + } + + inline GetPetRequest& operator=(const GetPetRequest& from) { + CopyFrom(from); + return *this; + } + inline GetPetRequest& operator=(GetPetRequest&& 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 GetPetRequest& default_instance() { + return *internal_default_instance(); + } + static inline const GetPetRequest* internal_default_instance() { + return reinterpret_cast( + &_GetPetRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(GetPetRequest& a, GetPetRequest& b) { + a.Swap(&b); + } + inline void Swap(GetPetRequest* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetPetRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline GetPetRequest* New() const final { + return new GetPetRequest(); + } + + GetPetRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetPetRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const GetPetRequest& 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(GetPetRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pet.v1.GetPetRequest"; + } + protected: + explicit GetPetRequest(::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 { + kPetIdFieldNumber = 1, + }; + // string pet_id = 1 [json_name = "petId"]; + void clear_pet_id(); + const std::string& pet_id() const; + template + void set_pet_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_pet_id(); + PROTOBUF_MUST_USE_RESULT std::string* release_pet_id(); + void set_allocated_pet_id(std::string* pet_id); + private: + const std::string& _internal_pet_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_pet_id(const std::string& value); + std::string* _internal_mutable_pet_id(); + public: + + // @@protoc_insertion_point(class_scope:pet.v1.GetPetRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr pet_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_pet_2fv1_2fpet_2eproto; +}; +// ------------------------------------------------------------------- + +class GetPetResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pet.v1.GetPetResponse) */ { + public: + inline GetPetResponse() : GetPetResponse(nullptr) {} + ~GetPetResponse() override; + explicit constexpr GetPetResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GetPetResponse(const GetPetResponse& from); + GetPetResponse(GetPetResponse&& from) noexcept + : GetPetResponse() { + *this = ::std::move(from); + } + + inline GetPetResponse& operator=(const GetPetResponse& from) { + CopyFrom(from); + return *this; + } + inline GetPetResponse& operator=(GetPetResponse&& 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 GetPetResponse& default_instance() { + return *internal_default_instance(); + } + static inline const GetPetResponse* internal_default_instance() { + return reinterpret_cast( + &_GetPetResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(GetPetResponse& a, GetPetResponse& b) { + a.Swap(&b); + } + inline void Swap(GetPetResponse* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GetPetResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline GetPetResponse* New() const final { + return new GetPetResponse(); + } + + GetPetResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GetPetResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const GetPetResponse& 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(GetPetResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pet.v1.GetPetResponse"; + } + protected: + explicit GetPetResponse(::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 { + kPetFieldNumber = 1, + }; + // .pet.v1.Pet pet = 1 [json_name = "pet"]; + bool has_pet() const; + private: + bool _internal_has_pet() const; + public: + void clear_pet(); + const ::pet::v1::Pet& pet() const; + PROTOBUF_MUST_USE_RESULT ::pet::v1::Pet* release_pet(); + ::pet::v1::Pet* mutable_pet(); + void set_allocated_pet(::pet::v1::Pet* pet); + private: + const ::pet::v1::Pet& _internal_pet() const; + ::pet::v1::Pet* _internal_mutable_pet(); + public: + void unsafe_arena_set_allocated_pet( + ::pet::v1::Pet* pet); + ::pet::v1::Pet* unsafe_arena_release_pet(); + + // @@protoc_insertion_point(class_scope:pet.v1.GetPetResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::pet::v1::Pet* pet_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_pet_2fv1_2fpet_2eproto; +}; +// ------------------------------------------------------------------- + +class PutPetRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pet.v1.PutPetRequest) */ { + public: + inline PutPetRequest() : PutPetRequest(nullptr) {} + ~PutPetRequest() override; + explicit constexpr PutPetRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + PutPetRequest(const PutPetRequest& from); + PutPetRequest(PutPetRequest&& from) noexcept + : PutPetRequest() { + *this = ::std::move(from); + } + + inline PutPetRequest& operator=(const PutPetRequest& from) { + CopyFrom(from); + return *this; + } + inline PutPetRequest& operator=(PutPetRequest&& 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 PutPetRequest& default_instance() { + return *internal_default_instance(); + } + static inline const PutPetRequest* internal_default_instance() { + return reinterpret_cast( + &_PutPetRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(PutPetRequest& a, PutPetRequest& b) { + a.Swap(&b); + } + inline void Swap(PutPetRequest* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(PutPetRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline PutPetRequest* New() const final { + return new PutPetRequest(); + } + + PutPetRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const PutPetRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const PutPetRequest& 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(PutPetRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pet.v1.PutPetRequest"; + } + protected: + explicit PutPetRequest(::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 { + kNameFieldNumber = 2, + kPetTypeFieldNumber = 1, + }; + // string name = 2 [json_name = "name"]; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_MUST_USE_RESULT std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + void clear_pet_type(); + ::pet::v1::PetType pet_type() const; + void set_pet_type(::pet::v1::PetType value); + private: + ::pet::v1::PetType _internal_pet_type() const; + void _internal_set_pet_type(::pet::v1::PetType value); + public: + + // @@protoc_insertion_point(class_scope:pet.v1.PutPetRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + int pet_type_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_pet_2fv1_2fpet_2eproto; +}; +// ------------------------------------------------------------------- + +class PutPetResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pet.v1.PutPetResponse) */ { + public: + inline PutPetResponse() : PutPetResponse(nullptr) {} + ~PutPetResponse() override; + explicit constexpr PutPetResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + PutPetResponse(const PutPetResponse& from); + PutPetResponse(PutPetResponse&& from) noexcept + : PutPetResponse() { + *this = ::std::move(from); + } + + inline PutPetResponse& operator=(const PutPetResponse& from) { + CopyFrom(from); + return *this; + } + inline PutPetResponse& operator=(PutPetResponse&& 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 PutPetResponse& default_instance() { + return *internal_default_instance(); + } + static inline const PutPetResponse* internal_default_instance() { + return reinterpret_cast( + &_PutPetResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(PutPetResponse& a, PutPetResponse& b) { + a.Swap(&b); + } + inline void Swap(PutPetResponse* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(PutPetResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline PutPetResponse* New() const final { + return new PutPetResponse(); + } + + PutPetResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const PutPetResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const PutPetResponse& 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(PutPetResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pet.v1.PutPetResponse"; + } + protected: + explicit PutPetResponse(::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 { + kPetFieldNumber = 1, + }; + // .pet.v1.Pet pet = 1 [json_name = "pet"]; + bool has_pet() const; + private: + bool _internal_has_pet() const; + public: + void clear_pet(); + const ::pet::v1::Pet& pet() const; + PROTOBUF_MUST_USE_RESULT ::pet::v1::Pet* release_pet(); + ::pet::v1::Pet* mutable_pet(); + void set_allocated_pet(::pet::v1::Pet* pet); + private: + const ::pet::v1::Pet& _internal_pet() const; + ::pet::v1::Pet* _internal_mutable_pet(); + public: + void unsafe_arena_set_allocated_pet( + ::pet::v1::Pet* pet); + ::pet::v1::Pet* unsafe_arena_release_pet(); + + // @@protoc_insertion_point(class_scope:pet.v1.PutPetResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::pet::v1::Pet* pet_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_pet_2fv1_2fpet_2eproto; +}; +// ------------------------------------------------------------------- + +class DeletePetRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pet.v1.DeletePetRequest) */ { + public: + inline DeletePetRequest() : DeletePetRequest(nullptr) {} + ~DeletePetRequest() override; + explicit constexpr DeletePetRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DeletePetRequest(const DeletePetRequest& from); + DeletePetRequest(DeletePetRequest&& from) noexcept + : DeletePetRequest() { + *this = ::std::move(from); + } + + inline DeletePetRequest& operator=(const DeletePetRequest& from) { + CopyFrom(from); + return *this; + } + inline DeletePetRequest& operator=(DeletePetRequest&& 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 DeletePetRequest& default_instance() { + return *internal_default_instance(); + } + static inline const DeletePetRequest* internal_default_instance() { + return reinterpret_cast( + &_DeletePetRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(DeletePetRequest& a, DeletePetRequest& b) { + a.Swap(&b); + } + inline void Swap(DeletePetRequest* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DeletePetRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline DeletePetRequest* New() const final { + return new DeletePetRequest(); + } + + DeletePetRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DeletePetRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const DeletePetRequest& 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(DeletePetRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pet.v1.DeletePetRequest"; + } + protected: + explicit DeletePetRequest(::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 { + kPetIdFieldNumber = 1, + }; + // string pet_id = 1 [json_name = "petId"]; + void clear_pet_id(); + const std::string& pet_id() const; + template + void set_pet_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_pet_id(); + PROTOBUF_MUST_USE_RESULT std::string* release_pet_id(); + void set_allocated_pet_id(std::string* pet_id); + private: + const std::string& _internal_pet_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_pet_id(const std::string& value); + std::string* _internal_mutable_pet_id(); + public: + + // @@protoc_insertion_point(class_scope:pet.v1.DeletePetRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr pet_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_pet_2fv1_2fpet_2eproto; +}; +// ------------------------------------------------------------------- + +class DeletePetResponse final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:pet.v1.DeletePetResponse) */ { + public: + inline DeletePetResponse() : DeletePetResponse(nullptr) {} + ~DeletePetResponse() override; + explicit constexpr DeletePetResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DeletePetResponse(const DeletePetResponse& from); + DeletePetResponse(DeletePetResponse&& from) noexcept + : DeletePetResponse() { + *this = ::std::move(from); + } + + inline DeletePetResponse& operator=(const DeletePetResponse& from) { + CopyFrom(from); + return *this; + } + inline DeletePetResponse& operator=(DeletePetResponse&& 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 DeletePetResponse& default_instance() { + return *internal_default_instance(); + } + static inline const DeletePetResponse* internal_default_instance() { + return reinterpret_cast( + &_DeletePetResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(DeletePetResponse& a, DeletePetResponse& b) { + a.Swap(&b); + } + inline void Swap(DeletePetResponse* other) { + if (other == this) return; + if (GetOwningArena() == other->GetOwningArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DeletePetResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline DeletePetResponse* New() const final { + return new DeletePetResponse(); + } + + DeletePetResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const DeletePetResponse& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const DeletePetResponse& 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(DeletePetResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "pet.v1.DeletePetResponse"; + } + protected: + explicit DeletePetResponse(::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 ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:pet.v1.DeletePetResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_pet_2fv1_2fpet_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// Pet + +// .pet.v1.PetType pet_type = 1 [json_name = "petType"]; +inline void Pet::clear_pet_type() { + pet_type_ = 0; +} +inline ::pet::v1::PetType Pet::_internal_pet_type() const { + return static_cast< ::pet::v1::PetType >(pet_type_); +} +inline ::pet::v1::PetType Pet::pet_type() const { + // @@protoc_insertion_point(field_get:pet.v1.Pet.pet_type) + return _internal_pet_type(); +} +inline void Pet::_internal_set_pet_type(::pet::v1::PetType value) { + + pet_type_ = value; +} +inline void Pet::set_pet_type(::pet::v1::PetType value) { + _internal_set_pet_type(value); + // @@protoc_insertion_point(field_set:pet.v1.Pet.pet_type) +} + +// string pet_id = 2 [json_name = "petId"]; +inline void Pet::clear_pet_id() { + pet_id_.ClearToEmpty(); +} +inline const std::string& Pet::pet_id() const { + // @@protoc_insertion_point(field_get:pet.v1.Pet.pet_id) + return _internal_pet_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Pet::set_pet_id(ArgT0&& arg0, ArgT... args) { + + pet_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:pet.v1.Pet.pet_id) +} +inline std::string* Pet::mutable_pet_id() { + std::string* _s = _internal_mutable_pet_id(); + // @@protoc_insertion_point(field_mutable:pet.v1.Pet.pet_id) + return _s; +} +inline const std::string& Pet::_internal_pet_id() const { + return pet_id_.Get(); +} +inline void Pet::_internal_set_pet_id(const std::string& value) { + + pet_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Pet::_internal_mutable_pet_id() { + + return pet_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Pet::release_pet_id() { + // @@protoc_insertion_point(field_release:pet.v1.Pet.pet_id) + return pet_id_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void Pet::set_allocated_pet_id(std::string* pet_id) { + if (pet_id != nullptr) { + + } else { + + } + pet_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), pet_id, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:pet.v1.Pet.pet_id) +} + +// string name = 3 [json_name = "name"]; +inline void Pet::clear_name() { + name_.ClearToEmpty(); +} +inline const std::string& Pet::name() const { + // @@protoc_insertion_point(field_get:pet.v1.Pet.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Pet::set_name(ArgT0&& arg0, ArgT... args) { + + name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:pet.v1.Pet.name) +} +inline std::string* Pet::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:pet.v1.Pet.name) + return _s; +} +inline const std::string& Pet::_internal_name() const { + return name_.Get(); +} +inline void Pet::_internal_set_name(const std::string& value) { + + name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* Pet::_internal_mutable_name() { + + return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* Pet::release_name() { + // @@protoc_insertion_point(field_release:pet.v1.Pet.name) + return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void Pet::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:pet.v1.Pet.name) +} + +// .google.type.DateTime created_at = 4 [json_name = "createdAt"]; +inline bool Pet::_internal_has_created_at() const { + return this != internal_default_instance() && created_at_ != nullptr; +} +inline bool Pet::has_created_at() const { + return _internal_has_created_at(); +} +inline const ::google::type::DateTime& Pet::_internal_created_at() const { + const ::google::type::DateTime* p = created_at_; + return p != nullptr ? *p : reinterpret_cast( + ::google::type::_DateTime_default_instance_); +} +inline const ::google::type::DateTime& Pet::created_at() const { + // @@protoc_insertion_point(field_get:pet.v1.Pet.created_at) + return _internal_created_at(); +} +inline void Pet::unsafe_arena_set_allocated_created_at( + ::google::type::DateTime* created_at) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(created_at_); + } + created_at_ = created_at; + if (created_at) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:pet.v1.Pet.created_at) +} +inline ::google::type::DateTime* Pet::release_created_at() { + + ::google::type::DateTime* temp = created_at_; + created_at_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::google::type::DateTime* Pet::unsafe_arena_release_created_at() { + // @@protoc_insertion_point(field_release:pet.v1.Pet.created_at) + + ::google::type::DateTime* temp = created_at_; + created_at_ = nullptr; + return temp; +} +inline ::google::type::DateTime* Pet::_internal_mutable_created_at() { + + if (created_at_ == nullptr) { + auto* p = CreateMaybeMessage<::google::type::DateTime>(GetArenaForAllocation()); + created_at_ = p; + } + return created_at_; +} +inline ::google::type::DateTime* Pet::mutable_created_at() { + ::google::type::DateTime* _msg = _internal_mutable_created_at(); + // @@protoc_insertion_point(field_mutable:pet.v1.Pet.created_at) + return _msg; +} +inline void Pet::set_allocated_created_at(::google::type::DateTime* created_at) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(created_at_); + } + if (created_at) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper< + ::PROTOBUF_NAMESPACE_ID::MessageLite>::GetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(created_at)); + if (message_arena != submessage_arena) { + created_at = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, created_at, submessage_arena); + } + + } else { + + } + created_at_ = created_at; + // @@protoc_insertion_point(field_set_allocated:pet.v1.Pet.created_at) +} + +// ------------------------------------------------------------------- + +// GetPetRequest + +// string pet_id = 1 [json_name = "petId"]; +inline void GetPetRequest::clear_pet_id() { + pet_id_.ClearToEmpty(); +} +inline const std::string& GetPetRequest::pet_id() const { + // @@protoc_insertion_point(field_get:pet.v1.GetPetRequest.pet_id) + return _internal_pet_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GetPetRequest::set_pet_id(ArgT0&& arg0, ArgT... args) { + + pet_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:pet.v1.GetPetRequest.pet_id) +} +inline std::string* GetPetRequest::mutable_pet_id() { + std::string* _s = _internal_mutable_pet_id(); + // @@protoc_insertion_point(field_mutable:pet.v1.GetPetRequest.pet_id) + return _s; +} +inline const std::string& GetPetRequest::_internal_pet_id() const { + return pet_id_.Get(); +} +inline void GetPetRequest::_internal_set_pet_id(const std::string& value) { + + pet_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* GetPetRequest::_internal_mutable_pet_id() { + + return pet_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* GetPetRequest::release_pet_id() { + // @@protoc_insertion_point(field_release:pet.v1.GetPetRequest.pet_id) + return pet_id_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void GetPetRequest::set_allocated_pet_id(std::string* pet_id) { + if (pet_id != nullptr) { + + } else { + + } + pet_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), pet_id, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:pet.v1.GetPetRequest.pet_id) +} + +// ------------------------------------------------------------------- + +// GetPetResponse + +// .pet.v1.Pet pet = 1 [json_name = "pet"]; +inline bool GetPetResponse::_internal_has_pet() const { + return this != internal_default_instance() && pet_ != nullptr; +} +inline bool GetPetResponse::has_pet() const { + return _internal_has_pet(); +} +inline void GetPetResponse::clear_pet() { + if (GetArenaForAllocation() == nullptr && pet_ != nullptr) { + delete pet_; + } + pet_ = nullptr; +} +inline const ::pet::v1::Pet& GetPetResponse::_internal_pet() const { + const ::pet::v1::Pet* p = pet_; + return p != nullptr ? *p : reinterpret_cast( + ::pet::v1::_Pet_default_instance_); +} +inline const ::pet::v1::Pet& GetPetResponse::pet() const { + // @@protoc_insertion_point(field_get:pet.v1.GetPetResponse.pet) + return _internal_pet(); +} +inline void GetPetResponse::unsafe_arena_set_allocated_pet( + ::pet::v1::Pet* pet) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(pet_); + } + pet_ = pet; + if (pet) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:pet.v1.GetPetResponse.pet) +} +inline ::pet::v1::Pet* GetPetResponse::release_pet() { + + ::pet::v1::Pet* temp = pet_; + pet_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::pet::v1::Pet* GetPetResponse::unsafe_arena_release_pet() { + // @@protoc_insertion_point(field_release:pet.v1.GetPetResponse.pet) + + ::pet::v1::Pet* temp = pet_; + pet_ = nullptr; + return temp; +} +inline ::pet::v1::Pet* GetPetResponse::_internal_mutable_pet() { + + if (pet_ == nullptr) { + auto* p = CreateMaybeMessage<::pet::v1::Pet>(GetArenaForAllocation()); + pet_ = p; + } + return pet_; +} +inline ::pet::v1::Pet* GetPetResponse::mutable_pet() { + ::pet::v1::Pet* _msg = _internal_mutable_pet(); + // @@protoc_insertion_point(field_mutable:pet.v1.GetPetResponse.pet) + return _msg; +} +inline void GetPetResponse::set_allocated_pet(::pet::v1::Pet* pet) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete pet_; + } + if (pet) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::pet::v1::Pet>::GetOwningArena(pet); + if (message_arena != submessage_arena) { + pet = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, pet, submessage_arena); + } + + } else { + + } + pet_ = pet; + // @@protoc_insertion_point(field_set_allocated:pet.v1.GetPetResponse.pet) +} + +// ------------------------------------------------------------------- + +// PutPetRequest + +// .pet.v1.PetType pet_type = 1 [json_name = "petType"]; +inline void PutPetRequest::clear_pet_type() { + pet_type_ = 0; +} +inline ::pet::v1::PetType PutPetRequest::_internal_pet_type() const { + return static_cast< ::pet::v1::PetType >(pet_type_); +} +inline ::pet::v1::PetType PutPetRequest::pet_type() const { + // @@protoc_insertion_point(field_get:pet.v1.PutPetRequest.pet_type) + return _internal_pet_type(); +} +inline void PutPetRequest::_internal_set_pet_type(::pet::v1::PetType value) { + + pet_type_ = value; +} +inline void PutPetRequest::set_pet_type(::pet::v1::PetType value) { + _internal_set_pet_type(value); + // @@protoc_insertion_point(field_set:pet.v1.PutPetRequest.pet_type) +} + +// string name = 2 [json_name = "name"]; +inline void PutPetRequest::clear_name() { + name_.ClearToEmpty(); +} +inline const std::string& PutPetRequest::name() const { + // @@protoc_insertion_point(field_get:pet.v1.PutPetRequest.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PutPetRequest::set_name(ArgT0&& arg0, ArgT... args) { + + name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:pet.v1.PutPetRequest.name) +} +inline std::string* PutPetRequest::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:pet.v1.PutPetRequest.name) + return _s; +} +inline const std::string& PutPetRequest::_internal_name() const { + return name_.Get(); +} +inline void PutPetRequest::_internal_set_name(const std::string& value) { + + name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* PutPetRequest::_internal_mutable_name() { + + return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* PutPetRequest::release_name() { + // @@protoc_insertion_point(field_release:pet.v1.PutPetRequest.name) + return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void PutPetRequest::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:pet.v1.PutPetRequest.name) +} + +// ------------------------------------------------------------------- + +// PutPetResponse + +// .pet.v1.Pet pet = 1 [json_name = "pet"]; +inline bool PutPetResponse::_internal_has_pet() const { + return this != internal_default_instance() && pet_ != nullptr; +} +inline bool PutPetResponse::has_pet() const { + return _internal_has_pet(); +} +inline void PutPetResponse::clear_pet() { + if (GetArenaForAllocation() == nullptr && pet_ != nullptr) { + delete pet_; + } + pet_ = nullptr; +} +inline const ::pet::v1::Pet& PutPetResponse::_internal_pet() const { + const ::pet::v1::Pet* p = pet_; + return p != nullptr ? *p : reinterpret_cast( + ::pet::v1::_Pet_default_instance_); +} +inline const ::pet::v1::Pet& PutPetResponse::pet() const { + // @@protoc_insertion_point(field_get:pet.v1.PutPetResponse.pet) + return _internal_pet(); +} +inline void PutPetResponse::unsafe_arena_set_allocated_pet( + ::pet::v1::Pet* pet) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(pet_); + } + pet_ = pet; + if (pet) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:pet.v1.PutPetResponse.pet) +} +inline ::pet::v1::Pet* PutPetResponse::release_pet() { + + ::pet::v1::Pet* temp = pet_; + pet_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::pet::v1::Pet* PutPetResponse::unsafe_arena_release_pet() { + // @@protoc_insertion_point(field_release:pet.v1.PutPetResponse.pet) + + ::pet::v1::Pet* temp = pet_; + pet_ = nullptr; + return temp; +} +inline ::pet::v1::Pet* PutPetResponse::_internal_mutable_pet() { + + if (pet_ == nullptr) { + auto* p = CreateMaybeMessage<::pet::v1::Pet>(GetArenaForAllocation()); + pet_ = p; + } + return pet_; +} +inline ::pet::v1::Pet* PutPetResponse::mutable_pet() { + ::pet::v1::Pet* _msg = _internal_mutable_pet(); + // @@protoc_insertion_point(field_mutable:pet.v1.PutPetResponse.pet) + return _msg; +} +inline void PutPetResponse::set_allocated_pet(::pet::v1::Pet* pet) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete pet_; + } + if (pet) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::pet::v1::Pet>::GetOwningArena(pet); + if (message_arena != submessage_arena) { + pet = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, pet, submessage_arena); + } + + } else { + + } + pet_ = pet; + // @@protoc_insertion_point(field_set_allocated:pet.v1.PutPetResponse.pet) +} + +// ------------------------------------------------------------------- + +// DeletePetRequest + +// string pet_id = 1 [json_name = "petId"]; +inline void DeletePetRequest::clear_pet_id() { + pet_id_.ClearToEmpty(); +} +inline const std::string& DeletePetRequest::pet_id() const { + // @@protoc_insertion_point(field_get:pet.v1.DeletePetRequest.pet_id) + return _internal_pet_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DeletePetRequest::set_pet_id(ArgT0&& arg0, ArgT... args) { + + pet_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:pet.v1.DeletePetRequest.pet_id) +} +inline std::string* DeletePetRequest::mutable_pet_id() { + std::string* _s = _internal_mutable_pet_id(); + // @@protoc_insertion_point(field_mutable:pet.v1.DeletePetRequest.pet_id) + return _s; +} +inline const std::string& DeletePetRequest::_internal_pet_id() const { + return pet_id_.Get(); +} +inline void DeletePetRequest::_internal_set_pet_id(const std::string& value) { + + pet_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* DeletePetRequest::_internal_mutable_pet_id() { + + return pet_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* DeletePetRequest::release_pet_id() { + // @@protoc_insertion_point(field_release:pet.v1.DeletePetRequest.pet_id) + return pet_id_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +} +inline void DeletePetRequest::set_allocated_pet_id(std::string* pet_id) { + if (pet_id != nullptr) { + + } else { + + } + pet_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), pet_id, + GetArenaForAllocation()); + // @@protoc_insertion_point(field_set_allocated:pet.v1.DeletePetRequest.pet_id) +} + +// ------------------------------------------------------------------- + +// DeletePetResponse + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace v1 +} // namespace pet + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::pet::v1::PetType> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::pet::v1::PetType>() { + return ::pet::v1::PetType_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_pet_2fv1_2fpet_2eproto diff --git a/gen/go/google.golang.org/genproto/googleapis/type/datetime/datetime.pb.go b/gen/go/google.golang.org/genproto/googleapis/type/datetime/datetime.pb.go new file mode 100644 index 0000000..85d89fc --- /dev/null +++ b/gen/go/google.golang.org/genproto/googleapis/type/datetime/datetime.pb.go @@ -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 +} diff --git a/gen/go/pet/v1/pet.pb.go b/gen/go/pet/v1/pet.pb.go new file mode 100644 index 0000000..63a03fb --- /dev/null +++ b/gen/go/pet/v1/pet.pb.go @@ -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 +} diff --git a/gen/java/com/google/type/DateTime.java b/gen/java/com/google/type/DateTime.java new file mode 100644 index 0000000..cf10008 --- /dev/null +++ b/gen/java/com/google/type/DateTime.java @@ -0,0 +1,1662 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/type/datetime.proto + +package com.google.type; + +/** + *
+ * 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.
+ * 
+ * + * Protobuf type {@code google.type.DateTime} + */ +public final class DateTime extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.type.DateTime) + DateTimeOrBuilder { +private static final long serialVersionUID = 0L; + // Use DateTime.newBuilder() to construct. + private DateTime(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DateTime() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DateTime(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DateTime( + 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 8: { + + year_ = input.readInt32(); + break; + } + case 16: { + + month_ = input.readInt32(); + break; + } + case 24: { + + day_ = input.readInt32(); + break; + } + case 32: { + + hours_ = input.readInt32(); + break; + } + case 40: { + + minutes_ = input.readInt32(); + break; + } + case 48: { + + seconds_ = input.readInt32(); + break; + } + case 56: { + + nanos_ = input.readInt32(); + break; + } + case 66: { + com.google.protobuf.Duration.Builder subBuilder = null; + if (timeOffsetCase_ == 8) { + subBuilder = ((com.google.protobuf.Duration) timeOffset_).toBuilder(); + } + timeOffset_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.protobuf.Duration) timeOffset_); + timeOffset_ = subBuilder.buildPartial(); + } + timeOffsetCase_ = 8; + break; + } + case 74: { + com.google.type.TimeZone.Builder subBuilder = null; + if (timeOffsetCase_ == 9) { + subBuilder = ((com.google.type.TimeZone) timeOffset_).toBuilder(); + } + timeOffset_ = + input.readMessage(com.google.type.TimeZone.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.type.TimeZone) timeOffset_); + timeOffset_ = subBuilder.buildPartial(); + } + timeOffsetCase_ = 9; + 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_DateTime_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.type.DateTimeProto.internal_static_google_type_DateTime_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.type.DateTime.class, com.google.type.DateTime.Builder.class); + } + + private int timeOffsetCase_ = 0; + private java.lang.Object timeOffset_; + public enum TimeOffsetCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + UTC_OFFSET(8), + TIME_ZONE(9), + TIMEOFFSET_NOT_SET(0); + private final int value; + private TimeOffsetCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TimeOffsetCase valueOf(int value) { + return forNumber(value); + } + + public static TimeOffsetCase forNumber(int value) { + switch (value) { + case 8: return UTC_OFFSET; + case 9: return TIME_ZONE; + case 0: return TIMEOFFSET_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TimeOffsetCase + getTimeOffsetCase() { + return TimeOffsetCase.forNumber( + timeOffsetCase_); + } + + public static final int YEAR_FIELD_NUMBER = 1; + private int year_; + /** + *
+   * Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a
+   * datetime without a year.
+   * 
+ * + * int32 year = 1 [json_name = "year"]; + * @return The year. + */ + @java.lang.Override + public int getYear() { + return year_; + } + + public static final int MONTH_FIELD_NUMBER = 2; + private int month_; + /** + *
+   * Required. Month of year. Must be from 1 to 12.
+   * 
+ * + * int32 month = 2 [json_name = "month"]; + * @return The month. + */ + @java.lang.Override + public int getMonth() { + return month_; + } + + public static final int DAY_FIELD_NUMBER = 3; + private int day_; + /** + *
+   * Required. Day of month. Must be from 1 to 31 and valid for the year and
+   * month.
+   * 
+ * + * int32 day = 3 [json_name = "day"]; + * @return The day. + */ + @java.lang.Override + public int getDay() { + return day_; + } + + public static final int HOURS_FIELD_NUMBER = 4; + private int hours_; + /** + *
+   * 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 [json_name = "hours"]; + * @return The hours. + */ + @java.lang.Override + public int getHours() { + return hours_; + } + + public static final int MINUTES_FIELD_NUMBER = 5; + private int minutes_; + /** + *
+   * Required. Minutes of hour of day. Must be from 0 to 59.
+   * 
+ * + * int32 minutes = 5 [json_name = "minutes"]; + * @return The minutes. + */ + @java.lang.Override + public int getMinutes() { + return minutes_; + } + + public static final int SECONDS_FIELD_NUMBER = 6; + private int seconds_; + /** + *
+   * 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 [json_name = "seconds"]; + * @return The seconds. + */ + @java.lang.Override + public int getSeconds() { + return seconds_; + } + + public static final int NANOS_FIELD_NUMBER = 7; + private int nanos_; + /** + *
+   * Required. Fractions of seconds in nanoseconds. Must be from 0 to
+   * 999,999,999.
+   * 
+ * + * int32 nanos = 7 [json_name = "nanos"]; + * @return The nanos. + */ + @java.lang.Override + public int getNanos() { + return nanos_; + } + + public static final int UTC_OFFSET_FIELD_NUMBER = 8; + /** + *
+   * 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 [json_name = "utcOffset"]; + * @return Whether the utcOffset field is set. + */ + @java.lang.Override + public boolean hasUtcOffset() { + return timeOffsetCase_ == 8; + } + /** + *
+   * 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 [json_name = "utcOffset"]; + * @return The utcOffset. + */ + @java.lang.Override + public com.google.protobuf.Duration getUtcOffset() { + if (timeOffsetCase_ == 8) { + return (com.google.protobuf.Duration) timeOffset_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + /** + *
+   * 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 [json_name = "utcOffset"]; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getUtcOffsetOrBuilder() { + if (timeOffsetCase_ == 8) { + return (com.google.protobuf.Duration) timeOffset_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + + public static final int TIME_ZONE_FIELD_NUMBER = 9; + /** + *
+   * Time zone.
+   * 
+ * + * .google.type.TimeZone time_zone = 9 [json_name = "timeZone"]; + * @return Whether the timeZone field is set. + */ + @java.lang.Override + public boolean hasTimeZone() { + return timeOffsetCase_ == 9; + } + /** + *
+   * Time zone.
+   * 
+ * + * .google.type.TimeZone time_zone = 9 [json_name = "timeZone"]; + * @return The timeZone. + */ + @java.lang.Override + public com.google.type.TimeZone getTimeZone() { + if (timeOffsetCase_ == 9) { + return (com.google.type.TimeZone) timeOffset_; + } + return com.google.type.TimeZone.getDefaultInstance(); + } + /** + *
+   * Time zone.
+   * 
+ * + * .google.type.TimeZone time_zone = 9 [json_name = "timeZone"]; + */ + @java.lang.Override + public com.google.type.TimeZoneOrBuilder getTimeZoneOrBuilder() { + if (timeOffsetCase_ == 9) { + return (com.google.type.TimeZone) timeOffset_; + } + return com.google.type.TimeZone.getDefaultInstance(); + } + + 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 (year_ != 0) { + output.writeInt32(1, year_); + } + if (month_ != 0) { + output.writeInt32(2, month_); + } + if (day_ != 0) { + output.writeInt32(3, day_); + } + if (hours_ != 0) { + output.writeInt32(4, hours_); + } + if (minutes_ != 0) { + output.writeInt32(5, minutes_); + } + if (seconds_ != 0) { + output.writeInt32(6, seconds_); + } + if (nanos_ != 0) { + output.writeInt32(7, nanos_); + } + if (timeOffsetCase_ == 8) { + output.writeMessage(8, (com.google.protobuf.Duration) timeOffset_); + } + if (timeOffsetCase_ == 9) { + output.writeMessage(9, (com.google.type.TimeZone) timeOffset_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (year_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, year_); + } + if (month_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, month_); + } + if (day_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, day_); + } + if (hours_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, hours_); + } + if (minutes_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, minutes_); + } + if (seconds_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, seconds_); + } + if (nanos_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, nanos_); + } + if (timeOffsetCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, (com.google.protobuf.Duration) timeOffset_); + } + if (timeOffsetCase_ == 9) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, (com.google.type.TimeZone) timeOffset_); + } + 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.DateTime)) { + return super.equals(obj); + } + com.google.type.DateTime other = (com.google.type.DateTime) obj; + + if (getYear() + != other.getYear()) return false; + if (getMonth() + != other.getMonth()) return false; + if (getDay() + != other.getDay()) return false; + if (getHours() + != other.getHours()) return false; + if (getMinutes() + != other.getMinutes()) return false; + if (getSeconds() + != other.getSeconds()) return false; + if (getNanos() + != other.getNanos()) return false; + if (!getTimeOffsetCase().equals(other.getTimeOffsetCase())) return false; + switch (timeOffsetCase_) { + case 8: + if (!getUtcOffset() + .equals(other.getUtcOffset())) return false; + break; + case 9: + if (!getTimeZone() + .equals(other.getTimeZone())) return false; + break; + case 0: + default: + } + 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) + YEAR_FIELD_NUMBER; + hash = (53 * hash) + getYear(); + hash = (37 * hash) + MONTH_FIELD_NUMBER; + hash = (53 * hash) + getMonth(); + hash = (37 * hash) + DAY_FIELD_NUMBER; + hash = (53 * hash) + getDay(); + hash = (37 * hash) + HOURS_FIELD_NUMBER; + hash = (53 * hash) + getHours(); + hash = (37 * hash) + MINUTES_FIELD_NUMBER; + hash = (53 * hash) + getMinutes(); + hash = (37 * hash) + SECONDS_FIELD_NUMBER; + hash = (53 * hash) + getSeconds(); + hash = (37 * hash) + NANOS_FIELD_NUMBER; + hash = (53 * hash) + getNanos(); + switch (timeOffsetCase_) { + case 8: + hash = (37 * hash) + UTC_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getUtcOffset().hashCode(); + break; + case 9: + hash = (37 * hash) + TIME_ZONE_FIELD_NUMBER; + hash = (53 * hash) + getTimeZone().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.type.DateTime parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.type.DateTime 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.DateTime parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.type.DateTime 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.DateTime parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.type.DateTime parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.type.DateTime parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.type.DateTime 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.DateTime parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.type.DateTime 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.DateTime parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.type.DateTime 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.DateTime 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; + } + /** + *
+   * 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.
+   * 
+ * + * Protobuf type {@code google.type.DateTime} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.type.DateTime) + com.google.type.DateTimeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.type.DateTimeProto.internal_static_google_type_DateTime_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.type.DateTimeProto.internal_static_google_type_DateTime_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.type.DateTime.class, com.google.type.DateTime.Builder.class); + } + + // Construct using com.google.type.DateTime.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(); + year_ = 0; + + month_ = 0; + + day_ = 0; + + hours_ = 0; + + minutes_ = 0; + + seconds_ = 0; + + nanos_ = 0; + + timeOffsetCase_ = 0; + timeOffset_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.type.DateTimeProto.internal_static_google_type_DateTime_descriptor; + } + + @java.lang.Override + public com.google.type.DateTime getDefaultInstanceForType() { + return com.google.type.DateTime.getDefaultInstance(); + } + + @java.lang.Override + public com.google.type.DateTime build() { + com.google.type.DateTime result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.type.DateTime buildPartial() { + com.google.type.DateTime result = new com.google.type.DateTime(this); + result.year_ = year_; + result.month_ = month_; + result.day_ = day_; + result.hours_ = hours_; + result.minutes_ = minutes_; + result.seconds_ = seconds_; + result.nanos_ = nanos_; + if (timeOffsetCase_ == 8) { + if (utcOffsetBuilder_ == null) { + result.timeOffset_ = timeOffset_; + } else { + result.timeOffset_ = utcOffsetBuilder_.build(); + } + } + if (timeOffsetCase_ == 9) { + if (timeZoneBuilder_ == null) { + result.timeOffset_ = timeOffset_; + } else { + result.timeOffset_ = timeZoneBuilder_.build(); + } + } + result.timeOffsetCase_ = timeOffsetCase_; + 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.DateTime) { + return mergeFrom((com.google.type.DateTime)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.type.DateTime other) { + if (other == com.google.type.DateTime.getDefaultInstance()) return this; + if (other.getYear() != 0) { + setYear(other.getYear()); + } + if (other.getMonth() != 0) { + setMonth(other.getMonth()); + } + if (other.getDay() != 0) { + setDay(other.getDay()); + } + if (other.getHours() != 0) { + setHours(other.getHours()); + } + if (other.getMinutes() != 0) { + setMinutes(other.getMinutes()); + } + if (other.getSeconds() != 0) { + setSeconds(other.getSeconds()); + } + if (other.getNanos() != 0) { + setNanos(other.getNanos()); + } + switch (other.getTimeOffsetCase()) { + case UTC_OFFSET: { + mergeUtcOffset(other.getUtcOffset()); + break; + } + case TIME_ZONE: { + mergeTimeZone(other.getTimeZone()); + break; + } + case TIMEOFFSET_NOT_SET: { + break; + } + } + 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.DateTime parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.type.DateTime) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int timeOffsetCase_ = 0; + private java.lang.Object timeOffset_; + public TimeOffsetCase + getTimeOffsetCase() { + return TimeOffsetCase.forNumber( + timeOffsetCase_); + } + + public Builder clearTimeOffset() { + timeOffsetCase_ = 0; + timeOffset_ = null; + onChanged(); + return this; + } + + + private int year_ ; + /** + *
+     * Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a
+     * datetime without a year.
+     * 
+ * + * int32 year = 1 [json_name = "year"]; + * @return The year. + */ + @java.lang.Override + public int getYear() { + return year_; + } + /** + *
+     * Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a
+     * datetime without a year.
+     * 
+ * + * int32 year = 1 [json_name = "year"]; + * @param value The year to set. + * @return This builder for chaining. + */ + public Builder setYear(int value) { + + year_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a
+     * datetime without a year.
+     * 
+ * + * int32 year = 1 [json_name = "year"]; + * @return This builder for chaining. + */ + public Builder clearYear() { + + year_ = 0; + onChanged(); + return this; + } + + private int month_ ; + /** + *
+     * Required. Month of year. Must be from 1 to 12.
+     * 
+ * + * int32 month = 2 [json_name = "month"]; + * @return The month. + */ + @java.lang.Override + public int getMonth() { + return month_; + } + /** + *
+     * Required. Month of year. Must be from 1 to 12.
+     * 
+ * + * int32 month = 2 [json_name = "month"]; + * @param value The month to set. + * @return This builder for chaining. + */ + public Builder setMonth(int value) { + + month_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Month of year. Must be from 1 to 12.
+     * 
+ * + * int32 month = 2 [json_name = "month"]; + * @return This builder for chaining. + */ + public Builder clearMonth() { + + month_ = 0; + onChanged(); + return this; + } + + private int day_ ; + /** + *
+     * Required. Day of month. Must be from 1 to 31 and valid for the year and
+     * month.
+     * 
+ * + * int32 day = 3 [json_name = "day"]; + * @return The day. + */ + @java.lang.Override + public int getDay() { + return day_; + } + /** + *
+     * Required. Day of month. Must be from 1 to 31 and valid for the year and
+     * month.
+     * 
+ * + * int32 day = 3 [json_name = "day"]; + * @param value The day to set. + * @return This builder for chaining. + */ + public Builder setDay(int value) { + + day_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Day of month. Must be from 1 to 31 and valid for the year and
+     * month.
+     * 
+ * + * int32 day = 3 [json_name = "day"]; + * @return This builder for chaining. + */ + public Builder clearDay() { + + day_ = 0; + onChanged(); + return this; + } + + private int hours_ ; + /** + *
+     * 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 [json_name = "hours"]; + * @return The hours. + */ + @java.lang.Override + public int getHours() { + return hours_; + } + /** + *
+     * 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 [json_name = "hours"]; + * @param value The hours to set. + * @return This builder for chaining. + */ + public Builder setHours(int value) { + + hours_ = value; + onChanged(); + return this; + } + /** + *
+     * 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 [json_name = "hours"]; + * @return This builder for chaining. + */ + public Builder clearHours() { + + hours_ = 0; + onChanged(); + return this; + } + + private int minutes_ ; + /** + *
+     * Required. Minutes of hour of day. Must be from 0 to 59.
+     * 
+ * + * int32 minutes = 5 [json_name = "minutes"]; + * @return The minutes. + */ + @java.lang.Override + public int getMinutes() { + return minutes_; + } + /** + *
+     * Required. Minutes of hour of day. Must be from 0 to 59.
+     * 
+ * + * int32 minutes = 5 [json_name = "minutes"]; + * @param value The minutes to set. + * @return This builder for chaining. + */ + public Builder setMinutes(int value) { + + minutes_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Minutes of hour of day. Must be from 0 to 59.
+     * 
+ * + * int32 minutes = 5 [json_name = "minutes"]; + * @return This builder for chaining. + */ + public Builder clearMinutes() { + + minutes_ = 0; + onChanged(); + return this; + } + + private int seconds_ ; + /** + *
+     * 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 [json_name = "seconds"]; + * @return The seconds. + */ + @java.lang.Override + public int getSeconds() { + return seconds_; + } + /** + *
+     * 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 [json_name = "seconds"]; + * @param value The seconds to set. + * @return This builder for chaining. + */ + public Builder setSeconds(int value) { + + seconds_ = value; + onChanged(); + return this; + } + /** + *
+     * 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 [json_name = "seconds"]; + * @return This builder for chaining. + */ + public Builder clearSeconds() { + + seconds_ = 0; + onChanged(); + return this; + } + + private int nanos_ ; + /** + *
+     * Required. Fractions of seconds in nanoseconds. Must be from 0 to
+     * 999,999,999.
+     * 
+ * + * int32 nanos = 7 [json_name = "nanos"]; + * @return The nanos. + */ + @java.lang.Override + public int getNanos() { + return nanos_; + } + /** + *
+     * Required. Fractions of seconds in nanoseconds. Must be from 0 to
+     * 999,999,999.
+     * 
+ * + * int32 nanos = 7 [json_name = "nanos"]; + * @param value The nanos to set. + * @return This builder for chaining. + */ + public Builder setNanos(int value) { + + nanos_ = value; + onChanged(); + return this; + } + /** + *
+     * Required. Fractions of seconds in nanoseconds. Must be from 0 to
+     * 999,999,999.
+     * 
+ * + * int32 nanos = 7 [json_name = "nanos"]; + * @return This builder for chaining. + */ + public Builder clearNanos() { + + nanos_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> utcOffsetBuilder_; + /** + *
+     * 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 [json_name = "utcOffset"]; + * @return Whether the utcOffset field is set. + */ + @java.lang.Override + public boolean hasUtcOffset() { + return timeOffsetCase_ == 8; + } + /** + *
+     * 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 [json_name = "utcOffset"]; + * @return The utcOffset. + */ + @java.lang.Override + public com.google.protobuf.Duration getUtcOffset() { + if (utcOffsetBuilder_ == null) { + if (timeOffsetCase_ == 8) { + return (com.google.protobuf.Duration) timeOffset_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } else { + if (timeOffsetCase_ == 8) { + return utcOffsetBuilder_.getMessage(); + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + } + /** + *
+     * 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 [json_name = "utcOffset"]; + */ + public Builder setUtcOffset(com.google.protobuf.Duration value) { + if (utcOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeOffset_ = value; + onChanged(); + } else { + utcOffsetBuilder_.setMessage(value); + } + timeOffsetCase_ = 8; + return this; + } + /** + *
+     * 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 [json_name = "utcOffset"]; + */ + public Builder setUtcOffset( + com.google.protobuf.Duration.Builder builderForValue) { + if (utcOffsetBuilder_ == null) { + timeOffset_ = builderForValue.build(); + onChanged(); + } else { + utcOffsetBuilder_.setMessage(builderForValue.build()); + } + timeOffsetCase_ = 8; + return this; + } + /** + *
+     * 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 [json_name = "utcOffset"]; + */ + public Builder mergeUtcOffset(com.google.protobuf.Duration value) { + if (utcOffsetBuilder_ == null) { + if (timeOffsetCase_ == 8 && + timeOffset_ != com.google.protobuf.Duration.getDefaultInstance()) { + timeOffset_ = com.google.protobuf.Duration.newBuilder((com.google.protobuf.Duration) timeOffset_) + .mergeFrom(value).buildPartial(); + } else { + timeOffset_ = value; + } + onChanged(); + } else { + if (timeOffsetCase_ == 8) { + utcOffsetBuilder_.mergeFrom(value); + } + utcOffsetBuilder_.setMessage(value); + } + timeOffsetCase_ = 8; + return this; + } + /** + *
+     * 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 [json_name = "utcOffset"]; + */ + public Builder clearUtcOffset() { + if (utcOffsetBuilder_ == null) { + if (timeOffsetCase_ == 8) { + timeOffsetCase_ = 0; + timeOffset_ = null; + onChanged(); + } + } else { + if (timeOffsetCase_ == 8) { + timeOffsetCase_ = 0; + timeOffset_ = null; + } + utcOffsetBuilder_.clear(); + } + return this; + } + /** + *
+     * 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 [json_name = "utcOffset"]; + */ + public com.google.protobuf.Duration.Builder getUtcOffsetBuilder() { + return getUtcOffsetFieldBuilder().getBuilder(); + } + /** + *
+     * 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 [json_name = "utcOffset"]; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getUtcOffsetOrBuilder() { + if ((timeOffsetCase_ == 8) && (utcOffsetBuilder_ != null)) { + return utcOffsetBuilder_.getMessageOrBuilder(); + } else { + if (timeOffsetCase_ == 8) { + return (com.google.protobuf.Duration) timeOffset_; + } + return com.google.protobuf.Duration.getDefaultInstance(); + } + } + /** + *
+     * 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 [json_name = "utcOffset"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> + getUtcOffsetFieldBuilder() { + if (utcOffsetBuilder_ == null) { + if (!(timeOffsetCase_ == 8)) { + timeOffset_ = com.google.protobuf.Duration.getDefaultInstance(); + } + utcOffsetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( + (com.google.protobuf.Duration) timeOffset_, + getParentForChildren(), + isClean()); + timeOffset_ = null; + } + timeOffsetCase_ = 8; + onChanged();; + return utcOffsetBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeZone, com.google.type.TimeZone.Builder, com.google.type.TimeZoneOrBuilder> timeZoneBuilder_; + /** + *
+     * Time zone.
+     * 
+ * + * .google.type.TimeZone time_zone = 9 [json_name = "timeZone"]; + * @return Whether the timeZone field is set. + */ + @java.lang.Override + public boolean hasTimeZone() { + return timeOffsetCase_ == 9; + } + /** + *
+     * Time zone.
+     * 
+ * + * .google.type.TimeZone time_zone = 9 [json_name = "timeZone"]; + * @return The timeZone. + */ + @java.lang.Override + public com.google.type.TimeZone getTimeZone() { + if (timeZoneBuilder_ == null) { + if (timeOffsetCase_ == 9) { + return (com.google.type.TimeZone) timeOffset_; + } + return com.google.type.TimeZone.getDefaultInstance(); + } else { + if (timeOffsetCase_ == 9) { + return timeZoneBuilder_.getMessage(); + } + return com.google.type.TimeZone.getDefaultInstance(); + } + } + /** + *
+     * Time zone.
+     * 
+ * + * .google.type.TimeZone time_zone = 9 [json_name = "timeZone"]; + */ + public Builder setTimeZone(com.google.type.TimeZone value) { + if (timeZoneBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeOffset_ = value; + onChanged(); + } else { + timeZoneBuilder_.setMessage(value); + } + timeOffsetCase_ = 9; + return this; + } + /** + *
+     * Time zone.
+     * 
+ * + * .google.type.TimeZone time_zone = 9 [json_name = "timeZone"]; + */ + public Builder setTimeZone( + com.google.type.TimeZone.Builder builderForValue) { + if (timeZoneBuilder_ == null) { + timeOffset_ = builderForValue.build(); + onChanged(); + } else { + timeZoneBuilder_.setMessage(builderForValue.build()); + } + timeOffsetCase_ = 9; + return this; + } + /** + *
+     * Time zone.
+     * 
+ * + * .google.type.TimeZone time_zone = 9 [json_name = "timeZone"]; + */ + public Builder mergeTimeZone(com.google.type.TimeZone value) { + if (timeZoneBuilder_ == null) { + if (timeOffsetCase_ == 9 && + timeOffset_ != com.google.type.TimeZone.getDefaultInstance()) { + timeOffset_ = com.google.type.TimeZone.newBuilder((com.google.type.TimeZone) timeOffset_) + .mergeFrom(value).buildPartial(); + } else { + timeOffset_ = value; + } + onChanged(); + } else { + if (timeOffsetCase_ == 9) { + timeZoneBuilder_.mergeFrom(value); + } + timeZoneBuilder_.setMessage(value); + } + timeOffsetCase_ = 9; + return this; + } + /** + *
+     * Time zone.
+     * 
+ * + * .google.type.TimeZone time_zone = 9 [json_name = "timeZone"]; + */ + public Builder clearTimeZone() { + if (timeZoneBuilder_ == null) { + if (timeOffsetCase_ == 9) { + timeOffsetCase_ = 0; + timeOffset_ = null; + onChanged(); + } + } else { + if (timeOffsetCase_ == 9) { + timeOffsetCase_ = 0; + timeOffset_ = null; + } + timeZoneBuilder_.clear(); + } + return this; + } + /** + *
+     * Time zone.
+     * 
+ * + * .google.type.TimeZone time_zone = 9 [json_name = "timeZone"]; + */ + public com.google.type.TimeZone.Builder getTimeZoneBuilder() { + return getTimeZoneFieldBuilder().getBuilder(); + } + /** + *
+     * Time zone.
+     * 
+ * + * .google.type.TimeZone time_zone = 9 [json_name = "timeZone"]; + */ + @java.lang.Override + public com.google.type.TimeZoneOrBuilder getTimeZoneOrBuilder() { + if ((timeOffsetCase_ == 9) && (timeZoneBuilder_ != null)) { + return timeZoneBuilder_.getMessageOrBuilder(); + } else { + if (timeOffsetCase_ == 9) { + return (com.google.type.TimeZone) timeOffset_; + } + return com.google.type.TimeZone.getDefaultInstance(); + } + } + /** + *
+     * Time zone.
+     * 
+ * + * .google.type.TimeZone time_zone = 9 [json_name = "timeZone"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeZone, com.google.type.TimeZone.Builder, com.google.type.TimeZoneOrBuilder> + getTimeZoneFieldBuilder() { + if (timeZoneBuilder_ == null) { + if (!(timeOffsetCase_ == 9)) { + timeOffset_ = com.google.type.TimeZone.getDefaultInstance(); + } + timeZoneBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeZone, com.google.type.TimeZone.Builder, com.google.type.TimeZoneOrBuilder>( + (com.google.type.TimeZone) timeOffset_, + getParentForChildren(), + isClean()); + timeOffset_ = null; + } + timeOffsetCase_ = 9; + onChanged();; + return timeZoneBuilder_; + } + @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.DateTime) + } + + // @@protoc_insertion_point(class_scope:google.type.DateTime) + private static final com.google.type.DateTime DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.type.DateTime(); + } + + public static com.google.type.DateTime getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DateTime parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DateTime(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.type.DateTime getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gen/java/com/google/type/DateTimeOrBuilder.java b/gen/java/com/google/type/DateTimeOrBuilder.java new file mode 100644 index 0000000..34d6aea --- /dev/null +++ b/gen/java/com/google/type/DateTimeOrBuilder.java @@ -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 { + + /** + *
+   * Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a
+   * datetime without a year.
+   * 
+ * + * int32 year = 1 [json_name = "year"]; + * @return The year. + */ + int getYear(); + + /** + *
+   * Required. Month of year. Must be from 1 to 12.
+   * 
+ * + * int32 month = 2 [json_name = "month"]; + * @return The month. + */ + int getMonth(); + + /** + *
+   * Required. Day of month. Must be from 1 to 31 and valid for the year and
+   * month.
+   * 
+ * + * int32 day = 3 [json_name = "day"]; + * @return The day. + */ + int getDay(); + + /** + *
+   * 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 [json_name = "hours"]; + * @return The hours. + */ + int getHours(); + + /** + *
+   * Required. Minutes of hour of day. Must be from 0 to 59.
+   * 
+ * + * int32 minutes = 5 [json_name = "minutes"]; + * @return The minutes. + */ + int getMinutes(); + + /** + *
+   * 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 [json_name = "seconds"]; + * @return The seconds. + */ + int getSeconds(); + + /** + *
+   * Required. Fractions of seconds in nanoseconds. Must be from 0 to
+   * 999,999,999.
+   * 
+ * + * int32 nanos = 7 [json_name = "nanos"]; + * @return The nanos. + */ + int getNanos(); + + /** + *
+   * 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 [json_name = "utcOffset"]; + * @return Whether the utcOffset field is set. + */ + boolean hasUtcOffset(); + /** + *
+   * 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 [json_name = "utcOffset"]; + * @return The utcOffset. + */ + com.google.protobuf.Duration getUtcOffset(); + /** + *
+   * 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 [json_name = "utcOffset"]; + */ + com.google.protobuf.DurationOrBuilder getUtcOffsetOrBuilder(); + + /** + *
+   * Time zone.
+   * 
+ * + * .google.type.TimeZone time_zone = 9 [json_name = "timeZone"]; + * @return Whether the timeZone field is set. + */ + boolean hasTimeZone(); + /** + *
+   * Time zone.
+   * 
+ * + * .google.type.TimeZone time_zone = 9 [json_name = "timeZone"]; + * @return The timeZone. + */ + com.google.type.TimeZone getTimeZone(); + /** + *
+   * Time zone.
+   * 
+ * + * .google.type.TimeZone time_zone = 9 [json_name = "timeZone"]; + */ + com.google.type.TimeZoneOrBuilder getTimeZoneOrBuilder(); + + public com.google.type.DateTime.TimeOffsetCase getTimeOffsetCase(); +} diff --git a/gen/java/com/google/type/DateTimeProto.java b/gen/java/com/google/type/DateTimeProto.java new file mode 100644 index 0000000..c6b44aa --- /dev/null +++ b/gen/java/com/google/type/DateTimeProto.java @@ -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 + * Represents a time zone from the + * [IANA Time Zone Database](https://www.iana.org/time-zones). + * + * + * 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_; + /** + *
+   * IANA Time Zone Database time zone, e.g. "America/New_York".
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @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; + } + } + /** + *
+   * IANA Time Zone Database time zone, e.g. "America/New_York".
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @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_; + /** + *
+   * Optional. IANA Time Zone Database version number, e.g. "2019a".
+   * 
+ * + * string version = 2 [json_name = "version"]; + * @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; + } + } + /** + *
+   * Optional. IANA Time Zone Database version number, e.g. "2019a".
+   * 
+ * + * string version = 2 [json_name = "version"]; + * @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; + } + /** + *
+   * Represents a time zone from the
+   * [IANA Time Zone Database](https://www.iana.org/time-zones).
+   * 
+ * + * Protobuf type {@code google.type.TimeZone} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.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_ = ""; + /** + *
+     * IANA Time Zone Database time zone, e.g. "America/New_York".
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @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; + } + } + /** + *
+     * IANA Time Zone Database time zone, e.g. "America/New_York".
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @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; + } + } + /** + *
+     * IANA Time Zone Database time zone, e.g. "America/New_York".
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @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; + } + /** + *
+     * IANA Time Zone Database time zone, e.g. "America/New_York".
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + *
+     * IANA Time Zone Database time zone, e.g. "America/New_York".
+     * 
+ * + * string id = 1 [json_name = "id"]; + * @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_ = ""; + /** + *
+     * Optional. IANA Time Zone Database version number, e.g. "2019a".
+     * 
+ * + * string version = 2 [json_name = "version"]; + * @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; + } + } + /** + *
+     * Optional. IANA Time Zone Database version number, e.g. "2019a".
+     * 
+ * + * string version = 2 [json_name = "version"]; + * @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; + } + } + /** + *
+     * Optional. IANA Time Zone Database version number, e.g. "2019a".
+     * 
+ * + * string version = 2 [json_name = "version"]; + * @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; + } + /** + *
+     * Optional. IANA Time Zone Database version number, e.g. "2019a".
+     * 
+ * + * string version = 2 [json_name = "version"]; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+     * Optional. IANA Time Zone Database version number, e.g. "2019a".
+     * 
+ * + * string version = 2 [json_name = "version"]; + * @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 + PARSER = new com.google.protobuf.AbstractParser() { + @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 parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.type.TimeZone getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/gen/java/com/google/type/TimeZoneOrBuilder.java b/gen/java/com/google/type/TimeZoneOrBuilder.java new file mode 100644 index 0000000..2e3ee04 --- /dev/null +++ b/gen/java/com/google/type/TimeZoneOrBuilder.java @@ -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 { + + /** + *
+   * IANA Time Zone Database time zone, e.g. "America/New_York".
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * IANA Time Zone Database time zone, e.g. "America/New_York".
+   * 
+ * + * string id = 1 [json_name = "id"]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * Optional. IANA Time Zone Database version number, e.g. "2019a".
+   * 
+ * + * string version = 2 [json_name = "version"]; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * Optional. IANA Time Zone Database version number, e.g. "2019a".
+   * 
+ * + * string version = 2 [json_name = "version"]; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); +} diff --git a/gen/java/pet/v1/PetOuterClass.java b/gen/java/pet/v1/PetOuterClass.java new file mode 100644 index 0000000..0bef66c --- /dev/null +++ b/gen/java/pet/v1/PetOuterClass.java @@ -0,0 +1,4780 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: pet/v1/pet.proto + +package pet.v1; + +public final class PetOuterClass { + private PetOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + *
+   * PetType represents the different types of pets in the pet store.
+   * 
+ * + * Protobuf enum {@code pet.v1.PetType} + */ + public enum PetType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * PET_TYPE_UNSPECIFIED = 0; + */ + PET_TYPE_UNSPECIFIED(0), + /** + * PET_TYPE_CAT = 1; + */ + PET_TYPE_CAT(1), + /** + * PET_TYPE_DOG = 2; + */ + PET_TYPE_DOG(2), + /** + * PET_TYPE_SNAKE = 3; + */ + PET_TYPE_SNAKE(3), + /** + * PET_TYPE_HAMSTER = 4; + */ + PET_TYPE_HAMSTER(4), + UNRECOGNIZED(-1), + ; + + /** + * PET_TYPE_UNSPECIFIED = 0; + */ + public static final int PET_TYPE_UNSPECIFIED_VALUE = 0; + /** + * PET_TYPE_CAT = 1; + */ + public static final int PET_TYPE_CAT_VALUE = 1; + /** + * PET_TYPE_DOG = 2; + */ + public static final int PET_TYPE_DOG_VALUE = 2; + /** + * PET_TYPE_SNAKE = 3; + */ + public static final int PET_TYPE_SNAKE_VALUE = 3; + /** + * PET_TYPE_HAMSTER = 4; + */ + public static final int PET_TYPE_HAMSTER_VALUE = 4; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PetType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PetType forNumber(int value) { + switch (value) { + case 0: return PET_TYPE_UNSPECIFIED; + case 1: return PET_TYPE_CAT; + case 2: return PET_TYPE_DOG; + case 3: return PET_TYPE_SNAKE; + case 4: return PET_TYPE_HAMSTER; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PetType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PetType findValueByNumber(int number) { + return PetType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return pet.v1.PetOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final PetType[] VALUES = values(); + + public static PetType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PetType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:pet.v1.PetType) + } + + public interface PetOrBuilder extends + // @@protoc_insertion_point(interface_extends:pet.v1.Pet) + com.google.protobuf.MessageOrBuilder { + + /** + * .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + * @return The enum numeric value on the wire for petType. + */ + int getPetTypeValue(); + /** + * .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + * @return The petType. + */ + pet.v1.PetOuterClass.PetType getPetType(); + + /** + * string pet_id = 2 [json_name = "petId"]; + * @return The petId. + */ + java.lang.String getPetId(); + /** + * string pet_id = 2 [json_name = "petId"]; + * @return The bytes for petId. + */ + com.google.protobuf.ByteString + getPetIdBytes(); + + /** + * string name = 3 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 3 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * .google.type.DateTime created_at = 4 [json_name = "createdAt"]; + * @return Whether the createdAt field is set. + */ + boolean hasCreatedAt(); + /** + * .google.type.DateTime created_at = 4 [json_name = "createdAt"]; + * @return The createdAt. + */ + com.google.type.DateTime getCreatedAt(); + /** + * .google.type.DateTime created_at = 4 [json_name = "createdAt"]; + */ + com.google.type.DateTimeOrBuilder getCreatedAtOrBuilder(); + } + /** + *
+   * Pet represents a pet in the pet store.
+   * 
+ * + * Protobuf type {@code pet.v1.Pet} + */ + public static final class Pet extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pet.v1.Pet) + PetOrBuilder { + private static final long serialVersionUID = 0L; + // Use Pet.newBuilder() to construct. + private Pet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Pet() { + petType_ = 0; + petId_ = ""; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Pet(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Pet( + 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 8: { + int rawValue = input.readEnum(); + + petType_ = rawValue; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + petId_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 34: { + com.google.type.DateTime.Builder subBuilder = null; + if (createdAt_ != null) { + subBuilder = createdAt_.toBuilder(); + } + createdAt_ = input.readMessage(com.google.type.DateTime.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createdAt_); + createdAt_ = subBuilder.buildPartial(); + } + + 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 pet.v1.PetOuterClass.internal_static_pet_v1_Pet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pet.v1.PetOuterClass.internal_static_pet_v1_Pet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pet.v1.PetOuterClass.Pet.class, pet.v1.PetOuterClass.Pet.Builder.class); + } + + public static final int PET_TYPE_FIELD_NUMBER = 1; + private int petType_; + /** + * .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + * @return The enum numeric value on the wire for petType. + */ + @java.lang.Override public int getPetTypeValue() { + return petType_; + } + /** + * .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + * @return The petType. + */ + @java.lang.Override public pet.v1.PetOuterClass.PetType getPetType() { + @SuppressWarnings("deprecation") + pet.v1.PetOuterClass.PetType result = pet.v1.PetOuterClass.PetType.valueOf(petType_); + return result == null ? pet.v1.PetOuterClass.PetType.UNRECOGNIZED : result; + } + + public static final int PET_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object petId_; + /** + * string pet_id = 2 [json_name = "petId"]; + * @return The petId. + */ + @java.lang.Override + public java.lang.String getPetId() { + java.lang.Object ref = petId_; + 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(); + petId_ = s; + return s; + } + } + /** + * string pet_id = 2 [json_name = "petId"]; + * @return The bytes for petId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPetIdBytes() { + java.lang.Object ref = petId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + petId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object name_; + /** + * string name = 3 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * string name = 3 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATED_AT_FIELD_NUMBER = 4; + private com.google.type.DateTime createdAt_; + /** + * .google.type.DateTime created_at = 4 [json_name = "createdAt"]; + * @return Whether the createdAt field is set. + */ + @java.lang.Override + public boolean hasCreatedAt() { + return createdAt_ != null; + } + /** + * .google.type.DateTime created_at = 4 [json_name = "createdAt"]; + * @return The createdAt. + */ + @java.lang.Override + public com.google.type.DateTime getCreatedAt() { + return createdAt_ == null ? com.google.type.DateTime.getDefaultInstance() : createdAt_; + } + /** + * .google.type.DateTime created_at = 4 [json_name = "createdAt"]; + */ + @java.lang.Override + public com.google.type.DateTimeOrBuilder getCreatedAtOrBuilder() { + return getCreatedAt(); + } + + 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 (petType_ != pet.v1.PetOuterClass.PetType.PET_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, petType_); + } + if (!getPetIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, petId_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (createdAt_ != null) { + output.writeMessage(4, getCreatedAt()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (petType_ != pet.v1.PetOuterClass.PetType.PET_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, petType_); + } + if (!getPetIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, petId_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (createdAt_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getCreatedAt()); + } + 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 pet.v1.PetOuterClass.Pet)) { + return super.equals(obj); + } + pet.v1.PetOuterClass.Pet other = (pet.v1.PetOuterClass.Pet) obj; + + if (petType_ != other.petType_) return false; + if (!getPetId() + .equals(other.getPetId())) return false; + if (!getName() + .equals(other.getName())) return false; + if (hasCreatedAt() != other.hasCreatedAt()) return false; + if (hasCreatedAt()) { + if (!getCreatedAt() + .equals(other.getCreatedAt())) 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) + PET_TYPE_FIELD_NUMBER; + hash = (53 * hash) + petType_; + hash = (37 * hash) + PET_ID_FIELD_NUMBER; + hash = (53 * hash) + getPetId().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreatedAt()) { + hash = (37 * hash) + CREATED_AT_FIELD_NUMBER; + hash = (53 * hash) + getCreatedAt().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pet.v1.PetOuterClass.Pet parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pet.v1.PetOuterClass.Pet parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pet.v1.PetOuterClass.Pet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pet.v1.PetOuterClass.Pet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pet.v1.PetOuterClass.Pet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pet.v1.PetOuterClass.Pet parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pet.v1.PetOuterClass.Pet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pet.v1.PetOuterClass.Pet 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 pet.v1.PetOuterClass.Pet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pet.v1.PetOuterClass.Pet 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 pet.v1.PetOuterClass.Pet parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pet.v1.PetOuterClass.Pet 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(pet.v1.PetOuterClass.Pet 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; + } + /** + *
+     * Pet represents a pet in the pet store.
+     * 
+ * + * Protobuf type {@code pet.v1.Pet} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pet.v1.Pet) + pet.v1.PetOuterClass.PetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pet.v1.PetOuterClass.internal_static_pet_v1_Pet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pet.v1.PetOuterClass.internal_static_pet_v1_Pet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pet.v1.PetOuterClass.Pet.class, pet.v1.PetOuterClass.Pet.Builder.class); + } + + // Construct using pet.v1.PetOuterClass.Pet.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(); + petType_ = 0; + + petId_ = ""; + + name_ = ""; + + if (createdAtBuilder_ == null) { + createdAt_ = null; + } else { + createdAt_ = null; + createdAtBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pet.v1.PetOuterClass.internal_static_pet_v1_Pet_descriptor; + } + + @java.lang.Override + public pet.v1.PetOuterClass.Pet getDefaultInstanceForType() { + return pet.v1.PetOuterClass.Pet.getDefaultInstance(); + } + + @java.lang.Override + public pet.v1.PetOuterClass.Pet build() { + pet.v1.PetOuterClass.Pet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pet.v1.PetOuterClass.Pet buildPartial() { + pet.v1.PetOuterClass.Pet result = new pet.v1.PetOuterClass.Pet(this); + result.petType_ = petType_; + result.petId_ = petId_; + result.name_ = name_; + if (createdAtBuilder_ == null) { + result.createdAt_ = createdAt_; + } else { + result.createdAt_ = createdAtBuilder_.build(); + } + 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 pet.v1.PetOuterClass.Pet) { + return mergeFrom((pet.v1.PetOuterClass.Pet)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pet.v1.PetOuterClass.Pet other) { + if (other == pet.v1.PetOuterClass.Pet.getDefaultInstance()) return this; + if (other.petType_ != 0) { + setPetTypeValue(other.getPetTypeValue()); + } + if (!other.getPetId().isEmpty()) { + petId_ = other.petId_; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasCreatedAt()) { + mergeCreatedAt(other.getCreatedAt()); + } + 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 { + pet.v1.PetOuterClass.Pet parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pet.v1.PetOuterClass.Pet) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int petType_ = 0; + /** + * .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + * @return The enum numeric value on the wire for petType. + */ + @java.lang.Override public int getPetTypeValue() { + return petType_; + } + /** + * .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + * @param value The enum numeric value on the wire for petType to set. + * @return This builder for chaining. + */ + public Builder setPetTypeValue(int value) { + + petType_ = value; + onChanged(); + return this; + } + /** + * .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + * @return The petType. + */ + @java.lang.Override + public pet.v1.PetOuterClass.PetType getPetType() { + @SuppressWarnings("deprecation") + pet.v1.PetOuterClass.PetType result = pet.v1.PetOuterClass.PetType.valueOf(petType_); + return result == null ? pet.v1.PetOuterClass.PetType.UNRECOGNIZED : result; + } + /** + * .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + * @param value The petType to set. + * @return This builder for chaining. + */ + public Builder setPetType(pet.v1.PetOuterClass.PetType value) { + if (value == null) { + throw new NullPointerException(); + } + + petType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + * @return This builder for chaining. + */ + public Builder clearPetType() { + + petType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object petId_ = ""; + /** + * string pet_id = 2 [json_name = "petId"]; + * @return The petId. + */ + public java.lang.String getPetId() { + java.lang.Object ref = petId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + petId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string pet_id = 2 [json_name = "petId"]; + * @return The bytes for petId. + */ + public com.google.protobuf.ByteString + getPetIdBytes() { + java.lang.Object ref = petId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + petId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string pet_id = 2 [json_name = "petId"]; + * @param value The petId to set. + * @return This builder for chaining. + */ + public Builder setPetId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + petId_ = value; + onChanged(); + return this; + } + /** + * string pet_id = 2 [json_name = "petId"]; + * @return This builder for chaining. + */ + public Builder clearPetId() { + + petId_ = getDefaultInstance().getPetId(); + onChanged(); + return this; + } + /** + * string pet_id = 2 [json_name = "petId"]; + * @param value The bytes for petId to set. + * @return This builder for chaining. + */ + public Builder setPetIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + petId_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * string name = 3 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string name = 3 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string name = 3 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * string name = 3 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * string name = 3 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.type.DateTime createdAt_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.DateTime, com.google.type.DateTime.Builder, com.google.type.DateTimeOrBuilder> createdAtBuilder_; + /** + * .google.type.DateTime created_at = 4 [json_name = "createdAt"]; + * @return Whether the createdAt field is set. + */ + public boolean hasCreatedAt() { + return createdAtBuilder_ != null || createdAt_ != null; + } + /** + * .google.type.DateTime created_at = 4 [json_name = "createdAt"]; + * @return The createdAt. + */ + public com.google.type.DateTime getCreatedAt() { + if (createdAtBuilder_ == null) { + return createdAt_ == null ? com.google.type.DateTime.getDefaultInstance() : createdAt_; + } else { + return createdAtBuilder_.getMessage(); + } + } + /** + * .google.type.DateTime created_at = 4 [json_name = "createdAt"]; + */ + public Builder setCreatedAt(com.google.type.DateTime value) { + if (createdAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createdAt_ = value; + onChanged(); + } else { + createdAtBuilder_.setMessage(value); + } + + return this; + } + /** + * .google.type.DateTime created_at = 4 [json_name = "createdAt"]; + */ + public Builder setCreatedAt( + com.google.type.DateTime.Builder builderForValue) { + if (createdAtBuilder_ == null) { + createdAt_ = builderForValue.build(); + onChanged(); + } else { + createdAtBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .google.type.DateTime created_at = 4 [json_name = "createdAt"]; + */ + public Builder mergeCreatedAt(com.google.type.DateTime value) { + if (createdAtBuilder_ == null) { + if (createdAt_ != null) { + createdAt_ = + com.google.type.DateTime.newBuilder(createdAt_).mergeFrom(value).buildPartial(); + } else { + createdAt_ = value; + } + onChanged(); + } else { + createdAtBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .google.type.DateTime created_at = 4 [json_name = "createdAt"]; + */ + public Builder clearCreatedAt() { + if (createdAtBuilder_ == null) { + createdAt_ = null; + onChanged(); + } else { + createdAt_ = null; + createdAtBuilder_ = null; + } + + return this; + } + /** + * .google.type.DateTime created_at = 4 [json_name = "createdAt"]; + */ + public com.google.type.DateTime.Builder getCreatedAtBuilder() { + + onChanged(); + return getCreatedAtFieldBuilder().getBuilder(); + } + /** + * .google.type.DateTime created_at = 4 [json_name = "createdAt"]; + */ + public com.google.type.DateTimeOrBuilder getCreatedAtOrBuilder() { + if (createdAtBuilder_ != null) { + return createdAtBuilder_.getMessageOrBuilder(); + } else { + return createdAt_ == null ? + com.google.type.DateTime.getDefaultInstance() : createdAt_; + } + } + /** + * .google.type.DateTime created_at = 4 [json_name = "createdAt"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.DateTime, com.google.type.DateTime.Builder, com.google.type.DateTimeOrBuilder> + getCreatedAtFieldBuilder() { + if (createdAtBuilder_ == null) { + createdAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.DateTime, com.google.type.DateTime.Builder, com.google.type.DateTimeOrBuilder>( + getCreatedAt(), + getParentForChildren(), + isClean()); + createdAt_ = null; + } + return createdAtBuilder_; + } + @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:pet.v1.Pet) + } + + // @@protoc_insertion_point(class_scope:pet.v1.Pet) + private static final pet.v1.PetOuterClass.Pet DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pet.v1.PetOuterClass.Pet(); + } + + public static pet.v1.PetOuterClass.Pet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Pet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Pet(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pet.v1.PetOuterClass.Pet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetPetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pet.v1.GetPetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string pet_id = 1 [json_name = "petId"]; + * @return The petId. + */ + java.lang.String getPetId(); + /** + * string pet_id = 1 [json_name = "petId"]; + * @return The bytes for petId. + */ + com.google.protobuf.ByteString + getPetIdBytes(); + } + /** + * Protobuf type {@code pet.v1.GetPetRequest} + */ + public static final class GetPetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pet.v1.GetPetRequest) + GetPetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetPetRequest.newBuilder() to construct. + private GetPetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetPetRequest() { + petId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetPetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetPetRequest( + 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(); + + petId_ = 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 pet.v1.PetOuterClass.internal_static_pet_v1_GetPetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pet.v1.PetOuterClass.internal_static_pet_v1_GetPetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pet.v1.PetOuterClass.GetPetRequest.class, pet.v1.PetOuterClass.GetPetRequest.Builder.class); + } + + public static final int PET_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object petId_; + /** + * string pet_id = 1 [json_name = "petId"]; + * @return The petId. + */ + @java.lang.Override + public java.lang.String getPetId() { + java.lang.Object ref = petId_; + 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(); + petId_ = s; + return s; + } + } + /** + * string pet_id = 1 [json_name = "petId"]; + * @return The bytes for petId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPetIdBytes() { + java.lang.Object ref = petId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + petId_ = 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 (!getPetIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, petId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPetIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, petId_); + } + 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 pet.v1.PetOuterClass.GetPetRequest)) { + return super.equals(obj); + } + pet.v1.PetOuterClass.GetPetRequest other = (pet.v1.PetOuterClass.GetPetRequest) obj; + + if (!getPetId() + .equals(other.getPetId())) 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) + PET_ID_FIELD_NUMBER; + hash = (53 * hash) + getPetId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pet.v1.PetOuterClass.GetPetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pet.v1.PetOuterClass.GetPetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pet.v1.PetOuterClass.GetPetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pet.v1.PetOuterClass.GetPetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pet.v1.PetOuterClass.GetPetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pet.v1.PetOuterClass.GetPetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pet.v1.PetOuterClass.GetPetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pet.v1.PetOuterClass.GetPetRequest 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 pet.v1.PetOuterClass.GetPetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pet.v1.PetOuterClass.GetPetRequest 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 pet.v1.PetOuterClass.GetPetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pet.v1.PetOuterClass.GetPetRequest 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(pet.v1.PetOuterClass.GetPetRequest 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; + } + /** + * Protobuf type {@code pet.v1.GetPetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pet.v1.GetPetRequest) + pet.v1.PetOuterClass.GetPetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pet.v1.PetOuterClass.internal_static_pet_v1_GetPetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pet.v1.PetOuterClass.internal_static_pet_v1_GetPetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pet.v1.PetOuterClass.GetPetRequest.class, pet.v1.PetOuterClass.GetPetRequest.Builder.class); + } + + // Construct using pet.v1.PetOuterClass.GetPetRequest.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(); + petId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pet.v1.PetOuterClass.internal_static_pet_v1_GetPetRequest_descriptor; + } + + @java.lang.Override + public pet.v1.PetOuterClass.GetPetRequest getDefaultInstanceForType() { + return pet.v1.PetOuterClass.GetPetRequest.getDefaultInstance(); + } + + @java.lang.Override + public pet.v1.PetOuterClass.GetPetRequest build() { + pet.v1.PetOuterClass.GetPetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pet.v1.PetOuterClass.GetPetRequest buildPartial() { + pet.v1.PetOuterClass.GetPetRequest result = new pet.v1.PetOuterClass.GetPetRequest(this); + result.petId_ = petId_; + 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 pet.v1.PetOuterClass.GetPetRequest) { + return mergeFrom((pet.v1.PetOuterClass.GetPetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pet.v1.PetOuterClass.GetPetRequest other) { + if (other == pet.v1.PetOuterClass.GetPetRequest.getDefaultInstance()) return this; + if (!other.getPetId().isEmpty()) { + petId_ = other.petId_; + 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 { + pet.v1.PetOuterClass.GetPetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pet.v1.PetOuterClass.GetPetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object petId_ = ""; + /** + * string pet_id = 1 [json_name = "petId"]; + * @return The petId. + */ + public java.lang.String getPetId() { + java.lang.Object ref = petId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + petId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string pet_id = 1 [json_name = "petId"]; + * @return The bytes for petId. + */ + public com.google.protobuf.ByteString + getPetIdBytes() { + java.lang.Object ref = petId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + petId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string pet_id = 1 [json_name = "petId"]; + * @param value The petId to set. + * @return This builder for chaining. + */ + public Builder setPetId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + petId_ = value; + onChanged(); + return this; + } + /** + * string pet_id = 1 [json_name = "petId"]; + * @return This builder for chaining. + */ + public Builder clearPetId() { + + petId_ = getDefaultInstance().getPetId(); + onChanged(); + return this; + } + /** + * string pet_id = 1 [json_name = "petId"]; + * @param value The bytes for petId to set. + * @return This builder for chaining. + */ + public Builder setPetIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + petId_ = 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:pet.v1.GetPetRequest) + } + + // @@protoc_insertion_point(class_scope:pet.v1.GetPetRequest) + private static final pet.v1.PetOuterClass.GetPetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pet.v1.PetOuterClass.GetPetRequest(); + } + + public static pet.v1.PetOuterClass.GetPetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetPetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pet.v1.PetOuterClass.GetPetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetPetResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pet.v1.GetPetResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + * @return Whether the pet field is set. + */ + boolean hasPet(); + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + * @return The pet. + */ + pet.v1.PetOuterClass.Pet getPet(); + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + */ + pet.v1.PetOuterClass.PetOrBuilder getPetOrBuilder(); + } + /** + * Protobuf type {@code pet.v1.GetPetResponse} + */ + public static final class GetPetResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pet.v1.GetPetResponse) + GetPetResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetPetResponse.newBuilder() to construct. + private GetPetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetPetResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetPetResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetPetResponse( + 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: { + pet.v1.PetOuterClass.Pet.Builder subBuilder = null; + if (pet_ != null) { + subBuilder = pet_.toBuilder(); + } + pet_ = input.readMessage(pet.v1.PetOuterClass.Pet.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(pet_); + pet_ = subBuilder.buildPartial(); + } + + 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 pet.v1.PetOuterClass.internal_static_pet_v1_GetPetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pet.v1.PetOuterClass.internal_static_pet_v1_GetPetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pet.v1.PetOuterClass.GetPetResponse.class, pet.v1.PetOuterClass.GetPetResponse.Builder.class); + } + + public static final int PET_FIELD_NUMBER = 1; + private pet.v1.PetOuterClass.Pet pet_; + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + * @return Whether the pet field is set. + */ + @java.lang.Override + public boolean hasPet() { + return pet_ != null; + } + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + * @return The pet. + */ + @java.lang.Override + public pet.v1.PetOuterClass.Pet getPet() { + return pet_ == null ? pet.v1.PetOuterClass.Pet.getDefaultInstance() : pet_; + } + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + */ + @java.lang.Override + public pet.v1.PetOuterClass.PetOrBuilder getPetOrBuilder() { + return getPet(); + } + + 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 (pet_ != null) { + output.writeMessage(1, getPet()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pet_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getPet()); + } + 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 pet.v1.PetOuterClass.GetPetResponse)) { + return super.equals(obj); + } + pet.v1.PetOuterClass.GetPetResponse other = (pet.v1.PetOuterClass.GetPetResponse) obj; + + if (hasPet() != other.hasPet()) return false; + if (hasPet()) { + if (!getPet() + .equals(other.getPet())) 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(); + if (hasPet()) { + hash = (37 * hash) + PET_FIELD_NUMBER; + hash = (53 * hash) + getPet().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pet.v1.PetOuterClass.GetPetResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pet.v1.PetOuterClass.GetPetResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pet.v1.PetOuterClass.GetPetResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pet.v1.PetOuterClass.GetPetResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pet.v1.PetOuterClass.GetPetResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pet.v1.PetOuterClass.GetPetResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pet.v1.PetOuterClass.GetPetResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pet.v1.PetOuterClass.GetPetResponse 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 pet.v1.PetOuterClass.GetPetResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pet.v1.PetOuterClass.GetPetResponse 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 pet.v1.PetOuterClass.GetPetResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pet.v1.PetOuterClass.GetPetResponse 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(pet.v1.PetOuterClass.GetPetResponse 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; + } + /** + * Protobuf type {@code pet.v1.GetPetResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pet.v1.GetPetResponse) + pet.v1.PetOuterClass.GetPetResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pet.v1.PetOuterClass.internal_static_pet_v1_GetPetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pet.v1.PetOuterClass.internal_static_pet_v1_GetPetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pet.v1.PetOuterClass.GetPetResponse.class, pet.v1.PetOuterClass.GetPetResponse.Builder.class); + } + + // Construct using pet.v1.PetOuterClass.GetPetResponse.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(); + if (petBuilder_ == null) { + pet_ = null; + } else { + pet_ = null; + petBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pet.v1.PetOuterClass.internal_static_pet_v1_GetPetResponse_descriptor; + } + + @java.lang.Override + public pet.v1.PetOuterClass.GetPetResponse getDefaultInstanceForType() { + return pet.v1.PetOuterClass.GetPetResponse.getDefaultInstance(); + } + + @java.lang.Override + public pet.v1.PetOuterClass.GetPetResponse build() { + pet.v1.PetOuterClass.GetPetResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pet.v1.PetOuterClass.GetPetResponse buildPartial() { + pet.v1.PetOuterClass.GetPetResponse result = new pet.v1.PetOuterClass.GetPetResponse(this); + if (petBuilder_ == null) { + result.pet_ = pet_; + } else { + result.pet_ = petBuilder_.build(); + } + 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 pet.v1.PetOuterClass.GetPetResponse) { + return mergeFrom((pet.v1.PetOuterClass.GetPetResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pet.v1.PetOuterClass.GetPetResponse other) { + if (other == pet.v1.PetOuterClass.GetPetResponse.getDefaultInstance()) return this; + if (other.hasPet()) { + mergePet(other.getPet()); + } + 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 { + pet.v1.PetOuterClass.GetPetResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pet.v1.PetOuterClass.GetPetResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private pet.v1.PetOuterClass.Pet pet_; + private com.google.protobuf.SingleFieldBuilderV3< + pet.v1.PetOuterClass.Pet, pet.v1.PetOuterClass.Pet.Builder, pet.v1.PetOuterClass.PetOrBuilder> petBuilder_; + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + * @return Whether the pet field is set. + */ + public boolean hasPet() { + return petBuilder_ != null || pet_ != null; + } + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + * @return The pet. + */ + public pet.v1.PetOuterClass.Pet getPet() { + if (petBuilder_ == null) { + return pet_ == null ? pet.v1.PetOuterClass.Pet.getDefaultInstance() : pet_; + } else { + return petBuilder_.getMessage(); + } + } + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + */ + public Builder setPet(pet.v1.PetOuterClass.Pet value) { + if (petBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pet_ = value; + onChanged(); + } else { + petBuilder_.setMessage(value); + } + + return this; + } + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + */ + public Builder setPet( + pet.v1.PetOuterClass.Pet.Builder builderForValue) { + if (petBuilder_ == null) { + pet_ = builderForValue.build(); + onChanged(); + } else { + petBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + */ + public Builder mergePet(pet.v1.PetOuterClass.Pet value) { + if (petBuilder_ == null) { + if (pet_ != null) { + pet_ = + pet.v1.PetOuterClass.Pet.newBuilder(pet_).mergeFrom(value).buildPartial(); + } else { + pet_ = value; + } + onChanged(); + } else { + petBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + */ + public Builder clearPet() { + if (petBuilder_ == null) { + pet_ = null; + onChanged(); + } else { + pet_ = null; + petBuilder_ = null; + } + + return this; + } + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + */ + public pet.v1.PetOuterClass.Pet.Builder getPetBuilder() { + + onChanged(); + return getPetFieldBuilder().getBuilder(); + } + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + */ + public pet.v1.PetOuterClass.PetOrBuilder getPetOrBuilder() { + if (petBuilder_ != null) { + return petBuilder_.getMessageOrBuilder(); + } else { + return pet_ == null ? + pet.v1.PetOuterClass.Pet.getDefaultInstance() : pet_; + } + } + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pet.v1.PetOuterClass.Pet, pet.v1.PetOuterClass.Pet.Builder, pet.v1.PetOuterClass.PetOrBuilder> + getPetFieldBuilder() { + if (petBuilder_ == null) { + petBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pet.v1.PetOuterClass.Pet, pet.v1.PetOuterClass.Pet.Builder, pet.v1.PetOuterClass.PetOrBuilder>( + getPet(), + getParentForChildren(), + isClean()); + pet_ = null; + } + return petBuilder_; + } + @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:pet.v1.GetPetResponse) + } + + // @@protoc_insertion_point(class_scope:pet.v1.GetPetResponse) + private static final pet.v1.PetOuterClass.GetPetResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pet.v1.PetOuterClass.GetPetResponse(); + } + + public static pet.v1.PetOuterClass.GetPetResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPetResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetPetResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pet.v1.PetOuterClass.GetPetResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PutPetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pet.v1.PutPetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + * @return The enum numeric value on the wire for petType. + */ + int getPetTypeValue(); + /** + * .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + * @return The petType. + */ + pet.v1.PetOuterClass.PetType getPetType(); + + /** + * string name = 2 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 2 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + } + /** + * Protobuf type {@code pet.v1.PutPetRequest} + */ + public static final class PutPetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pet.v1.PutPetRequest) + PutPetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use PutPetRequest.newBuilder() to construct. + private PutPetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PutPetRequest() { + petType_ = 0; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PutPetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PutPetRequest( + 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 8: { + int rawValue = input.readEnum(); + + petType_ = rawValue; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = 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 pet.v1.PetOuterClass.internal_static_pet_v1_PutPetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pet.v1.PetOuterClass.internal_static_pet_v1_PutPetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pet.v1.PetOuterClass.PutPetRequest.class, pet.v1.PetOuterClass.PutPetRequest.Builder.class); + } + + public static final int PET_TYPE_FIELD_NUMBER = 1; + private int petType_; + /** + * .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + * @return The enum numeric value on the wire for petType. + */ + @java.lang.Override public int getPetTypeValue() { + return petType_; + } + /** + * .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + * @return The petType. + */ + @java.lang.Override public pet.v1.PetOuterClass.PetType getPetType() { + @SuppressWarnings("deprecation") + pet.v1.PetOuterClass.PetType result = pet.v1.PetOuterClass.PetType.valueOf(petType_); + return result == null ? pet.v1.PetOuterClass.PetType.UNRECOGNIZED : result; + } + + public static final int NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object name_; + /** + * string name = 2 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * string name = 2 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = 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 (petType_ != pet.v1.PetOuterClass.PetType.PET_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, petType_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (petType_ != pet.v1.PetOuterClass.PetType.PET_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, petType_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + 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 pet.v1.PetOuterClass.PutPetRequest)) { + return super.equals(obj); + } + pet.v1.PetOuterClass.PutPetRequest other = (pet.v1.PetOuterClass.PutPetRequest) obj; + + if (petType_ != other.petType_) return false; + if (!getName() + .equals(other.getName())) 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) + PET_TYPE_FIELD_NUMBER; + hash = (53 * hash) + petType_; + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pet.v1.PetOuterClass.PutPetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pet.v1.PetOuterClass.PutPetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pet.v1.PetOuterClass.PutPetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pet.v1.PetOuterClass.PutPetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pet.v1.PetOuterClass.PutPetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pet.v1.PetOuterClass.PutPetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pet.v1.PetOuterClass.PutPetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pet.v1.PetOuterClass.PutPetRequest 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 pet.v1.PetOuterClass.PutPetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pet.v1.PetOuterClass.PutPetRequest 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 pet.v1.PetOuterClass.PutPetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pet.v1.PetOuterClass.PutPetRequest 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(pet.v1.PetOuterClass.PutPetRequest 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; + } + /** + * Protobuf type {@code pet.v1.PutPetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pet.v1.PutPetRequest) + pet.v1.PetOuterClass.PutPetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pet.v1.PetOuterClass.internal_static_pet_v1_PutPetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pet.v1.PetOuterClass.internal_static_pet_v1_PutPetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pet.v1.PetOuterClass.PutPetRequest.class, pet.v1.PetOuterClass.PutPetRequest.Builder.class); + } + + // Construct using pet.v1.PetOuterClass.PutPetRequest.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(); + petType_ = 0; + + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pet.v1.PetOuterClass.internal_static_pet_v1_PutPetRequest_descriptor; + } + + @java.lang.Override + public pet.v1.PetOuterClass.PutPetRequest getDefaultInstanceForType() { + return pet.v1.PetOuterClass.PutPetRequest.getDefaultInstance(); + } + + @java.lang.Override + public pet.v1.PetOuterClass.PutPetRequest build() { + pet.v1.PetOuterClass.PutPetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pet.v1.PetOuterClass.PutPetRequest buildPartial() { + pet.v1.PetOuterClass.PutPetRequest result = new pet.v1.PetOuterClass.PutPetRequest(this); + result.petType_ = petType_; + result.name_ = name_; + 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 pet.v1.PetOuterClass.PutPetRequest) { + return mergeFrom((pet.v1.PetOuterClass.PutPetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pet.v1.PetOuterClass.PutPetRequest other) { + if (other == pet.v1.PetOuterClass.PutPetRequest.getDefaultInstance()) return this; + if (other.petType_ != 0) { + setPetTypeValue(other.getPetTypeValue()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + 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 { + pet.v1.PetOuterClass.PutPetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pet.v1.PetOuterClass.PutPetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int petType_ = 0; + /** + * .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + * @return The enum numeric value on the wire for petType. + */ + @java.lang.Override public int getPetTypeValue() { + return petType_; + } + /** + * .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + * @param value The enum numeric value on the wire for petType to set. + * @return This builder for chaining. + */ + public Builder setPetTypeValue(int value) { + + petType_ = value; + onChanged(); + return this; + } + /** + * .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + * @return The petType. + */ + @java.lang.Override + public pet.v1.PetOuterClass.PetType getPetType() { + @SuppressWarnings("deprecation") + pet.v1.PetOuterClass.PetType result = pet.v1.PetOuterClass.PetType.valueOf(petType_); + return result == null ? pet.v1.PetOuterClass.PetType.UNRECOGNIZED : result; + } + /** + * .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + * @param value The petType to set. + * @return This builder for chaining. + */ + public Builder setPetType(pet.v1.PetOuterClass.PetType value) { + if (value == null) { + throw new NullPointerException(); + } + + petType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .pet.v1.PetType pet_type = 1 [json_name = "petType"]; + * @return This builder for chaining. + */ + public Builder clearPetType() { + + petType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * string name = 2 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string name = 2 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string name = 2 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * string name = 2 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * string name = 2 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = 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:pet.v1.PutPetRequest) + } + + // @@protoc_insertion_point(class_scope:pet.v1.PutPetRequest) + private static final pet.v1.PetOuterClass.PutPetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pet.v1.PetOuterClass.PutPetRequest(); + } + + public static pet.v1.PetOuterClass.PutPetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PutPetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PutPetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pet.v1.PetOuterClass.PutPetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PutPetResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pet.v1.PutPetResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + * @return Whether the pet field is set. + */ + boolean hasPet(); + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + * @return The pet. + */ + pet.v1.PetOuterClass.Pet getPet(); + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + */ + pet.v1.PetOuterClass.PetOrBuilder getPetOrBuilder(); + } + /** + * Protobuf type {@code pet.v1.PutPetResponse} + */ + public static final class PutPetResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pet.v1.PutPetResponse) + PutPetResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use PutPetResponse.newBuilder() to construct. + private PutPetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PutPetResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PutPetResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PutPetResponse( + 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: { + pet.v1.PetOuterClass.Pet.Builder subBuilder = null; + if (pet_ != null) { + subBuilder = pet_.toBuilder(); + } + pet_ = input.readMessage(pet.v1.PetOuterClass.Pet.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(pet_); + pet_ = subBuilder.buildPartial(); + } + + 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 pet.v1.PetOuterClass.internal_static_pet_v1_PutPetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pet.v1.PetOuterClass.internal_static_pet_v1_PutPetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pet.v1.PetOuterClass.PutPetResponse.class, pet.v1.PetOuterClass.PutPetResponse.Builder.class); + } + + public static final int PET_FIELD_NUMBER = 1; + private pet.v1.PetOuterClass.Pet pet_; + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + * @return Whether the pet field is set. + */ + @java.lang.Override + public boolean hasPet() { + return pet_ != null; + } + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + * @return The pet. + */ + @java.lang.Override + public pet.v1.PetOuterClass.Pet getPet() { + return pet_ == null ? pet.v1.PetOuterClass.Pet.getDefaultInstance() : pet_; + } + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + */ + @java.lang.Override + public pet.v1.PetOuterClass.PetOrBuilder getPetOrBuilder() { + return getPet(); + } + + 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 (pet_ != null) { + output.writeMessage(1, getPet()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (pet_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getPet()); + } + 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 pet.v1.PetOuterClass.PutPetResponse)) { + return super.equals(obj); + } + pet.v1.PetOuterClass.PutPetResponse other = (pet.v1.PetOuterClass.PutPetResponse) obj; + + if (hasPet() != other.hasPet()) return false; + if (hasPet()) { + if (!getPet() + .equals(other.getPet())) 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(); + if (hasPet()) { + hash = (37 * hash) + PET_FIELD_NUMBER; + hash = (53 * hash) + getPet().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pet.v1.PetOuterClass.PutPetResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pet.v1.PetOuterClass.PutPetResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pet.v1.PetOuterClass.PutPetResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pet.v1.PetOuterClass.PutPetResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pet.v1.PetOuterClass.PutPetResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pet.v1.PetOuterClass.PutPetResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pet.v1.PetOuterClass.PutPetResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pet.v1.PetOuterClass.PutPetResponse 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 pet.v1.PetOuterClass.PutPetResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pet.v1.PetOuterClass.PutPetResponse 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 pet.v1.PetOuterClass.PutPetResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pet.v1.PetOuterClass.PutPetResponse 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(pet.v1.PetOuterClass.PutPetResponse 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; + } + /** + * Protobuf type {@code pet.v1.PutPetResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pet.v1.PutPetResponse) + pet.v1.PetOuterClass.PutPetResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pet.v1.PetOuterClass.internal_static_pet_v1_PutPetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pet.v1.PetOuterClass.internal_static_pet_v1_PutPetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pet.v1.PetOuterClass.PutPetResponse.class, pet.v1.PetOuterClass.PutPetResponse.Builder.class); + } + + // Construct using pet.v1.PetOuterClass.PutPetResponse.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(); + if (petBuilder_ == null) { + pet_ = null; + } else { + pet_ = null; + petBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pet.v1.PetOuterClass.internal_static_pet_v1_PutPetResponse_descriptor; + } + + @java.lang.Override + public pet.v1.PetOuterClass.PutPetResponse getDefaultInstanceForType() { + return pet.v1.PetOuterClass.PutPetResponse.getDefaultInstance(); + } + + @java.lang.Override + public pet.v1.PetOuterClass.PutPetResponse build() { + pet.v1.PetOuterClass.PutPetResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pet.v1.PetOuterClass.PutPetResponse buildPartial() { + pet.v1.PetOuterClass.PutPetResponse result = new pet.v1.PetOuterClass.PutPetResponse(this); + if (petBuilder_ == null) { + result.pet_ = pet_; + } else { + result.pet_ = petBuilder_.build(); + } + 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 pet.v1.PetOuterClass.PutPetResponse) { + return mergeFrom((pet.v1.PetOuterClass.PutPetResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pet.v1.PetOuterClass.PutPetResponse other) { + if (other == pet.v1.PetOuterClass.PutPetResponse.getDefaultInstance()) return this; + if (other.hasPet()) { + mergePet(other.getPet()); + } + 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 { + pet.v1.PetOuterClass.PutPetResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pet.v1.PetOuterClass.PutPetResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private pet.v1.PetOuterClass.Pet pet_; + private com.google.protobuf.SingleFieldBuilderV3< + pet.v1.PetOuterClass.Pet, pet.v1.PetOuterClass.Pet.Builder, pet.v1.PetOuterClass.PetOrBuilder> petBuilder_; + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + * @return Whether the pet field is set. + */ + public boolean hasPet() { + return petBuilder_ != null || pet_ != null; + } + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + * @return The pet. + */ + public pet.v1.PetOuterClass.Pet getPet() { + if (petBuilder_ == null) { + return pet_ == null ? pet.v1.PetOuterClass.Pet.getDefaultInstance() : pet_; + } else { + return petBuilder_.getMessage(); + } + } + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + */ + public Builder setPet(pet.v1.PetOuterClass.Pet value) { + if (petBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pet_ = value; + onChanged(); + } else { + petBuilder_.setMessage(value); + } + + return this; + } + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + */ + public Builder setPet( + pet.v1.PetOuterClass.Pet.Builder builderForValue) { + if (petBuilder_ == null) { + pet_ = builderForValue.build(); + onChanged(); + } else { + petBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + */ + public Builder mergePet(pet.v1.PetOuterClass.Pet value) { + if (petBuilder_ == null) { + if (pet_ != null) { + pet_ = + pet.v1.PetOuterClass.Pet.newBuilder(pet_).mergeFrom(value).buildPartial(); + } else { + pet_ = value; + } + onChanged(); + } else { + petBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + */ + public Builder clearPet() { + if (petBuilder_ == null) { + pet_ = null; + onChanged(); + } else { + pet_ = null; + petBuilder_ = null; + } + + return this; + } + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + */ + public pet.v1.PetOuterClass.Pet.Builder getPetBuilder() { + + onChanged(); + return getPetFieldBuilder().getBuilder(); + } + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + */ + public pet.v1.PetOuterClass.PetOrBuilder getPetOrBuilder() { + if (petBuilder_ != null) { + return petBuilder_.getMessageOrBuilder(); + } else { + return pet_ == null ? + pet.v1.PetOuterClass.Pet.getDefaultInstance() : pet_; + } + } + /** + * .pet.v1.Pet pet = 1 [json_name = "pet"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + pet.v1.PetOuterClass.Pet, pet.v1.PetOuterClass.Pet.Builder, pet.v1.PetOuterClass.PetOrBuilder> + getPetFieldBuilder() { + if (petBuilder_ == null) { + petBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + pet.v1.PetOuterClass.Pet, pet.v1.PetOuterClass.Pet.Builder, pet.v1.PetOuterClass.PetOrBuilder>( + getPet(), + getParentForChildren(), + isClean()); + pet_ = null; + } + return petBuilder_; + } + @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:pet.v1.PutPetResponse) + } + + // @@protoc_insertion_point(class_scope:pet.v1.PutPetResponse) + private static final pet.v1.PetOuterClass.PutPetResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pet.v1.PetOuterClass.PutPetResponse(); + } + + public static pet.v1.PetOuterClass.PutPetResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PutPetResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PutPetResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pet.v1.PetOuterClass.PutPetResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DeletePetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:pet.v1.DeletePetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * string pet_id = 1 [json_name = "petId"]; + * @return The petId. + */ + java.lang.String getPetId(); + /** + * string pet_id = 1 [json_name = "petId"]; + * @return The bytes for petId. + */ + com.google.protobuf.ByteString + getPetIdBytes(); + } + /** + * Protobuf type {@code pet.v1.DeletePetRequest} + */ + public static final class DeletePetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pet.v1.DeletePetRequest) + DeletePetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeletePetRequest.newBuilder() to construct. + private DeletePetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeletePetRequest() { + petId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeletePetRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeletePetRequest( + 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(); + + petId_ = 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 pet.v1.PetOuterClass.internal_static_pet_v1_DeletePetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pet.v1.PetOuterClass.internal_static_pet_v1_DeletePetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pet.v1.PetOuterClass.DeletePetRequest.class, pet.v1.PetOuterClass.DeletePetRequest.Builder.class); + } + + public static final int PET_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object petId_; + /** + * string pet_id = 1 [json_name = "petId"]; + * @return The petId. + */ + @java.lang.Override + public java.lang.String getPetId() { + java.lang.Object ref = petId_; + 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(); + petId_ = s; + return s; + } + } + /** + * string pet_id = 1 [json_name = "petId"]; + * @return The bytes for petId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPetIdBytes() { + java.lang.Object ref = petId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + petId_ = 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 (!getPetIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, petId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPetIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, petId_); + } + 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 pet.v1.PetOuterClass.DeletePetRequest)) { + return super.equals(obj); + } + pet.v1.PetOuterClass.DeletePetRequest other = (pet.v1.PetOuterClass.DeletePetRequest) obj; + + if (!getPetId() + .equals(other.getPetId())) 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) + PET_ID_FIELD_NUMBER; + hash = (53 * hash) + getPetId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pet.v1.PetOuterClass.DeletePetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pet.v1.PetOuterClass.DeletePetRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pet.v1.PetOuterClass.DeletePetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pet.v1.PetOuterClass.DeletePetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pet.v1.PetOuterClass.DeletePetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pet.v1.PetOuterClass.DeletePetRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pet.v1.PetOuterClass.DeletePetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pet.v1.PetOuterClass.DeletePetRequest 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 pet.v1.PetOuterClass.DeletePetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pet.v1.PetOuterClass.DeletePetRequest 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 pet.v1.PetOuterClass.DeletePetRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pet.v1.PetOuterClass.DeletePetRequest 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(pet.v1.PetOuterClass.DeletePetRequest 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; + } + /** + * Protobuf type {@code pet.v1.DeletePetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pet.v1.DeletePetRequest) + pet.v1.PetOuterClass.DeletePetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pet.v1.PetOuterClass.internal_static_pet_v1_DeletePetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pet.v1.PetOuterClass.internal_static_pet_v1_DeletePetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pet.v1.PetOuterClass.DeletePetRequest.class, pet.v1.PetOuterClass.DeletePetRequest.Builder.class); + } + + // Construct using pet.v1.PetOuterClass.DeletePetRequest.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(); + petId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pet.v1.PetOuterClass.internal_static_pet_v1_DeletePetRequest_descriptor; + } + + @java.lang.Override + public pet.v1.PetOuterClass.DeletePetRequest getDefaultInstanceForType() { + return pet.v1.PetOuterClass.DeletePetRequest.getDefaultInstance(); + } + + @java.lang.Override + public pet.v1.PetOuterClass.DeletePetRequest build() { + pet.v1.PetOuterClass.DeletePetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pet.v1.PetOuterClass.DeletePetRequest buildPartial() { + pet.v1.PetOuterClass.DeletePetRequest result = new pet.v1.PetOuterClass.DeletePetRequest(this); + result.petId_ = petId_; + 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 pet.v1.PetOuterClass.DeletePetRequest) { + return mergeFrom((pet.v1.PetOuterClass.DeletePetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pet.v1.PetOuterClass.DeletePetRequest other) { + if (other == pet.v1.PetOuterClass.DeletePetRequest.getDefaultInstance()) return this; + if (!other.getPetId().isEmpty()) { + petId_ = other.petId_; + 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 { + pet.v1.PetOuterClass.DeletePetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pet.v1.PetOuterClass.DeletePetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object petId_ = ""; + /** + * string pet_id = 1 [json_name = "petId"]; + * @return The petId. + */ + public java.lang.String getPetId() { + java.lang.Object ref = petId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + petId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string pet_id = 1 [json_name = "petId"]; + * @return The bytes for petId. + */ + public com.google.protobuf.ByteString + getPetIdBytes() { + java.lang.Object ref = petId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + petId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string pet_id = 1 [json_name = "petId"]; + * @param value The petId to set. + * @return This builder for chaining. + */ + public Builder setPetId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + petId_ = value; + onChanged(); + return this; + } + /** + * string pet_id = 1 [json_name = "petId"]; + * @return This builder for chaining. + */ + public Builder clearPetId() { + + petId_ = getDefaultInstance().getPetId(); + onChanged(); + return this; + } + /** + * string pet_id = 1 [json_name = "petId"]; + * @param value The bytes for petId to set. + * @return This builder for chaining. + */ + public Builder setPetIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + petId_ = 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:pet.v1.DeletePetRequest) + } + + // @@protoc_insertion_point(class_scope:pet.v1.DeletePetRequest) + private static final pet.v1.PetOuterClass.DeletePetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pet.v1.PetOuterClass.DeletePetRequest(); + } + + public static pet.v1.PetOuterClass.DeletePetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletePetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeletePetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pet.v1.PetOuterClass.DeletePetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DeletePetResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:pet.v1.DeletePetResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code pet.v1.DeletePetResponse} + */ + public static final class DeletePetResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:pet.v1.DeletePetResponse) + DeletePetResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeletePetResponse.newBuilder() to construct. + private DeletePetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeletePetResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeletePetResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeletePetResponse( + 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; + 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 pet.v1.PetOuterClass.internal_static_pet_v1_DeletePetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pet.v1.PetOuterClass.internal_static_pet_v1_DeletePetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pet.v1.PetOuterClass.DeletePetResponse.class, pet.v1.PetOuterClass.DeletePetResponse.Builder.class); + } + + 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 { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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 pet.v1.PetOuterClass.DeletePetResponse)) { + return super.equals(obj); + } + pet.v1.PetOuterClass.DeletePetResponse other = (pet.v1.PetOuterClass.DeletePetResponse) obj; + + 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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static pet.v1.PetOuterClass.DeletePetResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pet.v1.PetOuterClass.DeletePetResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pet.v1.PetOuterClass.DeletePetResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pet.v1.PetOuterClass.DeletePetResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pet.v1.PetOuterClass.DeletePetResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static pet.v1.PetOuterClass.DeletePetResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static pet.v1.PetOuterClass.DeletePetResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pet.v1.PetOuterClass.DeletePetResponse 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 pet.v1.PetOuterClass.DeletePetResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static pet.v1.PetOuterClass.DeletePetResponse 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 pet.v1.PetOuterClass.DeletePetResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static pet.v1.PetOuterClass.DeletePetResponse 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(pet.v1.PetOuterClass.DeletePetResponse 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; + } + /** + * Protobuf type {@code pet.v1.DeletePetResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:pet.v1.DeletePetResponse) + pet.v1.PetOuterClass.DeletePetResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return pet.v1.PetOuterClass.internal_static_pet_v1_DeletePetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return pet.v1.PetOuterClass.internal_static_pet_v1_DeletePetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + pet.v1.PetOuterClass.DeletePetResponse.class, pet.v1.PetOuterClass.DeletePetResponse.Builder.class); + } + + // Construct using pet.v1.PetOuterClass.DeletePetResponse.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(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return pet.v1.PetOuterClass.internal_static_pet_v1_DeletePetResponse_descriptor; + } + + @java.lang.Override + public pet.v1.PetOuterClass.DeletePetResponse getDefaultInstanceForType() { + return pet.v1.PetOuterClass.DeletePetResponse.getDefaultInstance(); + } + + @java.lang.Override + public pet.v1.PetOuterClass.DeletePetResponse build() { + pet.v1.PetOuterClass.DeletePetResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public pet.v1.PetOuterClass.DeletePetResponse buildPartial() { + pet.v1.PetOuterClass.DeletePetResponse result = new pet.v1.PetOuterClass.DeletePetResponse(this); + 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 pet.v1.PetOuterClass.DeletePetResponse) { + return mergeFrom((pet.v1.PetOuterClass.DeletePetResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(pet.v1.PetOuterClass.DeletePetResponse other) { + if (other == pet.v1.PetOuterClass.DeletePetResponse.getDefaultInstance()) return this; + 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 { + pet.v1.PetOuterClass.DeletePetResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (pet.v1.PetOuterClass.DeletePetResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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:pet.v1.DeletePetResponse) + } + + // @@protoc_insertion_point(class_scope:pet.v1.DeletePetResponse) + private static final pet.v1.PetOuterClass.DeletePetResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new pet.v1.PetOuterClass.DeletePetResponse(); + } + + public static pet.v1.PetOuterClass.DeletePetResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeletePetResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeletePetResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public pet.v1.PetOuterClass.DeletePetResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pet_v1_Pet_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pet_v1_Pet_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pet_v1_GetPetRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pet_v1_GetPetRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pet_v1_GetPetResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pet_v1_GetPetResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pet_v1_PutPetRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pet_v1_PutPetRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pet_v1_PutPetResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pet_v1_PutPetResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pet_v1_DeletePetRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pet_v1_DeletePetRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_pet_v1_DeletePetResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_pet_v1_DeletePetResponse_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\020pet/v1/pet.proto\022\006pet.v1\032\032google/type/" + + "datetime.proto\"\222\001\n\003Pet\022*\n\010pet_type\030\001 \001(\016" + + "2\017.pet.v1.PetTypeR\007petType\022\025\n\006pet_id\030\002 \001" + + "(\tR\005petId\022\022\n\004name\030\003 \001(\tR\004name\0224\n\ncreated" + + "_at\030\004 \001(\0132\025.google.type.DateTimeR\tcreate" + + "dAt\"&\n\rGetPetRequest\022\025\n\006pet_id\030\001 \001(\tR\005pe" + + "tId\"/\n\016GetPetResponse\022\035\n\003pet\030\001 \001(\0132\013.pet" + + ".v1.PetR\003pet\"O\n\rPutPetRequest\022*\n\010pet_typ" + + "e\030\001 \001(\0162\017.pet.v1.PetTypeR\007petType\022\022\n\004nam" + + "e\030\002 \001(\tR\004name\"/\n\016PutPetResponse\022\035\n\003pet\030\001" + + " \001(\0132\013.pet.v1.PetR\003pet\")\n\020DeletePetReque" + + "st\022\025\n\006pet_id\030\001 \001(\tR\005petId\"\023\n\021DeletePetRe" + + "sponse*q\n\007PetType\022\030\n\024PET_TYPE_UNSPECIFIE" + + "D\020\000\022\020\n\014PET_TYPE_CAT\020\001\022\020\n\014PET_TYPE_DOG\020\002\022" + + "\022\n\016PET_TYPE_SNAKE\020\003\022\024\n\020PET_TYPE_HAMSTER\020" + + "\0042\313\001\n\017PetStoreService\0229\n\006GetPet\022\025.pet.v1" + + ".GetPetRequest\032\026.pet.v1.GetPetResponse\"\000" + + "\0229\n\006PutPet\022\025.pet.v1.PutPetRequest\032\026.pet." + + "v1.PutPetResponse\"\000\022B\n\tDeletePet\022\030.pet.v" + + "1.DeletePetRequest\032\031.pet.v1.DeletePetRes" + + "ponse\"\000B\010Z\006pet/v1b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.type.DateTimeProto.getDescriptor(), + }); + internal_static_pet_v1_Pet_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_pet_v1_Pet_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pet_v1_Pet_descriptor, + new java.lang.String[] { "PetType", "PetId", "Name", "CreatedAt", }); + internal_static_pet_v1_GetPetRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_pet_v1_GetPetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pet_v1_GetPetRequest_descriptor, + new java.lang.String[] { "PetId", }); + internal_static_pet_v1_GetPetResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_pet_v1_GetPetResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pet_v1_GetPetResponse_descriptor, + new java.lang.String[] { "Pet", }); + internal_static_pet_v1_PutPetRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_pet_v1_PutPetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pet_v1_PutPetRequest_descriptor, + new java.lang.String[] { "PetType", "Name", }); + internal_static_pet_v1_PutPetResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_pet_v1_PutPetResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pet_v1_PutPetResponse_descriptor, + new java.lang.String[] { "Pet", }); + internal_static_pet_v1_DeletePetRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_pet_v1_DeletePetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pet_v1_DeletePetRequest_descriptor, + new java.lang.String[] { "PetId", }); + internal_static_pet_v1_DeletePetResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_pet_v1_DeletePetResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_pet_v1_DeletePetResponse_descriptor, + new java.lang.String[] { }); + com.google.type.DateTimeProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/gen/python/google/type/datetime_pb2.py b/gen/python/google/type/datetime_pb2.py new file mode 100644 index 0000000..a085542 --- /dev/null +++ b/gen/python/google/type/datetime_pb2.py @@ -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