pulumi/sdk/proto/go/analyzer.pb.go
Luke Hoban 15e924b5cf
Support aliases for renaming, re-typing, or re-parenting resources (#2774)
Adds a new resource option `aliases` which can be used to rename a resource.  When making a breaking change to the name or type of a resource or component, the old name can be added to the list of `aliases` for a resource to ensure that existing resources will be migrated to the new name instead of being deleted and replaced with the new named resource.

There are two key places this change is implemented. 

The first is the step generator in the engine.  When computing whether there is an old version of a registered resource, we now take into account the aliases specified on the registered resource.  That is, we first look up the resource by its new URN in the old state, and then by any aliases provided (in order).  This can allow the resource to be matched as a (potential) update to an existing resource with a different URN.

The second is the core `Resource` constructor in the JavaScript (and soon Python) SDKs.  This change ensures that when a parent resource is aliased, that all children implicitly inherit corresponding aliases.  It is similar to how many other resource options are "inherited" implicitly from the parent.

Four specific scenarios are explicitly tested as part of this PR:
1. Renaming a resource
2. Adopting a resource into a component (as the owner of both component and consumption codebases)
3. Renaming a component instance (as the owner of the consumption codebase without changes to the component)
4. Changing the type of a component (as the owner of the component codebase without changes to the consumption codebase)
4. Combining (1) and (3) to make both changes to a resource at the same time
2019-05-31 23:01:01 -07:00

296 lines
11 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// source: analyzer.proto
package pulumirpc
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import empty "github.com/golang/protobuf/ptypes/empty"
import _struct "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
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type AnalyzeRequest struct {
Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"`
Properties *_struct.Struct `protobuf:"bytes,2,opt,name=properties" json:"properties,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AnalyzeRequest) Reset() { *m = AnalyzeRequest{} }
func (m *AnalyzeRequest) String() string { return proto.CompactTextString(m) }
func (*AnalyzeRequest) ProtoMessage() {}
func (*AnalyzeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_analyzer_4d94ca02b59f2385, []int{0}
}
func (m *AnalyzeRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AnalyzeRequest.Unmarshal(m, b)
}
func (m *AnalyzeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AnalyzeRequest.Marshal(b, m, deterministic)
}
func (dst *AnalyzeRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_AnalyzeRequest.Merge(dst, src)
}
func (m *AnalyzeRequest) XXX_Size() int {
return xxx_messageInfo_AnalyzeRequest.Size(m)
}
func (m *AnalyzeRequest) XXX_DiscardUnknown() {
xxx_messageInfo_AnalyzeRequest.DiscardUnknown(m)
}
var xxx_messageInfo_AnalyzeRequest proto.InternalMessageInfo
func (m *AnalyzeRequest) GetType() string {
if m != nil {
return m.Type
}
return ""
}
func (m *AnalyzeRequest) GetProperties() *_struct.Struct {
if m != nil {
return m.Properties
}
return nil
}
type AnalyzeResponse struct {
Failures []*AnalyzeFailure `protobuf:"bytes,1,rep,name=failures" json:"failures,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AnalyzeResponse) Reset() { *m = AnalyzeResponse{} }
func (m *AnalyzeResponse) String() string { return proto.CompactTextString(m) }
func (*AnalyzeResponse) ProtoMessage() {}
func (*AnalyzeResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_analyzer_4d94ca02b59f2385, []int{1}
}
func (m *AnalyzeResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AnalyzeResponse.Unmarshal(m, b)
}
func (m *AnalyzeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AnalyzeResponse.Marshal(b, m, deterministic)
}
func (dst *AnalyzeResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_AnalyzeResponse.Merge(dst, src)
}
func (m *AnalyzeResponse) XXX_Size() int {
return xxx_messageInfo_AnalyzeResponse.Size(m)
}
func (m *AnalyzeResponse) XXX_DiscardUnknown() {
xxx_messageInfo_AnalyzeResponse.DiscardUnknown(m)
}
var xxx_messageInfo_AnalyzeResponse proto.InternalMessageInfo
func (m *AnalyzeResponse) GetFailures() []*AnalyzeFailure {
if m != nil {
return m.Failures
}
return nil
}
type AnalyzeFailure struct {
Property string `protobuf:"bytes,1,opt,name=property" json:"property,omitempty"`
Reason string `protobuf:"bytes,2,opt,name=reason" json:"reason,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AnalyzeFailure) Reset() { *m = AnalyzeFailure{} }
func (m *AnalyzeFailure) String() string { return proto.CompactTextString(m) }
func (*AnalyzeFailure) ProtoMessage() {}
func (*AnalyzeFailure) Descriptor() ([]byte, []int) {
return fileDescriptor_analyzer_4d94ca02b59f2385, []int{2}
}
func (m *AnalyzeFailure) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AnalyzeFailure.Unmarshal(m, b)
}
func (m *AnalyzeFailure) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AnalyzeFailure.Marshal(b, m, deterministic)
}
func (dst *AnalyzeFailure) XXX_Merge(src proto.Message) {
xxx_messageInfo_AnalyzeFailure.Merge(dst, src)
}
func (m *AnalyzeFailure) XXX_Size() int {
return xxx_messageInfo_AnalyzeFailure.Size(m)
}
func (m *AnalyzeFailure) XXX_DiscardUnknown() {
xxx_messageInfo_AnalyzeFailure.DiscardUnknown(m)
}
var xxx_messageInfo_AnalyzeFailure proto.InternalMessageInfo
func (m *AnalyzeFailure) GetProperty() string {
if m != nil {
return m.Property
}
return ""
}
func (m *AnalyzeFailure) GetReason() string {
if m != nil {
return m.Reason
}
return ""
}
func init() {
proto.RegisterType((*AnalyzeRequest)(nil), "pulumirpc.AnalyzeRequest")
proto.RegisterType((*AnalyzeResponse)(nil), "pulumirpc.AnalyzeResponse")
proto.RegisterType((*AnalyzeFailure)(nil), "pulumirpc.AnalyzeFailure")
}
// 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 Analyzer service
type AnalyzerClient interface {
// Analyze analyzes a single resource object, and returns any errors that it finds.
Analyze(ctx context.Context, in *AnalyzeRequest, opts ...grpc.CallOption) (*AnalyzeResponse, error)
// GetPluginInfo returns generic information about this plugin, like its version.
GetPluginInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PluginInfo, error)
}
type analyzerClient struct {
cc *grpc.ClientConn
}
func NewAnalyzerClient(cc *grpc.ClientConn) AnalyzerClient {
return &analyzerClient{cc}
}
func (c *analyzerClient) Analyze(ctx context.Context, in *AnalyzeRequest, opts ...grpc.CallOption) (*AnalyzeResponse, error) {
out := new(AnalyzeResponse)
err := grpc.Invoke(ctx, "/pulumirpc.Analyzer/Analyze", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *analyzerClient) GetPluginInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PluginInfo, error) {
out := new(PluginInfo)
err := grpc.Invoke(ctx, "/pulumirpc.Analyzer/GetPluginInfo", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Analyzer service
type AnalyzerServer interface {
// Analyze analyzes a single resource object, and returns any errors that it finds.
Analyze(context.Context, *AnalyzeRequest) (*AnalyzeResponse, error)
// GetPluginInfo returns generic information about this plugin, like its version.
GetPluginInfo(context.Context, *empty.Empty) (*PluginInfo, error)
}
func RegisterAnalyzerServer(s *grpc.Server, srv AnalyzerServer) {
s.RegisterService(&_Analyzer_serviceDesc, srv)
}
func _Analyzer_Analyze_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AnalyzeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AnalyzerServer).Analyze(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pulumirpc.Analyzer/Analyze",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AnalyzerServer).Analyze(ctx, req.(*AnalyzeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Analyzer_GetPluginInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(empty.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AnalyzerServer).GetPluginInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pulumirpc.Analyzer/GetPluginInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AnalyzerServer).GetPluginInfo(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
var _Analyzer_serviceDesc = grpc.ServiceDesc{
ServiceName: "pulumirpc.Analyzer",
HandlerType: (*AnalyzerServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Analyze",
Handler: _Analyzer_Analyze_Handler,
},
{
MethodName: "GetPluginInfo",
Handler: _Analyzer_GetPluginInfo_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "analyzer.proto",
}
func init() { proto.RegisterFile("analyzer.proto", fileDescriptor_analyzer_4d94ca02b59f2385) }
var fileDescriptor_analyzer_4d94ca02b59f2385 = []byte{
// 285 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02,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