|
| 1 | +/* |
| 2 | + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except |
| 3 | + * in compliance with the License. You may obtain a copy of the License at |
| 4 | + * |
| 5 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 6 | + * |
| 7 | + * Unless required by applicable law or agreed to in writing, software distributed under the License |
| 8 | + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
| 9 | + * or implied. See the License for the specific language governing permissions and limitations under |
| 10 | + * the License. |
| 11 | + */ |
| 12 | +/* |
| 13 | + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ |
| 14 | + * Modify at your own risk. |
| 15 | + */ |
| 16 | + |
| 17 | +package com.google.api.services.spanner.v1.model; |
| 18 | + |
| 19 | +/** |
| 20 | + * Encryption configuration for a Cloud Spanner database. |
| 21 | + * |
| 22 | + * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is |
| 23 | + * transmitted over HTTP when working with the Cloud Spanner API. For a detailed explanation see: |
| 24 | + * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a> |
| 25 | + * </p> |
| 26 | + * |
| 27 | + * @author Google, Inc. |
| 28 | + */ |
| 29 | +@SuppressWarnings("javadoc") |
| 30 | +public final class InstanceEncryptionConfig extends com.google.api.client.json.GenericJson { |
| 31 | + |
| 32 | + /** |
| 33 | + * Optional. This field is maintained for backwards compatibility. For new callers, we recommend |
| 34 | + * using `kms_key_names` to specify the KMS key. `kms_key_name` should only be used if the |
| 35 | + * location of the KMS key matches the database instance’s configuration (location) exactly. E.g. |
| 36 | + * The KMS location is in us-central1 or nam3 and the database instance is also in us-central1 or |
| 37 | + * nam3. The Cloud KMS key to be used for encrypting and decrypting the database. Values are of |
| 38 | + * the form `projects//locations//keyRings//cryptoKeys/`. |
| 39 | + * The value may be {@code null}. |
| 40 | + */ |
| 41 | + @com.google.api.client.util.Key |
| 42 | + private java.lang.String kmsKeyName; |
| 43 | + |
| 44 | + /** |
| 45 | + * Optional. Specifies the KMS configuration for one or more keys used to encrypt the database. |
| 46 | + * Values are of the form `projects//locations//keyRings//cryptoKeys/`. The keys referenced by |
| 47 | + * `kms_key_names` must fully cover all regions of the database's instance configuration. Some |
| 48 | + * examples: * For regional (single-region) instance configurations, specify a regional location |
| 49 | + * KMS key. * For multi-region instance configurations of type `GOOGLE_MANAGED`, either specify a |
| 50 | + * multi-region location KMS key or multiple regional location KMS keys that cover all regions in |
| 51 | + * the instance configuration. * For an instance configuration of type `USER_MANAGED`, specify |
| 52 | + * only regional location KMS keys to cover each region in the instance configuration. Multi- |
| 53 | + * region location KMS keys aren't supported for `USER_MANAGED` type instance configurations. |
| 54 | + * The value may be {@code null}. |
| 55 | + */ |
| 56 | + @com.google.api.client.util.Key |
| 57 | + private java.util.List<java.lang.String> kmsKeyNames; |
| 58 | + |
| 59 | + /** |
| 60 | + * Optional. This field is maintained for backwards compatibility. For new callers, we recommend |
| 61 | + * using `kms_key_names` to specify the KMS key. `kms_key_name` should only be used if the |
| 62 | + * location of the KMS key matches the database instance’s configuration (location) exactly. E.g. |
| 63 | + * The KMS location is in us-central1 or nam3 and the database instance is also in us-central1 or |
| 64 | + * nam3. The Cloud KMS key to be used for encrypting and decrypting the database. Values are of |
| 65 | + * the form `projects//locations//keyRings//cryptoKeys/`. |
| 66 | + * @return value or {@code null} for none |
| 67 | + */ |
| 68 | + public java.lang.String getKmsKeyName() { |
| 69 | + return kmsKeyName; |
| 70 | + } |
| 71 | + |
| 72 | + /** |
| 73 | + * Optional. This field is maintained for backwards compatibility. For new callers, we recommend |
| 74 | + * using `kms_key_names` to specify the KMS key. `kms_key_name` should only be used if the |
| 75 | + * location of the KMS key matches the database instance’s configuration (location) exactly. E.g. |
| 76 | + * The KMS location is in us-central1 or nam3 and the database instance is also in us-central1 or |
| 77 | + * nam3. The Cloud KMS key to be used for encrypting and decrypting the database. Values are of |
| 78 | + * the form `projects//locations//keyRings//cryptoKeys/`. |
| 79 | + * @param kmsKeyName kmsKeyName or {@code null} for none |
| 80 | + */ |
| 81 | + public InstanceEncryptionConfig setKmsKeyName(java.lang.String kmsKeyName) { |
| 82 | + this.kmsKeyName = kmsKeyName; |
| 83 | + return this; |
| 84 | + } |
| 85 | + |
| 86 | + /** |
| 87 | + * Optional. Specifies the KMS configuration for one or more keys used to encrypt the database. |
| 88 | + * Values are of the form `projects//locations//keyRings//cryptoKeys/`. The keys referenced by |
| 89 | + * `kms_key_names` must fully cover all regions of the database's instance configuration. Some |
| 90 | + * examples: * For regional (single-region) instance configurations, specify a regional location |
| 91 | + * KMS key. * For multi-region instance configurations of type `GOOGLE_MANAGED`, either specify a |
| 92 | + * multi-region location KMS key or multiple regional location KMS keys that cover all regions in |
| 93 | + * the instance configuration. * For an instance configuration of type `USER_MANAGED`, specify |
| 94 | + * only regional location KMS keys to cover each region in the instance configuration. Multi- |
| 95 | + * region location KMS keys aren't supported for `USER_MANAGED` type instance configurations. |
| 96 | + * @return value or {@code null} for none |
| 97 | + */ |
| 98 | + public java.util.List<java.lang.String> getKmsKeyNames() { |
| 99 | + return kmsKeyNames; |
| 100 | + } |
| 101 | + |
| 102 | + /** |
| 103 | + * Optional. Specifies the KMS configuration for one or more keys used to encrypt the database. |
| 104 | + * Values are of the form `projects//locations//keyRings//cryptoKeys/`. The keys referenced by |
| 105 | + * `kms_key_names` must fully cover all regions of the database's instance configuration. Some |
| 106 | + * examples: * For regional (single-region) instance configurations, specify a regional location |
| 107 | + * KMS key. * For multi-region instance configurations of type `GOOGLE_MANAGED`, either specify a |
| 108 | + * multi-region location KMS key or multiple regional location KMS keys that cover all regions in |
| 109 | + * the instance configuration. * For an instance configuration of type `USER_MANAGED`, specify |
| 110 | + * only regional location KMS keys to cover each region in the instance configuration. Multi- |
| 111 | + * region location KMS keys aren't supported for `USER_MANAGED` type instance configurations. |
| 112 | + * @param kmsKeyNames kmsKeyNames or {@code null} for none |
| 113 | + */ |
| 114 | + public InstanceEncryptionConfig setKmsKeyNames(java.util.List<java.lang.String> kmsKeyNames) { |
| 115 | + this.kmsKeyNames = kmsKeyNames; |
| 116 | + return this; |
| 117 | + } |
| 118 | + |
| 119 | + @Override |
| 120 | + public InstanceEncryptionConfig set(String fieldName, Object value) { |
| 121 | + return (InstanceEncryptionConfig) super.set(fieldName, value); |
| 122 | + } |
| 123 | + |
| 124 | + @Override |
| 125 | + public InstanceEncryptionConfig clone() { |
| 126 | + return (InstanceEncryptionConfig) super.clone(); |
| 127 | + } |
| 128 | + |
| 129 | +} |
0 commit comments