.class public Lb/ag;
.super Ljava/lang/Object;


# instance fields
.field private a:Lb/w;

.field private b:Ljava/lang/String;

.field private c:Lb/v;

.field private d:Lb/ah;

.field private e:Ljava/lang/Object;


# direct methods
.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const-string v0, "GET"

    iput-object v0, p0, Lb/ag;->b:Ljava/lang/String;

    new-instance v0, Lb/v;

    invoke-direct {v0}, Lb/v;-><init>()V

    iput-object v0, p0, Lb/ag;->c:Lb/v;

    return-void
.end method

.method private constructor <init>(Lb/af;)V
    .locals 1

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    invoke-static {p1}, Lb/af;->a(Lb/af;)Lb/w;

    move-result-object v0

    iput-object v0, p0, Lb/ag;->a:Lb/w;

    invoke-static {p1}, Lb/af;->b(Lb/af;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lb/ag;->b:Ljava/lang/String;

    invoke-static {p1}, Lb/af;->c(Lb/af;)Lb/ah;

    move-result-object v0

    iput-object v0, p0, Lb/ag;->d:Lb/ah;

    invoke-static {p1}, Lb/af;->d(Lb/af;)Ljava/lang/Object;

    move-result-object v0

    iput-object v0, p0, Lb/ag;->e:Ljava/lang/Object;

    invoke-static {p1}, Lb/af;->e(Lb/af;)Lb/u;

    move-result-object v0

    invoke-virtual {v0}, Lb/u;->a()Lb/v;

    move-result-object v0

    iput-object v0, p0, Lb/ag;->c:Lb/v;

    return-void
.end method

.method synthetic constructor <init>(Lb/af;B)V
    .locals 0

    invoke-direct {p0, p1}, Lb/ag;-><init>(Lb/af;)V

    return-void
.end method

.method static synthetic a(Lb/ag;)Lb/w;
    .locals 1

    iget-object v0, p0, Lb/ag;->a:Lb/w;

    return-object v0
.end method

.method static synthetic b(Lb/ag;)Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lb/ag;->b:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic c(Lb/ag;)Lb/v;
    .locals 1

    iget-object v0, p0, Lb/ag;->c:Lb/v;

    return-object v0
.end method

.method static synthetic d(Lb/ag;)Lb/ah;
    .locals 1

    iget-object v0, p0, Lb/ag;->d:Lb/ah;

    return-object v0
.end method

.method static synthetic e(Lb/ag;)Ljava/lang/Object;
    .locals 1

    iget-object v0, p0, Lb/ag;->e:Ljava/lang/Object;

    return-object v0
.end method


# virtual methods
.method public a()Lb/af;
    .locals 2

    iget-object v0, p0, Lb/ag;->a:Lb/w;

    if-nez v0, :cond_0

    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "url == null"

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_0
    new-instance v0, Lb/af;

    const/4 v1, 0x0

    invoke-direct {v0, p0, v1}, Lb/af;-><init>(Lb/ag;B)V

    return-object v0
.end method

.method public a(Lb/u;)Lb/ag;
    .locals 1

    invoke-virtual {p1}, Lb/u;->a()Lb/v;

    move-result-object v0

    iput-object v0, p0, Lb/ag;->c:Lb/v;

    return-object p0
.end method

.method public a(Lb/w;)Lb/ag;
    .locals 2

    if-nez p1, :cond_0

    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "url == null"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_0
    iput-object p1, p0, Lb/ag;->a:Lb/w;

    return-object p0
.end method

.method public a(Ljava/lang/String;)Lb/ag;
    .locals 1

    iget-object v0, p0, Lb/ag;->c:Lb/v;

    invoke-virtual {v0, p1}, Lb/v;->b(Ljava/lang/String;)Lb/v;

    return-object p0
.end method

.method public a(Ljava/lang/String;Lb/ah;)Lb/ag;
    .locals 3

    if-nez p1, :cond_0

    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "method == null"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_0
    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v0

    if-nez v0, :cond_1

    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string v1, "method.length() == 0"

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_1
    if-eqz p2, :cond_2

    invoke-static {p1}, Lb/a/d/n;->b(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_2

    new-instance v0, Ljava/lang/IllegalArgumentException;

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "method "

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " must not have a request body."

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_2
    if-nez p2, :cond_3

    invoke-static {p1}, Lb/a/d/n;->d(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_3

    new-instance v0, Ljava/lang/IllegalArgumentException;

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "method "

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " must have a request body."

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_3
    iput-object p1, p0, Lb/ag;->b:Ljava/lang/String;

    iput-object p2, p0, Lb/ag;->d:Lb/ah;

    return-object p0
.end method

.method public a(Ljava/lang/String;Ljava/lang/String;)Lb/ag;
    .locals 1

    iget-object v0, p0, Lb/ag;->c:Lb/v;

    invoke-virtual {v0, p1, p2}, Lb/v;->c(Ljava/lang/String;Ljava/lang/String;)Lb/v;

    return-object p0
.end method

.method public b(Ljava/lang/String;)Lb/ag;
    .locals 7

    const/4 v6, 0x4

    const/4 v5, 0x3

    const/4 v1, 0x1

    const/4 v2, 0x0

    if-nez p1, :cond_0

    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "url == null"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_0
    const-string v3, "ws:"

    move-object v0, p1

    move v4, v2

    invoke-virtual/range {v0 .. v5}, Ljava/lang/String;->regionMatches(ZILjava/lang/String;II)Z

    move-result v0

    if-eqz v0, :cond_2

    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "http:"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {p1, v5}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    :cond_1
    :goto_0
    invoke-static {p1}, Lb/w;->c(Ljava/lang/String;)Lb/w;

    move-result-object v0

    if-nez v0, :cond_3

    new-instance v0, Ljava/lang/IllegalArgumentException;

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "unexpected url: "

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_2
    const-string v3, "wss:"

    move-object v0, p1

    move v4, v2

    move v5, v6

    invoke-virtual/range {v0 .. v5}, Ljava/lang/String;->regionMatches(ZILjava/lang/String;II)Z

    move-result v0

    if-eqz v0, :cond_1

    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "https:"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {p1, v6}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    goto :goto_0

    :cond_3
    invoke-virtual {p0, v0}, Lb/ag;->a(Lb/w;)Lb/ag;

    move-result-object v0

    return-object v0
.end method
