• 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/kms/v1/resources.proto
18 
19 package com.google.cloud.kms.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] specifies how
26  * cryptographic operations are performed. For more information, see [Protection
27  * levels] (https://cloud.google.com/kms/docs/algorithms#protection_levels).
28  * </pre>
29  *
30  * Protobuf enum {@code google.cloud.kms.v1.ProtectionLevel}
31  */
32 public enum ProtectionLevel implements com.google.protobuf.ProtocolMessageEnum {
33   /**
34    *
35    *
36    * <pre>
37    * Not specified.
38    * </pre>
39    *
40    * <code>PROTECTION_LEVEL_UNSPECIFIED = 0;</code>
41    */
42   PROTECTION_LEVEL_UNSPECIFIED(0),
43   /**
44    *
45    *
46    * <pre>
47    * Crypto operations are performed in software.
48    * </pre>
49    *
50    * <code>SOFTWARE = 1;</code>
51    */
52   SOFTWARE(1),
53   /**
54    *
55    *
56    * <pre>
57    * Crypto operations are performed in a Hardware Security Module.
58    * </pre>
59    *
60    * <code>HSM = 2;</code>
61    */
62   HSM(2),
63   /**
64    *
65    *
66    * <pre>
67    * Crypto operations are performed by an external key manager.
68    * </pre>
69    *
70    * <code>EXTERNAL = 3;</code>
71    */
72   EXTERNAL(3),
73   /**
74    *
75    *
76    * <pre>
77    * Crypto operations are performed in an EKM-over-VPC backend.
78    * </pre>
79    *
80    * <code>EXTERNAL_VPC = 4;</code>
81    */
82   EXTERNAL_VPC(4),
83   UNRECOGNIZED(-1),
84   ;
85 
86   /**
87    *
88    *
89    * <pre>
90    * Not specified.
91    * </pre>
92    *
93    * <code>PROTECTION_LEVEL_UNSPECIFIED = 0;</code>
94    */
95   public static final int PROTECTION_LEVEL_UNSPECIFIED_VALUE = 0;
96   /**
97    *
98    *
99    * <pre>
100    * Crypto operations are performed in software.
101    * </pre>
102    *
103    * <code>SOFTWARE = 1;</code>
104    */
105   public static final int SOFTWARE_VALUE = 1;
106   /**
107    *
108    *
109    * <pre>
110    * Crypto operations are performed in a Hardware Security Module.
111    * </pre>
112    *
113    * <code>HSM = 2;</code>
114    */
115   public static final int HSM_VALUE = 2;
116   /**
117    *
118    *
119    * <pre>
120    * Crypto operations are performed by an external key manager.
121    * </pre>
122    *
123    * <code>EXTERNAL = 3;</code>
124    */
125   public static final int EXTERNAL_VALUE = 3;
126   /**
127    *
128    *
129    * <pre>
130    * Crypto operations are performed in an EKM-over-VPC backend.
131    * </pre>
132    *
133    * <code>EXTERNAL_VPC = 4;</code>
134    */
135   public static final int EXTERNAL_VPC_VALUE = 4;
136 
getNumber()137   public final int getNumber() {
138     if (this == UNRECOGNIZED) {
139       throw new java.lang.IllegalArgumentException(
140           "Can't get the number of an unknown enum value.");
141     }
142     return value;
143   }
144 
145   /**
146    * @param value The numeric wire value of the corresponding enum entry.
147    * @return The enum associated with the given numeric wire value.
148    * @deprecated Use {@link #forNumber(int)} instead.
149    */
150   @java.lang.Deprecated
valueOf(int value)151   public static ProtectionLevel valueOf(int value) {
152     return forNumber(value);
153   }
154 
155   /**
156    * @param value The numeric wire value of the corresponding enum entry.
157    * @return The enum associated with the given numeric wire value.
158    */
forNumber(int value)159   public static ProtectionLevel forNumber(int value) {
160     switch (value) {
161       case 0:
162         return PROTECTION_LEVEL_UNSPECIFIED;
163       case 1:
164         return SOFTWARE;
165       case 2:
166         return HSM;
167       case 3:
168         return EXTERNAL;
169       case 4:
170         return EXTERNAL_VPC;
171       default:
172         return null;
173     }
174   }
175 
internalGetValueMap()176   public static com.google.protobuf.Internal.EnumLiteMap<ProtectionLevel> internalGetValueMap() {
177     return internalValueMap;
178   }
179 
180   private static final com.google.protobuf.Internal.EnumLiteMap<ProtectionLevel> internalValueMap =
181       new com.google.protobuf.Internal.EnumLiteMap<ProtectionLevel>() {
182         public ProtectionLevel findValueByNumber(int number) {
183           return ProtectionLevel.forNumber(number);
184         }
185       };
186 
getValueDescriptor()187   public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
188     if (this == UNRECOGNIZED) {
189       throw new java.lang.IllegalStateException(
190           "Can't get the descriptor of an unrecognized enum value.");
191     }
192     return getDescriptor().getValues().get(ordinal());
193   }
194 
getDescriptorForType()195   public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
196     return getDescriptor();
197   }
198 
getDescriptor()199   public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
200     return com.google.cloud.kms.v1.KmsResourcesProto.getDescriptor().getEnumTypes().get(0);
201   }
202 
203   private static final ProtectionLevel[] VALUES = values();
204 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)205   public static ProtectionLevel valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
206     if (desc.getType() != getDescriptor()) {
207       throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
208     }
209     if (desc.getIndex() == -1) {
210       return UNRECOGNIZED;
211     }
212     return VALUES[desc.getIndex()];
213   }
214 
215   private final int value;
216 
ProtectionLevel(int value)217   private ProtectionLevel(int value) {
218     this.value = value;
219   }
220 
221   // @@protoc_insertion_point(enum_scope:google.cloud.kms.v1.ProtectionLevel)
222 }
223