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

cz.proto.FieldRef Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: table_common.proto

package cz.proto;

/**
 * Protobuf type {@code cz.proto.FieldRef}
 */
public final class FieldRef extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:cz.proto.FieldRef)
    FieldRefOrBuilder {
private static final long serialVersionUID = 0L;
  // Use FieldRef.newBuilder() to construct.
  private FieldRef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private FieldRef() {
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new FieldRef();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private FieldRef(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 8: {
            field_ = input.readUInt32();
            fieldCase_ = 1;
            break;
          }
          case 18: {
            java.lang.String s = input.readStringRequireUtf8();
            fieldCase_ = 2;
            field_ = s;
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return cz.proto.TableCommon.internal_static_cz_proto_FieldRef_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return cz.proto.TableCommon.internal_static_cz_proto_FieldRef_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            cz.proto.FieldRef.class, cz.proto.FieldRef.Builder.class);
  }

  private int fieldCase_ = 0;
  private java.lang.Object field_;
  public enum FieldCase
      implements com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    FIELD_ID(1),
    FIELD_NAME(2),
    FIELD_NOT_SET(0);
    private final int value;
    private FieldCase(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 FieldCase valueOf(int value) {
      return forNumber(value);
    }

    public static FieldCase forNumber(int value) {
      switch (value) {
        case 1: return FIELD_ID;
        case 2: return FIELD_NAME;
        case 0: return FIELD_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public FieldCase
  getFieldCase() {
    return FieldCase.forNumber(
        fieldCase_);
  }

  public static final int FIELD_ID_FIELD_NUMBER = 1;
  /**
   * 
   * 1. field_id and field_name are FieldSchema's id and name respectively
   * 2. field_name is only used for creating table, when filed_id has not been assigned yet.
   * 3. field_id is used for almost all the cases except item 2.
   * 
* * uint32 field_id = 1; * @return Whether the fieldId field is set. */ @java.lang.Override public boolean hasFieldId() { return fieldCase_ == 1; } /** *
   * 1. field_id and field_name are FieldSchema's id and name respectively
   * 2. field_name is only used for creating table, when filed_id has not been assigned yet.
   * 3. field_id is used for almost all the cases except item 2.
   * 
* * uint32 field_id = 1; * @return The fieldId. */ @java.lang.Override public int getFieldId() { if (fieldCase_ == 1) { return (java.lang.Integer) field_; } return 0; } public static final int FIELD_NAME_FIELD_NUMBER = 2; /** * string field_name = 2; * @return Whether the fieldName field is set. */ public boolean hasFieldName() { return fieldCase_ == 2; } /** * string field_name = 2; * @return The fieldName. */ public java.lang.String getFieldName() { java.lang.Object ref = ""; if (fieldCase_ == 2) { ref = field_; } 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(); if (fieldCase_ == 2) { field_ = s; } return s; } } /** * string field_name = 2; * @return The bytes for fieldName. */ public com.google.protobuf.ByteString getFieldNameBytes() { java.lang.Object ref = ""; if (fieldCase_ == 2) { ref = field_; } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (fieldCase_ == 2) { field_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } 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 (fieldCase_ == 1) { output.writeUInt32( 1, (int)((java.lang.Integer) field_)); } if (fieldCase_ == 2) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, field_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (fieldCase_ == 1) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size( 1, (int)((java.lang.Integer) field_)); } if (fieldCase_ == 2) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, field_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof cz.proto.FieldRef)) { return super.equals(obj); } cz.proto.FieldRef other = (cz.proto.FieldRef) obj; if (!getFieldCase().equals(other.getFieldCase())) return false; switch (fieldCase_) { case 1: if (getFieldId() != other.getFieldId()) return false; break; case 2: if (!getFieldName() .equals(other.getFieldName())) return false; break; case 0: default: } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); switch (fieldCase_) { case 1: hash = (37 * hash) + FIELD_ID_FIELD_NUMBER; hash = (53 * hash) + getFieldId(); break; case 2: hash = (37 * hash) + FIELD_NAME_FIELD_NUMBER; hash = (53 * hash) + getFieldName().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static cz.proto.FieldRef parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static cz.proto.FieldRef parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static cz.proto.FieldRef parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static cz.proto.FieldRef parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static cz.proto.FieldRef parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static cz.proto.FieldRef parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static cz.proto.FieldRef parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static cz.proto.FieldRef 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 cz.proto.FieldRef parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static cz.proto.FieldRef 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 cz.proto.FieldRef parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static cz.proto.FieldRef 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(cz.proto.FieldRef 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; } /** * Protobuf type {@code cz.proto.FieldRef} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:cz.proto.FieldRef) cz.proto.FieldRefOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return cz.proto.TableCommon.internal_static_cz_proto_FieldRef_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return cz.proto.TableCommon.internal_static_cz_proto_FieldRef_fieldAccessorTable .ensureFieldAccessorsInitialized( cz.proto.FieldRef.class, cz.proto.FieldRef.Builder.class); } // Construct using cz.proto.FieldRef.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); fieldCase_ = 0; field_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return cz.proto.TableCommon.internal_static_cz_proto_FieldRef_descriptor; } @java.lang.Override public cz.proto.FieldRef getDefaultInstanceForType() { return cz.proto.FieldRef.getDefaultInstance(); } @java.lang.Override public cz.proto.FieldRef build() { cz.proto.FieldRef result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public cz.proto.FieldRef buildPartial() { cz.proto.FieldRef result = new cz.proto.FieldRef(this); if (fieldCase_ == 1) { result.field_ = field_; } if (fieldCase_ == 2) { result.field_ = field_; } result.fieldCase_ = fieldCase_; onBuilt(); return result; } @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 cz.proto.FieldRef) { return mergeFrom((cz.proto.FieldRef)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(cz.proto.FieldRef other) { if (other == cz.proto.FieldRef.getDefaultInstance()) return this; switch (other.getFieldCase()) { case FIELD_ID: { setFieldId(other.getFieldId()); break; } case FIELD_NAME: { fieldCase_ = 2; field_ = other.field_; onChanged(); break; } case FIELD_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); 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 { cz.proto.FieldRef parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (cz.proto.FieldRef) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int fieldCase_ = 0; private java.lang.Object field_; public FieldCase getFieldCase() { return FieldCase.forNumber( fieldCase_); } public Builder clearField() { fieldCase_ = 0; field_ = null; onChanged(); return this; } /** *
     * 1. field_id and field_name are FieldSchema's id and name respectively
     * 2. field_name is only used for creating table, when filed_id has not been assigned yet.
     * 3. field_id is used for almost all the cases except item 2.
     * 
* * uint32 field_id = 1; * @return Whether the fieldId field is set. */ public boolean hasFieldId() { return fieldCase_ == 1; } /** *
     * 1. field_id and field_name are FieldSchema's id and name respectively
     * 2. field_name is only used for creating table, when filed_id has not been assigned yet.
     * 3. field_id is used for almost all the cases except item 2.
     * 
* * uint32 field_id = 1; * @return The fieldId. */ public int getFieldId() { if (fieldCase_ == 1) { return (java.lang.Integer) field_; } return 0; } /** *
     * 1. field_id and field_name are FieldSchema's id and name respectively
     * 2. field_name is only used for creating table, when filed_id has not been assigned yet.
     * 3. field_id is used for almost all the cases except item 2.
     * 
* * uint32 field_id = 1; * @param value The fieldId to set. * @return This builder for chaining. */ public Builder setFieldId(int value) { fieldCase_ = 1; field_ = value; onChanged(); return this; } /** *
     * 1. field_id and field_name are FieldSchema's id and name respectively
     * 2. field_name is only used for creating table, when filed_id has not been assigned yet.
     * 3. field_id is used for almost all the cases except item 2.
     * 
* * uint32 field_id = 1; * @return This builder for chaining. */ public Builder clearFieldId() { if (fieldCase_ == 1) { fieldCase_ = 0; field_ = null; onChanged(); } return this; } /** * string field_name = 2; * @return Whether the fieldName field is set. */ @java.lang.Override public boolean hasFieldName() { return fieldCase_ == 2; } /** * string field_name = 2; * @return The fieldName. */ @java.lang.Override public java.lang.String getFieldName() { java.lang.Object ref = ""; if (fieldCase_ == 2) { ref = field_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (fieldCase_ == 2) { field_ = s; } return s; } else { return (java.lang.String) ref; } } /** * string field_name = 2; * @return The bytes for fieldName. */ @java.lang.Override public com.google.protobuf.ByteString getFieldNameBytes() { java.lang.Object ref = ""; if (fieldCase_ == 2) { ref = field_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (fieldCase_ == 2) { field_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * string field_name = 2; * @param value The fieldName to set. * @return This builder for chaining. */ public Builder setFieldName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } fieldCase_ = 2; field_ = value; onChanged(); return this; } /** * string field_name = 2; * @return This builder for chaining. */ public Builder clearFieldName() { if (fieldCase_ == 2) { fieldCase_ = 0; field_ = null; onChanged(); } return this; } /** * string field_name = 2; * @param value The bytes for fieldName to set. * @return This builder for chaining. */ public Builder setFieldNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); fieldCase_ = 2; field_ = value; 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:cz.proto.FieldRef) } // @@protoc_insertion_point(class_scope:cz.proto.FieldRef) private static final cz.proto.FieldRef DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new cz.proto.FieldRef(); } public static cz.proto.FieldRef getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public FieldRef parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new FieldRef(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public cz.proto.FieldRef getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy