using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace Tango.BL
{
public abstract class ObservableEntityDTO<DTO, T> : IObservableEntityDTO, IEquatable<T> where T : IObservableEntity where DTO : ObservableEntityDTO<DTO, T>
{
public int ID { get; set; }
public String Guid { get; set; }
public DateTime LastUpdated { get; set; }
public static DTO FromObservable(T observable)
{
if (observable == null) return null;
var dto = Activator.CreateInstance<DTO>();
foreach (var prop in typeof(DTO).GetProperties())
{
var observableProp = typeof(T).GetProperty(prop.Name);
if (observableProp != null)
{
if (prop.PropertyType.IsPrimitive || prop.PropertyType.IsValueType || prop.PropertyType == typeof(String))
{
prop.SetValue(dto, observableProp.GetValue(observable));
}
else if (!prop.PropertyType.IsGenericType)
{
prop.SetValue(dto, prop.PropertyType.GetMethod(nameof(FromObservable), BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy).Invoke(null, new object[] { observableProp.GetValue(observable) }));
}
else
{
IList collection = Activator.CreateInstance(prop.PropertyType) as IList;
IList source = observableProp.GetValue(observable) as IList;
foreach (var item in source)
{
collection.Add(prop.PropertyType.GenericTypeArguments[0].GetMethod(nameof(FromObservable), BindingFlags.NonPublic | BindingFlags.Public |// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: StubHeatingTestResponse.proto
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "StubHeatingTestResponse.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
namespace Tango {
namespace PMR {
namespace Stubs {
class StubHeatingTestResponseDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<StubHeatingTestResponse>
_instance;
} _StubHeatingTestResponse_default_instance_;
namespace protobuf_StubHeatingTestResponse_2eproto {
namespace {
::google::protobuf::Metadata file_level_metadata[1];
} // namespace
PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField
const TableStruct::entries[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
{0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0},
};
PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField
const TableStruct::aux[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
::google::protobuf::internal::AuxillaryParseTableField(),
};
PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const
TableStruct::schema[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
{ NULL, NULL, 0, -1, -1, -1, -1, NULL, false },
};
const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StubHeatingTestResponse, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StubHeatingTestResponse, heatergroupid_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StubHeatingTestResponse, zone1temp_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StubHeatingTestResponse, zone2temp_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StubHeatingTestResponse, heater1active_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StubHeatingTestResponse, heater2active_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StubHeatingTestResponse, heater1percentage_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StubHeatingTestResponse, heater2percentage_),
};
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(StubHeatingTestResponse)},
};
static ::google::protobuf::Message const * const file_default_instances[] = {
reinterpret_cast<const ::google::protobuf::Message*>(&_StubHeatingTestResponse_default_instance_),
};
namespace {
void protobuf_AssignDescriptors() {
AddDescriptors();
::google::protobuf::MessageFactory* factory = NULL;
AssignDescriptors(
"StubHeatingTestResponse.proto", schemas, file_default_instances, TableStruct::offsets, factory,
file_level_metadata, NULL, NULL);
}
void protobuf_AssignDescriptorsOnce() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
}
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD;
void protobuf_RegisterTypes(const ::std::string&) {
protobuf_AssignDescriptorsOnce();
::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1);
}
} // namespace
void TableStruct::InitDefaultsImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::internal::InitProtobufDefaults();
_StubHeatingTestResponse_default_instance_._instance.DefaultConstruct();
::google::protobuf::internal::OnShutdownDestroyMessage(
&_StubHeatingTestResponse_default_instance_);}
void InitDefaults() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl);
}
namespace {
void AddDescriptorsImpl() {
InitDefaults();
static const char descriptor[] GOOGLE_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
"\n\035StubHeatingTestResponse.proto\022\017Tango.P"
"MR.Stubs\"\272\001\n\027StubHeatingTestResponse\022\025\n\r"
"HeaterGroupId\030\001 \001(\r\022\021\n\tZone1Temp\030\002 \001(\r\022\021"
"\n\tZone2Temp\030\003 \001(\r\022\025\n\rHeater1Active\030\004 \001(\010"
"\022\025\n\rHeater2Active\030\005 \001(\010\022\031\n\021Heater1Percen"
"tage\030\006 \001(\r\022\031\n\021Heater2Percentage\030\007 \001(\rB\033\n"
"\031com.twine.tango.pmr.stubsb\006proto3"
};
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
descriptor, 274);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"StubHeatingTestResponse.proto", &protobuf_RegisterTypes);
}
} // anonymous namespace
void AddDescriptors() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
}
// Force AddDescriptors() to be called at dynamic initialization time.
struct StaticDescriptorInitializer {
StaticDescriptorInitializer() {
AddDescriptors();
}
} static_descriptor_initializer;
} // namespace protobuf_StubHeatingTestResponse_2eproto
// ===================================================================
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int StubHeatingTestResponse::kHeaterGroupIdFieldNumber;
const int StubHeatingTestResponse::kZone1TempFieldNumber;
const int StubHeatingTestResponse::kZone2TempFieldNumber;
const int StubHeatingTestResponse::kHeater1ActiveFieldNumber;
const int StubHeatingTestResponse::kHeater2ActiveFieldNumber;
const int StubHeatingTestResponse::kHeater1PercentageFieldNumber;
const int StubHeatingTestResponse::kHeater2PercentageFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
StubHeatingTestResponse::StubHeatingTestResponse()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
protobuf_StubHeatingTestResponse_2eproto::InitDefaults();
}
SharedCtor();
// @@protoc_insertion_point(constructor:Tango.PMR.Stubs.StubHeatingTestResponse)
}
StubHeatingTestResponse::StubHeatingTestResponse(const StubHeatingTestResponse& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
::memcpy(&heatergroupid_, &from.heatergroupid_,
static_cast<size_t>(reinterpret_cast<char*>(&heater2percentage_) -
reinterpret_cast<char*>(&heatergroupid_)) + sizeof(heater2percentage_));
// @@protoc_insertion_point(copy_constructor:Tango.PMR.Stubs.StubHeatingTestResponse)
}
void StubHeatingTestResponse::SharedCtor() {
::memset(&heatergroupid_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&heater2percentage_) -
reinterpret_cast<char*>(&heatergroupid_)) + sizeof(heater2percentage_));
_cached_size_ = 0;
}
StubHeatingTestResponse::~StubHeatingTestResponse() {
// @@protoc_insertion_point(destructor:Tango.PMR.Stubs.StubHeatingTestResponse)
SharedDtor();
}
void StubHeatingTestResponse::SharedDtor() {
}
void StubHeatingTestResponse::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* StubHeatingTestResponse::descriptor() {
protobuf_StubHeatingTestResponse_2eproto::protobuf_AssignDescriptorsOnce();
return protobuf_StubHeatingTestResponse_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const StubHeatingTestResponse& StubHeatingTestResponse::default_instance() {
protobuf_StubHeatingTestResponse_2eproto::InitDefaults();
return *internal_default_instance();
}
StubHeatingTestResponse* StubHeatingTestResponse::New(::google::protobuf::Arena* arena) const {
StubHeatingTestResponse* n = new StubHeatingTestResponse;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void StubHeatingTestResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:Tango.PMR.Stubs.StubHeatingTestResponse)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
::memset(&heatergroupid_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&heater2percentage_) -
reinterpret_cast<char*>(&heatergroupid_)) + sizeof(heater2percentage_));
_internal_metadata_.Clear();
}
bool StubHeatingTestResponse::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:Tango.PMR.Stubs.StubHeatingTestResponse)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// uint32 HeaterGroupId = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &heatergroupid_)));
} else {
goto handle_unusual;
}
break;
}
// uint32 Zone1Temp = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &zone1temp_)));
} else {
goto handle_unusual;
}
break;
}
// uint32 Zone2Temp = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &zone2temp_)));
} else {
goto handle_unusual;
}
break;
}
// bool Heater1Active = 4;
case 4: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &heater1active_)));
} else {
goto handle_unusual;
}
break;
}
// bool Heater2Active = 5;
case 5: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &heater2active_)));
} else {
goto handle_unusual;
}
break;
}
// uint32 Heater1Percentage = 6;
case 6: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &heater1percentage_)));
} else {
goto handle_unusual;
}
break;
}
// uint32 Heater2Percentage = 7;
case 7: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &heater2percentage_)));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:Tango.PMR.Stubs.StubHeatingTestResponse)
return true;
failure:
// @@protoc_insertion_point(parse_failure:Tango.PMR.Stubs.StubHeatingTestResponse)
return false;
#undef DO_
}
void StubHeatingTestResponse::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:Tango.PMR.Stubs.StubHeatingTestResponse)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// uint32 HeaterGroupId = 1;
if (this->heatergroupid() != 0) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->heatergroupid(), output);
}
// uint32 Zone1Temp = 2;
if (this->zone1temp() != 0) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->zone1temp(), output);
}
// uint32 Zone2Temp = 3;
if (this->zone2temp() != 0) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->zone2temp(), output);
}
// bool Heater1Active = 4;
if (this->heater1active() != 0) {
::google::protobuf::internal::WireFormatLite::WriteBool(4, this->heater1active(), output);
}
// bool Heater2Active = 5;
if (this->heater2active() != 0) {
::google::protobuf::internal::WireFormatLite::WriteBool(5, this->heater2active(), output);
}
// uint32 Heater1Percentage = 6;
if (this->heater1percentage() != 0) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(6, this->heater1percentage(), output);
}
// uint32 Heater2Percentage = 7;
if (this->heater2percentage() != 0) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(7, this->heater2percentage(), output);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
}
// @@protoc_insertion_point(serialize_end:Tango.PMR.Stubs.StubHeatingTestResponse)
}
::google::protobuf::uint8* StubHeatingTestResponse::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:Tango.PMR.Stubs.StubHeatingTestResponse)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// uint32 HeaterGroupId = 1;
if (this->heatergroupid() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->heatergroupid(), target);
}
// uint32 Zone1Temp = 2;
if (this->zone1temp() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->zone1temp(), target);
}
// uint32 Zone2Temp = 3;
if (this->zone2temp() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->zone2temp(), target);
}
// bool Heater1Active = 4;
if (this->heater1active() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, this->heater1active(), target);
}
// bool Heater2Active = 5;
if (this->heater2active() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->heater2active(), target);
}
// uint32 Heater1Percentage = 6;
if (this->heater1percentage() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(6, this->heater1percentage(), target);
}
// uint32 Heater2Percentage = 7;
if (this->heater2percentage() != 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(7, this->heater2percentage(), target);
}
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:Tango.PMR.Stubs.StubHeatingTestResponse)
return target;
}
size_t StubHeatingTestResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:Tango.PMR.Stubs.StubHeatingTestResponse)
size_t total_size = 0;
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
}
// uint32 HeaterGroupId = 1;
if (this->heatergroupid() != 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->heatergroupid());
}
// uint32 Zone1Temp = 2;
if (this->zone1temp() != 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->zone1temp());
}
// uint32 Zone2Temp = 3;
if (this->zone2temp() != 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->zone2temp());
}
// bool Heater1Active = 4;
if (this->heater1active() != 0) {
total_size += 1 + 1;
}
// bool Heater2Active = 5;
if (this->heater2active() != 0) {
total_size += 1 + 1;
}
// uint32 Heater1Percentage = 6;
if (this->heater1percentage() != 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->heater1percentage());
}
// uint32 Heater2Percentage = 7;
if (this->heater2percentage() != 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->heater2percentage());
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void StubHeatingTestResponse::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:Tango.PMR.Stubs.StubHeatingTestResponse)
GOOGLE_DCHECK_NE(&from, this);
const StubHeatingTestResponse* source =
::google::protobuf::internal::DynamicCastToGenerated<const StubHeatingTestResponse>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:Tango.PMR.Stubs.StubHeatingTestResponse)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:Tango.PMR.Stubs.StubHeatingTestResponse)
MergeFrom(*source);
}
}
void StubHeatingTestResponse::MergeFrom(const StubHeatingTestResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:Tango.PMR.Stubs.StubHeatingTestResponse)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.heatergroupid() != 0) {
set_heatergroupid(from.heatergroupid());
}
if (from.zone1temp() != 0) {
set_zone1temp(from.zone1temp());
}
if (from.zone2temp() != 0) {
set_zone2temp(from.zone2temp());
}
if (from.heater1active() != 0) {
set_heater1active(from.heater1active());
}
if (from.heater2active() != 0) {
set_heater2active(from.heater2active());
}
if (from.heater1percentage() != 0) {
set_heater1percentage(from.heater1percentage());
}
if (from.heater2percentage() != 0) {
set_heater2percentage(from.heater2percentage());
}
}
void StubHeatingTestResponse::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:Tango.PMR.Stubs.StubHeatingTestResponse)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void StubHeatingTestResponse::CopyFrom(const StubHeatingTestResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:Tango.PMR.Stubs.StubHeatingTestResponse)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool StubHeatingTestResponse::IsInitialized() const {
return true;
}
void StubHeatingTestResponse::Swap(StubHeatingTestResponse* other) {
if (other == this) return;
InternalSwap(other);
}
void StubHeatingTestResponse::InternalSwap(StubHeatingTestResponse* other) {
using std::swap;
swap(heatergroupid_, other->heatergroupid_);
swap(zone1temp_, other->zone1temp_);
swap(zone2temp_, other->zone2temp_);
swap(heater1active_, other->heater1active_);
swap(heater2active_, other->heater2active_);
swap(heater1percentage_, other->heater1percentage_);
swap(heater2percentage_, other->heater2percentage_);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata StubHeatingTestResponse::GetMetadata() const {
protobuf_StubHeatingTestResponse_2eproto::protobuf_AssignDescriptorsOnce();
return protobuf_StubHeatingTestResponse_2eproto::file_level_metadata[kIndexInFileMessages];
}
#if PROTOBUF_INLINE_NOT_IN_HEADERS
// StubHeatingTestResponse
// uint32 HeaterGroupId = 1;
void StubHeatingTestResponse::clear_heatergroupid() {
heatergroupid_ = 0u;
}
::google::protobuf::uint32 StubHeatingTestResponse::heatergroupid() const {
// @@protoc_insertion_point(field_get:Tango.PMR.Stubs.StubHeatingTestResponse.HeaterGroupId)
return heatergroupid_;
}
void StubHeatingTestResponse::set_heatergroupid(::google::protobuf::uint32 value) {
heatergroupid_ = value;
// @@protoc_insertion_point(field_set:Tango.PMR.Stubs.StubHeatingTestResponse.HeaterGroupId)
}
// uint32 Zone1Temp = 2;
void StubHeatingTestResponse::clear_zone1temp() {
zone1temp_ = 0u;
}
::google::protobuf::uint32 StubHeatingTestResponse::zone1temp() const {
// @@protoc_insertion_point(field_get:Tango.PMR.Stubs.StubHeatingTestResponse.Zone1Temp)
return zone1temp_;
}
void StubHeatingTestResponse::set_zone1temp(::google::protobuf::uint32 value) {
zone1temp_ = value;
// @@protoc_insertion_point(field_set:Tango.PMR.Stubs.StubHeatingTestResponse.Zone1Temp)
}
// uint32 Zone2Temp = 3;
void StubHeatingTestResponse::clear_zone2temp() {
zone2temp_ = 0u;
}
::google::protobuf::uint32 StubHeatingTestResponse::zone2temp() const {
// @@protoc_insertion_point(field_get:Tango.PMR.Stubs.StubHeatingTestResponse.Zone2Temp)
return zone2temp_;
}
void StubHeatingTestResponse::set_zone2temp(::google::protobuf::uint32 value) {
zone2temp_ = value;
// @@protoc_insertion_point(field_set:Tango.PMR.Stubs.StubHeatingTestResponse.Zone2Temp)
}
// bool Heater1Active = 4;
void StubHeatingTestResponse::clear_heater1active() {
heater1active_ = false;
}
bool StubHeatingTestResponse::heater1active() const {
// @@protoc_insertion_point(field_get:Tango.PMR.Stubs.StubHeatingTestResponse.Heater1Active)
return heater1active_;
}
void StubHeatingTestResponse::set_heater1active(bool value) {
heater1active_ = value;
// @@protoc_insertion_point(field_set:Tango.PMR.Stubs.StubHeatingTestResponse.Heater1Active)
}
// bool Heater2Active = 5;
void StubHeatingTestResponse::clear_heater2active() {
heater2active_ = false;
}
bool StubHeatingTestResponse::heater2active() const {
// @@protoc_insertion_point(field_get:Tango.PMR.Stubs.StubHeatingTestResponse.Heater2Active)
return heater2active_;
}
void StubHeatingTestResponse::set_heater2active(bool value) {
heater2active_ = value;
// @@protoc_insertion_point(field_set:Tango.PMR.Stubs.StubHeatingTestResponse.Heater2Active)
}
// uint32 Heater1Percentage = 6;
void StubHeatingTestResponse::clear_heater1percentage() {
heater1percentage_ = 0u;
}
::google::protobuf::uint32 StubHeatingTestResponse::heater1percentage() const {
// @@protoc_insertion_point(field_get:Tango.PMR.Stubs.StubHeatingTestResponse.Heater1Percentage)
return heater1percentage_;
}
void StubHeatingTestResponse::set_heater1percentage(::google::protobuf::uint32 value) {
heater1percentage_ = value;
// @@protoc_insertion_point(field_set:Tango.PMR.Stubs.StubHeatingTestResponse.Heater1Percentage)
}
// uint32 Heater2Percentage = 7;
void StubHeatingTestResponse::clear_heater2percentage() {
heater2percentage_ = 0u;
}
::google::protobuf::uint32 StubHeatingTestResponse::heater2percentage() const {
// @@protoc_insertion_point(field_get:Tango.PMR.Stubs.StubHeatingTestResponse.Heater2Percentage)
return heater2percentage_;
}
void StubHeatingTestResponse::set_heater2percentage(::google::protobuf::uint32 value) {
heater2percentage_ = value;
// @@protoc_insertion_point(field_set:Tango.PMR.Stubs.StubHeatingTestResponse.Heater2Percentage)
}
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
// @@protoc_insertion_point(namespace_scope)
} // namespace Stubs
} // namespace PMR
} // namespace Tango
// @@protoc_insertion_point(global_scope)