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