com.zepben.protobuf.hc.opendss.LossesTotals Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of evolve-grpc Show documentation
Show all versions of evolve-grpc Show documentation
Protobuf and gRPC definitions for the evolve platform
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: zepben/protobuf/hc/opendss/Diagnostics.proto
package com.zepben.protobuf.hc.opendss;
/**
*
**
* Messages for streaming the losses report
*
*
* Protobuf type {@code zepben.protobuf.hc.opendss.LossesTotals}
*/
public final class LossesTotals extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:zepben.protobuf.hc.opendss.LossesTotals)
LossesTotalsOrBuilder {
private static final long serialVersionUID = 0L;
// Use LossesTotals.newBuilder() to construct.
private LossesTotals(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LossesTotals() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new LossesTotals();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.zepben.protobuf.hc.opendss.Diagnostics.internal_static_zepben_protobuf_hc_opendss_LossesTotals_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.zepben.protobuf.hc.opendss.Diagnostics.internal_static_zepben_protobuf_hc_opendss_LossesTotals_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.zepben.protobuf.hc.opendss.LossesTotals.class, com.zepben.protobuf.hc.opendss.LossesTotals.Builder.class);
}
public static final int LINELOSSES_FIELD_NUMBER = 1;
private double lineLosses_ = 0D;
/**
* double lineLosses = 1;
* @return The lineLosses.
*/
@java.lang.Override
public double getLineLosses() {
return lineLosses_;
}
public static final int TRANSFORMERLOSSES_FIELD_NUMBER = 2;
private double transformerLosses_ = 0D;
/**
* double transformerLosses = 2;
* @return The transformerLosses.
*/
@java.lang.Override
public double getTransformerLosses() {
return transformerLosses_;
}
public static final int TOTALLOSSES_FIELD_NUMBER = 3;
private double totalLosses_ = 0D;
/**
* double totalLosses = 3;
* @return The totalLosses.
*/
@java.lang.Override
public double getTotalLosses() {
return totalLosses_;
}
public static final int TOTALLOADPOWER_FIELD_NUMBER = 4;
private double totalLoadPower_ = 0D;
/**
* double totalLoadPower = 4;
* @return The totalLoadPower.
*/
@java.lang.Override
public double getTotalLoadPower() {
return totalLoadPower_;
}
public static final int TOTALPCTLOSSES_FIELD_NUMBER = 5;
private double totalPctLosses_ = 0D;
/**
* double totalPctLosses = 5;
* @return The totalPctLosses.
*/
@java.lang.Override
public double getTotalPctLosses() {
return totalPctLosses_;
}
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 (java.lang.Double.doubleToRawLongBits(lineLosses_) != 0) {
output.writeDouble(1, lineLosses_);
}
if (java.lang.Double.doubleToRawLongBits(transformerLosses_) != 0) {
output.writeDouble(2, transformerLosses_);
}
if (java.lang.Double.doubleToRawLongBits(totalLosses_) != 0) {
output.writeDouble(3, totalLosses_);
}
if (java.lang.Double.doubleToRawLongBits(totalLoadPower_) != 0) {
output.writeDouble(4, totalLoadPower_);
}
if (java.lang.Double.doubleToRawLongBits(totalPctLosses_) != 0) {
output.writeDouble(5, totalPctLosses_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (java.lang.Double.doubleToRawLongBits(lineLosses_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(1, lineLosses_);
}
if (java.lang.Double.doubleToRawLongBits(transformerLosses_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, transformerLosses_);
}
if (java.lang.Double.doubleToRawLongBits(totalLosses_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(3, totalLosses_);
}
if (java.lang.Double.doubleToRawLongBits(totalLoadPower_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(4, totalLoadPower_);
}
if (java.lang.Double.doubleToRawLongBits(totalPctLosses_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(5, totalPctLosses_);
}
size += getUnknownFields().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.zepben.protobuf.hc.opendss.LossesTotals)) {
return super.equals(obj);
}
com.zepben.protobuf.hc.opendss.LossesTotals other = (com.zepben.protobuf.hc.opendss.LossesTotals) obj;
if (java.lang.Double.doubleToLongBits(getLineLosses())
!= java.lang.Double.doubleToLongBits(
other.getLineLosses())) return false;
if (java.lang.Double.doubleToLongBits(getTransformerLosses())
!= java.lang.Double.doubleToLongBits(
other.getTransformerLosses())) return false;
if (java.lang.Double.doubleToLongBits(getTotalLosses())
!= java.lang.Double.doubleToLongBits(
other.getTotalLosses())) return false;
if (java.lang.Double.doubleToLongBits(getTotalLoadPower())
!= java.lang.Double.doubleToLongBits(
other.getTotalLoadPower())) return false;
if (java.lang.Double.doubleToLongBits(getTotalPctLosses())
!= java.lang.Double.doubleToLongBits(
other.getTotalPctLosses())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) 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) + LINELOSSES_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getLineLosses()));
hash = (37 * hash) + TRANSFORMERLOSSES_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getTransformerLosses()));
hash = (37 * hash) + TOTALLOSSES_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getTotalLosses()));
hash = (37 * hash) + TOTALLOADPOWER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getTotalLoadPower()));
hash = (37 * hash) + TOTALPCTLOSSES_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getTotalPctLosses()));
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.zepben.protobuf.hc.opendss.LossesTotals parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.zepben.protobuf.hc.opendss.LossesTotals parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.zepben.protobuf.hc.opendss.LossesTotals parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.zepben.protobuf.hc.opendss.LossesTotals parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.zepben.protobuf.hc.opendss.LossesTotals parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.zepben.protobuf.hc.opendss.LossesTotals parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.zepben.protobuf.hc.opendss.LossesTotals parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.zepben.protobuf.hc.opendss.LossesTotals 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.zepben.protobuf.hc.opendss.LossesTotals parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.zepben.protobuf.hc.opendss.LossesTotals 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.zepben.protobuf.hc.opendss.LossesTotals parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.zepben.protobuf.hc.opendss.LossesTotals 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.zepben.protobuf.hc.opendss.LossesTotals 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;
}
/**
*
**
* Messages for streaming the losses report
*
*
* Protobuf type {@code zepben.protobuf.hc.opendss.LossesTotals}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:zepben.protobuf.hc.opendss.LossesTotals)
com.zepben.protobuf.hc.opendss.LossesTotalsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.zepben.protobuf.hc.opendss.Diagnostics.internal_static_zepben_protobuf_hc_opendss_LossesTotals_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.zepben.protobuf.hc.opendss.Diagnostics.internal_static_zepben_protobuf_hc_opendss_LossesTotals_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.zepben.protobuf.hc.opendss.LossesTotals.class, com.zepben.protobuf.hc.opendss.LossesTotals.Builder.class);
}
// Construct using com.zepben.protobuf.hc.opendss.LossesTotals.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
lineLosses_ = 0D;
transformerLosses_ = 0D;
totalLosses_ = 0D;
totalLoadPower_ = 0D;
totalPctLosses_ = 0D;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.zepben.protobuf.hc.opendss.Diagnostics.internal_static_zepben_protobuf_hc_opendss_LossesTotals_descriptor;
}
@java.lang.Override
public com.zepben.protobuf.hc.opendss.LossesTotals getDefaultInstanceForType() {
return com.zepben.protobuf.hc.opendss.LossesTotals.getDefaultInstance();
}
@java.lang.Override
public com.zepben.protobuf.hc.opendss.LossesTotals build() {
com.zepben.protobuf.hc.opendss.LossesTotals result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.zepben.protobuf.hc.opendss.LossesTotals buildPartial() {
com.zepben.protobuf.hc.opendss.LossesTotals result = new com.zepben.protobuf.hc.opendss.LossesTotals(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.zepben.protobuf.hc.opendss.LossesTotals result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.lineLosses_ = lineLosses_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.transformerLosses_ = transformerLosses_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.totalLosses_ = totalLosses_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.totalLoadPower_ = totalLoadPower_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.totalPctLosses_ = totalPctLosses_;
}
}
@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.zepben.protobuf.hc.opendss.LossesTotals) {
return mergeFrom((com.zepben.protobuf.hc.opendss.LossesTotals)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.zepben.protobuf.hc.opendss.LossesTotals other) {
if (other == com.zepben.protobuf.hc.opendss.LossesTotals.getDefaultInstance()) return this;
if (other.getLineLosses() != 0D) {
setLineLosses(other.getLineLosses());
}
if (other.getTransformerLosses() != 0D) {
setTransformerLosses(other.getTransformerLosses());
}
if (other.getTotalLosses() != 0D) {
setTotalLosses(other.getTotalLosses());
}
if (other.getTotalLoadPower() != 0D) {
setTotalLoadPower(other.getTotalLoadPower());
}
if (other.getTotalPctLosses() != 0D) {
setTotalPctLosses(other.getTotalPctLosses());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 9: {
lineLosses_ = input.readDouble();
bitField0_ |= 0x00000001;
break;
} // case 9
case 17: {
transformerLosses_ = input.readDouble();
bitField0_ |= 0x00000002;
break;
} // case 17
case 25: {
totalLosses_ = input.readDouble();
bitField0_ |= 0x00000004;
break;
} // case 25
case 33: {
totalLoadPower_ = input.readDouble();
bitField0_ |= 0x00000008;
break;
} // case 33
case 41: {
totalPctLosses_ = input.readDouble();
bitField0_ |= 0x00000010;
break;
} // case 41
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private double lineLosses_ ;
/**
* double lineLosses = 1;
* @return The lineLosses.
*/
@java.lang.Override
public double getLineLosses() {
return lineLosses_;
}
/**
* double lineLosses = 1;
* @param value The lineLosses to set.
* @return This builder for chaining.
*/
public Builder setLineLosses(double value) {
lineLosses_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* double lineLosses = 1;
* @return This builder for chaining.
*/
public Builder clearLineLosses() {
bitField0_ = (bitField0_ & ~0x00000001);
lineLosses_ = 0D;
onChanged();
return this;
}
private double transformerLosses_ ;
/**
* double transformerLosses = 2;
* @return The transformerLosses.
*/
@java.lang.Override
public double getTransformerLosses() {
return transformerLosses_;
}
/**
* double transformerLosses = 2;
* @param value The transformerLosses to set.
* @return This builder for chaining.
*/
public Builder setTransformerLosses(double value) {
transformerLosses_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* double transformerLosses = 2;
* @return This builder for chaining.
*/
public Builder clearTransformerLosses() {
bitField0_ = (bitField0_ & ~0x00000002);
transformerLosses_ = 0D;
onChanged();
return this;
}
private double totalLosses_ ;
/**
* double totalLosses = 3;
* @return The totalLosses.
*/
@java.lang.Override
public double getTotalLosses() {
return totalLosses_;
}
/**
* double totalLosses = 3;
* @param value The totalLosses to set.
* @return This builder for chaining.
*/
public Builder setTotalLosses(double value) {
totalLosses_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* double totalLosses = 3;
* @return This builder for chaining.
*/
public Builder clearTotalLosses() {
bitField0_ = (bitField0_ & ~0x00000004);
totalLosses_ = 0D;
onChanged();
return this;
}
private double totalLoadPower_ ;
/**
* double totalLoadPower = 4;
* @return The totalLoadPower.
*/
@java.lang.Override
public double getTotalLoadPower() {
return totalLoadPower_;
}
/**
* double totalLoadPower = 4;
* @param value The totalLoadPower to set.
* @return This builder for chaining.
*/
public Builder setTotalLoadPower(double value) {
totalLoadPower_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* double totalLoadPower = 4;
* @return This builder for chaining.
*/
public Builder clearTotalLoadPower() {
bitField0_ = (bitField0_ & ~0x00000008);
totalLoadPower_ = 0D;
onChanged();
return this;
}
private double totalPctLosses_ ;
/**
* double totalPctLosses = 5;
* @return The totalPctLosses.
*/
@java.lang.Override
public double getTotalPctLosses() {
return totalPctLosses_;
}
/**
* double totalPctLosses = 5;
* @param value The totalPctLosses to set.
* @return This builder for chaining.
*/
public Builder setTotalPctLosses(double value) {
totalPctLosses_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* double totalPctLosses = 5;
* @return This builder for chaining.
*/
public Builder clearTotalPctLosses() {
bitField0_ = (bitField0_ & ~0x00000010);
totalPctLosses_ = 0D;
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:zepben.protobuf.hc.opendss.LossesTotals)
}
// @@protoc_insertion_point(class_scope:zepben.protobuf.hc.opendss.LossesTotals)
private static final com.zepben.protobuf.hc.opendss.LossesTotals DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.zepben.protobuf.hc.opendss.LossesTotals();
}
public static com.zepben.protobuf.hc.opendss.LossesTotals getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LossesTotals parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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.zepben.protobuf.hc.opendss.LossesTotals getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}