/** * * * <pre> * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on * this template. Immutable. Defaults to [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. * </pre> * * <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 1;</code> */ public Builder setProtectionLevel(com.google.cloud.kms.v1.ProtectionLevel value) { if (value == null) { throw new NullPointerException(); } protectionLevel_ = value.getNumber(); onChanged(); return this; } /**
/** * * * <pre> * Required. [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] to use * when creating a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this template. * For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both * this field is omitted and [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. * </pre> * * <code>.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3;</code> */ public Builder setAlgorithm( com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm value) { if (value == null) { throw new NullPointerException(); } algorithm_ = value.getNumber(); onChanged(); return this; } /**
/** * * * <pre> * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on * this template. Immutable. Defaults to [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. * </pre> * * <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 1;</code> */ public Builder setProtectionLevel(com.google.cloud.kms.v1.ProtectionLevel value) { if (value == null) { throw new NullPointerException(); } protectionLevel_ = value.getNumber(); onChanged(); return this; } /**
/** * * * <pre> * Required. [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] to use * when creating a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this template. * For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both * this field is omitted and [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. * </pre> * * <code>.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3;</code> */ public Builder setAlgorithm( com.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm value) { if (value == null) { throw new NullPointerException(); } algorithm_ = value.getNumber(); onChanged(); return this; } /**
/** * * * <pre> * Required. [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] to use * when creating a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this template. * For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both * this field is omitted and [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. * </pre> * * <code>.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3;</code> */ public Builder setAlgorithmValue(int value) { algorithm_ = value; onChanged(); return this; } /**
/** * * * <pre> * Required. [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] to use * when creating a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this template. * For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both * this field is omitted and [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. * </pre> * * <code>.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3;</code> */ public Builder clearAlgorithm() { algorithm_ = 0; onChanged(); return this; }
/** * * * <pre> * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on * this template. Immutable. Defaults to [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. * </pre> * * <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 1;</code> */ public Builder setProtectionLevelValue(int value) { protectionLevel_ = value; onChanged(); return this; } /**
/** * * * <pre> * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on * this template. Immutable. Defaults to [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. * </pre> * * <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 1;</code> */ public Builder clearProtectionLevel() { protectionLevel_ = 0; onChanged(); return this; }
public Builder mergeFrom(com.google.cloud.kms.v1.CryptoKeyVersionTemplate other) { if (other == com.google.cloud.kms.v1.CryptoKeyVersionTemplate.getDefaultInstance()) return this; if (other.protectionLevel_ != 0) { setProtectionLevelValue(other.getProtectionLevelValue()); } if (other.algorithm_ != 0) { setAlgorithmValue(other.getAlgorithmValue()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * * * <pre> * Required. [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] to use * when creating a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this template. * For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both * this field is omitted and [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. * </pre> * * <code>.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3;</code> */ public Builder setAlgorithmValue(int value) { algorithm_ = value; onChanged(); return this; } /**
/** * * * <pre> * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on * this template. Immutable. Defaults to [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. * </pre> * * <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 1;</code> */ public Builder setProtectionLevelValue(int value) { protectionLevel_ = value; onChanged(); return this; } /**
/** * * * <pre> * Required. [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] to use * when creating a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this template. * For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both * this field is omitted and [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is * [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT]. * </pre> * * <code>.google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm algorithm = 3;</code> */ public Builder clearAlgorithm() { algorithm_ = 0; onChanged(); return this; }
public Builder mergeFrom(com.google.cloud.kms.v1.CryptoKeyVersionTemplate other) { if (other == com.google.cloud.kms.v1.CryptoKeyVersionTemplate.getDefaultInstance()) return this; if (other.protectionLevel_ != 0) { setProtectionLevelValue(other.getProtectionLevelValue()); } if (other.algorithm_ != 0) { setAlgorithmValue(other.getAlgorithmValue()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * * * <pre> * [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on * this template. Immutable. Defaults to [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE]. * </pre> * * <code>.google.cloud.kms.v1.ProtectionLevel protection_level = 1;</code> */ public Builder clearProtectionLevel() { protectionLevel_ = 0; onChanged(); return this; }