// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: Define_Common.proto

package com.caliverse.admin.domain.RabbitMq.message;

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

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.caliverse.admin.domain.RabbitMq.message.DefineCommon.internal_static_Color_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.caliverse.admin.domain.RabbitMq.message.DefineCommon.internal_static_Color_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.caliverse.admin.domain.RabbitMq.message.Color.class, com.caliverse.admin.domain.RabbitMq.message.Color.Builder.class);
  }

  public static final int R_FIELD_NUMBER = 1;
  private float r_ = 0F;
  /**
   * <code>float r = 1;</code>
   * @return The r.
   */
  @java.lang.Override
  public float getR() {
    return r_;
  }

  public static final int G_FIELD_NUMBER = 2;
  private float g_ = 0F;
  /**
   * <code>float g = 2;</code>
   * @return The g.
   */
  @java.lang.Override
  public float getG() {
    return g_;
  }

  public static final int B_FIELD_NUMBER = 3;
  private float b_ = 0F;
  /**
   * <code>float b = 3;</code>
   * @return The b.
   */
  @java.lang.Override
  public float getB() {
    return b_;
  }

  public static final int A_FIELD_NUMBER = 4;
  private float a_ = 0F;
  /**
   * <code>float a = 4;</code>
   * @return The a.
   */
  @java.lang.Override
  public float getA() {
    return a_;
  }

  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.Float.floatToRawIntBits(r_) != 0) {
      output.writeFloat(1, r_);
    }
    if (java.lang.Float.floatToRawIntBits(g_) != 0) {
      output.writeFloat(2, g_);
    }
    if (java.lang.Float.floatToRawIntBits(b_) != 0) {
      output.writeFloat(3, b_);
    }
    if (java.lang.Float.floatToRawIntBits(a_) != 0) {
      output.writeFloat(4, a_);
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (java.lang.Float.floatToRawIntBits(r_) != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeFloatSize(1, r_);
    }
    if (java.lang.Float.floatToRawIntBits(g_) != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeFloatSize(2, g_);
    }
    if (java.lang.Float.floatToRawIntBits(b_) != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeFloatSize(3, b_);
    }
    if (java.lang.Float.floatToRawIntBits(a_) != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeFloatSize(4, a_);
    }
    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.caliverse.admin.domain.RabbitMq.message.Color)) {
      return super.equals(obj);
    }
    com.caliverse.admin.domain.RabbitMq.message.Color other = (com.caliverse.admin.domain.RabbitMq.message.Color) obj;

    if (java.lang.Float.floatToIntBits(getR())
        != java.lang.Float.floatToIntBits(
            other.getR())) return false;
    if (java.lang.Float.floatToIntBits(getG())
        != java.lang.Float.floatToIntBits(
            other.getG())) return false;
    if (java.lang.Float.floatToIntBits(getB())
        != java.lang.Float.floatToIntBits(
            other.getB())) return false;
    if (java.lang.Float.floatToIntBits(getA())
        != java.lang.Float.floatToIntBits(
            other.getA())) 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) + R_FIELD_NUMBER;
    hash = (53 * hash) + java.lang.Float.floatToIntBits(
        getR());
    hash = (37 * hash) + G_FIELD_NUMBER;
    hash = (53 * hash) + java.lang.Float.floatToIntBits(
        getG());
    hash = (37 * hash) + B_FIELD_NUMBER;
    hash = (53 * hash) + java.lang.Float.floatToIntBits(
        getB());
    hash = (37 * hash) + A_FIELD_NUMBER;
    hash = (53 * hash) + java.lang.Float.floatToIntBits(
        getA());
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.caliverse.admin.domain.RabbitMq.message.Color parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.caliverse.admin.domain.RabbitMq.message.Color parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.caliverse.admin.domain.RabbitMq.message.Color parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.caliverse.admin.domain.RabbitMq.message.Color parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.caliverse.admin.domain.RabbitMq.message.Color parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.caliverse.admin.domain.RabbitMq.message.Color parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.caliverse.admin.domain.RabbitMq.message.Color parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.caliverse.admin.domain.RabbitMq.message.Color 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.caliverse.admin.domain.RabbitMq.message.Color parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.caliverse.admin.domain.RabbitMq.message.Color 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.caliverse.admin.domain.RabbitMq.message.Color parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.caliverse.admin.domain.RabbitMq.message.Color 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.caliverse.admin.domain.RabbitMq.message.Color 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 Color}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:Color)
      com.caliverse.admin.domain.RabbitMq.message.ColorOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.caliverse.admin.domain.RabbitMq.message.DefineCommon.internal_static_Color_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.caliverse.admin.domain.RabbitMq.message.DefineCommon.internal_static_Color_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.caliverse.admin.domain.RabbitMq.message.Color.class, com.caliverse.admin.domain.RabbitMq.message.Color.Builder.class);
    }

    // Construct using com.caliverse.admin.domain.RabbitMq.message.Color.newBuilder()
    private Builder() {

    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);

    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      r_ = 0F;
      g_ = 0F;
      b_ = 0F;
      a_ = 0F;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.caliverse.admin.domain.RabbitMq.message.DefineCommon.internal_static_Color_descriptor;
    }

    @java.lang.Override
    public com.caliverse.admin.domain.RabbitMq.message.Color getDefaultInstanceForType() {
      return com.caliverse.admin.domain.RabbitMq.message.Color.getDefaultInstance();
    }

    @java.lang.Override
    public com.caliverse.admin.domain.RabbitMq.message.Color build() {
      com.caliverse.admin.domain.RabbitMq.message.Color result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.caliverse.admin.domain.RabbitMq.message.Color buildPartial() {
      com.caliverse.admin.domain.RabbitMq.message.Color result = new com.caliverse.admin.domain.RabbitMq.message.Color(this);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartial0(com.caliverse.admin.domain.RabbitMq.message.Color result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.r_ = r_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.g_ = g_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.b_ = b_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.a_ = a_;
      }
    }

    @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.caliverse.admin.domain.RabbitMq.message.Color) {
        return mergeFrom((com.caliverse.admin.domain.RabbitMq.message.Color)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.caliverse.admin.domain.RabbitMq.message.Color other) {
      if (other == com.caliverse.admin.domain.RabbitMq.message.Color.getDefaultInstance()) return this;
      if (other.getR() != 0F) {
        setR(other.getR());
      }
      if (other.getG() != 0F) {
        setG(other.getG());
      }
      if (other.getB() != 0F) {
        setB(other.getB());
      }
      if (other.getA() != 0F) {
        setA(other.getA());
      }
      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 13: {
              r_ = input.readFloat();
              bitField0_ |= 0x00000001;
              break;
            } // case 13
            case 21: {
              g_ = input.readFloat();
              bitField0_ |= 0x00000002;
              break;
            } // case 21
            case 29: {
              b_ = input.readFloat();
              bitField0_ |= 0x00000004;
              break;
            } // case 29
            case 37: {
              a_ = input.readFloat();
              bitField0_ |= 0x00000008;
              break;
            } // case 37
            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 float r_ ;
    /**
     * <code>float r = 1;</code>
     * @return The r.
     */
    @java.lang.Override
    public float getR() {
      return r_;
    }
    /**
     * <code>float r = 1;</code>
     * @param value The r to set.
     * @return This builder for chaining.
     */
    public Builder setR(float value) {
      
      r_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * <code>float r = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearR() {
      bitField0_ = (bitField0_ & ~0x00000001);
      r_ = 0F;
      onChanged();
      return this;
    }

    private float g_ ;
    /**
     * <code>float g = 2;</code>
     * @return The g.
     */
    @java.lang.Override
    public float getG() {
      return g_;
    }
    /**
     * <code>float g = 2;</code>
     * @param value The g to set.
     * @return This builder for chaining.
     */
    public Builder setG(float value) {
      
      g_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * <code>float g = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearG() {
      bitField0_ = (bitField0_ & ~0x00000002);
      g_ = 0F;
      onChanged();
      return this;
    }

    private float b_ ;
    /**
     * <code>float b = 3;</code>
     * @return The b.
     */
    @java.lang.Override
    public float getB() {
      return b_;
    }
    /**
     * <code>float b = 3;</code>
     * @param value The b to set.
     * @return This builder for chaining.
     */
    public Builder setB(float value) {
      
      b_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * <code>float b = 3;</code>
     * @return This builder for chaining.
     */
    public Builder clearB() {
      bitField0_ = (bitField0_ & ~0x00000004);
      b_ = 0F;
      onChanged();
      return this;
    }

    private float a_ ;
    /**
     * <code>float a = 4;</code>
     * @return The a.
     */
    @java.lang.Override
    public float getA() {
      return a_;
    }
    /**
     * <code>float a = 4;</code>
     * @param value The a to set.
     * @return This builder for chaining.
     */
    public Builder setA(float value) {
      
      a_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     * <code>float a = 4;</code>
     * @return This builder for chaining.
     */
    public Builder clearA() {
      bitField0_ = (bitField0_ & ~0x00000008);
      a_ = 0F;
      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:Color)
  }

  // @@protoc_insertion_point(class_scope:Color)
  private static final com.caliverse.admin.domain.RabbitMq.message.Color DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.caliverse.admin.domain.RabbitMq.message.Color();
  }

  public static com.caliverse.admin.domain.RabbitMq.message.Color getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<Color>
      PARSER = new com.google.protobuf.AbstractParser<Color>() {
    @java.lang.Override
    public Color 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<Color> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<Color> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.caliverse.admin.domain.RabbitMq.message.Color getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

