• 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/iot/v1/resources.proto
18 
19 package com.google.cloud.iot.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * **Beta Feature**
26  * The logging verbosity for device activity. Specifies which events should be
27  * written to logs. For example, if the LogLevel is ERROR, only events that
28  * terminate in errors will be logged. LogLevel is inclusive; enabling INFO
29  * logging will also enable ERROR logging.
30  * </pre>
31  *
32  * Protobuf enum {@code google.cloud.iot.v1.LogLevel}
33  */
34 public enum LogLevel implements com.google.protobuf.ProtocolMessageEnum {
35   /**
36    *
37    *
38    * <pre>
39    * No logging specified. If not specified, logging will be disabled.
40    * </pre>
41    *
42    * <code>LOG_LEVEL_UNSPECIFIED = 0;</code>
43    */
44   LOG_LEVEL_UNSPECIFIED(0),
45   /**
46    *
47    *
48    * <pre>
49    * Disables logging.
50    * </pre>
51    *
52    * <code>NONE = 10;</code>
53    */
54   NONE(10),
55   /**
56    *
57    *
58    * <pre>
59    * Error events will be logged.
60    * </pre>
61    *
62    * <code>ERROR = 20;</code>
63    */
64   ERROR(20),
65   /**
66    *
67    *
68    * <pre>
69    * Informational events will be logged, such as connections and
70    * disconnections.
71    * </pre>
72    *
73    * <code>INFO = 30;</code>
74    */
75   INFO(30),
76   /**
77    *
78    *
79    * <pre>
80    * All events will be logged.
81    * </pre>
82    *
83    * <code>DEBUG = 40;</code>
84    */
85   DEBUG(40),
86   UNRECOGNIZED(-1),
87   ;
88 
89   /**
90    *
91    *
92    * <pre>
93    * No logging specified. If not specified, logging will be disabled.
94    * </pre>
95    *
96    * <code>LOG_LEVEL_UNSPECIFIED = 0;</code>
97    */
98   public static final int LOG_LEVEL_UNSPECIFIED_VALUE = 0;
99   /**
100    *
101    *
102    * <pre>
103    * Disables logging.
104    * </pre>
105    *
106    * <code>NONE = 10;</code>
107    */
108   public static final int NONE_VALUE = 10;
109   /**
110    *
111    *
112    * <pre>
113    * Error events will be logged.
114    * </pre>
115    *
116    * <code>ERROR = 20;</code>
117    */
118   public static final int ERROR_VALUE = 20;
119   /**
120    *
121    *
122    * <pre>
123    * Informational events will be logged, such as connections and
124    * disconnections.
125    * </pre>
126    *
127    * <code>INFO = 30;</code>
128    */
129   public static final int INFO_VALUE = 30;
130   /**
131    *
132    *
133    * <pre>
134    * All events will be logged.
135    * </pre>
136    *
137    * <code>DEBUG = 40;</code>
138    */
139   public static final int DEBUG_VALUE = 40;
140 
getNumber()141   public final int getNumber() {
142     if (this == UNRECOGNIZED) {
143       throw new java.lang.IllegalArgumentException(
144           "Can't get the number of an unknown enum value.");
145     }
146     return value;
147   }
148 
149   /**
150    * @param value The numeric wire value of the corresponding enum entry.
151    * @return The enum associated with the given numeric wire value.
152    * @deprecated Use {@link #forNumber(int)} instead.
153    */
154   @java.lang.Deprecated
valueOf(int value)155   public static LogLevel valueOf(int value) {
156     return forNumber(value);
157   }
158 
159   /**
160    * @param value The numeric wire value of the corresponding enum entry.
161    * @return The enum associated with the given numeric wire value.
162    */
forNumber(int value)163   public static LogLevel forNumber(int value) {
164     switch (value) {
165       case 0:
166         return LOG_LEVEL_UNSPECIFIED;
167       case 10:
168         return NONE;
169       case 20:
170         return ERROR;
171       case 30:
172         return INFO;
173       case 40:
174         return DEBUG;
175       default:
176         return null;
177     }
178   }
179 
internalGetValueMap()180   public static com.google.protobuf.Internal.EnumLiteMap<LogLevel> internalGetValueMap() {
181     return internalValueMap;
182   }
183 
184   private static final com.google.protobuf.Internal.EnumLiteMap<LogLevel> internalValueMap =
185       new com.google.protobuf.Internal.EnumLiteMap<LogLevel>() {
186         public LogLevel findValueByNumber(int number) {
187           return LogLevel.forNumber(number);
188         }
189       };
190 
getValueDescriptor()191   public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
192     if (this == UNRECOGNIZED) {
193       throw new java.lang.IllegalStateException(
194           "Can't get the descriptor of an unrecognized enum value.");
195     }
196     return getDescriptor().getValues().get(ordinal());
197   }
198 
getDescriptorForType()199   public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
200     return getDescriptor();
201   }
202 
getDescriptor()203   public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
204     return com.google.cloud.iot.v1.ResourcesProto.getDescriptor().getEnumTypes().get(2);
205   }
206 
207   private static final LogLevel[] VALUES = values();
208 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)209   public static LogLevel valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
210     if (desc.getType() != getDescriptor()) {
211       throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
212     }
213     if (desc.getIndex() == -1) {
214       return UNRECOGNIZED;
215     }
216     return VALUES[desc.getIndex()];
217   }
218 
219   private final int value;
220 
LogLevel(int value)221   private LogLevel(int value) {
222     this.value = value;
223   }
224 
225   // @@protoc_insertion_point(enum_scope:google.cloud.iot.v1.LogLevel)
226 }
227