This repository has been archived by the owner on Sep 16, 2023. It is now read-only.
/
CheckError.java
1849 lines (1742 loc) · 50.9 KB
/
CheckError.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/servicecontrol/v1/check_error.proto
package com.google.api.servicecontrol.v1;
/**
*
*
* <pre>
* Defines the errors to be returned in
* [google.api.servicecontrol.v1.CheckResponse.check_errors][google.api.servicecontrol.v1.CheckResponse.check_errors].
* </pre>
*
* Protobuf type {@code google.api.servicecontrol.v1.CheckError}
*/
public final class CheckError extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.api.servicecontrol.v1.CheckError)
CheckErrorOrBuilder {
private static final long serialVersionUID = 0L;
// Use CheckError.newBuilder() to construct.
private CheckError(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private CheckError() {
code_ = 0;
subject_ = "";
detail_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new CheckError();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private CheckError(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
int rawValue = input.readEnum();
code_ = rawValue;
break;
}
case 18:
{
java.lang.String s = input.readStringRequireUtf8();
detail_ = s;
break;
}
case 26:
{
com.google.rpc.Status.Builder subBuilder = null;
if (status_ != null) {
subBuilder = status_.toBuilder();
}
status_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(status_);
status_ = subBuilder.buildPartial();
}
break;
}
case 34:
{
java.lang.String s = input.readStringRequireUtf8();
subject_ = s;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.api.servicecontrol.v1.CheckErrorProto
.internal_static_google_api_servicecontrol_v1_CheckError_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.servicecontrol.v1.CheckErrorProto
.internal_static_google_api_servicecontrol_v1_CheckError_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.servicecontrol.v1.CheckError.class,
com.google.api.servicecontrol.v1.CheckError.Builder.class);
}
/**
*
*
* <pre>
* Error codes for Check responses.
* </pre>
*
* Protobuf enum {@code google.api.servicecontrol.v1.CheckError.Code}
*/
public enum Code implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
* <pre>
* This is never used in `CheckResponse`.
* </pre>
*
* <code>ERROR_CODE_UNSPECIFIED = 0;</code>
*/
ERROR_CODE_UNSPECIFIED(0),
/**
*
*
* <pre>
* The consumer's project id, network container, or resource container was
* not found. Same as [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND].
* </pre>
*
* <code>NOT_FOUND = 5;</code>
*/
NOT_FOUND(5),
/**
*
*
* <pre>
* The consumer doesn't have access to the specified resource.
* Same as [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
* </pre>
*
* <code>PERMISSION_DENIED = 7;</code>
*/
PERMISSION_DENIED(7),
/**
*
*
* <pre>
* Quota check failed. Same as [google.rpc.Code.RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED].
* </pre>
*
* <code>RESOURCE_EXHAUSTED = 8;</code>
*/
RESOURCE_EXHAUSTED(8),
/**
*
*
* <pre>
* The consumer hasn't activated the service.
* </pre>
*
* <code>SERVICE_NOT_ACTIVATED = 104;</code>
*/
SERVICE_NOT_ACTIVATED(104),
/**
*
*
* <pre>
* The consumer cannot access the service because billing is disabled.
* </pre>
*
* <code>BILLING_DISABLED = 107;</code>
*/
BILLING_DISABLED(107),
/**
*
*
* <pre>
* The consumer's project has been marked as deleted (soft deletion).
* </pre>
*
* <code>PROJECT_DELETED = 108;</code>
*/
PROJECT_DELETED(108),
/**
*
*
* <pre>
* The consumer's project number or id does not represent a valid project.
* </pre>
*
* <code>PROJECT_INVALID = 114;</code>
*/
PROJECT_INVALID(114),
/**
*
*
* <pre>
* The input consumer info does not represent a valid consumer folder or
* organization.
* </pre>
*
* <code>CONSUMER_INVALID = 125;</code>
*/
CONSUMER_INVALID(125),
/**
*
*
* <pre>
* The IP address of the consumer is invalid for the specific consumer
* project.
* </pre>
*
* <code>IP_ADDRESS_BLOCKED = 109;</code>
*/
IP_ADDRESS_BLOCKED(109),
/**
*
*
* <pre>
* The referer address of the consumer request is invalid for the specific
* consumer project.
* </pre>
*
* <code>REFERER_BLOCKED = 110;</code>
*/
REFERER_BLOCKED(110),
/**
*
*
* <pre>
* The client application of the consumer request is invalid for the
* specific consumer project.
* </pre>
*
* <code>CLIENT_APP_BLOCKED = 111;</code>
*/
CLIENT_APP_BLOCKED(111),
/**
*
*
* <pre>
* The API targeted by this request is invalid for the specified consumer
* project.
* </pre>
*
* <code>API_TARGET_BLOCKED = 122;</code>
*/
API_TARGET_BLOCKED(122),
/**
*
*
* <pre>
* The consumer's API key is invalid.
* </pre>
*
* <code>API_KEY_INVALID = 105;</code>
*/
API_KEY_INVALID(105),
/**
*
*
* <pre>
* The consumer's API Key has expired.
* </pre>
*
* <code>API_KEY_EXPIRED = 112;</code>
*/
API_KEY_EXPIRED(112),
/**
*
*
* <pre>
* The consumer's API Key was not found in config record.
* </pre>
*
* <code>API_KEY_NOT_FOUND = 113;</code>
*/
API_KEY_NOT_FOUND(113),
/**
*
*
* <pre>
* The credential in the request can not be verified.
* </pre>
*
* <code>INVALID_CREDENTIAL = 123;</code>
*/
INVALID_CREDENTIAL(123),
/**
*
*
* <pre>
* The backend server for looking up project id/number is unavailable.
* </pre>
*
* <code>NAMESPACE_LOOKUP_UNAVAILABLE = 300;</code>
*/
NAMESPACE_LOOKUP_UNAVAILABLE(300),
/**
*
*
* <pre>
* The backend server for checking service status is unavailable.
* </pre>
*
* <code>SERVICE_STATUS_UNAVAILABLE = 301;</code>
*/
SERVICE_STATUS_UNAVAILABLE(301),
/**
*
*
* <pre>
* The backend server for checking billing status is unavailable.
* </pre>
*
* <code>BILLING_STATUS_UNAVAILABLE = 302;</code>
*/
BILLING_STATUS_UNAVAILABLE(302),
/**
*
*
* <pre>
* Cloud Resource Manager backend server is unavailable.
* </pre>
*
* <code>CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE = 305;</code>
*/
CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE(305),
UNRECOGNIZED(-1),
;
/**
*
*
* <pre>
* This is never used in `CheckResponse`.
* </pre>
*
* <code>ERROR_CODE_UNSPECIFIED = 0;</code>
*/
public static final int ERROR_CODE_UNSPECIFIED_VALUE = 0;
/**
*
*
* <pre>
* The consumer's project id, network container, or resource container was
* not found. Same as [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND].
* </pre>
*
* <code>NOT_FOUND = 5;</code>
*/
public static final int NOT_FOUND_VALUE = 5;
/**
*
*
* <pre>
* The consumer doesn't have access to the specified resource.
* Same as [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
* </pre>
*
* <code>PERMISSION_DENIED = 7;</code>
*/
public static final int PERMISSION_DENIED_VALUE = 7;
/**
*
*
* <pre>
* Quota check failed. Same as [google.rpc.Code.RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED].
* </pre>
*
* <code>RESOURCE_EXHAUSTED = 8;</code>
*/
public static final int RESOURCE_EXHAUSTED_VALUE = 8;
/**
*
*
* <pre>
* The consumer hasn't activated the service.
* </pre>
*
* <code>SERVICE_NOT_ACTIVATED = 104;</code>
*/
public static final int SERVICE_NOT_ACTIVATED_VALUE = 104;
/**
*
*
* <pre>
* The consumer cannot access the service because billing is disabled.
* </pre>
*
* <code>BILLING_DISABLED = 107;</code>
*/
public static final int BILLING_DISABLED_VALUE = 107;
/**
*
*
* <pre>
* The consumer's project has been marked as deleted (soft deletion).
* </pre>
*
* <code>PROJECT_DELETED = 108;</code>
*/
public static final int PROJECT_DELETED_VALUE = 108;
/**
*
*
* <pre>
* The consumer's project number or id does not represent a valid project.
* </pre>
*
* <code>PROJECT_INVALID = 114;</code>
*/
public static final int PROJECT_INVALID_VALUE = 114;
/**
*
*
* <pre>
* The input consumer info does not represent a valid consumer folder or
* organization.
* </pre>
*
* <code>CONSUMER_INVALID = 125;</code>
*/
public static final int CONSUMER_INVALID_VALUE = 125;
/**
*
*
* <pre>
* The IP address of the consumer is invalid for the specific consumer
* project.
* </pre>
*
* <code>IP_ADDRESS_BLOCKED = 109;</code>
*/
public static final int IP_ADDRESS_BLOCKED_VALUE = 109;
/**
*
*
* <pre>
* The referer address of the consumer request is invalid for the specific
* consumer project.
* </pre>
*
* <code>REFERER_BLOCKED = 110;</code>
*/
public static final int REFERER_BLOCKED_VALUE = 110;
/**
*
*
* <pre>
* The client application of the consumer request is invalid for the
* specific consumer project.
* </pre>
*
* <code>CLIENT_APP_BLOCKED = 111;</code>
*/
public static final int CLIENT_APP_BLOCKED_VALUE = 111;
/**
*
*
* <pre>
* The API targeted by this request is invalid for the specified consumer
* project.
* </pre>
*
* <code>API_TARGET_BLOCKED = 122;</code>
*/
public static final int API_TARGET_BLOCKED_VALUE = 122;
/**
*
*
* <pre>
* The consumer's API key is invalid.
* </pre>
*
* <code>API_KEY_INVALID = 105;</code>
*/
public static final int API_KEY_INVALID_VALUE = 105;
/**
*
*
* <pre>
* The consumer's API Key has expired.
* </pre>
*
* <code>API_KEY_EXPIRED = 112;</code>
*/
public static final int API_KEY_EXPIRED_VALUE = 112;
/**
*
*
* <pre>
* The consumer's API Key was not found in config record.
* </pre>
*
* <code>API_KEY_NOT_FOUND = 113;</code>
*/
public static final int API_KEY_NOT_FOUND_VALUE = 113;
/**
*
*
* <pre>
* The credential in the request can not be verified.
* </pre>
*
* <code>INVALID_CREDENTIAL = 123;</code>
*/
public static final int INVALID_CREDENTIAL_VALUE = 123;
/**
*
*
* <pre>
* The backend server for looking up project id/number is unavailable.
* </pre>
*
* <code>NAMESPACE_LOOKUP_UNAVAILABLE = 300;</code>
*/
public static final int NAMESPACE_LOOKUP_UNAVAILABLE_VALUE = 300;
/**
*
*
* <pre>
* The backend server for checking service status is unavailable.
* </pre>
*
* <code>SERVICE_STATUS_UNAVAILABLE = 301;</code>
*/
public static final int SERVICE_STATUS_UNAVAILABLE_VALUE = 301;
/**
*
*
* <pre>
* The backend server for checking billing status is unavailable.
* </pre>
*
* <code>BILLING_STATUS_UNAVAILABLE = 302;</code>
*/
public static final int BILLING_STATUS_UNAVAILABLE_VALUE = 302;
/**
*
*
* <pre>
* Cloud Resource Manager backend server is unavailable.
* </pre>
*
* <code>CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE = 305;</code>
*/
public static final int CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE_VALUE = 305;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Code valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static Code forNumber(int value) {
switch (value) {
case 0:
return ERROR_CODE_UNSPECIFIED;
case 5:
return NOT_FOUND;
case 7:
return PERMISSION_DENIED;
case 8:
return RESOURCE_EXHAUSTED;
case 104:
return SERVICE_NOT_ACTIVATED;
case 107:
return BILLING_DISABLED;
case 108:
return PROJECT_DELETED;
case 114:
return PROJECT_INVALID;
case 125:
return CONSUMER_INVALID;
case 109:
return IP_ADDRESS_BLOCKED;
case 110:
return REFERER_BLOCKED;
case 111:
return CLIENT_APP_BLOCKED;
case 122:
return API_TARGET_BLOCKED;
case 105:
return API_KEY_INVALID;
case 112:
return API_KEY_EXPIRED;
case 113:
return API_KEY_NOT_FOUND;
case 123:
return INVALID_CREDENTIAL;
case 300:
return NAMESPACE_LOOKUP_UNAVAILABLE;
case 301:
return SERVICE_STATUS_UNAVAILABLE;
case 302:
return BILLING_STATUS_UNAVAILABLE;
case 305:
return CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<Code> internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<Code> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<Code>() {
public Code findValueByNumber(int number) {
return Code.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.api.servicecontrol.v1.CheckError.getDescriptor().getEnumTypes().get(0);
}
private static final Code[] VALUES = values();
public static Code valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private Code(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.api.servicecontrol.v1.CheckError.Code)
}
public static final int CODE_FIELD_NUMBER = 1;
private int code_;
/**
*
*
* <pre>
* The error code.
* </pre>
*
* <code>.google.api.servicecontrol.v1.CheckError.Code code = 1;</code>
*
* @return The enum numeric value on the wire for code.
*/
@java.lang.Override
public int getCodeValue() {
return code_;
}
/**
*
*
* <pre>
* The error code.
* </pre>
*
* <code>.google.api.servicecontrol.v1.CheckError.Code code = 1;</code>
*
* @return The code.
*/
@java.lang.Override
public com.google.api.servicecontrol.v1.CheckError.Code getCode() {
@SuppressWarnings("deprecation")
com.google.api.servicecontrol.v1.CheckError.Code result =
com.google.api.servicecontrol.v1.CheckError.Code.valueOf(code_);
return result == null ? com.google.api.servicecontrol.v1.CheckError.Code.UNRECOGNIZED : result;
}
public static final int SUBJECT_FIELD_NUMBER = 4;
private volatile java.lang.Object subject_;
/**
*
*
* <pre>
* Subject to whom this error applies. See the specific code enum for more
* details on this field. For example:
* - "project:<project-id or project-number>"
* - "folder:<folder-id>"
* - "organization:<organization-id>"
* </pre>
*
* <code>string subject = 4;</code>
*
* @return The subject.
*/
@java.lang.Override
public java.lang.String getSubject() {
java.lang.Object ref = subject_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
subject_ = s;
return s;
}
}
/**
*
*
* <pre>
* Subject to whom this error applies. See the specific code enum for more
* details on this field. For example:
* - "project:<project-id or project-number>"
* - "folder:<folder-id>"
* - "organization:<organization-id>"
* </pre>
*
* <code>string subject = 4;</code>
*
* @return The bytes for subject.
*/
@java.lang.Override
public com.google.protobuf.ByteString getSubjectBytes() {
java.lang.Object ref = subject_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
subject_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DETAIL_FIELD_NUMBER = 2;
private volatile java.lang.Object detail_;
/**
*
*
* <pre>
* Free-form text providing details on the error cause of the error.
* </pre>
*
* <code>string detail = 2;</code>
*
* @return The detail.
*/
@java.lang.Override
public java.lang.String getDetail() {
java.lang.Object ref = detail_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
detail_ = s;
return s;
}
}
/**
*
*
* <pre>
* Free-form text providing details on the error cause of the error.
* </pre>
*
* <code>string detail = 2;</code>
*
* @return The bytes for detail.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDetailBytes() {
java.lang.Object ref = detail_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
detail_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STATUS_FIELD_NUMBER = 3;
private com.google.rpc.Status status_;
/**
*
*
* <pre>
* Contains public information about the check error. If available,
* `status.code` will be non zero and client can propagate it out as public
* error.
* </pre>
*
* <code>.google.rpc.Status status = 3;</code>
*
* @return Whether the status field is set.
*/
@java.lang.Override
public boolean hasStatus() {
return status_ != null;
}
/**
*
*
* <pre>
* Contains public information about the check error. If available,
* `status.code` will be non zero and client can propagate it out as public
* error.
* </pre>
*
* <code>.google.rpc.Status status = 3;</code>
*
* @return The status.
*/
@java.lang.Override
public com.google.rpc.Status getStatus() {
return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
}
/**
*
*
* <pre>
* Contains public information about the check error. If available,
* `status.code` will be non zero and client can propagate it out as public
* error.
* </pre>
*
* <code>.google.rpc.Status status = 3;</code>
*/
@java.lang.Override
public com.google.rpc.StatusOrBuilder getStatusOrBuilder() {
return getStatus();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (code_
!= com.google.api.servicecontrol.v1.CheckError.Code.ERROR_CODE_UNSPECIFIED.getNumber()) {
output.writeEnum(1, code_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, detail_);
}
if (status_ != null) {
output.writeMessage(3, getStatus());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subject_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, subject_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (code_
!= com.google.api.servicecontrol.v1.CheckError.Code.ERROR_CODE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, code_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, detail_);
}
if (status_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStatus());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subject_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, subject_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.api.servicecontrol.v1.CheckError)) {
return super.equals(obj);
}
com.google.api.servicecontrol.v1.CheckError other =
(com.google.api.servicecontrol.v1.CheckError) obj;
if (code_ != other.code_) return false;
if (!getSubject().equals(other.getSubject())) return false;
if (!getDetail().equals(other.getDetail())) return false;
if (hasStatus() != other.hasStatus()) return false;
if (hasStatus()) {
if (!getStatus().equals(other.getStatus())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CODE_FIELD_NUMBER;
hash = (53 * hash) + code_;
hash = (37 * hash) + SUBJECT_FIELD_NUMBER;
hash = (53 * hash) + getSubject().hashCode();
hash = (37 * hash) + DETAIL_FIELD_NUMBER;
hash = (53 * hash) + getDetail().hashCode();
if (hasStatus()) {
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + getStatus().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;