// 
// Decompiled by Procyon v0.6.0
// 

package com.google.protobuf;

import java.io.InputStream;
import java.nio.ByteBuffer;
import java.io.IOException;

public final class Int64Value extends GeneratedMessage implements Int64ValueOrBuilder
{
    private static final long serialVersionUID = 0L;
    public static final int VALUE_FIELD_NUMBER = 1;
    private long value_;
    private byte memoizedIsInitialized;
    private static final Int64Value DEFAULT_INSTANCE;
    private static final Parser<Int64Value> PARSER;
    
    private Int64Value(final GeneratedMessage.Builder<?> builder) {
        super(builder);
        this.value_ = 0L;
        this.memoizedIsInitialized = -1;
    }
    
    private Int64Value() {
        this.value_ = 0L;
        this.memoizedIsInitialized = -1;
    }
    
    public static final Descriptors.Descriptor getDescriptor() {
        return WrappersProto.internal_static_google_protobuf_Int64Value_descriptor;
    }
    
    @Override
    protected FieldAccessorTable internalGetFieldAccessorTable() {
        return WrappersProto.internal_static_google_protobuf_Int64Value_fieldAccessorTable.ensureFieldAccessorsInitialized(Int64Value.class, Builder.class);
    }
    
    @Override
    public long getValue() {
        return this.value_;
    }
    
    @Override
    public final boolean isInitialized() {
        final byte isInitialized = this.memoizedIsInitialized;
        if (isInitialized == 1) {
            return true;
        }
        if (isInitialized == 0) {
            return false;
        }
        this.memoizedIsInitialized = 1;
        return true;
    }
    
    @Override
    public void writeTo(final CodedOutputStream output) throws IOException {
        if (this.value_ != 0L) {
            output.writeInt64(1, this.value_);
        }
        this.getUnknownFields().writeTo(output);
    }
    
    @Override
    public int getSerializedSize() {
        int size = this.memoizedSize;
        if (size != -1) {
            return size;
        }
        size = 0;
        if (this.value_ != 0L) {
            size += CodedOutputStream.computeInt64Size(1, this.value_);
        }
        size += this.getUnknownFields().getSerializedSize();
        return this.memoizedSize = size;
    }
    
