# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from . import plugin_pb2 as pulumi_dot_plugin__pb2
from . import provider_pb2 as pulumi_dot_provider__pb2


class ResourceProviderStub(object):
    """The ResourceProvider service defines a standard interface for [resource providers](providers). A resource provider
    manages a set of configuration, resources, functions and so on in a single package, and offers methods such as CRUD
    operations on resources and invocations of functions. Resource providers are primarily managed by the Pulumi engine
    as part of a deployment in order to interact with the cloud providers underpinning a Pulumi application.
    """

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.Parameterize = channel.unary_unary(
                '/pulumirpc.ResourceProvider/Parameterize',
                request_serializer=pulumi_dot_provider__pb2.ParameterizeRequest.SerializeToString,
                response_deserializer=pulumi_dot_provider__pb2.ParameterizeResponse.FromString,
                )
        self.GetSchema = channel.unary_unary(
                '/pulumirpc.ResourceProvider/GetSchema',
                request_serializer=pulumi_dot_provider__pb2.GetSchemaRequest.SerializeToString,
                response_deserializer=pulumi_dot_provider__pb2.GetSchemaResponse.FromString,
                )
        self.CheckConfig = channel.unary_unary(
                '/pulumirpc.ResourceProvider/CheckConfig',
                request_serializer=pulumi_dot_provider__pb2.CheckRequest.SerializeToString,
                response_deserializer=pulumi_dot_provider__pb2.CheckResponse.FromString,
                )
        self.DiffConfig = channel.unary_unary(
                '/pulumirpc.ResourceProvider/DiffConfig',
                request_serializer=pulumi_dot_provider__pb2.DiffRequest.SerializeToString,
                response_deserializer=pulumi_dot_provider__pb2.DiffResponse.FromString,
                )
        self.Configure = channel.unary_unary(
                '/pulumirpc.ResourceProvider/Configure',
                request_serializer=pulumi_dot_provider__pb2.ConfigureRequest.SerializeToString,
                response_deserializer=pulumi_dot_provider__pb2.ConfigureResponse.FromString,
                )
        self.Invoke = channel.unary_unary(
                '/pulumirpc.ResourceProvider/Invoke',
                request_serializer=pulumi_dot_provider__pb2.InvokeRequest.SerializeToString,
                response_deserializer=pulumi_dot_provider__pb2.InvokeResponse.FromString,
                )
        self.StreamInvoke = channel.unary_stream(
                '/pulumirpc.ResourceProvider/StreamInvoke',
                request_serializer=pulumi_dot_provider__pb2.InvokeRequest.SerializeToString,
                response_deserializer=pulumi_dot_provider__pb2.InvokeResponse.FromString,
                )
        self.Call = channel.unary_unary(
                '/pulumirpc.ResourceProvider/Call',
                request_serializer=pulumi_dot_provider__pb2.CallRequest.SerializeToString,
                response_deserializer=pulumi_dot_provider__pb2.CallResponse.FromString,
                )
        self.Check = channel.unary_unary(
                '/pulumirpc.ResourceProvider/Check',
                request_serializer=pulumi_dot_provider__pb2.CheckRequest.SerializeToString,
                response_deserializer=pulumi_dot_provider__pb2.CheckResponse.FromString,
                )
        self.Diff = channel.unary_unary(
                '/pulumirpc.ResourceProvider/Diff',
                request_serializer=pulumi_dot_provider__pb2.DiffRequest.SerializeToString,
                response_deserializer=pulumi_dot_provider__pb2.DiffResponse.FromString,
                )
        self.Create = channel.unary_unary(
                '/pulumirpc.ResourceProvider/Create',
                request_serializer=pulumi_dot_provider__pb2.CreateRequest.SerializeToString,
                response_deserializer=pulumi_dot_provider__pb2.CreateResponse.FromString,
                )
        self.Read = channel.unary_unary(
                '/pulumirpc.ResourceProvider/Read',
                request_serializer=pulumi_dot_provider__pb2.ReadRequest.SerializeToString,
                response_deserializer=pulumi_dot_provider__pb2.ReadResponse.FromString,
                )
        self.Update = channel.unary_unary(
                '/pulumirpc.ResourceProvider/Update',
                request_serializer=pulumi_dot_provider__pb2.UpdateRequest.SerializeToString,
                response_deserializer=pulumi_dot_provider__pb2.UpdateResponse.FromString,
                )
        self.Delete = channel.unary_unary(
                '/pulumirpc.ResourceProvider/Delete',
                request_serializer=pulumi_dot_provider__pb2.DeleteRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.Construct = channel.unary_unary(
                '/pulumirpc.ResourceProvider/Construct',
                request_serializer=pulumi_dot_provider__pb2.ConstructRequest.SerializeToString,
                response_deserializer=pulumi_dot_provider__pb2.ConstructResponse.FromString,
                )
        self.Cancel = channel.unary_unary(
                '/pulumirpc.ResourceProvider/Cancel',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.GetPluginInfo = channel.unary_unary(
                '/pulumirpc.ResourceProvider/GetPluginInfo',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=pulumi_dot_plugin__pb2.PluginInfo.FromString,
                )
        self.Attach = channel.unary_unary(
                '/pulumirpc.ResourceProvider/Attach',
                request_serializer=pulumi_dot_plugin__pb2.PluginAttach.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.GetMapping = channel.unary_unary(
                '/pulumirpc.ResourceProvider/GetMapping',
                request_serializer=pulumi_dot_provider__pb2.GetMappingRequest.SerializeToString,
                response_deserializer=pulumi_dot_provider__pb2.GetMappingResponse.FromString,
                )
        self.GetMappings = channel.unary_unary(
                '/pulumirpc.ResourceProvider/GetMappings',
                request_serializer=pulumi_dot_provider__pb2.GetMappingsRequest.SerializeToString,
                response_deserializer=pulumi_dot_provider__pb2.GetMappingsResponse.FromString,
                )


class ResourceProviderServicer(object):
    """The ResourceProvider service defines a standard interface for [resource providers](providers). A resource provider
    manages a set of configuration, resources, functions and so on in a single package, and offers methods such as CRUD
    operations on resources and invocations of functions. Resource providers are primarily managed by the Pulumi engine
    as part of a deployment in order to interact with the cloud providers underpinning a Pulumi application.
    """

    def Parameterize(self, request, context):
        """`Parameterize` is the primary means of supporting [parameterized providers](parameterized-providers), which allow
        a caller to change a provider's behavior ahead of its [configuration](pulumirpc.ResourceProvider.Configure) and
        subsequent use. Where a [](pulumirpc.ResourceProvider.Configure) call allows a caller to influence provider
        behaviour at a high level (e.g. by specifying the region in which an AWS provider should operate), a
        `Parameterize` call may change the set of resources and functions that a provider offers (that is, its schema).
        This is useful in any case where some "set" of providers can be captured by a single implementation that may
        power fundamentally different schemata -- dynamically bridging Terraform providers, or managing Kubernetes
        clusters with custom resource definitions, for instance, are good examples. The parameterized package that
        `Parameterize` yields is known as a *sub-package* of the original (unparameterized) package.

        `Parameterize` supports two types of parameterization:

        * *Replacement parameterization*, whereby a `Parameterize` call results in a schema that completely replaces the
        original provider schema. Bridging a Terraform provider dynamically might be an example of this -- following
        the call to `Parameterize`, the provider's schema will become that of the Terraform provider that was bridged.
        Providers that implement replacement parameterization expect a *single* call to `Parameterize`.

        * *Extension parameterization*, in which a `Parameterize` call results in a schema that is a superset of the
        original. This is useful in cases where a provider can be extended with additional resources or functions, such
        as a Kubernetes provider that can be extended with resources representing custom resource definitions.
        Providers that implement extension parameterization should accept multiple calls to `Parameterize`. Extension
        packages may even be called multiple times with the same package name, but with different versions. The CRUD
        operations of extension resources must include the version of which sub-package they correspond to.

        `Parameterize` should work the same whether it is provided with `ParametersArgs` or `ParametersValue` input. In
        each case it should return the sub-package name and version (which when a `ParametersValue` is supplied should
        match the given input).
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetSchema(self, request, context):
        """GetSchema fetches the schema for this resource provider.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CheckConfig(self, request, context):
        """`CheckConfig` validates a set of configuration inputs that will be passed to this provider instance.
        `CheckConfig` is to provider resources what [](pulumirpc.ResourceProvider.Check) is to individual resources, and
        is the first stage in configuring (that is, eventually executing a [](pulumirpc.ResourceProvider.Configure) call)
        a provider using user-supplied values. In the case that provider inputs are coming from some source that has been
        checked previously (e.g. a Pulumi state), it is not necessary to call `CheckConfig`.

        A `CheckConfig` call returns either a set of checked, known-valid inputs that may subsequently be passed to
        [](pulumirpc.ResourceProvider.DiffConfig) and/or [](pulumirpc.ResourceProvider.Configure), or a set of errors
        explaining why the inputs are invalid. In the case that a set of inputs are successfully validated and returned,
        `CheckConfig` *may also populate default values* for provider configuration, returning them so that they may be
        passed to a subsequent [](pulumirpc.ResourceProvider.Configure) call and persisted in the Pulumi state. In the
        case that `CheckConfig` fails and returns a set of errors, it is expected that the caller (typically the Pulumi
        engine) will fail provider registration.

        As a rule, the provider inputs returned by a call to `CheckConfig` should preserve the original representation of
        the properties as present in the program inputs. Though this rule is not required for correctness, violations
        thereof can negatively impact the end-user experience, as the provider inputs are used for detecting and
        rendering diffs.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DiffConfig(self, request, context):
        """`DiffConfig` compares an existing ("old") provider configuration with a new configuration and computes the
        difference (if any) between them. `DiffConfig` is to provider resources what [](pulumirpc.ResourceProvider.Diff)
        is to individual resources. `DiffConfig` should only be called with values that have at some point been validated
        by a [](pulumirpc.ResourceProvider.CheckConfig) call. The [](pulumirpc.DiffResponse) returned by a `DiffConfig`
        call is used primarily to determine whether or not the newly configured provider is capable of managing resources
        owned by the old provider. If `DiffConfig` indicates that the provider resource needs to be replaced, for
        instance, then all resources owned by that provider will *also* need to be replaced. Replacement semantics should
        thus be reserved for changes to configuration properties that are guaranteed to make old resources unmanageable.
        Changes to an AWS region, for example, will almost certainly require a provider replacement, but changes to an
        AWS access key, should almost certainly not.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Configure(self, request, context):
        """`Configure` is the final stage in configuring a provider instance. Callers supply two sets of data:

        * Provider-specific configuration, which is the set of inputs that have been validated by a previous
        [](pulumirpc.ResourceProvider.CheckConfig) call.
        * Provider-agnostic ("protocol") configuration, such as whether or not the caller supports secrets.

        The provider is expected to return its own set of protocol configuration, indicating which features it supports
        in turn so that the caller and the provider can interact appropriately.

        Providers may expect a *single* call to `Configure`. If a call to `Configure` is missing required configuration,
        the provider may return a set of error details containing [](pulumirpc.ConfigureErrorMissingKeys) values to
        indicate which keys are missing.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Invoke(self, request, context):
        """Invoke dynamically executes a built-in function in the provider.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StreamInvoke(self, request, context):
        """StreamInvoke dynamically executes a built-in function in the provider, which returns a stream
        of responses.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Call(self, request, context):
        """Call dynamically executes a method in the provider associated with a component resource.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Check(self, request, context):
        """`Check` validates a set of input properties against a given resource type. A `Check` call returns either a set of
        checked, known-valid inputs that may subsequently be passed to [](pulumirpc.ResourceProvider.Diff),
        [](pulumirpc.ResourceProvider.Create), or [](pulumirpc.ResourceProvider.Update); or a set of errors explaining
        why the inputs are invalid. In the case that a set of inputs are successfully validated and returned, `Check`
        *may also populate default values* for resource inputs, returning them so that they may be passed to a subsequent
        call and persisted in the Pulumi state. In the case that `Check` fails and returns a set of errors, it is
        expected that the caller (typically the Pulumi engine) will fail resource registration.

        As a rule, the provider inputs returned by a call to `Check` should preserve the original representation of the
        properties as present in the program inputs. Though this rule is not required for correctness, violations thereof
        can negatively impact the end-user experience, as the provider inputs are used for detecting and rendering
        diffs.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Diff(self, request, context):
        """`Diff` compares an existing ("old") set of resource properties with a new set of properties and computes the
        difference (if any) between them. `Diff` should only be called with values that have at some point been validated
        by a [](pulumirpc.ResourceProvider.Check) call.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Create(self, request, context):
        """`Create` provisions a new instance of the specified [(custom) resource](custom-resources). It returns a
        provider-assigned ID for the resource as well as the output properties that arose from the creation properties.
        Output properties are typically the union of the resource's input properties and any additional values that were
        computed or made available during creation.

        If creation fails, `Create` may return an [](pulumirpc.ErrorResourceInitFailed) error detail explaining why.
        Moreover, if `Create` does return an error, it must be the case that the resource was *not* created (that is,
        `Create` can be thought of as transactional or atomic).
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Read(self, request, context):
        """`Read` reads the current live state associated with a resource identified by the supplied state. The given state
        must be sufficient to uniquely identify the resource. This is typically just the resource ID, but may also
        include other properties.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Update(self, request, context):
        """`Update` updates an existing resource according to a new set of inputs, returning a new set of output properties.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Delete(self, request, context):
        """`Delete` deprovisions an existing resource as specified by its ID. `Delete` should be transactional/atomic -- if
        a call to `Delete` fails, it must be the case that the resource was *not* deleted and can be assumed to still
        exist.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Construct(self, request, context):
        """`Construct` provisions a new [component resource](component-resources). Providers that implement `Construct` are
        referred to as [component providers](component-providers). `Construct` is to component resources what
        [](pulumirpc.ResourceProvider.Create) is to [custom resources](custom-resources). Components do not have any
        lifecycle of their own, and instead embody the lifecycles of the resources that they are composed of. As such,
        `Construct` is effectively a subprogram whose resources will be persisted in the caller's state. It is
        consequently passed enough information to manage fully these resources. At a high level, this comprises:

        * A [](pulumirpc.ResourceMonitor) endpoint which the provider can use to [register](resource-registration) nested
        custom or component resources that belong to the component.

        * A set of input properties.

        * A full set of [resource options](https://www.pulumi.com/docs/iac/concepts/options/) that the component should
        propagate to resources it registers against the supplied resource monitor.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Cancel(self, request, context):
        """Cancel signals the provider to gracefully shut down and abort any ongoing resource operations.
        Operations aborted in this way will return an error (e.g., `Update` and `Create` will either return a
        creation error or an initialization error). Since Cancel is advisory and non-blocking, it is up
        to the host to decide how long to wait after Cancel is called before (e.g.)
        hard-closing any gRPC connection.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetPluginInfo(self, request, context):
        """GetPluginInfo returns generic information about this plugin, like its version.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Attach(self, request, context):
        """Attach sends the engine address to an already running plugin.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetMapping(self, request, context):
        """GetMapping fetches the mapping for this resource provider, if any. A provider should return an empty
        response (not an error) if it doesn't have a mapping for the given key.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetMappings(self, request, context):
        """GetMappings is an optional method that returns what mappings (if any) a provider supports. If a provider does not
        implement this method the engine falls back to the old behaviour of just calling GetMapping without a name.
        If this method is implemented than the engine will then call GetMapping only with the names returned from this method.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ResourceProviderServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Parameterize': grpc.unary_unary_rpc_method_handler(
                    servicer.Parameterize,
                    request_deserializer=pulumi_dot_provider__pb2.ParameterizeRequest.FromString,
                    response_serializer=pulumi_dot_provider__pb2.ParameterizeResponse.SerializeToString,
            ),
            'GetSchema': grpc.unary_unary_rpc_method_handler(
                    servicer.GetSchema,
                    request_deserializer=pulumi_dot_provider__pb2.GetSchemaRequest.FromString,
                    response_serializer=pulumi_dot_provider__pb2.GetSchemaResponse.SerializeToString,
            ),
            'CheckConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.CheckConfig,
                    request_deserializer=pulumi_dot_provider__pb2.CheckRequest.FromString,
                    response_serializer=pulumi_dot_provider__pb2.CheckResponse.SerializeToString,
            ),
            'DiffConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.DiffConfig,
                    request_deserializer=pulumi_dot_provider__pb2.DiffRequest.FromString,
                    response_serializer=pulumi_dot_provider__pb2.DiffResponse.SerializeToString,
            ),
            'Configure': grpc.unary_unary_rpc_method_handler(
                    servicer.Configure,
                    request_deserializer=pulumi_dot_provider__pb2.ConfigureRequest.FromString,
                    response_serializer=pulumi_dot_provider__pb2.ConfigureResponse.SerializeToString,
            ),
            'Invoke': grpc.unary_unary_rpc_method_handler(
                    servicer.Invoke,
                    request_deserializer=pulumi_dot_provider__pb2.InvokeRequest.FromString,
                    response_serializer=pulumi_dot_provider__pb2.InvokeResponse.SerializeToString,
            ),
            'StreamInvoke': grpc.unary_stream_rpc_method_handler(
                    servicer.StreamInvoke,
                    request_deserializer=pulumi_dot_provider__pb2.InvokeRequest.FromString,
                    response_serializer=pulumi_dot_provider__pb2.InvokeResponse.SerializeToString,
            ),
            'Call': grpc.unary_unary_rpc_method_handler(
                    servicer.Call,
                    request_deserializer=pulumi_dot_provider__pb2.CallRequest.FromString,
                    response_serializer=pulumi_dot_provider__pb2.CallResponse.SerializeToString,
            ),
            'Check': grpc.unary_unary_rpc_method_handler(
                    servicer.Check,
                    request_deserializer=pulumi_dot_provider__pb2.CheckRequest.FromString,
                    response_serializer=pulumi_dot_provider__pb2.CheckResponse.SerializeToString,
            ),
            'Diff': grpc.unary_unary_rpc_method_handler(
                    servicer.Diff,
                    request_deserializer=pulumi_dot_provider__pb2.DiffRequest.FromString,
                    response_serializer=pulumi_dot_provider__pb2.DiffResponse.SerializeToString,
            ),
            'Create': grpc.unary_unary_rpc_method_handler(
                    servicer.Create,
                    request_deserializer=pulumi_dot_provider__pb2.CreateRequest.FromString,
                    response_serializer=pulumi_dot_provider__pb2.CreateResponse.SerializeToString,
            ),
            'Read': grpc.unary_unary_rpc_method_handler(
                    servicer.Read,
                    request_deserializer=pulumi_dot_provider__pb2.ReadRequest.FromString,
                    response_serializer=pulumi_dot_provider__pb2.ReadResponse.SerializeToString,
            ),
            'Update': grpc.unary_unary_rpc_method_handler(
                    servicer.Update,
                    request_deserializer=pulumi_dot_provider__pb2.UpdateRequest.FromString,
                    response_serializer=pulumi_dot_provider__pb2.UpdateResponse.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=pulumi_dot_provider__pb2.DeleteRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'Construct': grpc.unary_unary_rpc_method_handler(
                    servicer.Construct,
                    request_deserializer=pulumi_dot_provider__pb2.ConstructRequest.FromString,
                    response_serializer=pulumi_dot_provider__pb2.ConstructResponse.SerializeToString,
            ),
            'Cancel': grpc.unary_unary_rpc_method_handler(
                    servicer.Cancel,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'GetPluginInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.GetPluginInfo,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=pulumi_dot_plugin__pb2.PluginInfo.SerializeToString,
            ),
            'Attach': grpc.unary_unary_rpc_method_handler(
                    servicer.Attach,
                    request_deserializer=pulumi_dot_plugin__pb2.PluginAttach.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'GetMapping': grpc.unary_unary_rpc_method_handler(
                    servicer.GetMapping,
                    request_deserializer=pulumi_dot_provider__pb2.GetMappingRequest.FromString,
                    response_serializer=pulumi_dot_provider__pb2.GetMappingResponse.SerializeToString,
            ),
            'GetMappings': grpc.unary_unary_rpc_method_handler(
                    servicer.GetMappings,
                    request_deserializer=pulumi_dot_provider__pb2.GetMappingsRequest.FromString,
                    response_serializer=pulumi_dot_provider__pb2.GetMappingsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'pulumirpc.ResourceProvider', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class ResourceProvider(object):
    """The ResourceProvider service defines a standard interface for [resource providers](providers). A resource provider
    manages a set of configuration, resources, functions and so on in a single package, and offers methods such as CRUD
    operations on resources and invocations of functions. Resource providers are primarily managed by the Pulumi engine
    as part of a deployment in order to interact with the cloud providers underpinning a Pulumi application.
    """

    @staticmethod
    def Parameterize(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.ResourceProvider/Parameterize',
            pulumi_dot_provider__pb2.ParameterizeRequest.SerializeToString,
            pulumi_dot_provider__pb2.ParameterizeResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetSchema(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.ResourceProvider/GetSchema',
            pulumi_dot_provider__pb2.GetSchemaRequest.SerializeToString,
            pulumi_dot_provider__pb2.GetSchemaResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CheckConfig(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.ResourceProvider/CheckConfig',
            pulumi_dot_provider__pb2.CheckRequest.SerializeToString,
            pulumi_dot_provider__pb2.CheckResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DiffConfig(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.ResourceProvider/DiffConfig',
            pulumi_dot_provider__pb2.DiffRequest.SerializeToString,
            pulumi_dot_provider__pb2.DiffResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Configure(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.ResourceProvider/Configure',
            pulumi_dot_provider__pb2.ConfigureRequest.SerializeToString,
            pulumi_dot_provider__pb2.ConfigureResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Invoke(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.ResourceProvider/Invoke',
            pulumi_dot_provider__pb2.InvokeRequest.SerializeToString,
            pulumi_dot_provider__pb2.InvokeResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StreamInvoke(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_stream(request, target, '/pulumirpc.ResourceProvider/StreamInvoke',
            pulumi_dot_provider__pb2.InvokeRequest.SerializeToString,
            pulumi_dot_provider__pb2.InvokeResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Call(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.ResourceProvider/Call',
            pulumi_dot_provider__pb2.CallRequest.SerializeToString,
            pulumi_dot_provider__pb2.CallResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Check(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.ResourceProvider/Check',
            pulumi_dot_provider__pb2.CheckRequest.SerializeToString,
            pulumi_dot_provider__pb2.CheckResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Diff(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.ResourceProvider/Diff',
            pulumi_dot_provider__pb2.DiffRequest.SerializeToString,
            pulumi_dot_provider__pb2.DiffResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Create(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.ResourceProvider/Create',
            pulumi_dot_provider__pb2.CreateRequest.SerializeToString,
            pulumi_dot_provider__pb2.CreateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Read(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.ResourceProvider/Read',
            pulumi_dot_provider__pb2.ReadRequest.SerializeToString,
            pulumi_dot_provider__pb2.ReadResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Update(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.ResourceProvider/Update',
            pulumi_dot_provider__pb2.UpdateRequest.SerializeToString,
            pulumi_dot_provider__pb2.UpdateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Delete(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.ResourceProvider/Delete',
            pulumi_dot_provider__pb2.DeleteRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Construct(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.ResourceProvider/Construct',
            pulumi_dot_provider__pb2.ConstructRequest.SerializeToString,
            pulumi_dot_provider__pb2.ConstructResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Cancel(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.ResourceProvider/Cancel',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetPluginInfo(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.ResourceProvider/GetPluginInfo',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            pulumi_dot_plugin__pb2.PluginInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Attach(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.ResourceProvider/Attach',
            pulumi_dot_plugin__pb2.PluginAttach.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetMapping(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.ResourceProvider/GetMapping',
            pulumi_dot_provider__pb2.GetMappingRequest.SerializeToString,
            pulumi_dot_provider__pb2.GetMappingResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetMappings(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/pulumirpc.ResourceProvider/GetMappings',
            pulumi_dot_provider__pb2.GetMappingsRequest.SerializeToString,
            pulumi_dot_provider__pb2.GetMappingsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
