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 * The gateway authorization/authentication method. This setting determines how 26 * Cloud IoT Core authorizes/authenticate devices to access the gateway. 27 * </pre> 28 * 29 * Protobuf enum {@code google.cloud.iot.v1.GatewayAuthMethod} 30 */ 31 public enum GatewayAuthMethod implements com.google.protobuf.ProtocolMessageEnum { 32 /** 33 * 34 * 35 * <pre> 36 * No authentication/authorization method specified. No devices are allowed to 37 * access the gateway. 38 * </pre> 39 * 40 * <code>GATEWAY_AUTH_METHOD_UNSPECIFIED = 0;</code> 41 */ 42 GATEWAY_AUTH_METHOD_UNSPECIFIED(0), 43 /** 44 * 45 * 46 * <pre> 47 * The device is authenticated through the gateway association only. Device 48 * credentials are ignored even if provided. 49 * </pre> 50 * 51 * <code>ASSOCIATION_ONLY = 1;</code> 52 */ 53 ASSOCIATION_ONLY(1), 54 /** 55 * 56 * 57 * <pre> 58 * The device is authenticated through its own credentials. Gateway 59 * association is not checked. 60 * </pre> 61 * 62 * <code>DEVICE_AUTH_TOKEN_ONLY = 2;</code> 63 */ 64 DEVICE_AUTH_TOKEN_ONLY(2), 65 /** 66 * 67 * 68 * <pre> 69 * The device is authenticated through both device credentials and gateway 70 * association. The device must be bound to the gateway and must provide its 71 * own credentials. 72 * </pre> 73 * 74 * <code>ASSOCIATION_AND_DEVICE_AUTH_TOKEN = 3;</code> 75 */ 76 ASSOCIATION_AND_DEVICE_AUTH_TOKEN(3), 77 UNRECOGNIZED(-1), 78 ; 79 80 /** 81 * 82 * 83 * <pre> 84 * No authentication/authorization method specified. No devices are allowed to 85 * access the gateway. 86 * </pre> 87 * 88 * <code>GATEWAY_AUTH_METHOD_UNSPECIFIED = 0;</code> 89 */ 90 public static final int GATEWAY_AUTH_METHOD_UNSPECIFIED_VALUE = 0; 91 /** 92 * 93 * 94 * <pre> 95 * The device is authenticated through the gateway association only. Device 96 * credentials are ignored even if provided. 97 * </pre> 98 * 99 * <code>ASSOCIATION_ONLY = 1;</code> 100 */ 101 public static final int ASSOCIATION_ONLY_VALUE = 1; 102 /** 103 * 104 * 105 * <pre> 106 * The device is authenticated through its own credentials. Gateway 107 * association is not checked. 108 * </pre> 109 * 110 * <code>DEVICE_AUTH_TOKEN_ONLY = 2;</code> 111 */ 112 public static final int DEVICE_AUTH_TOKEN_ONLY_VALUE = 2; 113 /** 114 * 115 * 116 * <pre> 117 * The device is authenticated through both device credentials and gateway 118 * association. The device must be bound to the gateway and must provide its 119 * own credentials. 120 * </pre> 121 * 122 * <code>ASSOCIATION_AND_DEVICE_AUTH_TOKEN = 3;</code> 123 */ 124 public static final int ASSOCIATION_AND_DEVICE_AUTH_TOKEN_VALUE = 3; 125 getNumber()126 public final int getNumber() { 127 if (this == UNRECOGNIZED) { 128 throw new java.lang.IllegalArgumentException( 129 "Can't get the number of an unknown enum value."); 130 } 131 return value; 132 } 133 134 /** 135 * @param value The numeric wire value of the corresponding enum entry. 136 * @return The enum associated with the given numeric wire value. 137 * @deprecated Use {@link #forNumber(int)} instead. 138 */ 139 @java.lang.Deprecated valueOf(int value)140 public static GatewayAuthMethod valueOf(int value) { 141 return forNumber(value); 142 } 143 144 /** 145 * @param value The numeric wire value of the corresponding enum entry. 146 * @return The enum associated with the given numeric wire value. 147 */ forNumber(int value)148 public static GatewayAuthMethod forNumber(int value) { 149 switch (value) { 150 case 0: 151 return GATEWAY_AUTH_METHOD_UNSPECIFIED; 152 case 1: 153 return ASSOCIATION_ONLY; 154 case 2: 155 return DEVICE_AUTH_TOKEN_ONLY; 156 case 3: 157 return ASSOCIATION_AND_DEVICE_AUTH_TOKEN; 158 default: 159 return null; 160 } 161 } 162 internalGetValueMap()163 public static com.google.protobuf.Internal.EnumLiteMap<GatewayAuthMethod> internalGetValueMap() { 164 return internalValueMap; 165 } 166 167 private static final com.google.protobuf.Internal.EnumLiteMap<GatewayAuthMethod> 168 internalValueMap = 169 new com.google.protobuf.Internal.EnumLiteMap<GatewayAuthMethod>() { 170 public GatewayAuthMethod findValueByNumber(int number) { 171 return GatewayAuthMethod.forNumber(number); 172 } 173 }; 174 getValueDescriptor()175 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 176 if (this == UNRECOGNIZED) { 177 throw new java.lang.IllegalStateException( 178 "Can't get the descriptor of an unrecognized enum value."); 179 } 180 return getDescriptor().getValues().get(ordinal()); 181 } 182 getDescriptorForType()183 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 184 return getDescriptor(); 185 } 186 getDescriptor()187 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 188 return com.google.cloud.iot.v1.ResourcesProto.getDescriptor().getEnumTypes().get(4); 189 } 190 191 private static final GatewayAuthMethod[] VALUES = values(); 192 valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)193 public static GatewayAuthMethod valueOf( 194 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 195 if (desc.getType() != getDescriptor()) { 196 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 197 } 198 if (desc.getIndex() == -1) { 199 return UNRECOGNIZED; 200 } 201 return VALUES[desc.getIndex()]; 202 } 203 204 private final int value; 205 GatewayAuthMethod(int value)206 private GatewayAuthMethod(int value) { 207 this.value = value; 208 } 209 210 // @@protoc_insertion_point(enum_scope:google.cloud.iot.v1.GatewayAuthMethod) 211 } 212