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

com.google.protobuf.EnumValue Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/protobuf/type.proto

package com.google.protobuf;

/**
 * 
 * Enum value definition.
 * 
* * Protobuf type {@code google.protobuf.EnumValue} */ public final class EnumValue extends com.google.protobuf.GeneratedMessageLite< EnumValue, EnumValue.Builder> implements // @@protoc_insertion_point(message_implements:google.protobuf.EnumValue) EnumValueOrBuilder { private EnumValue() { name_ = ""; options_ = emptyProtobufList(); } private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; private java.lang.String name_; /** *
   * Enum value name.
   * 
* * optional string name = 1; */ public java.lang.String getName() { return name_; } /** *
   * Enum value name.
   * 
* * optional string name = 1; */ public com.google.protobuf.ByteString getNameBytes() { return com.google.protobuf.ByteString.copyFromUtf8(name_); } /** *
   * Enum value name.
   * 
* * optional string name = 1; */ private void setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; } /** *
   * Enum value name.
   * 
* * optional string name = 1; */ private void clearName() { name_ = getDefaultInstance().getName(); } /** *
   * Enum value name.
   * 
* * optional string name = 1; */ private void setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value.toStringUtf8(); } public static final int NUMBER_FIELD_NUMBER = 2; private int number_; /** *
   * Enum value number.
   * 
* * optional int32 number = 2; */ public int getNumber() { return number_; } /** *
   * Enum value number.
   * 
* * optional int32 number = 2; */ private void setNumber(int value) { number_ = value; } /** *
   * Enum value number.
   * 
* * optional int32 number = 2; */ private void clearNumber() { number_ = 0; } public static final int OPTIONS_FIELD_NUMBER = 3; private com.google.protobuf.Internal.ProtobufList options_; /** *
   * Protocol buffer options.
   * 
* * repeated .google.protobuf.Option options = 3; */ public java.util.List getOptionsList() { return options_; } /** *
   * Protocol buffer options.
   * 
* * repeated .google.protobuf.Option options = 3; */ public java.util.List getOptionsOrBuilderList() { return options_; } /** *
   * Protocol buffer options.
   * 
* * repeated .google.protobuf.Option options = 3; */ public int getOptionsCount() { return options_.size(); } /** *
   * Protocol buffer options.
   * 
* * repeated .google.protobuf.Option options = 3; */ public com.google.protobuf.Option getOptions(int index) { return options_.get(index); } /** *
   * Protocol buffer options.
   * 
* * repeated .google.protobuf.Option options = 3; */ public com.google.protobuf.OptionOrBuilder getOptionsOrBuilder( int index) { return options_.get(index); } private void ensureOptionsIsMutable() { if (!options_.isModifiable()) { options_ = com.google.protobuf.GeneratedMessageLite.mutableCopy(options_); } } /** *
   * Protocol buffer options.
   * 
* * repeated .google.protobuf.Option options = 3; */ private void setOptions( int index, com.google.protobuf.Option value) { if (value == null) { throw new NullPointerException(); } ensureOptionsIsMutable(); options_.set(index, value); } /** *
   * Protocol buffer options.
   * 
* * repeated .google.protobuf.Option options = 3; */ private void setOptions( int index, com.google.protobuf.Option.Builder builderForValue) { ensureOptionsIsMutable(); options_.set(index, builderForValue.build()); } /** *
   * Protocol buffer options.
   * 
* * repeated .google.protobuf.Option options = 3; */ private void addOptions(com.google.protobuf.Option value) { if (value == null) { throw new NullPointerException(); } ensureOptionsIsMutable(); options_.add(value); } /** *
   * Protocol buffer options.
   * 
* * repeated .google.protobuf.Option options = 3; */ private void addOptions( int index, com.google.protobuf.Option value) { if (value == null) { throw new NullPointerException(); } ensureOptionsIsMutable(); options_.add(index, value); } /** *
   * Protocol buffer options.
   * 
* * repeated .google.protobuf.Option options = 3; */ private void addOptions( com.google.protobuf.Option.Builder builderForValue) { ensureOptionsIsMutable(); options_.add(builderForValue.build()); } /** *
   * Protocol buffer options.
   * 
* * repeated .google.protobuf.Option options = 3; */ private void addOptions( int index, com.google.protobuf.Option.Builder builderForValue) { ensureOptionsIsMutable(); options_.add(index, builderForValue.build()); } /** *
   * Protocol buffer options.
   * 
* * repeated .google.protobuf.Option options = 3; */ private void addAllOptions( java.lang.Iterable values) { ensureOptionsIsMutable(); com.google.protobuf.AbstractMessageLite.addAll( values, options_); } /** *
   * Protocol buffer options.
   * 
* * repeated .google.protobuf.Option options = 3; */ private void clearOptions() { options_ = emptyProtobufList(); } /** *
   * Protocol buffer options.
   * 
* * repeated .google.protobuf.Option options = 3; */ private void removeOptions(int index) { ensureOptionsIsMutable(); options_.remove(index); } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!name_.isEmpty()) { output.writeString(1, getName()); } if (number_ != 0) { output.writeInt32(2, number_); } for (int i = 0; i < options_.size(); i++) { output.writeMessage(3, options_.get(i)); } } public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (!name_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeStringSize(1, getName()); } if (number_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(2, number_); } for (int i = 0; i < options_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, options_.get(i)); } memoizedSerializedSize = size; return size; } public static com.google.protobuf.EnumValue parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.google.protobuf.EnumValue parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.google.protobuf.EnumValue parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.google.protobuf.EnumValue parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.google.protobuf.EnumValue parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input); } public static com.google.protobuf.EnumValue parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input, extensionRegistry); } public static com.google.protobuf.EnumValue parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return parseDelimitedFrom(DEFAULT_INSTANCE, input); } public static com.google.protobuf.EnumValue parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); } public static com.google.protobuf.EnumValue parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input); } public static com.google.protobuf.EnumValue parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input, extensionRegistry); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.protobuf.EnumValue prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } /** *
   * Enum value definition.
   * 
* * Protobuf type {@code google.protobuf.EnumValue} */ public static final class Builder extends com.google.protobuf.GeneratedMessageLite.Builder< com.google.protobuf.EnumValue, Builder> implements // @@protoc_insertion_point(builder_implements:google.protobuf.EnumValue) com.google.protobuf.EnumValueOrBuilder { // Construct using com.google.protobuf.EnumValue.newBuilder() private Builder() { super(DEFAULT_INSTANCE); } /** *
     * Enum value name.
     * 
