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