All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.zepben.protobuf.hc.opendss.MaybeModel Maven / Gradle / Ivy

There is a newer version: 0.32.0-SNAPSHOT2
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: zepben/protobuf/hc/opendss/Model.proto

package com.zepben.protobuf.hc.opendss;

/**
 * 
 **
 * Nullable model message. Useful for signalling the end of a sequence of models to process.
 * 
* * Protobuf type {@code zepben.protobuf.hc.opendss.MaybeModel} */ public final class MaybeModel extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:zepben.protobuf.hc.opendss.MaybeModel) MaybeModelOrBuilder { private static final long serialVersionUID = 0L; // Use MaybeModel.newBuilder() to construct. private MaybeModel(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private MaybeModel() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new MaybeModel(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.zepben.protobuf.hc.opendss.ModelOuterClass.internal_static_zepben_protobuf_hc_opendss_MaybeModel_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.zepben.protobuf.hc.opendss.ModelOuterClass.internal_static_zepben_protobuf_hc_opendss_MaybeModel_fieldAccessorTable .ensureFieldAccessorsInitialized( com.zepben.protobuf.hc.opendss.MaybeModel.class, com.zepben.protobuf.hc.opendss.MaybeModel.Builder.class); } private int modelCase_ = 0; @SuppressWarnings("serial") private java.lang.Object model_; public enum ModelCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { MODELNULL(1), MODELSET(2), MODEL_NOT_SET(0); private final int value; private ModelCase(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 ModelCase valueOf(int value) { return forNumber(value); } public static ModelCase forNumber(int value) { switch (value) { case 1: return MODELNULL; case 2: return MODELSET; case 0: return MODEL_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public ModelCase getModelCase() { return ModelCase.forNumber( modelCase_); } public static final int MODELNULL_FIELD_NUMBER = 1; /** * .google.protobuf.NullValue modelNull = 1; * @return Whether the modelNull field is set. */ public boolean hasModelNull() { return modelCase_ == 1; } /** * .google.protobuf.NullValue modelNull = 1; * @return The enum numeric value on the wire for modelNull. */ public int getModelNullValue() { if (modelCase_ == 1) { return (java.lang.Integer) model_; } return 0; } /** * .google.protobuf.NullValue modelNull = 1; * @return The modelNull. */ public com.google.protobuf.NullValue getModelNull() { if (modelCase_ == 1) { com.google.protobuf.NullValue result = com.google.protobuf.NullValue.forNumber( (java.lang.Integer) model_); return result == null ? com.google.protobuf.NullValue.UNRECOGNIZED : result; } return com.google.protobuf.NullValue.NULL_VALUE; } public static final int MODELSET_FIELD_NUMBER = 2; /** * .zepben.protobuf.hc.opendss.Model modelSet = 2; * @return Whether the modelSet field is set. */ @java.lang.Override public boolean hasModelSet() { return modelCase_ == 2; } /** * .zepben.protobuf.hc.opendss.Model modelSet = 2; * @return The modelSet. */ @java.lang.Override public com.zepben.protobuf.hc.opendss.Model getModelSet() { if (modelCase_ == 2) { return (com.zepben.protobuf.hc.opendss.Model) model_; } return com.zepben.protobuf.hc.opendss.Model.getDefaultInstance(); } /** * .zepben.protobuf.hc.opendss.Model modelSet = 2; */ @java.lang.Override public com.zepben.protobuf.hc.opendss.ModelOrBuilder getModelSetOrBuilder() { if (modelCase_ == 2) { return (com.zepben.protobuf.hc.opendss.Model) model_; } return com.zepben.protobuf.hc.opendss.Model.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 (modelCase_ == 1) { output.writeEnum(1, ((java.lang.Integer) model_)); } if (modelCase_ == 2) { output.writeMessage(2, (com.zepben.protobuf.hc.opendss.Model) model_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (modelCase_ == 1) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, ((java.lang.Integer) model_)); } if (modelCase_ == 2) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, (com.zepben.protobuf.hc.opendss.Model) model_); } 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.MaybeModel)) { return super.equals(obj); } com.zepben.protobuf.hc.opendss.MaybeModel other = (com.zepben.protobuf.hc.opendss.MaybeModel) obj; if (!getModelCase().equals(other.getModelCase())) return false; switch (modelCase_) { case 1: if (getModelNullValue() != other.getModelNullValue()) return false; break; case 2: if (!getModelSet() .equals(other.getModelSet())) return false; break; case 0: default: } 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(); switch (modelCase_) { case 1: hash = (37 * hash) + MODELNULL_FIELD_NUMBER; hash = (53 * hash) + getModelNullValue(); break; case 2: hash = (37 * hash) + MODELSET_FIELD_NUMBER; hash = (53 * hash) + getModelSet().hashCode(); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.zepben.protobuf.hc.opendss.MaybeModel parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.zepben.protobuf.hc.opendss.MaybeModel 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.MaybeModel parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.zepben.protobuf.hc.opendss.MaybeModel 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.MaybeModel parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.zepben.protobuf.hc.opendss.MaybeModel 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.MaybeModel parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.zepben.protobuf.hc.opendss.MaybeModel 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.MaybeModel parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.zepben.protobuf.hc.opendss.MaybeModel 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.MaybeModel 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.MaybeModel 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.MaybeModel 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; } /** *
   **
   * Nullable model message. Useful for signalling the end of a sequence of models to process.
   * 
* * Protobuf type {@code zepben.protobuf.hc.opendss.MaybeModel} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:zepben.protobuf.hc.opendss.MaybeModel) com.zepben.protobuf.hc.opendss.MaybeModelOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.zepben.protobuf.hc.opendss.ModelOuterClass.internal_static_zepben_protobuf_hc_opendss_MaybeModel_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.zepben.protobuf.hc.opendss.ModelOuterClass.internal_static_zepben_protobuf_hc_opendss_MaybeModel_fieldAccessorTable .ensureFieldAccessorsInitialized( com.zepben.protobuf.hc.opendss.MaybeModel.class, com.zepben.protobuf.hc.opendss.MaybeModel.Builder.class); } // Construct using com.zepben.protobuf.hc.opendss.MaybeModel.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (modelSetBuilder_ != null) { modelSetBuilder_.clear(); } modelCase_ = 0; model_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.zepben.protobuf.hc.opendss.ModelOuterClass.internal_static_zepben_protobuf_hc_opendss_MaybeModel_descriptor; } @java.lang.Override public com.zepben.protobuf.hc.opendss.MaybeModel getDefaultInstanceForType() { return com.zepben.protobuf.hc.opendss.MaybeModel.getDefaultInstance(); } @java.lang.Override public com.zepben.protobuf.hc.opendss.MaybeModel build() { com.zepben.protobuf.hc.opendss.MaybeModel result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.zepben.protobuf.hc.opendss.MaybeModel buildPartial() { com.zepben.protobuf.hc.opendss.MaybeModel result = new com.zepben.protobuf.hc.opendss.MaybeModel(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0(com.zepben.protobuf.hc.opendss.MaybeModel result) { int from_bitField0_ = bitField0_; } private void buildPartialOneofs(com.zepben.protobuf.hc.opendss.MaybeModel result) { result.modelCase_ = modelCase_; result.model_ = this.model_; if (modelCase_ == 2 && modelSetBuilder_ != null) { result.model_ = modelSetBuilder_.build(); } } @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.MaybeModel) { return mergeFrom((com.zepben.protobuf.hc.opendss.MaybeModel)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.zepben.protobuf.hc.opendss.MaybeModel other) { if (other == com.zepben.protobuf.hc.opendss.MaybeModel.getDefaultInstance()) return this; switch (other.getModelCase()) { case MODELNULL: { setModelNullValue(other.getModelNullValue()); break; } case MODELSET: { mergeModelSet(other.getModelSet()); break; } case MODEL_NOT_SET: { break; } } 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: { int rawValue = input.readEnum(); modelCase_ = 1; model_ = rawValue; break; } // case 8 case 18: { input.readMessage( getModelSetFieldBuilder().getBuilder(), extensionRegistry); modelCase_ = 2; break; } // case 18 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 modelCase_ = 0; private java.lang.Object model_; public ModelCase getModelCase() { return ModelCase.forNumber( modelCase_); } public Builder clearModel() { modelCase_ = 0; model_ = null; onChanged(); return this; } private int bitField0_; /** * .google.protobuf.NullValue modelNull = 1; * @return Whether the modelNull field is set. */ @java.lang.Override public boolean hasModelNull() { return modelCase_ == 1; } /** * .google.protobuf.NullValue modelNull = 1; * @return The enum numeric value on the wire for modelNull. */ @java.lang.Override public int getModelNullValue() { if (modelCase_ == 1) { return ((java.lang.Integer) model_).intValue(); } return 0; } /** * .google.protobuf.NullValue modelNull = 1; * @param value The enum numeric value on the wire for modelNull to set. * @return This builder for chaining. */ public Builder setModelNullValue(int value) { modelCase_ = 1; model_ = value; onChanged(); return this; } /** * .google.protobuf.NullValue modelNull = 1; * @return The modelNull. */ @java.lang.Override public com.google.protobuf.NullValue getModelNull() { if (modelCase_ == 1) { com.google.protobuf.NullValue result = com.google.protobuf.NullValue.forNumber( (java.lang.Integer) model_); return result == null ? com.google.protobuf.NullValue.UNRECOGNIZED : result; } return com.google.protobuf.NullValue.NULL_VALUE; } /** * .google.protobuf.NullValue modelNull = 1; * @param value The modelNull to set. * @return This builder for chaining. */ public Builder setModelNull(com.google.protobuf.NullValue value) { if (value == null) { throw new NullPointerException(); } modelCase_ = 1; model_ = value.getNumber(); onChanged(); return this; } /** * .google.protobuf.NullValue modelNull = 1; * @return This builder for chaining. */ public Builder clearModelNull() { if (modelCase_ == 1) { modelCase_ = 0; model_ = null; onChanged(); } return this; } private com.google.protobuf.SingleFieldBuilderV3< com.zepben.protobuf.hc.opendss.Model, com.zepben.protobuf.hc.opendss.Model.Builder, com.zepben.protobuf.hc.opendss.ModelOrBuilder> modelSetBuilder_; /** * .zepben.protobuf.hc.opendss.Model modelSet = 2; * @return Whether the modelSet field is set. */ @java.lang.Override public boolean hasModelSet() { return modelCase_ == 2; } /** * .zepben.protobuf.hc.opendss.Model modelSet = 2; * @return The modelSet. */ @java.lang.Override public com.zepben.protobuf.hc.opendss.Model getModelSet() { if (modelSetBuilder_ == null) { if (modelCase_ == 2) { return (com.zepben.protobuf.hc.opendss.Model) model_; } return com.zepben.protobuf.hc.opendss.Model.getDefaultInstance(); } else { if (modelCase_ == 2) { return modelSetBuilder_.getMessage(); } return com.zepben.protobuf.hc.opendss.Model.getDefaultInstance(); } } /** * .zepben.protobuf.hc.opendss.Model modelSet = 2; */ public Builder setModelSet(com.zepben.protobuf.hc.opendss.Model value) { if (modelSetBuilder_ == null) { if (value == null) { throw new NullPointerException(); } model_ = value; onChanged(); } else { modelSetBuilder_.setMessage(value); } modelCase_ = 2; return this; } /** * .zepben.protobuf.hc.opendss.Model modelSet = 2; */ public Builder setModelSet( com.zepben.protobuf.hc.opendss.Model.Builder builderForValue) { if (modelSetBuilder_ == null) { model_ = builderForValue.build(); onChanged(); } else { modelSetBuilder_.setMessage(builderForValue.build()); } modelCase_ = 2; return this; } /** * .zepben.protobuf.hc.opendss.Model modelSet = 2; */ public Builder mergeModelSet(com.zepben.protobuf.hc.opendss.Model value) { if (modelSetBuilder_ == null) { if (modelCase_ == 2 && model_ != com.zepben.protobuf.hc.opendss.Model.getDefaultInstance()) { model_ = com.zepben.protobuf.hc.opendss.Model.newBuilder((com.zepben.protobuf.hc.opendss.Model) model_) .mergeFrom(value).buildPartial(); } else { model_ = value; } onChanged(); } else { if (modelCase_ == 2) { modelSetBuilder_.mergeFrom(value); } else { modelSetBuilder_.setMessage(value); } } modelCase_ = 2; return this; } /** * .zepben.protobuf.hc.opendss.Model modelSet = 2; */ public Builder clearModelSet() { if (modelSetBuilder_ == null) { if (modelCase_ == 2) { modelCase_ = 0; model_ = null; onChanged(); } } else { if (modelCase_ == 2) { modelCase_ = 0; model_ = null; } modelSetBuilder_.clear(); } return this; } /** * .zepben.protobuf.hc.opendss.Model modelSet = 2; */ public com.zepben.protobuf.hc.opendss.Model.Builder getModelSetBuilder() { return getModelSetFieldBuilder().getBuilder(); } /** * .zepben.protobuf.hc.opendss.Model modelSet = 2; */ @java.lang.Override public com.zepben.protobuf.hc.opendss.ModelOrBuilder getModelSetOrBuilder() { if ((modelCase_ == 2) && (modelSetBuilder_ != null)) { return modelSetBuilder_.getMessageOrBuilder(); } else { if (modelCase_ == 2) { return (com.zepben.protobuf.hc.opendss.Model) model_; } return com.zepben.protobuf.hc.opendss.Model.getDefaultInstance(); } } /** * .zepben.protobuf.hc.opendss.Model modelSet = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.zepben.protobuf.hc.opendss.Model, com.zepben.protobuf.hc.opendss.Model.Builder, com.zepben.protobuf.hc.opendss.ModelOrBuilder> getModelSetFieldBuilder() { if (modelSetBuilder_ == null) { if (!(modelCase_ == 2)) { model_ = com.zepben.protobuf.hc.opendss.Model.getDefaultInstance(); } modelSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.zepben.protobuf.hc.opendss.Model, com.zepben.protobuf.hc.opendss.Model.Builder, com.zepben.protobuf.hc.opendss.ModelOrBuilder>( (com.zepben.protobuf.hc.opendss.Model) model_, getParentForChildren(), isClean()); model_ = null; } modelCase_ = 2; onChanged(); return modelSetBuilder_; } @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.MaybeModel) } // @@protoc_insertion_point(class_scope:zepben.protobuf.hc.opendss.MaybeModel) private static final com.zepben.protobuf.hc.opendss.MaybeModel DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.zepben.protobuf.hc.opendss.MaybeModel(); } public static com.zepben.protobuf.hc.opendss.MaybeModel getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public MaybeModel 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.MaybeModel getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy