• 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 Report method.
26  * </pre>
27  *
28  * Protobuf type {@code google.api.servicecontrol.v1.ReportRequest}
29  */
30 public final class ReportRequest extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.api.servicecontrol.v1.ReportRequest)
33     ReportRequestOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use ReportRequest.newBuilder() to construct.
ReportRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private ReportRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
ReportRequest()40   private ReportRequest() {
41     serviceName_ = "";
42     operations_ = java.util.Collections.emptyList();
43     serviceConfigId_ = "";
44   }
45 
46   @java.lang.Override
47   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)48   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
49     return new ReportRequest();
50   }
51 
52   @java.lang.Override
getUnknownFields()53   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
54     return this.unknownFields;
55   }
56 
getDescriptor()57   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
58     return com.google.api.servicecontrol.v1.ServiceControllerProto
59         .internal_static_google_api_servicecontrol_v1_ReportRequest_descriptor;
60   }
61 
62   @java.lang.Override
63   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()64       internalGetFieldAccessorTable() {
65     return com.google.api.servicecontrol.v1.ServiceControllerProto
66         .internal_static_google_api_servicecontrol_v1_ReportRequest_fieldAccessorTable
67         .ensureFieldAccessorsInitialized(
68             com.google.api.servicecontrol.v1.ReportRequest.class,
69             com.google.api.servicecontrol.v1.ReportRequest.Builder.class);
70   }
71 
72   public static final int SERVICE_NAME_FIELD_NUMBER = 1;
73 
74   @SuppressWarnings("serial")
75   private volatile java.lang.Object serviceName_ = "";
76   /**
77    *
78    *
79    * <pre>
80    * The service name as specified in its service configuration. For example,
81    * `"pubsub.googleapis.com"`.
82    * See
83    * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)
84    * for the definition of a service name.
85    * </pre>
86    *
87    * <code>string service_name = 1;</code>
88    *
89    * @return The serviceName.
90    */
91   @java.lang.Override
getServiceName()92   public java.lang.String getServiceName() {
93     java.lang.Object ref = serviceName_;
94     if (ref instanceof java.lang.String) {
95       return (java.lang.String) ref;
96     } else {
97       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
98       java.lang.String s = bs.toStringUtf8();
99       serviceName_ = s;
100       return s;
101     }
102   }
103   /**
104    *
105    *
106    * <pre>
107    * The service name as specified in its service configuration. For example,
108    * `"pubsub.googleapis.com"`.
109    * See
110    * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)
111    * for the definition of a service name.
112    * </pre>
113    *
114    * <code>string service_name = 1;</code>
115    *
116    * @return The bytes for serviceName.
117    */
118   @java.lang.Override
getServiceNameBytes()119   public com.google.protobuf.ByteString getServiceNameBytes() {
120     java.lang.Object ref = serviceName_;
121     if (ref instanceof java.lang.String) {
122       com.google.protobuf.ByteString b =
123           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
124       serviceName_ = b;
125       return b;
126     } else {
127       return (com.google.protobuf.ByteString) ref;
128     }
129   }
130 
131   public static final int OPERATIONS_FIELD_NUMBER = 2;
132 
133   @SuppressWarnings("serial")
134   private java.util.List<com.google.api.servicecontrol.v1.Operation> operations_;
135   /**
136    *
137    *
138    * <pre>
139    * Operations to be reported.
140    * Typically the service should report one operation per request.
141    * Putting multiple operations into a single request is allowed, but should
142    * be used only when multiple operations are natually available at the time
143    * of the report.
144    * There is no limit on the number of operations in the same ReportRequest,
145    * however the ReportRequest size should be no larger than 1MB. See
146    * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
147    * for partial failure behavior.
148    * </pre>
149    *
150    * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
151    */
152   @java.lang.Override
getOperationsList()153   public java.util.List<com.google.api.servicecontrol.v1.Operation> getOperationsList() {
154     return operations_;
155   }
156   /**
157    *
158    *
159    * <pre>
160    * Operations to be reported.
161    * Typically the service should report one operation per request.
162    * Putting multiple operations into a single request is allowed, but should
163    * be used only when multiple operations are natually available at the time
164    * of the report.
165    * There is no limit on the number of operations in the same ReportRequest,
166    * however the ReportRequest size should be no larger than 1MB. See
167    * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
168    * for partial failure behavior.
169    * </pre>
170    *
171    * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
172    */
173   @java.lang.Override
174   public java.util.List<? extends com.google.api.servicecontrol.v1.OperationOrBuilder>
getOperationsOrBuilderList()175       getOperationsOrBuilderList() {
176     return operations_;
177   }
178   /**
179    *
180    *
181    * <pre>
182    * Operations to be reported.
183    * Typically the service should report one operation per request.
184    * Putting multiple operations into a single request is allowed, but should
185    * be used only when multiple operations are natually available at the time
186    * of the report.
187    * There is no limit on the number of operations in the same ReportRequest,
188    * however the ReportRequest size should be no larger than 1MB. See
189    * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
190    * for partial failure behavior.
191    * </pre>
192    *
193    * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
194    */
195   @java.lang.Override
getOperationsCount()196   public int getOperationsCount() {
197     return operations_.size();
198   }
199   /**
200    *
201    *
202    * <pre>
203    * Operations to be reported.
204    * Typically the service should report one operation per request.
205    * Putting multiple operations into a single request is allowed, but should
206    * be used only when multiple operations are natually available at the time
207    * of the report.
208    * There is no limit on the number of operations in the same ReportRequest,
209    * however the ReportRequest size should be no larger than 1MB. See
210    * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
211    * for partial failure behavior.
212    * </pre>
213    *
214    * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
215    */
216   @java.lang.Override
getOperations(int index)217   public com.google.api.servicecontrol.v1.Operation getOperations(int index) {
218     return operations_.get(index);
219   }
220   /**
221    *
222    *
223    * <pre>
224    * Operations to be reported.
225    * Typically the service should report one operation per request.
226    * Putting multiple operations into a single request is allowed, but should
227    * be used only when multiple operations are natually available at the time
228    * of the report.
229    * There is no limit on the number of operations in the same ReportRequest,
230    * however the ReportRequest size should be no larger than 1MB. See
231    * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
232    * for partial failure behavior.
233    * </pre>
234    *
235    * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
236    */
237   @java.lang.Override
getOperationsOrBuilder(int index)238   public com.google.api.servicecontrol.v1.OperationOrBuilder getOperationsOrBuilder(int index) {
239     return operations_.get(index);
240   }
241 
242   public static final int SERVICE_CONFIG_ID_FIELD_NUMBER = 3;
243 
244   @SuppressWarnings("serial")
245   private volatile java.lang.Object serviceConfigId_ = "";
246   /**
247    *
248    *
249    * <pre>
250    * Specifies which version of service config should be used to process the
251    * request.
252    * If unspecified or no matching version can be found, the
253    * latest one will be used.
254    * </pre>
255    *
256    * <code>string service_config_id = 3;</code>
257    *
258    * @return The serviceConfigId.
259    */
260   @java.lang.Override
getServiceConfigId()261   public java.lang.String getServiceConfigId() {
262     java.lang.Object ref = serviceConfigId_;
263     if (ref instanceof java.lang.String) {
264       return (java.lang.String) ref;
265     } else {
266       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
267       java.lang.String s = bs.toStringUtf8();
268       serviceConfigId_ = s;
269       return s;
270     }
271   }
272   /**
273    *
274    *
275    * <pre>
276    * Specifies which version of service config should be used to process the
277    * request.
278    * If unspecified or no matching version can be found, the
279    * latest one will be used.
280    * </pre>
281    *
282    * <code>string service_config_id = 3;</code>
283    *
284    * @return The bytes for serviceConfigId.
285    */
286   @java.lang.Override
getServiceConfigIdBytes()287   public com.google.protobuf.ByteString getServiceConfigIdBytes() {
288     java.lang.Object ref = serviceConfigId_;
289     if (ref instanceof java.lang.String) {
290       com.google.protobuf.ByteString b =
291           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
292       serviceConfigId_ = b;
293       return b;
294     } else {
295       return (com.google.protobuf.ByteString) ref;
296     }
297   }
298 
299   private byte memoizedIsInitialized = -1;
300 
301   @java.lang.Override
isInitialized()302   public final boolean isInitialized() {
303     byte isInitialized = memoizedIsInitialized;
304     if (isInitialized == 1) return true;
305     if (isInitialized == 0) return false;
306 
307     memoizedIsInitialized = 1;
308     return true;
309   }
310 
311   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)312   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
313     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) {
314       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_);
315     }
316     for (int i = 0; i < operations_.size(); i++) {
317       output.writeMessage(2, operations_.get(i));
318     }
319     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceConfigId_)) {
320       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, serviceConfigId_);
321     }
322     getUnknownFields().writeTo(output);
323   }
324 
325   @java.lang.Override
getSerializedSize()326   public int getSerializedSize() {
327     int size = memoizedSize;
328     if (size != -1) return size;
329 
330     size = 0;
331     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) {
332       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_);
333     }
334     for (int i = 0; i < operations_.size(); i++) {
335       size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, operations_.get(i));
336     }
337     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceConfigId_)) {
338       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, serviceConfigId_);
339     }
340     size += getUnknownFields().getSerializedSize();
341     memoizedSize = size;
342     return size;
343   }
344 
345   @java.lang.Override
equals(final java.lang.Object obj)346   public boolean equals(final java.lang.Object obj) {
347     if (obj == this) {
348       return true;
349     }
350     if (!(obj instanceof com.google.api.servicecontrol.v1.ReportRequest)) {
351       return super.equals(obj);
352     }
353     com.google.api.servicecontrol.v1.ReportRequest other =
354         (com.google.api.servicecontrol.v1.ReportRequest) obj;
355 
356     if (!getServiceName().equals(other.getServiceName())) return false;
357     if (!getOperationsList().equals(other.getOperationsList())) return false;
358     if (!getServiceConfigId().equals(other.getServiceConfigId())) return false;
359     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
360     return true;
361   }
362 
363   @java.lang.Override
hashCode()364   public int hashCode() {
365     if (memoizedHashCode != 0) {
366       return memoizedHashCode;
367     }
368     int hash = 41;
369     hash = (19 * hash) + getDescriptor().hashCode();
370     hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER;
371     hash = (53 * hash) + getServiceName().hashCode();
372     if (getOperationsCount() > 0) {
373       hash = (37 * hash) + OPERATIONS_FIELD_NUMBER;
374       hash = (53 * hash) + getOperationsList().hashCode();
375     }
376     hash = (37 * hash) + SERVICE_CONFIG_ID_FIELD_NUMBER;
377     hash = (53 * hash) + getServiceConfigId().hashCode();
378     hash = (29 * hash) + getUnknownFields().hashCode();
379     memoizedHashCode = hash;
380     return hash;
381   }
382 
parseFrom(java.nio.ByteBuffer data)383   public static com.google.api.servicecontrol.v1.ReportRequest parseFrom(java.nio.ByteBuffer data)
384       throws com.google.protobuf.InvalidProtocolBufferException {
385     return PARSER.parseFrom(data);
386   }
387 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)388   public static com.google.api.servicecontrol.v1.ReportRequest parseFrom(
389       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
390       throws com.google.protobuf.InvalidProtocolBufferException {
391     return PARSER.parseFrom(data, extensionRegistry);
392   }
393 
parseFrom( com.google.protobuf.ByteString data)394   public static com.google.api.servicecontrol.v1.ReportRequest parseFrom(
395       com.google.protobuf.ByteString data)
396       throws com.google.protobuf.InvalidProtocolBufferException {
397     return PARSER.parseFrom(data);
398   }
399 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)400   public static com.google.api.servicecontrol.v1.ReportRequest parseFrom(
401       com.google.protobuf.ByteString data,
402       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
403       throws com.google.protobuf.InvalidProtocolBufferException {
404     return PARSER.parseFrom(data, extensionRegistry);
405   }
406 
parseFrom(byte[] data)407   public static com.google.api.servicecontrol.v1.ReportRequest parseFrom(byte[] data)
408       throws com.google.protobuf.InvalidProtocolBufferException {
409     return PARSER.parseFrom(data);
410   }
411 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)412   public static com.google.api.servicecontrol.v1.ReportRequest parseFrom(
413       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
414       throws com.google.protobuf.InvalidProtocolBufferException {
415     return PARSER.parseFrom(data, extensionRegistry);
416   }
417 
parseFrom(java.io.InputStream input)418   public static com.google.api.servicecontrol.v1.ReportRequest parseFrom(java.io.InputStream input)
419       throws java.io.IOException {
420     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
421   }
422 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)423   public static com.google.api.servicecontrol.v1.ReportRequest parseFrom(
424       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
425       throws java.io.IOException {
426     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
427         PARSER, input, extensionRegistry);
428   }
429 
parseDelimitedFrom( java.io.InputStream input)430   public static com.google.api.servicecontrol.v1.ReportRequest parseDelimitedFrom(
431       java.io.InputStream input) throws java.io.IOException {
432     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
433   }
434 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)435   public static com.google.api.servicecontrol.v1.ReportRequest parseDelimitedFrom(
436       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
437       throws java.io.IOException {
438     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
439         PARSER, input, extensionRegistry);
440   }
441 
parseFrom( com.google.protobuf.CodedInputStream input)442   public static com.google.api.servicecontrol.v1.ReportRequest parseFrom(
443       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
444     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
445   }
446 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)447   public static com.google.api.servicecontrol.v1.ReportRequest parseFrom(
448       com.google.protobuf.CodedInputStream input,
449       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
450       throws java.io.IOException {
451     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
452         PARSER, input, extensionRegistry);
453   }
454 
455   @java.lang.Override
newBuilderForType()456   public Builder newBuilderForType() {
457     return newBuilder();
458   }
459 
newBuilder()460   public static Builder newBuilder() {
461     return DEFAULT_INSTANCE.toBuilder();
462   }
463 
newBuilder(com.google.api.servicecontrol.v1.ReportRequest prototype)464   public static Builder newBuilder(com.google.api.servicecontrol.v1.ReportRequest prototype) {
465     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
466   }
467 
468   @java.lang.Override
toBuilder()469   public Builder toBuilder() {
470     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
471   }
472 
473   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)474   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
475     Builder builder = new Builder(parent);
476     return builder;
477   }
478   /**
479    *
480    *
481    * <pre>
482    * Request message for the Report method.
483    * </pre>
484    *
485    * Protobuf type {@code google.api.servicecontrol.v1.ReportRequest}
486    */
487   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
488       implements
489       // @@protoc_insertion_point(builder_implements:google.api.servicecontrol.v1.ReportRequest)
490       com.google.api.servicecontrol.v1.ReportRequestOrBuilder {
getDescriptor()491     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
492       return com.google.api.servicecontrol.v1.ServiceControllerProto
493           .internal_static_google_api_servicecontrol_v1_ReportRequest_descriptor;
494     }
495 
496     @java.lang.Override
497     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()498         internalGetFieldAccessorTable() {
499       return com.google.api.servicecontrol.v1.ServiceControllerProto
500           .internal_static_google_api_servicecontrol_v1_ReportRequest_fieldAccessorTable
501           .ensureFieldAccessorsInitialized(
502               com.google.api.servicecontrol.v1.ReportRequest.class,
503               com.google.api.servicecontrol.v1.ReportRequest.Builder.class);
504     }
505 
506     // Construct using com.google.api.servicecontrol.v1.ReportRequest.newBuilder()
Builder()507     private Builder() {}
508 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)509     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
510       super(parent);
511     }
512 
513     @java.lang.Override
clear()514     public Builder clear() {
515       super.clear();
516       bitField0_ = 0;
517       serviceName_ = "";
518       if (operationsBuilder_ == null) {
519         operations_ = java.util.Collections.emptyList();
520       } else {
521         operations_ = null;
522         operationsBuilder_.clear();
523       }
524       bitField0_ = (bitField0_ & ~0x00000002);
525       serviceConfigId_ = "";
526       return this;
527     }
528 
529     @java.lang.Override
getDescriptorForType()530     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
531       return com.google.api.servicecontrol.v1.ServiceControllerProto
532           .internal_static_google_api_servicecontrol_v1_ReportRequest_descriptor;
533     }
534 
535     @java.lang.Override
getDefaultInstanceForType()536     public com.google.api.servicecontrol.v1.ReportRequest getDefaultInstanceForType() {
537       return com.google.api.servicecontrol.v1.ReportRequest.getDefaultInstance();
538     }
539 
540     @java.lang.Override
build()541     public com.google.api.servicecontrol.v1.ReportRequest build() {
542       com.google.api.servicecontrol.v1.ReportRequest result = buildPartial();
543       if (!result.isInitialized()) {
544         throw newUninitializedMessageException(result);
545       }
546       return result;
547     }
548 
549     @java.lang.Override
buildPartial()550     public com.google.api.servicecontrol.v1.ReportRequest buildPartial() {
551       com.google.api.servicecontrol.v1.ReportRequest result =
552           new com.google.api.servicecontrol.v1.ReportRequest(this);
553       buildPartialRepeatedFields(result);
554       if (bitField0_ != 0) {
555         buildPartial0(result);
556       }
557       onBuilt();
558       return result;
559     }
560 
buildPartialRepeatedFields(com.google.api.servicecontrol.v1.ReportRequest result)561     private void buildPartialRepeatedFields(com.google.api.servicecontrol.v1.ReportRequest result) {
562       if (operationsBuilder_ == null) {
563         if (((bitField0_ & 0x00000002) != 0)) {
564           operations_ = java.util.Collections.unmodifiableList(operations_);
565           bitField0_ = (bitField0_ & ~0x00000002);
566         }
567         result.operations_ = operations_;
568       } else {
569         result.operations_ = operationsBuilder_.build();
570       }
571     }
572 
buildPartial0(com.google.api.servicecontrol.v1.ReportRequest result)573     private void buildPartial0(com.google.api.servicecontrol.v1.ReportRequest result) {
574       int from_bitField0_ = bitField0_;
575       if (((from_bitField0_ & 0x00000001) != 0)) {
576         result.serviceName_ = serviceName_;
577       }
578       if (((from_bitField0_ & 0x00000004) != 0)) {
579         result.serviceConfigId_ = serviceConfigId_;
580       }
581     }
582 
583     @java.lang.Override
clone()584     public Builder clone() {
585       return super.clone();
586     }
587 
588     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)589     public Builder setField(
590         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
591       return super.setField(field, value);
592     }
593 
594     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)595     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
596       return super.clearField(field);
597     }
598 
599     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)600     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
601       return super.clearOneof(oneof);
602     }
603 
604     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)605     public Builder setRepeatedField(
606         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
607       return super.setRepeatedField(field, index, value);
608     }
609 
610     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)611     public Builder addRepeatedField(
612         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
613       return super.addRepeatedField(field, value);
614     }
615 
616     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)617     public Builder mergeFrom(com.google.protobuf.Message other) {
618       if (other instanceof com.google.api.servicecontrol.v1.ReportRequest) {
619         return mergeFrom((com.google.api.servicecontrol.v1.ReportRequest) other);
620       } else {
621         super.mergeFrom(other);
622         return this;
623       }
624     }
625 
mergeFrom(com.google.api.servicecontrol.v1.ReportRequest other)626     public Builder mergeFrom(com.google.api.servicecontrol.v1.ReportRequest other) {
627       if (other == com.google.api.servicecontrol.v1.ReportRequest.getDefaultInstance()) return this;
628       if (!other.getServiceName().isEmpty()) {
629         serviceName_ = other.serviceName_;
630         bitField0_ |= 0x00000001;
631         onChanged();
632       }
633       if (operationsBuilder_ == null) {
634         if (!other.operations_.isEmpty()) {
635           if (operations_.isEmpty()) {
636             operations_ = other.operations_;
637             bitField0_ = (bitField0_ & ~0x00000002);
638           } else {
639             ensureOperationsIsMutable();
640             operations_.addAll(other.operations_);
641           }
642           onChanged();
643         }
644       } else {
645         if (!other.operations_.isEmpty()) {
646           if (operationsBuilder_.isEmpty()) {
647             operationsBuilder_.dispose();
648             operationsBuilder_ = null;
649             operations_ = other.operations_;
650             bitField0_ = (bitField0_ & ~0x00000002);
651             operationsBuilder_ =
652                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
653                     ? getOperationsFieldBuilder()
654                     : null;
655           } else {
656             operationsBuilder_.addAllMessages(other.operations_);
657           }
658         }
659       }
660       if (!other.getServiceConfigId().isEmpty()) {
661         serviceConfigId_ = other.serviceConfigId_;
662         bitField0_ |= 0x00000004;
663         onChanged();
664       }
665       this.mergeUnknownFields(other.getUnknownFields());
666       onChanged();
667       return this;
668     }
669 
670     @java.lang.Override
isInitialized()671     public final boolean isInitialized() {
672       return true;
673     }
674 
675     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)676     public Builder mergeFrom(
677         com.google.protobuf.CodedInputStream input,
678         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
679         throws java.io.IOException {
680       if (extensionRegistry == null) {
681         throw new java.lang.NullPointerException();
682       }
683       try {
684         boolean done = false;
685         while (!done) {
686           int tag = input.readTag();
687           switch (tag) {
688             case 0:
689               done = true;
690               break;
691             case 10:
692               {
693                 serviceName_ = input.readStringRequireUtf8();
694                 bitField0_ |= 0x00000001;
695                 break;
696               } // case 10
697             case 18:
698               {
699                 com.google.api.servicecontrol.v1.Operation m =
700                     input.readMessage(
701                         com.google.api.servicecontrol.v1.Operation.parser(), extensionRegistry);
702                 if (operationsBuilder_ == null) {
703                   ensureOperationsIsMutable();
704                   operations_.add(m);
705                 } else {
706                   operationsBuilder_.addMessage(m);
707                 }
708                 break;
709               } // case 18
710             case 26:
711               {
712                 serviceConfigId_ = input.readStringRequireUtf8();
713                 bitField0_ |= 0x00000004;
714                 break;
715               } // case 26
716             default:
717               {
718                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
719                   done = true; // was an endgroup tag
720                 }
721                 break;
722               } // default:
723           } // switch (tag)
724         } // while (!done)
725       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
726         throw e.unwrapIOException();
727       } finally {
728         onChanged();
729       } // finally
730       return this;
731     }
732 
733     private int bitField0_;
734 
735     private java.lang.Object serviceName_ = "";
736     /**
737      *
738      *
739      * <pre>
740      * The service name as specified in its service configuration. For example,
741      * `"pubsub.googleapis.com"`.
742      * See
743      * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)
744      * for the definition of a service name.
745      * </pre>
746      *
747      * <code>string service_name = 1;</code>
748      *
749      * @return The serviceName.
750      */
getServiceName()751     public java.lang.String getServiceName() {
752       java.lang.Object ref = serviceName_;
753       if (!(ref instanceof java.lang.String)) {
754         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
755         java.lang.String s = bs.toStringUtf8();
756         serviceName_ = s;
757         return s;
758       } else {
759         return (java.lang.String) ref;
760       }
761     }
762     /**
763      *
764      *
765      * <pre>
766      * The service name as specified in its service configuration. For example,
767      * `"pubsub.googleapis.com"`.
768      * See
769      * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)
770      * for the definition of a service name.
771      * </pre>
772      *
773      * <code>string service_name = 1;</code>
774      *
775      * @return The bytes for serviceName.
776      */
getServiceNameBytes()777     public com.google.protobuf.ByteString getServiceNameBytes() {
778       java.lang.Object ref = serviceName_;
779       if (ref instanceof String) {
780         com.google.protobuf.ByteString b =
781             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
782         serviceName_ = b;
783         return b;
784       } else {
785         return (com.google.protobuf.ByteString) ref;
786       }
787     }
788     /**
789      *
790      *
791      * <pre>
792      * The service name as specified in its service configuration. For example,
793      * `"pubsub.googleapis.com"`.
794      * See
795      * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)
796      * for the definition of a service name.
797      * </pre>
798      *
799      * <code>string service_name = 1;</code>
800      *
801      * @param value The serviceName to set.
802      * @return This builder for chaining.
803      */
setServiceName(java.lang.String value)804     public Builder setServiceName(java.lang.String value) {
805       if (value == null) {
806         throw new NullPointerException();
807       }
808       serviceName_ = value;
809       bitField0_ |= 0x00000001;
810       onChanged();
811       return this;
812     }
813     /**
814      *
815      *
816      * <pre>
817      * The service name as specified in its service configuration. For example,
818      * `"pubsub.googleapis.com"`.
819      * See
820      * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)
821      * for the definition of a service name.
822      * </pre>
823      *
824      * <code>string service_name = 1;</code>
825      *
826      * @return This builder for chaining.
827      */
clearServiceName()828     public Builder clearServiceName() {
829       serviceName_ = getDefaultInstance().getServiceName();
830       bitField0_ = (bitField0_ & ~0x00000001);
831       onChanged();
832       return this;
833     }
834     /**
835      *
836      *
837      * <pre>
838      * The service name as specified in its service configuration. For example,
839      * `"pubsub.googleapis.com"`.
840      * See
841      * [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service)
842      * for the definition of a service name.
843      * </pre>
844      *
845      * <code>string service_name = 1;</code>
846      *
847      * @param value The bytes for serviceName to set.
848      * @return This builder for chaining.
849      */
setServiceNameBytes(com.google.protobuf.ByteString value)850     public Builder setServiceNameBytes(com.google.protobuf.ByteString value) {
851       if (value == null) {
852         throw new NullPointerException();
853       }
854       checkByteStringIsUtf8(value);
855       serviceName_ = value;
856       bitField0_ |= 0x00000001;
857       onChanged();
858       return this;
859     }
860 
861     private java.util.List<com.google.api.servicecontrol.v1.Operation> operations_ =
862         java.util.Collections.emptyList();
863 
ensureOperationsIsMutable()864     private void ensureOperationsIsMutable() {
865       if (!((bitField0_ & 0x00000002) != 0)) {
866         operations_ =
867             new java.util.ArrayList<com.google.api.servicecontrol.v1.Operation>(operations_);
868         bitField0_ |= 0x00000002;
869       }
870     }
871 
872     private com.google.protobuf.RepeatedFieldBuilderV3<
873             com.google.api.servicecontrol.v1.Operation,
874             com.google.api.servicecontrol.v1.Operation.Builder,
875             com.google.api.servicecontrol.v1.OperationOrBuilder>
876         operationsBuilder_;
877 
878     /**
879      *
880      *
881      * <pre>
882      * Operations to be reported.
883      * Typically the service should report one operation per request.
884      * Putting multiple operations into a single request is allowed, but should
885      * be used only when multiple operations are natually available at the time
886      * of the report.
887      * There is no limit on the number of operations in the same ReportRequest,
888      * however the ReportRequest size should be no larger than 1MB. See
889      * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
890      * for partial failure behavior.
891      * </pre>
892      *
893      * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
894      */
getOperationsList()895     public java.util.List<com.google.api.servicecontrol.v1.Operation> getOperationsList() {
896       if (operationsBuilder_ == null) {
897         return java.util.Collections.unmodifiableList(operations_);
898       } else {
899         return operationsBuilder_.getMessageList();
900       }
901     }
902     /**
903      *
904      *
905      * <pre>
906      * Operations to be reported.
907      * Typically the service should report one operation per request.
908      * Putting multiple operations into a single request is allowed, but should
909      * be used only when multiple operations are natually available at the time
910      * of the report.
911      * There is no limit on the number of operations in the same ReportRequest,
912      * however the ReportRequest size should be no larger than 1MB. See
913      * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
914      * for partial failure behavior.
915      * </pre>
916      *
917      * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
918      */
getOperationsCount()919     public int getOperationsCount() {
920       if (operationsBuilder_ == null) {
921         return operations_.size();
922       } else {
923         return operationsBuilder_.getCount();
924       }
925     }
926     /**
927      *
928      *
929      * <pre>
930      * Operations to be reported.
931      * Typically the service should report one operation per request.
932      * Putting multiple operations into a single request is allowed, but should
933      * be used only when multiple operations are natually available at the time
934      * of the report.
935      * There is no limit on the number of operations in the same ReportRequest,
936      * however the ReportRequest size should be no larger than 1MB. See
937      * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
938      * for partial failure behavior.
939      * </pre>
940      *
941      * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
942      */
getOperations(int index)943     public com.google.api.servicecontrol.v1.Operation getOperations(int index) {
944       if (operationsBuilder_ == null) {
945         return operations_.get(index);
946       } else {
947         return operationsBuilder_.getMessage(index);
948       }
949     }
950     /**
951      *
952      *
953      * <pre>
954      * Operations to be reported.
955      * Typically the service should report one operation per request.
956      * Putting multiple operations into a single request is allowed, but should
957      * be used only when multiple operations are natually available at the time
958      * of the report.
959      * There is no limit on the number of operations in the same ReportRequest,
960      * however the ReportRequest size should be no larger than 1MB. See
961      * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
962      * for partial failure behavior.
963      * </pre>
964      *
965      * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
966      */
setOperations(int index, com.google.api.servicecontrol.v1.Operation value)967     public Builder setOperations(int index, com.google.api.servicecontrol.v1.Operation value) {
968       if (operationsBuilder_ == null) {
969         if (value == null) {
970           throw new NullPointerException();
971         }
972         ensureOperationsIsMutable();
973         operations_.set(index, value);
974         onChanged();
975       } else {
976         operationsBuilder_.setMessage(index, value);
977       }
978       return this;
979     }
980     /**
981      *
982      *
983      * <pre>
984      * Operations to be reported.
985      * Typically the service should report one operation per request.
986      * Putting multiple operations into a single request is allowed, but should
987      * be used only when multiple operations are natually available at the time
988      * of the report.
989      * There is no limit on the number of operations in the same ReportRequest,
990      * however the ReportRequest size should be no larger than 1MB. See
991      * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
992      * for partial failure behavior.
993      * </pre>
994      *
995      * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
996      */
setOperations( int index, com.google.api.servicecontrol.v1.Operation.Builder builderForValue)997     public Builder setOperations(
998         int index, com.google.api.servicecontrol.v1.Operation.Builder builderForValue) {
999       if (operationsBuilder_ == null) {
1000         ensureOperationsIsMutable();
1001         operations_.set(index, builderForValue.build());
1002         onChanged();
1003       } else {
1004         operationsBuilder_.setMessage(index, builderForValue.build());
1005       }
1006       return this;
1007     }
1008     /**
1009      *
1010      *
1011      * <pre>
1012      * Operations to be reported.
1013      * Typically the service should report one operation per request.
1014      * Putting multiple operations into a single request is allowed, but should
1015      * be used only when multiple operations are natually available at the time
1016      * of the report.
1017      * There is no limit on the number of operations in the same ReportRequest,
1018      * however the ReportRequest size should be no larger than 1MB. See
1019      * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
1020      * for partial failure behavior.
1021      * </pre>
1022      *
1023      * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
1024      */
addOperations(com.google.api.servicecontrol.v1.Operation value)1025     public Builder addOperations(com.google.api.servicecontrol.v1.Operation value) {
1026       if (operationsBuilder_ == null) {
1027         if (value == null) {
1028           throw new NullPointerException();
1029         }
1030         ensureOperationsIsMutable();
1031         operations_.add(value);
1032         onChanged();
1033       } else {
1034         operationsBuilder_.addMessage(value);
1035       }
1036       return this;
1037     }
1038     /**
1039      *
1040      *
1041      * <pre>
1042      * Operations to be reported.
1043      * Typically the service should report one operation per request.
1044      * Putting multiple operations into a single request is allowed, but should
1045      * be used only when multiple operations are natually available at the time
1046      * of the report.
1047      * There is no limit on the number of operations in the same ReportRequest,
1048      * however the ReportRequest size should be no larger than 1MB. See
1049      * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
1050      * for partial failure behavior.
1051      * </pre>
1052      *
1053      * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
1054      */
addOperations(int index, com.google.api.servicecontrol.v1.Operation value)1055     public Builder addOperations(int index, com.google.api.servicecontrol.v1.Operation value) {
1056       if (operationsBuilder_ == null) {
1057         if (value == null) {
1058           throw new NullPointerException();
1059         }
1060         ensureOperationsIsMutable();
1061         operations_.add(index, value);
1062         onChanged();
1063       } else {
1064         operationsBuilder_.addMessage(index, value);
1065       }
1066       return this;
1067     }
1068     /**
1069      *
1070      *
1071      * <pre>
1072      * Operations to be reported.
1073      * Typically the service should report one operation per request.
1074      * Putting multiple operations into a single request is allowed, but should
1075      * be used only when multiple operations are natually available at the time
1076      * of the report.
1077      * There is no limit on the number of operations in the same ReportRequest,
1078      * however the ReportRequest size should be no larger than 1MB. See
1079      * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
1080      * for partial failure behavior.
1081      * </pre>
1082      *
1083      * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
1084      */
addOperations( com.google.api.servicecontrol.v1.Operation.Builder builderForValue)1085     public Builder addOperations(
1086         com.google.api.servicecontrol.v1.Operation.Builder builderForValue) {
1087       if (operationsBuilder_ == null) {
1088         ensureOperationsIsMutable();
1089         operations_.add(builderForValue.build());
1090         onChanged();
1091       } else {
1092         operationsBuilder_.addMessage(builderForValue.build());
1093       }
1094       return this;
1095     }
1096     /**
1097      *
1098      *
1099      * <pre>
1100      * Operations to be reported.
1101      * Typically the service should report one operation per request.
1102      * Putting multiple operations into a single request is allowed, but should
1103      * be used only when multiple operations are natually available at the time
1104      * of the report.
1105      * There is no limit on the number of operations in the same ReportRequest,
1106      * however the ReportRequest size should be no larger than 1MB. See
1107      * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
1108      * for partial failure behavior.
1109      * </pre>
1110      *
1111      * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
1112      */
addOperations( int index, com.google.api.servicecontrol.v1.Operation.Builder builderForValue)1113     public Builder addOperations(
1114         int index, com.google.api.servicecontrol.v1.Operation.Builder builderForValue) {
1115       if (operationsBuilder_ == null) {
1116         ensureOperationsIsMutable();
1117         operations_.add(index, builderForValue.build());
1118         onChanged();
1119       } else {
1120         operationsBuilder_.addMessage(index, builderForValue.build());
1121       }
1122       return this;
1123     }
1124     /**
1125      *
1126      *
1127      * <pre>
1128      * Operations to be reported.
1129      * Typically the service should report one operation per request.
1130      * Putting multiple operations into a single request is allowed, but should
1131      * be used only when multiple operations are natually available at the time
1132      * of the report.
1133      * There is no limit on the number of operations in the same ReportRequest,
1134      * however the ReportRequest size should be no larger than 1MB. See
1135      * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
1136      * for partial failure behavior.
1137      * </pre>
1138      *
1139      * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
1140      */
addAllOperations( java.lang.Iterable<? extends com.google.api.servicecontrol.v1.Operation> values)1141     public Builder addAllOperations(
1142         java.lang.Iterable<? extends com.google.api.servicecontrol.v1.Operation> values) {
1143       if (operationsBuilder_ == null) {
1144         ensureOperationsIsMutable();
1145         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, operations_);
1146         onChanged();
1147       } else {
1148         operationsBuilder_.addAllMessages(values);
1149       }
1150       return this;
1151     }
1152     /**
1153      *
1154      *
1155      * <pre>
1156      * Operations to be reported.
1157      * Typically the service should report one operation per request.
1158      * Putting multiple operations into a single request is allowed, but should
1159      * be used only when multiple operations are natually available at the time
1160      * of the report.
1161      * There is no limit on the number of operations in the same ReportRequest,
1162      * however the ReportRequest size should be no larger than 1MB. See
1163      * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
1164      * for partial failure behavior.
1165      * </pre>
1166      *
1167      * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
1168      */
clearOperations()1169     public Builder clearOperations() {
1170       if (operationsBuilder_ == null) {
1171         operations_ = java.util.Collections.emptyList();
1172         bitField0_ = (bitField0_ & ~0x00000002);
1173         onChanged();
1174       } else {
1175         operationsBuilder_.clear();
1176       }
1177       return this;
1178     }
1179     /**
1180      *
1181      *
1182      * <pre>
1183      * Operations to be reported.
1184      * Typically the service should report one operation per request.
1185      * Putting multiple operations into a single request is allowed, but should
1186      * be used only when multiple operations are natually available at the time
1187      * of the report.
1188      * There is no limit on the number of operations in the same ReportRequest,
1189      * however the ReportRequest size should be no larger than 1MB. See
1190      * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
1191      * for partial failure behavior.
1192      * </pre>
1193      *
1194      * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
1195      */
removeOperations(int index)1196     public Builder removeOperations(int index) {
1197       if (operationsBuilder_ == null) {
1198         ensureOperationsIsMutable();
1199         operations_.remove(index);
1200         onChanged();
1201       } else {
1202         operationsBuilder_.remove(index);
1203       }
1204       return this;
1205     }
1206     /**
1207      *
1208      *
1209      * <pre>
1210      * Operations to be reported.
1211      * Typically the service should report one operation per request.
1212      * Putting multiple operations into a single request is allowed, but should
1213      * be used only when multiple operations are natually available at the time
1214      * of the report.
1215      * There is no limit on the number of operations in the same ReportRequest,
1216      * however the ReportRequest size should be no larger than 1MB. See
1217      * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
1218      * for partial failure behavior.
1219      * </pre>
1220      *
1221      * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
1222      */
getOperationsBuilder(int index)1223     public com.google.api.servicecontrol.v1.Operation.Builder getOperationsBuilder(int index) {
1224       return getOperationsFieldBuilder().getBuilder(index);
1225     }
1226     /**
1227      *
1228      *
1229      * <pre>
1230      * Operations to be reported.
1231      * Typically the service should report one operation per request.
1232      * Putting multiple operations into a single request is allowed, but should
1233      * be used only when multiple operations are natually available at the time
1234      * of the report.
1235      * There is no limit on the number of operations in the same ReportRequest,
1236      * however the ReportRequest size should be no larger than 1MB. See
1237      * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
1238      * for partial failure behavior.
1239      * </pre>
1240      *
1241      * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
1242      */
getOperationsOrBuilder(int index)1243     public com.google.api.servicecontrol.v1.OperationOrBuilder getOperationsOrBuilder(int index) {
1244       if (operationsBuilder_ == null) {
1245         return operations_.get(index);
1246       } else {
1247         return operationsBuilder_.getMessageOrBuilder(index);
1248       }
1249     }
1250     /**
1251      *
1252      *
1253      * <pre>
1254      * Operations to be reported.
1255      * Typically the service should report one operation per request.
1256      * Putting multiple operations into a single request is allowed, but should
1257      * be used only when multiple operations are natually available at the time
1258      * of the report.
1259      * There is no limit on the number of operations in the same ReportRequest,
1260      * however the ReportRequest size should be no larger than 1MB. See
1261      * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
1262      * for partial failure behavior.
1263      * </pre>
1264      *
1265      * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
1266      */
1267     public java.util.List<? extends com.google.api.servicecontrol.v1.OperationOrBuilder>
getOperationsOrBuilderList()1268         getOperationsOrBuilderList() {
1269       if (operationsBuilder_ != null) {
1270         return operationsBuilder_.getMessageOrBuilderList();
1271       } else {
1272         return java.util.Collections.unmodifiableList(operations_);
1273       }
1274     }
1275     /**
1276      *
1277      *
1278      * <pre>
1279      * Operations to be reported.
1280      * Typically the service should report one operation per request.
1281      * Putting multiple operations into a single request is allowed, but should
1282      * be used only when multiple operations are natually available at the time
1283      * of the report.
1284      * There is no limit on the number of operations in the same ReportRequest,
1285      * however the ReportRequest size should be no larger than 1MB. See
1286      * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
1287      * for partial failure behavior.
1288      * </pre>
1289      *
1290      * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
1291      */
addOperationsBuilder()1292     public com.google.api.servicecontrol.v1.Operation.Builder addOperationsBuilder() {
1293       return getOperationsFieldBuilder()
1294           .addBuilder(com.google.api.servicecontrol.v1.Operation.getDefaultInstance());
1295     }
1296     /**
1297      *
1298      *
1299      * <pre>
1300      * Operations to be reported.
1301      * Typically the service should report one operation per request.
1302      * Putting multiple operations into a single request is allowed, but should
1303      * be used only when multiple operations are natually available at the time
1304      * of the report.
1305      * There is no limit on the number of operations in the same ReportRequest,
1306      * however the ReportRequest size should be no larger than 1MB. See
1307      * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
1308      * for partial failure behavior.
1309      * </pre>
1310      *
1311      * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
1312      */
addOperationsBuilder(int index)1313     public com.google.api.servicecontrol.v1.Operation.Builder addOperationsBuilder(int index) {
1314       return getOperationsFieldBuilder()
1315           .addBuilder(index, com.google.api.servicecontrol.v1.Operation.getDefaultInstance());
1316     }
1317     /**
1318      *
1319      *
1320      * <pre>
1321      * Operations to be reported.
1322      * Typically the service should report one operation per request.
1323      * Putting multiple operations into a single request is allowed, but should
1324      * be used only when multiple operations are natually available at the time
1325      * of the report.
1326      * There is no limit on the number of operations in the same ReportRequest,
1327      * however the ReportRequest size should be no larger than 1MB. See
1328      * [ReportResponse.report_errors][google.api.servicecontrol.v1.ReportResponse.report_errors]
1329      * for partial failure behavior.
1330      * </pre>
1331      *
1332      * <code>repeated .google.api.servicecontrol.v1.Operation operations = 2;</code>
1333      */
1334     public java.util.List<com.google.api.servicecontrol.v1.Operation.Builder>
getOperationsBuilderList()1335         getOperationsBuilderList() {
1336       return getOperationsFieldBuilder().getBuilderList();
1337     }
1338 
1339     private com.google.protobuf.RepeatedFieldBuilderV3<
1340             com.google.api.servicecontrol.v1.Operation,
1341             com.google.api.servicecontrol.v1.Operation.Builder,
1342             com.google.api.servicecontrol.v1.OperationOrBuilder>
getOperationsFieldBuilder()1343         getOperationsFieldBuilder() {
1344       if (operationsBuilder_ == null) {
1345         operationsBuilder_ =
1346             new com.google.protobuf.RepeatedFieldBuilderV3<
1347                 com.google.api.servicecontrol.v1.Operation,
1348                 com.google.api.servicecontrol.v1.Operation.Builder,
1349                 com.google.api.servicecontrol.v1.OperationOrBuilder>(
1350                 operations_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
1351         operations_ = null;
1352       }
1353       return operationsBuilder_;
1354     }
1355 
1356     private java.lang.Object serviceConfigId_ = "";
1357     /**
1358      *
1359      *
1360      * <pre>
1361      * Specifies which version of service config should be used to process the
1362      * request.
1363      * If unspecified or no matching version can be found, the
1364      * latest one will be used.
1365      * </pre>
1366      *
1367      * <code>string service_config_id = 3;</code>
1368      *
1369      * @return The serviceConfigId.
1370      */
getServiceConfigId()1371     public java.lang.String getServiceConfigId() {
1372       java.lang.Object ref = serviceConfigId_;
1373       if (!(ref instanceof java.lang.String)) {
1374         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1375         java.lang.String s = bs.toStringUtf8();
1376         serviceConfigId_ = s;
1377         return s;
1378       } else {
1379         return (java.lang.String) ref;
1380       }
1381     }
1382     /**
1383      *
1384      *
1385      * <pre>
1386      * Specifies which version of service config should be used to process the
1387      * request.
1388      * If unspecified or no matching version can be found, the
1389      * latest one will be used.
1390      * </pre>
1391      *
1392      * <code>string service_config_id = 3;</code>
1393      *
1394      * @return The bytes for serviceConfigId.
1395      */
getServiceConfigIdBytes()1396     public com.google.protobuf.ByteString getServiceConfigIdBytes() {
1397       java.lang.Object ref = serviceConfigId_;
1398       if (ref instanceof String) {
1399         com.google.protobuf.ByteString b =
1400             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1401         serviceConfigId_ = b;
1402         return b;
1403       } else {
1404         return (com.google.protobuf.ByteString) ref;
1405       }
1406     }
1407     /**
1408      *
1409      *
1410      * <pre>
1411      * Specifies which version of service config should be used to process the
1412      * request.
1413      * If unspecified or no matching version can be found, the
1414      * latest one will be used.
1415      * </pre>
1416      *
1417      * <code>string service_config_id = 3;</code>
1418      *
1419      * @param value The serviceConfigId to set.
1420      * @return This builder for chaining.
1421      */
setServiceConfigId(java.lang.String value)1422     public Builder setServiceConfigId(java.lang.String value) {
1423       if (value == null) {
1424         throw new NullPointerException();
1425       }
1426       serviceConfigId_ = value;
1427       bitField0_ |= 0x00000004;
1428       onChanged();
1429       return this;
1430     }
1431     /**
1432      *
1433      *
1434      * <pre>
1435      * Specifies which version of service config should be used to process the
1436      * request.
1437      * If unspecified or no matching version can be found, the
1438      * latest one will be used.
1439      * </pre>
1440      *
1441      * <code>string service_config_id = 3;</code>
1442      *
1443      * @return This builder for chaining.
1444      */
clearServiceConfigId()1445     public Builder clearServiceConfigId() {
1446       serviceConfigId_ = getDefaultInstance().getServiceConfigId();
1447       bitField0_ = (bitField0_ & ~0x00000004);
1448       onChanged();
1449       return this;
1450     }
1451     /**
1452      *
1453      *
1454      * <pre>
1455      * Specifies which version of service config should be used to process the
1456      * request.
1457      * If unspecified or no matching version can be found, the
1458      * latest one will be used.
1459      * </pre>
1460      *
1461      * <code>string service_config_id = 3;</code>
1462      *
1463      * @param value The bytes for serviceConfigId to set.
1464      * @return This builder for chaining.
1465      */
setServiceConfigIdBytes(com.google.protobuf.ByteString value)1466     public Builder setServiceConfigIdBytes(com.google.protobuf.ByteString value) {
1467       if (value == null) {
1468         throw new NullPointerException();
1469       }
1470       checkByteStringIsUtf8(value);
1471       serviceConfigId_ = value;
1472       bitField0_ |= 0x00000004;
1473       onChanged();
1474       return this;
1475     }
1476 
1477     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1478     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1479       return super.setUnknownFields(unknownFields);
1480     }
1481 
1482     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1483     public final Builder mergeUnknownFields(
1484         final com.google.protobuf.UnknownFieldSet unknownFields) {
1485       return super.mergeUnknownFields(unknownFields);
1486     }
1487 
1488     // @@protoc_insertion_point(builder_scope:google.api.servicecontrol.v1.ReportRequest)
1489   }
1490 
1491   // @@protoc_insertion_point(class_scope:google.api.servicecontrol.v1.ReportRequest)
1492   private static final com.google.api.servicecontrol.v1.ReportRequest DEFAULT_INSTANCE;
1493 
1494   static {
1495     DEFAULT_INSTANCE = new com.google.api.servicecontrol.v1.ReportRequest();
1496   }
1497 
getDefaultInstance()1498   public static com.google.api.servicecontrol.v1.ReportRequest getDefaultInstance() {
1499     return DEFAULT_INSTANCE;
1500   }
1501 
1502   private static final com.google.protobuf.Parser<ReportRequest> PARSER =
1503       new com.google.protobuf.AbstractParser<ReportRequest>() {
1504         @java.lang.Override
1505         public ReportRequest parsePartialFrom(
1506             com.google.protobuf.CodedInputStream input,
1507             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1508             throws com.google.protobuf.InvalidProtocolBufferException {
1509           Builder builder = newBuilder();
1510           try {
1511             builder.mergeFrom(input, extensionRegistry);
1512           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1513             throw e.setUnfinishedMessage(builder.buildPartial());
1514           } catch (com.google.protobuf.UninitializedMessageException e) {
1515             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1516           } catch (java.io.IOException e) {
1517             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1518                 .setUnfinishedMessage(builder.buildPartial());
1519           }
1520           return builder.buildPartial();
1521         }
1522       };
1523 
parser()1524   public static com.google.protobuf.Parser<ReportRequest> parser() {
1525     return PARSER;
1526   }
1527 
1528   @java.lang.Override
getParserForType()1529   public com.google.protobuf.Parser<ReportRequest> getParserForType() {
1530     return PARSER;
1531   }
1532 
1533   @java.lang.Override
getDefaultInstanceForType()1534   public com.google.api.servicecontrol.v1.ReportRequest getDefaultInstanceForType() {
1535     return DEFAULT_INSTANCE;
1536   }
1537 }
1538