2022-12-14 19:17:27 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.20.1
// source: pulumi/resource.proto
package pulumirpc
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
2024-01-24 17:15:30 +00:00
emptypb "google.golang.org/protobuf/types/known/emptypb"
2022-12-14 19:17:27 +00:00
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc . SupportPackageIsVersion7
// ResourceMonitorClient is the client API for ResourceMonitor service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type ResourceMonitorClient interface {
SupportsFeature ( ctx context . Context , in * SupportsFeatureRequest , opts ... grpc . CallOption ) ( * SupportsFeatureResponse , error )
Invoke ( ctx context . Context , in * ResourceInvokeRequest , opts ... grpc . CallOption ) ( * InvokeResponse , error )
StreamInvoke ( ctx context . Context , in * ResourceInvokeRequest , opts ... grpc . CallOption ) ( ResourceMonitor_StreamInvokeClient , error )
2024-02-08 13:16:23 +00:00
Call ( ctx context . Context , in * ResourceCallRequest , opts ... grpc . CallOption ) ( * CallResponse , error )
2022-12-14 19:17:27 +00:00
ReadResource ( ctx context . Context , in * ReadResourceRequest , opts ... grpc . CallOption ) ( * ReadResourceResponse , error )
RegisterResource ( ctx context . Context , in * RegisterResourceRequest , opts ... grpc . CallOption ) ( * RegisterResourceResponse , error )
RegisterResourceOutputs ( ctx context . Context , in * RegisterResourceOutputsRequest , opts ... grpc . CallOption ) ( * emptypb . Empty , error )
}
type resourceMonitorClient struct {
cc grpc . ClientConnInterface
}
func NewResourceMonitorClient ( cc grpc . ClientConnInterface ) ResourceMonitorClient {
return & resourceMonitorClient { cc }
}
func ( c * resourceMonitorClient ) SupportsFeature ( ctx context . Context , in * SupportsFeatureRequest , opts ... grpc . CallOption ) ( * SupportsFeatureResponse , error ) {
out := new ( SupportsFeatureResponse )
err := c . cc . Invoke ( ctx , "/pulumirpc.ResourceMonitor/SupportsFeature" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * resourceMonitorClient ) Invoke ( ctx context . Context , in * ResourceInvokeRequest , opts ... grpc . CallOption ) ( * InvokeResponse , error ) {
out := new ( InvokeResponse )
err := c . cc . Invoke ( ctx , "/pulumirpc.ResourceMonitor/Invoke" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * resourceMonitorClient ) StreamInvoke ( ctx context . Context , in * ResourceInvokeRequest , opts ... grpc . CallOption ) ( ResourceMonitor_StreamInvokeClient , error ) {
stream , err := c . cc . NewStream ( ctx , & ResourceMonitor_ServiceDesc . Streams [ 0 ] , "/pulumirpc.ResourceMonitor/StreamInvoke" , opts ... )
if err != nil {
return nil , err
}
x := & resourceMonitorStreamInvokeClient { stream }
if err := x . ClientStream . SendMsg ( in ) ; err != nil {
return nil , err
}
if err := x . ClientStream . CloseSend ( ) ; err != nil {
return nil , err
}
return x , nil
}
type ResourceMonitor_StreamInvokeClient interface {
Recv ( ) ( * InvokeResponse , error )
grpc . ClientStream
}
type resourceMonitorStreamInvokeClient struct {
grpc . ClientStream
}
func ( x * resourceMonitorStreamInvokeClient ) Recv ( ) ( * InvokeResponse , error ) {
m := new ( InvokeResponse )
if err := x . ClientStream . RecvMsg ( m ) ; err != nil {
return nil , err
}
return m , nil
}
2024-02-08 13:16:23 +00:00
func ( c * resourceMonitorClient ) Call ( ctx context . Context , in * ResourceCallRequest , opts ... grpc . CallOption ) ( * CallResponse , error ) {
2022-12-14 19:17:27 +00:00
out := new ( CallResponse )
err := c . cc . Invoke ( ctx , "/pulumirpc.ResourceMonitor/Call" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * resourceMonitorClient ) ReadResource ( ctx context . Context , in * ReadResourceRequest , opts ... grpc . CallOption ) ( * ReadResourceResponse , error ) {
out := new ( ReadResourceResponse )
err := c . cc . Invoke ( ctx , "/pulumirpc.ResourceMonitor/ReadResource" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * resourceMonitorClient ) RegisterResource ( ctx context . Context , in * RegisterResourceRequest , opts ... grpc . CallOption ) ( * RegisterResourceResponse , error ) {
out := new ( RegisterResourceResponse )
err := c . cc . Invoke ( ctx , "/pulumirpc.ResourceMonitor/RegisterResource" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * resourceMonitorClient ) RegisterResourceOutputs ( ctx context . Context , in * RegisterResourceOutputsRequest , opts ... grpc . CallOption ) ( * emptypb . Empty , error ) {
out := new ( emptypb . Empty )
err := c . cc . Invoke ( ctx , "/pulumirpc.ResourceMonitor/RegisterResourceOutputs" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
// ResourceMonitorServer is the server API for ResourceMonitor service.
// All implementations must embed UnimplementedResourceMonitorServer
// for forward compatibility
type ResourceMonitorServer interface {
SupportsFeature ( context . Context , * SupportsFeatureRequest ) ( * SupportsFeatureResponse , error )
Invoke ( context . Context , * ResourceInvokeRequest ) ( * InvokeResponse , error )
StreamInvoke ( * ResourceInvokeRequest , ResourceMonitor_StreamInvokeServer ) error
2024-02-08 13:16:23 +00:00
Call ( context . Context , * ResourceCallRequest ) ( * CallResponse , error )
2022-12-14 19:17:27 +00:00
ReadResource ( context . Context , * ReadResourceRequest ) ( * ReadResourceResponse , error )
RegisterResource ( context . Context , * RegisterResourceRequest ) ( * RegisterResourceResponse , error )
RegisterResourceOutputs ( context . Context , * RegisterResourceOutputsRequest ) ( * emptypb . Empty , error )
mustEmbedUnimplementedResourceMonitorServer ( )
}
// UnimplementedResourceMonitorServer must be embedded to have forward compatible implementations.
2023-03-04 22:11:52 +00:00
type UnimplementedResourceMonitorServer struct {
}
2022-12-14 19:17:27 +00:00
func ( UnimplementedResourceMonitorServer ) SupportsFeature ( context . Context , * SupportsFeatureRequest ) ( * SupportsFeatureResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method SupportsFeature not implemented" )
}
func ( UnimplementedResourceMonitorServer ) Invoke ( context . Context , * ResourceInvokeRequest ) ( * InvokeResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Invoke not implemented" )
}
func ( UnimplementedResourceMonitorServer ) StreamInvoke ( * ResourceInvokeRequest , ResourceMonitor_StreamInvokeServer ) error {
return status . Errorf ( codes . Unimplemented , "method StreamInvoke not implemented" )
}
2024-02-08 13:16:23 +00:00
func ( UnimplementedResourceMonitorServer ) Call ( context . Context , * ResourceCallRequest ) ( * CallResponse , error ) {
2022-12-14 19:17:27 +00:00
return nil , status . Errorf ( codes . Unimplemented , "method Call not implemented" )
}
func ( UnimplementedResourceMonitorServer ) ReadResource ( context . Context , * ReadResourceRequest ) ( * ReadResourceResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method ReadResource not implemented" )
}
func ( UnimplementedResourceMonitorServer ) RegisterResource ( context . Context , * RegisterResourceRequest ) ( * RegisterResourceResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method RegisterResource not implemented" )
}
func ( UnimplementedResourceMonitorServer ) RegisterResourceOutputs ( context . Context , * RegisterResourceOutputsRequest ) ( * emptypb . Empty , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method RegisterResourceOutputs not implemented" )
}
func ( UnimplementedResourceMonitorServer ) mustEmbedUnimplementedResourceMonitorServer ( ) { }
// UnsafeResourceMonitorServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ResourceMonitorServer will
// result in compilation errors.
type UnsafeResourceMonitorServer interface {
mustEmbedUnimplementedResourceMonitorServer ( )
}
func RegisterResourceMonitorServer ( s grpc . ServiceRegistrar , srv ResourceMonitorServer ) {
s . RegisterService ( & ResourceMonitor_ServiceDesc , srv )
}
func _ResourceMonitor_SupportsFeature_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( SupportsFeatureRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ResourceMonitorServer ) . SupportsFeature ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/pulumirpc.ResourceMonitor/SupportsFeature" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ResourceMonitorServer ) . SupportsFeature ( ctx , req . ( * SupportsFeatureRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _ResourceMonitor_Invoke_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ResourceInvokeRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ResourceMonitorServer ) . Invoke ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/pulumirpc.ResourceMonitor/Invoke" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ResourceMonitorServer ) . Invoke ( ctx , req . ( * ResourceInvokeRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _ResourceMonitor_StreamInvoke_Handler ( srv interface { } , stream grpc . ServerStream ) error {
m := new ( ResourceInvokeRequest )
if err := stream . RecvMsg ( m ) ; err != nil {
return err
}
return srv . ( ResourceMonitorServer ) . StreamInvoke ( m , & resourceMonitorStreamInvokeServer { stream } )
}
type ResourceMonitor_StreamInvokeServer interface {
Send ( * InvokeResponse ) error
grpc . ServerStream
}
type resourceMonitorStreamInvokeServer struct {
grpc . ServerStream
}
func ( x * resourceMonitorStreamInvokeServer ) Send ( m * InvokeResponse ) error {
return x . ServerStream . SendMsg ( m )
}
func _ResourceMonitor_Call_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2024-02-08 13:16:23 +00:00
in := new ( ResourceCallRequest )
2022-12-14 19:17:27 +00:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ResourceMonitorServer ) . Call ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/pulumirpc.ResourceMonitor/Call" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2024-02-08 13:16:23 +00:00
return srv . ( ResourceMonitorServer ) . Call ( ctx , req . ( * ResourceCallRequest ) )
2022-12-14 19:17:27 +00:00
}
return interceptor ( ctx , in , info , handler )
}
func _ResourceMonitor_ReadResource_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ReadResourceRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ResourceMonitorServer ) . ReadResource ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/pulumirpc.ResourceMonitor/ReadResource" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ResourceMonitorServer ) . ReadResource ( ctx , req . ( * ReadResourceRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _ResourceMonitor_RegisterResource_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( RegisterResourceRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ResourceMonitorServer ) . RegisterResource ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/pulumirpc.ResourceMonitor/RegisterResource" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ResourceMonitorServer ) . RegisterResource ( ctx , req . ( * RegisterResourceRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
func _ResourceMonitor_RegisterResourceOutputs_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( RegisterResourceOutputsRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ResourceMonitorServer ) . RegisterResourceOutputs ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/pulumirpc.ResourceMonitor/RegisterResourceOutputs" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ResourceMonitorServer ) . RegisterResourceOutputs ( ctx , req . ( * RegisterResourceOutputsRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
// ResourceMonitor_ServiceDesc is the grpc.ServiceDesc for ResourceMonitor service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ResourceMonitor_ServiceDesc = grpc . ServiceDesc {
ServiceName : "pulumirpc.ResourceMonitor" ,
HandlerType : ( * ResourceMonitorServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "SupportsFeature" ,
Handler : _ResourceMonitor_SupportsFeature_Handler ,
} ,
{
MethodName : "Invoke" ,
Handler : _ResourceMonitor_Invoke_Handler ,
} ,
{
MethodName : "Call" ,
Handler : _ResourceMonitor_Call_Handler ,
} ,
{
MethodName : "ReadResource" ,
Handler : _ResourceMonitor_ReadResource_Handler ,
} ,
{
MethodName : "RegisterResource" ,
Handler : _ResourceMonitor_RegisterResource_Handler ,
} ,
{
MethodName : "RegisterResourceOutputs" ,
Handler : _ResourceMonitor_RegisterResourceOutputs_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc {
{
StreamName : "StreamInvoke" ,
Handler : _ResourceMonitor_StreamInvoke_Handler ,
ServerStreams : true ,
} ,
} ,
Metadata : "pulumi/resource.proto" ,
}