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 supported formats for the public key. 26 * </pre> 27 * 28 * Protobuf enum {@code google.cloud.iot.v1.PublicKeyCertificateFormat} 29 */ 30 public enum PublicKeyCertificateFormat implements com.google.protobuf.ProtocolMessageEnum { 31 /** 32 * 33 * 34 * <pre> 35 * The format has not been specified. This is an invalid default value and 36 * must not be used. 37 * </pre> 38 * 39 * <code>UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT = 0;</code> 40 */ 41 UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT(0), 42 /** 43 * 44 * 45 * <pre> 46 * An X.509v3 certificate ([RFC5280](https://www.ietf.org/rfc/rfc5280.txt)), 47 * encoded in base64, and wrapped by `-----BEGIN CERTIFICATE-----` and 48 * `-----END CERTIFICATE-----`. 49 * </pre> 50 * 51 * <code>X509_CERTIFICATE_PEM = 1;</code> 52 */ 53 X509_CERTIFICATE_PEM(1), 54 UNRECOGNIZED(-1), 55 ; 56 57 /** 58 * 59 * 60 * <pre> 61 * The format has not been specified. This is an invalid default value and 62 * must not be used. 63 * </pre> 64 * 65 * <code>UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT = 0;</code> 66 */ 67 public static final int UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT_VALUE = 0; 68 /** 69 * 70 * 71 * <pre> 72 * An X.509v3 certificate ([RFC5280](https://www.ietf.org/rfc/rfc5280.txt)), 73 * encoded in base64, and wrapped by `-----BEGIN CERTIFICATE-----` and 74 * `-----END CERTIFICATE-----`. 75 * </pre> 76 * 77 * <code>X509_CERTIFICATE_PEM = 1;</code> 78 */ 79 public static final int X509_CERTIFICATE_PEM_VALUE = 1; 80 getNumber()81 public final int getNumber() { 82 if (this == UNRECOGNIZED) { 83 throw new java.lang.IllegalArgumentException( 84 "Can't get the number of an unknown enum value."); 85 } 86 return value; 87 } 88 89 /** 90 * @param value The numeric wire value of the corresponding enum entry. 91 * @return The enum associated with the given numeric wire value. 92 * @deprecated Use {@link #forNumber(int)} instead. 93 */ 94 @java.lang.Deprecated valueOf(int value)95 public static PublicKeyCertificateFormat valueOf(int value) { 96 return forNumber(value); 97 } 98 99 /** 100 * @param value The numeric wire value of the corresponding enum entry. 101 * @return The enum associated with the given numeric wire value. 102 */ forNumber(int value)103 public static PublicKeyCertificateFormat forNumber(int value) { 104 switch (value) { 105 case 0: 106 return UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT; 107 case 1: 108 return X509_CERTIFICATE_PEM; 109 default: 110 return null; 111 } 112 } 113 114 public static com.google.protobuf.Internal.EnumLiteMap<PublicKeyCertificateFormat> internalGetValueMap()115 internalGetValueMap() { 116 return internalValueMap; 117 } 118 119 private static final com.google.protobuf.Internal.EnumLiteMap<PublicKeyCertificateFormat> 120 internalValueMap = 121 new com.google.protobuf.Internal.EnumLiteMap<PublicKeyCertificateFormat>() { 122 public PublicKeyCertificateFormat findValueByNumber(int number) { 123 return PublicKeyCertificateFormat.forNumber(number); 124 } 125 }; 126 getValueDescriptor()127 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 128 if (this == UNRECOGNIZED) { 129 throw new java.lang.IllegalStateException( 130 "Can't get the descriptor of an unrecognized enum value."); 131 } 132 return getDescriptor().getValues().get(ordinal()); 133 } 134 getDescriptorForType()135 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 136 return getDescriptor(); 137 } 138 getDescriptor()139 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 140 return com.google.cloud.iot.v1.ResourcesProto.getDescriptor().getEnumTypes().get(5); 141 } 142 143 private static final PublicKeyCertificateFormat[] VALUES = values(); 144 valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)145 public static PublicKeyCertificateFormat valueOf( 146 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 147 if (desc.getType() != getDescriptor()) { 148 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 149 } 150 if (desc.getIndex() == -1) { 151 return UNRECOGNIZED; 152 } 153 return VALUES[desc.getIndex()]; 154 } 155 156 private final int value; 157 PublicKeyCertificateFormat(int value)158 private PublicKeyCertificateFormat(int value) { 159 this.value = value; 160 } 161 162 // @@protoc_insertion_point(enum_scope:google.cloud.iot.v1.PublicKeyCertificateFormat) 163 } 164