* * optional string name = 1; */ public java.lang.String getName() { return instance.getName(); } /** *
     * Enum value name.
     * 
* * optional string name = 1; */ public com.google.protobuf.ByteString getNameBytes() { return instance.getNameBytes(); } /** *
     * Enum value name.
     * 
* * optional string name = 1; */ public Builder setName( java.lang.String value) { copyOnWrite(); instance.setName(value); return this; } /** *
     * Enum value name.
     * 
* * optional string name = 1; */ public Builder clearName() { copyOnWrite(); instance.clearName(); return this; } /** *
     * Enum value name.
     * 
* * optional string name = 1; */ public Builder setNameBytes( com.google.protobuf.ByteString value) { copyOnWrite(); instance.setNameBytes(value); return this; } /** *
     * Enum value number.
     * 
* * optional int32 number = 2; */ public int getNumber() { return instance.getNumber(); } /** *
     * Enum value number.
     * 
* * optional int32 number = 2; */ public Builder setNumber(int value) { copyOnWrite(); instance.setNumber(value); return this; } /** *
     * Enum value number.
     * 
* * optional int32 number = 2; */ public Builder clearNumber() { copyOnWrite(); instance.clearNumber(); return this; } /** *
     * Protocol buffer options.
     * 
* * repeated .google.protobuf.Option options = 3; */ public java.util.List getOptionsList() { return java.util.Collections.unmodifiableList( instance.getOptionsList()); } /** *
     * Protocol buffer options.
     * 
* * repeated .google.protobuf.Option options = 3; */ public int getOptionsCount() { return instance.getOptionsCount(); }/** *
     * Protocol buffer options.
     * 
* * repeated .google.protobuf.Option options = 3; */ public com.google.protobuf.Option getOptions(int index) { return instance.getOptions(index); } /** *
     * Protocol buffer options.
     * 
* * repeated .google.protobuf.Option options = 3; */ public Builder setOptions( int index, com.google.protobuf.Option value) { copyOnWrite(); instance.setOptions(index, value); return this; } /** *
     * Protocol buffer options.
     * 
* * repeated .google.protobuf.Option options = 3; */ public Builder setOptions( int index, com.google.protobuf.Option.Builder builderForValue) { copyOnWrite(); instance.setOptions(index, builderForValue); return this; } /** *
     * Protocol buffer options.
     * 
* * repeated .google.protobuf.Option options = 3; */ public Builder addOptions(com.google.protobuf.Option value) { copyOnWrite(); instance.addOptions(value); return this; } /** *
     * Protocol buffer options.
     * 
* * repeated .google.protobuf.Option options = 3; */ public Builder addOptions( int index, com.google.protobuf.Option value) { copyOnWrite(); instance.addOptions(index, value); return this; } /** *
     * Protocol buffer options.
     * 
* * repeated .google.protobuf.Option options = 3; */ public Builder addOptions( com.google.protobuf.Option.Builder builderForValue) { copyOnWrite(); instance.addOptions(builderForValue); return this; } /** *
     * Protocol buffer options.
     * 
* * repeated .google.protobuf.Option options = 3; */ public Builder addOptions( int index, com.google.protobuf.Option.Builder builderForValue) { copyOnWrite(); instance.addOptions(index, builderForValue); return this; } /** *
     * Protocol buffer options.
     * 
* * repeated .google.protobuf.Option options = 3; */ public Builder addAllOptions( java.lang.Iterable values) { copyOnWrite(); instance.addAllOptions(values); return this; } /** *
     * Protocol buffer options.
     * 
* * repeated .google.protobuf.Option options = 3; */ public Builder clearOptions() { copyOnWrite(); instance.clearOptions(); return this; } /** *
     * Protocol buffer options.
     * 
* * repeated .google.protobuf.Option options = 3; */ public Builder removeOptions(int index) { copyOnWrite(); instance.removeOptions(index); return this; } // @@protoc_insertion_point(builder_scope:google.protobuf.EnumValue) } protected final Object dynamicMethod( com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) { switch (method) { case NEW_MUTABLE_INSTANCE: { return new com.google.protobuf.EnumValue(); } case IS_INITIALIZED: { return DEFAULT_INSTANCE; } case MAKE_IMMUTABLE: { options_.makeImmutable(); return null; } case NEW_BUILDER: { return new Builder(); } case VISIT: { Visitor visitor = (Visitor) arg0; com.google.protobuf.EnumValue other = (com.google.protobuf.EnumValue) arg1; name_ = visitor.visitString(!name_.isEmpty(), name_, !other.name_.isEmpty(), other.name_); number_ = visitor.visitInt(number_ != 0, number_, other.number_ != 0, other.number_); options_= visitor.visitList(options_, other.options_); if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor .INSTANCE) { bitField0_ |= other.bitField0_; } return this; } case MERGE_FROM_STREAM: { com.google.protobuf.CodedInputStream input = (com.google.protobuf.CodedInputStream) arg0; com.google.protobuf.ExtensionRegistryLite extensionRegistry = (com.google.protobuf.ExtensionRegistryLite) arg1; try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!input.skipField(tag)) { done = true; } break; } case 10: { String s = input.readStringRequireUtf8(); name_ = s; break; } case 16: { number_ = input.readInt32(); break; } case 26: { if (!options_.isModifiable()) { options_ = com.google.protobuf.GeneratedMessageLite.mutableCopy(options_); } options_.add( input.readMessage(com.google.protobuf.Option.parser(), extensionRegistry)); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw new RuntimeException(e.setUnfinishedMessage(this)); } catch (java.io.IOException e) { throw new RuntimeException( new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this)); } finally { } } case GET_DEFAULT_INSTANCE: { return DEFAULT_INSTANCE; } case GET_PARSER: { if (PARSER == null) { synchronized (com.google.protobuf.EnumValue.class) { if (PARSER == null) { PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE); } } } return PARSER; } } throw new UnsupportedOperationException(); } // @@protoc_insertion_point(class_scope:google.protobuf.EnumValue) private static final com.google.protobuf.EnumValue DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new EnumValue(); DEFAULT_INSTANCE.makeImmutable(); } public static com.google.protobuf.EnumValue getDefaultInstance() { return DEFAULT_INSTANCE; } private static volatile com.google.protobuf.Parser PARSER; public static com.google.protobuf.Parser parser() { return DEFAULT_INSTANCE.getParserForType(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy