public static KeyMetadata KeyMetadata()

in ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java [2281:2437]


  public static KeyMetadata KeyMetadata(
    software.amazon.cryptography.services.kms.internaldafny.types.KeyMetadata dafnyValue
  ) {
    KeyMetadata.Builder builder = KeyMetadata.builder();
    if (dafnyValue.dtor_Arn().is_Some()) {
      builder.arn(
        software.amazon.smithy.dafny.conversion.ToNative.Simple.String(
          dafnyValue.dtor_Arn().dtor_value()
        )
      );
    }
    if (dafnyValue.dtor_AWSAccountId().is_Some()) {
      builder.awsAccountId(
        software.amazon.smithy.dafny.conversion.ToNative.Simple.String(
          dafnyValue.dtor_AWSAccountId().dtor_value()
        )
      );
    }
    if (dafnyValue.dtor_CloudHsmClusterId().is_Some()) {
      builder.cloudHsmClusterId(
        software.amazon.smithy.dafny.conversion.ToNative.Simple.String(
          dafnyValue.dtor_CloudHsmClusterId().dtor_value()
        )
      );
    }
    if (dafnyValue.dtor_CreationDate().is_Some()) {
      builder.creationDate(
        software.amazon.smithy.dafny.conversion.ToNative.Simple.Instant(
          dafnyValue.dtor_CreationDate().dtor_value()
        )
      );
    }
    if (dafnyValue.dtor_CustomerMasterKeySpec().is_Some()) {
      builder.customerMasterKeySpec(
        ToNative.CustomerMasterKeySpec(
          dafnyValue.dtor_CustomerMasterKeySpec().dtor_value()
        )
      );
    }
    if (dafnyValue.dtor_CustomKeyStoreId().is_Some()) {
      builder.customKeyStoreId(
        software.amazon.smithy.dafny.conversion.ToNative.Simple.String(
          dafnyValue.dtor_CustomKeyStoreId().dtor_value()
        )
      );
    }
    if (dafnyValue.dtor_DeletionDate().is_Some()) {
      builder.deletionDate(
        software.amazon.smithy.dafny.conversion.ToNative.Simple.Instant(
          dafnyValue.dtor_DeletionDate().dtor_value()
        )
      );
    }
    if (dafnyValue.dtor_Description().is_Some()) {
      builder.description(
        software.amazon.smithy.dafny.conversion.ToNative.Simple.String(
          dafnyValue.dtor_Description().dtor_value()
        )
      );
    }
    if (dafnyValue.dtor_Enabled().is_Some()) {
      builder.enabled((dafnyValue.dtor_Enabled().dtor_value()));
    }
    if (dafnyValue.dtor_EncryptionAlgorithms().is_Some()) {
      builder.encryptionAlgorithms(
        ToNative.EncryptionAlgorithmSpecList(
          dafnyValue.dtor_EncryptionAlgorithms().dtor_value()
        )
      );
    }
    if (dafnyValue.dtor_ExpirationModel().is_Some()) {
      builder.expirationModel(
        ToNative.ExpirationModelType(
          dafnyValue.dtor_ExpirationModel().dtor_value()
        )
      );
    }
    if (dafnyValue.dtor_KeyAgreementAlgorithms().is_Some()) {
      builder.keyAgreementAlgorithms(
        ToNative.KeyAgreementAlgorithmSpecList(
          dafnyValue.dtor_KeyAgreementAlgorithms().dtor_value()
        )
      );
    }
    builder.keyId(
      software.amazon.smithy.dafny.conversion.ToNative.Simple.String(
        dafnyValue.dtor_KeyId()
      )
    );
    if (dafnyValue.dtor_KeyManager().is_Some()) {
      builder.keyManager(
        ToNative.KeyManagerType(dafnyValue.dtor_KeyManager().dtor_value())
      );
    }
    if (dafnyValue.dtor_KeySpec().is_Some()) {
      builder.keySpec(ToNative.KeySpec(dafnyValue.dtor_KeySpec().dtor_value()));
    }
    if (dafnyValue.dtor_KeyState().is_Some()) {
      builder.keyState(
        ToNative.KeyState(dafnyValue.dtor_KeyState().dtor_value())
      );
    }
    if (dafnyValue.dtor_KeyUsage().is_Some()) {
      builder.keyUsage(
        ToNative.KeyUsageType(dafnyValue.dtor_KeyUsage().dtor_value())
      );
    }
    if (dafnyValue.dtor_MacAlgorithms().is_Some()) {
      builder.macAlgorithms(
        ToNative.MacAlgorithmSpecList(
          dafnyValue.dtor_MacAlgorithms().dtor_value()
        )
      );
    }
    if (dafnyValue.dtor_MultiRegion().is_Some()) {
      builder.multiRegion((dafnyValue.dtor_MultiRegion().dtor_value()));
    }
    if (dafnyValue.dtor_MultiRegionConfiguration().is_Some()) {
      builder.multiRegionConfiguration(
        ToNative.MultiRegionConfiguration(
          dafnyValue.dtor_MultiRegionConfiguration().dtor_value()
        )
      );
    }
    if (dafnyValue.dtor_Origin().is_Some()) {
      builder.origin(
        ToNative.OriginType(dafnyValue.dtor_Origin().dtor_value())
      );
    }
    if (dafnyValue.dtor_PendingDeletionWindowInDays().is_Some()) {
      builder.pendingDeletionWindowInDays(
        (dafnyValue.dtor_PendingDeletionWindowInDays().dtor_value())
      );
    }
    if (dafnyValue.dtor_SigningAlgorithms().is_Some()) {
      builder.signingAlgorithms(
        ToNative.SigningAlgorithmSpecList(
          dafnyValue.dtor_SigningAlgorithms().dtor_value()
        )
      );
    }
    if (dafnyValue.dtor_ValidTo().is_Some()) {
      builder.validTo(
        software.amazon.smithy.dafny.conversion.ToNative.Simple.Instant(
          dafnyValue.dtor_ValidTo().dtor_value()
        )
      );
    }
    if (dafnyValue.dtor_XksKeyConfiguration().is_Some()) {
      builder.xksKeyConfiguration(
        ToNative.XksKeyConfigurationType(
          dafnyValue.dtor_XksKeyConfiguration().dtor_value()
        )
      );
    }
    return builder.build();
  }