# coding=utf-8
# *** WARNING: this file was generated by pulumigen. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from ... import _utilities
from . import outputs
from ... import meta as _meta

__all__ = [
    'StorageVersionMigration',
    'StorageVersionMigrationSpec',
    'StorageVersionMigrationSpecPatch',
    'StorageVersionMigrationStatus',
    'StorageVersionMigrationStatusPatch',
]

@pulumi.output_type
class StorageVersionMigration(dict):
    """
    StorageVersionMigration represents a migration of stored data to the latest storage version.
    """
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "apiVersion":
            suggest = "api_version"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in StorageVersionMigration. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        StorageVersionMigration.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        StorageVersionMigration.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 api_version: Optional[_builtins.str] = None,
                 kind: Optional[_builtins.str] = None,
                 metadata: Optional['_meta.v1.outputs.ObjectMeta'] = None,
                 spec: Optional['outputs.StorageVersionMigrationSpec'] = None,
                 status: Optional['outputs.StorageVersionMigrationStatus'] = None):
        """
        StorageVersionMigration represents a migration of stored data to the latest storage version.
        :param _builtins.str api_version: APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
        :param _builtins.str kind: Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
        :param '_meta.v1.ObjectMetaArgs' metadata: Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
        :param 'StorageVersionMigrationSpecArgs' spec: Specification of the migration.
        :param 'StorageVersionMigrationStatusArgs' status: Status of the migration.
        """
        if api_version is not None:
            pulumi.set(__self__, "api_version", 'storagemigration.k8s.io/v1beta1')
        if kind is not None:
            pulumi.set(__self__, "kind", 'StorageVersionMigration')
        if metadata is not None:
            pulumi.set(__self__, "metadata", metadata)
        if spec is not None:
            pulumi.set(__self__, "spec", spec)
        if status is not None:
            pulumi.set(__self__, "status", status)

    @_builtins.property
    @pulumi.getter(name="apiVersion")
    def api_version(self) -> Optional[_builtins.str]:
        """
        APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
        """
        return pulumi.get(self, "api_version")

    @_builtins.property
    @pulumi.getter
    def kind(self) -> Optional[_builtins.str]:
        """
        Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
        """
        return pulumi.get(self, "kind")

    @_builtins.property
    @pulumi.getter
    def metadata(self) -> Optional['_meta.v1.outputs.ObjectMeta']:
        """
        Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
        """
        return pulumi.get(self, "metadata")

    @_builtins.property
    @pulumi.getter
    def spec(self) -> Optional['outputs.StorageVersionMigrationSpec']:
        """
        Specification of the migration.
        """
        return pulumi.get(self, "spec")

    @_builtins.property
    @pulumi.getter
    def status(self) -> Optional['outputs.StorageVersionMigrationStatus']:
        """
        Status of the migration.
        """
        return pulumi.get(self, "status")


@pulumi.output_type
class StorageVersionMigrationSpec(dict):
    """
    Spec of the storage version migration.
    """
    def __init__(__self__, *,
                 resource: '_meta.v1.outputs.GroupResource'):
        """
        Spec of the storage version migration.
        :param '_meta.v1.GroupResourceArgs' resource: The resource that is being migrated. The migrator sends requests to the endpoint serving the resource. Immutable.
        """
        pulumi.set(__self__, "resource", resource)

    @_builtins.property
    @pulumi.getter
    def resource(self) -> '_meta.v1.outputs.GroupResource':
        """
        The resource that is being migrated. The migrator sends requests to the endpoint serving the resource. Immutable.
        """
        return pulumi.get(self, "resource")


@pulumi.output_type
class StorageVersionMigrationSpecPatch(dict):
    """
    Spec of the storage version migration.
    """
    def __init__(__self__, *,
                 resource: Optional['_meta.v1.outputs.GroupResourcePatch'] = None):
        """
        Spec of the storage version migration.
        :param '_meta.v1.GroupResourcePatchArgs' resource: The resource that is being migrated. The migrator sends requests to the endpoint serving the resource. Immutable.
        """
        if resource is not None:
            pulumi.set(__self__, "resource", resource)

    @_builtins.property
    @pulumi.getter
    def resource(self) -> Optional['_meta.v1.outputs.GroupResourcePatch']:
        """
        The resource that is being migrated. The migrator sends requests to the endpoint serving the resource. Immutable.
        """
        return pulumi.get(self, "resource")


@pulumi.output_type
class StorageVersionMigrationStatus(dict):
    """
    Status of the storage version migration.
    """
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "resourceVersion":
            suggest = "resource_version"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in StorageVersionMigrationStatus. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        StorageVersionMigrationStatus.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        StorageVersionMigrationStatus.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 conditions: Optional[Sequence['_meta.v1.outputs.Condition']] = None,
                 resource_version: Optional[_builtins.str] = None):
        """
        Status of the storage version migration.
        :param Sequence['_meta.v1.ConditionArgs'] conditions: The latest available observations of the migration's current state.
        :param _builtins.str resource_version: ResourceVersion to compare with the GC cache for performing the migration. This is the current resource version of given group, version and resource when kube-controller-manager first observes this StorageVersionMigration resource.
        """
        if conditions is not None:
            pulumi.set(__self__, "conditions", conditions)
        if resource_version is not None:
            pulumi.set(__self__, "resource_version", resource_version)

    @_builtins.property
    @pulumi.getter
    def conditions(self) -> Optional[Sequence['_meta.v1.outputs.Condition']]:
        """
        The latest available observations of the migration's current state.
        """
        return pulumi.get(self, "conditions")

    @_builtins.property
    @pulumi.getter(name="resourceVersion")
    def resource_version(self) -> Optional[_builtins.str]:
        """
        ResourceVersion to compare with the GC cache for performing the migration. This is the current resource version of given group, version and resource when kube-controller-manager first observes this StorageVersionMigration resource.
        """
        return pulumi.get(self, "resource_version")


@pulumi.output_type
class StorageVersionMigrationStatusPatch(dict):
    """
    Status of the storage version migration.
    """
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "resourceVersion":
            suggest = "resource_version"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in StorageVersionMigrationStatusPatch. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        StorageVersionMigrationStatusPatch.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        StorageVersionMigrationStatusPatch.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 conditions: Optional[Sequence['_meta.v1.outputs.ConditionPatch']] = None,
                 resource_version: Optional[_builtins.str] = None):
        """
        Status of the storage version migration.
        :param Sequence['_meta.v1.ConditionPatchArgs'] conditions: The latest available observations of the migration's current state.
        :param _builtins.str resource_version: ResourceVersion to compare with the GC cache for performing the migration. This is the current resource version of given group, version and resource when kube-controller-manager first observes this StorageVersionMigration resource.
        """
        if conditions is not None:
            pulumi.set(__self__, "conditions", conditions)
        if resource_version is not None:
            pulumi.set(__self__, "resource_version", resource_version)

    @_builtins.property
    @pulumi.getter
    def conditions(self) -> Optional[Sequence['_meta.v1.outputs.ConditionPatch']]:
        """
        The latest available observations of the migration's current state.
        """
        return pulumi.get(self, "conditions")

    @_builtins.property
    @pulumi.getter(name="resourceVersion")
    def resource_version(self) -> Optional[_builtins.str]:
        """
        ResourceVersion to compare with the GC cache for performing the migration. This is the current resource version of given group, version and resource when kube-controller-manager first observes this StorageVersionMigration resource.
        """
        return pulumi.get(self, "resource_version")


