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/offers.proto 18 19 package com.google.cloud.channel.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Describes how the reseller will be billed. 26 * </pre> 27 * 28 * Protobuf enum {@code google.cloud.channel.v1.PaymentPlan} 29 */ 30 public enum PaymentPlan implements com.google.protobuf.ProtocolMessageEnum { 31 /** 32 * 33 * 34 * <pre> 35 * Not used. 36 * </pre> 37 * 38 * <code>PAYMENT_PLAN_UNSPECIFIED = 0;</code> 39 */ 40 PAYMENT_PLAN_UNSPECIFIED(0), 41 /** 42 * 43 * 44 * <pre> 45 * Commitment. 46 * </pre> 47 * 48 * <code>COMMITMENT = 1;</code> 49 */ 50 COMMITMENT(1), 51 /** 52 * 53 * 54 * <pre> 55 * No commitment. 56 * </pre> 57 * 58 * <code>FLEXIBLE = 2;</code> 59 */ 60 FLEXIBLE(2), 61 /** 62 * 63 * 64 * <pre> 65 * Free. 66 * </pre> 67 * 68 * <code>FREE = 3;</code> 69 */ 70 FREE(3), 71 /** 72 * 73 * 74 * <pre> 75 * Trial. 76 * </pre> 77 * 78 * <code>TRIAL = 4;</code> 79 */ 80 TRIAL(4), 81 /** 82 * 83 * 84 * <pre> 85 * Price and ordering not available through API. 86 * </pre> 87 * 88 * <code>OFFLINE = 5;</code> 89 */ 90 OFFLINE(5), 91 UNRECOGNIZED(-1), 92 ; 93 94 /** 95 * 96 * 97 * <pre> 98 * Not used. 99 * </pre> 100 * 101 * <code>PAYMENT_PLAN_UNSPECIFIED = 0;</code> 102 */ 103 public static final int PAYMENT_PLAN_UNSPECIFIED_VALUE = 0; 104 /** 105 * 106 * 107 * <pre> 108 * Commitment. 109 * </pre> 110 * 111 * <code>COMMITMENT = 1;</code> 112 */ 113 public static final int COMMITMENT_VALUE = 1; 114 /** 115 * 116 * 117 * <pre> 118 * No commitment. 119 * </pre> 120 * 121 * <code>FLEXIBLE = 2;</code> 122 */ 123 public static final int FLEXIBLE_VALUE = 2; 124 /** 125 * 126 * 127 * <pre> 128 * Free. 129 * </pre> 130 * 131 * <code>FREE = 3;</code> 132 */ 133 public static final int FREE_VALUE = 3; 134 /** 135 * 136 * 137 * <pre> 138 * Trial. 139 * </pre> 140 * 141 * <code>TRIAL = 4;</code> 142 */ 143 public static final int TRIAL_VALUE = 4; 144 /** 145 * 146 * 147 * <pre> 148 * Price and ordering not available through API. 149 * </pre> 150 * 151 * <code>OFFLINE = 5;</code> 152 */ 153 public static final int OFFLINE_VALUE = 5; 154 getNumber()155 public final int getNumber() { 156 if (this == UNRECOGNIZED) { 157 throw new java.lang.IllegalArgumentException( 158 "Can't get the number of an unknown enum value."); 159 } 160 return value; 161 } 162 163 /** 164 * @param value The numeric wire value of the corresponding enum entry. 165 * @return The enum associated with the given numeric wire value. 166 * @deprecated Use {@link #forNumber(int)} instead. 167 */ 168 @java.lang.Deprecated valueOf(int value)169 public static PaymentPlan valueOf(int value) { 170 return forNumber(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 */ forNumber(int value)177 public static PaymentPlan forNumber(int value) { 178 switch (value) { 179 case 0: 180 return PAYMENT_PLAN_UNSPECIFIED; 181 case 1: 182 return COMMITMENT; 183 case 2: 184 return FLEXIBLE; 185 case 3: 186 return FREE; 187 case 4: 188 return TRIAL; 189 case 5: 190 return OFFLINE; 191 default: 192 return null; 193 } 194 } 195 internalGetValueMap()196 public static com.google.protobuf.Internal.EnumLiteMap<PaymentPlan> internalGetValueMap() { 197 return internalValueMap; 198 } 199 200 private static final com.google.protobuf.Internal.EnumLiteMap<PaymentPlan> internalValueMap = 201 new com.google.protobuf.Internal.EnumLiteMap<PaymentPlan>() { 202 public PaymentPlan findValueByNumber(int number) { 203 return PaymentPlan.forNumber(number); 204 } 205 }; 206 getValueDescriptor()207 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 208 if (this == UNRECOGNIZED) { 209 throw new java.lang.IllegalStateException( 210 "Can't get the descriptor of an unrecognized enum value."); 211 } 212 return getDescriptor().getValues().get(ordinal()); 213 } 214 getDescriptorForType()215 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 216 return getDescriptor(); 217 } 218 getDescriptor()219 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 220 return com.google.cloud.channel.v1.OffersProto.getDescriptor().getEnumTypes().get(1); 221 } 222 223 private static final PaymentPlan[] VALUES = values(); 224 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)225 public static PaymentPlan valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 226 if (desc.getType() != getDescriptor()) { 227 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 228 } 229 if (desc.getIndex() == -1) { 230 return UNRECOGNIZED; 231 } 232 return VALUES[desc.getIndex()]; 233 } 234 235 private final int value; 236 PaymentPlan(int value)237 private PaymentPlan(int value) { 238 this.value = value; 239 } 240 241 // @@protoc_insertion_point(enum_scope:google.cloud.channel.v1.PaymentPlan) 242 } 243