• 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.ImportCustomer][google.cloud.channel.v1.CloudChannelService.ImportCustomer]
27  * </pre>
28  *
29  * Protobuf type {@code google.cloud.channel.v1.ImportCustomerRequest}
30  */
31 public final class ImportCustomerRequest extends com.google.protobuf.GeneratedMessageV3
32     implements
33     // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ImportCustomerRequest)
34     ImportCustomerRequestOrBuilder {
35   private static final long serialVersionUID = 0L;
36   // Use ImportCustomerRequest.newBuilder() to construct.
ImportCustomerRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)37   private ImportCustomerRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
38     super(builder);
39   }
40 
ImportCustomerRequest()41   private ImportCustomerRequest() {
42     parent_ = "";
43     authToken_ = "";
44     channelPartnerId_ = "";
45     customer_ = "";
46   }
47 
48   @java.lang.Override
49   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)50   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
51     return new ImportCustomerRequest();
52   }
53 
54   @java.lang.Override
getUnknownFields()55   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
56     return this.unknownFields;
57   }
58 
getDescriptor()59   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
60     return com.google.cloud.channel.v1.ServiceProto
61         .internal_static_google_cloud_channel_v1_ImportCustomerRequest_descriptor;
62   }
63 
64   @java.lang.Override
65   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()66       internalGetFieldAccessorTable() {
67     return com.google.cloud.channel.v1.ServiceProto
68         .internal_static_google_cloud_channel_v1_ImportCustomerRequest_fieldAccessorTable
69         .ensureFieldAccessorsInitialized(
70             com.google.cloud.channel.v1.ImportCustomerRequest.class,
71             com.google.cloud.channel.v1.ImportCustomerRequest.Builder.class);
72   }
73 
74   private int customerIdentityCase_ = 0;
75   private java.lang.Object customerIdentity_;
76 
77   public enum CustomerIdentityCase
78       implements
79           com.google.protobuf.Internal.EnumLite,
80           com.google.protobuf.AbstractMessage.InternalOneOfEnum {
81     DOMAIN(2),
82     CLOUD_IDENTITY_ID(3),
83     CUSTOMERIDENTITY_NOT_SET(0);
84     private final int value;
85 
CustomerIdentityCase(int value)86     private CustomerIdentityCase(int value) {
87       this.value = value;
88     }
89     /**
90      * @param value The number of the enum to look for.
91      * @return The enum associated with the given number.
92      * @deprecated Use {@link #forNumber(int)} instead.
93      */
94     @java.lang.Deprecated
valueOf(int value)95     public static CustomerIdentityCase valueOf(int value) {
96       return forNumber(value);
97     }
98 
forNumber(int value)99     public static CustomerIdentityCase forNumber(int value) {
100       switch (value) {
101         case 2:
102           return DOMAIN;
103         case 3:
104           return CLOUD_IDENTITY_ID;
105         case 0:
106           return CUSTOMERIDENTITY_NOT_SET;
107         default:
108           return null;
109       }
110     }
111 
getNumber()112     public int getNumber() {
113       return this.value;
114     }
115   };
116 
getCustomerIdentityCase()117   public CustomerIdentityCase getCustomerIdentityCase() {
118     return CustomerIdentityCase.forNumber(customerIdentityCase_);
119   }
120 
121   public static final int DOMAIN_FIELD_NUMBER = 2;
122   /**
123    *
124    *
125    * <pre>
126    * Required. Customer domain.
127    * </pre>
128    *
129    * <code>string domain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
130    *
131    * @return Whether the domain field is set.
132    */
hasDomain()133   public boolean hasDomain() {
134     return customerIdentityCase_ == 2;
135   }
136   /**
137    *
138    *
139    * <pre>
140    * Required. Customer domain.
141    * </pre>
142    *
143    * <code>string domain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
144    *
145    * @return The domain.
146    */
getDomain()147   public java.lang.String getDomain() {
148     java.lang.Object ref = "";
149     if (customerIdentityCase_ == 2) {
150       ref = customerIdentity_;
151     }
152     if (ref instanceof java.lang.String) {
153       return (java.lang.String) ref;
154     } else {
155       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
156       java.lang.String s = bs.toStringUtf8();
157       if (customerIdentityCase_ == 2) {
158         customerIdentity_ = s;
159       }
160       return s;
161     }
162   }
163   /**
164    *
165    *
166    * <pre>
167    * Required. Customer domain.
168    * </pre>
169    *
170    * <code>string domain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
171    *
172    * @return The bytes for domain.
173    */
getDomainBytes()174   public com.google.protobuf.ByteString getDomainBytes() {
175     java.lang.Object ref = "";
176     if (customerIdentityCase_ == 2) {
177       ref = customerIdentity_;
178     }
179     if (ref instanceof java.lang.String) {
180       com.google.protobuf.ByteString b =
181           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
182       if (customerIdentityCase_ == 2) {
183         customerIdentity_ = b;
184       }
185       return b;
186     } else {
187       return (com.google.protobuf.ByteString) ref;
188     }
189   }
190 
191   public static final int CLOUD_IDENTITY_ID_FIELD_NUMBER = 3;
192   /**
193    *
194    *
195    * <pre>
196    * Required. Customer's Cloud Identity ID
197    * </pre>
198    *
199    * <code>string cloud_identity_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
200    *
201    * @return Whether the cloudIdentityId field is set.
202    */
hasCloudIdentityId()203   public boolean hasCloudIdentityId() {
204     return customerIdentityCase_ == 3;
205   }
206   /**
207    *
208    *
209    * <pre>
210    * Required. Customer's Cloud Identity ID
211    * </pre>
212    *
213    * <code>string cloud_identity_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
214    *
215    * @return The cloudIdentityId.
216    */
getCloudIdentityId()217   public java.lang.String getCloudIdentityId() {
218     java.lang.Object ref = "";
219     if (customerIdentityCase_ == 3) {
220       ref = customerIdentity_;
221     }
222     if (ref instanceof java.lang.String) {
223       return (java.lang.String) ref;
224     } else {
225       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
226       java.lang.String s = bs.toStringUtf8();
227       if (customerIdentityCase_ == 3) {
228         customerIdentity_ = s;
229       }
230       return s;
231     }
232   }
233   /**
234    *
235    *
236    * <pre>
237    * Required. Customer's Cloud Identity ID
238    * </pre>
239    *
240    * <code>string cloud_identity_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
241    *
242    * @return The bytes for cloudIdentityId.
243    */
getCloudIdentityIdBytes()244   public com.google.protobuf.ByteString getCloudIdentityIdBytes() {
245     java.lang.Object ref = "";
246     if (customerIdentityCase_ == 3) {
247       ref = customerIdentity_;
248     }
249     if (ref instanceof java.lang.String) {
250       com.google.protobuf.ByteString b =
251           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
252       if (customerIdentityCase_ == 3) {
253         customerIdentity_ = b;
254       }
255       return b;
256     } else {
257       return (com.google.protobuf.ByteString) ref;
258     }
259   }
260 
261   public static final int PARENT_FIELD_NUMBER = 1;
262 
263   @SuppressWarnings("serial")
264   private volatile java.lang.Object parent_ = "";
265   /**
266    *
267    *
268    * <pre>
269    * Required. The resource name of the reseller's account.
270    * Parent takes the format: accounts/{account_id} or
271    * accounts/{account_id}/channelPartnerLinks/{channel_partner_id}
272    * </pre>
273    *
274    * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
275    *
276    * @return The parent.
277    */
278   @java.lang.Override
getParent()279   public java.lang.String getParent() {
280     java.lang.Object ref = parent_;
281     if (ref instanceof java.lang.String) {
282       return (java.lang.String) ref;
283     } else {
284       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
285       java.lang.String s = bs.toStringUtf8();
286       parent_ = s;
287       return s;
288     }
289   }
290   /**
291    *
292    *
293    * <pre>
294    * Required. The resource name of the reseller's account.
295    * Parent takes the format: accounts/{account_id} or
296    * accounts/{account_id}/channelPartnerLinks/{channel_partner_id}
297    * </pre>
298    *
299    * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
300    *
301    * @return The bytes for parent.
302    */
303   @java.lang.Override
getParentBytes()304   public com.google.protobuf.ByteString getParentBytes() {
305     java.lang.Object ref = parent_;
306     if (ref instanceof java.lang.String) {
307       com.google.protobuf.ByteString b =
308           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
309       parent_ = b;
310       return b;
311     } else {
312       return (com.google.protobuf.ByteString) ref;
313     }
314   }
315 
316   public static final int AUTH_TOKEN_FIELD_NUMBER = 4;
317 
318   @SuppressWarnings("serial")
319   private volatile java.lang.Object authToken_ = "";
320   /**
321    *
322    *
323    * <pre>
324    * Optional. The super admin of the resold customer generates this token to
325    * authorize a reseller to access their Cloud Identity and purchase
326    * entitlements on their behalf. You can omit this token after authorization.
327    * See https://support.google.com/a/answer/7643790 for more details.
328    * </pre>
329    *
330    * <code>string auth_token = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
331    *
332    * @return The authToken.
333    */
334   @java.lang.Override
getAuthToken()335   public java.lang.String getAuthToken() {
336     java.lang.Object ref = authToken_;
337     if (ref instanceof java.lang.String) {
338       return (java.lang.String) ref;
339     } else {
340       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
341       java.lang.String s = bs.toStringUtf8();
342       authToken_ = s;
343       return s;
344     }
345   }
346   /**
347    *
348    *
349    * <pre>
350    * Optional. The super admin of the resold customer generates this token to
351    * authorize a reseller to access their Cloud Identity and purchase
352    * entitlements on their behalf. You can omit this token after authorization.
353    * See https://support.google.com/a/answer/7643790 for more details.
354    * </pre>
355    *
356    * <code>string auth_token = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
357    *
358    * @return The bytes for authToken.
359    */
360   @java.lang.Override
getAuthTokenBytes()361   public com.google.protobuf.ByteString getAuthTokenBytes() {
362     java.lang.Object ref = authToken_;
363     if (ref instanceof java.lang.String) {
364       com.google.protobuf.ByteString b =
365           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
366       authToken_ = b;
367       return b;
368     } else {
369       return (com.google.protobuf.ByteString) ref;
370     }
371   }
372 
373   public static final int OVERWRITE_IF_EXISTS_FIELD_NUMBER = 5;
374   private boolean overwriteIfExists_ = false;
375   /**
376    *
377    *
378    * <pre>
379    * Required. Choose to overwrite an existing customer if found.
380    * This must be set to true if there is an existing customer with a
381    * conflicting region code or domain.
382    * </pre>
383    *
384    * <code>bool overwrite_if_exists = 5 [(.google.api.field_behavior) = REQUIRED];</code>
385    *
386    * @return The overwriteIfExists.
387    */
388   @java.lang.Override
getOverwriteIfExists()389   public boolean getOverwriteIfExists() {
390     return overwriteIfExists_;
391   }
392 
393   public static final int CHANNEL_PARTNER_ID_FIELD_NUMBER = 6;
394 
395   @SuppressWarnings("serial")
396   private volatile java.lang.Object channelPartnerId_ = "";
397   /**
398    *
399    *
400    * <pre>
401    * Optional. Cloud Identity ID of a channel partner who will be the direct
402    * reseller for the customer's order. This field is required for 2-tier
403    * transfer scenarios and can be provided via the request Parent binding as
404    * well.
405    * </pre>
406    *
407    * <code>string channel_partner_id = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
408    *
409    * @return The channelPartnerId.
410    */
411   @java.lang.Override
getChannelPartnerId()412   public java.lang.String getChannelPartnerId() {
413     java.lang.Object ref = channelPartnerId_;
414     if (ref instanceof java.lang.String) {
415       return (java.lang.String) ref;
416     } else {
417       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
418       java.lang.String s = bs.toStringUtf8();
419       channelPartnerId_ = s;
420       return s;
421     }
422   }
423   /**
424    *
425    *
426    * <pre>
427    * Optional. Cloud Identity ID of a channel partner who will be the direct
428    * reseller for the customer's order. This field is required for 2-tier
429    * transfer scenarios and can be provided via the request Parent binding as
430    * well.
431    * </pre>
432    *
433    * <code>string channel_partner_id = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
434    *
435    * @return The bytes for channelPartnerId.
436    */
437   @java.lang.Override
getChannelPartnerIdBytes()438   public com.google.protobuf.ByteString getChannelPartnerIdBytes() {
439     java.lang.Object ref = channelPartnerId_;
440     if (ref instanceof java.lang.String) {
441       com.google.protobuf.ByteString b =
442           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
443       channelPartnerId_ = b;
444       return b;
445     } else {
446       return (com.google.protobuf.ByteString) ref;
447     }
448   }
449 
450   public static final int CUSTOMER_FIELD_NUMBER = 7;
451 
452   @SuppressWarnings("serial")
453   private volatile java.lang.Object customer_ = "";
454   /**
455    *
456    *
457    * <pre>
458    * Optional. Specifies the customer that will receive imported Cloud Identity
459    * information.
460    * Format: accounts/{account_id}/customers/{customer_id}
461    * </pre>
462    *
463    * <code>
464    * string customer = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
465    * </code>
466    *
467    * @return The customer.
468    */
469   @java.lang.Override
getCustomer()470   public java.lang.String getCustomer() {
471     java.lang.Object ref = customer_;
472     if (ref instanceof java.lang.String) {
473       return (java.lang.String) ref;
474     } else {
475       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
476       java.lang.String s = bs.toStringUtf8();
477       customer_ = s;
478       return s;
479     }
480   }
481   /**
482    *
483    *
484    * <pre>
485    * Optional. Specifies the customer that will receive imported Cloud Identity
486    * information.
487    * Format: accounts/{account_id}/customers/{customer_id}
488    * </pre>
489    *
490    * <code>
491    * string customer = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
492    * </code>
493    *
494    * @return The bytes for customer.
495    */
496   @java.lang.Override
getCustomerBytes()497   public com.google.protobuf.ByteString getCustomerBytes() {
498     java.lang.Object ref = customer_;
499     if (ref instanceof java.lang.String) {
500       com.google.protobuf.ByteString b =
501           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
502       customer_ = b;
503       return b;
504     } else {
505       return (com.google.protobuf.ByteString) ref;
506     }
507   }
508 
509   private byte memoizedIsInitialized = -1;
510 
511   @java.lang.Override
isInitialized()512   public final boolean isInitialized() {
513     byte isInitialized = memoizedIsInitialized;
514     if (isInitialized == 1) return true;
515     if (isInitialized == 0) return false;
516 
517     memoizedIsInitialized = 1;
518     return true;
519   }
520 
521   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)522   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
523     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
524       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
525     }
526     if (customerIdentityCase_ == 2) {
527       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, customerIdentity_);
528     }
529     if (customerIdentityCase_ == 3) {
530       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, customerIdentity_);
531     }
532     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authToken_)) {
533       com.google.protobuf.GeneratedMessageV3.writeString(output, 4, authToken_);
534     }
535     if (overwriteIfExists_ != false) {
536       output.writeBool(5, overwriteIfExists_);
537     }
538     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelPartnerId_)) {
539       com.google.protobuf.GeneratedMessageV3.writeString(output, 6, channelPartnerId_);
540     }
541     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customer_)) {
542       com.google.protobuf.GeneratedMessageV3.writeString(output, 7, customer_);
543     }
544     getUnknownFields().writeTo(output);
545   }
546 
547   @java.lang.Override
getSerializedSize()548   public int getSerializedSize() {
549     int size = memoizedSize;
550     if (size != -1) return size;
551 
552     size = 0;
553     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
554       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
555     }
556     if (customerIdentityCase_ == 2) {
557       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, customerIdentity_);
558     }
559     if (customerIdentityCase_ == 3) {
560       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, customerIdentity_);
561     }
562     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authToken_)) {
563       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, authToken_);
564     }
565     if (overwriteIfExists_ != false) {
566       size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, overwriteIfExists_);
567     }
568     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(channelPartnerId_)) {
569       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, channelPartnerId_);
570     }
571     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customer_)) {
572       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, customer_);
573     }
574     size += getUnknownFields().getSerializedSize();
575     memoizedSize = size;
576     return size;
577   }
578 
579   @java.lang.Override
equals(final java.lang.Object obj)580   public boolean equals(final java.lang.Object obj) {
581     if (obj == this) {
582       return true;
583     }
584     if (!(obj instanceof com.google.cloud.channel.v1.ImportCustomerRequest)) {
585       return super.equals(obj);
586     }
587     com.google.cloud.channel.v1.ImportCustomerRequest other =
588         (com.google.cloud.channel.v1.ImportCustomerRequest) obj;
589 
590     if (!getParent().equals(other.getParent())) return false;
591     if (!getAuthToken().equals(other.getAuthToken())) return false;
592     if (getOverwriteIfExists() != other.getOverwriteIfExists()) return false;
593     if (!getChannelPartnerId().equals(other.getChannelPartnerId())) return false;
594     if (!getCustomer().equals(other.getCustomer())) return false;
595     if (!getCustomerIdentityCase().equals(other.getCustomerIdentityCase())) return false;
596     switch (customerIdentityCase_) {
597       case 2:
598         if (!getDomain().equals(other.getDomain())) return false;
599         break;
600       case 3:
601         if (!getCloudIdentityId().equals(other.getCloudIdentityId())) return false;
602         break;
603       case 0:
604       default:
605     }
606     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
607     return true;
608   }
609 
610   @java.lang.Override
hashCode()611   public int hashCode() {
612     if (memoizedHashCode != 0) {
613       return memoizedHashCode;
614     }
615     int hash = 41;
616     hash = (19 * hash) + getDescriptor().hashCode();
617     hash = (37 * hash) + PARENT_FIELD_NUMBER;
618     hash = (53 * hash) + getParent().hashCode();
619     hash = (37 * hash) + AUTH_TOKEN_FIELD_NUMBER;
620     hash = (53 * hash) + getAuthToken().hashCode();
621     hash = (37 * hash) + OVERWRITE_IF_EXISTS_FIELD_NUMBER;
622     hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOverwriteIfExists());
623     hash = (37 * hash) + CHANNEL_PARTNER_ID_FIELD_NUMBER;
624     hash = (53 * hash) + getChannelPartnerId().hashCode();
625     hash = (37 * hash) + CUSTOMER_FIELD_NUMBER;
626     hash = (53 * hash) + getCustomer().hashCode();
627     switch (customerIdentityCase_) {
628       case 2:
629         hash = (37 * hash) + DOMAIN_FIELD_NUMBER;
630         hash = (53 * hash) + getDomain().hashCode();
631         break;
632       case 3:
633         hash = (37 * hash) + CLOUD_IDENTITY_ID_FIELD_NUMBER;
634         hash = (53 * hash) + getCloudIdentityId().hashCode();
635         break;
636       case 0:
637       default:
638     }
639     hash = (29 * hash) + getUnknownFields().hashCode();
640     memoizedHashCode = hash;
641     return hash;
642   }
643 
parseFrom( java.nio.ByteBuffer data)644   public static com.google.cloud.channel.v1.ImportCustomerRequest parseFrom(
645       java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
646     return PARSER.parseFrom(data);
647   }
648 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)649   public static com.google.cloud.channel.v1.ImportCustomerRequest parseFrom(
650       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
651       throws com.google.protobuf.InvalidProtocolBufferException {
652     return PARSER.parseFrom(data, extensionRegistry);
653   }
654 
parseFrom( com.google.protobuf.ByteString data)655   public static com.google.cloud.channel.v1.ImportCustomerRequest parseFrom(
656       com.google.protobuf.ByteString data)
657       throws com.google.protobuf.InvalidProtocolBufferException {
658     return PARSER.parseFrom(data);
659   }
660 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)661   public static com.google.cloud.channel.v1.ImportCustomerRequest parseFrom(
662       com.google.protobuf.ByteString data,
663       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
664       throws com.google.protobuf.InvalidProtocolBufferException {
665     return PARSER.parseFrom(data, extensionRegistry);
666   }
667 
parseFrom(byte[] data)668   public static com.google.cloud.channel.v1.ImportCustomerRequest parseFrom(byte[] data)
669       throws com.google.protobuf.InvalidProtocolBufferException {
670     return PARSER.parseFrom(data);
671   }
672 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)673   public static com.google.cloud.channel.v1.ImportCustomerRequest parseFrom(
674       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
675       throws com.google.protobuf.InvalidProtocolBufferException {
676     return PARSER.parseFrom(data, extensionRegistry);
677   }
678 
parseFrom( java.io.InputStream input)679   public static com.google.cloud.channel.v1.ImportCustomerRequest parseFrom(
680       java.io.InputStream input) throws java.io.IOException {
681     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
682   }
683 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)684   public static com.google.cloud.channel.v1.ImportCustomerRequest parseFrom(
685       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
686       throws java.io.IOException {
687     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
688         PARSER, input, extensionRegistry);
689   }
690 
parseDelimitedFrom( java.io.InputStream input)691   public static com.google.cloud.channel.v1.ImportCustomerRequest parseDelimitedFrom(
692       java.io.InputStream input) throws java.io.IOException {
693     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
694   }
695 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)696   public static com.google.cloud.channel.v1.ImportCustomerRequest parseDelimitedFrom(
697       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
698       throws java.io.IOException {
699     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
700         PARSER, input, extensionRegistry);
701   }
702 
parseFrom( com.google.protobuf.CodedInputStream input)703   public static com.google.cloud.channel.v1.ImportCustomerRequest parseFrom(
704       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
705     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
706   }
707 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)708   public static com.google.cloud.channel.v1.ImportCustomerRequest parseFrom(
709       com.google.protobuf.CodedInputStream input,
710       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
711       throws java.io.IOException {
712     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
713         PARSER, input, extensionRegistry);
714   }
715 
716   @java.lang.Override
newBuilderForType()717   public Builder newBuilderForType() {
718     return newBuilder();
719   }
720 
newBuilder()721   public static Builder newBuilder() {
722     return DEFAULT_INSTANCE.toBuilder();
723   }
724 
newBuilder(com.google.cloud.channel.v1.ImportCustomerRequest prototype)725   public static Builder newBuilder(com.google.cloud.channel.v1.ImportCustomerRequest prototype) {
726     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
727   }
728 
729   @java.lang.Override
toBuilder()730   public Builder toBuilder() {
731     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
732   }
733 
734   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)735   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
736     Builder builder = new Builder(parent);
737     return builder;
738   }
739   /**
740    *
741    *
742    * <pre>
743    * Request message for
744    * [CloudChannelService.ImportCustomer][google.cloud.channel.v1.CloudChannelService.ImportCustomer]
745    * </pre>
746    *
747    * Protobuf type {@code google.cloud.channel.v1.ImportCustomerRequest}
748    */
749   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
750       implements
751       // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ImportCustomerRequest)
752       com.google.cloud.channel.v1.ImportCustomerRequestOrBuilder {
getDescriptor()753     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
754       return com.google.cloud.channel.v1.ServiceProto
755           .internal_static_google_cloud_channel_v1_ImportCustomerRequest_descriptor;
756     }
757 
758     @java.lang.Override
759     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()760         internalGetFieldAccessorTable() {
761       return com.google.cloud.channel.v1.ServiceProto
762           .internal_static_google_cloud_channel_v1_ImportCustomerRequest_fieldAccessorTable
763           .ensureFieldAccessorsInitialized(
764               com.google.cloud.channel.v1.ImportCustomerRequest.class,
765               com.google.cloud.channel.v1.ImportCustomerRequest.Builder.class);
766     }
767 
768     // Construct using com.google.cloud.channel.v1.ImportCustomerRequest.newBuilder()
Builder()769     private Builder() {}
770 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)771     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
772       super(parent);
773     }
774 
775     @java.lang.Override
clear()776     public Builder clear() {
777       super.clear();
778       bitField0_ = 0;
779       parent_ = "";
780       authToken_ = "";
781       overwriteIfExists_ = false;
782       channelPartnerId_ = "";
783       customer_ = "";
784       customerIdentityCase_ = 0;
785       customerIdentity_ = null;
786       return this;
787     }
788 
789     @java.lang.Override
getDescriptorForType()790     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
791       return com.google.cloud.channel.v1.ServiceProto
792           .internal_static_google_cloud_channel_v1_ImportCustomerRequest_descriptor;
793     }
794 
795     @java.lang.Override
getDefaultInstanceForType()796     public com.google.cloud.channel.v1.ImportCustomerRequest getDefaultInstanceForType() {
797       return com.google.cloud.channel.v1.ImportCustomerRequest.getDefaultInstance();
798     }
799 
800     @java.lang.Override
build()801     public com.google.cloud.channel.v1.ImportCustomerRequest build() {
802       com.google.cloud.channel.v1.ImportCustomerRequest result = buildPartial();
803       if (!result.isInitialized()) {
804         throw newUninitializedMessageException(result);
805       }
806       return result;
807     }
808 
809     @java.lang.Override
buildPartial()810     public com.google.cloud.channel.v1.ImportCustomerRequest buildPartial() {
811       com.google.cloud.channel.v1.ImportCustomerRequest result =
812           new com.google.cloud.channel.v1.ImportCustomerRequest(this);
813       if (bitField0_ != 0) {
814         buildPartial0(result);
815       }
816       buildPartialOneofs(result);
817       onBuilt();
818       return result;
819     }
820 
buildPartial0(com.google.cloud.channel.v1.ImportCustomerRequest result)821     private void buildPartial0(com.google.cloud.channel.v1.ImportCustomerRequest result) {
822       int from_bitField0_ = bitField0_;
823       if (((from_bitField0_ & 0x00000004) != 0)) {
824         result.parent_ = parent_;
825       }
826       if (((from_bitField0_ & 0x00000008) != 0)) {
827         result.authToken_ = authToken_;
828       }
829       if (((from_bitField0_ & 0x00000010) != 0)) {
830         result.overwriteIfExists_ = overwriteIfExists_;
831       }
832       if (((from_bitField0_ & 0x00000020) != 0)) {
833         result.channelPartnerId_ = channelPartnerId_;
834       }
835       if (((from_bitField0_ & 0x00000040) != 0)) {
836         result.customer_ = customer_;
837       }
838     }
839 
buildPartialOneofs(com.google.cloud.channel.v1.ImportCustomerRequest result)840     private void buildPartialOneofs(com.google.cloud.channel.v1.ImportCustomerRequest result) {
841       result.customerIdentityCase_ = customerIdentityCase_;
842       result.customerIdentity_ = this.customerIdentity_;
843     }
844 
845     @java.lang.Override
clone()846     public Builder clone() {
847       return super.clone();
848     }
849 
850     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)851     public Builder setField(
852         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
853       return super.setField(field, value);
854     }
855 
856     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)857     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
858       return super.clearField(field);
859     }
860 
861     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)862     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
863       return super.clearOneof(oneof);
864     }
865 
866     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)867     public Builder setRepeatedField(
868         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
869       return super.setRepeatedField(field, index, value);
870     }
871 
872     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)873     public Builder addRepeatedField(
874         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
875       return super.addRepeatedField(field, value);
876     }
877 
878     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)879     public Builder mergeFrom(com.google.protobuf.Message other) {
880       if (other instanceof com.google.cloud.channel.v1.ImportCustomerRequest) {
881         return mergeFrom((com.google.cloud.channel.v1.ImportCustomerRequest) other);
882       } else {
883         super.mergeFrom(other);
884         return this;
885       }
886     }
887 
mergeFrom(com.google.cloud.channel.v1.ImportCustomerRequest other)888     public Builder mergeFrom(com.google.cloud.channel.v1.ImportCustomerRequest other) {
889       if (other == com.google.cloud.channel.v1.ImportCustomerRequest.getDefaultInstance())
890         return this;
891       if (!other.getParent().isEmpty()) {
892         parent_ = other.parent_;
893         bitField0_ |= 0x00000004;
894         onChanged();
895       }
896       if (!other.getAuthToken().isEmpty()) {
897         authToken_ = other.authToken_;
898         bitField0_ |= 0x00000008;
899         onChanged();
900       }
901       if (other.getOverwriteIfExists() != false) {
902         setOverwriteIfExists(other.getOverwriteIfExists());
903       }
904       if (!other.getChannelPartnerId().isEmpty()) {
905         channelPartnerId_ = other.channelPartnerId_;
906         bitField0_ |= 0x00000020;
907         onChanged();
908       }
909       if (!other.getCustomer().isEmpty()) {
910         customer_ = other.customer_;
911         bitField0_ |= 0x00000040;
912         onChanged();
913       }
914       switch (other.getCustomerIdentityCase()) {
915         case DOMAIN:
916           {
917             customerIdentityCase_ = 2;
918             customerIdentity_ = other.customerIdentity_;
919             onChanged();
920             break;
921           }
922         case CLOUD_IDENTITY_ID:
923           {
924             customerIdentityCase_ = 3;
925             customerIdentity_ = other.customerIdentity_;
926             onChanged();
927             break;
928           }
929         case CUSTOMERIDENTITY_NOT_SET:
930           {
931             break;
932           }
933       }
934       this.mergeUnknownFields(other.getUnknownFields());
935       onChanged();
936       return this;
937     }
938 
939     @java.lang.Override
isInitialized()940     public final boolean isInitialized() {
941       return true;
942     }
943 
944     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)945     public Builder mergeFrom(
946         com.google.protobuf.CodedInputStream input,
947         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
948         throws java.io.IOException {
949       if (extensionRegistry == null) {
950         throw new java.lang.NullPointerException();
951       }
952       try {
953         boolean done = false;
954         while (!done) {
955           int tag = input.readTag();
956           switch (tag) {
957             case 0:
958               done = true;
959               break;
960             case 10:
961               {
962                 parent_ = input.readStringRequireUtf8();
963                 bitField0_ |= 0x00000004;
964                 break;
965               } // case 10
966             case 18:
967               {
968                 java.lang.String s = input.readStringRequireUtf8();
969                 customerIdentityCase_ = 2;
970                 customerIdentity_ = s;
971                 break;
972               } // case 18
973             case 26:
974               {
975                 java.lang.String s = input.readStringRequireUtf8();
976                 customerIdentityCase_ = 3;
977                 customerIdentity_ = s;
978                 break;
979               } // case 26
980             case 34:
981               {
982                 authToken_ = input.readStringRequireUtf8();
983                 bitField0_ |= 0x00000008;
984                 break;
985               } // case 34
986             case 40:
987               {
988                 overwriteIfExists_ = input.readBool();
989                 bitField0_ |= 0x00000010;
990                 break;
991               } // case 40
992             case 50:
993               {
994                 channelPartnerId_ = input.readStringRequireUtf8();
995                 bitField0_ |= 0x00000020;
996                 break;
997               } // case 50
998             case 58:
999               {
1000                 customer_ = input.readStringRequireUtf8();
1001                 bitField0_ |= 0x00000040;
1002                 break;
1003               } // case 58
1004             default:
1005               {
1006                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1007                   done = true; // was an endgroup tag
1008                 }
1009                 break;
1010               } // default:
1011           } // switch (tag)
1012         } // while (!done)
1013       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1014         throw e.unwrapIOException();
1015       } finally {
1016         onChanged();
1017       } // finally
1018       return this;
1019     }
1020 
1021     private int customerIdentityCase_ = 0;
1022     private java.lang.Object customerIdentity_;
1023 
getCustomerIdentityCase()1024     public CustomerIdentityCase getCustomerIdentityCase() {
1025       return CustomerIdentityCase.forNumber(customerIdentityCase_);
1026     }
1027 
clearCustomerIdentity()1028     public Builder clearCustomerIdentity() {
1029       customerIdentityCase_ = 0;
1030       customerIdentity_ = null;
1031       onChanged();
1032       return this;
1033     }
1034 
1035     private int bitField0_;
1036 
1037     /**
1038      *
1039      *
1040      * <pre>
1041      * Required. Customer domain.
1042      * </pre>
1043      *
1044      * <code>string domain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
1045      *
1046      * @return Whether the domain field is set.
1047      */
1048     @java.lang.Override
hasDomain()1049     public boolean hasDomain() {
1050       return customerIdentityCase_ == 2;
1051     }
1052     /**
1053      *
1054      *
1055      * <pre>
1056      * Required. Customer domain.
1057      * </pre>
1058      *
1059      * <code>string domain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
1060      *
1061      * @return The domain.
1062      */
1063     @java.lang.Override
getDomain()1064     public java.lang.String getDomain() {
1065       java.lang.Object ref = "";
1066       if (customerIdentityCase_ == 2) {
1067         ref = customerIdentity_;
1068       }
1069       if (!(ref instanceof java.lang.String)) {
1070         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1071         java.lang.String s = bs.toStringUtf8();
1072         if (customerIdentityCase_ == 2) {
1073           customerIdentity_ = s;
1074         }
1075         return s;
1076       } else {
1077         return (java.lang.String) ref;
1078       }
1079     }
1080     /**
1081      *
1082      *
1083      * <pre>
1084      * Required. Customer domain.
1085      * </pre>
1086      *
1087      * <code>string domain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
1088      *
1089      * @return The bytes for domain.
1090      */
1091     @java.lang.Override
getDomainBytes()1092     public com.google.protobuf.ByteString getDomainBytes() {
1093       java.lang.Object ref = "";
1094       if (customerIdentityCase_ == 2) {
1095         ref = customerIdentity_;
1096       }
1097       if (ref instanceof String) {
1098         com.google.protobuf.ByteString b =
1099             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1100         if (customerIdentityCase_ == 2) {
1101           customerIdentity_ = b;
1102         }
1103         return b;
1104       } else {
1105         return (com.google.protobuf.ByteString) ref;
1106       }
1107     }
1108     /**
1109      *
1110      *
1111      * <pre>
1112      * Required. Customer domain.
1113      * </pre>
1114      *
1115      * <code>string domain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
1116      *
1117      * @param value The domain to set.
1118      * @return This builder for chaining.
1119      */
setDomain(java.lang.String value)1120     public Builder setDomain(java.lang.String value) {
1121       if (value == null) {
1122         throw new NullPointerException();
1123       }
1124       customerIdentityCase_ = 2;
1125       customerIdentity_ = value;
1126       onChanged();
1127       return this;
1128     }
1129     /**
1130      *
1131      *
1132      * <pre>
1133      * Required. Customer domain.
1134      * </pre>
1135      *
1136      * <code>string domain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
1137      *
1138      * @return This builder for chaining.
1139      */
clearDomain()1140     public Builder clearDomain() {
1141       if (customerIdentityCase_ == 2) {
1142         customerIdentityCase_ = 0;
1143         customerIdentity_ = null;
1144         onChanged();
1145       }
1146       return this;
1147     }
1148     /**
1149      *
1150      *
1151      * <pre>
1152      * Required. Customer domain.
1153      * </pre>
1154      *
1155      * <code>string domain = 2 [(.google.api.field_behavior) = REQUIRED];</code>
1156      *
1157      * @param value The bytes for domain to set.
1158      * @return This builder for chaining.
1159      */
setDomainBytes(com.google.protobuf.ByteString value)1160     public Builder setDomainBytes(com.google.protobuf.ByteString value) {
1161       if (value == null) {
1162         throw new NullPointerException();
1163       }
1164       checkByteStringIsUtf8(value);
1165       customerIdentityCase_ = 2;
1166       customerIdentity_ = value;
1167       onChanged();
1168       return this;
1169     }
1170 
1171     /**
1172      *
1173      *
1174      * <pre>
1175      * Required. Customer's Cloud Identity ID
1176      * </pre>
1177      *
1178      * <code>string cloud_identity_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
1179      *
1180      * @return Whether the cloudIdentityId field is set.
1181      */
1182     @java.lang.Override
hasCloudIdentityId()1183     public boolean hasCloudIdentityId() {
1184       return customerIdentityCase_ == 3;
1185     }
1186     /**
1187      *
1188      *
1189      * <pre>
1190      * Required. Customer's Cloud Identity ID
1191      * </pre>
1192      *
1193      * <code>string cloud_identity_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
1194      *
1195      * @return The cloudIdentityId.
1196      */
1197     @java.lang.Override
getCloudIdentityId()1198     public java.lang.String getCloudIdentityId() {
1199       java.lang.Object ref = "";
1200       if (customerIdentityCase_ == 3) {
1201         ref = customerIdentity_;
1202       }
1203       if (!(ref instanceof java.lang.String)) {
1204         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1205         java.lang.String s = bs.toStringUtf8();
1206         if (customerIdentityCase_ == 3) {
1207           customerIdentity_ = s;
1208         }
1209         return s;
1210       } else {
1211         return (java.lang.String) ref;
1212       }
1213     }
1214     /**
1215      *
1216      *
1217      * <pre>
1218      * Required. Customer's Cloud Identity ID
1219      * </pre>
1220      *
1221      * <code>string cloud_identity_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
1222      *
1223      * @return The bytes for cloudIdentityId.
1224      */
1225     @java.lang.Override
getCloudIdentityIdBytes()1226     public com.google.protobuf.ByteString getCloudIdentityIdBytes() {
1227       java.lang.Object ref = "";
1228       if (customerIdentityCase_ == 3) {
1229         ref = customerIdentity_;
1230       }
1231       if (ref instanceof String) {
1232         com.google.protobuf.ByteString b =
1233             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1234         if (customerIdentityCase_ == 3) {
1235           customerIdentity_ = b;
1236         }
1237         return b;
1238       } else {
1239         return (com.google.protobuf.ByteString) ref;
1240       }
1241     }
1242     /**
1243      *
1244      *
1245      * <pre>
1246      * Required. Customer's Cloud Identity ID
1247      * </pre>
1248      *
1249      * <code>string cloud_identity_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
1250      *
1251      * @param value The cloudIdentityId to set.
1252      * @return This builder for chaining.
1253      */
setCloudIdentityId(java.lang.String value)1254     public Builder setCloudIdentityId(java.lang.String value) {
1255       if (value == null) {
1256         throw new NullPointerException();
1257       }
1258       customerIdentityCase_ = 3;
1259       customerIdentity_ = value;
1260       onChanged();
1261       return this;
1262     }
1263     /**
1264      *
1265      *
1266      * <pre>
1267      * Required. Customer's Cloud Identity ID
1268      * </pre>
1269      *
1270      * <code>string cloud_identity_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
1271      *
1272      * @return This builder for chaining.
1273      */
clearCloudIdentityId()1274     public Builder clearCloudIdentityId() {
1275       if (customerIdentityCase_ == 3) {
1276         customerIdentityCase_ = 0;
1277         customerIdentity_ = null;
1278         onChanged();
1279       }
1280       return this;
1281     }
1282     /**
1283      *
1284      *
1285      * <pre>
1286      * Required. Customer's Cloud Identity ID
1287      * </pre>
1288      *
1289      * <code>string cloud_identity_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
1290      *
1291      * @param value The bytes for cloudIdentityId to set.
1292      * @return This builder for chaining.
1293      */
setCloudIdentityIdBytes(com.google.protobuf.ByteString value)1294     public Builder setCloudIdentityIdBytes(com.google.protobuf.ByteString value) {
1295       if (value == null) {
1296         throw new NullPointerException();
1297       }
1298       checkByteStringIsUtf8(value);
1299       customerIdentityCase_ = 3;
1300       customerIdentity_ = value;
1301       onChanged();
1302       return this;
1303     }
1304 
1305     private java.lang.Object parent_ = "";
1306     /**
1307      *
1308      *
1309      * <pre>
1310      * Required. The resource name of the reseller's account.
1311      * Parent takes the format: accounts/{account_id} or
1312      * accounts/{account_id}/channelPartnerLinks/{channel_partner_id}
1313      * </pre>
1314      *
1315      * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
1316      *
1317      * @return The parent.
1318      */
getParent()1319     public java.lang.String getParent() {
1320       java.lang.Object ref = parent_;
1321       if (!(ref instanceof java.lang.String)) {
1322         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1323         java.lang.String s = bs.toStringUtf8();
1324         parent_ = s;
1325         return s;
1326       } else {
1327         return (java.lang.String) ref;
1328       }
1329     }
1330     /**
1331      *
1332      *
1333      * <pre>
1334      * Required. The resource name of the reseller's account.
1335      * Parent takes the format: accounts/{account_id} or
1336      * accounts/{account_id}/channelPartnerLinks/{channel_partner_id}
1337      * </pre>
1338      *
1339      * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
1340      *
1341      * @return The bytes for parent.
1342      */
getParentBytes()1343     public com.google.protobuf.ByteString getParentBytes() {
1344       java.lang.Object ref = parent_;
1345       if (ref instanceof String) {
1346         com.google.protobuf.ByteString b =
1347             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1348         parent_ = b;
1349         return b;
1350       } else {
1351         return (com.google.protobuf.ByteString) ref;
1352       }
1353     }
1354     /**
1355      *
1356      *
1357      * <pre>
1358      * Required. The resource name of the reseller's account.
1359      * Parent takes the format: accounts/{account_id} or
1360      * accounts/{account_id}/channelPartnerLinks/{channel_partner_id}
1361      * </pre>
1362      *
1363      * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
1364      *
1365      * @param value The parent to set.
1366      * @return This builder for chaining.
1367      */
setParent(java.lang.String value)1368     public Builder setParent(java.lang.String value) {
1369       if (value == null) {
1370         throw new NullPointerException();
1371       }
1372       parent_ = value;
1373       bitField0_ |= 0x00000004;
1374       onChanged();
1375       return this;
1376     }
1377     /**
1378      *
1379      *
1380      * <pre>
1381      * Required. The resource name of the reseller's account.
1382      * Parent takes the format: accounts/{account_id} or
1383      * accounts/{account_id}/channelPartnerLinks/{channel_partner_id}
1384      * </pre>
1385      *
1386      * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
1387      *
1388      * @return This builder for chaining.
1389      */
clearParent()1390     public Builder clearParent() {
1391       parent_ = getDefaultInstance().getParent();
1392       bitField0_ = (bitField0_ & ~0x00000004);
1393       onChanged();
1394       return this;
1395     }
1396     /**
1397      *
1398      *
1399      * <pre>
1400      * Required. The resource name of the reseller's account.
1401      * Parent takes the format: accounts/{account_id} or
1402      * accounts/{account_id}/channelPartnerLinks/{channel_partner_id}
1403      * </pre>
1404      *
1405      * <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED];</code>
1406      *
1407      * @param value The bytes for parent to set.
1408      * @return This builder for chaining.
1409      */
setParentBytes(com.google.protobuf.ByteString value)1410     public Builder setParentBytes(com.google.protobuf.ByteString value) {
1411       if (value == null) {
1412         throw new NullPointerException();
1413       }
1414       checkByteStringIsUtf8(value);
1415       parent_ = value;
1416       bitField0_ |= 0x00000004;
1417       onChanged();
1418       return this;
1419     }
1420 
1421     private java.lang.Object authToken_ = "";
1422     /**
1423      *
1424      *
1425      * <pre>
1426      * Optional. The super admin of the resold customer generates this token to
1427      * authorize a reseller to access their Cloud Identity and purchase
1428      * entitlements on their behalf. You can omit this token after authorization.
1429      * See https://support.google.com/a/answer/7643790 for more details.
1430      * </pre>
1431      *
1432      * <code>string auth_token = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
1433      *
1434      * @return The authToken.
1435      */
getAuthToken()1436     public java.lang.String getAuthToken() {
1437       java.lang.Object ref = authToken_;
1438       if (!(ref instanceof java.lang.String)) {
1439         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1440         java.lang.String s = bs.toStringUtf8();
1441         authToken_ = s;
1442         return s;
1443       } else {
1444         return (java.lang.String) ref;
1445       }
1446     }
1447     /**
1448      *
1449      *
1450      * <pre>
1451      * Optional. The super admin of the resold customer generates this token to
1452      * authorize a reseller to access their Cloud Identity and purchase
1453      * entitlements on their behalf. You can omit this token after authorization.
1454      * See https://support.google.com/a/answer/7643790 for more details.
1455      * </pre>
1456      *
1457      * <code>string auth_token = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
1458      *
1459      * @return The bytes for authToken.
1460      */
getAuthTokenBytes()1461     public com.google.protobuf.ByteString getAuthTokenBytes() {
1462       java.lang.Object ref = authToken_;
1463       if (ref instanceof String) {
1464         com.google.protobuf.ByteString b =
1465             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1466         authToken_ = b;
1467         return b;
1468       } else {
1469         return (com.google.protobuf.ByteString) ref;
1470       }
1471     }
1472     /**
1473      *
1474      *
1475      * <pre>
1476      * Optional. The super admin of the resold customer generates this token to
1477      * authorize a reseller to access their Cloud Identity and purchase
1478      * entitlements on their behalf. You can omit this token after authorization.
1479      * See https://support.google.com/a/answer/7643790 for more details.
1480      * </pre>
1481      *
1482      * <code>string auth_token = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
1483      *
1484      * @param value The authToken to set.
1485      * @return This builder for chaining.
1486      */
setAuthToken(java.lang.String value)1487     public Builder setAuthToken(java.lang.String value) {
1488       if (value == null) {
1489         throw new NullPointerException();
1490       }
1491       authToken_ = value;
1492       bitField0_ |= 0x00000008;
1493       onChanged();
1494       return this;
1495     }
1496     /**
1497      *
1498      *
1499      * <pre>
1500      * Optional. The super admin of the resold customer generates this token to
1501      * authorize a reseller to access their Cloud Identity and purchase
1502      * entitlements on their behalf. You can omit this token after authorization.
1503      * See https://support.google.com/a/answer/7643790 for more details.
1504      * </pre>
1505      *
1506      * <code>string auth_token = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
1507      *
1508      * @return This builder for chaining.
1509      */
clearAuthToken()1510     public Builder clearAuthToken() {
1511       authToken_ = getDefaultInstance().getAuthToken();
1512       bitField0_ = (bitField0_ & ~0x00000008);
1513       onChanged();
1514       return this;
1515     }
1516     /**
1517      *
1518      *
1519      * <pre>
1520      * Optional. The super admin of the resold customer generates this token to
1521      * authorize a reseller to access their Cloud Identity and purchase
1522      * entitlements on their behalf. You can omit this token after authorization.
1523      * See https://support.google.com/a/answer/7643790 for more details.
1524      * </pre>
1525      *
1526      * <code>string auth_token = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
1527      *
1528      * @param value The bytes for authToken to set.
1529      * @return This builder for chaining.
1530      */
setAuthTokenBytes(com.google.protobuf.ByteString value)1531     public Builder setAuthTokenBytes(com.google.protobuf.ByteString value) {
1532       if (value == null) {
1533         throw new NullPointerException();
1534       }
1535       checkByteStringIsUtf8(value);
1536       authToken_ = value;
1537       bitField0_ |= 0x00000008;
1538       onChanged();
1539       return this;
1540     }
1541 
1542     private boolean overwriteIfExists_;
1543     /**
1544      *
1545      *
1546      * <pre>
1547      * Required. Choose to overwrite an existing customer if found.
1548      * This must be set to true if there is an existing customer with a
1549      * conflicting region code or domain.
1550      * </pre>
1551      *
1552      * <code>bool overwrite_if_exists = 5 [(.google.api.field_behavior) = REQUIRED];</code>
1553      *
1554      * @return The overwriteIfExists.
1555      */
1556     @java.lang.Override
getOverwriteIfExists()1557     public boolean getOverwriteIfExists() {
1558       return overwriteIfExists_;
1559     }
1560     /**
1561      *
1562      *
1563      * <pre>
1564      * Required. Choose to overwrite an existing customer if found.
1565      * This must be set to true if there is an existing customer with a
1566      * conflicting region code or domain.
1567      * </pre>
1568      *
1569      * <code>bool overwrite_if_exists = 5 [(.google.api.field_behavior) = REQUIRED];</code>
1570      *
1571      * @param value The overwriteIfExists to set.
1572      * @return This builder for chaining.
1573      */
setOverwriteIfExists(boolean value)1574     public Builder setOverwriteIfExists(boolean value) {
1575 
1576       overwriteIfExists_ = value;
1577       bitField0_ |= 0x00000010;
1578       onChanged();
1579       return this;
1580     }
1581     /**
1582      *
1583      *
1584      * <pre>
1585      * Required. Choose to overwrite an existing customer if found.
1586      * This must be set to true if there is an existing customer with a
1587      * conflicting region code or domain.
1588      * </pre>
1589      *
1590      * <code>bool overwrite_if_exists = 5 [(.google.api.field_behavior) = REQUIRED];</code>
1591      *
1592      * @return This builder for chaining.
1593      */
clearOverwriteIfExists()1594     public Builder clearOverwriteIfExists() {
1595       bitField0_ = (bitField0_ & ~0x00000010);
1596       overwriteIfExists_ = false;
1597       onChanged();
1598       return this;
1599     }
1600 
1601     private java.lang.Object channelPartnerId_ = "";
1602     /**
1603      *
1604      *
1605      * <pre>
1606      * Optional. Cloud Identity ID of a channel partner who will be the direct
1607      * reseller for the customer's order. This field is required for 2-tier
1608      * transfer scenarios and can be provided via the request Parent binding as
1609      * well.
1610      * </pre>
1611      *
1612      * <code>string channel_partner_id = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
1613      *
1614      * @return The channelPartnerId.
1615      */
getChannelPartnerId()1616     public java.lang.String getChannelPartnerId() {
1617       java.lang.Object ref = channelPartnerId_;
1618       if (!(ref instanceof java.lang.String)) {
1619         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1620         java.lang.String s = bs.toStringUtf8();
1621         channelPartnerId_ = s;
1622         return s;
1623       } else {
1624         return (java.lang.String) ref;
1625       }
1626     }
1627     /**
1628      *
1629      *
1630      * <pre>
1631      * Optional. Cloud Identity ID of a channel partner who will be the direct
1632      * reseller for the customer's order. This field is required for 2-tier
1633      * transfer scenarios and can be provided via the request Parent binding as
1634      * well.
1635      * </pre>
1636      *
1637      * <code>string channel_partner_id = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
1638      *
1639      * @return The bytes for channelPartnerId.
1640      */
getChannelPartnerIdBytes()1641     public com.google.protobuf.ByteString getChannelPartnerIdBytes() {
1642       java.lang.Object ref = channelPartnerId_;
1643       if (ref instanceof String) {
1644         com.google.protobuf.ByteString b =
1645             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1646         channelPartnerId_ = b;
1647         return b;
1648       } else {
1649         return (com.google.protobuf.ByteString) ref;
1650       }
1651     }
1652     /**
1653      *
1654      *
1655      * <pre>
1656      * Optional. Cloud Identity ID of a channel partner who will be the direct
1657      * reseller for the customer's order. This field is required for 2-tier
1658      * transfer scenarios and can be provided via the request Parent binding as
1659      * well.
1660      * </pre>
1661      *
1662      * <code>string channel_partner_id = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
1663      *
1664      * @param value The channelPartnerId to set.
1665      * @return This builder for chaining.
1666      */
setChannelPartnerId(java.lang.String value)1667     public Builder setChannelPartnerId(java.lang.String value) {
1668       if (value == null) {
1669         throw new NullPointerException();
1670       }
1671       channelPartnerId_ = value;
1672       bitField0_ |= 0x00000020;
1673       onChanged();
1674       return this;
1675     }
1676     /**
1677      *
1678      *
1679      * <pre>
1680      * Optional. Cloud Identity ID of a channel partner who will be the direct
1681      * reseller for the customer's order. This field is required for 2-tier
1682      * transfer scenarios and can be provided via the request Parent binding as
1683      * well.
1684      * </pre>
1685      *
1686      * <code>string channel_partner_id = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
1687      *
1688      * @return This builder for chaining.
1689      */
clearChannelPartnerId()1690     public Builder clearChannelPartnerId() {
1691       channelPartnerId_ = getDefaultInstance().getChannelPartnerId();
1692       bitField0_ = (bitField0_ & ~0x00000020);
1693       onChanged();
1694       return this;
1695     }
1696     /**
1697      *
1698      *
1699      * <pre>
1700      * Optional. Cloud Identity ID of a channel partner who will be the direct
1701      * reseller for the customer's order. This field is required for 2-tier
1702      * transfer scenarios and can be provided via the request Parent binding as
1703      * well.
1704      * </pre>
1705      *
1706      * <code>string channel_partner_id = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
1707      *
1708      * @param value The bytes for channelPartnerId to set.
1709      * @return This builder for chaining.
1710      */
setChannelPartnerIdBytes(com.google.protobuf.ByteString value)1711     public Builder setChannelPartnerIdBytes(com.google.protobuf.ByteString value) {
1712       if (value == null) {
1713         throw new NullPointerException();
1714       }
1715       checkByteStringIsUtf8(value);
1716       channelPartnerId_ = value;
1717       bitField0_ |= 0x00000020;
1718       onChanged();
1719       return this;
1720     }
1721 
1722     private java.lang.Object customer_ = "";
1723     /**
1724      *
1725      *
1726      * <pre>
1727      * Optional. Specifies the customer that will receive imported Cloud Identity
1728      * information.
1729      * Format: accounts/{account_id}/customers/{customer_id}
1730      * </pre>
1731      *
1732      * <code>
1733      * string customer = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
1734      * </code>
1735      *
1736      * @return The customer.
1737      */
getCustomer()1738     public java.lang.String getCustomer() {
1739       java.lang.Object ref = customer_;
1740       if (!(ref instanceof java.lang.String)) {
1741         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1742         java.lang.String s = bs.toStringUtf8();
1743         customer_ = s;
1744         return s;
1745       } else {
1746         return (java.lang.String) ref;
1747       }
1748     }
1749     /**
1750      *
1751      *
1752      * <pre>
1753      * Optional. Specifies the customer that will receive imported Cloud Identity
1754      * information.
1755      * Format: accounts/{account_id}/customers/{customer_id}
1756      * </pre>
1757      *
1758      * <code>
1759      * string customer = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
1760      * </code>
1761      *
1762      * @return The bytes for customer.
1763      */
getCustomerBytes()1764     public com.google.protobuf.ByteString getCustomerBytes() {
1765       java.lang.Object ref = customer_;
1766       if (ref instanceof String) {
1767         com.google.protobuf.ByteString b =
1768             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1769         customer_ = b;
1770         return b;
1771       } else {
1772         return (com.google.protobuf.ByteString) ref;
1773       }
1774     }
1775     /**
1776      *
1777      *
1778      * <pre>
1779      * Optional. Specifies the customer that will receive imported Cloud Identity
1780      * information.
1781      * Format: accounts/{account_id}/customers/{customer_id}
1782      * </pre>
1783      *
1784      * <code>
1785      * string customer = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
1786      * </code>
1787      *
1788      * @param value The customer to set.
1789      * @return This builder for chaining.
1790      */
setCustomer(java.lang.String value)1791     public Builder setCustomer(java.lang.String value) {
1792       if (value == null) {
1793         throw new NullPointerException();
1794       }
1795       customer_ = value;
1796       bitField0_ |= 0x00000040;
1797       onChanged();
1798       return this;
1799     }
1800     /**
1801      *
1802      *
1803      * <pre>
1804      * Optional. Specifies the customer that will receive imported Cloud Identity
1805      * information.
1806      * Format: accounts/{account_id}/customers/{customer_id}
1807      * </pre>
1808      *
1809      * <code>
1810      * string customer = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
1811      * </code>
1812      *
1813      * @return This builder for chaining.
1814      */
clearCustomer()1815     public Builder clearCustomer() {
1816       customer_ = getDefaultInstance().getCustomer();
1817       bitField0_ = (bitField0_ & ~0x00000040);
1818       onChanged();
1819       return this;
1820     }
1821     /**
1822      *
1823      *
1824      * <pre>
1825      * Optional. Specifies the customer that will receive imported Cloud Identity
1826      * information.
1827      * Format: accounts/{account_id}/customers/{customer_id}
1828      * </pre>
1829      *
1830      * <code>
1831      * string customer = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
1832      * </code>
1833      *
1834      * @param value The bytes for customer to set.
1835      * @return This builder for chaining.
1836      */
setCustomerBytes(com.google.protobuf.ByteString value)1837     public Builder setCustomerBytes(com.google.protobuf.ByteString value) {
1838       if (value == null) {
1839         throw new NullPointerException();
1840       }
1841       checkByteStringIsUtf8(value);
1842       customer_ = value;
1843       bitField0_ |= 0x00000040;
1844       onChanged();
1845       return this;
1846     }
1847 
1848     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1849     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1850       return super.setUnknownFields(unknownFields);
1851     }
1852 
1853     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1854     public final Builder mergeUnknownFields(
1855         final com.google.protobuf.UnknownFieldSet unknownFields) {
1856       return super.mergeUnknownFields(unknownFields);
1857     }
1858 
1859     // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ImportCustomerRequest)
1860   }
1861 
1862   // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ImportCustomerRequest)
1863   private static final com.google.cloud.channel.v1.ImportCustomerRequest DEFAULT_INSTANCE;
1864 
1865   static {
1866     DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ImportCustomerRequest();
1867   }
1868 
getDefaultInstance()1869   public static com.google.cloud.channel.v1.ImportCustomerRequest getDefaultInstance() {
1870     return DEFAULT_INSTANCE;
1871   }
1872 
1873   private static final com.google.protobuf.Parser<ImportCustomerRequest> PARSER =
1874       new com.google.protobuf.AbstractParser<ImportCustomerRequest>() {
1875         @java.lang.Override
1876         public ImportCustomerRequest parsePartialFrom(
1877             com.google.protobuf.CodedInputStream input,
1878             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1879             throws com.google.protobuf.InvalidProtocolBufferException {
1880           Builder builder = newBuilder();
1881           try {
1882             builder.mergeFrom(input, extensionRegistry);
1883           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1884             throw e.setUnfinishedMessage(builder.buildPartial());
1885           } catch (com.google.protobuf.UninitializedMessageException e) {
1886             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1887           } catch (java.io.IOException e) {
1888             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1889                 .setUnfinishedMessage(builder.buildPartial());
1890           }
1891           return builder.buildPartial();
1892         }
1893       };
1894 
parser()1895   public static com.google.protobuf.Parser<ImportCustomerRequest> parser() {
1896     return PARSER;
1897   }
1898 
1899   @java.lang.Override
getParserForType()1900   public com.google.protobuf.Parser<ImportCustomerRequest> getParserForType() {
1901     return PARSER;
1902   }
1903 
1904   @java.lang.Override
getDefaultInstanceForType()1905   public com.google.cloud.channel.v1.ImportCustomerRequest getDefaultInstanceForType() {
1906     return DEFAULT_INSTANCE;
1907   }
1908 }
1909