    @Override
    public boolean equals(final Object obj) {
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof Int64Value)) {
            return super.equals(obj);
        }
        final Int64Value other = (Int64Value)obj;
        return this.getValue() == other.getValue() && this.getUnknownFields().equals(other.getUnknownFields());
    }
    
    @Override
    public int hashCode() {
        if (this.memoizedHashCode != 0) {
            return this.memoizedHashCode;
        }
        int hash = 41;
        hash = 19 * hash + getDescriptor().hashCode();
        hash = 37 * hash + 1;
        hash = 53 * hash + Internal.hashLong(this.getValue());
        hash = 29 * hash + this.getUnknownFields().hashCode();
        return this.memoizedHashCode = hash;
    }
    
    public static Int64Value parseFrom(final ByteBuffer data) throws InvalidProtocolBufferException {
        return Int64Value.PARSER.parseFrom(data);
    }
    
    public static Int64Value parseFrom(final ByteBuffer data, final ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException {
        return Int64Value.PARSER.parseFrom(data, extensionRegistry);
    }
    
    public static Int64Value parseFrom(final ByteString data) throws InvalidProtocolBufferException {
        return Int64Value.PARSER.parseFrom(data);
    }
    
    public static Int64Value parseFrom(final ByteString data, final ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException {
        return Int64Value.PARSER.parseFrom(data, extensionRegistry);
    }
    
    public static Int64Value parseFrom(final byte[] data) throws InvalidProtocolBufferException {
        return Int64Value.PARSER.parseFrom(data);
    }
    
    public static Int64Value parseFrom(final byte[] data, final ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException {
        return Int64Value.PARSER.parseFrom(data, extensionRegistry);
    }
    
    public static Int64Value parseFrom(final InputStream input) throws IOException {
        return GeneratedMessage.parseWithIOException(Int64Value.PARSER, input);
    }
    
    public static Int64Value parseFrom(final InputStream input, final ExtensionRegistryLite extensionRegistry) throws IOException {
        return GeneratedMessage.parseWithIOException(Int64Value.PARSER, input, extensionRegistry);
    }
    
    public static Int64Value parseDelimitedFrom(final InputStream input) throws IOException {
        return GeneratedMessage.parseDelimitedWithIOException(Int64Value.PARSER, input);
    }
    
    public static Int64Value parseDelimitedFrom(final InputStream input, final ExtensionRegistryLite extensionRegistry) throws IOException {
        return GeneratedMessage.parseDelimitedWithIOException(Int64Value.PARSER, input, extensionRegistry);
    }
    
    public static Int64Value parseFrom(final CodedInputStream input) throws IOException {
        return GeneratedMessage.parseWithIOException(Int64Value.PARSER, input);
    }
    
    public static Int64Value parseFrom(final CodedInputStream input, final ExtensionRegistryLite extensionRegistry) throws IOException {
        return GeneratedMessage.parseWithIOException(Int64Value.PARSER, input, extensionRegistry);
    }
    
    @Override
    public Builder newBuilderForType() {
        return newBuilder();
    }
    
    public static Builder newBuilder() {
        return Int64Value.DEFAULT_INSTANCE.toBuilder();
    }
    
    public static Builder newBuilder(final Int64Value prototype) {
        return Int64Value.DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    
    @Override
    public Builder toBuilder() {
        return (this == Int64Value.DEFAULT_INSTANCE) ? new Builder() : new Builder().mergeFrom(this);
    }
    
    @Override
    protected Builder newBuilderForType(final BuilderParent parent) {
        final Builder builder = new Builder(parent);
        return builder;
    }
    
    public static Int64Value getDefaultInstance() {
        return Int64Value.DEFAULT_INSTANCE;
    }
    
    public static Int64Value of(final long value) {
        return newBuilder().setValue(value).build();
    }
    
    public static Parser<Int64Value> parser() {
        return Int64Value.PARSER;
    }
    
    @Override
    public Parser<Int64Value> getParserForType() {
        return Int64Value.PARSER;
    }
    
    @Override
    public Int64Value getDefaultInstanceForType() {
        return Int64Value.DEFAULT_INSTANCE;
    }
    
    static {
        RuntimeVersion.validateProtobufGencodeVersion(RuntimeVersion.RuntimeDomain.PUBLIC, 4, 33, 0, "", "Int64Value");
        DEFAULT_INSTANCE = new Int64Value();
        PARSER = new AbstractParser<Int64Value>() {
            @Override
            public Int64Value parsePartialFrom(final CodedInputStream input, final ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException {
                final Builder builder = Int64Value.newBuilder();
                try {
                    builder.mergeFrom(input, extensionRegistry);
                }
                catch (final InvalidProtocolBufferException e) {
                    throw e.setUnfinishedMessage(builder.buildPartial());
                }
                catch (final UninitializedMessageException e2) {
                    throw e2.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
                }
                catch (final IOException e3) {
                    throw new InvalidProtocolBufferException(e3).setUnfinishedMessage(builder.buildPartial());
                }
                return builder.buildPartial();
            }
        };
    }
    
    public static final class Builder extends GeneratedMessage.Builder<Builder> implements Int64ValueOrBuilder
    {
        private int bitField0_;
        private long value_;
        
        public static final Descriptors.Descriptor getDescriptor() {
            return WrappersProto.internal_static_google_protobuf_Int64Value_descriptor;
        }
        
        @Override
        protected FieldAccessorTable internalGetFieldAccessorTable() {
            return WrappersProto.internal_static_google_protobuf_Int64Value_fieldAccessorTable.ensureFieldAccessorsInitialized(Int64Value.class, Builder.class);
        }
        
        private Builder() {
        }
        
        private Builder(final BuilderParent parent) {
            super(parent);
        }
        
        @Override
        public Builder clear() {
            super.clear();
            this.bitField0_ = 0;
            this.value_ = 0L;
            return this;
        }
        
        @Override
        public Descriptors.Descriptor getDescriptorForType() {
            return WrappersProto.internal_static_google_protobuf_Int64Value_descriptor;
        }
        
        @Override
        public Int64Value getDefaultInstanceForType() {
            return Int64Value.getDefaultInstance();
        }
        
        @Override
        public Int64Value build() {
            final Int64Value result = this.buildPartial();
            if (!result.isInitialized()) {
                throw AbstractMessage.Builder.newUninitializedMessageException(result);
            }
            return result;
        }
        
        @Override
        public Int64Value buildPartial() {
            final Int64Value result = new Int64Value(this, null);
            if (this.bitField0_ != 0) {
                this.buildPartial0(result);
            }
            this.onBuilt();
            return result;
        }
        
        private void buildPartial0(final Int64Value result) {
            final int from_bitField0_ = this.bitField0_;
            if ((from_bitField0_ & 0x1) != 0x0) {
                result.value_ = this.value_;
            }
        }
        
        @Override
        public Builder mergeFrom(final Message other) {
            if (other instanceof Int64Value) {
                return this.mergeFrom((Int64Value)other);
            }
            super.mergeFrom(other);
            return this;
        }
        
        public Builder mergeFrom(final Int64Value other) {
            if (other == Int64Value.getDefaultInstance()) {
                return this;
            }
            if (other.getValue() != 0L) {
                this.setValue(other.getValue());
            }
            this.mergeUnknownFields(other.getUnknownFields());
            this.onChanged();
            return this;
        }
        
        @Override
        public final boolean isInitialized() {
            return true;
        }
        
        @Override
        public Builder mergeFrom(final CodedInputStream input, final ExtensionRegistryLite extensionRegistry) throws IOException {
            if (extensionRegistry == null) {
                throw new NullPointerException();
            }
            try {
                boolean done = false;
                while (!done) {
                    final int tag = input.readTag();
                    switch (tag) {
                        case 0: {
                            done = true;
                            continue;
                        }
                        case 8: {
                            this.value_ = input.readInt64();
                            this.bitField0_ |= 0x1;
                            continue;
                        }
                        default: {
                            if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                                done = true;
                                continue;
                            }
                            continue;
                        }
                    }
                }
            }
            catch (final InvalidProtocolBufferException e) {
                throw e.unwrapIOException();
            }
            finally {
                this.onChanged();
            }
            return this;
        }
        
        @Override
        public long getValue() {
            return this.value_;
        }
        
        public Builder setValue(final long value) {
            this.value_ = value;
            this.bitField0_ |= 0x1;
            this.onChanged();
            return this;
        }
        
        public Builder clearValue() {
            this.bitField0_ &= 0xFFFFFFFE;
            this.value_ = 0L;
            this.onChanged();
            return this;
        }
    }
}
