# 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
from ._inputs import *

__all__ = [
    'GetServicePlanListResult',
    'AwaitableGetServicePlanListResult',
    'get_service_plan_list',
    'get_service_plan_list_output',
]

@pulumi.output_type
class GetServicePlanListResult:
    """
    A collection of values returned by getServicePlanList.
    """
    def __init__(__self__, id=None, project=None, service_plans=None, service_type=None, timeouts=None):
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if project and not isinstance(project, str):
            raise TypeError("Expected argument 'project' to be a str")
        pulumi.set(__self__, "project", project)
        if service_plans and not isinstance(service_plans, list):
            raise TypeError("Expected argument 'service_plans' to be a list")
        pulumi.set(__self__, "service_plans", service_plans)
        if service_type and not isinstance(service_type, str):
            raise TypeError("Expected argument 'service_type' to be a str")
        pulumi.set(__self__, "service_type", service_type)
        if timeouts and not isinstance(timeouts, dict):
            raise TypeError("Expected argument 'timeouts' to be a dict")
        pulumi.set(__self__, "timeouts", timeouts)

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        Resource ID composed as: `project/service_type`.
        """
        return pulumi.get(self, "id")

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

    @_builtins.property
    @pulumi.getter(name="servicePlans")
    def service_plans(self) -> Optional[Sequence['outputs.GetServicePlanListServicePlanResult']]:
        """
        List of plans available for this type of service.
        """
        return pulumi.get(self, "service_plans")

    @_builtins.property
    @pulumi.getter(name="serviceType")
    def service_type(self) -> _builtins.str:
        """
        Service type.
        """
        return pulumi.get(self, "service_type")

    @_builtins.property
    @pulumi.getter
    def timeouts(self) -> Optional['outputs.GetServicePlanListTimeoutsResult']:
        return pulumi.get(self, "timeouts")


class AwaitableGetServicePlanListResult(GetServicePlanListResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetServicePlanListResult(
            id=self.id,
            project=self.project,
            service_plans=self.service_plans,
            service_type=self.service_type,
            timeouts=self.timeouts)


def get_service_plan_list(project: Optional[_builtins.str] = None,
                          service_plans: Optional[Sequence[Union['GetServicePlanListServicePlanArgs', 'GetServicePlanListServicePlanArgsDict']]] = None,
                          service_type: Optional[_builtins.str] = None,
                          timeouts: Optional[Union['GetServicePlanListTimeoutsArgs', 'GetServicePlanListTimeoutsArgsDict']] = None,
                          opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetServicePlanListResult:
    """
    A list of service plans for a given project and service type.


    :param _builtins.str project: Project name.
    :param Sequence[Union['GetServicePlanListServicePlanArgs', 'GetServicePlanListServicePlanArgsDict']] service_plans: List of plans available for this type of service.
    :param _builtins.str service_type: Service type.
    """
    __args__ = dict()
    __args__['project'] = project
    __args__['servicePlans'] = service_plans
    __args__['serviceType'] = service_type
    __args__['timeouts'] = timeouts
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('aiven:index/getServicePlanList:getServicePlanList', __args__, opts=opts, typ=GetServicePlanListResult).value

    return AwaitableGetServicePlanListResult(
        id=pulumi.get(__ret__, 'id'),
        project=pulumi.get(__ret__, 'project'),
        service_plans=pulumi.get(__ret__, 'service_plans'),
        service_type=pulumi.get(__ret__, 'service_type'),
        timeouts=pulumi.get(__ret__, 'timeouts'))
def get_service_plan_list_output(project: Optional[pulumi.Input[_builtins.str]] = None,
                                 service_plans: Optional[pulumi.Input[Optional[Sequence[Union['GetServicePlanListServicePlanArgs', 'GetServicePlanListServicePlanArgsDict']]]]] = None,
                                 service_type: Optional[pulumi.Input[_builtins.str]] = None,
                                 timeouts: Optional[pulumi.Input[Optional[Union['GetServicePlanListTimeoutsArgs', 'GetServicePlanListTimeoutsArgsDict']]]] = None,
                                 opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetServicePlanListResult]:
    """
    A list of service plans for a given project and service type.


    :param _builtins.str project: Project name.
    :param Sequence[Union['GetServicePlanListServicePlanArgs', 'GetServicePlanListServicePlanArgsDict']] service_plans: List of plans available for this type of service.
    :param _builtins.str service_type: Service type.
    """
    __args__ = dict()
    __args__['project'] = project
    __args__['servicePlans'] = service_plans
    __args__['serviceType'] = service_type
    __args__['timeouts'] = timeouts
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('aiven:index/getServicePlanList:getServicePlanList', __args__, opts=opts, typ=GetServicePlanListResult)
    return __ret__.apply(lambda __response__: GetServicePlanListResult(
        id=pulumi.get(__response__, 'id'),
        project=pulumi.get(__response__, 'project'),
        service_plans=pulumi.get(__response__, 'service_plans'),
        service_type=pulumi.get(__response__, 'service_type'),
        timeouts=pulumi.get(__response__, 'timeouts')))
