pulumi/sdk/proto/go/resource.pb.go
joeduffy 5dc4b0b75c Switch to parent pointers; display components nicely
This change switches from child lists to parent pointers, in the
way resource ancestries are represented.  This cleans up a fair bit
of the old parenting logic, including all notion of ambient parent
scopes (and will notably address pulumi/pulumi#435).

This lets us show a more parent/child display in the output when
doing planning and updating.  For instance, here is an update of
a lambda's text, which is logically part of a cloud timer:

    * cloud:timer:Timer: (same)
          [urn=urn:pulumi:malta::lm-cloud:☁️timer:Timer::lm-cts-malta-job-CleanSnapshots]
        * cloud:function:Function: (same)
              [urn=urn:pulumi:malta::lm-cloud:☁️function:Function::lm-cts-malta-job-CleanSnapshots]
            * aws:serverless:Function: (same)
                  [urn=urn:pulumi:malta::lm-cloud::aws:serverless:Function::lm-cts-malta-job-CleanSnapshots]
                ~ aws:lambda/function:Function: (modify)
                      [id=lm-cts-malta-job-CleanSnapshots-fee4f3bf41280741]
                      [urn=urn:pulumi:malta::lm-cloud::aws:lambda/function:Function::lm-cts-malta-job-CleanSnapshots]
                    - code            : archive(assets:2092f44) {
                        // etc etc etc

Note that we still get walls of text, but this will be actually
quite nice when combined with pulumi/pulumi#454.

I've also suppressed printing properties that didn't change during
updates when --detailed was not passed, and also suppressed empty
strings and zero-length arrays (since TF uses these as defaults in
many places and it just makes creation and deletion quite verbose).

Note that this is a far cry from everything we can possibly do
here as part of pulumi/pulumi#340 (and even pulumi/pulumi#417).
But it's a good start towards taming some of our output spew.
2017-11-20 09:07:53 -08:00

255 lines
8.8 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/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
// NewResourceRequest contains information about a resource object that was newly allocated.
type NewResourceRequest 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_protobuf.Struct `protobuf:"bytes,5,opt,name=object" json:"object,omitempty"`
}
func (m *NewResourceRequest) Reset() { *m = NewResourceRequest{} }
func (m *NewResourceRequest) String() string { return proto.CompactTextString(m) }
func (*NewResourceRequest) ProtoMessage() {}
func (*NewResourceRequest) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{0} }
func (m *NewResourceRequest) GetType() string {
if m != nil {
return m.Type
}
return ""
}
func (m *NewResourceRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *NewResourceRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *NewResourceRequest) GetCustom() bool {
if m != nil {
return m.Custom
}
return false
}
func (m *NewResourceRequest) GetObject() *google_protobuf.Struct {
if m != nil {
return m.Object
}
return nil
}
// NewResourceResponse reflects back the properties initialized during creation, if applicable.
type NewResourceResponse struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Urn string `protobuf:"bytes,2,opt,name=urn" json:"urn,omitempty"`
Object *google_protobuf.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 *NewResourceResponse) Reset() { *m = NewResourceResponse{} }
func (m *NewResourceResponse) String() string { return proto.CompactTextString(m) }
func (*NewResourceResponse) ProtoMessage() {}
func (*NewResourceResponse) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{1} }
func (m *NewResourceResponse) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *NewResourceResponse) GetUrn() string {
if m != nil {
return m.Urn
}
return ""
}
func (m *NewResourceResponse) GetObject() *google_protobuf.Struct {
if m != nil {
return m.Object
}
return nil
}
func (m *NewResourceResponse) GetStable() bool {
if m != nil {
return m.Stable
}
return false
}
func (m *NewResourceResponse) GetStables() []string {
if m != nil {
return m.Stables
}
return nil
}
func init() {
proto.RegisterType((*NewResourceRequest)(nil), "pulumirpc.NewResourceRequest")
proto.RegisterType((*NewResourceResponse)(nil), "pulumirpc.NewResourceResponse")
}
// 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)
NewResource(ctx context.Context, in *NewResourceRequest, opts ...grpc.CallOption) (*NewResourceResponse, 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) NewResource(ctx context.Context, in *NewResourceRequest, opts ...grpc.CallOption) (*NewResourceResponse, error) {
out := new(NewResourceResponse)
err := grpc.Invoke(ctx, "/pulumirpc.ResourceMonitor/NewResource", 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)
NewResource(context.Context, *NewResourceRequest) (*NewResourceResponse, 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_NewResource_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NewResourceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ResourceMonitorServer).NewResource(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pulumirpc.ResourceMonitor/NewResource",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ResourceMonitorServer).NewResource(ctx, req.(*NewResourceRequest))
}
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: "NewResource",
Handler: _ResourceMonitor_NewResource_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "resource.proto",
}
func init() { proto.RegisterFile("resource.proto", fileDescriptor4) }
var fileDescriptor4 = []byte{
// 314 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x8c, 0x91, 0x4f, 0x4e, 0xf3, 0x30,
0x10, 0xc5, 0x3f, 0x37, 0x6d, 0x3e, 0xea, 0x4a, 0x05, 0x0d, 0x12, 0x98, 0x08, 0x50, 0xd4, 0x55,
0x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