1 /* 2 * Copyright 2019 The Grafeas Authors. All rights reserved. 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 17 // Generated by the protocol buffer compiler. DO NOT EDIT! 18 // source: grafeas/v1/package.proto 19 20 package io.grafeas.v1; 21 22 /** 23 * 24 * 25 * <pre> 26 * Instruction set architectures supported by various package managers. 27 * </pre> 28 * 29 * Protobuf enum {@code grafeas.v1.Architecture} 30 */ 31 public enum Architecture implements com.google.protobuf.ProtocolMessageEnum { 32 /** 33 * 34 * 35 * <pre> 36 * Unknown architecture. 37 * </pre> 38 * 39 * <code>ARCHITECTURE_UNSPECIFIED = 0;</code> 40 */ 41 ARCHITECTURE_UNSPECIFIED(0), 42 /** 43 * 44 * 45 * <pre> 46 * X86 architecture. 47 * </pre> 48 * 49 * <code>X86 = 1;</code> 50 */ 51 X86(1), 52 /** 53 * 54 * 55 * <pre> 56 * X64 architecture. 57 * </pre> 58 * 59 * <code>X64 = 2;</code> 60 */ 61 X64(2), 62 UNRECOGNIZED(-1), 63 ; 64 65 /** 66 * 67 * 68 * <pre> 69 * Unknown architecture. 70 * </pre> 71 * 72 * <code>ARCHITECTURE_UNSPECIFIED = 0;</code> 73 */ 74 public static final int ARCHITECTURE_UNSPECIFIED_VALUE = 0; 75 /** 76 * 77 * 78 * <pre> 79 * X86 architecture. 80 * </pre> 81 * 82 * <code>X86 = 1;</code> 83 */ 84 public static final int X86_VALUE = 1; 85 /** 86 * 87 * 88 * <pre> 89 * X64 architecture. 90 * </pre> 91 * 92 * <code>X64 = 2;</code> 93 */ 94 public static final int X64_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 Architecture 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 Architecture forNumber(int value) { 119 switch (value) { 120 case 0: 121 return ARCHITECTURE_UNSPECIFIED; 122 case 1: 123 return X86; 124 case 2: 125 return X64; 126 default: 127 return null; 128 } 129 } 130 internalGetValueMap()131 public static com.google.protobuf.Internal.EnumLiteMap<Architecture> internalGetValueMap() { 132 return internalValueMap; 133 } 134 135 private static final com.google.protobuf.Internal.EnumLiteMap<Architecture> internalValueMap = 136 new com.google.protobuf.Internal.EnumLiteMap<Architecture>() { 137 public Architecture findValueByNumber(int number) { 138 return Architecture.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 io.grafeas.v1.Package.getDescriptor().getEnumTypes().get(0); 156 } 157 158 private static final Architecture[] VALUES = values(); 159 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)160 public static Architecture 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 Architecture(int value)172 private Architecture(int value) { 173 this.value = value; 174 } 175 176 // @@protoc_insertion_point(enum_scope:grafeas.v1.Architecture) 177 } 178