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