• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 // Generated by the protocol buffer compiler.  DO NOT EDIT!
17 // source: google/api/servicecontrol/v1/service_controller.proto
18 
19 package com.google.api.servicecontrol.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Request message for the Check method.
26  * </pre>
27  *
28  * Protobuf type {@code google.api.servicecontrol.v1.CheckRequest}
29  */
30 public final class CheckRequest extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.api.servicecontrol.v1.CheckRequest)
33     CheckRequestOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use CheckRequest.newBuilder() to construct.
CheckRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private CheckRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
CheckRequest()40   private CheckRequest() {
41     serviceName_ = "";
42     serviceConfigId_ = "";
43   }
44 
45   @java.lang.Override
46   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)47   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
48     return new CheckRequest();
49   }
50 
51   @java.lang.Override
getUnknownFields()52   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
53     return this.unknownFields;
54   }
55 
getDescriptor()56   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
57     return com.google.api.servicecontrol.v1.ServiceControllerProto
58         .internal_static_google_api_servicecontrol_v1_CheckRequest_descriptor;
59   }
60 
61   @java.lang.Override
62   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()63       internalGetFieldAccessorTable() {
64     return com.google.api.servicecontrol.v1.ServiceControllerProto
65         .internal_static_google_api_servicecontrol_v1_CheckRequest_fieldAccessorTable
66         .ensureFieldAccessorsInitialized(
67             com.google.api.servicecontrol.v1.CheckRequest.class,
68             com.google.api.servicecontrol.v1.CheckRequest.Builder.class);
69   }
70 
71   public static final int SERVICE_NAME_FIELD_NUMBER = 1;
72 
73   @SuppressWarnings("serial")
74   private volatile java.lang.Object serviceName_ = "";
75   /**
76    *
77    *
78    * <pre>
79    * The service name as specified in its service configuration. For example,
80    * `"pubsub.googleapis.com"`.
81    * See
82    * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)
83    * for the definition of a service name.
84    * </pre>
85    *
86    * <code>string service_name = 1;</code>
87    *
88    * @return The serviceName.
89    */
90   @java.lang.Override
getServiceName()91   public java.lang.String getServiceName() {
92     java.lang.Object ref = serviceName_;
93     if (ref instanceof java.lang.String) {
94       return (java.lang.String) ref;
95     } else {
96       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
97       java.lang.String s = bs.toStringUtf8();
98       serviceName_ = s;
99       return s;
100     }
101   }
102   /**
103    *
104    *
105    * <pre>
106    * The service name as specified in its service configuration. For example,
107    * `"pubsub.googleapis.com"`.
108    * See
109    * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)
110    * for the definition of a service name.
111    * </pre>
112    *
113    * <code>string service_name = 1;</code>
114    *
115    * @return The bytes for serviceName.
116    */
117   @java.lang.Override
getServiceNameBytes()118   public com.google.protobuf.ByteString getServiceNameBytes() {
119     java.lang.Object ref = serviceName_;
120     if (ref instanceof java.lang.String) {
121       com.google.protobuf.ByteString b =
122           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
123       serviceName_ = b;
124       return b;
125     } else {
126       return (com.google.protobuf.ByteString) ref;
127     }
128   }
129 
130   public static final int OPERATION_FIELD_NUMBER = 2;
131   private com.google.api.servicecontrol.v1.Operation operation_;
132   /**
133    *
134    *
135    * <pre>
136    * The operation to be checked.
137    * </pre>
138    *
139    * <code>.google.api.servicecontrol.v1.Operation operation = 2;</code>
140    *
141    * @return Whether the operation field is set.
142    */
143   @java.lang.Override
hasOperation()144   public boolean hasOperation() {
145     return operation_ != null;
146   }
147   /**
148    *
149    *
150    * <pre>
151    * The operation to be checked.
152    * </pre>
153    *
154    * <code>.google.api.servicecontrol.v1.Operation operation = 2;</code>
155    *
156    * @return The operation.
157    */
158   @java.lang.Override
getOperation()159   public com.google.api.servicecontrol.v1.Operation getOperation() {
160     return operation_ == null
161         ? com.google.api.servicecontrol.v1.Operation.getDefaultInstance()
162         : operation_;
163   }
164   /**
165    *
166    *
167    * <pre>
168    * The operation to be checked.
169    * </pre>
170    *
171    * <code>.google.api.servicecontrol.v1.Operation operation = 2;</code>
172    */
173   @java.lang.Override
getOperationOrBuilder()174   public com.google.api.servicecontrol.v1.OperationOrBuilder getOperationOrBuilder() {
175     return operation_ == null
176         ? com.google.api.servicecontrol.v1.Operation.getDefaultInstance()
177         : operation_;
178   }
179 
180   public static final int SERVICE_CONFIG_ID_FIELD_NUMBER = 4;
181 
182   @SuppressWarnings("serial")
183   private volatile java.lang.Object serviceConfigId_ = "";
184   /**
185    *
186    *
187    * <pre>
188    * Specifies which version of service configuration should be used to process
189    * the request.
190    * If unspecified or no matching version can be found, the
191    * latest one will be used.
192    * </pre>
193    *
194    * <code>string service_config_id = 4;</code>
195    *
196    * @return The serviceConfigId.
197    */
198   @java.lang.Override
getServiceConfigId()199   public java.lang.String getServiceConfigId() {
200     java.lang.Object ref = serviceConfigId_;
201     if (ref instanceof java.lang.String) {
202       return (java.lang.String) ref;
203     } else {
204       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
205       java.lang.String s = bs.toStringUtf8();
206       serviceConfigId_ = s;
207       return s;
208     }
209   }
210   /**
211    *
212    *
213    * <pre>
214    * Specifies which version of service configuration should be used to process
215    * the request.
216    * If unspecified or no matching version can be found, the
217    * latest one will be used.
218    * </pre>
219    *
220    * <code>string service_config_id = 4;</code>
221    *
222    * @return The bytes for serviceConfigId.
223    */
224   @java.lang.Override
getServiceConfigIdBytes()225   public com.google.protobuf.ByteString getServiceConfigIdBytes() {
226     java.lang.Object ref = serviceConfigId_;
227     if (ref instanceof java.lang.String) {
228       com.google.protobuf.ByteString b =
229           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
230       serviceConfigId_ = b;
231       return b;
232     } else {
233       return (com.google.protobuf.ByteString) ref;
234     }
235   }
236 
237   private byte memoizedIsInitialized = -1;
238 
239   @java.lang.Override
isInitialized()240   public final boolean isInitialized() {
241     byte isInitialized = memoizedIsInitialized;
242     if (isInitialized == 1) return true;
243     if (isInitialized == 0) return false;
244 
245     memoizedIsInitialized = 1;
246     return true;
247   }
248 
249   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)250   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
251     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) {
252       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_);
253     }
254     if (operation_ != null) {
255       output.writeMessage(2, getOperation());
256     }
257     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceConfigId_)) {
258       com.google.protobuf.GeneratedMessageV3.writeString(output, 4, serviceConfigId_);
259     }
260     getUnknownFields().writeTo(output);
261   }
262 
263   @java.lang.Override
getSerializedSize()264   public int getSerializedSize() {
265     int size = memoizedSize;
266     if (size != -1) return size;
267 
268     size = 0;
269     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) {
270       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_);
271     }
272     if (operation_ != null) {
273       size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOperation());
274     }
275     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceConfigId_)) {
276       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, serviceConfigId_);
277     }
278     size += getUnknownFields().getSerializedSize();
279     memoizedSize = size;
280     return size;
281   }
282 
283   @java.lang.Override
equals(final java.lang.Object obj)284   public boolean equals(final java.lang.Object obj) {
285     if (obj == this) {
286       return true;
287     }
288     if (!(obj instanceof com.google.api.servicecontrol.v1.CheckRequest)) {
289       return super.equals(obj);
290     }
291     com.google.api.servicecontrol.v1.CheckRequest other =
292         (com.google.api.servicecontrol.v1.CheckRequest) obj;
293 
294     if (!getServiceName().equals(other.getServiceName())) return false;
295     if (hasOperation() != other.hasOperation()) return false;
296     if (hasOperation()) {
297       if (!getOperation().equals(other.getOperation())) return false;
298     }
299     if (!getServiceConfigId().equals(other.getServiceConfigId())) return false;
300     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
301     return true;
302   }
303 
304   @java.lang.Override
hashCode()305   public int hashCode() {
306     if (memoizedHashCode != 0) {
307       return memoizedHashCode;
308     }
309     int hash = 41;
310     hash = (19 * hash) + getDescriptor().hashCode();
311     hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER;
312     hash = (53 * hash) + getServiceName().hashCode();
313     if (hasOperation()) {
314       hash = (37 * hash) + OPERATION_FIELD_NUMBER;
315       hash = (53 * hash) + getOperation().hashCode();
316     }
317     hash = (37 * hash) + SERVICE_CONFIG_ID_FIELD_NUMBER;
318     hash = (53 * hash) + getServiceConfigId().hashCode();
319     hash = (29 * hash) + getUnknownFields().hashCode();
320     memoizedHashCode = hash;
321     return hash;
322   }
323 
parseFrom(java.nio.ByteBuffer data)324   public static com.google.api.servicecontrol.v1.CheckRequest parseFrom(java.nio.ByteBuffer data)
325       throws com.google.protobuf.InvalidProtocolBufferException {
326     return PARSER.parseFrom(data);
327   }
328 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)329   public static com.google.api.servicecontrol.v1.CheckRequest parseFrom(
330       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
331       throws com.google.protobuf.InvalidProtocolBufferException {
332     return PARSER.parseFrom(data, extensionRegistry);
333   }
334 
parseFrom( com.google.protobuf.ByteString data)335   public static com.google.api.servicecontrol.v1.CheckRequest parseFrom(
336       com.google.protobuf.ByteString data)
337       throws com.google.protobuf.InvalidProtocolBufferException {
338     return PARSER.parseFrom(data);
339   }
340 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)341   public static com.google.api.servicecontrol.v1.CheckRequest parseFrom(
342       com.google.protobuf.ByteString data,
343       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
344       throws com.google.protobuf.InvalidProtocolBufferException {
345     return PARSER.parseFrom(data, extensionRegistry);
346   }
347 
parseFrom(byte[] data)348   public static com.google.api.servicecontrol.v1.CheckRequest parseFrom(byte[] data)
349       throws com.google.protobuf.InvalidProtocolBufferException {
350     return PARSER.parseFrom(data);
351   }
352 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)353   public static com.google.api.servicecontrol.v1.CheckRequest parseFrom(
354       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
355       throws com.google.protobuf.InvalidProtocolBufferException {
356     return PARSER.parseFrom(data, extensionRegistry);
357   }
358 
parseFrom(java.io.InputStream input)359   public static com.google.api.servicecontrol.v1.CheckRequest parseFrom(java.io.InputStream input)
360       throws java.io.IOException {
361     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
362   }
363 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)364   public static com.google.api.servicecontrol.v1.CheckRequest parseFrom(
365       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
366       throws java.io.IOException {
367     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
368         PARSER, input, extensionRegistry);
369   }
370 
parseDelimitedFrom( java.io.InputStream input)371   public static com.google.api.servicecontrol.v1.CheckRequest parseDelimitedFrom(
372       java.io.InputStream input) throws java.io.IOException {
373     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
374   }
375 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)376   public static com.google.api.servicecontrol.v1.CheckRequest parseDelimitedFrom(
377       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
378       throws java.io.IOException {
379     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
380         PARSER, input, extensionRegistry);
381   }
382 
parseFrom( com.google.protobuf.CodedInputStream input)383   public static com.google.api.servicecontrol.v1.CheckRequest parseFrom(
384       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
385     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
386   }
387 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)388   public static com.google.api.servicecontrol.v1.CheckRequest parseFrom(
389       com.google.protobuf.CodedInputStream input,
390       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
391       throws java.io.IOException {
392     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
393         PARSER, input, extensionRegistry);
394   }
395 
396   @java.lang.Override
newBuilderForType()397   public Builder newBuilderForType() {
398     return newBuilder();
399   }
400 
newBuilder()401   public static Builder newBuilder() {
402     return DEFAULT_INSTANCE.toBuilder();
403   }
404 
newBuilder(com.google.api.servicecontrol.v1.CheckRequest prototype)405   public static Builder newBuilder(com.google.api.servicecontrol.v1.CheckRequest prototype) {
406     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
407   }
408 
409   @java.lang.Override
toBuilder()410   public Builder toBuilder() {
411     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
412   }
413 
414   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)415   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
416     Builder builder = new Builder(parent);
417     return builder;
418   }
419   /**
420    *
421    *
422    * <pre>
423    * Request message for the Check method.
424    * </pre>
425    *
426    * Protobuf type {@code google.api.servicecontrol.v1.CheckRequest}
427    */
428   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
429       implements
430       // @@protoc_insertion_point(builder_implements:google.api.servicecontrol.v1.CheckRequest)
431       com.google.api.servicecontrol.v1.CheckRequestOrBuilder {
getDescriptor()432     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
433       return com.google.api.servicecontrol.v1.ServiceControllerProto
434           .internal_static_google_api_servicecontrol_v1_CheckRequest_descriptor;
435     }
436 
437     @java.lang.Override
438     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()439         internalGetFieldAccessorTable() {
440       return com.google.api.servicecontrol.v1.ServiceControllerProto
441           .internal_static_google_api_servicecontrol_v1_CheckRequest_fieldAccessorTable
442           .ensureFieldAccessorsInitialized(
443               com.google.api.servicecontrol.v1.CheckRequest.class,
444               com.google.api.servicecontrol.v1.CheckRequest.Builder.class);
445     }
446 
447     // Construct using com.google.api.servicecontrol.v1.CheckRequest.newBuilder()
Builder()448     private Builder() {}
449 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)450     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
451       super(parent);
452     }
453 
454     @java.lang.Override
clear()455     public Builder clear() {
456       super.clear();
457       bitField0_ = 0;
458       serviceName_ = "";
459       operation_ = null;
460       if (operationBuilder_ != null) {
461         operationBuilder_.dispose();
462         operationBuilder_ = null;
463       }
464       serviceConfigId_ = "";
465       return this;
466     }
467 
468     @java.lang.Override
getDescriptorForType()469     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
470       return com.google.api.servicecontrol.v1.ServiceControllerProto
471           .internal_static_google_api_servicecontrol_v1_CheckRequest_descriptor;
472     }
473 
474     @java.lang.Override
getDefaultInstanceForType()475     public com.google.api.servicecontrol.v1.CheckRequest getDefaultInstanceForType() {
476       return com.google.api.servicecontrol.v1.CheckRequest.getDefaultInstance();
477     }
478 
479     @java.lang.Override
build()480     public com.google.api.servicecontrol.v1.CheckRequest build() {
481       com.google.api.servicecontrol.v1.CheckRequest result = buildPartial();
482       if (!result.isInitialized()) {
483         throw newUninitializedMessageException(result);
484       }
485       return result;
486     }
487 
488     @java.lang.Override
buildPartial()489     public com.google.api.servicecontrol.v1.CheckRequest buildPartial() {
490       com.google.api.servicecontrol.v1.CheckRequest result =
491           new com.google.api.servicecontrol.v1.CheckRequest(this);
492       if (bitField0_ != 0) {
493         buildPartial0(result);
494       }
495       onBuilt();
496       return result;
497     }
498 
buildPartial0(com.google.api.servicecontrol.v1.CheckRequest result)499     private void buildPartial0(com.google.api.servicecontrol.v1.CheckRequest result) {
500       int from_bitField0_ = bitField0_;
501       if (((from_bitField0_ & 0x00000001) != 0)) {
502         result.serviceName_ = serviceName_;
503       }
504       if (((from_bitField0_ & 0x00000002) != 0)) {
505         result.operation_ = operationBuilder_ == null ? operation_ : operationBuilder_.build();
506       }
507       if (((from_bitField0_ & 0x00000004) != 0)) {
508         result.serviceConfigId_ = serviceConfigId_;
509       }
510     }
511 
512     @java.lang.Override
clone()513     public Builder clone() {
514       return super.clone();
515     }
516 
517     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)518     public Builder setField(
519         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
520       return super.setField(field, value);
521     }
522 
523     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)524     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
525       return super.clearField(field);
526     }
527 
528     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)529     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
530       return super.clearOneof(oneof);
531     }
532 
533     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)534     public Builder setRepeatedField(
535         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
536       return super.setRepeatedField(field, index, value);
537     }
538 
539     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)540     public Builder addRepeatedField(
541         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
542       return super.addRepeatedField(field, value);
543     }
544 
545     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)546     public Builder mergeFrom(com.google.protobuf.Message other) {
547       if (other instanceof com.google.api.servicecontrol.v1.CheckRequest) {
548         return mergeFrom((com.google.api.servicecontrol.v1.CheckRequest) other);
549       } else {
550         super.mergeFrom(other);
551         return this;
552       }
553     }
554 
mergeFrom(com.google.api.servicecontrol.v1.CheckRequest other)555     public Builder mergeFrom(com.google.api.servicecontrol.v1.CheckRequest other) {
556       if (other == com.google.api.servicecontrol.v1.CheckRequest.getDefaultInstance()) return this;
557       if (!other.getServiceName().isEmpty()) {
558         serviceName_ = other.serviceName_;
559         bitField0_ |= 0x00000001;
560         onChanged();
561       }
562       if (other.hasOperation()) {
563         mergeOperation(other.getOperation());
564       }
565       if (!other.getServiceConfigId().isEmpty()) {
566         serviceConfigId_ = other.serviceConfigId_;
567         bitField0_ |= 0x00000004;
568         onChanged();
569       }
570       this.mergeUnknownFields(other.getUnknownFields());
571       onChanged();
572       return this;
573     }
574 
575     @java.lang.Override
isInitialized()576     public final boolean isInitialized() {
577       return true;
578     }
579 
580     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)581     public Builder mergeFrom(
582         com.google.protobuf.CodedInputStream input,
583         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
584         throws java.io.IOException {
585       if (extensionRegistry == null) {
586         throw new java.lang.NullPointerException();
587       }
588       try {
589         boolean done = false;
590         while (!done) {
591           int tag = input.readTag();
592           switch (tag) {
593             case 0:
594               done = true;
595               break;
596             case 10:
597               {
598                 serviceName_ = input.readStringRequireUtf8();
599                 bitField0_ |= 0x00000001;
600                 break;
601               } // case 10
602             case 18:
603               {
604                 input.readMessage(getOperationFieldBuilder().getBuilder(), extensionRegistry);
605                 bitField0_ |= 0x00000002;
606                 break;
607               } // case 18
608             case 34:
609               {
610                 serviceConfigId_ = input.readStringRequireUtf8();
611                 bitField0_ |= 0x00000004;
612                 break;
613               } // case 34
614             default:
615               {
616                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
617                   done = true; // was an endgroup tag
618                 }
619                 break;
620               } // default:
621           } // switch (tag)
622         } // while (!done)
623       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
624         throw e.unwrapIOException();
625       } finally {
626         onChanged();
627       } // finally
628       return this;
629     }
630 
631     private int bitField0_;
632 
633     private java.lang.Object serviceName_ = "";
634     /**
635      *
636      *
637      * <pre>
638      * The service name as specified in its service configuration. For example,
639      * `"pubsub.googleapis.com"`.
640      * See
641      * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)
642      * for the definition of a service name.
643      * </pre>
644      *
645      * <code>string service_name = 1;</code>
646      *
647      * @return The serviceName.
648      */
getServiceName()649     public java.lang.String getServiceName() {
650       java.lang.Object ref = serviceName_;
651       if (!(ref instanceof java.lang.String)) {
652         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
653         java.lang.String s = bs.toStringUtf8();
654         serviceName_ = s;
655         return s;
656       } else {
657         return (java.lang.String) ref;
658       }
659     }
660     /**
661      *
662      *
663      * <pre>
664      * The service name as specified in its service configuration. For example,
665      * `"pubsub.googleapis.com"`.
666      * See
667      * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)
668      * for the definition of a service name.
669      * </pre>
670      *
671      * <code>string service_name = 1;</code>
672      *
673      * @return The bytes for serviceName.
674      */
getServiceNameBytes()675     public com.google.protobuf.ByteString getServiceNameBytes() {
676       java.lang.Object ref = serviceName_;
677       if (ref instanceof String) {
678         com.google.protobuf.ByteString b =
679             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
680         serviceName_ = b;
681         return b;
682       } else {
683         return (com.google.protobuf.ByteString) ref;
684       }
685     }
686     /**
687      *
688      *
689      * <pre>
690      * The service name as specified in its service configuration. For example,
691      * `"pubsub.googleapis.com"`.
692      * See
693      * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)
694      * for the definition of a service name.
695      * </pre>
696      *
697      * <code>string service_name = 1;</code>
698      *
699      * @param value The serviceName to set.
700      * @return This builder for chaining.
701      */
setServiceName(java.lang.String value)702     public Builder setServiceName(java.lang.String value) {
703       if (value == null) {
704         throw new NullPointerException();
705       }
706       serviceName_ = value;
707       bitField0_ |= 0x00000001;
708       onChanged();
709       return this;
710     }
711     /**
712      *
713      *
714      * <pre>
715      * The service name as specified in its service configuration. For example,
716      * `"pubsub.googleapis.com"`.
717      * See
718      * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)
719      * for the definition of a service name.
720      * </pre>
721      *
722      * <code>string service_name = 1;</code>
723      *
724      * @return This builder for chaining.
725      */
clearServiceName()726     public Builder clearServiceName() {
727       serviceName_ = getDefaultInstance().getServiceName();
728       bitField0_ = (bitField0_ & ~0x00000001);
729       onChanged();
730       return this;
731     }
732     /**
733      *
734      *
735      * <pre>
736      * The service name as specified in its service configuration. For example,
737      * `"pubsub.googleapis.com"`.
738      * See
739      * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)
740      * for the definition of a service name.
741      * </pre>
742      *
743      * <code>string service_name = 1;</code>
744      *
745      * @param value The bytes for serviceName to set.
746      * @return This builder for chaining.
747      */
setServiceNameBytes(com.google.protobuf.ByteString value)748     public Builder setServiceNameBytes(com.google.protobuf.ByteString value) {
749       if (value == null) {
750         throw new NullPointerException();
751       }
752       checkByteStringIsUtf8(value);
753       serviceName_ = value;
754       bitField0_ |= 0x00000001;
755       onChanged();
756       return this;
757     }
758 
759     private com.google.api.servicecontrol.v1.Operation operation_;
760     private com.google.protobuf.SingleFieldBuilderV3<
761             com.google.api.servicecontrol.v1.Operation,
762             com.google.api.servicecontrol.v1.Operation.Builder,
763             com.google.api.servicecontrol.v1.OperationOrBuilder>
764         operationBuilder_;
765     /**
766      *
767      *
768      * <pre>
769      * The operation to be checked.
770      * </pre>
771      *
772      * <code>.google.api.servicecontrol.v1.Operation operation = 2;</code>
773      *
774      * @return Whether the operation field is set.
775      */
hasOperation()776     public boolean hasOperation() {
777       return ((bitField0_ & 0x00000002) != 0);
778     }
779     /**
780      *
781      *
782      * <pre>
783      * The operation to be checked.
784      * </pre>
785      *
786      * <code>.google.api.servicecontrol.v1.Operation operation = 2;</code>
787      *
788      * @return The operation.
789      */
getOperation()790     public com.google.api.servicecontrol.v1.Operation getOperation() {
791       if (operationBuilder_ == null) {
792         return operation_ == null
793             ? com.google.api.servicecontrol.v1.Operation.getDefaultInstance()
794             : operation_;
795       } else {
796         return operationBuilder_.getMessage();
797       }
798     }
799     /**
800      *
801      *
802      * <pre>
803      * The operation to be checked.
804      * </pre>
805      *
806      * <code>.google.api.servicecontrol.v1.Operation operation = 2;</code>
807      */
setOperation(com.google.api.servicecontrol.v1.Operation value)808     public Builder setOperation(com.google.api.servicecontrol.v1.Operation value) {
809       if (operationBuilder_ == null) {
810         if (value == null) {
811           throw new NullPointerException();
812         }
813         operation_ = value;
814       } else {
815         operationBuilder_.setMessage(value);
816       }
817       bitField0_ |= 0x00000002;
818       onChanged();
819       return this;
820     }
821     /**
822      *
823      *
824      * <pre>
825      * The operation to be checked.
826      * </pre>
827      *
828      * <code>.google.api.servicecontrol.v1.Operation operation = 2;</code>
829      */
setOperation( com.google.api.servicecontrol.v1.Operation.Builder builderForValue)830     public Builder setOperation(
831         com.google.api.servicecontrol.v1.Operation.Builder builderForValue) {
832       if (operationBuilder_ == null) {
833         operation_ = builderForValue.build();
834       } else {
835         operationBuilder_.setMessage(builderForValue.build());
836       }
837       bitField0_ |= 0x00000002;
838       onChanged();
839       return this;
840     }
841     /**
842      *
843      *
844      * <pre>
845      * The operation to be checked.
846      * </pre>
847      *
848      * <code>.google.api.servicecontrol.v1.Operation operation = 2;</code>
849      */
mergeOperation(com.google.api.servicecontrol.v1.Operation value)850     public Builder mergeOperation(com.google.api.servicecontrol.v1.Operation value) {
851       if (operationBuilder_ == null) {
852         if (((bitField0_ & 0x00000002) != 0)
853             && operation_ != null
854             && operation_ != com.google.api.servicecontrol.v1.Operation.getDefaultInstance()) {
855           getOperationBuilder().mergeFrom(value);
856         } else {
857           operation_ = value;
858         }
859       } else {
860         operationBuilder_.mergeFrom(value);
861       }
862       bitField0_ |= 0x00000002;
863       onChanged();
864       return this;
865     }
866     /**
867      *
868      *
869      * <pre>
870      * The operation to be checked.
871      * </pre>
872      *
873      * <code>.google.api.servicecontrol.v1.Operation operation = 2;</code>
874      */
clearOperation()875     public Builder clearOperation() {
876       bitField0_ = (bitField0_ & ~0x00000002);
877       operation_ = null;
878       if (operationBuilder_ != null) {
879         operationBuilder_.dispose();
880         operationBuilder_ = null;
881       }
882       onChanged();
883       return this;
884     }
885     /**
886      *
887      *
888      * <pre>
889      * The operation to be checked.
890      * </pre>
891      *
892      * <code>.google.api.servicecontrol.v1.Operation operation = 2;</code>
893      */
getOperationBuilder()894     public com.google.api.servicecontrol.v1.Operation.Builder getOperationBuilder() {
895       bitField0_ |= 0x00000002;
896       onChanged();
897       return getOperationFieldBuilder().getBuilder();
898     }
899     /**
900      *
901      *
902      * <pre>
903      * The operation to be checked.
904      * </pre>
905      *
906      * <code>.google.api.servicecontrol.v1.Operation operation = 2;</code>
907      */
getOperationOrBuilder()908     public com.google.api.servicecontrol.v1.OperationOrBuilder getOperationOrBuilder() {
909       if (operationBuilder_ != null) {
910         return operationBuilder_.getMessageOrBuilder();
911       } else {
912         return operation_ == null
913             ? com.google.api.servicecontrol.v1.Operation.getDefaultInstance()
914             : operation_;
915       }
916     }
917     /**
918      *
919      *
920      * <pre>
921      * The operation to be checked.
922      * </pre>
923      *
924      * <code>.google.api.servicecontrol.v1.Operation operation = 2;</code>
925      */
926     private com.google.protobuf.SingleFieldBuilderV3<
927             com.google.api.servicecontrol.v1.Operation,
928             com.google.api.servicecontrol.v1.Operation.Builder,
929             com.google.api.servicecontrol.v1.OperationOrBuilder>
getOperationFieldBuilder()930         getOperationFieldBuilder() {
931       if (operationBuilder_ == null) {
932         operationBuilder_ =
933             new com.google.protobuf.SingleFieldBuilderV3<
934                 com.google.api.servicecontrol.v1.Operation,
935                 com.google.api.servicecontrol.v1.Operation.Builder,
936                 com.google.api.servicecontrol.v1.OperationOrBuilder>(
937                 getOperation(), getParentForChildren(), isClean());
938         operation_ = null;
939       }
940       return operationBuilder_;
941     }
942 
943     private java.lang.Object serviceConfigId_ = "";
944     /**
945      *
946      *
947      * <pre>
948      * Specifies which version of service configuration should be used to process
949      * the request.
950      * If unspecified or no matching version can be found, the
951      * latest one will be used.
952      * </pre>
953      *
954      * <code>string service_config_id = 4;</code>
955      *
956      * @return The serviceConfigId.
957      */
getServiceConfigId()958     public java.lang.String getServiceConfigId() {
959       java.lang.Object ref = serviceConfigId_;
960       if (!(ref instanceof java.lang.String)) {
961         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
962         java.lang.String s = bs.toStringUtf8();
963         serviceConfigId_ = s;
964         return s;
965       } else {
966         return (java.lang.String) ref;
967       }
968     }
969     /**
970      *
971      *
972      * <pre>
973      * Specifies which version of service configuration should be used to process
974      * the request.
975      * If unspecified or no matching version can be found, the
976      * latest one will be used.
977      * </pre>
978      *
979      * <code>string service_config_id = 4;</code>
980      *
981      * @return The bytes for serviceConfigId.
982      */
getServiceConfigIdBytes()983     public com.google.protobuf.ByteString getServiceConfigIdBytes() {
984       java.lang.Object ref = serviceConfigId_;
985       if (ref instanceof String) {
986         com.google.protobuf.ByteString b =
987             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
988         serviceConfigId_ = b;
989         return b;
990       } else {
991         return (com.google.protobuf.ByteString) ref;
992       }
993     }
994     /**
995      *
996      *
997      * <pre>
998      * Specifies which version of service configuration should be used to process
999      * the request.
1000      * If unspecified or no matching version can be found, the
1001      * latest one will be used.
1002      * </pre>
1003      *
1004      * <code>string service_config_id = 4;</code>
1005      *
1006      * @param value The serviceConfigId to set.
1007      * @return This builder for chaining.
1008      */
setServiceConfigId(java.lang.String value)1009     public Builder setServiceConfigId(java.lang.String value) {
1010       if (value == null) {
1011         throw new NullPointerException();
1012       }
1013       serviceConfigId_ = value;
1014       bitField0_ |= 0x00000004;
1015       onChanged();
1016       return this;
1017     }
1018     /**
1019      *
1020      *
1021      * <pre>
1022      * Specifies which version of service configuration should be used to process
1023      * the request.
1024      * If unspecified or no matching version can be found, the
1025      * latest one will be used.
1026      * </pre>
1027      *
1028      * <code>string service_config_id = 4;</code>
1029      *
1030      * @return This builder for chaining.
1031      */
clearServiceConfigId()1032     public Builder clearServiceConfigId() {
1033       serviceConfigId_ = getDefaultInstance().getServiceConfigId();
1034       bitField0_ = (bitField0_ & ~0x00000004);
1035       onChanged();
1036       return this;
1037     }
1038     /**
1039      *
1040      *
1041      * <pre>
1042      * Specifies which version of service configuration should be used to process
1043      * the request.
1044      * If unspecified or no matching version can be found, the
1045      * latest one will be used.
1046      * </pre>
1047      *
1048      * <code>string service_config_id = 4;</code>
1049      *
1050      * @param value The bytes for serviceConfigId to set.
1051      * @return This builder for chaining.
1052      */
setServiceConfigIdBytes(com.google.protobuf.ByteString value)1053     public Builder setServiceConfigIdBytes(com.google.protobuf.ByteString value) {
1054       if (value == null) {
1055         throw new NullPointerException();
1056       }
1057       checkByteStringIsUtf8(value);
1058       serviceConfigId_ = value;
1059       bitField0_ |= 0x00000004;
1060       onChanged();
1061       return this;
1062     }
1063 
1064     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1065     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1066       return super.setUnknownFields(unknownFields);
1067     }
1068 
1069     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1070     public final Builder mergeUnknownFields(
1071         final com.google.protobuf.UnknownFieldSet unknownFields) {
1072       return super.mergeUnknownFields(unknownFields);
1073     }
1074 
1075     // @@protoc_insertion_point(builder_scope:google.api.servicecontrol.v1.CheckRequest)
1076   }
1077 
1078   // @@protoc_insertion_point(class_scope:google.api.servicecontrol.v1.CheckRequest)
1079   private static final com.google.api.servicecontrol.v1.CheckRequest DEFAULT_INSTANCE;
1080 
1081   static {
1082     DEFAULT_INSTANCE = new com.google.api.servicecontrol.v1.CheckRequest();
1083   }
1084 
getDefaultInstance()1085   public static com.google.api.servicecontrol.v1.CheckRequest getDefaultInstance() {
1086     return DEFAULT_INSTANCE;
1087   }
1088 
1089   private static final com.google.protobuf.Parser<CheckRequest> PARSER =
1090       new com.google.protobuf.AbstractParser<CheckRequest>() {
1091         @java.lang.Override
1092         public CheckRequest parsePartialFrom(
1093             com.google.protobuf.CodedInputStream input,
1094             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1095             throws com.google.protobuf.InvalidProtocolBufferException {
1096           Builder builder = newBuilder();
1097           try {
1098             builder.mergeFrom(input, extensionRegistry);
1099           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1100             throw e.setUnfinishedMessage(builder.buildPartial());
1101           } catch (com.google.protobuf.UninitializedMessageException e) {
1102             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1103           } catch (java.io.IOException e) {
1104             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1105                 .setUnfinishedMessage(builder.buildPartial());
1106           }
1107           return builder.buildPartial();
1108         }
1109       };
1110 
parser()1111   public static com.google.protobuf.Parser<CheckRequest> parser() {
1112     return PARSER;
1113   }
1114 
1115   @java.lang.Override
getParserForType()1116   public com.google.protobuf.Parser<CheckRequest> getParserForType() {
1117     return PARSER;
1118   }
1119 
1120   @java.lang.Override
getDefaultInstanceForType()1121   public com.google.api.servicecontrol.v1.CheckRequest getDefaultInstanceForType() {
1122     return DEFAULT_INSTANCE;
1123   }
1124 }
1125