diff --git a/internal/host/plugin/client.go b/internal/host/plugin/client.go index 7c2d3271f..d063dbc1b 100644 --- a/internal/host/plugin/client.go +++ b/internal/host/plugin/client.go @@ -19,6 +19,10 @@ func NewWrappingPluginClient(s plgpb.HostPluginServiceServer) *WrappingPluginCli return &WrappingPluginClient{Server: s} } +func (tpc *WrappingPluginClient) NormalizeCatalogData(ctx context.Context, req *plgpb.NormalizeCatalogDataRequest, opts ...grpc.CallOption) (*plgpb.NormalizeCatalogDataResponse, error) { + return tpc.Server.NormalizeCatalogData(ctx, req) +} + func (tpc *WrappingPluginClient) OnCreateCatalog(ctx context.Context, req *plgpb.OnCreateCatalogRequest, opts ...grpc.CallOption) (*plgpb.OnCreateCatalogResponse, error) { return tpc.Server.OnCreateCatalog(ctx, req) } @@ -31,6 +35,10 @@ func (tpc *WrappingPluginClient) OnDeleteCatalog(ctx context.Context, req *plgpb return tpc.Server.OnDeleteCatalog(ctx, req) } +func (tpc *WrappingPluginClient) NormalizeSetData(ctx context.Context, req *plgpb.NormalizeSetDataRequest, opts ...grpc.CallOption) (*plgpb.NormalizeSetDataResponse, error) { + return tpc.Server.NormalizeSetData(ctx, req) +} + func (tpc *WrappingPluginClient) OnCreateSet(ctx context.Context, req *plgpb.OnCreateSetRequest, opts ...grpc.CallOption) (*plgpb.OnCreateSetResponse, error) { return tpc.Server.OnCreateSet(ctx, req) } diff --git a/internal/host/plugin/repository_host_catalog.go b/internal/host/plugin/repository_host_catalog.go index d591cf825..b8d97f393 100644 --- a/internal/host/plugin/repository_host_catalog.go +++ b/internal/host/plugin/repository_host_catalog.go @@ -14,6 +14,7 @@ import ( "github.com/hashicorp/boundary/internal/oplog" hostplugin "github.com/hashicorp/boundary/internal/plugin/host" "github.com/hashicorp/boundary/internal/scheduler" + "github.com/hashicorp/boundary/internal/util" pb "github.com/hashicorp/boundary/sdk/pbs/controller/api/resources/hostcatalogs" pbset "github.com/hashicorp/boundary/sdk/pbs/controller/api/resources/hostsets" plgpb "github.com/hashicorp/boundary/sdk/pbs/plugin" @@ -25,6 +26,38 @@ import ( "google.golang.org/protobuf/types/known/wrapperspb" ) +// normalizeCatalogAttributes allows a plugin to normalize attributes before +// they are saved +func normalizeCatalogAttributes(ctx context.Context, plgClient plgpb.HostPluginServiceClient, plgHc *pb.HostCatalog) error { + const op = "plugin.(Repository).normalizeCatalogAttributes" + switch { + case util.IsNil(plgClient): + return errors.New(ctx, errors.InvalidParameter, op, "plugin client is nil") + case plgHc == nil: + return errors.New(ctx, errors.InvalidParameter, op, "host catalog is nil") + case plgHc.GetAttributes() == nil: + return nil + } + + ret, err := plgClient.NormalizeCatalogData(ctx, &plgpb.NormalizeCatalogDataRequest{ + Attributes: plgHc.GetAttributes(), + }) + switch { + case err == nil: + if ret.Attributes != nil { + plgHc.Attrs = &pb.HostCatalog_Attributes{ + Attributes: ret.Attributes, + } + } + case status.Code(err) == codes.Unimplemented: + // Do nothing + default: + return errors.Wrap(ctx, err, op, errors.WithMsg("error asking plugin to normalize catalog data")) + } + + return nil +} + // CreateCatalog inserts c into the repository and returns a new // HostCatalog containing the catalog's PublicId. c must contain a valid // ScopeID and PluginID. c must not contain a PublicId. The PublicId is @@ -90,6 +123,12 @@ func (r *Repository) CreateCatalog(ctx context.Context, c *HostCatalog, _ ...Opt return nil, nil, errors.New(ctx, errors.InvalidParameter, op, fmt.Sprintf("plugin %q not available", c.GetPluginId())) } + if plgHc.GetAttributes() != nil { + if err := normalizeCatalogAttributes(ctx, plgClient, plgHc); err != nil { + return nil, nil, errors.Wrap(ctx, err, op) + } + } + oplogWrapper, err := r.kms.GetWrapper(ctx, c.ScopeId, kms.KeyPurposeOplog) if err != nil { return nil, nil, errors.Wrap(ctx, err, op, errors.WithMsg("unable to get oplog wrapper")) @@ -321,6 +360,17 @@ func (r *Repository) UpdateCatalog(ctx context.Context, c *HostCatalog, version return nil, nil, db.NoRowsAffected, errors.Wrap(ctx, err, op) } + if updateAttributes { + if newPlgHc.GetAttributes() != nil { + if err := normalizeCatalogAttributes(ctx, plgClient, newPlgHc); err != nil { + return nil, nil, db.NoRowsAffected, errors.Wrap(ctx, err, op) + } + if newCatalog.Attributes, err = proto.Marshal(newPlgHc.GetAttributes()); err != nil { + return nil, nil, db.NoRowsAffected, errors.Wrap(ctx, err, op) + } + } + } + dbWrapper, err := r.kms.GetWrapper(ctx, newCatalog.ScopeId, kms.KeyPurposeDatabase) if err != nil { return nil, nil, db.NoRowsAffected, errors.Wrap(ctx, err, op, errors.WithMsg("unable to get db wrapper")) diff --git a/internal/host/plugin/repository_host_catalog_test.go b/internal/host/plugin/repository_host_catalog_test.go index e1b58e167..5c69e9b39 100644 --- a/internal/host/plugin/repository_host_catalog_test.go +++ b/internal/host/plugin/repository_host_catalog_test.go @@ -14,12 +14,14 @@ import ( "github.com/hashicorp/boundary/internal/host/plugin/store" "github.com/hashicorp/boundary/internal/iam" "github.com/hashicorp/boundary/internal/kms" + "github.com/hashicorp/boundary/internal/libs/patchstruct" "github.com/hashicorp/boundary/internal/oplog" hostplg "github.com/hashicorp/boundary/internal/plugin/host" hostplugin "github.com/hashicorp/boundary/internal/plugin/host" "github.com/hashicorp/boundary/internal/scheduler" "github.com/hashicorp/boundary/internal/scheduler/job" plgpb "github.com/hashicorp/boundary/sdk/pbs/plugin" + "github.com/mitchellh/mapstructure" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" @@ -38,6 +40,8 @@ func TestRepository_CreateCatalog(t *testing.T) { plg := hostplg.TestPlugin(t, conn, "test") unimplementedPlugin := hostplg.TestPlugin(t, conn, "unimplemented") + const normalizeToSliceKey = "normalize_to_slice" + tests := []struct { name string in *HostCatalog @@ -181,8 +185,9 @@ func TestRepository_CreateCatalog(t *testing.T) { PluginId: plg.GetPublicId(), Attributes: func() []byte { st, err := structpb.NewStruct(map[string]interface{}{ - "k1": "foo", - "nilkey": nil, + "k1": "foo", + "nilkey": nil, + normalizeToSliceKey: "normalizeme", }) require.NoError(t, err) b, err := proto.Marshal(st) @@ -249,16 +254,38 @@ func TestRepository_CreateCatalog(t *testing.T) { for _, tt := range tests { tt := tt t.Run(tt.name, func(t *testing.T) { - assert := assert.New(t) + require, assert := require.New(t), assert.New(t) kmsCache := kms.TestKms(t, conn, wrapper) // gotPluginAttrs tracks which attributes a plugin has received through a closure and can be compared in the // test against the expected values sent to the plugin. - var gotPluginAttrs *structpb.Struct + var origPluginAttrs, gotPluginAttrs *structpb.Struct + if tt.in != nil && tt.in.HostCatalog != nil && len(tt.in.Attributes) > 0 { + origPluginAttrs = new(structpb.Struct) + require.NoError(proto.Unmarshal(tt.in.Attributes, origPluginAttrs)) + } + var pluginCalled bool plgm := map[string]plgpb.HostPluginServiceClient{ plg.GetPublicId(): &WrappingPluginClient{ Server: &TestPluginServer{ + NormalizeCatalogDataFn: func(_ context.Context, req *plgpb.NormalizeCatalogDataRequest) (*plgpb.NormalizeCatalogDataResponse, error) { + if req.Attributes == nil { + return new(plgpb.NormalizeCatalogDataResponse), nil + } + var attrs struct { + NormalizeToSlice string `mapstructure:"normalize_to_slice"` + } + require.NoError(mapstructure.Decode(req.Attributes.AsMap(), &attrs)) + if attrs.NormalizeToSlice == "" { + return new(plgpb.NormalizeCatalogDataResponse), nil + } + retAttrs := proto.Clone(req.Attributes).(*structpb.Struct) + retAttrs.Fields[normalizeToSliceKey] = structpb.NewListValue(&structpb.ListValue{ + Values: []*structpb.Value{structpb.NewStringValue(attrs.NormalizeToSlice)}, + }) + return &plgpb.NormalizeCatalogDataResponse{Attributes: retAttrs}, nil + }, OnCreateCatalogFn: func(_ context.Context, req *plgpb.OnCreateCatalogRequest) (*plgpb.OnCreateCatalogResponse, error) { pluginCalled = true gotPluginAttrs = req.GetCatalog().GetAttributes() @@ -284,7 +311,7 @@ func TestRepository_CreateCatalog(t *testing.T) { assert.Nil(got) return } - require.NoError(t, err) + require.NoError(err) assert.Empty(tt.in.PublicId) assert.NotNil(got) assertPluginBasedPublicId(t, HostCatalogPrefix, got.PublicId) @@ -293,11 +320,25 @@ func TestRepository_CreateCatalog(t *testing.T) { assert.Equal(tt.want.Description, got.Description) assert.Equal(got.CreateTime, got.UpdateTime) - // wantedPluginAttributes := &structpb.Struct{} - // require.NoError(t, proto.Unmarshal(tt.want.GetAttributes(), wantedPluginAttributes)) - gotB, err := proto.Marshal(gotPluginAttrs) - require.NoError(t, err) - assert.Equal(tt.want.GetAttributes(), gotB) + if origPluginAttrs != nil { + if normalizeVal := origPluginAttrs.Fields[normalizeToSliceKey]; normalizeVal != nil { + gotVal := gotPluginAttrs.Fields[normalizeToSliceKey] + require.NotNil(gotVal) + listVal := gotVal.GetListValue() + require.NotNil(listVal) + require.Len(listVal.Values, 1) + assert.Equal(normalizeVal.GetStringValue(), listVal.Values[0].GetStringValue()) + origPluginAttrs.Fields[normalizeToSliceKey] = structpb.NewListValue(listVal) + tt.want.Attributes, err = proto.Marshal(origPluginAttrs) + require.NoError(err) + tt.want.Attributes, err = patchstruct.PatchBytes([]byte{}, tt.want.Attributes) + require.NoError(err) + } + } + + wantedPluginAttributes := &structpb.Struct{} + require.NoError(proto.Unmarshal(tt.want.GetAttributes(), wantedPluginAttributes)) + assert.Empty(cmp.Diff(wantedPluginAttributes, gotPluginAttrs, protocmp.Transform())) assert.NoError(db.TestVerifyOplog(t, rw, got.PublicId, db.WithOperation(oplog.OpType_OP_TYPE_CREATE), db.WithCreateNotBefore(10*time.Second))) @@ -305,20 +346,20 @@ func TestRepository_CreateCatalog(t *testing.T) { err = rw.LookupWhere(ctx, &cSecret, "catalog_id=?", []interface{}{got.GetPublicId()}) if tt.wantSecret == nil { assert.Nil(got.Secrets) - require.Error(t, err) - require.True(t, errors.IsNotFoundError(err)) + require.Error(err) + require.True(errors.IsNotFoundError(err)) return } - require.NoError(t, err) - require.Empty(t, cSecret.Secret) - require.NotEmpty(t, cSecret.CtSecret) + require.NoError(err) + require.Empty(cSecret.Secret) + require.NotEmpty(cSecret.CtSecret) dbWrapper, err := kmsCache.GetWrapper(ctx, got.GetScopeId(), kms.KeyPurposeDatabase) - require.NoError(t, err) - require.NoError(t, cSecret.decrypt(ctx, dbWrapper)) + require.NoError(err) + require.NoError(cSecret.decrypt(ctx, dbWrapper)) st := &structpb.Struct{} - require.NoError(t, proto.Unmarshal(cSecret.Secret, st)) + require.NoError(proto.Unmarshal(cSecret.Secret, st)) assert.Empty(cmp.Diff(tt.wantSecret, st, protocmp.Transform())) }) } @@ -431,6 +472,15 @@ func TestRepository_UpdateCatalog(t *testing.T) { _, projectScope := iam.TestScopes(t, iam.TestRepo(t, dbConn, dbWrapper)) _, projectScopeAlt := iam.TestScopes(t, iam.TestRepo(t, dbConn, dbWrapper)) + // Set up two existing catalogs for duplicate tests, one in the + // same scope that we are working in mostly, and another in a + // different one. Both are project scopes. + const ( + testDuplicateCatalogNameProjectScope = "duplicate-catalog-name-project-scope" + testDuplicateCatalogNameAltScope = "duplicate-catalog-name-alt-scope" + normalizeToSliceKey = "normalize_to_slice" + ) + // Define a plugin "manager", basically just a map with a mock // plugin in it. This also includes functionality to capture the // state, and set an error and the returned secrets to nil. Note @@ -444,6 +494,23 @@ func TestRepository_UpdateCatalog(t *testing.T) { testPluginMap := map[string]plgpb.HostPluginServiceClient{ testPlugin.GetPublicId(): &WrappingPluginClient{ Server: &TestPluginServer{ + NormalizeCatalogDataFn: func(_ context.Context, req *plgpb.NormalizeCatalogDataRequest) (*plgpb.NormalizeCatalogDataResponse, error) { + if req.Attributes == nil { + return new(plgpb.NormalizeCatalogDataResponse), nil + } + var attrs struct { + NormalizeToSlice string `mapstructure:"normalize_to_slice"` + } + require.NoError(t, mapstructure.Decode(req.Attributes.AsMap(), &attrs)) + if attrs.NormalizeToSlice == "" { + return new(plgpb.NormalizeCatalogDataResponse), nil + } + retAttrs := proto.Clone(req.Attributes).(*structpb.Struct) + retAttrs.Fields[normalizeToSliceKey] = structpb.NewListValue(&structpb.ListValue{ + Values: []*structpb.Value{structpb.NewStringValue(attrs.NormalizeToSlice)}, + }) + return &plgpb.NormalizeCatalogDataResponse{Attributes: retAttrs}, nil + }, OnUpdateCatalogFn: func(_ context.Context, req *plgpb.OnUpdateCatalogRequest) (*plgpb.OnUpdateCatalogResponse, error) { gotOnUpdateCatalogRequest = req respSecrets := req.GetNewCatalog().GetSecrets() @@ -458,14 +525,6 @@ func TestRepository_UpdateCatalog(t *testing.T) { }, } - // Set up two existing catalogs for duplicate tests, one in the - // same scope that we are working in mostly, and another in a - // different one. Both are project scopes. - const ( - testDuplicateCatalogNameProjectScope = "duplicate-catalog-name-project-scope" - testDuplicateCatalogNameAltScope = "duplicate-catalog-name-alt-scope" - ) - // Project scope existingProjectScopeCatalog := TestCatalog(t, dbConn, projectScope.PublicId, testPlugin.GetPublicId()) existingProjectScopeCatalog.Name = testDuplicateCatalogNameProjectScope @@ -597,6 +656,7 @@ func TestRepository_UpdateCatalog(t *testing.T) { require := require.New(t) st := &structpb.Struct{} require.NoError(proto.Unmarshal(gotCatalog.Attributes, st)) + assert.Equal(want, st.AsMap()) assert.Empty(cmp.Diff(mustStruct(want), st, protocmp.Transform())) } } @@ -932,7 +992,8 @@ func TestRepository_UpdateCatalog(t *testing.T) { { name: "update attributes (overwrite)", changeFuncs: []changeHostCatalogFunc{changeAttributes(map[string]interface{}{ - "foo": "baz", + "foo": "baz", + normalizeToSliceKey: "normalizeme", })}, version: 2, fieldMask: []string{"attributes"}, @@ -943,10 +1004,12 @@ func TestRepository_UpdateCatalog(t *testing.T) { "foo": "bar", }), checkUpdateCatalogRequestNewAttributes(map[string]interface{}{ - "foo": "baz", + "foo": "baz", + normalizeToSliceKey: []any{"normalizeme"}, }), checkAttributes(map[string]interface{}{ - "foo": "baz", + "foo": "baz", + normalizeToSliceKey: []any{"normalizeme"}, }), checkSecrets(map[string]interface{}{ "one": "two", diff --git a/internal/host/plugin/repository_host_set.go b/internal/host/plugin/repository_host_set.go index aa21622a3..2a7eaeda4 100644 --- a/internal/host/plugin/repository_host_set.go +++ b/internal/host/plugin/repository_host_set.go @@ -16,6 +16,7 @@ import ( "github.com/hashicorp/boundary/internal/oplog" hostplugin "github.com/hashicorp/boundary/internal/plugin/host" "github.com/hashicorp/boundary/internal/scheduler" + "github.com/hashicorp/boundary/internal/util" pb "github.com/hashicorp/boundary/sdk/pbs/controller/api/resources/hostsets" plgpb "github.com/hashicorp/boundary/sdk/pbs/plugin" "google.golang.org/grpc/codes" @@ -25,6 +26,38 @@ import ( "google.golang.org/protobuf/types/known/wrapperspb" ) +// normalizeCatalogAttributes allows a plugin to normalize set attributes before +// they are saved +func normalizeSetAttributes(ctx context.Context, plgClient plgpb.HostPluginServiceClient, plgHs *pb.HostSet) error { + const op = "plugin.(Repository).normalizeSetAttributes" + switch { + case util.IsNil(plgClient): + return errors.New(ctx, errors.InvalidParameter, op, "plugin client is nil") + case plgHs == nil: + return errors.New(ctx, errors.InvalidParameter, op, "host set is nil") + case plgHs.GetAttributes() == nil: + return nil + } + + ret, err := plgClient.NormalizeSetData(ctx, &plgpb.NormalizeSetDataRequest{ + Attributes: plgHs.GetAttributes(), + }) + switch { + case err == nil: + if ret.Attributes != nil { + plgHs.Attrs = &pb.HostSet_Attributes{ + Attributes: ret.Attributes, + } + } + case status.Code(err) == codes.Unimplemented: + // Do nothing + default: + return errors.Wrap(ctx, err, op, errors.WithMsg("error asking plugin to normalize set data")) + } + + return nil +} + // CreateSet inserts s into the repository and returns a new HostSet // containing the host set's PublicId. s is not changed. s must contain a // valid CatalogId. s must not contain a PublicId. The PublicId is @@ -92,6 +125,12 @@ func (r *Repository) CreateSet(ctx context.Context, scopeId string, s *HostSet, return nil, nil, errors.Wrap(ctx, err, op) } + if plgHs.GetAttributes() != nil { + if err := normalizeSetAttributes(ctx, plgClient, plgHs); err != nil { + return nil, nil, errors.Wrap(ctx, err, op) + } + } + var preferredEndpoints []interface{} if s.PreferredEndpoints != nil { preferredEndpoints = make([]interface{}, 0, len(s.PreferredEndpoints)) @@ -334,6 +373,17 @@ func (r *Repository) UpdateSet(ctx context.Context, scopeId string, s *HostSet, return nil, nil, nil, db.NoRowsAffected, errors.Wrap(ctx, err, op) } + if updateAttributes { + if newPlgSet.GetAttributes() != nil { + if err := normalizeSetAttributes(ctx, plgClient, newPlgSet); err != nil { + return nil, nil, nil, db.NoRowsAffected, errors.Wrap(ctx, err, op) + } + if newSet.Attributes, err = proto.Marshal(newPlgSet.GetAttributes()); err != nil { + return nil, nil, nil, db.NoRowsAffected, errors.Wrap(ctx, err, op) + } + } + } + // Get the preferred endpoints to write out. var preferredEndpoints []interface{} if endpointOp == endpointOpUpdate { diff --git a/internal/host/plugin/repository_host_set_test.go b/internal/host/plugin/repository_host_set_test.go index 9093a52b0..7dd0e891b 100644 --- a/internal/host/plugin/repository_host_set_test.go +++ b/internal/host/plugin/repository_host_set_test.go @@ -17,10 +17,12 @@ import ( "github.com/hashicorp/boundary/internal/host/plugin/store" "github.com/hashicorp/boundary/internal/iam" "github.com/hashicorp/boundary/internal/kms" + "github.com/hashicorp/boundary/internal/libs/patchstruct" "github.com/hashicorp/boundary/internal/oplog" hostplg "github.com/hashicorp/boundary/internal/plugin/host" "github.com/hashicorp/boundary/internal/scheduler" plgpb "github.com/hashicorp/boundary/sdk/pbs/plugin" + "github.com/mitchellh/mapstructure" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" @@ -44,6 +46,8 @@ func TestRepository_CreateSet(t *testing.T) { unimplementedPluginCatalog := TestCatalog(t, conn, prj.PublicId, plg.GetPublicId()) attrs := []byte{} + const normalizeToSliceKey = "normalize_to_slice" + tests := []struct { name string in *HostSet @@ -233,8 +237,9 @@ func TestRepository_CreateSet(t *testing.T) { Description: ("test-description-repo"), Attributes: func() []byte { st, err := structpb.NewStruct(map[string]interface{}{ - "k1": "foo", - "removed": nil, + "k1": "foo", + "removed": nil, + normalizeToSliceKey: "normalizeme", }) require.NoError(t, err) b, err := proto.Marshal(st) @@ -262,14 +267,37 @@ func TestRepository_CreateSet(t *testing.T) { tt := tt t.Run(tt.name, func(t *testing.T) { assert, require := assert.New(t), require.New(t) - var pluginReceivedAttrs *structpb.Struct + var origPluginAttrs, pluginReceivedAttrs *structpb.Struct + if tt.in != nil && tt.in.HostSet != nil && len(tt.in.Attributes) > 0 { + origPluginAttrs = new(structpb.Struct) + require.NoError(proto.Unmarshal(tt.in.Attributes, origPluginAttrs)) + } var pluginCalled bool plgm := map[string]plgpb.HostPluginServiceClient{ - plg.GetPublicId(): NewWrappingPluginClient(TestPluginServer{OnCreateSetFn: func(ctx context.Context, req *plgpb.OnCreateSetRequest) (*plgpb.OnCreateSetResponse, error) { - pluginCalled = true - pluginReceivedAttrs = req.GetSet().GetAttributes() - return &plgpb.OnCreateSetResponse{}, nil - }}), + plg.GetPublicId(): NewWrappingPluginClient(TestPluginServer{ + NormalizeSetDataFn: func(_ context.Context, req *plgpb.NormalizeSetDataRequest) (*plgpb.NormalizeSetDataResponse, error) { + if req.Attributes == nil { + return new(plgpb.NormalizeSetDataResponse), nil + } + var attrs struct { + NormalizeToSlice string `mapstructure:"normalize_to_slice"` + } + require.NoError(mapstructure.Decode(req.Attributes.AsMap(), &attrs)) + if attrs.NormalizeToSlice == "" { + return new(plgpb.NormalizeSetDataResponse), nil + } + retAttrs := proto.Clone(req.Attributes).(*structpb.Struct) + retAttrs.Fields[normalizeToSliceKey] = structpb.NewListValue(&structpb.ListValue{ + Values: []*structpb.Value{structpb.NewStringValue(attrs.NormalizeToSlice)}, + }) + return &plgpb.NormalizeSetDataResponse{Attributes: retAttrs}, nil + }, + OnCreateSetFn: func(ctx context.Context, req *plgpb.OnCreateSetRequest) (*plgpb.OnCreateSetResponse, error) { + pluginCalled = true + pluginReceivedAttrs = req.GetSet().GetAttributes() + return &plgpb.OnCreateSetResponse{}, nil + }, + }), unimplementedPlugin.GetPublicId(): NewWrappingPluginClient(TestPluginServer{OnCreateSetFn: func(ctx context.Context, req *plgpb.OnCreateSetRequest) (*plgpb.OnCreateSetResponse, error) { pluginCalled = true pluginReceivedAttrs = req.GetSet().GetAttributes() @@ -294,6 +322,23 @@ func TestRepository_CreateSet(t *testing.T) { assert.Equal(tt.want.Name, got.GetName()) assert.Equal(tt.want.Description, got.GetDescription()) assert.Equal(got.GetCreateTime(), got.GetUpdateTime()) + + if origPluginAttrs != nil { + if normalizeVal := origPluginAttrs.Fields[normalizeToSliceKey]; normalizeVal != nil { + gotVal := pluginReceivedAttrs.Fields[normalizeToSliceKey] + require.NotNil(gotVal) + listVal := gotVal.GetListValue() + require.NotNil(listVal) + require.Len(listVal.Values, 1) + assert.Equal(normalizeVal.GetStringValue(), listVal.Values[0].GetStringValue()) + origPluginAttrs.Fields[normalizeToSliceKey] = structpb.NewListValue(listVal) + tt.want.Attributes, err = proto.Marshal(origPluginAttrs) + require.NoError(err) + tt.want.Attributes, err = patchstruct.PatchBytes([]byte{}, tt.want.Attributes) + require.NoError(err) + } + } + wantedPluginAttributes := &structpb.Struct{} require.NoError(proto.Unmarshal(tt.want.Attributes, wantedPluginAttributes)) assert.Empty(cmp.Diff(wantedPluginAttributes, pluginReceivedAttrs, protocmp.Transform())) @@ -427,6 +472,8 @@ func TestRepository_UpdateSet(t *testing.T) { err = dbRW.Create(ctx, testCatalogSecret) require.NoError(t, err) + const normalizeToSliceKey = "normalize_to_slice" + // Create a test duplicate set. We don't use this set, it just // exists to ensure that we can test for conflicts when setting // the name. @@ -1007,7 +1054,8 @@ func TestRepository_UpdateSet(t *testing.T) { name: "update attributes (overwrite)", startingSet: setupHostSet, changeFuncs: []changeHostSetFunc{changeAttributes(map[string]interface{}{ - "foo": "baz", + "foo": "baz", + normalizeToSliceKey: "normalizeme", })}, fieldMask: []string{"attributes"}, wantCheckPluginReqFuncs: []checkPluginReqFunc{ @@ -1015,7 +1063,8 @@ func TestRepository_UpdateSet(t *testing.T) { "foo": "bar", }), checkUpdateSetRequestNewAttributes(map[string]interface{}{ - "foo": "baz", + "foo": "baz", + normalizeToSliceKey: []any{"normalizeme"}, }), checkUpdateSetRequestPersistedSecrets(map[string]interface{}{ "one": "two", @@ -1024,7 +1073,8 @@ func TestRepository_UpdateSet(t *testing.T) { wantCheckSetFuncs: []checkHostSetFunc{ checkVersion(3), checkAttributes(map[string]interface{}{ - "foo": "baz", + "foo": "baz", + normalizeToSliceKey: []any{"normalizeme"}, }), checkNeedSync(true), checkVerifySetOplog(oplog.OpType_OP_TYPE_UPDATE), @@ -1147,6 +1197,23 @@ func TestRepository_UpdateSet(t *testing.T) { testPluginMap := map[string]plgpb.HostPluginServiceClient{ testPlugin.GetPublicId(): &WrappingPluginClient{ Server: &TestPluginServer{ + NormalizeSetDataFn: func(_ context.Context, req *plgpb.NormalizeSetDataRequest) (*plgpb.NormalizeSetDataResponse, error) { + if req.Attributes == nil { + return new(plgpb.NormalizeSetDataResponse), nil + } + var attrs struct { + NormalizeToSlice string `mapstructure:"normalize_to_slice"` + } + require.NoError(mapstructure.Decode(req.Attributes.AsMap(), &attrs)) + if attrs.NormalizeToSlice == "" { + return new(plgpb.NormalizeSetDataResponse), nil + } + retAttrs := proto.Clone(req.Attributes).(*structpb.Struct) + retAttrs.Fields[normalizeToSliceKey] = structpb.NewListValue(&structpb.ListValue{ + Values: []*structpb.Value{structpb.NewStringValue(attrs.NormalizeToSlice)}, + }) + return &plgpb.NormalizeSetDataResponse{Attributes: retAttrs}, nil + }, OnUpdateSetFn: func(_ context.Context, req *plgpb.OnUpdateSetRequest) (*plgpb.OnUpdateSetResponse, error) { gotOnUpdateCallCount++ for _, check := range tt.wantCheckPluginReqFuncs { diff --git a/internal/host/plugin/testing.go b/internal/host/plugin/testing.go index 069d93112..3e958c03f 100644 --- a/internal/host/plugin/testing.go +++ b/internal/host/plugin/testing.go @@ -233,16 +233,25 @@ var _ plgpb.HostPluginServiceServer = (*TestPluginServer)(nil) // TestPluginServer provides a host plugin service server where each method can be overwritten for tests. type TestPluginServer struct { - OnCreateCatalogFn func(context.Context, *plgpb.OnCreateCatalogRequest) (*plgpb.OnCreateCatalogResponse, error) - OnUpdateCatalogFn func(context.Context, *plgpb.OnUpdateCatalogRequest) (*plgpb.OnUpdateCatalogResponse, error) - OnDeleteCatalogFn func(context.Context, *plgpb.OnDeleteCatalogRequest) (*plgpb.OnDeleteCatalogResponse, error) - OnCreateSetFn func(context.Context, *plgpb.OnCreateSetRequest) (*plgpb.OnCreateSetResponse, error) - OnUpdateSetFn func(context.Context, *plgpb.OnUpdateSetRequest) (*plgpb.OnUpdateSetResponse, error) - OnDeleteSetFn func(context.Context, *plgpb.OnDeleteSetRequest) (*plgpb.OnDeleteSetResponse, error) - ListHostsFn func(context.Context, *plgpb.ListHostsRequest) (*plgpb.ListHostsResponse, error) + NormalizeCatalogDataFn func(context.Context, *plgpb.NormalizeCatalogDataRequest) (*plgpb.NormalizeCatalogDataResponse, error) + OnCreateCatalogFn func(context.Context, *plgpb.OnCreateCatalogRequest) (*plgpb.OnCreateCatalogResponse, error) + OnUpdateCatalogFn func(context.Context, *plgpb.OnUpdateCatalogRequest) (*plgpb.OnUpdateCatalogResponse, error) + OnDeleteCatalogFn func(context.Context, *plgpb.OnDeleteCatalogRequest) (*plgpb.OnDeleteCatalogResponse, error) + NormalizeSetDataFn func(context.Context, *plgpb.NormalizeSetDataRequest) (*plgpb.NormalizeSetDataResponse, error) + OnCreateSetFn func(context.Context, *plgpb.OnCreateSetRequest) (*plgpb.OnCreateSetResponse, error) + OnUpdateSetFn func(context.Context, *plgpb.OnUpdateSetRequest) (*plgpb.OnUpdateSetResponse, error) + OnDeleteSetFn func(context.Context, *plgpb.OnDeleteSetRequest) (*plgpb.OnDeleteSetResponse, error) + ListHostsFn func(context.Context, *plgpb.ListHostsRequest) (*plgpb.ListHostsResponse, error) plgpb.UnimplementedHostPluginServiceServer } +func (t TestPluginServer) NormalizeCatalogData(ctx context.Context, req *plgpb.NormalizeCatalogDataRequest) (*plgpb.NormalizeCatalogDataResponse, error) { + if t.NormalizeCatalogDataFn == nil { + return t.UnimplementedHostPluginServiceServer.NormalizeCatalogData(ctx, req) + } + return t.NormalizeCatalogDataFn(ctx, req) +} + func (t TestPluginServer) OnCreateCatalog(ctx context.Context, req *plgpb.OnCreateCatalogRequest) (*plgpb.OnCreateCatalogResponse, error) { if t.OnCreateCatalogFn == nil { return t.UnimplementedHostPluginServiceServer.OnCreateCatalog(ctx, req) @@ -264,6 +273,13 @@ func (t TestPluginServer) OnDeleteCatalog(ctx context.Context, req *plgpb.OnDele return t.OnDeleteCatalogFn(ctx, req) } +func (t TestPluginServer) NormalizeSetData(ctx context.Context, req *plgpb.NormalizeSetDataRequest) (*plgpb.NormalizeSetDataResponse, error) { + if t.NormalizeSetDataFn == nil { + return t.UnimplementedHostPluginServiceServer.NormalizeSetData(ctx, req) + } + return t.NormalizeSetDataFn(ctx, req) +} + func (t TestPluginServer) OnCreateSet(ctx context.Context, req *plgpb.OnCreateSetRequest) (*plgpb.OnCreateSetResponse, error) { if t.OnCreateSetFn == nil { return t.UnimplementedHostPluginServiceServer.OnCreateSet(ctx, req) diff --git a/internal/proto/plugin/v1/host_plugin_service.proto b/internal/proto/plugin/v1/host_plugin_service.proto index 74a337df9..dc770b3df 100644 --- a/internal/proto/plugin/v1/host_plugin_service.proto +++ b/internal/proto/plugin/v1/host_plugin_service.proto @@ -10,8 +10,17 @@ option go_package = "github.com/hashicorp/boundary/sdk/pbs/plugin;plugin"; // HostPluginService describes the service for host plugins. service HostPluginService { - // OnCreateCatalog is a hook that runs when a host catalog is - // created. + // NormalizeCatalogData is a hook that passes attributes to the plugin and + // allows those values to be normalized prior to creating or updating those + // values in the host catalog data. + // + // NormalizeCatalogData is called before: + // * OnCreateCatalog + // * OnUpdateCatalog + rpc NormalizeCatalogData(NormalizeCatalogDataRequest) returns (NormalizeCatalogDataResponse); + + // OnCreateCatalog is a hook that runs when a + // host catalog is created. rpc OnCreateCatalog(OnCreateCatalogRequest) returns (OnCreateCatalogResponse); // OnUpdateCatalog is a hook that runs when a host catalog is @@ -22,6 +31,15 @@ service HostPluginService { // deleted. rpc OnDeleteCatalog(OnDeleteCatalogRequest) returns (OnDeleteCatalogResponse); + // NormalizeSetData is a hook that passes attributes to the plugin and + // allows those values to be normalized prior to creating or updating those + // values in the host set data. + // + // NormalizeSetData is called before: + // * OnCreateSet + // * OnUpdateSet + rpc NormalizeSetData(NormalizeSetDataRequest) returns (NormalizeSetDataResponse); + // OnCreateSet is a hook that runs when a host set is created. rpc OnCreateSet(OnCreateSetRequest) returns (OnCreateSetResponse); @@ -35,6 +53,17 @@ service HostPluginService { rpc ListHosts(ListHostsRequest) returns (ListHostsResponse); } +message NormalizeCatalogDataRequest { + // The incoming attributes in the create or update request. + google.protobuf.Struct attributes = 100; +} + +message NormalizeCatalogDataResponse { + // Outgoing attributes. If nil, no changes will be recorded. If non-nil, the + // values here will be used in place of the original set of attributes. + google.protobuf.Struct attributes = 100; +} + message OnCreateCatalogRequest { // The host catalog to create. The request may contain optional // secret data to help authenticate the request against a cloud @@ -84,6 +113,17 @@ message OnDeleteCatalogRequest { message OnDeleteCatalogResponse {} +message NormalizeSetDataRequest { + // The incoming attributes in the create or update request. + google.protobuf.Struct attributes = 100; +} + +message NormalizeSetDataResponse { + // Outgoing attributes. If nil, no changes will be recorded. If non-nil, the + // values here will be used in place of the original set of attributes. + google.protobuf.Struct attributes = 100; +} + message OnCreateSetRequest { // The host catalog that the set belongs to. controller.api.resources.hostcatalogs.v1.HostCatalog catalog = 10; diff --git a/sdk/pbs/plugin/host_plugin_service.pb.go b/sdk/pbs/plugin/host_plugin_service.pb.go index 9c34c4d84..9b4503c4a 100644 --- a/sdk/pbs/plugin/host_plugin_service.pb.go +++ b/sdk/pbs/plugin/host_plugin_service.pb.go @@ -23,6 +23,103 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type NormalizeCatalogDataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The incoming attributes in the create or update request. + Attributes *structpb.Struct `protobuf:"bytes,100,opt,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (x *NormalizeCatalogDataRequest) Reset() { + *x = NormalizeCatalogDataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NormalizeCatalogDataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NormalizeCatalogDataRequest) ProtoMessage() {} + +func (x *NormalizeCatalogDataRequest) ProtoReflect() protoreflect.Message { + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NormalizeCatalogDataRequest.ProtoReflect.Descriptor instead. +func (*NormalizeCatalogDataRequest) Descriptor() ([]byte, []int) { + return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{0} +} + +func (x *NormalizeCatalogDataRequest) GetAttributes() *structpb.Struct { + if x != nil { + return x.Attributes + } + return nil +} + +type NormalizeCatalogDataResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Outgoing attributes. If nil, no changes will be recorded. If non-nil, the + // values here will be used in place of the original set of attributes. + Attributes *structpb.Struct `protobuf:"bytes,100,opt,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (x *NormalizeCatalogDataResponse) Reset() { + *x = NormalizeCatalogDataResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NormalizeCatalogDataResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NormalizeCatalogDataResponse) ProtoMessage() {} + +func (x *NormalizeCatalogDataResponse) ProtoReflect() protoreflect.Message { + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NormalizeCatalogDataResponse.ProtoReflect.Descriptor instead. +func (*NormalizeCatalogDataResponse) Descriptor() ([]byte, []int) { + return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{1} +} + +func (x *NormalizeCatalogDataResponse) GetAttributes() *structpb.Struct { + if x != nil { + return x.Attributes + } + return nil +} + type OnCreateCatalogRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -37,7 +134,7 @@ type OnCreateCatalogRequest struct { func (x *OnCreateCatalogRequest) Reset() { *x = OnCreateCatalogRequest{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[0] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -50,7 +147,7 @@ func (x *OnCreateCatalogRequest) String() string { func (*OnCreateCatalogRequest) ProtoMessage() {} func (x *OnCreateCatalogRequest) ProtoReflect() protoreflect.Message { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[0] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -63,7 +160,7 @@ func (x *OnCreateCatalogRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use OnCreateCatalogRequest.ProtoReflect.Descriptor instead. func (*OnCreateCatalogRequest) Descriptor() ([]byte, []int) { - return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{0} + return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{2} } func (x *OnCreateCatalogRequest) GetCatalog() *hostcatalogs.HostCatalog { @@ -88,7 +185,7 @@ type OnCreateCatalogResponse struct { func (x *OnCreateCatalogResponse) Reset() { *x = OnCreateCatalogResponse{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[1] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -101,7 +198,7 @@ func (x *OnCreateCatalogResponse) String() string { func (*OnCreateCatalogResponse) ProtoMessage() {} func (x *OnCreateCatalogResponse) ProtoReflect() protoreflect.Message { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[1] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -114,7 +211,7 @@ func (x *OnCreateCatalogResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use OnCreateCatalogResponse.ProtoReflect.Descriptor instead. func (*OnCreateCatalogResponse) Descriptor() ([]byte, []int) { - return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{1} + return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{3} } func (x *OnCreateCatalogResponse) GetPersisted() *HostCatalogPersisted { @@ -142,7 +239,7 @@ type OnUpdateCatalogRequest struct { func (x *OnUpdateCatalogRequest) Reset() { *x = OnUpdateCatalogRequest{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[2] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -155,7 +252,7 @@ func (x *OnUpdateCatalogRequest) String() string { func (*OnUpdateCatalogRequest) ProtoMessage() {} func (x *OnUpdateCatalogRequest) ProtoReflect() protoreflect.Message { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[2] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -168,7 +265,7 @@ func (x *OnUpdateCatalogRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use OnUpdateCatalogRequest.ProtoReflect.Descriptor instead. func (*OnUpdateCatalogRequest) Descriptor() ([]byte, []int) { - return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{2} + return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{4} } func (x *OnUpdateCatalogRequest) GetCurrentCatalog() *hostcatalogs.HostCatalog { @@ -207,7 +304,7 @@ type OnUpdateCatalogResponse struct { func (x *OnUpdateCatalogResponse) Reset() { *x = OnUpdateCatalogResponse{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[3] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -220,7 +317,7 @@ func (x *OnUpdateCatalogResponse) String() string { func (*OnUpdateCatalogResponse) ProtoMessage() {} func (x *OnUpdateCatalogResponse) ProtoReflect() protoreflect.Message { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[3] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -233,7 +330,7 @@ func (x *OnUpdateCatalogResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use OnUpdateCatalogResponse.ProtoReflect.Descriptor instead. func (*OnUpdateCatalogResponse) Descriptor() ([]byte, []int) { - return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{3} + return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{5} } func (x *OnUpdateCatalogResponse) GetPersisted() *HostCatalogPersisted { @@ -259,7 +356,7 @@ type OnDeleteCatalogRequest struct { func (x *OnDeleteCatalogRequest) Reset() { *x = OnDeleteCatalogRequest{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[4] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -272,7 +369,7 @@ func (x *OnDeleteCatalogRequest) String() string { func (*OnDeleteCatalogRequest) ProtoMessage() {} func (x *OnDeleteCatalogRequest) ProtoReflect() protoreflect.Message { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[4] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -285,7 +382,7 @@ func (x *OnDeleteCatalogRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use OnDeleteCatalogRequest.ProtoReflect.Descriptor instead. func (*OnDeleteCatalogRequest) Descriptor() ([]byte, []int) { - return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{4} + return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{6} } func (x *OnDeleteCatalogRequest) GetCatalog() *hostcatalogs.HostCatalog { @@ -318,7 +415,7 @@ type OnDeleteCatalogResponse struct { func (x *OnDeleteCatalogResponse) Reset() { *x = OnDeleteCatalogResponse{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[5] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -331,7 +428,7 @@ func (x *OnDeleteCatalogResponse) String() string { func (*OnDeleteCatalogResponse) ProtoMessage() {} func (x *OnDeleteCatalogResponse) ProtoReflect() protoreflect.Message { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[5] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -344,7 +441,104 @@ func (x *OnDeleteCatalogResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use OnDeleteCatalogResponse.ProtoReflect.Descriptor instead. func (*OnDeleteCatalogResponse) Descriptor() ([]byte, []int) { - return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{5} + return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{7} +} + +type NormalizeSetDataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The incoming attributes in the create or update request. + Attributes *structpb.Struct `protobuf:"bytes,100,opt,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (x *NormalizeSetDataRequest) Reset() { + *x = NormalizeSetDataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NormalizeSetDataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NormalizeSetDataRequest) ProtoMessage() {} + +func (x *NormalizeSetDataRequest) ProtoReflect() protoreflect.Message { + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NormalizeSetDataRequest.ProtoReflect.Descriptor instead. +func (*NormalizeSetDataRequest) Descriptor() ([]byte, []int) { + return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{8} +} + +func (x *NormalizeSetDataRequest) GetAttributes() *structpb.Struct { + if x != nil { + return x.Attributes + } + return nil +} + +type NormalizeSetDataResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Outgoing attributes. If nil, no changes will be recorded. If non-nil, the + // values here will be used in place of the original set of attributes. + Attributes *structpb.Struct `protobuf:"bytes,100,opt,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (x *NormalizeSetDataResponse) Reset() { + *x = NormalizeSetDataResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NormalizeSetDataResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NormalizeSetDataResponse) ProtoMessage() {} + +func (x *NormalizeSetDataResponse) ProtoReflect() protoreflect.Message { + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NormalizeSetDataResponse.ProtoReflect.Descriptor instead. +func (*NormalizeSetDataResponse) Descriptor() ([]byte, []int) { + return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{9} +} + +func (x *NormalizeSetDataResponse) GetAttributes() *structpb.Struct { + if x != nil { + return x.Attributes + } + return nil } type OnCreateSetRequest struct { @@ -363,7 +557,7 @@ type OnCreateSetRequest struct { func (x *OnCreateSetRequest) Reset() { *x = OnCreateSetRequest{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[6] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -376,7 +570,7 @@ func (x *OnCreateSetRequest) String() string { func (*OnCreateSetRequest) ProtoMessage() {} func (x *OnCreateSetRequest) ProtoReflect() protoreflect.Message { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[6] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -389,7 +583,7 @@ func (x *OnCreateSetRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use OnCreateSetRequest.ProtoReflect.Descriptor instead. func (*OnCreateSetRequest) Descriptor() ([]byte, []int) { - return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{6} + return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{10} } func (x *OnCreateSetRequest) GetCatalog() *hostcatalogs.HostCatalog { @@ -422,7 +616,7 @@ type OnCreateSetResponse struct { func (x *OnCreateSetResponse) Reset() { *x = OnCreateSetResponse{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[7] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -435,7 +629,7 @@ func (x *OnCreateSetResponse) String() string { func (*OnCreateSetResponse) ProtoMessage() {} func (x *OnCreateSetResponse) ProtoReflect() protoreflect.Message { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[7] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -448,7 +642,7 @@ func (x *OnCreateSetResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use OnCreateSetResponse.ProtoReflect.Descriptor instead. func (*OnCreateSetResponse) Descriptor() ([]byte, []int) { - return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{7} + return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{11} } type OnUpdateSetRequest struct { @@ -469,7 +663,7 @@ type OnUpdateSetRequest struct { func (x *OnUpdateSetRequest) Reset() { *x = OnUpdateSetRequest{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[8] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -482,7 +676,7 @@ func (x *OnUpdateSetRequest) String() string { func (*OnUpdateSetRequest) ProtoMessage() {} func (x *OnUpdateSetRequest) ProtoReflect() protoreflect.Message { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[8] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -495,7 +689,7 @@ func (x *OnUpdateSetRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use OnUpdateSetRequest.ProtoReflect.Descriptor instead. func (*OnUpdateSetRequest) Descriptor() ([]byte, []int) { - return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{8} + return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{12} } func (x *OnUpdateSetRequest) GetCatalog() *hostcatalogs.HostCatalog { @@ -535,7 +729,7 @@ type OnUpdateSetResponse struct { func (x *OnUpdateSetResponse) Reset() { *x = OnUpdateSetResponse{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[9] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -548,7 +742,7 @@ func (x *OnUpdateSetResponse) String() string { func (*OnUpdateSetResponse) ProtoMessage() {} func (x *OnUpdateSetResponse) ProtoReflect() protoreflect.Message { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[9] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -561,7 +755,7 @@ func (x *OnUpdateSetResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use OnUpdateSetResponse.ProtoReflect.Descriptor instead. func (*OnUpdateSetResponse) Descriptor() ([]byte, []int) { - return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{9} + return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{13} } type OnDeleteSetRequest struct { @@ -580,7 +774,7 @@ type OnDeleteSetRequest struct { func (x *OnDeleteSetRequest) Reset() { *x = OnDeleteSetRequest{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[10] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -593,7 +787,7 @@ func (x *OnDeleteSetRequest) String() string { func (*OnDeleteSetRequest) ProtoMessage() {} func (x *OnDeleteSetRequest) ProtoReflect() protoreflect.Message { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[10] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -606,7 +800,7 @@ func (x *OnDeleteSetRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use OnDeleteSetRequest.ProtoReflect.Descriptor instead. func (*OnDeleteSetRequest) Descriptor() ([]byte, []int) { - return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{10} + return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{14} } func (x *OnDeleteSetRequest) GetCatalog() *hostcatalogs.HostCatalog { @@ -639,7 +833,7 @@ type OnDeleteSetResponse struct { func (x *OnDeleteSetResponse) Reset() { *x = OnDeleteSetResponse{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[11] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -652,7 +846,7 @@ func (x *OnDeleteSetResponse) String() string { func (*OnDeleteSetResponse) ProtoMessage() {} func (x *OnDeleteSetResponse) ProtoReflect() protoreflect.Message { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[11] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -665,7 +859,7 @@ func (x *OnDeleteSetResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use OnDeleteSetResponse.ProtoReflect.Descriptor instead. func (*OnDeleteSetResponse) Descriptor() ([]byte, []int) { - return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{11} + return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{15} } type ListHostsRequest struct { @@ -685,7 +879,7 @@ type ListHostsRequest struct { func (x *ListHostsRequest) Reset() { *x = ListHostsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[12] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -698,7 +892,7 @@ func (x *ListHostsRequest) String() string { func (*ListHostsRequest) ProtoMessage() {} func (x *ListHostsRequest) ProtoReflect() protoreflect.Message { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[12] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -711,7 +905,7 @@ func (x *ListHostsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListHostsRequest.ProtoReflect.Descriptor instead. func (*ListHostsRequest) Descriptor() ([]byte, []int) { - return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{12} + return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{16} } func (x *ListHostsRequest) GetCatalog() *hostcatalogs.HostCatalog { @@ -747,7 +941,7 @@ type ListHostsResponse struct { func (x *ListHostsResponse) Reset() { *x = ListHostsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[13] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -760,7 +954,7 @@ func (x *ListHostsResponse) String() string { func (*ListHostsResponse) ProtoMessage() {} func (x *ListHostsResponse) ProtoReflect() protoreflect.Message { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[13] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -773,7 +967,7 @@ func (x *ListHostsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListHostsResponse.ProtoReflect.Descriptor instead. func (*ListHostsResponse) Descriptor() ([]byte, []int) { - return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{13} + return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{17} } func (x *ListHostsResponse) GetHosts() []*ListHostsResponseHost { @@ -813,7 +1007,7 @@ type ListHostsResponseHost struct { func (x *ListHostsResponseHost) Reset() { *x = ListHostsResponseHost{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[14] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -826,7 +1020,7 @@ func (x *ListHostsResponseHost) String() string { func (*ListHostsResponseHost) ProtoMessage() {} func (x *ListHostsResponseHost) ProtoReflect() protoreflect.Message { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[14] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -839,7 +1033,7 @@ func (x *ListHostsResponseHost) ProtoReflect() protoreflect.Message { // Deprecated: Use ListHostsResponseHost.ProtoReflect.Descriptor instead. func (*ListHostsResponseHost) Descriptor() ([]byte, []int) { - return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{14} + return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{18} } func (x *ListHostsResponseHost) GetExternalId() string { @@ -911,7 +1105,7 @@ type HostCatalogPersisted struct { func (x *HostCatalogPersisted) Reset() { *x = HostCatalogPersisted{} if protoimpl.UnsafeEnabled { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[15] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -924,7 +1118,7 @@ func (x *HostCatalogPersisted) String() string { func (*HostCatalogPersisted) ProtoMessage() {} func (x *HostCatalogPersisted) ProtoReflect() protoreflect.Message { - mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[15] + mi := &file_plugin_v1_host_plugin_service_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -937,7 +1131,7 @@ func (x *HostCatalogPersisted) ProtoReflect() protoreflect.Message { // Deprecated: Use HostCatalogPersisted.ProtoReflect.Descriptor instead. func (*HostCatalogPersisted) Descriptor() ([]byte, []int) { - return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{15} + return file_plugin_v1_host_plugin_service_proto_rawDescGZIP(), []int{19} } func (x *HostCatalogPersisted) GetSecrets() *structpb.Struct { @@ -962,169 +1156,203 @@ var file_plugin_v1_host_plugin_service_proto_rawDesc = []byte{ 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x69, 0x0a, 0x16, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, - 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x07, 0x63, 0x61, + 0x22, 0x56, 0x0a, 0x1b, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x43, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x37, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x64, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0a, 0x61, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0x57, 0x0a, 0x1c, 0x4e, 0x6f, 0x72, 0x6d, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x22, 0x69, 0x0a, 0x16, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x07, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x22, 0x58, 0x0a, 0x17, + 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, + 0x73, 0x74, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, 0x65, 0x72, + 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x22, 0x8f, 0x02, 0x0a, 0x16, 0x4f, 0x6e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x5e, 0x0a, 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x52, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x12, 0x56, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x0a, 0x6e, + 0x65, 0x77, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x65, 0x72, + 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, + 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x22, 0x58, 0x0a, 0x17, 0x4f, 0x6e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x50, 0x65, + 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, + 0x65, 0x64, 0x22, 0xeb, 0x01, 0x0a, 0x16, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, + 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x41, + 0x0a, 0x04, 0x73, 0x65, 0x74, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x65, 0x74, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x04, 0x73, 0x65, 0x74, + 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, 0x1e, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x50, 0x65, 0x72, 0x73, + 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, + 0x22, 0x19, 0x0a, 0x17, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x0a, 0x17, 0x4e, + 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, + 0x53, 0x0a, 0x18, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x74, 0x44, + 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x61, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x22, 0xe5, 0x01, 0x0a, 0x12, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x07, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x63, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, + 0x6c, 0x6f, 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x3f, 0x0a, 0x03, + 0x73, 0x65, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x03, 0x73, 0x65, 0x74, 0x12, 0x3d, 0x0a, + 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, + 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, + 0x64, 0x52, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x22, 0x15, 0x0a, 0x13, + 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0xbc, 0x02, 0x0a, 0x12, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, - 0x6f, 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x22, 0x58, 0x0a, 0x17, 0x4f, - 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, - 0x74, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, - 0x67, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, 0x65, 0x72, 0x73, - 0x69, 0x73, 0x74, 0x65, 0x64, 0x22, 0x8f, 0x02, 0x0a, 0x16, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x5e, 0x0a, 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x61, 0x74, 0x61, - 0x6c, 0x6f, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, - 0x52, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, - 0x12, 0x56, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, - 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x0a, 0x6e, 0x65, - 0x77, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, - 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, - 0x6c, 0x6f, 0x67, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, 0x65, - 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x22, 0x58, 0x0a, 0x17, 0x4f, 0x6e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, - 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x50, 0x65, 0x72, - 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, - 0x64, 0x22, 0xeb, 0x01, 0x0a, 0x16, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, - 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x07, - 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x63, 0x61, 0x74, - 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, - 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x41, 0x0a, - 0x04, 0x73, 0x65, 0x74, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x65, 0x74, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x04, 0x73, 0x65, 0x74, 0x73, - 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, 0x1e, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, - 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x50, 0x65, 0x72, 0x73, 0x69, - 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x22, - 0x19, 0x0a, 0x17, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, - 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe5, 0x01, 0x0a, 0x12, 0x4f, - 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x4f, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, - 0x73, 0x74, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, - 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, - 0x6f, 0x67, 0x12, 0x3f, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x73, - 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x03, - 0x73, 0x65, 0x74, 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, - 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, + 0x6f, 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x4e, 0x0a, 0x0b, 0x63, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, + 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, + 0x0a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x74, 0x12, 0x46, 0x0a, 0x07, 0x6e, + 0x65, 0x77, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x65, 0x74, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x06, 0x6e, 0x65, 0x77, + 0x53, 0x65, 0x74, 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, + 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, - 0x65, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbc, 0x02, 0x0a, 0x12, 0x4f, 0x6e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x65, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe5, 0x01, 0x0a, 0x12, 0x4f, 0x6e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, - 0x67, 0x12, 0x4e, 0x0a, 0x0b, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x74, - 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, - 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x0a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x65, - 0x74, 0x12, 0x46, 0x0a, 0x07, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x1e, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, - 0x73, 0x74, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, - 0x74, 0x52, 0x06, 0x6e, 0x65, 0x77, 0x53, 0x65, 0x74, 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x65, 0x72, - 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, - 0x61, 0x6c, 0x6f, 0x67, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, - 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x4f, 0x6e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xe5, 0x01, 0x0a, 0x12, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, - 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x07, - 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x3f, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x14, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, - 0x68, 0x6f, 0x73, 0x74, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, - 0x53, 0x65, 0x74, 0x52, 0x03, 0x73, 0x65, 0x74, 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, - 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, - 0x6c, 0x6f, 0x67, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, 0x65, - 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x4f, 0x6e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe5, - 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, - 0x68, 0x6f, 0x73, 0x74, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, - 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x41, 0x0a, 0x04, 0x73, 0x65, 0x74, 0x73, 0x18, 0x14, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, - 0x73, 0x74, 0x73, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, - 0x74, 0x52, 0x04, 0x73, 0x65, 0x74, 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, - 0x73, 0x74, 0x65, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, - 0x6f, 0x67, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, 0x65, 0x72, - 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x22, 0x4b, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x6f, - 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x68, - 0x6f, 0x73, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x05, 0x68, 0x6f, - 0x73, 0x74, 0x73, 0x22, 0x80, 0x02, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x6f, 0x73, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x1f, 0x0a, - 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x65, 0x73, 0x18, 0x28, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x70, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x6e, 0x73, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x18, 0x32, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x64, 0x6e, 0x73, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, - 0x3c, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x74, 0x49, 0x64, 0x73, 0x12, 0x37, 0x0a, - 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x64, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0x49, 0x0a, 0x14, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, - 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x50, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x12, 0x31, - 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x73, 0x32, 0xd3, 0x04, 0x0a, 0x11, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x4f, 0x6e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x21, 0x2e, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, - 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, + 0x67, 0x12, 0x3f, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x65, + 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x03, 0x73, + 0x65, 0x74, 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, + 0x1e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x50, 0x65, 0x72, + 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, + 0x64, 0x22, 0x15, 0x0a, 0x13, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe5, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, + 0x74, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, + 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, + 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x63, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x41, + 0x0a, 0x04, 0x73, 0x65, 0x74, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x65, 0x74, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x65, 0x74, 0x52, 0x04, 0x73, 0x65, 0x74, + 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x18, 0x1e, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x50, 0x65, 0x72, 0x73, + 0x69, 0x73, 0x74, 0x65, 0x64, 0x52, 0x09, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, + 0x22, 0x4b, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x0a, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x22, 0x80, 0x02, + 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x1e, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, + 0x0a, 0x0c, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x28, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, + 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x6e, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x32, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x64, 0x6e, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x17, + 0x0a, 0x07, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x3c, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x65, 0x74, 0x49, 0x64, 0x73, 0x12, 0x37, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x22, 0x49, 0x0a, 0x14, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x50, + 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x73, 0x18, 0x64, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, + 0x63, 0x74, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x32, 0x99, 0x06, 0x0a, 0x11, + 0x48, 0x6f, 0x73, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x67, 0x0a, 0x14, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x43, 0x61, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x44, 0x61, 0x74, 0x61, 0x12, 0x26, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x43, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x27, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, + 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x4f, 0x6e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x21, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, - 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x21, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, - 0x2e, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x22, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x21, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, - 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0f, 0x4f, - 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x21, - 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x73, + 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, + 0x0a, 0x0f, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, + 0x67, 0x12, 0x21, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x4f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5b, 0x0a, 0x10, 0x4e, 0x6f, 0x72, 0x6d, + 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x22, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x53, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x72, + 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x12, 0x1d, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, @@ -1163,73 +1391,85 @@ func file_plugin_v1_host_plugin_service_proto_rawDescGZIP() []byte { return file_plugin_v1_host_plugin_service_proto_rawDescData } -var file_plugin_v1_host_plugin_service_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_plugin_v1_host_plugin_service_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_plugin_v1_host_plugin_service_proto_goTypes = []interface{}{ - (*OnCreateCatalogRequest)(nil), // 0: plugin.v1.OnCreateCatalogRequest - (*OnCreateCatalogResponse)(nil), // 1: plugin.v1.OnCreateCatalogResponse - (*OnUpdateCatalogRequest)(nil), // 2: plugin.v1.OnUpdateCatalogRequest - (*OnUpdateCatalogResponse)(nil), // 3: plugin.v1.OnUpdateCatalogResponse - (*OnDeleteCatalogRequest)(nil), // 4: plugin.v1.OnDeleteCatalogRequest - (*OnDeleteCatalogResponse)(nil), // 5: plugin.v1.OnDeleteCatalogResponse - (*OnCreateSetRequest)(nil), // 6: plugin.v1.OnCreateSetRequest - (*OnCreateSetResponse)(nil), // 7: plugin.v1.OnCreateSetResponse - (*OnUpdateSetRequest)(nil), // 8: plugin.v1.OnUpdateSetRequest - (*OnUpdateSetResponse)(nil), // 9: plugin.v1.OnUpdateSetResponse - (*OnDeleteSetRequest)(nil), // 10: plugin.v1.OnDeleteSetRequest - (*OnDeleteSetResponse)(nil), // 11: plugin.v1.OnDeleteSetResponse - (*ListHostsRequest)(nil), // 12: plugin.v1.ListHostsRequest - (*ListHostsResponse)(nil), // 13: plugin.v1.ListHostsResponse - (*ListHostsResponseHost)(nil), // 14: plugin.v1.ListHostsResponseHost - (*HostCatalogPersisted)(nil), // 15: plugin.v1.HostCatalogPersisted - (*hostcatalogs.HostCatalog)(nil), // 16: controller.api.resources.hostcatalogs.v1.HostCatalog - (*hostsets.HostSet)(nil), // 17: controller.api.resources.hostsets.v1.HostSet - (*structpb.Struct)(nil), // 18: google.protobuf.Struct + (*NormalizeCatalogDataRequest)(nil), // 0: plugin.v1.NormalizeCatalogDataRequest + (*NormalizeCatalogDataResponse)(nil), // 1: plugin.v1.NormalizeCatalogDataResponse + (*OnCreateCatalogRequest)(nil), // 2: plugin.v1.OnCreateCatalogRequest + (*OnCreateCatalogResponse)(nil), // 3: plugin.v1.OnCreateCatalogResponse + (*OnUpdateCatalogRequest)(nil), // 4: plugin.v1.OnUpdateCatalogRequest + (*OnUpdateCatalogResponse)(nil), // 5: plugin.v1.OnUpdateCatalogResponse + (*OnDeleteCatalogRequest)(nil), // 6: plugin.v1.OnDeleteCatalogRequest + (*OnDeleteCatalogResponse)(nil), // 7: plugin.v1.OnDeleteCatalogResponse + (*NormalizeSetDataRequest)(nil), // 8: plugin.v1.NormalizeSetDataRequest + (*NormalizeSetDataResponse)(nil), // 9: plugin.v1.NormalizeSetDataResponse + (*OnCreateSetRequest)(nil), // 10: plugin.v1.OnCreateSetRequest + (*OnCreateSetResponse)(nil), // 11: plugin.v1.OnCreateSetResponse + (*OnUpdateSetRequest)(nil), // 12: plugin.v1.OnUpdateSetRequest + (*OnUpdateSetResponse)(nil), // 13: plugin.v1.OnUpdateSetResponse + (*OnDeleteSetRequest)(nil), // 14: plugin.v1.OnDeleteSetRequest + (*OnDeleteSetResponse)(nil), // 15: plugin.v1.OnDeleteSetResponse + (*ListHostsRequest)(nil), // 16: plugin.v1.ListHostsRequest + (*ListHostsResponse)(nil), // 17: plugin.v1.ListHostsResponse + (*ListHostsResponseHost)(nil), // 18: plugin.v1.ListHostsResponseHost + (*HostCatalogPersisted)(nil), // 19: plugin.v1.HostCatalogPersisted + (*structpb.Struct)(nil), // 20: google.protobuf.Struct + (*hostcatalogs.HostCatalog)(nil), // 21: controller.api.resources.hostcatalogs.v1.HostCatalog + (*hostsets.HostSet)(nil), // 22: controller.api.resources.hostsets.v1.HostSet } var file_plugin_v1_host_plugin_service_proto_depIdxs = []int32{ - 16, // 0: plugin.v1.OnCreateCatalogRequest.catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog - 15, // 1: plugin.v1.OnCreateCatalogResponse.persisted:type_name -> plugin.v1.HostCatalogPersisted - 16, // 2: plugin.v1.OnUpdateCatalogRequest.current_catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog - 16, // 3: plugin.v1.OnUpdateCatalogRequest.new_catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog - 15, // 4: plugin.v1.OnUpdateCatalogRequest.persisted:type_name -> plugin.v1.HostCatalogPersisted - 15, // 5: plugin.v1.OnUpdateCatalogResponse.persisted:type_name -> plugin.v1.HostCatalogPersisted - 16, // 6: plugin.v1.OnDeleteCatalogRequest.catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog - 17, // 7: plugin.v1.OnDeleteCatalogRequest.sets:type_name -> controller.api.resources.hostsets.v1.HostSet - 15, // 8: plugin.v1.OnDeleteCatalogRequest.persisted:type_name -> plugin.v1.HostCatalogPersisted - 16, // 9: plugin.v1.OnCreateSetRequest.catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog - 17, // 10: plugin.v1.OnCreateSetRequest.set:type_name -> controller.api.resources.hostsets.v1.HostSet - 15, // 11: plugin.v1.OnCreateSetRequest.persisted:type_name -> plugin.v1.HostCatalogPersisted - 16, // 12: plugin.v1.OnUpdateSetRequest.catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog - 17, // 13: plugin.v1.OnUpdateSetRequest.current_set:type_name -> controller.api.resources.hostsets.v1.HostSet - 17, // 14: plugin.v1.OnUpdateSetRequest.new_set:type_name -> controller.api.resources.hostsets.v1.HostSet - 15, // 15: plugin.v1.OnUpdateSetRequest.persisted:type_name -> plugin.v1.HostCatalogPersisted - 16, // 16: plugin.v1.OnDeleteSetRequest.catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog - 17, // 17: plugin.v1.OnDeleteSetRequest.set:type_name -> controller.api.resources.hostsets.v1.HostSet - 15, // 18: plugin.v1.OnDeleteSetRequest.persisted:type_name -> plugin.v1.HostCatalogPersisted - 16, // 19: plugin.v1.ListHostsRequest.catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog - 17, // 20: plugin.v1.ListHostsRequest.sets:type_name -> controller.api.resources.hostsets.v1.HostSet - 15, // 21: plugin.v1.ListHostsRequest.persisted:type_name -> plugin.v1.HostCatalogPersisted - 14, // 22: plugin.v1.ListHostsResponse.hosts:type_name -> plugin.v1.ListHostsResponseHost - 18, // 23: plugin.v1.ListHostsResponseHost.attributes:type_name -> google.protobuf.Struct - 18, // 24: plugin.v1.HostCatalogPersisted.secrets:type_name -> google.protobuf.Struct - 0, // 25: plugin.v1.HostPluginService.OnCreateCatalog:input_type -> plugin.v1.OnCreateCatalogRequest - 2, // 26: plugin.v1.HostPluginService.OnUpdateCatalog:input_type -> plugin.v1.OnUpdateCatalogRequest - 4, // 27: plugin.v1.HostPluginService.OnDeleteCatalog:input_type -> plugin.v1.OnDeleteCatalogRequest - 6, // 28: plugin.v1.HostPluginService.OnCreateSet:input_type -> plugin.v1.OnCreateSetRequest - 8, // 29: plugin.v1.HostPluginService.OnUpdateSet:input_type -> plugin.v1.OnUpdateSetRequest - 10, // 30: plugin.v1.HostPluginService.OnDeleteSet:input_type -> plugin.v1.OnDeleteSetRequest - 12, // 31: plugin.v1.HostPluginService.ListHosts:input_type -> plugin.v1.ListHostsRequest - 1, // 32: plugin.v1.HostPluginService.OnCreateCatalog:output_type -> plugin.v1.OnCreateCatalogResponse - 3, // 33: plugin.v1.HostPluginService.OnUpdateCatalog:output_type -> plugin.v1.OnUpdateCatalogResponse - 5, // 34: plugin.v1.HostPluginService.OnDeleteCatalog:output_type -> plugin.v1.OnDeleteCatalogResponse - 7, // 35: plugin.v1.HostPluginService.OnCreateSet:output_type -> plugin.v1.OnCreateSetResponse - 9, // 36: plugin.v1.HostPluginService.OnUpdateSet:output_type -> plugin.v1.OnUpdateSetResponse - 11, // 37: plugin.v1.HostPluginService.OnDeleteSet:output_type -> plugin.v1.OnDeleteSetResponse - 13, // 38: plugin.v1.HostPluginService.ListHosts:output_type -> plugin.v1.ListHostsResponse - 32, // [32:39] is the sub-list for method output_type - 25, // [25:32] is the sub-list for method input_type - 25, // [25:25] is the sub-list for extension type_name - 25, // [25:25] is the sub-list for extension extendee - 0, // [0:25] is the sub-list for field type_name + 20, // 0: plugin.v1.NormalizeCatalogDataRequest.attributes:type_name -> google.protobuf.Struct + 20, // 1: plugin.v1.NormalizeCatalogDataResponse.attributes:type_name -> google.protobuf.Struct + 21, // 2: plugin.v1.OnCreateCatalogRequest.catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog + 19, // 3: plugin.v1.OnCreateCatalogResponse.persisted:type_name -> plugin.v1.HostCatalogPersisted + 21, // 4: plugin.v1.OnUpdateCatalogRequest.current_catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog + 21, // 5: plugin.v1.OnUpdateCatalogRequest.new_catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog + 19, // 6: plugin.v1.OnUpdateCatalogRequest.persisted:type_name -> plugin.v1.HostCatalogPersisted + 19, // 7: plugin.v1.OnUpdateCatalogResponse.persisted:type_name -> plugin.v1.HostCatalogPersisted + 21, // 8: plugin.v1.OnDeleteCatalogRequest.catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog + 22, // 9: plugin.v1.OnDeleteCatalogRequest.sets:type_name -> controller.api.resources.hostsets.v1.HostSet + 19, // 10: plugin.v1.OnDeleteCatalogRequest.persisted:type_name -> plugin.v1.HostCatalogPersisted + 20, // 11: plugin.v1.NormalizeSetDataRequest.attributes:type_name -> google.protobuf.Struct + 20, // 12: plugin.v1.NormalizeSetDataResponse.attributes:type_name -> google.protobuf.Struct + 21, // 13: plugin.v1.OnCreateSetRequest.catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog + 22, // 14: plugin.v1.OnCreateSetRequest.set:type_name -> controller.api.resources.hostsets.v1.HostSet + 19, // 15: plugin.v1.OnCreateSetRequest.persisted:type_name -> plugin.v1.HostCatalogPersisted + 21, // 16: plugin.v1.OnUpdateSetRequest.catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog + 22, // 17: plugin.v1.OnUpdateSetRequest.current_set:type_name -> controller.api.resources.hostsets.v1.HostSet + 22, // 18: plugin.v1.OnUpdateSetRequest.new_set:type_name -> controller.api.resources.hostsets.v1.HostSet + 19, // 19: plugin.v1.OnUpdateSetRequest.persisted:type_name -> plugin.v1.HostCatalogPersisted + 21, // 20: plugin.v1.OnDeleteSetRequest.catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog + 22, // 21: plugin.v1.OnDeleteSetRequest.set:type_name -> controller.api.resources.hostsets.v1.HostSet + 19, // 22: plugin.v1.OnDeleteSetRequest.persisted:type_name -> plugin.v1.HostCatalogPersisted + 21, // 23: plugin.v1.ListHostsRequest.catalog:type_name -> controller.api.resources.hostcatalogs.v1.HostCatalog + 22, // 24: plugin.v1.ListHostsRequest.sets:type_name -> controller.api.resources.hostsets.v1.HostSet + 19, // 25: plugin.v1.ListHostsRequest.persisted:type_name -> plugin.v1.HostCatalogPersisted + 18, // 26: plugin.v1.ListHostsResponse.hosts:type_name -> plugin.v1.ListHostsResponseHost + 20, // 27: plugin.v1.ListHostsResponseHost.attributes:type_name -> google.protobuf.Struct + 20, // 28: plugin.v1.HostCatalogPersisted.secrets:type_name -> google.protobuf.Struct + 0, // 29: plugin.v1.HostPluginService.NormalizeCatalogData:input_type -> plugin.v1.NormalizeCatalogDataRequest + 2, // 30: plugin.v1.HostPluginService.OnCreateCatalog:input_type -> plugin.v1.OnCreateCatalogRequest + 4, // 31: plugin.v1.HostPluginService.OnUpdateCatalog:input_type -> plugin.v1.OnUpdateCatalogRequest + 6, // 32: plugin.v1.HostPluginService.OnDeleteCatalog:input_type -> plugin.v1.OnDeleteCatalogRequest + 8, // 33: plugin.v1.HostPluginService.NormalizeSetData:input_type -> plugin.v1.NormalizeSetDataRequest + 10, // 34: plugin.v1.HostPluginService.OnCreateSet:input_type -> plugin.v1.OnCreateSetRequest + 12, // 35: plugin.v1.HostPluginService.OnUpdateSet:input_type -> plugin.v1.OnUpdateSetRequest + 14, // 36: plugin.v1.HostPluginService.OnDeleteSet:input_type -> plugin.v1.OnDeleteSetRequest + 16, // 37: plugin.v1.HostPluginService.ListHosts:input_type -> plugin.v1.ListHostsRequest + 1, // 38: plugin.v1.HostPluginService.NormalizeCatalogData:output_type -> plugin.v1.NormalizeCatalogDataResponse + 3, // 39: plugin.v1.HostPluginService.OnCreateCatalog:output_type -> plugin.v1.OnCreateCatalogResponse + 5, // 40: plugin.v1.HostPluginService.OnUpdateCatalog:output_type -> plugin.v1.OnUpdateCatalogResponse + 7, // 41: plugin.v1.HostPluginService.OnDeleteCatalog:output_type -> plugin.v1.OnDeleteCatalogResponse + 9, // 42: plugin.v1.HostPluginService.NormalizeSetData:output_type -> plugin.v1.NormalizeSetDataResponse + 11, // 43: plugin.v1.HostPluginService.OnCreateSet:output_type -> plugin.v1.OnCreateSetResponse + 13, // 44: plugin.v1.HostPluginService.OnUpdateSet:output_type -> plugin.v1.OnUpdateSetResponse + 15, // 45: plugin.v1.HostPluginService.OnDeleteSet:output_type -> plugin.v1.OnDeleteSetResponse + 17, // 46: plugin.v1.HostPluginService.ListHosts:output_type -> plugin.v1.ListHostsResponse + 38, // [38:47] is the sub-list for method output_type + 29, // [29:38] is the sub-list for method input_type + 29, // [29:29] is the sub-list for extension type_name + 29, // [29:29] is the sub-list for extension extendee + 0, // [0:29] is the sub-list for field type_name } func init() { file_plugin_v1_host_plugin_service_proto_init() } @@ -1239,7 +1479,7 @@ func file_plugin_v1_host_plugin_service_proto_init() { } if !protoimpl.UnsafeEnabled { file_plugin_v1_host_plugin_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnCreateCatalogRequest); i { + switch v := v.(*NormalizeCatalogDataRequest); i { case 0: return &v.state case 1: @@ -1251,7 +1491,7 @@ func file_plugin_v1_host_plugin_service_proto_init() { } } file_plugin_v1_host_plugin_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnCreateCatalogResponse); i { + switch v := v.(*NormalizeCatalogDataResponse); i { case 0: return &v.state case 1: @@ -1263,7 +1503,7 @@ func file_plugin_v1_host_plugin_service_proto_init() { } } file_plugin_v1_host_plugin_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnUpdateCatalogRequest); i { + switch v := v.(*OnCreateCatalogRequest); i { case 0: return &v.state case 1: @@ -1275,7 +1515,7 @@ func file_plugin_v1_host_plugin_service_proto_init() { } } file_plugin_v1_host_plugin_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnUpdateCatalogResponse); i { + switch v := v.(*OnCreateCatalogResponse); i { case 0: return &v.state case 1: @@ -1287,7 +1527,7 @@ func file_plugin_v1_host_plugin_service_proto_init() { } } file_plugin_v1_host_plugin_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnDeleteCatalogRequest); i { + switch v := v.(*OnUpdateCatalogRequest); i { case 0: return &v.state case 1: @@ -1299,7 +1539,7 @@ func file_plugin_v1_host_plugin_service_proto_init() { } } file_plugin_v1_host_plugin_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnDeleteCatalogResponse); i { + switch v := v.(*OnUpdateCatalogResponse); i { case 0: return &v.state case 1: @@ -1311,7 +1551,7 @@ func file_plugin_v1_host_plugin_service_proto_init() { } } file_plugin_v1_host_plugin_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnCreateSetRequest); i { + switch v := v.(*OnDeleteCatalogRequest); i { case 0: return &v.state case 1: @@ -1323,7 +1563,7 @@ func file_plugin_v1_host_plugin_service_proto_init() { } } file_plugin_v1_host_plugin_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnCreateSetResponse); i { + switch v := v.(*OnDeleteCatalogResponse); i { case 0: return &v.state case 1: @@ -1335,7 +1575,7 @@ func file_plugin_v1_host_plugin_service_proto_init() { } } file_plugin_v1_host_plugin_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnUpdateSetRequest); i { + switch v := v.(*NormalizeSetDataRequest); i { case 0: return &v.state case 1: @@ -1347,7 +1587,7 @@ func file_plugin_v1_host_plugin_service_proto_init() { } } file_plugin_v1_host_plugin_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnUpdateSetResponse); i { + switch v := v.(*NormalizeSetDataResponse); i { case 0: return &v.state case 1: @@ -1359,7 +1599,7 @@ func file_plugin_v1_host_plugin_service_proto_init() { } } file_plugin_v1_host_plugin_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnDeleteSetRequest); i { + switch v := v.(*OnCreateSetRequest); i { case 0: return &v.state case 1: @@ -1371,7 +1611,7 @@ func file_plugin_v1_host_plugin_service_proto_init() { } } file_plugin_v1_host_plugin_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnDeleteSetResponse); i { + switch v := v.(*OnCreateSetResponse); i { case 0: return &v.state case 1: @@ -1383,7 +1623,7 @@ func file_plugin_v1_host_plugin_service_proto_init() { } } file_plugin_v1_host_plugin_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListHostsRequest); i { + switch v := v.(*OnUpdateSetRequest); i { case 0: return &v.state case 1: @@ -1395,7 +1635,7 @@ func file_plugin_v1_host_plugin_service_proto_init() { } } file_plugin_v1_host_plugin_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListHostsResponse); i { + switch v := v.(*OnUpdateSetResponse); i { case 0: return &v.state case 1: @@ -1407,7 +1647,7 @@ func file_plugin_v1_host_plugin_service_proto_init() { } } file_plugin_v1_host_plugin_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListHostsResponseHost); i { + switch v := v.(*OnDeleteSetRequest); i { case 0: return &v.state case 1: @@ -1419,6 +1659,54 @@ func file_plugin_v1_host_plugin_service_proto_init() { } } file_plugin_v1_host_plugin_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OnDeleteSetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_v1_host_plugin_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListHostsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_v1_host_plugin_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListHostsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_v1_host_plugin_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListHostsResponseHost); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_plugin_v1_host_plugin_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HostCatalogPersisted); i { case 0: return &v.state @@ -1437,7 +1725,7 @@ func file_plugin_v1_host_plugin_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_plugin_v1_host_plugin_service_proto_rawDesc, NumEnums: 0, - NumMessages: 16, + NumMessages: 20, NumExtensions: 0, NumServices: 1, }, diff --git a/sdk/pbs/plugin/host_plugin_service_grpc.pb.go b/sdk/pbs/plugin/host_plugin_service_grpc.pb.go index 0819b6df4..60d72ff11 100644 --- a/sdk/pbs/plugin/host_plugin_service_grpc.pb.go +++ b/sdk/pbs/plugin/host_plugin_service_grpc.pb.go @@ -18,8 +18,16 @@ const _ = grpc.SupportPackageIsVersion7 // // 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 HostPluginServiceClient interface { - // OnCreateCatalog is a hook that runs when a host catalog is - // created. + // NormalizeCatalogData is a hook that passes attributes to the plugin and + // allows those values to be normalized prior to creating or updating those + // values in the host catalog data. + // + // NormalizeCatalogData is called before: + // * OnCreateCatalog + // * OnUpdateCatalog + NormalizeCatalogData(ctx context.Context, in *NormalizeCatalogDataRequest, opts ...grpc.CallOption) (*NormalizeCatalogDataResponse, error) + // OnCreateCatalog is a hook that runs when a + // host catalog is created. OnCreateCatalog(ctx context.Context, in *OnCreateCatalogRequest, opts ...grpc.CallOption) (*OnCreateCatalogResponse, error) // OnUpdateCatalog is a hook that runs when a host catalog is // updated. @@ -27,6 +35,14 @@ type HostPluginServiceClient interface { // OnDeleteCatalog is a hook that runs when a host catalog is // deleted. OnDeleteCatalog(ctx context.Context, in *OnDeleteCatalogRequest, opts ...grpc.CallOption) (*OnDeleteCatalogResponse, error) + // NormalizeSetData is a hook that passes attributes to the plugin and + // allows those values to be normalized prior to creating or updating those + // values in the host set data. + // + // NormalizeSetData is called before: + // * OnCreateSet + // * OnUpdateSet + NormalizeSetData(ctx context.Context, in *NormalizeSetDataRequest, opts ...grpc.CallOption) (*NormalizeSetDataResponse, error) // OnCreateSet is a hook that runs when a host set is created. OnCreateSet(ctx context.Context, in *OnCreateSetRequest, opts ...grpc.CallOption) (*OnCreateSetResponse, error) // OnUpdateSet is a hook that runs when a host set is updated. @@ -45,6 +61,15 @@ func NewHostPluginServiceClient(cc grpc.ClientConnInterface) HostPluginServiceCl return &hostPluginServiceClient{cc} } +func (c *hostPluginServiceClient) NormalizeCatalogData(ctx context.Context, in *NormalizeCatalogDataRequest, opts ...grpc.CallOption) (*NormalizeCatalogDataResponse, error) { + out := new(NormalizeCatalogDataResponse) + err := c.cc.Invoke(ctx, "/plugin.v1.HostPluginService/NormalizeCatalogData", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *hostPluginServiceClient) OnCreateCatalog(ctx context.Context, in *OnCreateCatalogRequest, opts ...grpc.CallOption) (*OnCreateCatalogResponse, error) { out := new(OnCreateCatalogResponse) err := c.cc.Invoke(ctx, "/plugin.v1.HostPluginService/OnCreateCatalog", in, out, opts...) @@ -72,6 +97,15 @@ func (c *hostPluginServiceClient) OnDeleteCatalog(ctx context.Context, in *OnDel return out, nil } +func (c *hostPluginServiceClient) NormalizeSetData(ctx context.Context, in *NormalizeSetDataRequest, opts ...grpc.CallOption) (*NormalizeSetDataResponse, error) { + out := new(NormalizeSetDataResponse) + err := c.cc.Invoke(ctx, "/plugin.v1.HostPluginService/NormalizeSetData", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *hostPluginServiceClient) OnCreateSet(ctx context.Context, in *OnCreateSetRequest, opts ...grpc.CallOption) (*OnCreateSetResponse, error) { out := new(OnCreateSetResponse) err := c.cc.Invoke(ctx, "/plugin.v1.HostPluginService/OnCreateSet", in, out, opts...) @@ -112,8 +146,16 @@ func (c *hostPluginServiceClient) ListHosts(ctx context.Context, in *ListHostsRe // All implementations must embed UnimplementedHostPluginServiceServer // for forward compatibility type HostPluginServiceServer interface { - // OnCreateCatalog is a hook that runs when a host catalog is - // created. + // NormalizeCatalogData is a hook that passes attributes to the plugin and + // allows those values to be normalized prior to creating or updating those + // values in the host catalog data. + // + // NormalizeCatalogData is called before: + // * OnCreateCatalog + // * OnUpdateCatalog + NormalizeCatalogData(context.Context, *NormalizeCatalogDataRequest) (*NormalizeCatalogDataResponse, error) + // OnCreateCatalog is a hook that runs when a + // host catalog is created. OnCreateCatalog(context.Context, *OnCreateCatalogRequest) (*OnCreateCatalogResponse, error) // OnUpdateCatalog is a hook that runs when a host catalog is // updated. @@ -121,6 +163,14 @@ type HostPluginServiceServer interface { // OnDeleteCatalog is a hook that runs when a host catalog is // deleted. OnDeleteCatalog(context.Context, *OnDeleteCatalogRequest) (*OnDeleteCatalogResponse, error) + // NormalizeSetData is a hook that passes attributes to the plugin and + // allows those values to be normalized prior to creating or updating those + // values in the host set data. + // + // NormalizeSetData is called before: + // * OnCreateSet + // * OnUpdateSet + NormalizeSetData(context.Context, *NormalizeSetDataRequest) (*NormalizeSetDataResponse, error) // OnCreateSet is a hook that runs when a host set is created. OnCreateSet(context.Context, *OnCreateSetRequest) (*OnCreateSetResponse, error) // OnUpdateSet is a hook that runs when a host set is updated. @@ -136,6 +186,9 @@ type HostPluginServiceServer interface { type UnimplementedHostPluginServiceServer struct { } +func (UnimplementedHostPluginServiceServer) NormalizeCatalogData(context.Context, *NormalizeCatalogDataRequest) (*NormalizeCatalogDataResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NormalizeCatalogData not implemented") +} func (UnimplementedHostPluginServiceServer) OnCreateCatalog(context.Context, *OnCreateCatalogRequest) (*OnCreateCatalogResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method OnCreateCatalog not implemented") } @@ -145,6 +198,9 @@ func (UnimplementedHostPluginServiceServer) OnUpdateCatalog(context.Context, *On func (UnimplementedHostPluginServiceServer) OnDeleteCatalog(context.Context, *OnDeleteCatalogRequest) (*OnDeleteCatalogResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method OnDeleteCatalog not implemented") } +func (UnimplementedHostPluginServiceServer) NormalizeSetData(context.Context, *NormalizeSetDataRequest) (*NormalizeSetDataResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NormalizeSetData not implemented") +} func (UnimplementedHostPluginServiceServer) OnCreateSet(context.Context, *OnCreateSetRequest) (*OnCreateSetResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method OnCreateSet not implemented") } @@ -170,6 +226,24 @@ func RegisterHostPluginServiceServer(s grpc.ServiceRegistrar, srv HostPluginServ s.RegisterService(&HostPluginService_ServiceDesc, srv) } +func _HostPluginService_NormalizeCatalogData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NormalizeCatalogDataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostPluginServiceServer).NormalizeCatalogData(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/plugin.v1.HostPluginService/NormalizeCatalogData", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostPluginServiceServer).NormalizeCatalogData(ctx, req.(*NormalizeCatalogDataRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _HostPluginService_OnCreateCatalog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(OnCreateCatalogRequest) if err := dec(in); err != nil { @@ -224,6 +298,24 @@ func _HostPluginService_OnDeleteCatalog_Handler(srv interface{}, ctx context.Con return interceptor(ctx, in, info, handler) } +func _HostPluginService_NormalizeSetData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NormalizeSetDataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HostPluginServiceServer).NormalizeSetData(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/plugin.v1.HostPluginService/NormalizeSetData", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HostPluginServiceServer).NormalizeSetData(ctx, req.(*NormalizeSetDataRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _HostPluginService_OnCreateSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(OnCreateSetRequest) if err := dec(in); err != nil { @@ -303,6 +395,10 @@ var HostPluginService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "plugin.v1.HostPluginService", HandlerType: (*HostPluginServiceServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "NormalizeCatalogData", + Handler: _HostPluginService_NormalizeCatalogData_Handler, + }, { MethodName: "OnCreateCatalog", Handler: _HostPluginService_OnCreateCatalog_Handler, @@ -315,6 +411,10 @@ var HostPluginService_ServiceDesc = grpc.ServiceDesc{ MethodName: "OnDeleteCatalog", Handler: _HostPluginService_OnDeleteCatalog_Handler, }, + { + MethodName: "NormalizeSetData", + Handler: _HostPluginService_NormalizeSetData_Handler, + }, { MethodName: "OnCreateSet", Handler: _HostPluginService_OnCreateSet_Handler,