1// Generated by the protocol buffer compiler.  DO NOT EDIT!
2// source: sudoku.proto
3
4package sudoku;
5
6public final class Sudoku {
7  private Sudoku() {}
8  public static void registerAllExtensions(
9      com.google.protobuf.ExtensionRegistry registry) {
10  }
11  public interface SudokuRequestOrBuilder
12      extends com.google.protobuf.MessageOrBuilder {
13
14    // required string checkerboard = 1;
15    boolean hasCheckerboard();
16    String getCheckerboard();
17  }
18  public static final class SudokuRequest extends
19      com.google.protobuf.GeneratedMessage
20      implements SudokuRequestOrBuilder {
21    // Use SudokuRequest.newBuilder() to construct.
22    private SudokuRequest(Builder builder) {
23      super(builder);
24    }
25    private SudokuRequest(boolean noInit) {}
26
27    private static final SudokuRequest defaultInstance;
28    public static SudokuRequest getDefaultInstance() {
29      return defaultInstance;
30    }
31
32    public SudokuRequest getDefaultInstanceForType() {
33      return defaultInstance;
34    }
35
36    public static final com.google.protobuf.Descriptors.Descriptor
37        getDescriptor() {
38      return sudoku.Sudoku.internal_static_sudoku_SudokuRequest_descriptor;
39    }
40
41    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
42        internalGetFieldAccessorTable() {
43      return sudoku.Sudoku.internal_static_sudoku_SudokuRequest_fieldAccessorTable;
44    }
45
46    private int bitField0_;
47    // required string checkerboard = 1;
48    public static final int CHECKERBOARD_FIELD_NUMBER = 1;
49    private java.lang.Object checkerboard_;
50    public boolean hasCheckerboard() {
51      return ((bitField0_ & 0x00000001) == 0x00000001);
52    }
53    public String getCheckerboard() {
54      java.lang.Object ref = checkerboard_;
55      if (ref instanceof String) {
56        return (String) ref;
57      } else {
58        com.google.protobuf.ByteString bs =
59            (com.google.protobuf.ByteString) ref;
60        String s = bs.toStringUtf8();
61        if (com.google.protobuf.Internal.isValidUtf8(bs)) {
62          checkerboard_ = s;
63        }
64        return s;
65      }
66    }
67    private com.google.protobuf.ByteString getCheckerboardBytes() {
68      java.lang.Object ref = checkerboard_;
69      if (ref instanceof String) {
70        com.google.protobuf.ByteString b =
71            com.google.protobuf.ByteString.copyFromUtf8((String) ref);
72        checkerboard_ = b;
73        return b;
74      } else {
75        return (com.google.protobuf.ByteString) ref;
76      }
77    }
78
79    private void initFields() {
80      checkerboard_ = "";
81    }
82    private byte memoizedIsInitialized = -1;
83    public final boolean isInitialized() {
84      byte isInitialized = memoizedIsInitialized;
85      if (isInitialized != -1) return isInitialized == 1;
86
87      if (!hasCheckerboard()) {
88        memoizedIsInitialized = 0;
89        return false;
90      }
91      memoizedIsInitialized = 1;
92      return true;
93    }
94
95    public void writeTo(com.google.protobuf.CodedOutputStream output)
96                        throws java.io.IOException {
97      getSerializedSize();
98      if (((bitField0_ & 0x00000001) == 0x00000001)) {
99        output.writeBytes(1, getCheckerboardBytes());
100      }
101      getUnknownFields().writeTo(output);
102    }
103
104    private int memoizedSerializedSize = -1;
105    public int getSerializedSize() {
106      int size = memoizedSerializedSize;
107      if (size != -1) return size;
108
109      size = 0;
110      if (((bitField0_ & 0x00000001) == 0x00000001)) {
111        size += com.google.protobuf.CodedOutputStream
112          .computeBytesSize(1, getCheckerboardBytes());
113      }
114      size += getUnknownFields().getSerializedSize();
115      memoizedSerializedSize = size;
116      return size;
117    }
118
119    private static final long serialVersionUID = 0L;
120    @java.lang.Override
121    protected java.lang.Object writeReplace()
122        throws java.io.ObjectStreamException {
123      return super.writeReplace();
124    }
125
126    public static sudoku.Sudoku.SudokuRequest parseFrom(
127        com.google.protobuf.ByteString data)
128        throws com.google.protobuf.InvalidProtocolBufferException {
129      return newBuilder().mergeFrom(data).buildParsed();
130    }
131    public static sudoku.Sudoku.SudokuRequest parseFrom(
132        com.google.protobuf.ByteString data,
133        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
134        throws com.google.protobuf.InvalidProtocolBufferException {
135      return newBuilder().mergeFrom(data, extensionRegistry)
136               .buildParsed();
137    }
138    public static sudoku.Sudoku.SudokuRequest parseFrom(byte[] data)
139        throws com.google.protobuf.InvalidProtocolBufferException {
140      return newBuilder().mergeFrom(data).buildParsed();
141    }
142    public static sudoku.Sudoku.SudokuRequest parseFrom(
143        byte[] data,
144        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
145        throws com.google.protobuf.InvalidProtocolBufferException {
146      return newBuilder().mergeFrom(data, extensionRegistry)
147               .buildParsed();
148    }
149    public static sudoku.Sudoku.SudokuRequest parseFrom(java.io.InputStream input)
150        throws java.io.IOException {
151      return newBuilder().mergeFrom(input).buildParsed();
152    }
153    public static sudoku.Sudoku.SudokuRequest parseFrom(
154        java.io.InputStream input,
155        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
156        throws java.io.IOException {
157      return newBuilder().mergeFrom(input, extensionRegistry)
158               .buildParsed();
159    }
160    public static sudoku.Sudoku.SudokuRequest parseDelimitedFrom(java.io.InputStream input)
161        throws java.io.IOException {
162      Builder builder = newBuilder();
163      if (builder.mergeDelimitedFrom(input)) {
164        return builder.buildParsed();
165      } else {
166        return null;
167      }
168    }
169    public static sudoku.Sudoku.SudokuRequest parseDelimitedFrom(
170        java.io.InputStream input,
171        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
172        throws java.io.IOException {
173      Builder builder = newBuilder();
174      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
175        return builder.buildParsed();
176      } else {
177        return null;
178      }
179    }
180    public static sudoku.Sudoku.SudokuRequest parseFrom(
181        com.google.protobuf.CodedInputStream input)
182        throws java.io.IOException {
183      return newBuilder().mergeFrom(input).buildParsed();
184    }
185    public static sudoku.Sudoku.SudokuRequest parseFrom(
186        com.google.protobuf.CodedInputStream input,
187        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
188        throws java.io.IOException {
189      return newBuilder().mergeFrom(input, extensionRegistry)
190               .buildParsed();
191    }
192
193    public static Builder newBuilder() { return Builder.create(); }
194    public Builder newBuilderForType() { return newBuilder(); }
195    public static Builder newBuilder(sudoku.Sudoku.SudokuRequest prototype) {
196      return newBuilder().mergeFrom(prototype);
197    }
198    public Builder toBuilder() { return newBuilder(this); }
199
200    @java.lang.Override
201    protected Builder newBuilderForType(
202        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
203      Builder builder = new Builder(parent);
204      return builder;
205    }
206    public static final class Builder extends
207        com.google.protobuf.GeneratedMessage.Builder<Builder>
208       implements sudoku.Sudoku.SudokuRequestOrBuilder {
209      public static final com.google.protobuf.Descriptors.Descriptor
210          getDescriptor() {
211        return sudoku.Sudoku.internal_static_sudoku_SudokuRequest_descriptor;
212      }
213
214      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
215          internalGetFieldAccessorTable() {
216        return sudoku.Sudoku.internal_static_sudoku_SudokuRequest_fieldAccessorTable;
217      }
218
219      // Construct using sudoku.Sudoku.SudokuRequest.newBuilder()
220      private Builder() {
221        maybeForceBuilderInitialization();
222      }
223
224      private Builder(BuilderParent parent) {
225        super(parent);
226        maybeForceBuilderInitialization();
227      }
228      private void maybeForceBuilderInitialization() {
229        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
230        }
231      }
232      private static Builder create() {
233        return new Builder();
234      }
235
236      public Builder clear() {
237        super.clear();
238        checkerboard_ = "";
239        bitField0_ = (bitField0_ & ~0x00000001);
240        return this;
241      }
242
243      public Builder clone() {
244        return create().mergeFrom(buildPartial());
245      }
246
247      public com.google.protobuf.Descriptors.Descriptor
248          getDescriptorForType() {
249        return sudoku.Sudoku.SudokuRequest.getDescriptor();
250      }
251
252      public sudoku.Sudoku.SudokuRequest getDefaultInstanceForType() {
253        return sudoku.Sudoku.SudokuRequest.getDefaultInstance();
254      }
255
256      public sudoku.Sudoku.SudokuRequest build() {
257        sudoku.Sudoku.SudokuRequest result = buildPartial();
258        if (!result.isInitialized()) {
259          throw newUninitializedMessageException(result);
260        }
261        return result;
262      }
263
264      private sudoku.Sudoku.SudokuRequest buildParsed()
265          throws com.google.protobuf.InvalidProtocolBufferException {
266        sudoku.Sudoku.SudokuRequest result = buildPartial();
267        if (!result.isInitialized()) {
268          throw newUninitializedMessageException(
269            result).asInvalidProtocolBufferException();
270        }
271        return result;
272      }
273
274      public sudoku.Sudoku.SudokuRequest buildPartial() {
275        sudoku.Sudoku.SudokuRequest result = new sudoku.Sudoku.SudokuRequest(this);
276        int from_bitField0_ = bitField0_;
277        int to_bitField0_ = 0;
278        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
279          to_bitField0_ |= 0x00000001;
280        }
281        result.checkerboard_ = checkerboard_;
282        result.bitField0_ = to_bitField0_;
283        onBuilt();
284        return result;
285      }
286
287      public Builder mergeFrom(com.google.protobuf.Message other) {
288        if (other instanceof sudoku.Sudoku.SudokuRequest) {
289          return mergeFrom((sudoku.Sudoku.SudokuRequest)other);
290        } else {
291          super.mergeFrom(other);
292          return this;
293        }
294      }
295
296      public Builder mergeFrom(sudoku.Sudoku.SudokuRequest other) {
297        if (other == sudoku.Sudoku.SudokuRequest.getDefaultInstance()) return this;
298        if (other.hasCheckerboard()) {
299          setCheckerboard(other.getCheckerboard());
300        }
301        this.mergeUnknownFields(other.getUnknownFields());
302        return this;
303      }
304
305      public final boolean isInitialized() {
306        if (!hasCheckerboard()) {
307
308          return false;
309        }
310        return true;
311      }
312
313      public Builder mergeFrom(
314          com.google.protobuf.CodedInputStream input,
315          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
316          throws java.io.IOException {
317        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
318          com.google.protobuf.UnknownFieldSet.newBuilder(
319            this.getUnknownFields());
320        while (true) {
321          int tag = input.readTag();
322          switch (tag) {
323            case 0:
324              this.setUnknownFields(unknownFields.build());
325              onChanged();
326              return this;
327            default: {
328              if (!parseUnknownField(input, unknownFields,
329                                     extensionRegistry, tag)) {
330                this.setUnknownFields(unknownFields.build());
331                onChanged();
332                return this;
333              }
334              break;
335            }
336            case 10: {
337              bitField0_ |= 0x00000001;
338              checkerboard_ = input.readBytes();
339              break;
340            }
341          }
342        }
343      }
344
345      private int bitField0_;
346
347      // required string checkerboard = 1;
348      private java.lang.Object checkerboard_ = "";
349      public boolean hasCheckerboard() {
350        return ((bitField0_ & 0x00000001) == 0x00000001);
351      }
352      public String getCheckerboard() {
353        java.lang.Object ref = checkerboard_;
354        if (!(ref instanceof String)) {
355          String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
356          checkerboard_ = s;
357          return s;
358        } else {
359          return (String) ref;
360        }
361      }
362      public Builder setCheckerboard(String value) {
363        if (value == null) {
364    throw new NullPointerException();
365  }
366  bitField0_ |= 0x00000001;
367        checkerboard_ = value;
368        onChanged();
369        return this;
370      }
371      public Builder clearCheckerboard() {
372        bitField0_ = (bitField0_ & ~0x00000001);
373        checkerboard_ = getDefaultInstance().getCheckerboard();
374        onChanged();
375        return this;
376      }
377      void setCheckerboard(com.google.protobuf.ByteString value) {
378        bitField0_ |= 0x00000001;
379        checkerboard_ = value;
380        onChanged();
381      }
382
383      // @@protoc_insertion_point(builder_scope:sudoku.SudokuRequest)
384    }
385
386    static {
387      defaultInstance = new SudokuRequest(true);
388      defaultInstance.initFields();
389    }
390
391    // @@protoc_insertion_point(class_scope:sudoku.SudokuRequest)
392  }
393
394  public interface SudokuResponseOrBuilder
395      extends com.google.protobuf.MessageOrBuilder {
396
397    // optional bool solved = 1 [default = false];
398    boolean hasSolved();
399    boolean getSolved();
400
401    // optional string checkerboard = 2;
402    boolean hasCheckerboard();
403    String getCheckerboard();
404  }
405  public static final class SudokuResponse extends
406      com.google.protobuf.GeneratedMessage
407      implements SudokuResponseOrBuilder {
408    // Use SudokuResponse.newBuilder() to construct.
409    private SudokuResponse(Builder builder) {
410      super(builder);
411    }
412    private SudokuResponse(boolean noInit) {}
413
414    private static final SudokuResponse defaultInstance;
415    public static SudokuResponse getDefaultInstance() {
416      return defaultInstance;
417    }
418
419    public SudokuResponse getDefaultInstanceForType() {
420      return defaultInstance;
421    }
422
423    public static final com.google.protobuf.Descriptors.Descriptor
424        getDescriptor() {
425      return sudoku.Sudoku.internal_static_sudoku_SudokuResponse_descriptor;
426    }
427
428    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
429        internalGetFieldAccessorTable() {
430      return sudoku.Sudoku.internal_static_sudoku_SudokuResponse_fieldAccessorTable;
431    }
432
433    private int bitField0_;
434    // optional bool solved = 1 [default = false];
435    public static final int SOLVED_FIELD_NUMBER = 1;
436    private boolean solved_;
437    public boolean hasSolved() {
438      return ((bitField0_ & 0x00000001) == 0x00000001);
439    }
440    public boolean getSolved() {
441      return solved_;
442    }
443
444    // optional string checkerboard = 2;
445    public static final int CHECKERBOARD_FIELD_NUMBER = 2;
446    private java.lang.Object checkerboard_;
447    public boolean hasCheckerboard() {
448      return ((bitField0_ & 0x00000002) == 0x00000002);
449    }
450    public String getCheckerboard() {
451      java.lang.Object ref = checkerboard_;
452      if (ref instanceof String) {
453        return (String) ref;
454      } else {
455        com.google.protobuf.ByteString bs =
456            (com.google.protobuf.ByteString) ref;
457        String s = bs.toStringUtf8();
458        if (com.google.protobuf.Internal.isValidUtf8(bs)) {
459          checkerboard_ = s;
460        }
461        return s;
462      }
463    }
464    private com.google.protobuf.ByteString getCheckerboardBytes() {
465      java.lang.Object ref = checkerboard_;
466      if (ref instanceof String) {
467        com.google.protobuf.ByteString b =
468            com.google.protobuf.ByteString.copyFromUtf8((String) ref);
469        checkerboard_ = b;
470        return b;
471      } else {
472        return (com.google.protobuf.ByteString) ref;
473      }
474    }
475
476    private void initFields() {
477      solved_ = false;
478      checkerboard_ = "";
479    }
480    private byte memoizedIsInitialized = -1;
481    public final boolean isInitialized() {
482      byte isInitialized = memoizedIsInitialized;
483      if (isInitialized != -1) return isInitialized == 1;
484
485      memoizedIsInitialized = 1;
486      return true;
487    }
488
489    public void writeTo(com.google.protobuf.CodedOutputStream output)
490                        throws java.io.IOException {
491      getSerializedSize();
492      if (((bitField0_ & 0x00000001) == 0x00000001)) {
493        output.writeBool(1, solved_);
494      }
495      if (((bitField0_ & 0x00000002) == 0x00000002)) {
496        output.writeBytes(2, getCheckerboardBytes());
497      }
498      getUnknownFields().writeTo(output);
499    }
500
501    private int memoizedSerializedSize = -1;
502    public int getSerializedSize() {
503      int size = memoizedSerializedSize;
504      if (size != -1) return size;
505
506      size = 0;
507      if (((bitField0_ & 0x00000001) == 0x00000001)) {
508        size += com.google.protobuf.CodedOutputStream
509          .computeBoolSize(1, solved_);
510      }
511      if (((bitField0_ & 0x00000002) == 0x00000002)) {
512        size += com.google.protobuf.CodedOutputStream
513          .computeBytesSize(2, getCheckerboardBytes());
514      }
515      size += getUnknownFields().getSerializedSize();
516      memoizedSerializedSize = size;
517      return size;
518    }
519
520    private static final long serialVersionUID = 0L;
521    @java.lang.Override
522    protected java.lang.Object writeReplace()
523        throws java.io.ObjectStreamException {
524      return super.writeReplace();
525    }
526
527    public static sudoku.Sudoku.SudokuResponse parseFrom(
528        com.google.protobuf.ByteString data)
529        throws com.google.protobuf.InvalidProtocolBufferException {
530      return newBuilder().mergeFrom(data).buildParsed();
531    }
532    public static sudoku.Sudoku.SudokuResponse parseFrom(
533        com.google.protobuf.ByteString data,
534        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
535        throws com.google.protobuf.InvalidProtocolBufferException {
536      return newBuilder().mergeFrom(data, extensionRegistry)
537               .buildParsed();
538    }
539    public static sudoku.Sudoku.SudokuResponse parseFrom(byte[] data)
540        throws com.google.protobuf.InvalidProtocolBufferException {
541      return newBuilder().mergeFrom(data).buildParsed();
542    }
543    public static sudoku.Sudoku.SudokuResponse parseFrom(
544        byte[] data,
545        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
546        throws com.google.protobuf.InvalidProtocolBufferException {
547      return newBuilder().mergeFrom(data, extensionRegistry)
548               .buildParsed();
549    }
550    public static sudoku.Sudoku.SudokuResponse parseFrom(java.io.InputStream input)
551        throws java.io.IOException {
552      return newBuilder().mergeFrom(input).buildParsed();
553    }
554    public static sudoku.Sudoku.SudokuResponse parseFrom(
555        java.io.InputStream input,
556        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
557        throws java.io.IOException {
558      return newBuilder().mergeFrom(input, extensionRegistry)
559               .buildParsed();
560    }
561    public static sudoku.Sudoku.SudokuResponse parseDelimitedFrom(java.io.InputStream input)
562        throws java.io.IOException {
563      Builder builder = newBuilder();
564      if (builder.mergeDelimitedFrom(input)) {
565        return builder.buildParsed();
566      } else {
567        return null;
568      }
569    }
570    public static sudoku.Sudoku.SudokuResponse parseDelimitedFrom(
571        java.io.InputStream input,
572        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
573        throws java.io.IOException {
574      Builder builder = newBuilder();
575      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
576        return builder.buildParsed();
577      } else {
578        return null;
579      }
580    }
581    public static sudoku.Sudoku.SudokuResponse parseFrom(
582        com.google.protobuf.CodedInputStream input)
583        throws java.io.IOException {
584      return newBuilder().mergeFrom(input).buildParsed();
585    }
586    public static sudoku.Sudoku.SudokuResponse parseFrom(
587        com.google.protobuf.CodedInputStream input,
588        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
589        throws java.io.IOException {
590      return newBuilder().mergeFrom(input, extensionRegistry)
591               .buildParsed();
592    }
593
594    public static Builder newBuilder() { return Builder.create(); }
595    public Builder newBuilderForType() { return newBuilder(); }
596    public static Builder newBuilder(sudoku.Sudoku.SudokuResponse prototype) {
597      return newBuilder().mergeFrom(prototype);
598    }
599    public Builder toBuilder() { return newBuilder(this); }
600
601    @java.lang.Override
602    protected Builder newBuilderForType(
603        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
604      Builder builder = new Builder(parent);
605      return builder;
606    }
607    public static final class Builder extends
608        com.google.protobuf.GeneratedMessage.Builder<Builder>
609       implements sudoku.Sudoku.SudokuResponseOrBuilder {
610      public static final com.google.protobuf.Descriptors.Descriptor
611          getDescriptor() {
612        return sudoku.Sudoku.internal_static_sudoku_SudokuResponse_descriptor;
613      }
614
615      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
616          internalGetFieldAccessorTable() {
617        return sudoku.Sudoku.internal_static_sudoku_SudokuResponse_fieldAccessorTable;
618      }
619
620      // Construct using sudoku.Sudoku.SudokuResponse.newBuilder()
621      private Builder() {
622        maybeForceBuilderInitialization();
623      }
624
625      private Builder(BuilderParent parent) {
626        super(parent);
627        maybeForceBuilderInitialization();
628      }
629      private void maybeForceBuilderInitialization() {
630        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
631        }
632      }
633      private static Builder create() {
634        return new Builder();
635      }
636
637      public Builder clear() {
638        super.clear();
639        solved_ = false;
640        bitField0_ = (bitField0_ & ~0x00000001);
641        checkerboard_ = "";
642        bitField0_ = (bitField0_ & ~0x00000002);
643        return this;
644      }
645
646      public Builder clone() {
647        return create().mergeFrom(buildPartial());
648      }
649
650      public com.google.protobuf.Descriptors.Descriptor
651          getDescriptorForType() {
652        return sudoku.Sudoku.SudokuResponse.getDescriptor();
653      }
654
655      public sudoku.Sudoku.SudokuResponse getDefaultInstanceForType() {
656        return sudoku.Sudoku.SudokuResponse.getDefaultInstance();
657      }
658
659      public sudoku.Sudoku.SudokuResponse build() {
660        sudoku.Sudoku.SudokuResponse result = buildPartial();
661        if (!result.isInitialized()) {
662          throw newUninitializedMessageException(result);
663        }
664        return result;
665      }
666
667      private sudoku.Sudoku.SudokuResponse buildParsed()
668          throws com.google.protobuf.InvalidProtocolBufferException {
669        sudoku.Sudoku.SudokuResponse result = buildPartial();
670        if (!result.isInitialized()) {
671          throw newUninitializedMessageException(
672            result).asInvalidProtocolBufferException();
673        }
674        return result;
675      }
676
677      public sudoku.Sudoku.SudokuResponse buildPartial() {
678        sudoku.Sudoku.SudokuResponse result = new sudoku.Sudoku.SudokuResponse(this);
679        int from_bitField0_ = bitField0_;
680        int to_bitField0_ = 0;
681        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
682          to_bitField0_ |= 0x00000001;
683        }
684        result.solved_ = solved_;
685        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
686          to_bitField0_ |= 0x00000002;
687        }
688        result.checkerboard_ = checkerboard_;
689        result.bitField0_ = to_bitField0_;
690        onBuilt();
691        return result;
692      }
693
694      public Builder mergeFrom(com.google.protobuf.Message other) {
695        if (other instanceof sudoku.Sudoku.SudokuResponse) {
696          return mergeFrom((sudoku.Sudoku.SudokuResponse)other);
697        } else {
698          super.mergeFrom(other);
699          return this;
700        }
701      }
702
703      public Builder mergeFrom(sudoku.Sudoku.SudokuResponse other) {
704        if (other == sudoku.Sudoku.SudokuResponse.getDefaultInstance()) return this;
705        if (other.hasSolved()) {
706          setSolved(other.getSolved());
707        }
708        if (other.hasCheckerboard()) {
709          setCheckerboard(other.getCheckerboard());
710        }
711        this.mergeUnknownFields(other.getUnknownFields());
712        return this;
713      }
714
715      public final boolean isInitialized() {
716        return true;
717      }
718
719      public Builder mergeFrom(
720          com.google.protobuf.CodedInputStream input,
721          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
722          throws java.io.IOException {
723        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
724          com.google.protobuf.UnknownFieldSet.newBuilder(
725            this.getUnknownFields());
726        while (true) {
727          int tag = input.readTag();
728          switch (tag) {
729            case 0:
730              this.setUnknownFields(unknownFields.build());
731              onChanged();
732              return this;
733            default: {
734              if (!parseUnknownField(input, unknownFields,
735                                     extensionRegistry, tag)) {
736                this.setUnknownFields(unknownFields.build());
737                onChanged();
738                return this;
739              }
740              break;
741            }
742            case 8: {
743              bitField0_ |= 0x00000001;
744              solved_ = input.readBool();
745              break;
746            }
747            case 18: {
748              bitField0_ |= 0x00000002;
749              checkerboard_ = input.readBytes();
750              break;
751            }
752          }
753        }
754      }
755
756      private int bitField0_;
757
758      // optional bool solved = 1 [default = false];
759      private boolean solved_ ;
760      public boolean hasSolved() {
761        return ((bitField0_ & 0x00000001) == 0x00000001);
762      }
763      public boolean getSolved() {
764        return solved_;
765      }
766      public Builder setSolved(boolean value) {
767        bitField0_ |= 0x00000001;
768        solved_ = value;
769        onChanged();
770        return this;
771      }
772      public Builder clearSolved() {
773        bitField0_ = (bitField0_ & ~0x00000001);
774        solved_ = false;
775        onChanged();
776        return this;
777      }
778
779      // optional string checkerboard = 2;
780      private java.lang.Object checkerboard_ = "";
781      public boolean hasCheckerboard() {
782        return ((bitField0_ & 0x00000002) == 0x00000002);
783      }
784      public String getCheckerboard() {
785        java.lang.Object ref = checkerboard_;
786        if (!(ref instanceof String)) {
787          String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
788          checkerboard_ = s;
789          return s;
790        } else {
791          return (String) ref;
792        }
793      }
794      public Builder setCheckerboard(String value) {
795        if (value == null) {
796    throw new NullPointerException();
797  }
798  bitField0_ |= 0x00000002;
799        checkerboard_ = value;
800        onChanged();
801        return this;
802      }
803      public Builder clearCheckerboard() {
804        bitField0_ = (bitField0_ & ~0x00000002);
805        checkerboard_ = getDefaultInstance().getCheckerboard();
806        onChanged();
807        return this;
808      }
809      void setCheckerboard(com.google.protobuf.ByteString value) {
810        bitField0_ |= 0x00000002;
811        checkerboard_ = value;
812        onChanged();
813      }
814
815      // @@protoc_insertion_point(builder_scope:sudoku.SudokuResponse)
816    }
817
818    static {
819      defaultInstance = new SudokuResponse(true);
820      defaultInstance.initFields();
821    }
822
823    // @@protoc_insertion_point(class_scope:sudoku.SudokuResponse)
824  }
825
826  public static abstract class SudokuService
827      implements com.google.protobuf.Service {
828    protected SudokuService() {}
829
830    public interface Interface {
831      public abstract void solve(
832          com.google.protobuf.RpcController controller,
833          sudoku.Sudoku.SudokuRequest request,
834          com.google.protobuf.RpcCallback<sudoku.Sudoku.SudokuResponse> done);
835
836    }
837
838    public static com.google.protobuf.Service newReflectiveService(
839        final Interface impl) {
840      return new SudokuService() {
841        @java.lang.Override
842        public  void solve(
843            com.google.protobuf.RpcController controller,
844            sudoku.Sudoku.SudokuRequest request,
845            com.google.protobuf.RpcCallback<sudoku.Sudoku.SudokuResponse> done) {
846          impl.solve(controller, request, done);
847        }
848
849      };
850    }
851
852    public static com.google.protobuf.BlockingService
853        newReflectiveBlockingService(final BlockingInterface impl) {
854      return new com.google.protobuf.BlockingService() {
855        public final com.google.protobuf.Descriptors.ServiceDescriptor
856            getDescriptorForType() {
857          return getDescriptor();
858        }
859
860        public final com.google.protobuf.Message callBlockingMethod(
861            com.google.protobuf.Descriptors.MethodDescriptor method,
862            com.google.protobuf.RpcController controller,
863            com.google.protobuf.Message request)
864            throws com.google.protobuf.ServiceException {
865          if (method.getService() != getDescriptor()) {
866            throw new java.lang.IllegalArgumentException(
867              "Service.callBlockingMethod() given method descriptor for " +
868              "wrong service type.");
869          }
870          switch(method.getIndex()) {
871            case 0:
872              return impl.solve(controller, (sudoku.Sudoku.SudokuRequest)request);
873            default:
874              throw new java.lang.AssertionError("Can't get here.");
875          }
876        }
877
878        public final com.google.protobuf.Message
879            getRequestPrototype(
880            com.google.protobuf.Descriptors.MethodDescriptor method) {
881          if (method.getService() != getDescriptor()) {
882            throw new java.lang.IllegalArgumentException(
883              "Service.getRequestPrototype() given method " +
884              "descriptor for wrong service type.");
885          }
886          switch(method.getIndex()) {
887            case 0:
888              return sudoku.Sudoku.SudokuRequest.getDefaultInstance();
889            default:
890              throw new java.lang.AssertionError("Can't get here.");
891          }
892        }
893
894        public final com.google.protobuf.Message
895            getResponsePrototype(
896            com.google.protobuf.Descriptors.MethodDescriptor method) {
897          if (method.getService() != getDescriptor()) {
898            throw new java.lang.IllegalArgumentException(
899              "Service.getResponsePrototype() given method " +
900              "descriptor for wrong service type.");
901          }
902          switch(method.getIndex()) {
903            case 0:
904              return sudoku.Sudoku.SudokuResponse.getDefaultInstance();
905            default:
906              throw new java.lang.AssertionError("Can't get here.");
907          }
908        }
909
910      };
911    }
912
913    public abstract void solve(
914        com.google.protobuf.RpcController controller,
915        sudoku.Sudoku.SudokuRequest request,
916        com.google.protobuf.RpcCallback<sudoku.Sudoku.SudokuResponse> done);
917
918    public static final
919        com.google.protobuf.Descriptors.ServiceDescriptor
920        getDescriptor() {
921      return sudoku.Sudoku.getDescriptor().getServices().get(0);
922    }
923    public final com.google.protobuf.Descriptors.ServiceDescriptor
924        getDescriptorForType() {
925      return getDescriptor();
926    }
927
928    public final void callMethod(
929        com.google.protobuf.Descriptors.MethodDescriptor method,
930        com.google.protobuf.RpcController controller,
931        com.google.protobuf.Message request,
932        com.google.protobuf.RpcCallback<
933          com.google.protobuf.Message> done) {
934      if (method.getService() != getDescriptor()) {
935        throw new java.lang.IllegalArgumentException(
936          "Service.callMethod() given method descriptor for wrong " +
937          "service type.");
938      }
939      switch(method.getIndex()) {
940        case 0:
941          this.solve(controller, (sudoku.Sudoku.SudokuRequest)request,
942            com.google.protobuf.RpcUtil.<sudoku.Sudoku.SudokuResponse>specializeCallback(
943              done));
944          return;
945        default:
946          throw new java.lang.AssertionError("Can't get here.");
947      }
948    }
949
950    public final com.google.protobuf.Message
951        getRequestPrototype(
952        com.google.protobuf.Descriptors.MethodDescriptor method) {
953      if (method.getService() != getDescriptor()) {
954        throw new java.lang.IllegalArgumentException(
955          "Service.getRequestPrototype() given method " +
956          "descriptor for wrong service type.");
957      }
958      switch(method.getIndex()) {
959        case 0:
960          return sudoku.Sudoku.SudokuRequest.getDefaultInstance();
961        default:
962          throw new java.lang.AssertionError("Can't get here.");
963      }
964    }
965
966    public final com.google.protobuf.Message
967        getResponsePrototype(
968        com.google.protobuf.Descriptors.MethodDescriptor method) {
969      if (method.getService() != getDescriptor()) {
970        throw new java.lang.IllegalArgumentException(
971          "Service.getResponsePrototype() given method " +
972          "descriptor for wrong service type.");
973      }
974      switch(method.getIndex()) {
975        case 0:
976          return sudoku.Sudoku.SudokuResponse.getDefaultInstance();
977        default:
978          throw new java.lang.AssertionError("Can't get here.");
979      }
980    }
981
982    public static Stub newStub(
983        com.google.protobuf.RpcChannel channel) {
984      return new Stub(channel);
985    }
986
987    public static final class Stub extends sudoku.Sudoku.SudokuService implements Interface {
988      private Stub(com.google.protobuf.RpcChannel channel) {
989        this.channel = channel;
990      }
991
992      private final com.google.protobuf.RpcChannel channel;
993
994      public com.google.protobuf.RpcChannel getChannel() {
995        return channel;
996      }
997
998      public  void solve(
999          com.google.protobuf.RpcController controller,
1000          sudoku.Sudoku.SudokuRequest request,
1001          com.google.protobuf.RpcCallback<sudoku.Sudoku.SudokuResponse> done) {
1002        channel.callMethod(
1003          getDescriptor().getMethods().get(0),
1004          controller,
1005          request,
1006          sudoku.Sudoku.SudokuResponse.getDefaultInstance(),
1007          com.google.protobuf.RpcUtil.generalizeCallback(
1008            done,
1009            sudoku.Sudoku.SudokuResponse.class,
1010            sudoku.Sudoku.SudokuResponse.getDefaultInstance()));
1011      }
1012    }
1013
1014    public static BlockingInterface newBlockingStub(
1015        com.google.protobuf.BlockingRpcChannel channel) {
1016      return new BlockingStub(channel);
1017    }
1018
1019    public interface BlockingInterface {
1020      public sudoku.Sudoku.SudokuResponse solve(
1021          com.google.protobuf.RpcController controller,
1022          sudoku.Sudoku.SudokuRequest request)
1023          throws com.google.protobuf.ServiceException;
1024    }
1025
1026    private static final class BlockingStub implements BlockingInterface {
1027      private BlockingStub(com.google.protobuf.BlockingRpcChannel channel) {
1028        this.channel = channel;
1029      }
1030
1031      private final com.google.protobuf.BlockingRpcChannel channel;
1032
1033      public sudoku.Sudoku.SudokuResponse solve(
1034          com.google.protobuf.RpcController controller,
1035          sudoku.Sudoku.SudokuRequest request)
1036          throws com.google.protobuf.ServiceException {
1037        return (sudoku.Sudoku.SudokuResponse) channel.callBlockingMethod(
1038          getDescriptor().getMethods().get(0),
1039          controller,
1040          request,
1041          sudoku.Sudoku.SudokuResponse.getDefaultInstance());
1042      }
1043
1044    }
1045  }
1046
1047  private static com.google.protobuf.Descriptors.Descriptor
1048    internal_static_sudoku_SudokuRequest_descriptor;
1049  private static
1050    com.google.protobuf.GeneratedMessage.FieldAccessorTable
1051      internal_static_sudoku_SudokuRequest_fieldAccessorTable;
1052  private static com.google.protobuf.Descriptors.Descriptor
1053    internal_static_sudoku_SudokuResponse_descriptor;
1054  private static
1055    com.google.protobuf.GeneratedMessage.FieldAccessorTable
1056      internal_static_sudoku_SudokuResponse_fieldAccessorTable;
1057
1058  public static com.google.protobuf.Descriptors.FileDescriptor
1059      getDescriptor() {
1060    return descriptor;
1061  }
1062  private static com.google.protobuf.Descriptors.FileDescriptor
1063      descriptor;
1064  static {
1065    java.lang.String[] descriptorData = {
1066      "\n\014sudoku.proto\022\006sudoku\"%\n\rSudokuRequest\022" +
1067      "\024\n\014checkerboard\030\001 \002(\t\"=\n\016SudokuResponse\022" +
1068      "\025\n\006solved\030\001 \001(\010:\005false\022\024\n\014checkerboard\030\002" +
1069      " \001(\t2G\n\rSudokuService\0226\n\005Solve\022\025.sudoku." +
1070      "SudokuRequest\032\026.sudoku.SudokuResponseB\t\200" +
1071      "\001\001\210\001\001\220\001\001"
1072    };
1073    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
1074      new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
1075        public com.google.protobuf.ExtensionRegistry assignDescriptors(
1076            com.google.protobuf.Descriptors.FileDescriptor root) {
1077          descriptor = root;
1078          internal_static_sudoku_SudokuRequest_descriptor =
1079            getDescriptor().getMessageTypes().get(0);
1080          internal_static_sudoku_SudokuRequest_fieldAccessorTable = new
1081            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
1082              internal_static_sudoku_SudokuRequest_descriptor,
1083              new java.lang.String[] { "Checkerboard", },
1084              sudoku.Sudoku.SudokuRequest.class,
1085              sudoku.Sudoku.SudokuRequest.Builder.class);
1086          internal_static_sudoku_SudokuResponse_descriptor =
1087            getDescriptor().getMessageTypes().get(1);
1088          internal_static_sudoku_SudokuResponse_fieldAccessorTable = new
1089            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
1090              internal_static_sudoku_SudokuResponse_descriptor,
1091              new java.lang.String[] { "Solved", "Checkerboard", },
1092              sudoku.Sudoku.SudokuResponse.class,
1093              sudoku.Sudoku.SudokuResponse.Builder.class);
1094          return null;
1095        }
1096      };
1097    com.google.protobuf.Descriptors.FileDescriptor
1098      .internalBuildGeneratedFileFrom(descriptorData,
1099        new com.google.protobuf.Descriptors.FileDescriptor[] {
1100        }, assigner);
1101  }
1102
1103  // @@protoc_insertion_point(outer_class_scope)
1104}
1105