VancedMicroG/play-services-core/src/main/protos-java/org/microg/gms/gcm/mcs/StreamErrorStanza.java

84 lines
2.0 KiB
Java

// Code generated by Wire protocol buffer compiler, do not edit.
// Source file: protos-repo/mcs.proto
package org.microg.gms.gcm.mcs;
import com.squareup.wire.Message;
import com.squareup.wire.ProtoField;
import static com.squareup.wire.Message.Datatype.STRING;
import static com.squareup.wire.Message.Label.REQUIRED;
public final class StreamErrorStanza extends Message {
public static final String DEFAULT_TYPE = "";
public static final String DEFAULT_TEXT = "";
@ProtoField(tag = 1, type = STRING, label = REQUIRED)
public final String type;
@ProtoField(tag = 2, type = STRING)
public final String text;
public StreamErrorStanza(String type, String text) {
this.type = type;
this.text = text;
}
private StreamErrorStanza(Builder builder) {
this(builder.type, builder.text);
setBuilder(builder);
}
@Override
public boolean equals(Object other) {
if (other == this) return true;
if (!(other instanceof StreamErrorStanza)) return false;
StreamErrorStanza o = (StreamErrorStanza) other;
return equals(type, o.type)
&& equals(text, o.text);
}
@Override
public int hashCode() {
int result = hashCode;
if (result == 0) {
result = type != null ? type.hashCode() : 0;
result = result * 37 + (text != null ? text.hashCode() : 0);
hashCode = result;
}
return result;
}
public static final class Builder extends Message.Builder<StreamErrorStanza> {
public String type;
public String text;
public Builder() {
}
public Builder(StreamErrorStanza message) {
super(message);
if (message == null) return;
this.type = message.type;
this.text = message.text;
}
public Builder type(String type) {
this.type = type;
return this;
}
public Builder text(String text) {
this.text = text;
return this;
}
@Override
public StreamErrorStanza build() {
checkRequiredFields();
return new StreamErrorStanza(this);
}
}
}