pulumi/sdk/proto/go/resource.pb.go
Joe Duffy 479a2e6ad5
Add an ID property to ReadResponse (#1145)
The RPC provider interface needs a way to convey back to the engine
that a resource being read no longer exists.  To do this, we'll return
the ID property that was read back.  If it is empty, it means the
resource is gone.  If it is non-empty, we expect it to match the input.
2018-04-10 12:58:50 -07:00

451 lines
17 KiB
Go

// Code generated by protoc-gen-go.
// source: resource.proto
// DO NOT EDIT!
package pulumirpc
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import google_protobuf "github.com/golang/protobuf/ptypes/empty"
import google_protobuf1 "github.com/golang/protobuf/ptypes/struct"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// ReadResourceRequest contains enough information to uniquely qualify and read a resource's state.
type ReadResourceRequest struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Type string `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"`
Parent string `protobuf:"bytes,4,opt,name=parent" json:"parent,omitempty"`
Properties *google_protobuf1.Struct `protobuf:"bytes,5,opt,name=properties" json:"properties,omitempty"`
}
func (m *ReadResourceRequest) Reset() { *m = ReadResourceRequest{} }
func (m *ReadResourceRequest) String() string { return proto.CompactTextString(m) }
func (*ReadResourceRequest) ProtoMessage() {}
func (*ReadResourceRequest) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{0} }
func (m *ReadResourceRequest) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *ReadResourceRequest) GetType() string {
if m != nil {
return m.Type
}
return ""
}
func (m *ReadResourceRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *ReadResourceRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *ReadResourceRequest) GetProperties() *google_protobuf1.Struct {
if m != nil {
return m.Properties
}
return nil
}
// ReadResourceResponse contains the result of reading a resource's state.
type ReadResourceResponse struct {
Urn string `protobuf:"bytes,1,opt,name=urn" json:"urn,omitempty"`
Properties *google_protobuf1.Struct `protobuf:"bytes,2,opt,name=properties" json:"properties,omitempty"`
}
func (m *ReadResourceResponse) Reset() { *m = ReadResourceResponse{} }
func (m *ReadResourceResponse) String() string { return proto.CompactTextString(m) }
func (*ReadResourceResponse) ProtoMessage() {}
func (*ReadResourceResponse) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{1} }
func (m *ReadResourceResponse) GetUrn() string {
if m != nil {
return m.Urn
}
return ""
}
func (m *ReadResourceResponse) GetProperties() *google_protobuf1.Struct {
if m != nil {
return m.Properties
}
return nil
}
// RegisterResourceRequest contains information about a resource object that was newly allocated.
type RegisterResourceRequest struct {
Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
Parent string `protobuf:"bytes,3,opt,name=parent" json:"parent,omitempty"`
Custom bool `protobuf:"varint,4,opt,name=custom" json:"custom,omitempty"`
Object *google_protobuf1.Struct `protobuf:"bytes,5,opt,name=object" json:"object,omitempty"`
Protect bool `protobuf:"varint,6,opt,name=protect" json:"protect,omitempty"`
Dependencies []string `protobuf:"bytes,7,rep,name=dependencies" json:"dependencies,omitempty"`
}
func (m *RegisterResourceRequest) Reset() { *m = RegisterResourceRequest{} }
func (m *RegisterResourceRequest) String() string { return proto.CompactTextString(m) }
func (*RegisterResourceRequest) ProtoMessage() {}
func (*RegisterResourceRequest) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{2} }
func (m *RegisterResourceRequest) GetType() string {
if m != nil {
return m.Type
}
return ""
}
func (m *RegisterResourceRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *RegisterResourceRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *RegisterResourceRequest) GetCustom() bool {
if m != nil {
return m.Custom
}
return false
}
func (m *RegisterResourceRequest) GetObject() *google_protobuf1.Struct {
if m != nil {
return m.Object
}
return nil
}
func (m *RegisterResourceRequest) GetProtect() bool {
if m != nil {
return m.Protect
}
return false
}
func (m *RegisterResourceRequest) GetDependencies() []string {
if m != nil {
return m.Dependencies
}
return nil
}
// RegisterResourceResponse is returned by the engine after a resource has finished being initialized. It includes the
// auto-assigned URN, the provider-assigned ID, and any other properties initialized by the engine.
type RegisterResourceResponse struct {
Urn string `protobuf:"bytes,1,opt,name=urn" json:"urn,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"`
Object *google_protobuf1.Struct `protobuf:"bytes,3,opt,name=object" json:"object,omitempty"`
Stable bool `protobuf:"varint,4,opt,name=stable" json:"stable,omitempty"`
Stables []string `protobuf:"bytes,5,rep,name=stables" json:"stables,omitempty"`
}
func (m *RegisterResourceResponse) Reset() { *m = RegisterResourceResponse{} }
func (m *RegisterResourceResponse) String() string { return proto.CompactTextString(m) }
func (*RegisterResourceResponse) ProtoMessage() {}
func (*RegisterResourceResponse) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{3} }
func (m *RegisterResourceResponse) GetUrn() string {
if m != nil {
return m.Urn
}
return ""
}
func (m *RegisterResourceResponse) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *RegisterResourceResponse) GetObject() *google_protobuf1.Struct {
if m != nil {
return m.Object
}
return nil
}
func (m *RegisterResourceResponse) GetStable() bool {
if m != nil {
return m.Stable
}
return false
}
func (m *RegisterResourceResponse) GetStables() []string {
if m != nil {
return m.Stables
}
return nil
}
// RegisterResourceOutputsRequest adds extra resource outputs created by the program after registration has occurred.
type RegisterResourceOutputsRequest struct {
Urn string `protobuf:"bytes,1,opt,name=urn" json:"urn,omitempty"`
Outputs *google_protobuf1.Struct `protobuf:"bytes,2,opt,name=outputs" json:"outputs,omitempty"`
}
func (m *RegisterResourceOutputsRequest) Reset() { *m = RegisterResourceOutputsRequest{} }
func (m *RegisterResourceOutputsRequest) String() string { return proto.CompactTextString(m) }
func (*RegisterResourceOutputsRequest) ProtoMessage() {}
func (*RegisterResourceOutputsRequest) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{4} }
func (m *RegisterResourceOutputsRequest) GetUrn() string {
if m != nil {
return m.Urn
}
return ""
}
func (m *RegisterResourceOutputsRequest) GetOutputs() *google_protobuf1.Struct {
if m != nil {
return m.Outputs
}
return nil
}
func init() {
proto.RegisterType((*ReadResourceRequest)(nil), "pulumirpc.ReadResourceRequest")
proto.RegisterType((*ReadResourceResponse)(nil), "pulumirpc.ReadResourceResponse")
proto.RegisterType((*RegisterResourceRequest)(nil), "pulumirpc.RegisterResourceRequest")
proto.RegisterType((*RegisterResourceResponse)(nil), "pulumirpc.RegisterResourceResponse")
proto.RegisterType((*RegisterResourceOutputsRequest)(nil), "pulumirpc.RegisterResourceOutputsRequest")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for ResourceMonitor service
type ResourceMonitorClient interface {
Invoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (*InvokeResponse, error)
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) (*google_protobuf.Empty, error)
}
type resourceMonitorClient struct {
cc *grpc.ClientConn
}
func NewResourceMonitorClient(cc *grpc.ClientConn) ResourceMonitorClient {
return &resourceMonitorClient{cc}
}
func (c *resourceMonitorClient) Invoke(ctx context.Context, in *InvokeRequest, opts ...grpc.CallOption) (*InvokeResponse, error) {
out := new(InvokeResponse)
err := grpc.Invoke(ctx, "/pulumirpc.ResourceMonitor/Invoke", in, out, c.cc, 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 := grpc.Invoke(ctx, "/pulumirpc.ResourceMonitor/ReadResource", in, out, c.cc, 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 := grpc.Invoke(ctx, "/pulumirpc.ResourceMonitor/RegisterResource", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *resourceMonitorClient) RegisterResourceOutputs(ctx context.Context, in *RegisterResourceOutputsRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) {
out := new(google_protobuf.Empty)
err := grpc.Invoke(ctx, "/pulumirpc.ResourceMonitor/RegisterResourceOutputs", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for ResourceMonitor service
type ResourceMonitorServer interface {
Invoke(context.Context, *InvokeRequest) (*InvokeResponse, error)
ReadResource(context.Context, *ReadResourceRequest) (*ReadResourceResponse, error)
RegisterResource(context.Context, *RegisterResourceRequest) (*RegisterResourceResponse, error)
RegisterResourceOutputs(context.Context, *RegisterResourceOutputsRequest) (*google_protobuf.Empty, error)
}
func RegisterResourceMonitorServer(s *grpc.Server, srv ResourceMonitorServer) {
s.RegisterService(&_ResourceMonitor_serviceDesc, srv)
}
func _ResourceMonitor_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(InvokeRequest)
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.(*InvokeRequest))
}
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)
}
var _ResourceMonitor_serviceDesc = grpc.ServiceDesc{
ServiceName: "pulumirpc.ResourceMonitor",
HandlerType: (*ResourceMonitorServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Invoke",
Handler: _ResourceMonitor_Invoke_Handler,
},
{
MethodName: "ReadResource",
Handler: _ResourceMonitor_ReadResource_Handler,
},
{
MethodName: "RegisterResource",
Handler: _ResourceMonitor_RegisterResource_Handler,
},
{
MethodName: "RegisterResourceOutputs",
Handler: _ResourceMonitor_RegisterResourceOutputs_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "resource.proto",
}
func init() { proto.RegisterFile("resource.proto", fileDescriptor6) }
var fileDescriptor6 = []byte{
// 472 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x8c, 0x54, 0x3b, 0x8f, 0xd3, 0x40,
0x10, 0x3e, 0xdb, 0x87, 0x43, 0x86, 0x53, 0x38, 0x0d, 0x28, 0x67, 0x0c, 0x3a, 0x22, 0xd3, 0x84,
0xc6, 0x11, 0x47, 0x41, 0x49, 0x45, 0x41, 0x81, 0x10, 0xa6, 0x06, 0xc9, 0xb1, 0x87, 0xc8, 0x90,
0x78, 0x97, 0x7d, 0x9c, 0x74, 0x7f, 0x06, 0xfe, 0x1a, 0x05, 0x3f, 0x04, 0xad, 0xd7, 0x1b, 0xe2,
0xc7, 0x3d, 0xba, 0x79, 0x79, 0xe6, 0xfb, 0xbe, 0x99, 0x35, 0xcc, 0x04, 0x49, 0xa6, 0x45, 0x41,
0x29, 0x17, 0x4c, 0x31, 0x9c, 0x72, 0xbd, 0xd5, 0xbb, 0x4a, 0xf0, 0x22, 0x7e, 0xba, 0x61, 0x6c,
0xb3, 0xa5, 0x55, 0x93, 0x58, 0xeb, 0x6f, 0x2b, 0xda, 0x71, 0x75, 0x65, 0xeb, 0xe2, 0x67, 0xfd,
0xa4, 0x54, 0x42, 0x17, 0xaa, 0xcd, 0xce, 0xb8, 0x60, 0x97, 0x55, 0x49, 0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