com.zepben.protobuf.hc.opendss.IsolatedArea 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;
/**
*
**
* Message for one specific isolated area report (a level/id, line, and the related loads)
*
*
* Protobuf type {@code zepben.protobuf.hc.opendss.IsolatedArea}
*/
public final class IsolatedArea extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:zepben.protobuf.hc.opendss.IsolatedArea)
IsolatedAreaOrBuilder {
private static final long serialVersionUID = 0L;
// Use IsolatedArea.newBuilder() to construct.
private IsolatedArea(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private IsolatedArea() {
element_ = "";
loads_ =
com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new IsolatedArea();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.zepben.protobuf.hc.opendss.Diagnostics.internal_static_zepben_protobuf_hc_opendss_IsolatedArea_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.zepben.protobuf.hc.opendss.Diagnostics.internal_static_zepben_protobuf_hc_opendss_IsolatedArea_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.zepben.protobuf.hc.opendss.IsolatedArea.class, com.zepben.protobuf.hc.opendss.IsolatedArea.Builder.class);
}
public static final int LEVEL_FIELD_NUMBER = 1;
private int level_ = 0;
/**
* int32 level = 1;
* @return The level.
*/
@java.lang.Override
public int getLevel() {
return level_;
}
public static final int ELEMENT_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object element_ = "";
/**
* string element = 2;
* @return The element.
*/
@java.lang.Override
public java.lang.String getElement() {
java.lang.Object ref = element_;
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();
element_ = s;
return s;
}
}
/**
* string element = 2;
* @return The bytes for element.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getElementBytes() {
java.lang.Object ref = element_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
element_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LOADS_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList loads_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
* repeated string loads = 3;
* @return A list containing the loads.
*/
public com.google.protobuf.ProtocolStringList
getLoadsList() {
return loads_;
}
/**
* repeated string loads = 3;
* @return The count of loads.
*/
public int getLoadsCount() {
return loads_.size();
}
/**
* repeated string loads = 3;
* @param index The index of the element to return.
* @return The loads at the given index.
*/
public java.lang.String getLoads(int index) {
return loads_.get(index);
}
/**
* repeated string loads = 3;
* @param index The index of the value to return.
* @return The bytes of the loads at the given index.
*/
public com.google.protobuf.ByteString
getLoadsBytes(int index) {
return loads_.getByteString(index);
}
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 (level_ != 0) {
output.writeInt32(1, level_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(element_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, element_);
}
for (int i = 0; i < loads_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, loads_.getRaw(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (level_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, level_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(element_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, element_);
}
{
int dataSize = 0;
for (int i = 0; i < loads_.size(); i++) {
dataSize += computeStringSizeNoTag(loads_.getRaw(i));
}
size += dataSize;
size += 1 * getLoadsList().size();
}
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.IsolatedArea)) {
return super.equals(obj);
}
com.zepben.protobuf.hc.opendss.IsolatedArea other = (com.zepben.protobuf.hc.opendss.IsolatedArea) obj;
if (getLevel()
!= other.getLevel()) return false;
if (!getElement()
.equals(other.getElement())) return false;
if (!getLoadsList()
.equals(other.getLoadsList())) 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) + LEVEL_FIELD_NUMBER;
hash = (53 * hash) + getLevel();
hash = (37 * hash) + ELEMENT_FIELD_NUMBER;
hash = (53 * hash) + getElement().hashCode();
if (getLoadsCount() > 0) {
hash = (37 * hash) + LOADS_FIELD_NUMBER;
hash = (53 * hash) + getLoadsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.zepben.protobuf.hc.opendss.IsolatedArea parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.zepben.protobuf.hc.opendss.IsolatedArea 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.IsolatedArea parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.zepben.protobuf.hc.opendss.IsolatedArea 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.IsolatedArea parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.zepben.protobuf.hc.opendss.IsolatedArea 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.IsolatedArea parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.zepben.protobuf.hc.opendss.IsolatedArea 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.IsolatedArea parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.zepben.protobuf.hc.opendss.IsolatedArea 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.IsolatedArea 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.IsolatedArea 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.IsolatedArea 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;
}
/**
*
**
* Message for one specific isolated area report (a level/id, line, and the related loads)
*
*
* Protobuf type {@code zepben.protobuf.hc.opendss.IsolatedArea}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:zepben.protobuf.hc.opendss.IsolatedArea)
com.zepben.protobuf.hc.opendss.IsolatedAreaOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.zepben.protobuf.hc.opendss.Diagnostics.internal_static_zepben_protobuf_hc_opendss_IsolatedArea_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.zepben.protobuf.hc.opendss.Diagnostics.internal_static_zepben_protobuf_hc_opendss_IsolatedArea_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.zepben.protobuf.hc.opendss.IsolatedArea.class, com.zepben.protobuf.hc.opendss.IsolatedArea.Builder.class);
}
// Construct using com.zepben.protobuf.hc.opendss.IsolatedArea.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
level_ = 0;
element_ = "";
loads_ =
com.google.protobuf.LazyStringArrayList.emptyList();
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_IsolatedArea_descriptor;
}
@java.lang.Override
public com.zepben.protobuf.hc.opendss.IsolatedArea getDefaultInstanceForType() {
return com.zepben.protobuf.hc.opendss.IsolatedArea.getDefaultInstance();
}
@java.lang.Override
public com.zepben.protobuf.hc.opendss.IsolatedArea build() {
com.zepben.protobuf.hc.opendss.IsolatedArea result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.zepben.protobuf.hc.opendss.IsolatedArea buildPartial() {
com.zepben.protobuf.hc.opendss.IsolatedArea result = new com.zepben.protobuf.hc.opendss.IsolatedArea(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.zepben.protobuf.hc.opendss.IsolatedArea result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.level_ = level_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.element_ = element_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
loads_.makeImmutable();
result.loads_ = loads_;
}
}
@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.IsolatedArea) {
return mergeFrom((com.zepben.protobuf.hc.opendss.IsolatedArea)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.zepben.protobuf.hc.opendss.IsolatedArea other) {
if (other == com.zepben.protobuf.hc.opendss.IsolatedArea.getDefaultInstance()) return this;
if (other.getLevel() != 0) {
setLevel(other.getLevel());
}
if (!other.getElement().isEmpty()) {
element_ = other.element_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.loads_.isEmpty()) {
if (loads_.isEmpty()) {
loads_ = other.loads_;
bitField0_ |= 0x00000004;
} else {
ensureLoadsIsMutable();
loads_.addAll(other.loads_);
}
onChanged();
}
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 8: {
level_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
element_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
java.lang.String s = input.readStringRequireUtf8();
ensureLoadsIsMutable();
loads_.add(s);
break;
} // case 26
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 int level_ ;
/**
* int32 level = 1;
* @return The level.
*/
@java.lang.Override
public int getLevel() {
return level_;
}
/**
* int32 level = 1;
* @param value The level to set.
* @return This builder for chaining.
*/
public Builder setLevel(int value) {
level_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* int32 level = 1;
* @return This builder for chaining.
*/
public Builder clearLevel() {
bitField0_ = (bitField0_ & ~0x00000001);
level_ = 0;
onChanged();
return this;
}
private java.lang.Object element_ = "";
/**
* string element = 2;
* @return The element.
*/
public java.lang.String getElement() {
java.lang.Object ref = element_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
element_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string element = 2;
* @return The bytes for element.
*/
public com.google.protobuf.ByteString
getElementBytes() {
java.lang.Object ref = element_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
element_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string element = 2;
* @param value The element to set.
* @return This builder for chaining.
*/
public Builder setElement(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
element_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* string element = 2;
* @return This builder for chaining.
*/
public Builder clearElement() {
element_ = getDefaultInstance().getElement();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* string element = 2;
* @param value The bytes for element to set.
* @return This builder for chaining.
*/
public Builder setElementBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
element_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList loads_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureLoadsIsMutable() {
if (!loads_.isModifiable()) {
loads_ = new com.google.protobuf.LazyStringArrayList(loads_);
}
bitField0_ |= 0x00000004;
}
/**
* repeated string loads = 3;
* @return A list containing the loads.
*/
public com.google.protobuf.ProtocolStringList
getLoadsList() {
loads_.makeImmutable();
return loads_;
}
/**
* repeated string loads = 3;
* @return The count of loads.
*/
public int getLoadsCount() {
return loads_.size();
}
/**
* repeated string loads = 3;
* @param index The index of the element to return.
* @return The loads at the given index.
*/
public java.lang.String getLoads(int index) {
return loads_.get(index);
}
/**
* repeated string loads = 3;
* @param index The index of the value to return.
* @return The bytes of the loads at the given index.
*/
public com.google.protobuf.ByteString
getLoadsBytes(int index) {
return loads_.getByteString(index);
}
/**
* repeated string loads = 3;
* @param index The index to set the value at.
* @param value The loads to set.
* @return This builder for chaining.
*/
public Builder setLoads(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureLoadsIsMutable();
loads_.set(index, value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* repeated string loads = 3;
* @param value The loads to add.
* @return This builder for chaining.
*/
public Builder addLoads(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureLoadsIsMutable();
loads_.add(value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* repeated string loads = 3;
* @param values The loads to add.
* @return This builder for chaining.
*/
public Builder addAllLoads(
java.lang.Iterable values) {
ensureLoadsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, loads_);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* repeated string loads = 3;
* @return This builder for chaining.
*/
public Builder clearLoads() {
loads_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);;
onChanged();
return this;
}
/**
* repeated string loads = 3;
* @param value The bytes of the loads to add.
* @return This builder for chaining.
*/
public Builder addLoadsBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensureLoadsIsMutable();
loads_.add(value);
bitField0_ |= 0x00000004;
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.IsolatedArea)
}
// @@protoc_insertion_point(class_scope:zepben.protobuf.hc.opendss.IsolatedArea)
private static final com.zepben.protobuf.hc.opendss.IsolatedArea DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.zepben.protobuf.hc.opendss.IsolatedArea();
}
public static com.zepben.protobuf.hc.opendss.IsolatedArea getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public IsolatedArea 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.IsolatedArea getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}