• 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/memcache/v1/cloud_memcache.proto
18 
19 package com.google.cloud.memcache.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Memcached versions supported by our service.
26  * </pre>
27  *
28  * Protobuf enum {@code google.cloud.memcache.v1.MemcacheVersion}
29  */
30 public enum MemcacheVersion implements com.google.protobuf.ProtocolMessageEnum {
31   /** <code>MEMCACHE_VERSION_UNSPECIFIED = 0;</code> */
32   MEMCACHE_VERSION_UNSPECIFIED(0),
33   /**
34    *
35    *
36    * <pre>
37    * Memcached 1.5 version.
38    * </pre>
39    *
40    * <code>MEMCACHE_1_5 = 1;</code>
41    */
42   MEMCACHE_1_5(1),
43   UNRECOGNIZED(-1),
44   ;
45 
46   /** <code>MEMCACHE_VERSION_UNSPECIFIED = 0;</code> */
47   public static final int MEMCACHE_VERSION_UNSPECIFIED_VALUE = 0;
48   /**
49    *
50    *
51    * <pre>
52    * Memcached 1.5 version.
53    * </pre>
54    *
55    * <code>MEMCACHE_1_5 = 1;</code>
56    */
57   public static final int MEMCACHE_1_5_VALUE = 1;
58 
getNumber()59   public final int getNumber() {
60     if (this == UNRECOGNIZED) {
61       throw new java.lang.IllegalArgumentException(
62           "Can't get the number of an unknown enum value.");
63     }
64     return value;
65   }
66 
67   /**
68    * @param value The numeric wire value of the corresponding enum entry.
69    * @return The enum associated with the given numeric wire value.
70    * @deprecated Use {@link #forNumber(int)} instead.
71    */
72   @java.lang.Deprecated
valueOf(int value)73   public static MemcacheVersion valueOf(int value) {
74     return forNumber(value);
75   }
76 
77   /**
78    * @param value The numeric wire value of the corresponding enum entry.
79    * @return The enum associated with the given numeric wire value.
80    */
forNumber(int value)81   public static MemcacheVersion forNumber(int value) {
82     switch (value) {
83       case 0:
84         return MEMCACHE_VERSION_UNSPECIFIED;
85       case 1:
86         return MEMCACHE_1_5;
87       default:
88         return null;
89     }
90   }
91 
internalGetValueMap()92   public static com.google.protobuf.Internal.EnumLiteMap<MemcacheVersion> internalGetValueMap() {
93     return internalValueMap;
94   }
95 
96   private static final com.google.protobuf.Internal.EnumLiteMap<MemcacheVersion> internalValueMap =
97       new com.google.protobuf.Internal.EnumLiteMap<MemcacheVersion>() {
98         public MemcacheVersion findValueByNumber(int number) {
99           return MemcacheVersion.forNumber(number);
100         }
101       };
102 
getValueDescriptor()103   public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
104     if (this == UNRECOGNIZED) {
105       throw new java.lang.IllegalStateException(
106           "Can't get the descriptor of an unrecognized enum value.");
107     }
108     return getDescriptor().getValues().get(ordinal());
109   }
110 
getDescriptorForType()111   public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
112     return getDescriptor();
113   }
114 
getDescriptor()115   public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
116     return com.google.cloud.memcache.v1.CloudMemcacheProto.getDescriptor().getEnumTypes().get(0);
117   }
118 
119   private static final MemcacheVersion[] VALUES = values();
120 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)121   public static MemcacheVersion valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
122     if (desc.getType() != getDescriptor()) {
123       throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
124     }
125     if (desc.getIndex() == -1) {
126       return UNRECOGNIZED;
127     }
128     return VALUES[desc.getIndex()];
129   }
130 
131   private final int value;
132 
MemcacheVersion(int value)133   private MemcacheVersion(int value) {
134     this.value = value;
135   }
136 
137   // @@protoc_insertion_point(enum_scope:google.cloud.memcache.v1.MemcacheVersion)
138 }
139