"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
Copyright 2016-2018, Pulumi Corporation.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import abc
import collections.abc
import google.protobuf.empty_pb2
import grpc
import grpc.aio
import typing
import pulumi.plugin_pb2
import pulumi.provider_pb2

class ResourceProviderStub:
    """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: grpc.Channel) -> None: ...
    Parameterize: grpc.UnaryUnaryMultiCallable[
        pulumi.provider_pb2.ParameterizeRequest,
        pulumi.provider_pb2.ParameterizeResponse,
    ]
    """`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).
    """
    GetSchema: grpc.UnaryUnaryMultiCallable[
        pulumi.provider_pb2.GetSchemaRequest,
        pulumi.provider_pb2.GetSchemaResponse,
    ]
    """GetSchema fetches the schema for this resource provider."""
    CheckConfig: grpc.UnaryUnaryMultiCallable[
        pulumi.provider_pb2.CheckRequest,
        pulumi.provider_pb2.CheckResponse,
    ]
    """`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.
    """
    DiffConfig: grpc.UnaryUnaryMultiCallable[
        pulumi.provider_pb2.DiffRequest,
        pulumi.provider_pb2.DiffResponse,
    ]
    """`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.
    """
    Configure: grpc.UnaryUnaryMultiCallable[
        pulumi.provider_pb2.ConfigureRequest,
        pulumi.provider_pb2.ConfigureResponse,
    ]
    """`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.
    """
    Invoke: grpc.UnaryUnaryMultiCallable[
        pulumi.provider_pb2.InvokeRequest,
        pulumi.provider_pb2.InvokeResponse,
    ]
    """Invoke dynamically executes a built-in function in the provider."""
    StreamInvoke: grpc.UnaryStreamMultiCallable[
        pulumi.provider_pb2.InvokeRequest,
        pulumi.provider_pb2.InvokeResponse,
    ]
    """StreamInvoke dynamically executes a built-in function in the provider, which returns a stream
    of responses.
    """
    Call: grpc.UnaryUnaryMultiCallable[
        pulumi.provider_pb2.CallRequest,
        pulumi.provider_pb2.CallResponse,
    ]
    """Call dynamically executes a method in the provider associated with a component resource."""
    Check: grpc.UnaryUnaryMultiCallable[
        pulumi.provider_pb2.CheckRequest,
        pulumi.provider_pb2.CheckResponse,
    ]
    """`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.
    """
    Diff: grpc.UnaryUnaryMultiCallable[
        pulumi.provider_pb2.DiffRequest,
        pulumi.provider_pb2.DiffResponse,
    ]
    """`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.
    """
    Create: grpc.UnaryUnaryMultiCallable[
        pulumi.provider_pb2.CreateRequest,
        pulumi.provider_pb2.CreateResponse,
    ]
    """`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).
    """
    Read: grpc.UnaryUnaryMultiCallable[
        pulumi.provider_pb2.ReadRequest,
        pulumi.provider_pb2.ReadResponse,
    ]
    """`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.
    """
    Update: grpc.UnaryUnaryMultiCallable[
        pulumi.provider_pb2.UpdateRequest,
        pulumi.provider_pb2.UpdateResponse,
    ]
    """`Update` updates an existing resource according to a new set of inputs, returning a new set of output properties."""
    Delete: grpc.UnaryUnaryMultiCallable[
        pulumi.provider_pb2.DeleteRequest,
        google.protobuf.empty_pb2.Empty,
    ]
    """`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.
    """
    Construct: grpc.UnaryUnaryMultiCallable[
        pulumi.provider_pb2.ConstructRequest,
        pulumi.provider_pb2.ConstructResponse,
    ]
    """`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.
    """
    Cancel: grpc.UnaryUnaryMultiCallable[
        google.protobuf.empty_pb2.Empty,
        google.protobuf.empty_pb2.Empty,
    ]
    """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.
    """
    GetPluginInfo: grpc.UnaryUnaryMultiCallable[
        google.protobuf.empty_pb2.Empty,
        pulumi.plugin_pb2.PluginInfo,
    ]
    """GetPluginInfo returns generic information about this plugin, like its version."""
    Attach: grpc.UnaryUnaryMultiCallable[
        pulumi.plugin_pb2.PluginAttach,
        google.protobuf.empty_pb2.Empty,
    ]
    """Attach sends the engine address to an already running plugin."""
    GetMapping: grpc.UnaryUnaryMultiCallable[
        pulumi.provider_pb2.GetMappingRequest,
        pulumi.provider_pb2.GetMappingResponse,
    ]
    """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.
    """
    GetMappings: grpc.UnaryUnaryMultiCallable[
        pulumi.provider_pb2.GetMappingsRequest,
        pulumi.provider_pb2.GetMappingsResponse,
    ]
    """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.
    """

class ResourceProviderServicer(metaclass=abc.ABCMeta):
    """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: pulumi.provider_pb2.ParameterizeRequest,
        context: grpc.ServicerContext,
    ) -> pulumi.provider_pb2.ParameterizeResponse:
        """`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).
        """
    
    def GetSchema(
        self,
        request: pulumi.provider_pb2.GetSchemaRequest,
        context: grpc.ServicerContext,
    ) -> pulumi.provider_pb2.GetSchemaResponse:
        """GetSchema fetches the schema for this resource provider."""
    
    def CheckConfig(
        self,
        request: pulumi.provider_pb2.CheckRequest,
        context: grpc.ServicerContext,
    ) -> pulumi.provider_pb2.CheckResponse:
        """`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.
        """
    
    def DiffConfig(
        self,
        request: pulumi.provider_pb2.DiffRequest,
        context: grpc.ServicerContext,
    ) -> pulumi.provider_pb2.DiffResponse:
        """`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.
        """
    
    def Configure(
        self,
        request: pulumi.provider_pb2.ConfigureRequest,
        context: grpc.ServicerContext,
    ) -> pulumi.provider_pb2.ConfigureResponse:
        """`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.
        """
    
    def Invoke(
        self,
        request: pulumi.provider_pb2.InvokeRequest,
        context: grpc.ServicerContext,
    ) -> pulumi.provider_pb2.InvokeResponse:
        """Invoke dynamically executes a built-in function in the provider."""
    
    def StreamInvoke(
        self,
        request: pulumi.provider_pb2.InvokeRequest,
        context: grpc.ServicerContext,
    ) -> collections.abc.Iterator[pulumi.provider_pb2.InvokeResponse]:
        """StreamInvoke dynamically executes a built-in function in the provider, which returns a stream
        of responses.
        """
    
    def Call(
        self,
        request: pulumi.provider_pb2.CallRequest,
        context: grpc.ServicerContext,
    ) -> pulumi.provider_pb2.CallResponse:
        """Call dynamically executes a method in the provider associated with a component resource."""
    
    def Check(
        self,
        request: pulumi.provider_pb2.CheckRequest,
        context: grpc.ServicerContext,
    ) -> pulumi.provider_pb2.CheckResponse:
        """`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.
        """
    
    def Diff(
        self,
        request: pulumi.provider_pb2.DiffRequest,
        context: grpc.ServicerContext,
    ) -> pulumi.provider_pb2.DiffResponse:
        """`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.
        """
    
    def Create(
        self,
        request: pulumi.provider_pb2.CreateRequest,
        context: grpc.ServicerContext,
    ) -> pulumi.provider_pb2.CreateResponse:
        """`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).
        """
    
    def Read(
        self,
        request: pulumi.provider_pb2.ReadRequest,
        context: grpc.ServicerContext,
    ) -> pulumi.provider_pb2.ReadResponse:
        """`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.
        """
    
    def Update(
        self,
        request: pulumi.provider_pb2.UpdateRequest,
        context: grpc.ServicerContext,
    ) -> pulumi.provider_pb2.UpdateResponse:
        """`Update` updates an existing resource according to a new set of inputs, returning a new set of output properties."""
    
    def Delete(
        self,
        request: pulumi.provider_pb2.DeleteRequest,
        context: grpc.ServicerContext,
    ) -> google.protobuf.empty_pb2.Empty:
        """`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.
        """
    
    def Construct(
        self,
        request: pulumi.provider_pb2.ConstructRequest,
        context: grpc.ServicerContext,
    ) -> pulumi.provider_pb2.ConstructResponse:
        """`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.
        """
    
    def Cancel(
        self,
        request: google.protobuf.empty_pb2.Empty,
        context: grpc.ServicerContext,
    ) -> google.protobuf.empty_pb2.Empty:
        """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.
        """
    
    def GetPluginInfo(
        self,
        request: google.protobuf.empty_pb2.Empty,
        context: grpc.ServicerContext,
    ) -> pulumi.plugin_pb2.PluginInfo:
        """GetPluginInfo returns generic information about this plugin, like its version."""
    
    def Attach(
        self,
        request: pulumi.plugin_pb2.PluginAttach,
        context: grpc.ServicerContext,
    ) -> google.protobuf.empty_pb2.Empty:
        """Attach sends the engine address to an already running plugin."""
    
    def GetMapping(
        self,
        request: pulumi.provider_pb2.GetMappingRequest,
        context: grpc.ServicerContext,
    ) -> pulumi.provider_pb2.GetMappingResponse:
        """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.
        """
    
    def GetMappings(
        self,
        request: pulumi.provider_pb2.GetMappingsRequest,
        context: grpc.ServicerContext,
    ) -> pulumi.provider_pb2.GetMappingsResponse:
        """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.
        """

def add_ResourceProviderServicer_to_server(servicer: ResourceProviderServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...
