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/talent/v4/common.proto 18 19 package com.google.cloud.talent.v4; 20 21 /** 22 * 23 * 24 * <pre> 25 * Option for HTML content sanitization on user input fields, for example, job 26 * description. By setting this option, user can determine whether and how 27 * sanitization is performed on these fields. 28 * </pre> 29 * 30 * Protobuf enum {@code google.cloud.talent.v4.HtmlSanitization} 31 */ 32 public enum HtmlSanitization implements com.google.protobuf.ProtocolMessageEnum { 33 /** 34 * 35 * 36 * <pre> 37 * Default value. 38 * </pre> 39 * 40 * <code>HTML_SANITIZATION_UNSPECIFIED = 0;</code> 41 */ 42 HTML_SANITIZATION_UNSPECIFIED(0), 43 /** 44 * 45 * 46 * <pre> 47 * Disables sanitization on HTML input. 48 * </pre> 49 * 50 * <code>HTML_SANITIZATION_DISABLED = 1;</code> 51 */ 52 HTML_SANITIZATION_DISABLED(1), 53 /** 54 * 55 * 56 * <pre> 57 * Sanitizes HTML input, only accepts bold, italic, ordered list, and 58 * unordered list markup tags. 59 * </pre> 60 * 61 * <code>SIMPLE_FORMATTING_ONLY = 2;</code> 62 */ 63 SIMPLE_FORMATTING_ONLY(2), 64 UNRECOGNIZED(-1), 65 ; 66 67 /** 68 * 69 * 70 * <pre> 71 * Default value. 72 * </pre> 73 * 74 * <code>HTML_SANITIZATION_UNSPECIFIED = 0;</code> 75 */ 76 public static final int HTML_SANITIZATION_UNSPECIFIED_VALUE = 0; 77 /** 78 * 79 * 80 * <pre> 81 * Disables sanitization on HTML input. 82 * </pre> 83 * 84 * <code>HTML_SANITIZATION_DISABLED = 1;</code> 85 */ 86 public static final int HTML_SANITIZATION_DISABLED_VALUE = 1; 87 /** 88 * 89 * 90 * <pre> 91 * Sanitizes HTML input, only accepts bold, italic, ordered list, and 92 * unordered list markup tags. 93 * </pre> 94 * 95 * <code>SIMPLE_FORMATTING_ONLY = 2;</code> 96 */ 97 public static final int SIMPLE_FORMATTING_ONLY_VALUE = 2; 98 getNumber()99 public final int getNumber() { 100 if (this == UNRECOGNIZED) { 101 throw new java.lang.IllegalArgumentException( 102 "Can't get the number of an unknown enum value."); 103 } 104 return value; 105 } 106 107 /** 108 * @param value The numeric wire value of the corresponding enum entry. 109 * @return The enum associated with the given numeric wire value. 110 * @deprecated Use {@link #forNumber(int)} instead. 111 */ 112 @java.lang.Deprecated valueOf(int value)113 public static HtmlSanitization valueOf(int value) { 114 return forNumber(value); 115 } 116 117 /** 118 * @param value The numeric wire value of the corresponding enum entry. 119 * @return The enum associated with the given numeric wire value. 120 */ forNumber(int value)121 public static HtmlSanitization forNumber(int value) { 122 switch (value) { 123 case 0: 124 return HTML_SANITIZATION_UNSPECIFIED; 125 case 1: 126 return HTML_SANITIZATION_DISABLED; 127 case 2: 128 return SIMPLE_FORMATTING_ONLY; 129 default: 130 return null; 131 } 132 } 133 internalGetValueMap()134 public static com.google.protobuf.Internal.EnumLiteMap<HtmlSanitization> internalGetValueMap() { 135 return internalValueMap; 136 } 137 138 private static final com.google.protobuf.Internal.EnumLiteMap<HtmlSanitization> internalValueMap = 139 new com.google.protobuf.Internal.EnumLiteMap<HtmlSanitization>() { 140 public HtmlSanitization findValueByNumber(int number) { 141 return HtmlSanitization.forNumber(number); 142 } 143 }; 144 getValueDescriptor()145 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 146 if (this == UNRECOGNIZED) { 147 throw new java.lang.IllegalStateException( 148 "Can't get the descriptor of an unrecognized enum value."); 149 } 150 return getDescriptor().getValues().get(ordinal()); 151 } 152 getDescriptorForType()153 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 154 return getDescriptor(); 155 } 156 getDescriptor()157 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 158 return com.google.cloud.talent.v4.CommonProto.getDescriptor().getEnumTypes().get(8); 159 } 160 161 private static final HtmlSanitization[] VALUES = values(); 162 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)163 public static HtmlSanitization valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 164 if (desc.getType() != getDescriptor()) { 165 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 166 } 167 if (desc.getIndex() == -1) { 168 return UNRECOGNIZED; 169 } 170 return VALUES[desc.getIndex()]; 171 } 172 173 private final int value; 174 HtmlSanitization(int value)175 private HtmlSanitization(int value) { 176 this.value = value; 177 } 178 179 // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4.HtmlSanitization) 180 } 181