# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
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__ = ['PulsarJobArgs', 'PulsarJob']

@pulumi.input_type
class PulsarJobArgs:
    def __init__(__self__, *,
                 app_id: pulumi.Input[str],
                 type_id: pulumi.Input[str],
                 active: Optional[pulumi.Input[bool]] = None,
                 blend_metric_weights: Optional[pulumi.Input['PulsarJobBlendMetricWeightsArgs']] = None,
                 config: Optional[pulumi.Input['PulsarJobConfigArgs']] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 shared: Optional[pulumi.Input[bool]] = None,
                 weights: Optional[pulumi.Input[Sequence[pulumi.Input['PulsarJobWeightArgs']]]] = None):
        """
        The set of arguments for constructing a PulsarJob resource.
        """
        pulumi.set(__self__, "app_id", app_id)
        pulumi.set(__self__, "type_id", type_id)
        if active is not None:
            pulumi.set(__self__, "active", active)
        if blend_metric_weights is not None:
            pulumi.set(__self__, "blend_metric_weights", blend_metric_weights)
        if config is not None:
            pulumi.set(__self__, "config", config)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if shared is not None:
            pulumi.set(__self__, "shared", shared)
        if weights is not None:
            pulumi.set(__self__, "weights", weights)

    @property
    @pulumi.getter(name="appId")
    def app_id(self) -> pulumi.Input[str]:
        return pulumi.get(self, "app_id")

    @app_id.setter
    def app_id(self, value: pulumi.Input[str]):
        pulumi.set(self, "app_id", value)

    @property
    @pulumi.getter(name="typeId")
    def type_id(self) -> pulumi.Input[str]:
        return pulumi.get(self, "type_id")

    @type_id.setter
    def type_id(self, value: pulumi.Input[str]):
        pulumi.set(self, "type_id", value)

    @property
    @pulumi.getter
    def active(self) -> Optional[pulumi.Input[bool]]:
        return pulumi.get(self, "active")

    @active.setter
    def active(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "active", value)

    @property
    @pulumi.getter(name="blendMetricWeights")
    def blend_metric_weights(self) -> Optional[pulumi.Input['PulsarJobBlendMetricWeightsArgs']]:
        return pulumi.get(self, "blend_metric_weights")

    @blend_metric_weights.setter
    def blend_metric_weights(self, value: Optional[pulumi.Input['PulsarJobBlendMetricWeightsArgs']]):
        pulumi.set(self, "blend_metric_weights", value)

    @property
    @pulumi.getter
    def config(self) -> Optional[pulumi.Input['PulsarJobConfigArgs']]:
        return pulumi.get(self, "config")

    @config.setter
    def config(self, value: Optional[pulumi.Input['PulsarJobConfigArgs']]):
        pulumi.set(self, "config", value)

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter
    def shared(self) -> Optional[pulumi.Input[bool]]:
        return pulumi.get(self, "shared")

    @shared.setter
    def shared(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "shared", value)

    @property
    @pulumi.getter
    def weights(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PulsarJobWeightArgs']]]]:
        return pulumi.get(self, "weights")

    @weights.setter
    def weights(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PulsarJobWeightArgs']]]]):
        pulumi.set(self, "weights", value)


@pulumi.input_type
class _PulsarJobState:
    def __init__(__self__, *,
                 active: Optional[pulumi.Input[bool]] = None,
                 app_id: Optional[pulumi.Input[str]] = None,
                 blend_metric_weights: Optional[pulumi.Input['PulsarJobBlendMetricWeightsArgs']] = None,
                 community: Optional[pulumi.Input[bool]] = None,
                 config: Optional[pulumi.Input['PulsarJobConfigArgs']] = None,
                 customer: Optional[pulumi.Input[int]] = None,
                 job_id: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 shared: Optional[pulumi.Input[bool]] = None,
                 type_id: Optional[pulumi.Input[str]] = None,
                 weights: Optional[pulumi.Input[Sequence[pulumi.Input['PulsarJobWeightArgs']]]] = None):
        """
        Input properties used for looking up and filtering PulsarJob resources.
        """
        if active is not None:
            pulumi.set(__self__, "active", active)
        if app_id is not None:
            pulumi.set(__self__, "app_id", app_id)
        if blend_metric_weights is not None:
            pulumi.set(__self__, "blend_metric_weights", blend_metric_weights)
        if community is not None:
            pulumi.set(__self__, "community", community)
        if config is not None:
            pulumi.set(__self__, "config", config)
        if customer is not None:
            pulumi.set(__self__, "customer", customer)
        if job_id is not None:
            pulumi.set(__self__, "job_id", job_id)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if shared is not None:
            pulumi.set(__self__, "shared", shared)
        if type_id is not None:
            pulumi.set(__self__, "type_id", type_id)
        if weights is not None:
            pulumi.set(__self__, "weights", weights)

    @property
    @pulumi.getter
    def active(self) -> Optional[pulumi.Input[bool]]:
        return pulumi.get(self, "active")

    @active.setter
    def active(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "active", value)

    @property
    @pulumi.getter(name="appId")
    def app_id(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "app_id")

    @app_id.setter
    def app_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "app_id", value)

    @property
    @pulumi.getter(name="blendMetricWeights")
    def blend_metric_weights(self) -> Optional[pulumi.Input['PulsarJobBlendMetricWeightsArgs']]:
        return pulumi.get(self, "blend_metric_weights")

    @blend_metric_weights.setter
    def blend_metric_weights(self, value: Optional[pulumi.Input['PulsarJobBlendMetricWeightsArgs']]):
        pulumi.set(self, "blend_metric_weights", value)

    @property
    @pulumi.getter
    def community(self) -> Optional[pulumi.Input[bool]]:
        return pulumi.get(self, "community")

    @community.setter
    def community(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "community", value)

    @property
    @pulumi.getter
    def config(self) -> Optional[pulumi.Input['PulsarJobConfigArgs']]:
        return pulumi.get(self, "config")

    @config.setter
    def config(self, value: Optional[pulumi.Input['PulsarJobConfigArgs']]):
        pulumi.set(self, "config", value)

    @property
    @pulumi.getter
    def customer(self) -> Optional[pulumi.Input[int]]:
        return pulumi.get(self, "customer")

    @customer.setter
    def customer(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "customer", value)

    @property
    @pulumi.getter(name="jobId")
    def job_id(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "job_id")

    @job_id.setter
    def job_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "job_id", value)

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "name")

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter
    def shared(self) -> Optional[pulumi.Input[bool]]:
        return pulumi.get(self, "shared")

    @shared.setter
    def shared(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "shared", value)

    @property
    @pulumi.getter(name="typeId")
    def type_id(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "type_id")

    @type_id.setter
    def type_id(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "type_id", value)

    @property
    @pulumi.getter
    def weights(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['PulsarJobWeightArgs']]]]:
        return pulumi.get(self, "weights")

    @weights.setter
    def weights(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['PulsarJobWeightArgs']]]]):
        pulumi.set(self, "weights", value)


