granularity level: instruction

		.class final Lcom/google/firebase/messaging/TopicOperation;
.super Ljava/lang/Object;
.source "TopicOperation.java"


.field private static final OLD_TOPIC_PREFIX:Ljava/lang/String; = "/topics/"
.field static final OPERATION_PAIR_DIVIDER:Ljava/lang/String; = "!"
.field private static final TOPIC_NAME_PATTERN:Ljava/lang/String; = "[a-zA-Z0-9-_.~%]{1,900}"
.field private static final TOPIC_NAME_REGEXP:Ljava/util/regex/Pattern;
.field private final operation:Ljava/lang/String;
.field private final serializedString:Ljava/lang/String;
.field private final topic:Ljava/lang/String;


.method static constructor <clinit>()V
	.locals 1

	const-string v0, "[a-zA-Z0-9-_.~%]{1,900}"
	invoke-static {v0}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;
	move-result-object v0
	sput-object v0, Lcom/google/firebase/messaging/TopicOperation;->TOPIC_NAME_REGEXP:Ljava/util/regex/Pattern;
	return-void
.end method

.method private constructor <init>(Ljava/lang/String;Ljava/lang/String;)V
	.locals 1

	invoke-direct {p0}, Ljava/lang/Object;-><init>()V
	invoke-static {p2, p1}, Lcom/google/firebase/messaging/TopicOperation;->normalizeTopicOrThrow(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
	move-result-object v0
	iput-object v0, p0, Lcom/google/firebase/messaging/TopicOperation;->topic:Ljava/lang/String;
	iput-object p1, p0, Lcom/google/firebase/messaging/TopicOperation;->operation:Ljava/lang/String;
	new-instance v0, Ljava/lang/StringBuilder;
	invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
	invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	const-string p1, "!"
	invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
	move-result-object p1
	iput-object p1, p0, Lcom/google/firebase/messaging/TopicOperation;->serializedString:Ljava/lang/String;
	return-void
.end method

.method static from(Ljava/lang/String;)Lcom/google/firebase/messaging/TopicOperation;
	.locals 3

	invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
	move-result v0
	const/4 v1, 0x0
	if-eqz v0, :cond_0
	return-object v1
	:cond_0
	const/4 v0, -0x1
	const-string v2, "!"
	invoke-virtual {p0, v2, v0}, Ljava/lang/String;->split(Ljava/lang/String;I)[Ljava/lang/String;
	move-result-object p0
	array-length v0, p0
	const/4 v2, 0x2
	new-instance v0, Lcom/google/firebase/messaging/TopicOperation;
	const/4 v1, 0x0
	aget-object v1, p0, v1
	const/4 v2, 0x1
	aget-object p0, p0, v2
	invoke-direct {v0, v1, p0}, Lcom/google/firebase/messaging/TopicOperation;-><init>(Ljava/lang/String;Ljava/lang/String;)V
	return-object v0
.end method

.method private static normalizeTopicOrThrow(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
	.locals 3

	const/4 v0, 0x1
	const/4 v1, 0x0
	if-eqz p0, :cond_0
	const-string v2, "/topics/"
	invoke-virtual {p0, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
	move-result v2
	:cond_0
	sget-object p1, Lcom/google/firebase/messaging/TopicOperation;->TOPIC_NAME_REGEXP:Ljava/util/regex/Pattern;
	invoke-virtual {p1, p0}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
	move-result-object p1
	invoke-virtual {p1}, Ljava/util/regex/Matcher;->matches()Z
	move-result p1
	return-object p0
.end method

.method public static subscribe(Ljava/lang/String;)Lcom/google/firebase/messaging/TopicOperation;
	.locals 2

	new-instance v0, Lcom/google/firebase/messaging/TopicOperation;
	const-string v1, "S"
	invoke-direct {v0, v1, p0}, Lcom/google/firebase/messaging/TopicOperation;-><init>(Ljava/lang/String;Ljava/lang/String;)V
	return-object v0
.end method

.method public static unsubscribe(Ljava/lang/String;)Lcom/google/firebase/messaging/TopicOperation;
	.locals 2

	const/4 v0, 0x0
	return-object v0
.end method

.method public equals(Ljava/lang/Object;)Z
	.locals 3

	const/4 v0, 0x0
	return v0
.end method

.method public getOperation()Ljava/lang/String;
	.locals 1

	iget-object v0, p0, Lcom/google/firebase/messaging/TopicOperation;->operation:Ljava/lang/String;
	return-object v0
.end method

.method public getTopic()Ljava/lang/String;
	.locals 1

	iget-object v0, p0, Lcom/google/firebase/messaging/TopicOperation;->topic:Ljava/lang/String;
	return-object v0
.end method

.method public hashCode()I
	.locals 3

	const/4 v0, 0x0
	return v0
.end method

.method public serialize()Ljava/lang/String;
	.locals 1

	iget-object v0, p0, Lcom/google/firebase/messaging/TopicOperation;->serializedString:Ljava/lang/String;
	return-object v0
.end method