• 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  * Indicates whether DeviceService (HTTP) is enabled or disabled for the
26  * registry. See the field description for details.
27  * </pre>
28  *
29  * Protobuf enum {@code google.cloud.iot.v1.HttpState}
30  */
31 public enum HttpState implements com.google.protobuf.ProtocolMessageEnum {
32   /**
33    *
34    *
35    * <pre>
36    * No HTTP state specified. If not specified, DeviceService will be
37    * enabled by default.
38    * </pre>
39    *
40    * <code>HTTP_STATE_UNSPECIFIED = 0;</code>
41    */
42   HTTP_STATE_UNSPECIFIED(0),
43   /**
44    *
45    *
46    * <pre>
47    * Enables DeviceService (HTTP) service for the registry.
48    * </pre>
49    *
50    * <code>HTTP_ENABLED = 1;</code>
51    */
52   HTTP_ENABLED(1),
53   /**
54    *
55    *
56    * <pre>
57    * Disables DeviceService (HTTP) service for the registry.
58    * </pre>
59    *
60    * <code>HTTP_DISABLED = 2;</code>
61    */
62   HTTP_DISABLED(2),
63   UNRECOGNIZED(-1),
64   ;
65 
66   /**
67    *
68    *
69    * <pre>
70    * No HTTP state specified. If not specified, DeviceService will be
71    * enabled by default.
72    * </pre>
73    *
74    * <code>HTTP_STATE_UNSPECIFIED = 0;</code>
75    */
76   public static final int HTTP_STATE_UNSPECIFIED_VALUE = 0;
77   /**
78    *
79    *
80    * <pre>
81    * Enables DeviceService (HTTP) service for the registry.
82    * </pre>
83    *
84    * <code>HTTP_ENABLED = 1;</code>
85    */
86   public static final int HTTP_ENABLED_VALUE = 1;
87   /**
88    *
89    *
90    * <pre>
91    * Disables DeviceService (HTTP) service for the registry.
92    * </pre>
93    *
94    * <code>HTTP_DISABLED = 2;</code>
95    */
96   public static final int HTTP_DISABLED_VALUE = 2;
97 
getNumber()98   public final int getNumber() {
99     if (this == UNRECOGNIZED) {
100       throw new java.lang.IllegalArgumentException(
101           "Can't get the number of an unknown enum value.");
102     }
103     return value;
104   }
105 
106   /**
107    * @param value The numeric wire value of the corresponding enum entry.
108    * @return The enum associated with the given numeric wire value.
109    * @deprecated Use {@link #forNumber(int)} instead.
110    */
111   @java.lang.Deprecated
valueOf(int value)112   public static HttpState valueOf(int value) {
113     return forNumber(value);
114   }
115 
116   /**
117    * @param value The numeric wire value of the corresponding enum entry.
118    * @return The enum associated with the given numeric wire value.
119    */
forNumber(int value)120   public static HttpState forNumber(int value) {
121     switch (value) {
122       case 0:
123         return HTTP_STATE_UNSPECIFIED;
124       case 1:
125         return HTTP_ENABLED;
126       case 2:
127         return HTTP_DISABLED;
128       default:
129         return null;
130     }
131   }
132 
internalGetValueMap()133   public static com.google.protobuf.Internal.EnumLiteMap<HttpState> internalGetValueMap() {
134     return internalValueMap;
135   }
136 
137   private static final com.google.protobuf.Internal.EnumLiteMap<HttpState> internalValueMap =
138       new com.google.protobuf.Internal.EnumLiteMap<HttpState>() {
139         public HttpState findValueByNumber(int number) {
140           return HttpState.forNumber(number);
141         }
142       };
143 
getValueDescriptor()144   public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
145     if (this == UNRECOGNIZED) {
146       throw new java.lang.IllegalStateException(
147           "Can't get the descriptor of an unrecognized enum value.");
148     }
149     return getDescriptor().getValues().get(ordinal());
150   }
151 
getDescriptorForType()152   public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
153     return getDescriptor();
154   }
155 
getDescriptor()156   public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
157     return com.google.cloud.iot.v1.ResourcesProto.getDescriptor().getEnumTypes().get(1);
158   }
159 
160   private static final HttpState[] VALUES = values();
161 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)162   public static HttpState valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
163     if (desc.getType() != getDescriptor()) {
164       throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
165     }
166     if (desc.getIndex() == -1) {
167       return UNRECOGNIZED;
168     }
169     return VALUES[desc.getIndex()];
170   }
171 
172   private final int value;
173 
HttpState(int value)174   private HttpState(int value) {
175     this.value = value;
176   }
177 
178   // @@protoc_insertion_point(enum_scope:google.cloud.iot.v1.HttpState)
179 }
180