class PulsarJob(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 active: Optional[pulumi.Input[bool]] = None,
                 app_id: Optional[pulumi.Input[str]] = None,
                 blend_metric_weights: Optional[pulumi.Input[Union['PulsarJobBlendMetricWeightsArgs', 'PulsarJobBlendMetricWeightsArgsDict']]] = None,
                 config: Optional[pulumi.Input[Union['PulsarJobConfigArgs', 'PulsarJobConfigArgsDict']]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 shared: Optional[pulumi.Input[bool]] = None,
                 type_id: Optional[pulumi.Input[str]] = None,
                 weights: Optional[pulumi.Input[Sequence[pulumi.Input[Union['PulsarJobWeightArgs', 'PulsarJobWeightArgsDict']]]]] = None,
                 __props__=None):
        """
        Create a PulsarJob resource with the given unique name, props, and options.
        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: PulsarJobArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Create a PulsarJob resource with the given unique name, props, and options.
        :param str resource_name: The name of the resource.
        :param PulsarJobArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(PulsarJobArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 active: Optional[pulumi.Input[bool]] = None,
                 app_id: Optional[pulumi.Input[str]] = None,
                 blend_metric_weights: Optional[pulumi.Input[Union['PulsarJobBlendMetricWeightsArgs', 'PulsarJobBlendMetricWeightsArgsDict']]] = None,
                 config: Optional[pulumi.Input[Union['PulsarJobConfigArgs', 'PulsarJobConfigArgsDict']]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 shared: Optional[pulumi.Input[bool]] = None,
                 type_id: Optional[pulumi.Input[str]] = None,
                 weights: Optional[pulumi.Input[Sequence[pulumi.Input[Union['PulsarJobWeightArgs', 'PulsarJobWeightArgsDict']]]]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = PulsarJobArgs.__new__(PulsarJobArgs)

            __props__.__dict__["active"] = active
            if app_id is None and not opts.urn:
                raise TypeError("Missing required property 'app_id'")
            __props__.__dict__["app_id"] = app_id
            __props__.__dict__["blend_metric_weights"] = blend_metric_weights
            __props__.__dict__["config"] = config
            __props__.__dict__["name"] = name
            __props__.__dict__["shared"] = shared
            if type_id is None and not opts.urn:
                raise TypeError("Missing required property 'type_id'")
            __props__.__dict__["type_id"] = type_id
            __props__.__dict__["weights"] = weights
            __props__.__dict__["community"] = None
            __props__.__dict__["customer"] = None
            __props__.__dict__["job_id"] = None
        super(PulsarJob, __self__).__init__(
            'ns1:index/pulsarJob:PulsarJob',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            active: Optional[pulumi.Input[bool]] = None,
            app_id: Optional[pulumi.Input[str]] = None,
            blend_metric_weights: Optional[pulumi.Input[Union['PulsarJobBlendMetricWeightsArgs', 'PulsarJobBlendMetricWeightsArgsDict']]] = None,
            community: Optional[pulumi.Input[bool]] = None,
            config: Optional[pulumi.Input[Union['PulsarJobConfigArgs', 'PulsarJobConfigArgsDict']]] = None,
            customer: Optional[pulumi.Input[int]] = None,
            job_id: Optional[pulumi.Input[str]] = None,
            name: Optional[pulumi.Input[str]] = None,
            shared: Optional[pulumi.Input[bool]] = None,
            type_id: Optional[pulumi.Input[str]] = None,
            weights: Optional[pulumi.Input[Sequence[pulumi.Input[Union['PulsarJobWeightArgs', 'PulsarJobWeightArgsDict']]]]] = None) -> 'PulsarJob':
        """
        Get an existing PulsarJob resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _PulsarJobState.__new__(_PulsarJobState)

        __props__.__dict__["active"] = active
        __props__.__dict__["app_id"] = app_id
        __props__.__dict__["blend_metric_weights"] = blend_metric_weights
        __props__.__dict__["community"] = community
        __props__.__dict__["config"] = config
        __props__.__dict__["customer"] = customer
        __props__.__dict__["job_id"] = job_id
        __props__.__dict__["name"] = name
        __props__.__dict__["shared"] = shared
        __props__.__dict__["type_id"] = type_id
        __props__.__dict__["weights"] = weights
        return PulsarJob(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter
    def active(self) -> pulumi.Output[Optional[bool]]:
        return pulumi.get(self, "active")

    @property
    @pulumi.getter(name="appId")
    def app_id(self) -> pulumi.Output[str]:
        return pulumi.get(self, "app_id")

    @property
    @pulumi.getter(name="blendMetricWeights")
    def blend_metric_weights(self) -> pulumi.Output[Optional['outputs.PulsarJobBlendMetricWeights']]:
        return pulumi.get(self, "blend_metric_weights")

    @property
    @pulumi.getter
    def community(self) -> pulumi.Output[bool]:
        return pulumi.get(self, "community")

    @property
    @pulumi.getter
    def config(self) -> pulumi.Output[Optional['outputs.PulsarJobConfig']]:
        return pulumi.get(self, "config")

    @property
    @pulumi.getter
    def customer(self) -> pulumi.Output[int]:
        return pulumi.get(self, "customer")

    @property
    @pulumi.getter(name="jobId")
    def job_id(self) -> pulumi.Output[str]:
        return pulumi.get(self, "job_id")

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

    @property
    @pulumi.getter
    def shared(self) -> pulumi.Output[Optional[bool]]:
        return pulumi.get(self, "shared")

    @property
    @pulumi.getter(name="typeId")
    def type_id(self) -> pulumi.Output[str]:
        return pulumi.get(self, "type_id")

    @property
    @pulumi.getter
    def weights(self) -> pulumi.Output[Optional[Sequence['outputs.PulsarJobWeight']]]:
        return pulumi.get(self, "weights")

