/projs./apk/com.android.vending-3.1.5/src/com/google/android/finsky/remoting/protos/DetailsResponse.java

https://github.com/xl8or/- · Java · 196 lines · 164 code · 32 blank · 0 comment · 18 complexity · fb9a4adfb9fbd32b78a8c458132f4af4 MD5 · raw file

  1. package com.google.android.finsky.remoting.protos;
  2. import com.google.android.finsky.remoting.protos.DeviceDoc;
  3. import com.google.android.finsky.remoting.protos.Rev;
  4. import com.google.protobuf.micro.CodedInputStreamMicro;
  5. import com.google.protobuf.micro.CodedOutputStreamMicro;
  6. import com.google.protobuf.micro.InvalidProtocolBufferMicroException;
  7. import com.google.protobuf.micro.MessageMicro;
  8. import java.io.IOException;
  9. public final class DetailsResponse extends MessageMicro {
  10. public static final int ANALYTICS_COOKIE_FIELD_NUMBER = 2;
  11. public static final int DOC_FIELD_NUMBER = 1;
  12. public static final int USER_REVIEW_FIELD_NUMBER = 3;
  13. private String analyticsCookie_ = "";
  14. private int cachedSize = -1;
  15. private DeviceDoc.DeviceDocument doc_ = null;
  16. private boolean hasAnalyticsCookie;
  17. private boolean hasDoc;
  18. private boolean hasUserReview;
  19. private Rev.Review userReview_ = null;
  20. public DetailsResponse() {}
  21. public static DetailsResponse parseFrom(CodedInputStreamMicro var0) throws IOException {
  22. return (new DetailsResponse()).mergeFrom(var0);
  23. }
  24. public static DetailsResponse parseFrom(byte[] var0) throws InvalidProtocolBufferMicroException {
  25. return (DetailsResponse)((DetailsResponse)(new DetailsResponse()).mergeFrom(var0));
  26. }
  27. public final DetailsResponse clear() {
  28. DetailsResponse var1 = this.clearDoc();
  29. DetailsResponse var2 = this.clearAnalyticsCookie();
  30. DetailsResponse var3 = this.clearUserReview();
  31. this.cachedSize = -1;
  32. return this;
  33. }
  34. public DetailsResponse clearAnalyticsCookie() {
  35. this.hasAnalyticsCookie = (boolean)0;
  36. this.analyticsCookie_ = "";
  37. return this;
  38. }
  39. public DetailsResponse clearDoc() {
  40. this.hasDoc = (boolean)0;
  41. this.doc_ = null;
  42. return this;
  43. }
  44. public DetailsResponse clearUserReview() {
  45. this.hasUserReview = (boolean)0;
  46. this.userReview_ = null;
  47. return this;
  48. }
  49. public String getAnalyticsCookie() {
  50. return this.analyticsCookie_;
  51. }
  52. public int getCachedSize() {
  53. if(this.cachedSize < 0) {
  54. int var1 = this.getSerializedSize();
  55. }
  56. return this.cachedSize;
  57. }
  58. public DeviceDoc.DeviceDocument getDoc() {
  59. return this.doc_;
  60. }
  61. public int getSerializedSize() {
  62. int var1 = 0;
  63. if(this.hasDoc()) {
  64. DeviceDoc.DeviceDocument var2 = this.getDoc();
  65. int var3 = CodedOutputStreamMicro.computeMessageSize(1, var2);
  66. var1 = 0 + var3;
  67. }
  68. if(this.hasAnalyticsCookie()) {
  69. String var4 = this.getAnalyticsCookie();
  70. int var5 = CodedOutputStreamMicro.computeStringSize(2, var4);
  71. var1 += var5;
  72. }
  73. if(this.hasUserReview()) {
  74. Rev.Review var6 = this.getUserReview();
  75. int var7 = CodedOutputStreamMicro.computeMessageSize(3, var6);
  76. var1 += var7;
  77. }
  78. this.cachedSize = var1;
  79. return var1;
  80. }
  81. public Rev.Review getUserReview() {
  82. return this.userReview_;
  83. }
  84. public boolean hasAnalyticsCookie() {
  85. return this.hasAnalyticsCookie;
  86. }
  87. public boolean hasDoc() {
  88. return this.hasDoc;
  89. }
  90. public boolean hasUserReview() {
  91. return this.hasUserReview;
  92. }
  93. public final boolean isInitialized() {
  94. boolean var1 = false;
  95. if((!this.hasDoc() || this.getDoc().isInitialized()) && (!this.hasUserReview() || this.getUserReview().isInitialized())) {
  96. var1 = true;
  97. }
  98. return var1;
  99. }
  100. public DetailsResponse mergeFrom(CodedInputStreamMicro var1) throws IOException {
  101. while(true) {
  102. int var2 = var1.readTag();
  103. switch(var2) {
  104. case 10:
  105. DeviceDoc.DeviceDocument var3 = new DeviceDoc.DeviceDocument();
  106. var1.readMessage(var3);
  107. this.setDoc(var3);
  108. break;
  109. case 18:
  110. String var5 = var1.readString();
  111. this.setAnalyticsCookie(var5);
  112. break;
  113. case 26:
  114. Rev.Review var7 = new Rev.Review();
  115. var1.readMessage(var7);
  116. this.setUserReview(var7);
  117. break;
  118. default:
  119. if(this.parseUnknownField(var1, var2)) {
  120. break;
  121. }
  122. case 0:
  123. return this;
  124. }
  125. }
  126. }
  127. public DetailsResponse setAnalyticsCookie(String var1) {
  128. this.hasAnalyticsCookie = (boolean)1;
  129. this.analyticsCookie_ = var1;
  130. return this;
  131. }
  132. public DetailsResponse setDoc(DeviceDoc.DeviceDocument var1) {
  133. if(var1 == null) {
  134. throw new NullPointerException();
  135. } else {
  136. this.hasDoc = (boolean)1;
  137. this.doc_ = var1;
  138. return this;
  139. }
  140. }
  141. public DetailsResponse setUserReview(Rev.Review var1) {
  142. if(var1 == null) {
  143. throw new NullPointerException();
  144. } else {
  145. this.hasUserReview = (boolean)1;
  146. this.userReview_ = var1;
  147. return this;
  148. }
  149. }
  150. public void writeTo(CodedOutputStreamMicro var1) throws IOException {
  151. if(this.hasDoc()) {
  152. DeviceDoc.DeviceDocument var2 = this.getDoc();
  153. var1.writeMessage(1, var2);
  154. }
  155. if(this.hasAnalyticsCookie()) {
  156. String var3 = this.getAnalyticsCookie();
  157. var1.writeString(2, var3);
  158. }
  159. if(this.hasUserReview()) {
  160. Rev.Review var4 = this.getUserReview();
  161. var1.writeMessage(3, var4);
  162. }
  163. }
  164. }