All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.workloads.kotlin.outputs.SubProtectionPolicyResponse.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.workloads.kotlin.outputs

import com.pulumi.core.Either
import kotlin.Any
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map

/**
 * Sub-protection policy which includes schedule and retention
 * @property policyType Type of backup policy type
 * @property retentionPolicy Retention policy with the details on backup copy retention ranges.
 * @property schedulePolicy Backup schedule specified as part of backup policy.
 * @property snapshotBackupAdditionalDetails Hana DB instance snapshot backup additional details.
 * @property tieringPolicy Tiering policy to automatically move RPs to another tier.
 * Key is Target Tier, defined in RecoveryPointTierType enum.
 * Tiering policy specifies the criteria to move RP to the target tier.
 */
public data class SubProtectionPolicyResponse(
    public val policyType: String? = null,
    public val retentionPolicy: Either? = null,
    public val schedulePolicy: Any? = null,
    public val snapshotBackupAdditionalDetails: SnapshotBackupAdditionalDetailsResponse? = null,
    public val tieringPolicy: Map? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.azurenative.workloads.outputs.SubProtectionPolicyResponse): SubProtectionPolicyResponse = SubProtectionPolicyResponse(
            policyType = javaType.policyType().map({ args0 -> args0 }).orElse(null),
            retentionPolicy = javaType.retentionPolicy().map({ args0 ->
                args0.transform(
                    { args0 ->
                        args0.let({ args0 ->
                            com.pulumi.azurenative.workloads.kotlin.outputs.LongTermRetentionPolicyResponse.Companion.toKotlin(args0)
                        })
                    },
                    { args0 ->
                        args0.let({ args0 ->
                            com.pulumi.azurenative.workloads.kotlin.outputs.SimpleRetentionPolicyResponse.Companion.toKotlin(args0)
                        })
                    },
                )
            }).orElse(null),
            schedulePolicy = javaType.schedulePolicy().map({ args0 -> args0 }).orElse(null),
            snapshotBackupAdditionalDetails = javaType.snapshotBackupAdditionalDetails().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.azurenative.workloads.kotlin.outputs.SnapshotBackupAdditionalDetailsResponse.Companion.toKotlin(args0)
                })
            }).orElse(null),
            tieringPolicy = javaType.tieringPolicy().map({ args0 ->
                args0.key.to(
                    args0.value.let({ args0 ->
                        com.pulumi.azurenative.workloads.kotlin.outputs.TieringPolicyResponse.Companion.toKotlin(args0)
                    }),
                )
            }).toMap(),
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy