• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/kms/v1/service.proto
18 
19 package com.google.cloud.kms.v1;
20 
21 public interface EncryptRequestOrBuilder
22     extends
23     // @@protoc_insertion_point(interface_extends:google.cloud.kms.v1.EncryptRequest)
24     com.google.protobuf.MessageOrBuilder {
25 
26   /**
27    *
28    *
29    * <pre>
30    * Required. The resource name of the
31    * [CryptoKey][google.cloud.kms.v1.CryptoKey] or
32    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for
33    * encryption.
34    * If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server
35    * will use its [primary version][google.cloud.kms.v1.CryptoKey.primary].
36    * </pre>
37    *
38    * <code>
39    * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
40    * </code>
41    *
42    * @return The name.
43    */
getName()44   java.lang.String getName();
45   /**
46    *
47    *
48    * <pre>
49    * Required. The resource name of the
50    * [CryptoKey][google.cloud.kms.v1.CryptoKey] or
51    * [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for
52    * encryption.
53    * If a [CryptoKey][google.cloud.kms.v1.CryptoKey] is specified, the server
54    * will use its [primary version][google.cloud.kms.v1.CryptoKey.primary].
55    * </pre>
56    *
57    * <code>
58    * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
59    * </code>
60    *
61    * @return The bytes for name.
62    */
getNameBytes()63   com.google.protobuf.ByteString getNameBytes();
64 
65   /**
66    *
67    *
68    * <pre>
69    * Required. The data to encrypt. Must be no larger than 64KiB.
70    * The maximum size depends on the key version's
71    * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level].
72    * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE],
73    * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and
74    * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys, the
75    * plaintext must be no larger than 64KiB. For
76    * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of
77    * the plaintext and additional_authenticated_data fields must be no larger
78    * than 8KiB.
79    * </pre>
80    *
81    * <code>bytes plaintext = 2 [(.google.api.field_behavior) = REQUIRED];</code>
82    *
83    * @return The plaintext.
84    */
getPlaintext()85   com.google.protobuf.ByteString getPlaintext();
86 
87   /**
88    *
89    *
90    * <pre>
91    * Optional. Optional data that, if specified, must also be provided during
92    * decryption through
93    * [DecryptRequest.additional_authenticated_data][google.cloud.kms.v1.DecryptRequest.additional_authenticated_data].
94    * The maximum size depends on the key version's
95    * [protection_level][google.cloud.kms.v1.CryptoKeyVersionTemplate.protection_level].
96    * For [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE],
97    * [EXTERNAL][google.cloud.kms.v1.ProtectionLevel.EXTERNAL], and
98    * [EXTERNAL_VPC][google.cloud.kms.v1.ProtectionLevel.EXTERNAL_VPC] keys the
99    * AAD must be no larger than 64KiB. For
100    * [HSM][google.cloud.kms.v1.ProtectionLevel.HSM] keys, the combined length of
101    * the plaintext and additional_authenticated_data fields must be no larger
102    * than 8KiB.
103    * </pre>
104    *
105    * <code>bytes additional_authenticated_data = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
106    *
107    * @return The additionalAuthenticatedData.
108    */
getAdditionalAuthenticatedData()109   com.google.protobuf.ByteString getAdditionalAuthenticatedData();
110 
111   /**
112    *
113    *
114    * <pre>
115    * Optional. An optional CRC32C checksum of the
116    * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext].
117    * If specified,
118    * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
119    * verify the integrity of the received
120    * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]
121    * using this checksum.
122    * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
123    * report an error if the checksum verification fails. If you receive a
124    * checksum error, your client should verify that
125    * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext])
126    * is equal to
127    * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c],
128    * and if so, perform a limited number of retries. A persistent mismatch may
129    * indicate an issue in your computation of the CRC32C checksum. Note: This
130    * field is defined as int64 for reasons of compatibility across different
131    * languages. However, it is a non-negative integer, which will never exceed
132    * 2^32-1, and can be safely downconverted to uint32 in languages that support
133    * this type.
134    * </pre>
135    *
136    * <code>
137    * .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL];
138    * </code>
139    *
140    * @return Whether the plaintextCrc32c field is set.
141    */
hasPlaintextCrc32C()142   boolean hasPlaintextCrc32C();
143   /**
144    *
145    *
146    * <pre>
147    * Optional. An optional CRC32C checksum of the
148    * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext].
149    * If specified,
150    * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
151    * verify the integrity of the received
152    * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]
153    * using this checksum.
154    * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
155    * report an error if the checksum verification fails. If you receive a
156    * checksum error, your client should verify that
157    * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext])
158    * is equal to
159    * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c],
160    * and if so, perform a limited number of retries. A persistent mismatch may
161    * indicate an issue in your computation of the CRC32C checksum. Note: This
162    * field is defined as int64 for reasons of compatibility across different
163    * languages. However, it is a non-negative integer, which will never exceed
164    * 2^32-1, and can be safely downconverted to uint32 in languages that support
165    * this type.
166    * </pre>
167    *
168    * <code>
169    * .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL];
170    * </code>
171    *
172    * @return The plaintextCrc32c.
173    */
getPlaintextCrc32C()174   com.google.protobuf.Int64Value getPlaintextCrc32C();
175   /**
176    *
177    *
178    * <pre>
179    * Optional. An optional CRC32C checksum of the
180    * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext].
181    * If specified,
182    * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
183    * verify the integrity of the received
184    * [EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext]
185    * using this checksum.
186    * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
187    * report an error if the checksum verification fails. If you receive a
188    * checksum error, your client should verify that
189    * CRC32C([EncryptRequest.plaintext][google.cloud.kms.v1.EncryptRequest.plaintext])
190    * is equal to
191    * [EncryptRequest.plaintext_crc32c][google.cloud.kms.v1.EncryptRequest.plaintext_crc32c],
192    * and if so, perform a limited number of retries. A persistent mismatch may
193    * indicate an issue in your computation of the CRC32C checksum. Note: This
194    * field is defined as int64 for reasons of compatibility across different
195    * languages. However, it is a non-negative integer, which will never exceed
196    * 2^32-1, and can be safely downconverted to uint32 in languages that support
197    * this type.
198    * </pre>
199    *
200    * <code>
201    * .google.protobuf.Int64Value plaintext_crc32c = 7 [(.google.api.field_behavior) = OPTIONAL];
202    * </code>
203    */
getPlaintextCrc32COrBuilder()204   com.google.protobuf.Int64ValueOrBuilder getPlaintextCrc32COrBuilder();
205 
206   /**
207    *
208    *
209    * <pre>
210    * Optional. An optional CRC32C checksum of the
211    * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data].
212    * If specified,
213    * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
214    * verify the integrity of the received
215    * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]
216    * using this checksum.
217    * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
218    * report an error if the checksum verification fails. If you receive a
219    * checksum error, your client should verify that
220    * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data])
221    * is equal to
222    * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c],
223    * and if so, perform a limited number of retries. A persistent mismatch may
224    * indicate an issue in your computation of the CRC32C checksum. Note: This
225    * field is defined as int64 for reasons of compatibility across different
226    * languages. However, it is a non-negative integer, which will never exceed
227    * 2^32-1, and can be safely downconverted to uint32 in languages that support
228    * this type.
229    * </pre>
230    *
231    * <code>
232    * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL];
233    * </code>
234    *
235    * @return Whether the additionalAuthenticatedDataCrc32c field is set.
236    */
hasAdditionalAuthenticatedDataCrc32C()237   boolean hasAdditionalAuthenticatedDataCrc32C();
238   /**
239    *
240    *
241    * <pre>
242    * Optional. An optional CRC32C checksum of the
243    * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data].
244    * If specified,
245    * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
246    * verify the integrity of the received
247    * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]
248    * using this checksum.
249    * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
250    * report an error if the checksum verification fails. If you receive a
251    * checksum error, your client should verify that
252    * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data])
253    * is equal to
254    * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c],
255    * and if so, perform a limited number of retries. A persistent mismatch may
256    * indicate an issue in your computation of the CRC32C checksum. Note: This
257    * field is defined as int64 for reasons of compatibility across different
258    * languages. However, it is a non-negative integer, which will never exceed
259    * 2^32-1, and can be safely downconverted to uint32 in languages that support
260    * this type.
261    * </pre>
262    *
263    * <code>
264    * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL];
265    * </code>
266    *
267    * @return The additionalAuthenticatedDataCrc32c.
268    */
getAdditionalAuthenticatedDataCrc32C()269   com.google.protobuf.Int64Value getAdditionalAuthenticatedDataCrc32C();
270   /**
271    *
272    *
273    * <pre>
274    * Optional. An optional CRC32C checksum of the
275    * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data].
276    * If specified,
277    * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
278    * verify the integrity of the received
279    * [EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data]
280    * using this checksum.
281    * [KeyManagementService][google.cloud.kms.v1.KeyManagementService] will
282    * report an error if the checksum verification fails. If you receive a
283    * checksum error, your client should verify that
284    * CRC32C([EncryptRequest.additional_authenticated_data][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data])
285    * is equal to
286    * [EncryptRequest.additional_authenticated_data_crc32c][google.cloud.kms.v1.EncryptRequest.additional_authenticated_data_crc32c],
287    * and if so, perform a limited number of retries. A persistent mismatch may
288    * indicate an issue in your computation of the CRC32C checksum. Note: This
289    * field is defined as int64 for reasons of compatibility across different
290    * languages. However, it is a non-negative integer, which will never exceed
291    * 2^32-1, and can be safely downconverted to uint32 in languages that support
292    * this type.
293    * </pre>
294    *
295    * <code>
296    * .google.protobuf.Int64Value additional_authenticated_data_crc32c = 8 [(.google.api.field_behavior) = OPTIONAL];
297    * </code>
298    */
getAdditionalAuthenticatedDataCrc32COrBuilder()299   com.google.protobuf.Int64ValueOrBuilder getAdditionalAuthenticatedDataCrc32COrBuilder();
300 }
301