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

package io.netty.handler.codec.http3;

import io.netty.util.internal.StringUtil;
import java.util.Objects;
import io.netty.util.internal.ObjectUtil;

public final class DefaultHttp3GoAwayFrame implements Http3GoAwayFrame
{
    private final long id;
    
    public DefaultHttp3GoAwayFrame(final long id) {
        this.id = ObjectUtil.checkPositiveOrZero(id, "id");
    }
    
    @Override
    public long id() {
        return this.id;
    }
    
    @Override
    public boolean equals(final Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || this.getClass() != o.getClass()) {
            return false;
        }
        final DefaultHttp3GoAwayFrame that = (DefaultHttp3GoAwayFrame)o;
        return this.id == that.id;
    }
    
    @Override
    public int hashCode() {
        return Objects.hash(this.id);
    }
    
    @Override
    public String toString() {
        return StringUtil.simpleClassName(this) + "(id=" + this.id() + ')';
    }
}
