# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** 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

__all__ = [
    'GetGenaiOpenaiApiKeyResult',
    'AwaitableGetGenaiOpenaiApiKeyResult',
    'get_genai_openai_api_key',
    'get_genai_openai_api_key_output',
]

@pulumi.output_type
class GetGenaiOpenaiApiKeyResult:
    """
    A collection of values returned by getGenaiOpenaiApiKey.
    """
    def __init__(__self__, created_at=None, created_by=None, deleted_at=None, id=None, models=None, name=None, updated_at=None, uuid=None):
        if created_at and not isinstance(created_at, str):
            raise TypeError("Expected argument 'created_at' to be a str")
        pulumi.set(__self__, "created_at", created_at)
        if created_by and not isinstance(created_by, str):
            raise TypeError("Expected argument 'created_by' to be a str")
        pulumi.set(__self__, "created_by", created_by)
        if deleted_at and not isinstance(deleted_at, str):
            raise TypeError("Expected argument 'deleted_at' to be a str")
        pulumi.set(__self__, "deleted_at", deleted_at)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if models and not isinstance(models, list):
            raise TypeError("Expected argument 'models' to be a list")
        pulumi.set(__self__, "models", models)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if updated_at and not isinstance(updated_at, str):
            raise TypeError("Expected argument 'updated_at' to be a str")
        pulumi.set(__self__, "updated_at", updated_at)
        if uuid and not isinstance(uuid, str):
            raise TypeError("Expected argument 'uuid' to be a str")
        pulumi.set(__self__, "uuid", uuid)

    @_builtins.property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> _builtins.str:
        return pulumi.get(self, "created_at")

    @_builtins.property
    @pulumi.getter(name="createdBy")
    def created_by(self) -> _builtins.str:
        return pulumi.get(self, "created_by")

    @_builtins.property
    @pulumi.getter(name="deletedAt")
    def deleted_at(self) -> _builtins.str:
        return pulumi.get(self, "deleted_at")

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter
    def models(self) -> Sequence['outputs.GetGenaiOpenaiApiKeyModelResult']:
        return pulumi.get(self, "models")

    @_builtins.property
    @pulumi.getter
    def name(self) -> _builtins.str:
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter(name="updatedAt")
    def updated_at(self) -> _builtins.str:
        return pulumi.get(self, "updated_at")

    @_builtins.property
    @pulumi.getter
    def uuid(self) -> _builtins.str:
        return pulumi.get(self, "uuid")


class AwaitableGetGenaiOpenaiApiKeyResult(GetGenaiOpenaiApiKeyResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetGenaiOpenaiApiKeyResult(
            created_at=self.created_at,
            created_by=self.created_by,
            deleted_at=self.deleted_at,
            id=self.id,
            models=self.models,
            name=self.name,
            updated_at=self.updated_at,
            uuid=self.uuid)


def get_genai_openai_api_key(uuid: Optional[_builtins.str] = None,
                             opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetGenaiOpenaiApiKeyResult:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['uuid'] = uuid
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('digitalocean:index/getGenaiOpenaiApiKey:getGenaiOpenaiApiKey', __args__, opts=opts, typ=GetGenaiOpenaiApiKeyResult).value

    return AwaitableGetGenaiOpenaiApiKeyResult(
        created_at=pulumi.get(__ret__, 'created_at'),
        created_by=pulumi.get(__ret__, 'created_by'),
        deleted_at=pulumi.get(__ret__, 'deleted_at'),
        id=pulumi.get(__ret__, 'id'),
        models=pulumi.get(__ret__, 'models'),
        name=pulumi.get(__ret__, 'name'),
        updated_at=pulumi.get(__ret__, 'updated_at'),
        uuid=pulumi.get(__ret__, 'uuid'))
def get_genai_openai_api_key_output(uuid: Optional[pulumi.Input[_builtins.str]] = None,
                                    opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetGenaiOpenaiApiKeyResult]:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['uuid'] = uuid
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('digitalocean:index/getGenaiOpenaiApiKey:getGenaiOpenaiApiKey', __args__, opts=opts, typ=GetGenaiOpenaiApiKeyResult)
    return __ret__.apply(lambda __response__: GetGenaiOpenaiApiKeyResult(
        created_at=pulumi.get(__response__, 'created_at'),
        created_by=pulumi.get(__response__, 'created_by'),
        deleted_at=pulumi.get(__response__, 'deleted_at'),
        id=pulumi.get(__response__, 'id'),
        models=pulumi.get(__response__, 'models'),
        name=pulumi.get(__response__, 'name'),
        updated_at=pulumi.get(__response__, 'updated_at'),
        uuid=pulumi.get(__response__, 'uuid')))
