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/privacy/dlp/v2/dlp.proto 18 19 package com.google.privacy.dlp.v2; 20 21 public interface CryptoDeterministicConfigOrBuilder 22 extends 23 // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.CryptoDeterministicConfig) 24 com.google.protobuf.MessageOrBuilder { 25 26 /** 27 * 28 * 29 * <pre> 30 * The key used by the encryption function. For deterministic encryption 31 * using AES-SIV, the provided key is internally expanded to 64 bytes prior to 32 * use. 33 * </pre> 34 * 35 * <code>.google.privacy.dlp.v2.CryptoKey crypto_key = 1;</code> 36 * 37 * @return Whether the cryptoKey field is set. 38 */ hasCryptoKey()39 boolean hasCryptoKey(); 40 /** 41 * 42 * 43 * <pre> 44 * The key used by the encryption function. For deterministic encryption 45 * using AES-SIV, the provided key is internally expanded to 64 bytes prior to 46 * use. 47 * </pre> 48 * 49 * <code>.google.privacy.dlp.v2.CryptoKey crypto_key = 1;</code> 50 * 51 * @return The cryptoKey. 52 */ getCryptoKey()53 com.google.privacy.dlp.v2.CryptoKey getCryptoKey(); 54 /** 55 * 56 * 57 * <pre> 58 * The key used by the encryption function. For deterministic encryption 59 * using AES-SIV, the provided key is internally expanded to 64 bytes prior to 60 * use. 61 * </pre> 62 * 63 * <code>.google.privacy.dlp.v2.CryptoKey crypto_key = 1;</code> 64 */ getCryptoKeyOrBuilder()65 com.google.privacy.dlp.v2.CryptoKeyOrBuilder getCryptoKeyOrBuilder(); 66 67 /** 68 * 69 * 70 * <pre> 71 * The custom info type to annotate the surrogate with. 72 * This annotation will be applied to the surrogate by prefixing it with 73 * the name of the custom info type followed by the number of 74 * characters comprising the surrogate. The following scheme defines the 75 * format: {info type name}({surrogate character count}):{surrogate} 76 * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and 77 * the surrogate is 'abc', the full replacement value 78 * will be: 'MY_TOKEN_INFO_TYPE(3):abc' 79 * This annotation identifies the surrogate when inspecting content using the 80 * custom info type 'Surrogate'. This facilitates reversal of the 81 * surrogate when it occurs in free text. 82 * Note: For record transformations where the entire cell in a table is being 83 * transformed, surrogates are not mandatory. Surrogates are used to denote 84 * the location of the token and are necessary for re-identification in free 85 * form text. 86 * In order for inspection to work properly, the name of this info type must 87 * not occur naturally anywhere in your data; otherwise, inspection may either 88 * - reverse a surrogate that does not correspond to an actual identifier 89 * - be unable to parse the surrogate and result in an error 90 * Therefore, choose your custom info type name carefully after considering 91 * what your data looks like. One way to select a name that has a high chance 92 * of yielding reliable detection is to include one or more unicode characters 93 * that are highly improbable to exist in your data. 94 * For example, assuming your data is entered from a regular ASCII keyboard, 95 * the symbol with the hex code point 29DD might be used like so: 96 * ⧝MY_TOKEN_TYPE. 97 * </pre> 98 * 99 * <code>.google.privacy.dlp.v2.InfoType surrogate_info_type = 2;</code> 100 * 101 * @return Whether the surrogateInfoType field is set. 102 */ hasSurrogateInfoType()103 boolean hasSurrogateInfoType(); 104 /** 105 * 106 * 107 * <pre> 108 * The custom info type to annotate the surrogate with. 109 * This annotation will be applied to the surrogate by prefixing it with 110 * the name of the custom info type followed by the number of 111 * characters comprising the surrogate. The following scheme defines the 112 * format: {info type name}({surrogate character count}):{surrogate} 113 * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and 114 * the surrogate is 'abc', the full replacement value 115 * will be: 'MY_TOKEN_INFO_TYPE(3):abc' 116 * This annotation identifies the surrogate when inspecting content using the 117 * custom info type 'Surrogate'. This facilitates reversal of the 118 * surrogate when it occurs in free text. 119 * Note: For record transformations where the entire cell in a table is being 120 * transformed, surrogates are not mandatory. Surrogates are used to denote 121 * the location of the token and are necessary for re-identification in free 122 * form text. 123 * In order for inspection to work properly, the name of this info type must 124 * not occur naturally anywhere in your data; otherwise, inspection may either 125 * - reverse a surrogate that does not correspond to an actual identifier 126 * - be unable to parse the surrogate and result in an error 127 * Therefore, choose your custom info type name carefully after considering 128 * what your data looks like. One way to select a name that has a high chance 129 * of yielding reliable detection is to include one or more unicode characters 130 * that are highly improbable to exist in your data. 131 * For example, assuming your data is entered from a regular ASCII keyboard, 132 * the symbol with the hex code point 29DD might be used like so: 133 * ⧝MY_TOKEN_TYPE. 134 * </pre> 135 * 136 * <code>.google.privacy.dlp.v2.InfoType surrogate_info_type = 2;</code> 137 * 138 * @return The surrogateInfoType. 139 */ getSurrogateInfoType()140 com.google.privacy.dlp.v2.InfoType getSurrogateInfoType(); 141 /** 142 * 143 * 144 * <pre> 145 * The custom info type to annotate the surrogate with. 146 * This annotation will be applied to the surrogate by prefixing it with 147 * the name of the custom info type followed by the number of 148 * characters comprising the surrogate. The following scheme defines the 149 * format: {info type name}({surrogate character count}):{surrogate} 150 * For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and 151 * the surrogate is 'abc', the full replacement value 152 * will be: 'MY_TOKEN_INFO_TYPE(3):abc' 153 * This annotation identifies the surrogate when inspecting content using the 154 * custom info type 'Surrogate'. This facilitates reversal of the 155 * surrogate when it occurs in free text. 156 * Note: For record transformations where the entire cell in a table is being 157 * transformed, surrogates are not mandatory. Surrogates are used to denote 158 * the location of the token and are necessary for re-identification in free 159 * form text. 160 * In order for inspection to work properly, the name of this info type must 161 * not occur naturally anywhere in your data; otherwise, inspection may either 162 * - reverse a surrogate that does not correspond to an actual identifier 163 * - be unable to parse the surrogate and result in an error 164 * Therefore, choose your custom info type name carefully after considering 165 * what your data looks like. One way to select a name that has a high chance 166 * of yielding reliable detection is to include one or more unicode characters 167 * that are highly improbable to exist in your data. 168 * For example, assuming your data is entered from a regular ASCII keyboard, 169 * the symbol with the hex code point 29DD might be used like so: 170 * ⧝MY_TOKEN_TYPE. 171 * </pre> 172 * 173 * <code>.google.privacy.dlp.v2.InfoType surrogate_info_type = 2;</code> 174 */ getSurrogateInfoTypeOrBuilder()175 com.google.privacy.dlp.v2.InfoTypeOrBuilder getSurrogateInfoTypeOrBuilder(); 176 177 /** 178 * 179 * 180 * <pre> 181 * A context may be used for higher security and maintaining 182 * referential integrity such that the same identifier in two different 183 * contexts will be given a distinct surrogate. The context is appended to 184 * plaintext value being encrypted. On decryption the provided context is 185 * validated against the value used during encryption. If a context was 186 * provided during encryption, same context must be provided during decryption 187 * as well. 188 * If the context is not set, plaintext would be used as is for encryption. 189 * If the context is set but: 190 * 1. there is no record present when transforming a given value or 191 * 2. the field is not present when transforming a given value, 192 * plaintext would be used as is for encryption. 193 * Note that case (1) is expected when an `InfoTypeTransformation` is 194 * applied to both structured and unstructured `ContentItem`s. 195 * </pre> 196 * 197 * <code>.google.privacy.dlp.v2.FieldId context = 3;</code> 198 * 199 * @return Whether the context field is set. 200 */ hasContext()201 boolean hasContext(); 202 /** 203 * 204 * 205 * <pre> 206 * A context may be used for higher security and maintaining 207 * referential integrity such that the same identifier in two different 208 * contexts will be given a distinct surrogate. The context is appended to 209 * plaintext value being encrypted. On decryption the provided context is 210 * validated against the value used during encryption. If a context was 211 * provided during encryption, same context must be provided during decryption 212 * as well. 213 * If the context is not set, plaintext would be used as is for encryption. 214 * If the context is set but: 215 * 1. there is no record present when transforming a given value or 216 * 2. the field is not present when transforming a given value, 217 * plaintext would be used as is for encryption. 218 * Note that case (1) is expected when an `InfoTypeTransformation` is 219 * applied to both structured and unstructured `ContentItem`s. 220 * </pre> 221 * 222 * <code>.google.privacy.dlp.v2.FieldId context = 3;</code> 223 * 224 * @return The context. 225 */ getContext()226 com.google.privacy.dlp.v2.FieldId getContext(); 227 /** 228 * 229 * 230 * <pre> 231 * A context may be used for higher security and maintaining 232 * referential integrity such that the same identifier in two different 233 * contexts will be given a distinct surrogate. The context is appended to 234 * plaintext value being encrypted. On decryption the provided context is 235 * validated against the value used during encryption. If a context was 236 * provided during encryption, same context must be provided during decryption 237 * as well. 238 * If the context is not set, plaintext would be used as is for encryption. 239 * If the context is set but: 240 * 1. there is no record present when transforming a given value or 241 * 2. the field is not present when transforming a given value, 242 * plaintext would be used as is for encryption. 243 * Note that case (1) is expected when an `InfoTypeTransformation` is 244 * applied to both structured and unstructured `ContentItem`s. 245 * </pre> 246 * 247 * <code>.google.privacy.dlp.v2.FieldId context = 3;</code> 248 */ getContextOrBuilder()249 com.google.privacy.dlp.v2.FieldIdOrBuilder getContextOrBuilder(); 250 } 251