From 555983f1c62789abb01a2f0ad8ee25c87d6f926f Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Date: Thu, 5 Oct 2023 09:00:50 +0300 Subject: [PATCH] cleanup: Rename policy to profile Per confusion on the name `policy` this renames that concept into "profiles" instead. --- .../{policy/policy.go => profile/profile.go} | 16 +- .../profile_create.go} | 30 +- .../profile_delete.go} | 28 +- .../policy_get.go => profile/profile_get.go} | 34 +- .../profile_list.go} | 30 +- .../app/{policy => profile}/table_render.go | 14 +- .../profile_status.go} | 16 +- .../profile_status_get.go} | 46 +- .../profile_status_list.go} | 50 +- .../table_render.go | 16 +- cmd/cli/app/repo/repo_get.go | 2 +- cmd/cli/app/rule_type/rule_type_create.go | 6 +- cmd/cli/app/rule_type/rule_type_delete.go | 10 +- cmd/cli/app/rule_type/rule_type_get.go | 6 +- cmd/cli/app/rule_type/rule_type_list.go | 4 +- cmd/cli/main.go | 4 +- cmd/dev/app/rule_type/rule_type.go | 12 +- database/migrations/000001_init.down.sql | 6 +- database/migrations/000001_init.up.sql | 66 +- database/mock/store.go | 152 +- database/query/policies.sql | 31 - .../{policy_status.sql => profile_status.sql} | 30 +- database/query/profiles.sql | 31 + deployment/helm/templates/ingress.yaml | 2 +- docs/docs/cli/medic.md | 4 +- docs/docs/cli/medic_policy.md | 36 - docs/docs/cli/medic_policy_status_get.md | 38 - docs/docs/cli/medic_policy_status_list.md | 38 - docs/docs/cli/medic_profile.md | 36 + ...licy_create.md => medic_profile_create.md} | 14 +- ...licy_delete.md => medic_profile_delete.md} | 14 +- ...dic_policy_get.md => medic_profile_get.md} | 14 +- ...c_policy_list.md => medic_profile_list.md} | 12 +- ...licy_status.md => medic_profile_status.md} | 14 +- docs/docs/cli/medic_profile_status_get.md | 38 + docs/docs/cli/medic_profile_status_list.md | 38 + docs/docs/cli/medic_repo_get.md | 2 +- docs/docs/cli/medic_rule_type_create.md | 2 +- docs/docs/cli/medic_rule_type_delete.md | 2 +- docs/docs/cli/medic_rule_type_get.md | 4 +- docs/docs/intro.md | 4 +- .../docs/policy_engine/policy_introduction.md | 24 - .../manage_profiles.md} | 88 +- .../profile_engine/profile_introduction.md | 24 + docs/docs/protodocs/proto.md | 224 +- docs/sidebars.js | 6 +- .../{policies => profiles}/pr_vuln_check.yaml | 8 +- .../policy.yaml => profiles/profile.yaml} | 6 +- .../profile_artifact.yaml} | 6 +- .../rule-types/actions_check_pinned_tags.yaml | 2 +- .../rule-types/allowed_selected_actions.yaml | 12 +- .../github/rule-types/artifact_signature.yaml | 4 +- .../github/rule-types/branch_protection.yaml | 16 +- .../github/rule-types/codeql_enabled.yaml | 2 +- .../default_workflow_permissions.yaml | 8 +- .../rule-types/dependabot_configured.yaml | 10 +- .../rule-types/dockerfile_no_latest_tag.yaml | 2 +- .../rule-types/github_actions_allowed.yaml | 10 +- .../rule-types/pr_vulnerability_check.yaml | 6 +- .../repo_workflow_access_level.yaml | 6 +- .../rule-types/secret_push_protection.yaml | 6 +- .../github/rule-types/secret_scanning.yaml | 6 +- .../rule-types/trivy_action_enabled.yaml | 2 +- ...handlers_policy.go => handlers_profile.go} | 186 +- internal/controlplane/register_handlers.go | 8 +- internal/controlplane/server.go | 2 +- internal/db/models.go | 18 +- ...cy_status.sql.go => profile_status.sql.go} | 116 +- .../db/{policies.sql.go => profiles.sql.go} | 116 +- internal/db/querier.go | 22 +- internal/engine/doc.go | 2 +- internal/engine/entity_event.go | 4 +- internal/engine/eval/eval_test.go | 4 +- internal/engine/eval/jq/jq.go | 22 +- internal/engine/eval/jq/jq_test.go | 48 +- internal/engine/eval/rego/config.go | 2 +- internal/engine/eval/rego/eval.go | 8 +- internal/engine/eval/rego/rego_test.go | 32 +- internal/engine/eval/vulncheck/actions.go | 4 +- internal/engine/eval/vulncheck/config.go | 2 +- internal/engine/eval/vulncheck/review.go | 10 +- internal/engine/eval_status.go | 10 +- internal/engine/executor.go | 38 +- internal/engine/executor_test.go | 16 +- internal/engine/ingester/git/config.go | 2 +- internal/engine/interfaces/interface.go | 2 +- internal/engine/{policy.go => profile.go} | 104 +- .../{policy_test.go => profile_test.go} | 96 +- internal/engine/remediate/remediate_test.go | 2 +- internal/engine/remediate/rest/rest.go | 8 +- internal/engine/remediate/rest/rest_test.go | 2 +- internal/engine/rule_types.go | 18 +- internal/engine/rule_types_test.go | 10 +- internal/reconcilers/artifacts.go | 2 +- internal/reconcilers/reconcilers.go | 6 +- .../{run_policy.go => run_profile.go} | 40 +- .../openapi/mediator/v1/mediator.swagger.json | 260 +- .../protobuf/go/mediator/v1/mediator.pb.go | 2342 +++++++++-------- .../protobuf/go/mediator/v1/mediator.pb.gw.go | 420 +-- .../go/mediator/v1/mediator_grpc.pb.go | 332 +-- .../go/mediator/v1/{policy.go => profile.go} | 0 pkg/api/protobuf/go/mediator/v1/validators.go | 14 +- proto/mediator/v1/mediator.proto | 134 +- tools/setup.sh | 4 +- 104 files changed, 2951 insertions(+), 2947 deletions(-) rename cmd/cli/app/{policy/policy.go => profile/profile.go} (68%) rename cmd/cli/app/{policy/policy_create.go => profile/profile_create.go} (71%) rename cmd/cli/app/{policy/policy_delete.go => profile/profile_delete.go} (66%) rename cmd/cli/app/{policy/policy_get.go => profile/profile_get.go} (69%) rename cmd/cli/app/{policy/policy_list.go => profile/profile_list.go} (72%) rename cmd/cli/app/{policy => profile}/table_render.go (93%) rename cmd/cli/app/{policy_status/policy_status.go => profile_status/profile_status.go} (64%) rename cmd/cli/app/{policy_status/policy_status_get.go => profile_status/profile_status_get.go} (61%) rename cmd/cli/app/{policy_status/policy_status_list.go => profile_status/profile_status_list.go} (63%) rename cmd/cli/app/{policy_status => profile_status}/table_render.go (95%) delete mode 100644 database/query/policies.sql rename database/query/{policy_status.sql => profile_status.sql} (75%) create mode 100644 database/query/profiles.sql delete mode 100644 docs/docs/cli/medic_policy.md delete mode 100644 docs/docs/cli/medic_policy_status_get.md delete mode 100644 docs/docs/cli/medic_policy_status_list.md create mode 100644 docs/docs/cli/medic_profile.md rename docs/docs/cli/{medic_policy_create.md => medic_profile_create.md} (52%) rename docs/docs/cli/{medic_policy_delete.md => medic_profile_delete.md} (53%) rename docs/docs/cli/{medic_policy_get.md => medic_profile_get.md} (56%) rename docs/docs/cli/{medic_policy_list.md => medic_profile_list.md} (64%) rename docs/docs/cli/{medic_policy_status.md => medic_profile_status.md} (50%) create mode 100644 docs/docs/cli/medic_profile_status_get.md create mode 100644 docs/docs/cli/medic_profile_status_list.md delete mode 100644 docs/docs/policy_engine/policy_introduction.md rename docs/docs/{policy_engine/manage_policies.md => profile_engine/manage_profiles.md} (63%) create mode 100644 docs/docs/profile_engine/profile_introduction.md rename examples/github/{policies => profiles}/pr_vuln_check.yaml (82%) rename examples/github/{policies/policy.yaml => profiles/profile.yaml} (96%) rename examples/github/{policies/policy_artifact.yaml => profiles/profile_artifact.yaml} (68%) rename internal/controlplane/{handlers_policy.go => handlers_profile.go} (79%) rename internal/db/{policy_status.sql.go => profile_status.sql.go} (68%) rename internal/db/{policies.sql.go => profiles.sql.go} (56%) rename internal/engine/{policy.go => profile.go} (67%) rename internal/engine/{policy_test.go => profile_test.go} (88%) rename internal/reconcilers/{run_policy.go => run_profile.go} (80%) rename pkg/api/protobuf/go/mediator/v1/{policy.go => profile.go} (100%) diff --git a/cmd/cli/app/policy/policy.go b/cmd/cli/app/profile/profile.go similarity index 68% rename from cmd/cli/app/policy/policy.go rename to cmd/cli/app/profile/profile.go index afbbc0f532..b26f3fdf48 100644 --- a/cmd/cli/app/policy/policy.go +++ b/cmd/cli/app/profile/profile.go @@ -13,8 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package policy provides the CLI subcommand for managing policies -package policy +// Package profile provides the CLI subcommand for managing profiles +package profile import ( "github.com/spf13/cobra" @@ -22,11 +22,11 @@ import ( "github.com/stacklok/mediator/cmd/cli/app" ) -// PolicyCmd is the root command for the policy subcommands -var PolicyCmd = &cobra.Command{ - Use: "policy", - Short: "Manage policies within a mediator control plane", - Long: `The medic policy subcommands allows the management of policies within +// ProfileCmd is the root command for the profile subcommands +var ProfileCmd = &cobra.Command{ + Use: "profile", + Short: "Manage profiles within a mediator control plane", + Long: `The medic profile subcommands allows the management of profiles within a mediator controlplane.`, RunE: func(cmd *cobra.Command, args []string) error { return cmd.Usage() @@ -34,5 +34,5 @@ a mediator controlplane.`, } func init() { - app.RootCmd.AddCommand(PolicyCmd) + app.RootCmd.AddCommand(ProfileCmd) } diff --git a/cmd/cli/app/policy/policy_create.go b/cmd/cli/app/profile/profile_create.go similarity index 71% rename from cmd/cli/app/policy/policy_create.go rename to cmd/cli/app/profile/profile_create.go index 40a56f4186..ea6fca26e6 100644 --- a/cmd/cli/app/policy/policy_create.go +++ b/cmd/cli/app/profile/profile_create.go @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package policy +package profile import ( "fmt" @@ -29,11 +29,11 @@ import ( pb "github.com/stacklok/mediator/pkg/api/protobuf/go/mediator/v1" ) -// Policy_createCmd represents the policy create command -var Policy_createCmd = &cobra.Command{ +// Profile_createCmd represents the profile create command +var Profile_createCmd = &cobra.Command{ Use: "create", - Short: "Create a policy within a mediator control plane", - Long: `The medic policy create subcommand lets you create new policies for a project + Short: "Create a profile within a mediator control plane", + Long: `The medic profile create subcommand lets you create new profiles for a project within a mediator control plane.`, PreRun: func(cmd *cobra.Command, args []string) { if err := viper.BindPFlags(cmd.Flags()); err != nil { @@ -70,13 +70,13 @@ within a mediator control plane.`, util.ExitNicelyOnError(err, "Error getting grpc connection") defer conn.Close() - client := pb.NewPolicyServiceClient(conn) + client := pb.NewProfileServiceClient(conn) ctx, cancel := util.GetAppContext() defer cancel() p, err := engine.ParseYAML(preader) if err != nil { - return fmt.Errorf("error reading policy from file: %w", err) + return fmt.Errorf("error reading profile from file: %w", err) } if proj != "" { @@ -87,23 +87,23 @@ within a mediator control plane.`, p.Context.Project = &proj } - // create a policy - resp, err := client.CreatePolicy(ctx, &pb.CreatePolicyRequest{ - Policy: p, + // create a profile + resp, err := client.CreateProfile(ctx, &pb.CreateProfileRequest{ + Profile: p, }) if err != nil { - return fmt.Errorf("error creating policy: %w", err) + return fmt.Errorf("error creating profile: %w", err) } table := initializeTable(cmd) - renderPolicyTable(resp.GetPolicy(), table) + renderProfileTable(resp.GetProfile(), table) table.Render() return nil }, } func init() { - PolicyCmd.AddCommand(Policy_createCmd) - Policy_createCmd.Flags().StringP("file", "f", "", "Path to the YAML defining the policy (or - for stdin)") - Policy_createCmd.Flags().StringP("project", "p", "", "Project to create the policy in") + ProfileCmd.AddCommand(Profile_createCmd) + Profile_createCmd.Flags().StringP("file", "f", "", "Path to the YAML defining the profile (or - for stdin)") + Profile_createCmd.Flags().StringP("project", "p", "", "Project to create the profile in") } diff --git a/cmd/cli/app/policy/policy_delete.go b/cmd/cli/app/profile/profile_delete.go similarity index 66% rename from cmd/cli/app/policy/policy_delete.go rename to cmd/cli/app/profile/profile_delete.go index 5a4018726e..892b310432 100644 --- a/cmd/cli/app/policy/policy_delete.go +++ b/cmd/cli/app/profile/profile_delete.go @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package policy +package profile import ( "fmt" @@ -26,10 +26,10 @@ import ( pb "github.com/stacklok/mediator/pkg/api/protobuf/go/mediator/v1" ) -var policy_deleteCmd = &cobra.Command{ +var profile_deleteCmd = &cobra.Command{ Use: "delete", - Short: "delete a policy within a mediator controlplane", - Long: `The medic policy delete subcommand lets you delete policies within a + Short: "delete a profile within a mediator controlplane", + Long: `The medic profile delete subcommand lets you delete profiles within a mediator control plane.`, PreRun: func(cmd *cobra.Command, args []string) { if err := viper.BindPFlags(cmd.Flags()); err != nil { @@ -37,7 +37,7 @@ mediator control plane.`, } }, Run: func(cmd *cobra.Command, args []string) { - // delete the policy via GRPC + // delete the profile via GRPC id := viper.GetString("id") provider := viper.GetString("provider") @@ -46,27 +46,27 @@ mediator control plane.`, util.ExitNicelyOnError(err, "Error getting grpc connection") defer conn.Close() - client := pb.NewPolicyServiceClient(conn) + client := pb.NewProfileServiceClient(conn) ctx, cancel := util.GetAppContext() defer cancel() - _, err = client.DeletePolicy(ctx, &pb.DeletePolicyRequest{ + _, err = client.DeleteProfile(ctx, &pb.DeleteProfileRequest{ Context: &pb.Context{ Provider: provider, }, Id: id, }) - util.ExitNicelyOnError(err, "Error deleting policy") - cmd.Println("Successfully deleted policy with id:", id) + util.ExitNicelyOnError(err, "Error deleting profile") + cmd.Println("Successfully deleted profile with id:", id) }, } func init() { - PolicyCmd.AddCommand(policy_deleteCmd) - policy_deleteCmd.Flags().StringP("id", "i", "", "id of policy to delete") - policy_deleteCmd.Flags().StringP("provider", "p", "github", "Provider for the policy") - err := policy_deleteCmd.MarkFlagRequired("id") + ProfileCmd.AddCommand(profile_deleteCmd) + profile_deleteCmd.Flags().StringP("id", "i", "", "id of profile to delete") + profile_deleteCmd.Flags().StringP("provider", "p", "github", "Provider for the profile") + err := profile_deleteCmd.MarkFlagRequired("id") util.ExitNicelyOnError(err, "Error marking flag as required") - // TODO: add a flag for the policy name + // TODO: add a flag for the profile name } diff --git a/cmd/cli/app/policy/policy_get.go b/cmd/cli/app/profile/profile_get.go similarity index 69% rename from cmd/cli/app/policy/policy_get.go rename to cmd/cli/app/profile/profile_get.go index 764792ffa7..5f29ad6902 100644 --- a/cmd/cli/app/policy/policy_get.go +++ b/cmd/cli/app/profile/profile_get.go @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package policy +package profile import ( "fmt" @@ -27,10 +27,10 @@ import ( pb "github.com/stacklok/mediator/pkg/api/protobuf/go/mediator/v1" ) -var policy_getCmd = &cobra.Command{ +var profile_getCmd = &cobra.Command{ Use: "get", - Short: "Get details for a policy within a mediator control plane", - Long: `The medic policy get subcommand lets you retrieve details for a policy within a + Short: "Get details for a profile within a mediator control plane", + Long: `The medic profile get subcommand lets you retrieve details for a profile within a mediator control plane.`, PreRun: func(cmd *cobra.Command, args []string) { if err := viper.BindPFlags(cmd.Flags()); err != nil { @@ -49,12 +49,12 @@ mediator control plane.`, util.ExitNicelyOnError(err, "Error getting grpc connection") defer conn.Close() - client := pb.NewPolicyServiceClient(conn) + client := pb.NewProfileServiceClient(conn) ctx, cancel := util.GetAppContext() defer cancel() id := viper.GetString("id") - policy, err := client.GetPolicyById(ctx, &pb.GetPolicyByIdRequest{ + profile, err := client.GetProfileById(ctx, &pb.GetProfileByIdRequest{ Context: &pb.Context{ Provider: provider, // TODO set up project if specified @@ -62,19 +62,19 @@ mediator control plane.`, }, Id: id, }) - util.ExitNicelyOnError(err, "Error getting policy") + util.ExitNicelyOnError(err, "Error getting profile") switch format { case app.YAML: - out, err := util.GetYamlFromProto(policy) + out, err := util.GetYamlFromProto(profile) util.ExitNicelyOnError(err, "Error getting yaml from proto") fmt.Println(out) case app.JSON: - out, err := util.GetJsonFromProto(policy) + out, err := util.GetJsonFromProto(profile) util.ExitNicelyOnError(err, "Error getting json from proto") fmt.Println(out) case app.Table: - p := policy.GetPolicy() + p := profile.GetProfile() handleGetTableOutput(cmd, p) } @@ -83,23 +83,23 @@ mediator control plane.`, } func init() { - PolicyCmd.AddCommand(policy_getCmd) - policy_getCmd.Flags().StringP("id", "i", "", "ID for the policy to query") - policy_getCmd.Flags().StringP("output", "o", app.Table, "Output format (json, yaml or table)") - policy_getCmd.Flags().StringP("provider", "p", "github", "Provider for the policy") + ProfileCmd.AddCommand(profile_getCmd) + profile_getCmd.Flags().StringP("id", "i", "", "ID for the profile to query") + profile_getCmd.Flags().StringP("output", "o", app.Table, "Output format (json, yaml or table)") + profile_getCmd.Flags().StringP("provider", "p", "github", "Provider for the profile") // TODO set up project if specified - if err := policy_getCmd.MarkFlagRequired("id"); err != nil { + if err := profile_getCmd.MarkFlagRequired("id"); err != nil { fmt.Fprintf(os.Stderr, "Error marking flag as required: %s\n", err) os.Exit(1) } } -func handleGetTableOutput(cmd *cobra.Command, policy *pb.Policy) { +func handleGetTableOutput(cmd *cobra.Command, profile *pb.Profile) { table := initializeTable(cmd) - renderPolicyTable(policy, table) + renderProfileTable(profile, table) table.Render() } diff --git a/cmd/cli/app/policy/policy_list.go b/cmd/cli/app/profile/profile_list.go similarity index 72% rename from cmd/cli/app/policy/policy_list.go rename to cmd/cli/app/profile/profile_list.go index 66860f1a3c..12d701392a 100644 --- a/cmd/cli/app/policy/policy_list.go +++ b/cmd/cli/app/profile/profile_list.go @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package policy +package profile import ( "fmt" @@ -27,10 +27,10 @@ import ( pb "github.com/stacklok/mediator/pkg/api/protobuf/go/mediator/v1" ) -var policy_listCmd = &cobra.Command{ +var profile_listCmd = &cobra.Command{ Use: "list", - Short: "List policies within a mediator control plane", - Long: `The medic policy list subcommand lets you list policies within a + Short: "List profiles within a mediator control plane", + Long: `The medic profile list subcommand lets you list profiles within a mediator control plane for an specific project.`, PreRun: func(cmd *cobra.Command, args []string) { if err := viper.BindPFlags(cmd.Flags()); err != nil { @@ -46,7 +46,7 @@ mediator control plane for an specific project.`, } defer conn.Close() - client := pb.NewPolicyServiceClient(conn) + client := pb.NewProfileServiceClient(conn) ctx, cancel := util.GetAppContext() defer cancel() @@ -60,7 +60,7 @@ mediator control plane for an specific project.`, return fmt.Errorf("invalid format: %s", format) } - resp, err := client.ListPolicies(ctx, &pb.ListPoliciesRequest{ + resp, err := client.ListProfiles(ctx, &pb.ListProfilesRequest{ Context: &pb.Context{ Provider: provider, // TODO set up project if specified @@ -68,7 +68,7 @@ mediator control plane for an specific project.`, }, }) if err != nil { - return fmt.Errorf("error getting policies: %w", err) + return fmt.Errorf("error getting profiles: %w", err) } switch format { @@ -91,23 +91,23 @@ mediator control plane for an specific project.`, } func init() { - PolicyCmd.AddCommand(policy_listCmd) - policy_listCmd.Flags().StringP("provider", "p", "", "Provider to list policies for") - policy_listCmd.Flags().StringP("output", "o", app.Table, "Output format (json, yaml or table)") + ProfileCmd.AddCommand(profile_listCmd) + profile_listCmd.Flags().StringP("provider", "p", "", "Provider to list profiles for") + profile_listCmd.Flags().StringP("output", "o", app.Table, "Output format (json, yaml or table)") // TODO: Take project ID into account - // policy_listCmd.Flags().Int32P("project-id", "g", 0, "project id to list roles for") + // profile_listCmd.Flags().Int32P("project-id", "g", 0, "project id to list roles for") - if err := policy_listCmd.MarkFlagRequired("provider"); err != nil { + if err := profile_listCmd.MarkFlagRequired("provider"); err != nil { fmt.Fprintf(os.Stderr, "Error marking flag as required: %s\n", err) os.Exit(1) } } -func handleListTableOutput(cmd *cobra.Command, resp *pb.ListPoliciesResponse) { +func handleListTableOutput(cmd *cobra.Command, resp *pb.ListProfilesResponse) { table := initializeTable(cmd) - for _, v := range resp.Policies { - renderPolicyTable(v, table) + for _, v := range resp.Profiles { + renderProfileTable(v, table) } table.Render() } diff --git a/cmd/cli/app/policy/table_render.go b/cmd/cli/app/profile/table_render.go similarity index 93% rename from cmd/cli/app/policy/table_render.go rename to cmd/cli/app/profile/table_render.go index 7a1d024b2c..f4d6902a54 100644 --- a/cmd/cli/app/policy/table_render.go +++ b/cmd/cli/app/profile/table_render.go @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package policy +package profile import ( "github.com/olekukonko/tablewriter" @@ -36,8 +36,8 @@ func initializeTable(cmd *cobra.Command) *tablewriter.Table { return table } -func renderPolicyTable( - p *mediatorv1.Policy, +func renderProfileTable( + p *mediatorv1.Profile, table *tablewriter.Table, ) { // repositories @@ -54,9 +54,9 @@ func renderPolicyTable( } func renderEntityRuleSets( - p *mediatorv1.Policy, + p *mediatorv1.Profile, entType mediatorv1.EntityType, - rs []*mediatorv1.Policy_Rule, + rs []*mediatorv1.Profile_Rule, table *tablewriter.Table, ) { for idx := range rs { @@ -67,9 +67,9 @@ func renderEntityRuleSets( } func renderRuleTable( - p *mediatorv1.Policy, + p *mediatorv1.Profile, entType mediatorv1.EntityType, - rule *mediatorv1.Policy_Rule, + rule *mediatorv1.Profile_Rule, table *tablewriter.Table, ) { diff --git a/cmd/cli/app/policy_status/policy_status.go b/cmd/cli/app/profile_status/profile_status.go similarity index 64% rename from cmd/cli/app/policy_status/policy_status.go rename to cmd/cli/app/profile_status/profile_status.go index 9aa9444d02..0bc29a81fe 100644 --- a/cmd/cli/app/policy_status/policy_status.go +++ b/cmd/cli/app/profile_status/profile_status.go @@ -13,8 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package policy_status provides the CLI subcommand for managing policy statuses -package policy_status +// Package profile_status provides the CLI subcommand for managing profile statuses +package profile_status import ( "github.com/spf13/cobra" @@ -22,11 +22,11 @@ import ( "github.com/stacklok/mediator/cmd/cli/app" ) -// PolicyStatusCmd is the root command for the policy_status subcommands -var PolicyStatusCmd = &cobra.Command{ - Use: "policy_status", - Short: "Manage policy status within a mediator control plane", - Long: `The medic policy_status subcommands allows the management of policy status within +// ProfileStatusCmd is the root command for the profile_status subcommands +var ProfileStatusCmd = &cobra.Command{ + Use: "profile_status", + Short: "Manage profile status within a mediator control plane", + Long: `The medic profile_status subcommands allows the management of profile status within a mediator controlplane.`, RunE: func(cmd *cobra.Command, args []string) error { return cmd.Usage() @@ -34,5 +34,5 @@ a mediator controlplane.`, } func init() { - app.RootCmd.AddCommand(PolicyStatusCmd) + app.RootCmd.AddCommand(ProfileStatusCmd) } diff --git a/cmd/cli/app/policy_status/policy_status_get.go b/cmd/cli/app/profile_status/profile_status_get.go similarity index 61% rename from cmd/cli/app/policy_status/policy_status_get.go rename to cmd/cli/app/profile_status/profile_status_get.go index 9cc96e2173..24a18391f1 100644 --- a/cmd/cli/app/policy_status/policy_status_get.go +++ b/cmd/cli/app/profile_status/profile_status_get.go @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package policy_status +package profile_status import ( "fmt" @@ -28,11 +28,11 @@ import ( mediatorv1 "github.com/stacklok/mediator/pkg/api/protobuf/go/mediator/v1" ) -var policystatus_getCmd = &cobra.Command{ +var profilestatus_getCmd = &cobra.Command{ Use: "get", - Short: "Get policy status within a mediator control plane", - Long: `The medic policy_status get subcommand lets you get policy status within a -mediator control plane for an specific provider/project or policy id, entity type and entity id.`, + Short: "Get profile status within a mediator control plane", + Long: `The medic profile_status get subcommand lets you get profile status within a +mediator control plane for an specific provider/project or profile id, entity type and entity id.`, PreRun: func(cmd *cobra.Command, args []string) { if err := viper.BindPFlags(cmd.Flags()); err != nil { fmt.Fprintf(os.Stderr, "Error binding flags: %s\n", err) @@ -45,13 +45,13 @@ mediator control plane for an specific provider/project or policy id, entity typ } defer conn.Close() - client := mediatorv1.NewPolicyServiceClient(conn) + client := mediatorv1.NewProfileServiceClient(conn) ctx, cancel := util.GetAppContext() defer cancel() provider := viper.GetString("provider") project := viper.GetString("project") - policyName := viper.GetString("policy") + profileName := viper.GetString("profile") entityId := viper.GetString("entity") entityType := viper.GetString("entity-type") format := viper.GetString("output") @@ -66,12 +66,12 @@ mediator control plane for an specific provider/project or policy id, entity typ return fmt.Errorf("provider must be set") } - req := &mediatorv1.GetPolicyStatusByNameRequest{ + req := &mediatorv1.GetProfileStatusByNameRequest{ Context: &mediatorv1.Context{ Provider: provider, }, - Name: policyName, - Entity: &mediatorv1.GetPolicyStatusByNameRequest_EntityTypedId{ + Name: profileName, + Entity: &mediatorv1.GetProfileStatusByNameRequest_EntityTypedId{ Id: entityId, Type: mediatorv1.EntityFromString(entityType), }, @@ -81,9 +81,9 @@ mediator control plane for an specific provider/project or policy id, entity typ req.Context.Project = &project } - resp, err := client.GetPolicyStatusByName(ctx, req) + resp, err := client.GetProfileStatusByName(ctx, req) if err != nil { - return fmt.Errorf("error getting policy status: %w", err) + return fmt.Errorf("error getting profile status: %w", err) } switch format { @@ -96,7 +96,7 @@ mediator control plane for an specific provider/project or policy id, entity typ util.ExitNicelyOnError(err, "Error getting yaml from proto") fmt.Println(out) case app.Table: - handlePolicyStatusListTable(cmd, resp) + handleProfileStatusListTable(cmd, resp) } return nil @@ -104,20 +104,20 @@ mediator control plane for an specific provider/project or policy id, entity typ } func init() { - PolicyStatusCmd.AddCommand(policystatus_getCmd) - policystatus_getCmd.Flags().StringP("provider", "p", "github", "Provider to get policy status for") - policystatus_getCmd.Flags().StringP("project", "g", "", "project id to get policy status for") - policystatus_getCmd.Flags().StringP("policy", "i", "", "policy name to get policy status for") - policystatus_getCmd.Flags().StringP("entity-type", "t", "", - fmt.Sprintf("the entity type to get policy status for (one of %s)", entities.KnownTypesCSV())) - policystatus_getCmd.Flags().StringP("entity", "e", "", "entity id to get policy status for") - policystatus_getCmd.Flags().StringP("output", "o", app.Table, "Output format (json, yaml or table)") + ProfileStatusCmd.AddCommand(profilestatus_getCmd) + profilestatus_getCmd.Flags().StringP("provider", "p", "github", "Provider to get profile status for") + profilestatus_getCmd.Flags().StringP("project", "g", "", "project id to get profile status for") + profilestatus_getCmd.Flags().StringP("profile", "i", "", "profile name to get profile status for") + profilestatus_getCmd.Flags().StringP("entity-type", "t", "", + fmt.Sprintf("the entity type to get profile status for (one of %s)", entities.KnownTypesCSV())) + profilestatus_getCmd.Flags().StringP("entity", "e", "", "entity id to get profile status for") + profilestatus_getCmd.Flags().StringP("output", "o", app.Table, "Output format (json, yaml or table)") // mark as required - if err := policystatus_getCmd.MarkFlagRequired("policy"); err != nil { + if err := profilestatus_getCmd.MarkFlagRequired("profile"); err != nil { util.ExitNicelyOnError(err, "error marking flag as required") } - if err := policystatus_getCmd.MarkFlagRequired("entity"); err != nil { + if err := profilestatus_getCmd.MarkFlagRequired("entity"); err != nil { util.ExitNicelyOnError(err, "error marking flag as required") } } diff --git a/cmd/cli/app/policy_status/policy_status_list.go b/cmd/cli/app/profile_status/profile_status_list.go similarity index 63% rename from cmd/cli/app/policy_status/policy_status_list.go rename to cmd/cli/app/profile_status/profile_status_list.go index 1182d50b0d..cefce9aa3f 100644 --- a/cmd/cli/app/policy_status/policy_status_list.go +++ b/cmd/cli/app/profile_status/profile_status_list.go @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package policy_status +package profile_status import ( "fmt" @@ -27,11 +27,11 @@ import ( pb "github.com/stacklok/mediator/pkg/api/protobuf/go/mediator/v1" ) -var policystatus_listCmd = &cobra.Command{ +var profilestatus_listCmd = &cobra.Command{ Use: "list", - Short: "List policy status within a mediator control plane", - Long: `The medic policy_status list subcommand lets you list policy status within a -mediator control plane for an specific provider/project or policy id.`, + Short: "List profile status within a mediator control plane", + Long: `The medic profile_status list subcommand lets you list profile status within a +mediator control plane for an specific provider/project or profile id.`, PreRun: func(cmd *cobra.Command, args []string) { if err := viper.BindPFlags(cmd.Flags()); err != nil { fmt.Fprintf(os.Stderr, "Error binding flags: %s\n", err) @@ -44,13 +44,13 @@ mediator control plane for an specific provider/project or policy id.`, } defer conn.Close() - client := pb.NewPolicyServiceClient(conn) + client := pb.NewProfileServiceClient(conn) ctx, cancel := util.GetAppContext() defer cancel() provider := viper.GetString("provider") project := viper.GetString("project") - policyName := viper.GetString("policy") + profileName := viper.GetString("profile") format := viper.GetString("output") all := viper.GetBool("detailed") rule := viper.GetString("rule") @@ -65,11 +65,11 @@ mediator control plane for an specific provider/project or policy id.`, return fmt.Errorf("provider must be set") } - req := &pb.GetPolicyStatusByNameRequest{ + req := &pb.GetProfileStatusByNameRequest{ Context: &pb.Context{ Provider: provider, }, - Name: policyName, + Name: profileName, All: all, Rule: rule, } @@ -78,9 +78,9 @@ mediator control plane for an specific provider/project or policy id.`, req.Context.Project = &project } - resp, err := client.GetPolicyStatusByName(ctx, req) + resp, err := client.GetProfileStatusByName(ctx, req) if err != nil { - return fmt.Errorf("error getting policy status: %w", err) + return fmt.Errorf("error getting profile status: %w", err) } switch format { @@ -93,7 +93,7 @@ mediator control plane for an specific provider/project or policy id.`, util.ExitNicelyOnError(err, "Error getting yaml from proto") fmt.Println(out) case app.Table: - handlePolicyStatusListTable(cmd, resp) + handleProfileStatusListTable(cmd, resp) if all { handleRuleEvaluationStatusListTable(cmd, resp) @@ -105,29 +105,29 @@ mediator control plane for an specific provider/project or policy id.`, } func init() { - PolicyStatusCmd.AddCommand(policystatus_listCmd) - policystatus_listCmd.Flags().StringP("provider", "p", "github", "Provider to list policy status for") - policystatus_listCmd.Flags().StringP("project", "g", "", "project id to list policy status for") - policystatus_listCmd.Flags().StringP("policy", "i", "", "policy name to list policy status for") - policystatus_listCmd.Flags().StringP("output", "o", app.Table, "Output format (json, yaml or table)") - policystatus_listCmd.Flags().BoolP("detailed", "d", false, "List all policy violations") - policystatus_listCmd.Flags().StringP("rule", "r", "", "Filter policy status list by rule") - - if err := policystatus_listCmd.MarkFlagRequired("policy"); err != nil { + ProfileStatusCmd.AddCommand(profilestatus_listCmd) + profilestatus_listCmd.Flags().StringP("provider", "p", "github", "Provider to list profile status for") + profilestatus_listCmd.Flags().StringP("project", "g", "", "project id to list profile status for") + profilestatus_listCmd.Flags().StringP("profile", "i", "", "profile name to list profile status for") + profilestatus_listCmd.Flags().StringP("output", "o", app.Table, "Output format (json, yaml or table)") + profilestatus_listCmd.Flags().BoolP("detailed", "d", false, "List all profile violations") + profilestatus_listCmd.Flags().StringP("rule", "r", "", "Filter profile status list by rule") + + if err := profilestatus_listCmd.MarkFlagRequired("profile"); err != nil { fmt.Fprintf(os.Stderr, "Error marking flag as required: %s\n", err) os.Exit(1) } } -func handlePolicyStatusListTable(cmd *cobra.Command, resp *pb.GetPolicyStatusByNameResponse) { - table := initializePolicyStatusTable(cmd) +func handleProfileStatusListTable(cmd *cobra.Command, resp *pb.GetProfileStatusByNameResponse) { + table := initializeProfileStatusTable(cmd) - renderPolicyStatusTable(resp.PolicyStatus, table) + renderProfileStatusTable(resp.ProfileStatus, table) table.Render() } -func handleRuleEvaluationStatusListTable(cmd *cobra.Command, resp *pb.GetPolicyStatusByNameResponse) { +func handleRuleEvaluationStatusListTable(cmd *cobra.Command, resp *pb.GetProfileStatusByNameResponse) { table := initializeRuleEvaluationStatusTable(cmd) for idx := range resp.RuleEvaluationStatus { diff --git a/cmd/cli/app/policy_status/table_render.go b/cmd/cli/app/profile_status/table_render.go similarity index 95% rename from cmd/cli/app/policy_status/table_render.go rename to cmd/cli/app/profile_status/table_render.go index 5e79b27a9f..cc77e8569b 100644 --- a/cmd/cli/app/policy_status/table_render.go +++ b/cmd/cli/app/profile_status/table_render.go @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package policy_status +package profile_status import ( "strings" @@ -36,7 +36,7 @@ const ( notAvailableStatus = "not_available" ) -func initializePolicyStatusTable(cmd *cobra.Command) *tablewriter.Table { +func initializeProfileStatusTable(cmd *cobra.Command) *tablewriter.Table { table := tablewriter.NewWriter(cmd.OutOrStdout()) table.SetHeader([]string{"Id", "Name", "Overall Status", "Last Updated"}) table.SetRowLine(true) @@ -47,21 +47,21 @@ func initializePolicyStatusTable(cmd *cobra.Command) *tablewriter.Table { return table } -func renderPolicyStatusTable( - ps *pb.PolicyStatus, +func renderProfileStatusTable( + ps *pb.ProfileStatus, table *tablewriter.Table, ) { row := []string{ - ps.PolicyId, - ps.PolicyName, - getEvalStatusText(ps.PolicyStatus), + ps.ProfileId, + ps.ProfileName, + getEvalStatusText(ps.ProfileStatus), ps.LastUpdated.AsTime().Format(time.RFC3339), } table.Rich(row, []tablewriter.Colors{ {}, {}, - getEvalStatusColor(ps.PolicyStatus), + getEvalStatusColor(ps.ProfileStatus), {}, }) } diff --git a/cmd/cli/app/repo/repo_get.go b/cmd/cli/app/repo/repo_get.go index f6284709d2..891e7f3484 100644 --- a/cmd/cli/app/repo/repo_get.go +++ b/cmd/cli/app/repo/repo_get.go @@ -128,5 +128,5 @@ func init() { repo_getCmd.Flags().StringP("provider", "p", "", "Name for the provider to enroll") repo_getCmd.Flags().StringP("name", "n", "", "Name of the repository (owner/name format)") repo_getCmd.Flags().StringP("repo-id", "r", "", "ID of the repo to query") - repo_getCmd.Flags().BoolP("status", "s", false, "Only return the status of the policies associated to this repo") + repo_getCmd.Flags().BoolP("status", "s", false, "Only return the status of the profiles associated to this repo") } diff --git a/cmd/cli/app/rule_type/rule_type_create.go b/cmd/cli/app/rule_type/rule_type_create.go index 613e66b42a..d9c63f9461 100644 --- a/cmd/cli/app/rule_type/rule_type_create.go +++ b/cmd/cli/app/rule_type/rule_type_create.go @@ -27,11 +27,11 @@ import ( mediatorv1 "github.com/stacklok/mediator/pkg/api/protobuf/go/mediator/v1" ) -// RuleType_createCmd represents the policy create command +// RuleType_createCmd represents the profile create command var RuleType_createCmd = &cobra.Command{ Use: "create", Short: "Create a rule type within a mediator control plane", - Long: `The medic rule type create subcommand lets you create new policies for a project + Long: `The medic rule type create subcommand lets you create new profiles for a project within a mediator control plane.`, PreRun: func(cmd *cobra.Command, args []string) { if err := viper.BindPFlags(cmd.Flags()); err != nil { @@ -54,7 +54,7 @@ within a mediator control plane.`, } defer conn.Close() - client := mediatorv1.NewPolicyServiceClient(conn) + client := mediatorv1.NewProfileServiceClient(conn) ctx, cancel := util.GetAppContext() defer cancel() diff --git a/cmd/cli/app/rule_type/rule_type_delete.go b/cmd/cli/app/rule_type/rule_type_delete.go index ddcb561d91..b3f3820111 100644 --- a/cmd/cli/app/rule_type/rule_type_delete.go +++ b/cmd/cli/app/rule_type/rule_type_delete.go @@ -29,7 +29,7 @@ import ( var ruleType_deleteCmd = &cobra.Command{ Use: "delete", Short: "delete a rule type within a mediator controlplane", - Long: `The medic rule type delete subcommand lets you delete policies within a + Long: `The medic rule type delete subcommand lets you delete profiles within a mediator control plane.`, PreRun: func(cmd *cobra.Command, args []string) { if err := viper.BindPFlags(cmd.Flags()); err != nil { @@ -37,7 +37,7 @@ mediator control plane.`, } }, Run: func(cmd *cobra.Command, args []string) { - // delete the policy via GRPC + // delete the profile via GRPC id := viper.GetString("id") conn, err := util.GrpcForCommand(cmd) @@ -45,7 +45,7 @@ mediator control plane.`, util.ExitNicelyOnError(err, "Error getting grpc connection") defer conn.Close() - client := pb.NewPolicyServiceClient(conn) + client := pb.NewProfileServiceClient(conn) ctx, cancel := util.GetAppContext() defer cancel() @@ -54,8 +54,8 @@ mediator control plane.`, Id: id, }) - util.ExitNicelyOnError(err, "Error deleting policy") - cmd.Println("Successfully deleted policy with id:", id) + util.ExitNicelyOnError(err, "Error deleting profile") + cmd.Println("Successfully deleted profile with id:", id) }, } diff --git a/cmd/cli/app/rule_type/rule_type_get.go b/cmd/cli/app/rule_type/rule_type_get.go index 78b60a2c11..a834907de3 100644 --- a/cmd/cli/app/rule_type/rule_type_get.go +++ b/cmd/cli/app/rule_type/rule_type_get.go @@ -53,7 +53,7 @@ mediator control plane.`, util.ExitNicelyOnError(err, "Error getting grpc connection") defer conn.Close() - client := pb.NewPolicyServiceClient(conn) + client := pb.NewProfileServiceClient(conn) ctx, cancel := util.GetAppContext() defer cancel() @@ -89,9 +89,9 @@ mediator control plane.`, func init() { ruleTypeCmd.AddCommand(ruleType_getCmd) - ruleType_getCmd.Flags().StringP("id", "i", "", "ID for the policy to query") + ruleType_getCmd.Flags().StringP("id", "i", "", "ID for the profile to query") ruleType_getCmd.Flags().StringP("output", "o", app.Table, "Output format (json, yaml or table)") - ruleType_getCmd.Flags().StringP("provider", "p", "github", "Provider for the policy") + ruleType_getCmd.Flags().StringP("provider", "p", "github", "Provider for the profile") // TODO set up project if specified if err := ruleType_getCmd.MarkFlagRequired("id"); err != nil { diff --git a/cmd/cli/app/rule_type/rule_type_list.go b/cmd/cli/app/rule_type/rule_type_list.go index e5abdadb91..12d520a737 100644 --- a/cmd/cli/app/rule_type/rule_type_list.go +++ b/cmd/cli/app/rule_type/rule_type_list.go @@ -46,7 +46,7 @@ mediator control plane for an specific project.`, } defer conn.Close() - client := pb.NewPolicyServiceClient(conn) + client := pb.NewProfileServiceClient(conn) ctx, cancel := util.GetAppContext() defer cancel() @@ -68,7 +68,7 @@ mediator control plane for an specific project.`, }, }) if err != nil { - return fmt.Errorf("error getting policies: %w", err) + return fmt.Errorf("error getting profiles: %w", err) } switch format { diff --git a/cmd/cli/main.go b/cmd/cli/main.go index c3b79d3c91..d4648c751f 100644 --- a/cmd/cli/main.go +++ b/cmd/cli/main.go @@ -24,8 +24,8 @@ import ( _ "github.com/stacklok/mediator/cmd/cli/app/docs" _ "github.com/stacklok/mediator/cmd/cli/app/keys" _ "github.com/stacklok/mediator/cmd/cli/app/org" - _ "github.com/stacklok/mediator/cmd/cli/app/policy" - _ "github.com/stacklok/mediator/cmd/cli/app/policy_status" + _ "github.com/stacklok/mediator/cmd/cli/app/profile" + _ "github.com/stacklok/mediator/cmd/cli/app/profile_status" _ "github.com/stacklok/mediator/cmd/cli/app/project" _ "github.com/stacklok/mediator/cmd/cli/app/provider" _ "github.com/stacklok/mediator/cmd/cli/app/repo" diff --git a/cmd/dev/app/rule_type/rule_type.go b/cmd/dev/app/rule_type/rule_type.go index 6f9c5a1533..497f53d5ec 100644 --- a/cmd/dev/app/rule_type/rule_type.go +++ b/cmd/dev/app/rule_type/rule_type.go @@ -53,7 +53,7 @@ func init() { app.RootCmd.AddCommand(testCmd) testCmd.Flags().StringP("rule-type", "r", "", "file to read rule type definition from") testCmd.Flags().StringP("entity", "e", "", "YAML file containing the entity to test the rule against") - testCmd.Flags().StringP("policy", "p", "", "YAML file containing a policy to test the rule against") + testCmd.Flags().StringP("profile", "p", "", "YAML file containing a profile to test the rule against") testCmd.Flags().StringP("token", "t", "", "token to authenticate to the provider."+ "Can also be set via the AUTH_TOKEN environment variable.") @@ -78,7 +78,7 @@ func init() { func testCmdRun(cmd *cobra.Command, _ []string) error { rtpath := cmd.Flag("rule-type") epath := cmd.Flag("entity") - ppath := cmd.Flag("policy") + ppath := cmd.Flag("profile") token := viper.GetString("auth.token") // set rego env variable for debugging @@ -103,12 +103,12 @@ func testCmdRun(cmd *cobra.Command, _ []string) error { return fmt.Errorf("error reading entity from file: %w", err) } - p, err := engine.ReadPolicyFromFile(ppath.Value.String()) + p, err := engine.ReadProfileFromFile(ppath.Value.String()) if err != nil { return fmt.Errorf("error reading fragment from file: %w", err) } - rules, err := engine.GetRulesFromPolicyOfType(p, rt) + rules, err := engine.GetRulesFromProfileOfType(p, rt) if err != nil { return fmt.Errorf("error getting relevant fragment: %w", err) } @@ -146,7 +146,7 @@ func runEvaluationForRules( eng *engine.RuleTypeEngine, ent protoreflect.ProtoMessage, rem interfaces.RemediateActionOpt, - frags []*mediatorv1.Policy_Rule, + frags []*mediatorv1.Profile_Rule, ) error { for idx := range frags { frag := frags[idx] @@ -157,7 +157,7 @@ func runEvaluationForRules( if err != nil { return fmt.Errorf("error validating rule against schema: %w", err) } - fmt.Printf("Policy valid according to the JSON schema!\n") + fmt.Printf("Profile valid according to the JSON schema!\n") var params map[string]any if err := val.ValidateParamsAgainstSchema(frag.GetParams()); err != nil { diff --git a/database/migrations/000001_init.down.sql b/database/migrations/000001_init.down.sql index bbd0c232e4..7607bf43a7 100644 --- a/database/migrations/000001_init.down.sql +++ b/database/migrations/000001_init.down.sql @@ -16,11 +16,11 @@ DROP TABLE IF EXISTS artifact_versions; DROP TABLE IF EXISTS rule_evaluation_status; DROP TABLE IF EXISTS artifacts; -DROP TABLE IF EXISTS entity_policies; -DROP TABLE IF EXISTS policy_status; +DROP TABLE IF EXISTS entity_profiles; +DROP TABLE IF EXISTS profile_status; DROP TABLE IF EXISTS signing_keys; DROP TABLE IF EXISTS rule_type; -DROP TABLE IF EXISTS policies; +DROP TABLE IF EXISTS profiles; DROP TABLE IF EXISTS session_store; DROP TABLE IF EXISTS repositories; DROP TABLE IF EXISTS provider_access_tokens; diff --git a/database/migrations/000001_init.up.sql b/database/migrations/000001_init.up.sql index f0031dd108..1ff8383cb9 100644 --- a/database/migrations/000001_init.up.sql +++ b/database/migrations/000001_init.up.sql @@ -177,7 +177,7 @@ CREATE TABLE rule_type ( CREATE TYPE remediate_type as enum ('on', 'off', 'dry_run'); -CREATE TABLE policies ( +CREATE TABLE profiles ( id UUID NOT NULL DEFAULT gen_random_uuid() PRIMARY KEY, name TEXT NOT NULL, provider TEXT NOT NULL, @@ -188,14 +188,14 @@ CREATE TABLE policies ( FOREIGN KEY (project_id, provider) REFERENCES providers(project_id, name) ON DELETE CASCADE ); -CREATE UNIQUE INDEX ON policies(project_id, name); +CREATE UNIQUE INDEX ON profiles(project_id, name); CREATE TYPE entities as enum ('repository', 'build_environment', 'artifact', 'pull_request'); -CREATE TABLE entity_policies ( +CREATE TABLE entity_profiles ( id UUID NOT NULL DEFAULT gen_random_uuid() PRIMARY KEY, entity entities NOT NULL, - policy_id UUID NOT NULL REFERENCES policies(id) ON DELETE CASCADE, + profile_id UUID NOT NULL REFERENCES profiles(id) ON DELETE CASCADE, contextual_rules JSONB NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT NOW(), updated_at TIMESTAMP NOT NULL DEFAULT NOW() @@ -205,20 +205,20 @@ create type eval_status_types as enum ('success', 'failure', 'error', 'skipped', create type remediation_status_types as enum ('success', 'failure', 'error', 'skipped', 'not_available'); --- This table will be used to track the overall status of a policy evaluation -CREATE TABLE policy_status ( +-- This table will be used to track the overall status of a profile evaluation +CREATE TABLE profile_status ( id UUID NOT NULL DEFAULT gen_random_uuid() PRIMARY KEY, - policy_id UUID NOT NULL REFERENCES policies(id) ON DELETE CASCADE, - policy_status eval_status_types NOT NULL, + profile_id UUID NOT NULL REFERENCES profiles(id) ON DELETE CASCADE, + profile_status eval_status_types NOT NULL, last_updated TIMESTAMP NOT NULL DEFAULT NOW() ); -- This table will be used to track the status of each rule evaluation --- for a given policy +-- for a given profile CREATE TABLE rule_evaluation_status ( id UUID NOT NULL DEFAULT gen_random_uuid() PRIMARY KEY, entity entities NOT NULL, - policy_id UUID NOT NULL REFERENCES policies(id) ON DELETE CASCADE, + profile_id UUID NOT NULL REFERENCES profiles(id) ON DELETE CASCADE, rule_type_id UUID NOT NULL REFERENCES rule_type(id) ON DELETE CASCADE, eval_status eval_status_types NOT NULL, remediation_status remediation_status_types NOT NULL, @@ -247,7 +247,7 @@ CREATE UNIQUE INDEX roles_organization_id_name_lower_idx ON roles (organization_ CREATE INDEX idx_provider_access_tokens_project_id ON provider_access_tokens(project_id); CREATE UNIQUE INDEX repositories_repo_id_idx ON repositories(repo_id); CREATE UNIQUE INDEX rule_type_idx ON rule_type(provider, project_id, name); -CREATE UNIQUE INDEX rule_evaluation_status_results_idx ON rule_evaluation_status(policy_id, repository_id, COALESCE(artifact_id, '00000000-0000-0000-0000-000000000000'::UUID), entity, rule_type_id); +CREATE UNIQUE INDEX rule_evaluation_status_results_idx ON rule_evaluation_status(profile_id, repository_id, COALESCE(artifact_id, '00000000-0000-0000-0000-000000000000'::UUID), entity, rule_type_id); CREATE UNIQUE INDEX artifact_name_lower_idx ON artifacts (repository_id, LOWER(artifact_name)); CREATE UNIQUE INDEX artifact_versions_idx ON artifact_versions (artifact_id, sha); CREATE UNIQUE INDEX provider_name_project_id_idx ON providers (name, project_id); @@ -267,50 +267,50 @@ CREATE TRIGGER delete_eval_statuses FOR EACH ROW EXECUTE PROCEDURE delete_eval_statuses(); --- Create a default status for a policy when it's created -CREATE OR REPLACE FUNCTION create_default_policy_status() RETURNS TRIGGER AS $$ +-- Create a default status for a profile when it's created +CREATE OR REPLACE FUNCTION create_default_profile_status() RETURNS TRIGGER AS $$ BEGIN - INSERT INTO policy_status (policy_id, policy_status, last_updated) VALUES (NEW.id, 'pending', NOW()); + INSERT INTO profile_status (profile_id, profile_status, last_updated) VALUES (NEW.id, 'pending', NOW()); RETURN NEW; END; $$ LANGUAGE plpgsql; -CREATE TRIGGER create_default_policy_status - AFTER INSERT ON policies +CREATE TRIGGER create_default_profile_status + AFTER INSERT ON profiles FOR EACH ROW - EXECUTE PROCEDURE create_default_policy_status(); + EXECUTE PROCEDURE create_default_profile_status(); --- Update overall policy status if a rule evaluation status is updated +-- Update overall profile status if a rule evaluation status is updated -- error takes precedence over failure, failure takes precedence over success -CREATE OR REPLACE FUNCTION update_policy_status() RETURNS TRIGGER AS $$ +CREATE OR REPLACE FUNCTION update_profile_status() RETURNS TRIGGER AS $$ BEGIN - -- keep error if policy had errored + -- keep error if profile had errored IF (NEW.eval_status = 'error') THEN - UPDATE policy_status SET policy_status = 'error', last_updated = NOW() WHERE policy_id = NEW.policy_id; + UPDATE profile_status SET profile_status = 'error', last_updated = NOW() WHERE profile_id = NEW.profile_id; -- mark status as successful if all evaluations are successful or skipped - ELSEIF NOT EXISTS (SELECT * FROM rule_evaluation_status WHERE policy_id = NEW.policy_id AND eval_status != 'success' AND eval_status != 'skipped') THEN - UPDATE policy_status SET policy_status = 'success', last_updated = NOW() WHERE policy_id = NEW.policy_id; - -- mark policy as successful if it was pending and the new status is success + ELSEIF NOT EXISTS (SELECT * FROM rule_evaluation_status WHERE profile_id = NEW.profile_id AND eval_status != 'success' AND eval_status != 'skipped') THEN + UPDATE profile_status SET profile_status = 'success', last_updated = NOW() WHERE profile_id = NEW.profile_id; + -- mark profile as successful if it was pending and the new status is success ELSEIF (NEW.eval_status = 'success') THEN - UPDATE policy_status SET policy_status = 'success', last_updated = NOW() WHERE policy_id = NEW.policy_id AND policy_status = 'pending'; + UPDATE profile_status SET profile_status = 'success', last_updated = NOW() WHERE profile_id = NEW.profile_id AND profile_status = 'pending'; -- mark status as failed if it was successful or pending and the new status is failure -- and there are no errors - ELSEIF (NEW.eval_status = 'failure') AND NOT EXISTS (SELECT * FROM rule_evaluation_status WHERE policy_id = NEW.policy_id and eval_status = 'error') THEN - UPDATE policy_status SET policy_status = 'failure', last_updated = NOW() - WHERE policy_id = NEW.policy_id AND (policy_status = 'success' OR policy_status = 'pending') AND NEW.eval_status = 'failure'; - -- only mark policy run as skipped if every evaluation was skipped + ELSEIF (NEW.eval_status = 'failure') AND NOT EXISTS (SELECT * FROM rule_evaluation_status WHERE profile_id = NEW.profile_id and eval_status = 'error') THEN + UPDATE profile_status SET profile_status = 'failure', last_updated = NOW() + WHERE profile_id = NEW.profile_id AND (profile_status = 'success' OR profile_status = 'pending') AND NEW.eval_status = 'failure'; + -- only mark profile run as skipped if every evaluation was skipped ELSEIF (NEW.eval_status = 'skipped') THEN - UPDATE policy_status SET policy_status = 'skipped', last_updated = NOW() - WHERE policy_id = NEW.policy_id AND NOT EXISTS (SELECT * FROM rule_evaluation_status WHERE policy_id = NEW.policy_id AND eval_status != 'skipped'); + UPDATE profile_status SET profile_status = 'skipped', last_updated = NOW() + WHERE profile_id = NEW.profile_id AND NOT EXISTS (SELECT * FROM rule_evaluation_status WHERE profile_id = NEW.profile_id AND eval_status != 'skipped'); END IF; RETURN NEW; END; $$ LANGUAGE plpgsql; -CREATE TRIGGER update_policy_status +CREATE TRIGGER update_profile_status AFTER INSERT OR UPDATE ON rule_evaluation_status FOR EACH ROW - EXECUTE PROCEDURE update_policy_status(); + EXECUTE PROCEDURE update_profile_status(); -- Create default root organization and get id so we can create the root project INSERT INTO projects (name, is_organization) VALUES ('Mediator Root', TRUE); diff --git a/database/mock/store.go b/database/mock/store.go index 4e568f4173..8e5a71e521 100644 --- a/database/mock/store.go +++ b/database/mock/store.go @@ -170,34 +170,34 @@ func (mr *MockStoreMockRecorder) CreateOrganization(arg0, arg1 interface{}) *gom return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrganization", reflect.TypeOf((*MockStore)(nil).CreateOrganization), arg0, arg1) } -// CreatePolicy mocks base method. -func (m *MockStore) CreatePolicy(arg0 context.Context, arg1 db.CreatePolicyParams) (db.Policy, error) { +// CreateProfile mocks base method. +func (m *MockStore) CreateProfile(arg0 context.Context, arg1 db.CreateProfileParams) (db.Profile, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreatePolicy", arg0, arg1) - ret0, _ := ret[0].(db.Policy) + ret := m.ctrl.Call(m, "CreateProfile", arg0, arg1) + ret0, _ := ret[0].(db.Profile) ret1, _ := ret[1].(error) return ret0, ret1 } -// CreatePolicy indicates an expected call of CreatePolicy. -func (mr *MockStoreMockRecorder) CreatePolicy(arg0, arg1 interface{}) *gomock.Call { +// CreateProfile indicates an expected call of CreateProfile. +func (mr *MockStoreMockRecorder) CreateProfile(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePolicy", reflect.TypeOf((*MockStore)(nil).CreatePolicy), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateProfile", reflect.TypeOf((*MockStore)(nil).CreateProfile), arg0, arg1) } -// CreatePolicyForEntity mocks base method. -func (m *MockStore) CreatePolicyForEntity(arg0 context.Context, arg1 db.CreatePolicyForEntityParams) (db.EntityPolicy, error) { +// CreateProfileForEntity mocks base method. +func (m *MockStore) CreateProfileForEntity(arg0 context.Context, arg1 db.CreateProfileForEntityParams) (db.EntityProfile, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreatePolicyForEntity", arg0, arg1) - ret0, _ := ret[0].(db.EntityPolicy) + ret := m.ctrl.Call(m, "CreateProfileForEntity", arg0, arg1) + ret0, _ := ret[0].(db.EntityProfile) ret1, _ := ret[1].(error) return ret0, ret1 } -// CreatePolicyForEntity indicates an expected call of CreatePolicyForEntity. -func (mr *MockStoreMockRecorder) CreatePolicyForEntity(arg0, arg1 interface{}) *gomock.Call { +// CreateProfileForEntity indicates an expected call of CreateProfileForEntity. +func (mr *MockStoreMockRecorder) CreateProfileForEntity(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePolicyForEntity", reflect.TypeOf((*MockStore)(nil).CreatePolicyForEntity), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateProfileForEntity", reflect.TypeOf((*MockStore)(nil).CreateProfileForEntity), arg0, arg1) } // CreateProject mocks base method. @@ -418,18 +418,18 @@ func (mr *MockStoreMockRecorder) DeleteOrganization(arg0, arg1 interface{}) *gom return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteOrganization", reflect.TypeOf((*MockStore)(nil).DeleteOrganization), arg0, arg1) } -// DeletePolicy mocks base method. -func (m *MockStore) DeletePolicy(arg0 context.Context, arg1 uuid.UUID) error { +// DeleteProfile mocks base method. +func (m *MockStore) DeleteProfile(arg0 context.Context, arg1 uuid.UUID) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeletePolicy", arg0, arg1) + ret := m.ctrl.Call(m, "DeleteProfile", arg0, arg1) ret0, _ := ret[0].(error) return ret0 } -// DeletePolicy indicates an expected call of DeletePolicy. -func (mr *MockStoreMockRecorder) DeletePolicy(arg0, arg1 interface{}) *gomock.Call { +// DeleteProfile indicates an expected call of DeleteProfile. +func (mr *MockStoreMockRecorder) DeleteProfile(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePolicy", reflect.TypeOf((*MockStore)(nil).DeletePolicy), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteProfile", reflect.TypeOf((*MockStore)(nil).DeleteProfile), arg0, arg1) } // DeleteProject mocks base method. @@ -739,94 +739,94 @@ func (mr *MockStoreMockRecorder) GetParentProjectsUntil(arg0, arg1 interface{}) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetParentProjectsUntil", reflect.TypeOf((*MockStore)(nil).GetParentProjectsUntil), arg0, arg1) } -// GetPolicyByID mocks base method. -func (m *MockStore) GetPolicyByID(arg0 context.Context, arg1 uuid.UUID) (db.Policy, error) { +// GetProfileByID mocks base method. +func (m *MockStore) GetProfileByID(arg0 context.Context, arg1 uuid.UUID) (db.Profile, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetPolicyByID", arg0, arg1) - ret0, _ := ret[0].(db.Policy) + ret := m.ctrl.Call(m, "GetProfileByID", arg0, arg1) + ret0, _ := ret[0].(db.Profile) ret1, _ := ret[1].(error) return ret0, ret1 } -// GetPolicyByID indicates an expected call of GetPolicyByID. -func (mr *MockStoreMockRecorder) GetPolicyByID(arg0, arg1 interface{}) *gomock.Call { +// GetProfileByID indicates an expected call of GetProfileByID. +func (mr *MockStoreMockRecorder) GetProfileByID(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPolicyByID", reflect.TypeOf((*MockStore)(nil).GetPolicyByID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProfileByID", reflect.TypeOf((*MockStore)(nil).GetProfileByID), arg0, arg1) } -// GetPolicyByProjectAndID mocks base method. -func (m *MockStore) GetPolicyByProjectAndID(arg0 context.Context, arg1 db.GetPolicyByProjectAndIDParams) ([]db.GetPolicyByProjectAndIDRow, error) { +// GetProfileByProjectAndID mocks base method. +func (m *MockStore) GetProfileByProjectAndID(arg0 context.Context, arg1 db.GetProfileByProjectAndIDParams) ([]db.GetProfileByProjectAndIDRow, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetPolicyByProjectAndID", arg0, arg1) - ret0, _ := ret[0].([]db.GetPolicyByProjectAndIDRow) + ret := m.ctrl.Call(m, "GetProfileByProjectAndID", arg0, arg1) + ret0, _ := ret[0].([]db.GetProfileByProjectAndIDRow) ret1, _ := ret[1].(error) return ret0, ret1 } -// GetPolicyByProjectAndID indicates an expected call of GetPolicyByProjectAndID. -func (mr *MockStoreMockRecorder) GetPolicyByProjectAndID(arg0, arg1 interface{}) *gomock.Call { +// GetProfileByProjectAndID indicates an expected call of GetProfileByProjectAndID. +func (mr *MockStoreMockRecorder) GetProfileByProjectAndID(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPolicyByProjectAndID", reflect.TypeOf((*MockStore)(nil).GetPolicyByProjectAndID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProfileByProjectAndID", reflect.TypeOf((*MockStore)(nil).GetProfileByProjectAndID), arg0, arg1) } -// GetPolicyByProjectAndName mocks base method. -func (m *MockStore) GetPolicyByProjectAndName(arg0 context.Context, arg1 db.GetPolicyByProjectAndNameParams) ([]db.GetPolicyByProjectAndNameRow, error) { +// GetProfileByProjectAndName mocks base method. +func (m *MockStore) GetProfileByProjectAndName(arg0 context.Context, arg1 db.GetProfileByProjectAndNameParams) ([]db.GetProfileByProjectAndNameRow, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetPolicyByProjectAndName", arg0, arg1) - ret0, _ := ret[0].([]db.GetPolicyByProjectAndNameRow) + ret := m.ctrl.Call(m, "GetProfileByProjectAndName", arg0, arg1) + ret0, _ := ret[0].([]db.GetProfileByProjectAndNameRow) ret1, _ := ret[1].(error) return ret0, ret1 } -// GetPolicyByProjectAndName indicates an expected call of GetPolicyByProjectAndName. -func (mr *MockStoreMockRecorder) GetPolicyByProjectAndName(arg0, arg1 interface{}) *gomock.Call { +// GetProfileByProjectAndName indicates an expected call of GetProfileByProjectAndName. +func (mr *MockStoreMockRecorder) GetProfileByProjectAndName(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPolicyByProjectAndName", reflect.TypeOf((*MockStore)(nil).GetPolicyByProjectAndName), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProfileByProjectAndName", reflect.TypeOf((*MockStore)(nil).GetProfileByProjectAndName), arg0, arg1) } -// GetPolicyStatusByIdAndProject mocks base method. -func (m *MockStore) GetPolicyStatusByIdAndProject(arg0 context.Context, arg1 db.GetPolicyStatusByIdAndProjectParams) (db.GetPolicyStatusByIdAndProjectRow, error) { +// GetProfileStatusByIdAndProject mocks base method. +func (m *MockStore) GetProfileStatusByIdAndProject(arg0 context.Context, arg1 db.GetProfileStatusByIdAndProjectParams) (db.GetProfileStatusByIdAndProjectRow, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetPolicyStatusByIdAndProject", arg0, arg1) - ret0, _ := ret[0].(db.GetPolicyStatusByIdAndProjectRow) + ret := m.ctrl.Call(m, "GetProfileStatusByIdAndProject", arg0, arg1) + ret0, _ := ret[0].(db.GetProfileStatusByIdAndProjectRow) ret1, _ := ret[1].(error) return ret0, ret1 } -// GetPolicyStatusByIdAndProject indicates an expected call of GetPolicyStatusByIdAndProject. -func (mr *MockStoreMockRecorder) GetPolicyStatusByIdAndProject(arg0, arg1 interface{}) *gomock.Call { +// GetProfileStatusByIdAndProject indicates an expected call of GetProfileStatusByIdAndProject. +func (mr *MockStoreMockRecorder) GetProfileStatusByIdAndProject(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPolicyStatusByIdAndProject", reflect.TypeOf((*MockStore)(nil).GetPolicyStatusByIdAndProject), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProfileStatusByIdAndProject", reflect.TypeOf((*MockStore)(nil).GetProfileStatusByIdAndProject), arg0, arg1) } -// GetPolicyStatusByNameAndProject mocks base method. -func (m *MockStore) GetPolicyStatusByNameAndProject(arg0 context.Context, arg1 db.GetPolicyStatusByNameAndProjectParams) (db.GetPolicyStatusByNameAndProjectRow, error) { +// GetProfileStatusByNameAndProject mocks base method. +func (m *MockStore) GetProfileStatusByNameAndProject(arg0 context.Context, arg1 db.GetProfileStatusByNameAndProjectParams) (db.GetProfileStatusByNameAndProjectRow, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetPolicyStatusByNameAndProject", arg0, arg1) - ret0, _ := ret[0].(db.GetPolicyStatusByNameAndProjectRow) + ret := m.ctrl.Call(m, "GetProfileStatusByNameAndProject", arg0, arg1) + ret0, _ := ret[0].(db.GetProfileStatusByNameAndProjectRow) ret1, _ := ret[1].(error) return ret0, ret1 } -// GetPolicyStatusByNameAndProject indicates an expected call of GetPolicyStatusByNameAndProject. -func (mr *MockStoreMockRecorder) GetPolicyStatusByNameAndProject(arg0, arg1 interface{}) *gomock.Call { +// GetProfileStatusByNameAndProject indicates an expected call of GetProfileStatusByNameAndProject. +func (mr *MockStoreMockRecorder) GetProfileStatusByNameAndProject(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPolicyStatusByNameAndProject", reflect.TypeOf((*MockStore)(nil).GetPolicyStatusByNameAndProject), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProfileStatusByNameAndProject", reflect.TypeOf((*MockStore)(nil).GetProfileStatusByNameAndProject), arg0, arg1) } -// GetPolicyStatusByProject mocks base method. -func (m *MockStore) GetPolicyStatusByProject(arg0 context.Context, arg1 uuid.UUID) ([]db.GetPolicyStatusByProjectRow, error) { +// GetProfileStatusByProject mocks base method. +func (m *MockStore) GetProfileStatusByProject(arg0 context.Context, arg1 uuid.UUID) ([]db.GetProfileStatusByProjectRow, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetPolicyStatusByProject", arg0, arg1) - ret0, _ := ret[0].([]db.GetPolicyStatusByProjectRow) + ret := m.ctrl.Call(m, "GetProfileStatusByProject", arg0, arg1) + ret0, _ := ret[0].([]db.GetProfileStatusByProjectRow) ret1, _ := ret[1].(error) return ret0, ret1 } -// GetPolicyStatusByProject indicates an expected call of GetPolicyStatusByProject. -func (mr *MockStoreMockRecorder) GetPolicyStatusByProject(arg0, arg1 interface{}) *gomock.Call { +// GetProfileStatusByProject indicates an expected call of GetProfileStatusByProject. +func (mr *MockStoreMockRecorder) GetProfileStatusByProject(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPolicyStatusByProject", reflect.TypeOf((*MockStore)(nil).GetPolicyStatusByProject), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProfileStatusByProject", reflect.TypeOf((*MockStore)(nil).GetProfileStatusByProject), arg0, arg1) } // GetProjectByID mocks base method. @@ -1263,19 +1263,19 @@ func (mr *MockStoreMockRecorder) ListOrganizations(arg0, arg1 interface{}) *gomo return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOrganizations", reflect.TypeOf((*MockStore)(nil).ListOrganizations), arg0, arg1) } -// ListPoliciesByProjectID mocks base method. -func (m *MockStore) ListPoliciesByProjectID(arg0 context.Context, arg1 uuid.UUID) ([]db.ListPoliciesByProjectIDRow, error) { +// ListProfilesByProjectID mocks base method. +func (m *MockStore) ListProfilesByProjectID(arg0 context.Context, arg1 uuid.UUID) ([]db.ListProfilesByProjectIDRow, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ListPoliciesByProjectID", arg0, arg1) - ret0, _ := ret[0].([]db.ListPoliciesByProjectIDRow) + ret := m.ctrl.Call(m, "ListProfilesByProjectID", arg0, arg1) + ret0, _ := ret[0].([]db.ListProfilesByProjectIDRow) ret1, _ := ret[1].(error) return ret0, ret1 } -// ListPoliciesByProjectID indicates an expected call of ListPoliciesByProjectID. -func (mr *MockStoreMockRecorder) ListPoliciesByProjectID(arg0, arg1 interface{}) *gomock.Call { +// ListProfilesByProjectID indicates an expected call of ListProfilesByProjectID. +func (mr *MockStoreMockRecorder) ListProfilesByProjectID(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPoliciesByProjectID", reflect.TypeOf((*MockStore)(nil).ListPoliciesByProjectID), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListProfilesByProjectID", reflect.TypeOf((*MockStore)(nil).ListProfilesByProjectID), arg0, arg1) } // ListProvidersByProjectID mocks base method. @@ -1368,19 +1368,19 @@ func (mr *MockStoreMockRecorder) ListRolesByProjectID(arg0, arg1 interface{}) *g return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRolesByProjectID", reflect.TypeOf((*MockStore)(nil).ListRolesByProjectID), arg0, arg1) } -// ListRuleEvaluationStatusByPolicyId mocks base method. -func (m *MockStore) ListRuleEvaluationStatusByPolicyId(arg0 context.Context, arg1 db.ListRuleEvaluationStatusByPolicyIdParams) ([]db.ListRuleEvaluationStatusByPolicyIdRow, error) { +// ListRuleEvaluationStatusByProfileId mocks base method. +func (m *MockStore) ListRuleEvaluationStatusByProfileId(arg0 context.Context, arg1 db.ListRuleEvaluationStatusByProfileIdParams) ([]db.ListRuleEvaluationStatusByProfileIdRow, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ListRuleEvaluationStatusByPolicyId", arg0, arg1) - ret0, _ := ret[0].([]db.ListRuleEvaluationStatusByPolicyIdRow) + ret := m.ctrl.Call(m, "ListRuleEvaluationStatusByProfileId", arg0, arg1) + ret0, _ := ret[0].([]db.ListRuleEvaluationStatusByProfileIdRow) ret1, _ := ret[1].(error) return ret0, ret1 } -// ListRuleEvaluationStatusByPolicyId indicates an expected call of ListRuleEvaluationStatusByPolicyId. -func (mr *MockStoreMockRecorder) ListRuleEvaluationStatusByPolicyId(arg0, arg1 interface{}) *gomock.Call { +// ListRuleEvaluationStatusByProfileId indicates an expected call of ListRuleEvaluationStatusByProfileId. +func (mr *MockStoreMockRecorder) ListRuleEvaluationStatusByProfileId(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRuleEvaluationStatusByPolicyId", reflect.TypeOf((*MockStore)(nil).ListRuleEvaluationStatusByPolicyId), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListRuleEvaluationStatusByProfileId", reflect.TypeOf((*MockStore)(nil).ListRuleEvaluationStatusByProfileId), arg0, arg1) } // ListRuleTypesByProviderAndProject mocks base method. diff --git a/database/query/policies.sql b/database/query/policies.sql deleted file mode 100644 index 07f7906814..0000000000 --- a/database/query/policies.sql +++ /dev/null @@ -1,31 +0,0 @@ --- name: CreatePolicy :one -INSERT INTO policies ( - provider, - project_id, - remediate, - name) VALUES ($1, $2, $3, $4) RETURNING *; - --- name: CreatePolicyForEntity :one -INSERT INTO entity_policies ( - entity, - policy_id, - contextual_rules) VALUES ($1, $2, sqlc.arg(contextual_rules)::jsonb) RETURNING *; - --- name: GetPolicyByProjectAndID :many -SELECT * FROM policies JOIN entity_policies ON policies.id = entity_policies.policy_id -WHERE policies.project_id = $1 AND policies.id = $2; - --- name: GetPolicyByID :one -SELECT * FROM policies WHERE id = $1; - --- name: GetPolicyByProjectAndName :many -SELECT * FROM policies JOIN entity_policies ON policies.id = entity_policies.policy_id -WHERE policies.project_id = $1 AND policies.name = $2; - --- name: ListPoliciesByProjectID :many -SELECT * FROM policies JOIN entity_policies ON policies.id = entity_policies.policy_id -WHERE policies.project_id = $1; - --- name: DeletePolicy :exec -DELETE FROM policies -WHERE id = $1; diff --git a/database/query/policy_status.sql b/database/query/profile_status.sql similarity index 75% rename from database/query/policy_status.sql rename to database/query/profile_status.sql index e53ba3c924..2c4704fa49 100644 --- a/database/query/policy_status.sql +++ b/database/query/profile_status.sql @@ -5,7 +5,7 @@ UPDATE rule_evaluation_status -- name: CreateRuleEvaluationStatusForRepository :exec INSERT INTO rule_evaluation_status ( - policy_id, + profile_id, repository_id, rule_type_id, entity, @@ -16,7 +16,7 @@ INSERT INTO rule_evaluation_status ( -- name: UpsertRuleEvaluationStatus :exec INSERT INTO rule_evaluation_status ( - policy_id, + profile_id, repository_id, artifact_id, rule_type_id, @@ -28,40 +28,40 @@ INSERT INTO rule_evaluation_status ( remediation_last_updated, eval_last_updated ) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, NOW()) -ON CONFLICT(policy_id, repository_id, COALESCE(artifact_id, '00000000-0000-0000-0000-000000000000'::UUID), entity, rule_type_id) DO UPDATE SET +ON CONFLICT(profile_id, repository_id, COALESCE(artifact_id, '00000000-0000-0000-0000-000000000000'::UUID), entity, rule_type_id) DO UPDATE SET eval_status = $6, eval_details = $7, remediation_status = $8, remediation_details = $9, remediation_last_updated = COALESCE($10, rule_evaluation_status.remediation_last_updated), -- don't overwrite timestamp already set with NULL eval_last_updated = NOW() -WHERE rule_evaluation_status.policy_id = $1 +WHERE rule_evaluation_status.profile_id = $1 AND rule_evaluation_status.repository_id = $2 AND rule_evaluation_status.artifact_id IS NOT DISTINCT FROM $3 AND rule_evaluation_status.rule_type_id = $4 AND rule_evaluation_status.entity = $5; --- name: GetPolicyStatusByIdAndProject :one -SELECT p.id, p.name, ps.policy_status, ps.last_updated FROM policy_status ps -INNER JOIN policies p ON p.id = ps.policy_id +-- name: GetProfileStatusByIdAndProject :one +SELECT p.id, p.name, ps.profile_status, ps.last_updated FROM profile_status ps +INNER JOIN profiles p ON p.id = ps.profile_id WHERE p.id = $1 AND p.project_id = $2; --- name: GetPolicyStatusByNameAndProject :one -SELECT p.id, p.name, ps.policy_status, ps.last_updated FROM policy_status ps -INNER JOIN policies p ON p.id = ps.policy_id +-- name: GetProfileStatusByNameAndProject :one +SELECT p.id, p.name, ps.profile_status, ps.last_updated FROM profile_status ps +INNER JOIN profiles p ON p.id = ps.profile_id WHERE p.name = $1 AND p.project_id = $2; --- name: GetPolicyStatusByProject :many -SELECT p.id, p.name, ps.policy_status, ps.last_updated FROM policy_status ps -INNER JOIN policies p ON p.id = ps.policy_id +-- name: GetProfileStatusByProject :many +SELECT p.id, p.name, ps.profile_status, ps.last_updated FROM profile_status ps +INNER JOIN profiles p ON p.id = ps.profile_id WHERE p.project_id = $1; --- name: ListRuleEvaluationStatusByPolicyId :many +-- name: ListRuleEvaluationStatusByProfileId :many SELECT res.eval_status as eval_status, res.eval_last_updated as eval_last_updated, res.eval_details as eval_details, res.remediation_status as rem_status, res.remediation_details as rem_details, res.remediation_last_updated as rem_last_updated, res.repository_id as repository_id, res.entity as entity, repo.repo_name as repo_name, repo.repo_owner as repo_owner, repo.provider as provider, rt.name as rule_type_name, rt.id as rule_type_id FROM rule_evaluation_status res INNER JOIN repositories repo ON repo.id = res.repository_id INNER JOIN rule_type rt ON rt.id = res.rule_type_id -WHERE res.policy_id = $1 AND +WHERE res.profile_id = $1 AND ( CASE WHEN sqlc.narg(entity_type)::entities = 'repository' AND res.repository_id = sqlc.narg(entity_id)::UUID THEN true diff --git a/database/query/profiles.sql b/database/query/profiles.sql new file mode 100644 index 0000000000..0cf1f4d813 --- /dev/null +++ b/database/query/profiles.sql @@ -0,0 +1,31 @@ +-- name: CreateProfile :one +INSERT INTO profiles ( + provider, + project_id, + remediate, + name) VALUES ($1, $2, $3, $4) RETURNING *; + +-- name: CreateProfileForEntity :one +INSERT INTO entity_profiles ( + entity, + profile_id, + contextual_rules) VALUES ($1, $2, sqlc.arg(contextual_rules)::jsonb) RETURNING *; + +-- name: GetProfileByProjectAndID :many +SELECT * FROM profiles JOIN entity_profiles ON profiles.id = entity_profiles.profile_id +WHERE profiles.project_id = $1 AND profiles.id = $2; + +-- name: GetProfileByID :one +SELECT * FROM profiles WHERE id = $1; + +-- name: GetProfileByProjectAndName :many +SELECT * FROM profiles JOIN entity_profiles ON profiles.id = entity_profiles.profile_id +WHERE profiles.project_id = $1 AND profiles.name = $2; + +-- name: ListProfilesByProjectID :many +SELECT * FROM profiles JOIN entity_profiles ON profiles.id = entity_profiles.profile_id +WHERE profiles.project_id = $1; + +-- name: DeleteProfile :exec +DELETE FROM profiles +WHERE id = $1; diff --git a/deployment/helm/templates/ingress.yaml b/deployment/helm/templates/ingress.yaml index 2ecab41301..3dd538cb69 100644 --- a/deployment/helm/templates/ingress.yaml +++ b/deployment/helm/templates/ingress.yaml @@ -117,7 +117,7 @@ spec: name: mediator-grpc port: name: grpc - - path: /mediator.v1.PolicyService + - path: /mediator.v1.ProfileService pathType: Prefix backend: service: diff --git a/docs/docs/cli/medic.md b/docs/docs/cli/medic.md index 69b0f036c8..ea7b81bdc2 100644 --- a/docs/docs/cli/medic.md +++ b/docs/docs/cli/medic.md @@ -26,8 +26,8 @@ https://docs.stacklok.com/mediator/medic/overview.html * [medic docs](medic_docs.md) - Generates documentation for the client * [medic keys](medic_keys.md) - Manage keys within a mediator control plane * [medic org](medic_org.md) - Manage organizations within a mediator control plane -* [medic policy](medic_policy.md) - Manage policies within a mediator control plane -* [medic policy_status](medic_policy_status.md) - Manage policy status within a mediator control plane +* [medic profile](medic_profile.md) - Manage profiles within a mediator control plane +* [medic profile_status](medic_profile_status.md) - Manage profile status within a mediator control plane * [medic project](medic_project.md) - Manage projects within a mediator control plane * [medic provider](medic_provider.md) - Manage providers within a mediator control plane * [medic repo](medic_repo.md) - Manage repositories within a mediator control plane diff --git a/docs/docs/cli/medic_policy.md b/docs/docs/cli/medic_policy.md deleted file mode 100644 index baf04f59d2..0000000000 --- a/docs/docs/cli/medic_policy.md +++ /dev/null @@ -1,36 +0,0 @@ -## medic policy - -Manage policies within a mediator control plane - -### Synopsis - -The medic policy subcommands allows the management of policies within -a mediator controlplane. - -``` -medic policy [flags] -``` - -### Options - -``` - -h, --help help for policy -``` - -### Options inherited from parent commands - -``` - --config string config file (default is $PWD/config.yaml) - --grpc-host string Server host (default "staging.stacklok.dev") - --grpc-insecure Allow establishing insecure connections - --grpc-port int Server port (default 443) -``` - -### SEE ALSO - -* [medic](medic.md) - medic controls mediator via the control plane -* [medic policy create](medic_policy_create.md) - Create a policy within a mediator control plane -* [medic policy delete](medic_policy_delete.md) - delete a policy within a mediator controlplane -* [medic policy get](medic_policy_get.md) - Get details for a policy within a mediator control plane -* [medic policy list](medic_policy_list.md) - List policies within a mediator control plane - diff --git a/docs/docs/cli/medic_policy_status_get.md b/docs/docs/cli/medic_policy_status_get.md deleted file mode 100644 index 32c09bdad1..0000000000 --- a/docs/docs/cli/medic_policy_status_get.md +++ /dev/null @@ -1,38 +0,0 @@ -## medic policy_status get - -Get policy status within a mediator control plane - -### Synopsis - -The medic policy_status get subcommand lets you get policy status within a -mediator control plane for an specific provider/project or policy id, entity type and entity id. - -``` -medic policy_status get [flags] -``` - -### Options - -``` - -e, --entity string entity id to get policy status for - -t, --entity-type string the entity type to get policy status for (one of artifact,build_environment,repository) - -h, --help help for get - -o, --output string Output format (json, yaml or table) (default "table") - -i, --policy string policy name to get policy status for - -g, --project string project id to get policy status for - -p, --provider string Provider to get policy status for (default "github") -``` - -### Options inherited from parent commands - -``` - --config string config file (default is $PWD/config.yaml) - --grpc-host string Server host (default "staging.stacklok.dev") - --grpc-insecure Allow establishing insecure connections - --grpc-port int Server port (default 443) -``` - -### SEE ALSO - -* [medic policy_status](medic_policy_status.md) - Manage policy status within a mediator control plane - diff --git a/docs/docs/cli/medic_policy_status_list.md b/docs/docs/cli/medic_policy_status_list.md deleted file mode 100644 index 4749a8faf9..0000000000 --- a/docs/docs/cli/medic_policy_status_list.md +++ /dev/null @@ -1,38 +0,0 @@ -## medic policy_status list - -List policy status within a mediator control plane - -### Synopsis - -The medic policy_status list subcommand lets you list policy status within a -mediator control plane for an specific provider/project or policy id. - -``` -medic policy_status list [flags] -``` - -### Options - -``` - -d, --detailed List all policy violations - -h, --help help for list - -o, --output string Output format (json, yaml or table) (default "table") - -i, --policy string policy name to list policy status for - -g, --project string project id to list policy status for - -p, --provider string Provider to list policy status for (default "github") - -r, --rule string Filter policy status list by rule -``` - -### Options inherited from parent commands - -``` - --config string config file (default is $PWD/config.yaml) - --grpc-host string Server host (default "staging.stacklok.dev") - --grpc-insecure Allow establishing insecure connections - --grpc-port int Server port (default 443) -``` - -### SEE ALSO - -* [medic policy_status](medic_policy_status.md) - Manage policy status within a mediator control plane - diff --git a/docs/docs/cli/medic_profile.md b/docs/docs/cli/medic_profile.md new file mode 100644 index 0000000000..9b93dd7d1e --- /dev/null +++ b/docs/docs/cli/medic_profile.md @@ -0,0 +1,36 @@ +## medic profile + +Manage profiles within a mediator control plane + +### Synopsis + +The medic profile subcommands allows the management of profiles within +a mediator controlplane. + +``` +medic profile [flags] +``` + +### Options + +``` + -h, --help help for profile +``` + +### Options inherited from parent commands + +``` + --config string config file (default is $PWD/config.yaml) + --grpc-host string Server host (default "staging.stacklok.dev") + --grpc-insecure Allow establishing insecure connections + --grpc-port int Server port (default 443) +``` + +### SEE ALSO + +* [medic](medic.md) - medic controls mediator via the control plane +* [medic profile create](medic_profile_create.md) - Create a profile within a mediator control plane +* [medic profile delete](medic_profile_delete.md) - delete a profile within a mediator controlplane +* [medic profile get](medic_profile_get.md) - Get details for a profile within a mediator control plane +* [medic profile list](medic_profile_list.md) - List profiles within a mediator control plane + diff --git a/docs/docs/cli/medic_policy_create.md b/docs/docs/cli/medic_profile_create.md similarity index 52% rename from docs/docs/cli/medic_policy_create.md rename to docs/docs/cli/medic_profile_create.md index 2fc3a8d181..524ecc6f34 100644 --- a/docs/docs/cli/medic_policy_create.md +++ b/docs/docs/cli/medic_profile_create.md @@ -1,22 +1,22 @@ -## medic policy create +## medic profile create -Create a policy within a mediator control plane +Create a profile within a mediator control plane ### Synopsis -The medic policy create subcommand lets you create new policies for a project +The medic profile create subcommand lets you create new profiles for a project within a mediator control plane. ``` -medic policy create [flags] +medic profile create [flags] ``` ### Options ``` - -f, --file string Path to the YAML defining the policy (or - for stdin) + -f, --file string Path to the YAML defining the profile (or - for stdin) -h, --help help for create - -p, --project string Project to create the policy in + -p, --project string Project to create the profile in ``` ### Options inherited from parent commands @@ -30,5 +30,5 @@ medic policy create [flags] ### SEE ALSO -* [medic policy](medic_policy.md) - Manage policies within a mediator control plane +* [medic profile](medic_profile.md) - Manage profiles within a mediator control plane diff --git a/docs/docs/cli/medic_policy_delete.md b/docs/docs/cli/medic_profile_delete.md similarity index 53% rename from docs/docs/cli/medic_policy_delete.md rename to docs/docs/cli/medic_profile_delete.md index 81cd9ec4cc..2dc0911645 100644 --- a/docs/docs/cli/medic_policy_delete.md +++ b/docs/docs/cli/medic_profile_delete.md @@ -1,22 +1,22 @@ -## medic policy delete +## medic profile delete -delete a policy within a mediator controlplane +delete a profile within a mediator controlplane ### Synopsis -The medic policy delete subcommand lets you delete policies within a +The medic profile delete subcommand lets you delete profiles within a mediator control plane. ``` -medic policy delete [flags] +medic profile delete [flags] ``` ### Options ``` -h, --help help for delete - -i, --id string id of policy to delete - -p, --provider string Provider for the policy (default "github") + -i, --id string id of profile to delete + -p, --provider string Provider for the profile (default "github") ``` ### Options inherited from parent commands @@ -30,5 +30,5 @@ medic policy delete [flags] ### SEE ALSO -* [medic policy](medic_policy.md) - Manage policies within a mediator control plane +* [medic profile](medic_profile.md) - Manage profiles within a mediator control plane diff --git a/docs/docs/cli/medic_policy_get.md b/docs/docs/cli/medic_profile_get.md similarity index 56% rename from docs/docs/cli/medic_policy_get.md rename to docs/docs/cli/medic_profile_get.md index 9321a88d57..3b5ac2f04b 100644 --- a/docs/docs/cli/medic_policy_get.md +++ b/docs/docs/cli/medic_profile_get.md @@ -1,23 +1,23 @@ -## medic policy get +## medic profile get -Get details for a policy within a mediator control plane +Get details for a profile within a mediator control plane ### Synopsis -The medic policy get subcommand lets you retrieve details for a policy within a +The medic profile get subcommand lets you retrieve details for a profile within a mediator control plane. ``` -medic policy get [flags] +medic profile get [flags] ``` ### Options ``` -h, --help help for get - -i, --id string ID for the policy to query + -i, --id string ID for the profile to query -o, --output string Output format (json, yaml or table) (default "table") - -p, --provider string Provider for the policy (default "github") + -p, --provider string Provider for the profile (default "github") ``` ### Options inherited from parent commands @@ -31,5 +31,5 @@ medic policy get [flags] ### SEE ALSO -* [medic policy](medic_policy.md) - Manage policies within a mediator control plane +* [medic profile](medic_profile.md) - Manage profiles within a mediator control plane diff --git a/docs/docs/cli/medic_policy_list.md b/docs/docs/cli/medic_profile_list.md similarity index 64% rename from docs/docs/cli/medic_policy_list.md rename to docs/docs/cli/medic_profile_list.md index 656c466344..391dbbcc9f 100644 --- a/docs/docs/cli/medic_policy_list.md +++ b/docs/docs/cli/medic_profile_list.md @@ -1,14 +1,14 @@ -## medic policy list +## medic profile list -List policies within a mediator control plane +List profiles within a mediator control plane ### Synopsis -The medic policy list subcommand lets you list policies within a +The medic profile list subcommand lets you list profiles within a mediator control plane for an specific project. ``` -medic policy list [flags] +medic profile list [flags] ``` ### Options @@ -16,7 +16,7 @@ medic policy list [flags] ``` -h, --help help for list -o, --output string Output format (json, yaml or table) (default "table") - -p, --provider string Provider to list policies for + -p, --provider string Provider to list profiles for ``` ### Options inherited from parent commands @@ -30,5 +30,5 @@ medic policy list [flags] ### SEE ALSO -* [medic policy](medic_policy.md) - Manage policies within a mediator control plane +* [medic profile](medic_profile.md) - Manage profiles within a mediator control plane diff --git a/docs/docs/cli/medic_policy_status.md b/docs/docs/cli/medic_profile_status.md similarity index 50% rename from docs/docs/cli/medic_policy_status.md rename to docs/docs/cli/medic_profile_status.md index 5197aa1e99..c28c17c844 100644 --- a/docs/docs/cli/medic_policy_status.md +++ b/docs/docs/cli/medic_profile_status.md @@ -1,20 +1,20 @@ -## medic policy_status +## medic profile_status -Manage policy status within a mediator control plane +Manage profile status within a mediator control plane ### Synopsis -The medic policy_status subcommands allows the management of policy status within +The medic profile_status subcommands allows the management of profile status within a mediator controlplane. ``` -medic policy_status [flags] +medic profile_status [flags] ``` ### Options ``` - -h, --help help for policy_status + -h, --help help for profile_status ``` ### Options inherited from parent commands @@ -29,6 +29,6 @@ medic policy_status [flags] ### SEE ALSO * [medic](medic.md) - medic controls mediator via the control plane -* [medic policy_status get](medic_policy_status_get.md) - Get policy status within a mediator control plane -* [medic policy_status list](medic_policy_status_list.md) - List policy status within a mediator control plane +* [medic profile_status get](medic_profile_status_get.md) - Get profile status within a mediator control plane +* [medic profile_status list](medic_profile_status_list.md) - List profile status within a mediator control plane diff --git a/docs/docs/cli/medic_profile_status_get.md b/docs/docs/cli/medic_profile_status_get.md new file mode 100644 index 0000000000..17fcfd2a3c --- /dev/null +++ b/docs/docs/cli/medic_profile_status_get.md @@ -0,0 +1,38 @@ +## medic profile_status get + +Get profile status within a mediator control plane + +### Synopsis + +The medic profile_status get subcommand lets you get profile status within a +mediator control plane for an specific provider/project or profile id, entity type and entity id. + +``` +medic profile_status get [flags] +``` + +### Options + +``` + -e, --entity string entity id to get profile status for + -t, --entity-type string the entity type to get profile status for (one of artifact,build_environment,repository) + -h, --help help for get + -o, --output string Output format (json, yaml or table) (default "table") + -i, --profile string profile name to get profile status for + -g, --project string project id to get profile status for + -p, --provider string Provider to get profile status for (default "github") +``` + +### Options inherited from parent commands + +``` + --config string config file (default is $PWD/config.yaml) + --grpc-host string Server host (default "staging.stacklok.dev") + --grpc-insecure Allow establishing insecure connections + --grpc-port int Server port (default 443) +``` + +### SEE ALSO + +* [medic profile_status](medic_profile_status.md) - Manage profile status within a mediator control plane + diff --git a/docs/docs/cli/medic_profile_status_list.md b/docs/docs/cli/medic_profile_status_list.md new file mode 100644 index 0000000000..10d8c2727f --- /dev/null +++ b/docs/docs/cli/medic_profile_status_list.md @@ -0,0 +1,38 @@ +## medic profile_status list + +List profile status within a mediator control plane + +### Synopsis + +The medic profile_status list subcommand lets you list profile status within a +mediator control plane for an specific provider/project or profile id. + +``` +medic profile_status list [flags] +``` + +### Options + +``` + -d, --detailed List all profile violations + -h, --help help for list + -o, --output string Output format (json, yaml or table) (default "table") + -i, --profile string profile name to list profile status for + -g, --project string project id to list profile status for + -p, --provider string Provider to list profile status for (default "github") + -r, --rule string Filter profile status list by rule +``` + +### Options inherited from parent commands + +``` + --config string config file (default is $PWD/config.yaml) + --grpc-host string Server host (default "staging.stacklok.dev") + --grpc-insecure Allow establishing insecure connections + --grpc-port int Server port (default 443) +``` + +### SEE ALSO + +* [medic profile_status](medic_profile_status.md) - Manage profile status within a mediator control plane + diff --git a/docs/docs/cli/medic_repo_get.md b/docs/docs/cli/medic_repo_get.md index b8f7bade0a..85970c3792 100644 --- a/docs/docs/cli/medic_repo_get.md +++ b/docs/docs/cli/medic_repo_get.md @@ -18,7 +18,7 @@ medic repo get [flags] -f, --output string Output format (json or yaml) -p, --provider string Name for the provider to enroll -r, --repo-id string ID of the repo to query - -s, --status Only return the status of the policies associated to this repo + -s, --status Only return the status of the profiles associated to this repo ``` ### Options inherited from parent commands diff --git a/docs/docs/cli/medic_rule_type_create.md b/docs/docs/cli/medic_rule_type_create.md index 212e19f8f1..378f926f66 100644 --- a/docs/docs/cli/medic_rule_type_create.md +++ b/docs/docs/cli/medic_rule_type_create.md @@ -4,7 +4,7 @@ Create a rule type within a mediator control plane ### Synopsis -The medic rule type create subcommand lets you create new policies for a project +The medic rule type create subcommand lets you create new profiles for a project within a mediator control plane. ``` diff --git a/docs/docs/cli/medic_rule_type_delete.md b/docs/docs/cli/medic_rule_type_delete.md index 3e20bdd3aa..c8be89a51c 100644 --- a/docs/docs/cli/medic_rule_type_delete.md +++ b/docs/docs/cli/medic_rule_type_delete.md @@ -4,7 +4,7 @@ delete a rule type within a mediator controlplane ### Synopsis -The medic rule type delete subcommand lets you delete policies within a +The medic rule type delete subcommand lets you delete profiles within a mediator control plane. ``` diff --git a/docs/docs/cli/medic_rule_type_get.md b/docs/docs/cli/medic_rule_type_get.md index e73ea7f924..f4845f57b2 100644 --- a/docs/docs/cli/medic_rule_type_get.md +++ b/docs/docs/cli/medic_rule_type_get.md @@ -15,9 +15,9 @@ medic rule_type get [flags] ``` -h, --help help for get - -i, --id string ID for the policy to query + -i, --id string ID for the profile to query -o, --output string Output format (json, yaml or table) (default "table") - -p, --provider string Provider for the policy (default "github") + -p, --provider string Provider for the profile (default "github") ``` ### Options inherited from parent commands diff --git a/docs/docs/intro.md b/docs/docs/intro.md index 37184d1252..7e5de3ab4e 100644 --- a/docs/docs/intro.md +++ b/docs/docs/intro.md @@ -13,7 +13,7 @@ displayed_sidebar: mediator Mediator is an open platform to manage the security of your software supply chain. Mediator unifies the security of your software supply chain by providing a single -place to manage your security policies, and a central location to view and remediate +place to manage your security profiles, and a central location to view and remediate the results. Mediator is designed to be extensible, allowing you to integrate with your existing @@ -23,7 +23,7 @@ tooling and processes. - **GitHub integration** - Mediator integrates with GitHub to provide a single place to manage your repository security posture. -- **Policy management** - Mediator allows you to define security policies for your +- **Profile management** - Mediator allows you to define security profiles for your software supply chain. - **Attestation and Provenance** - Mediator integrates with [sigstore](https://sigstore.dev/) [in-toto](https://in-toto.io/), [slsa](https://slsa.dev) and the diff --git a/docs/docs/policy_engine/policy_introduction.md b/docs/docs/policy_engine/policy_introduction.md deleted file mode 100644 index 86c25c182b..0000000000 --- a/docs/docs/policy_engine/policy_introduction.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -id: policy_introduction -title: Policy Introduction -sidebar_position: 1 -slug: /policy_introduction -displayed_sidebar: mediator ---- - -# Policy Introduction - -Mediator allows you to define policies for your software supply chain. - -The anatomy of a policy is the policy itself, which outlines the rules to be -checked, the rule types, and the evaluation engine. - -As of time of writing, mediator supports the following evaluation engines: - -* **[Open Policy Agent](https://www.openpolicyagent.org/)** (OPA) policy language. -* **[JQ](https://jqlang.github.io/jq/)** - a lightweight and flexible command-line JSON processor. - -Each engine is designed to be extensible, allowing you to integrate your own -logic and processes. - -Please see the [examples](https://github.com/stacklok/mediator/tree/main/examples) directory for examples of policies, and [Manage Policies](./manage_policies.md) for more details on how to set up policies and rule types. diff --git a/docs/docs/policy_engine/manage_policies.md b/docs/docs/profile_engine/manage_profiles.md similarity index 63% rename from docs/docs/policy_engine/manage_policies.md rename to docs/docs/profile_engine/manage_profiles.md index e64196e131..dc8ce6d1de 100644 --- a/docs/docs/policy_engine/manage_policies.md +++ b/docs/docs/profile_engine/manage_profiles.md @@ -1,24 +1,24 @@ --- -id: manage_policies -title: Manage policies and violations +id: manage_profiles +title: Manage profiles and violations sidebar_position: 2 -slug: /manage_policies +slug: /manage_profiles displayed_sidebar: mediator --- -# Manage policies +# Manage profiles -In order to detect security deviations from repositories or other entities, Mediator is relying on the concepts of **Policies**. -A policy is a definition of a verification we want to do on an entity in a pipeline. -A **policy** is an instance of a policy type applied to an specific group, with the relevant settings filled in. +In order to detect security deviations from repositories or other entities, Mediator is relying on the concepts of **Profiles**. +A profile is a definition of a verification we want to do on an entity in a pipeline. +A **profile** is an instance of a profile type applied to an specific group, with the relevant settings filled in. -An example policy is the following: +An example profile is the following: ```yaml --- version: v1 -type: policy -name: acme-github-policy +type: profile +name: acme-github-profile context: organization: ACME group: Root Group @@ -42,12 +42,12 @@ repository: allow_fork_syncing: true ``` -The full example is available in the [examples directory](https://github.com/stacklok/mediator/blob/main/examples/github/policies/policy.yaml). +The full example is available in the [examples directory](https://github.com/stacklok/mediator/blob/main/examples/github/profiles/profile.yaml). -This policy is checking that secret scanning is enabled for all repositories belonging to the ACME organization, +This profile is checking that secret scanning is enabled for all repositories belonging to the ACME organization, and that the `main` branch is protected, requiring at least one approval from a code owner before landing a pull request. -You'll notice that this policy calls two different rules: `secret_scanning` and `branch_protection`. +You'll notice that this profile calls two different rules: `secret_scanning` and `branch_protection`. Rules can be instantiated from rule types, and they are the ones that are actually doing the verification. @@ -86,15 +86,15 @@ def: endpoint: "/repos/{{.Entity.Owner}}/{{.Entity.Repository}}" # This is the method to use to retrieve the data. It should already default to JSON parse: json - # Defines the configuration for evaluating data ingested against the given policy + # Defines the configuration for evaluating data ingested against the given profile eval: type: jq jq: # Ingested points to the data retrieved in the `ingest` section - ingested: def: '.security_and_analysis.secret_scanning.status == "enabled"' - # policy points to the policy itself. - policy: + # profile points to the profile itself. + profile: def: ".enabled" ``` @@ -106,11 +106,11 @@ This rule type is checking that secret scanning is enabled for all repositories The rule type defines how the upstream GitHub API is to be queried, and how the data is to be evaluated. It also defines how instances of this rule will be validated against the rule schema. -When a policy is created for an specific group, a continuous monitoring for the related objects start. An object can be a repository, -a branch, a package... depending on the policy definition. When an specific object is not matching what's expected, -a violation is presented via the policy's **status**. When a violation happens, the overall **Policy status** for this specific entity changes, +When a profile is created for an specific group, a continuous monitoring for the related objects start. An object can be a repository, +a branch, a package... depending on the profile definition. When an specific object is not matching what's expected, +a violation is presented via the profile's **status**. When a violation happens, the overall **Profile status** for this specific entity changes, becoming failed. There is also individual statuses for each rule evaluation. User can check the reason for this violation and take remediation -actions to comply with the policy. +actions to comply with the profile. ## Prerequisites @@ -124,18 +124,18 @@ Covered rule types are now: - branch_protection: controls the branch protection rules on a repo - secret_scanning: enforces secret scanning for a repo -You can list all policy types registered in Mediator: +You can list all profile types registered in Mediator: ```bash medic rule_type list --provider github ``` -By default, a rule type is providing some recommended default values, so users can create policies -by using those defaults without having to create a new policy from scratch. +By default, a rule type is providing some recommended default values, so users can create profiles +by using those defaults without having to create a new profile from scratch. ## Create a rule type -Before creating a policy, we need to ensure that all rule types exist in mediator. +Before creating a profile, we need to ensure that all rule types exist in mediator. A rule type can be created by pointing to a directory (or file) containing the rule type definition: @@ -146,51 +146,51 @@ medic rule_type create -f ./examples/github/rule-types Where the yaml files in the directory `rule-types` may look as the example above. Once all the relevant rule types are available for our group, we may take them into use -by creating a policy. +by creating a profile. -## Create a policy +## Create a profile -When there is a need to control the specific behaviours for a set of repositories, a policy can be -created, based on the previous policy types. +When there is a need to control the specific behaviours for a set of repositories, a profile can be +created, based on the previous profile types. -A policy needs to be associated with a provider and a group ID, and it will be applied to all +A profile needs to be associated with a provider and a group ID, and it will be applied to all repositories belonging to that group. -The policy can be created by using the provided defaults, or by providing a new one stored on a file. +The profile can be created by using the provided defaults, or by providing a new one stored on a file. For creating based on a file: ```bash -medic policy create -f ./examples/github/policies/policy.yaml +medic profile create -f ./examples/github/profiles/profile.yaml ``` -Where `policy.yaml` may look as the example above. +Where `profile.yaml` may look as the example above. -When an specific setting is not provided, the value of this setting is not compared against the policy. -This specific policy will monitor the `main` branch for all related repositories, checking that pull request enforcement is on +When an specific setting is not provided, the value of this setting is not compared against the profile. +This specific profile will monitor the `main` branch for all related repositories, checking that pull request enforcement is on place, requiring reviews from code owners and a minimum of 2 approvals before landing. It will also require that force pushes and deletions are disabled for the `main` branch. -When a policy for a provider and group is created, any repos registered for the same provider and group, -are being observed. Each time that there is a change on the repo that causes the policy status to be updated. +When a profile for a provider and group is created, any repos registered for the same provider and group, +are being observed. Each time that there is a change on the repo that causes the profile status to be updated. -## List policy status +## List profile status -When there is an event that causes a policy violation, the violation is stored in the database, and the -overall status of the policy for this specific repository is changed. -Policy status will inform about: +When there is an event that causes a profile violation, the violation is stored in the database, and the +overall status of the profile for this specific repository is changed. +Profile status will inform about: -- policy_type (branch_protection...) +- profile_type (branch_protection...) - status: [success, failure] - last updated: time when this status was updated -Policy status can be checked using the following commands +Profile status can be checked using the following commands ```bash -medic policy_status list --policy 1 +medic profile_status list --profile 1 ``` To view all of the rule evaluations, use the following ```bash -medic policy_status list --policy 1 --detailed +medic profile_status list --profile 1 --detailed ``` diff --git a/docs/docs/profile_engine/profile_introduction.md b/docs/docs/profile_engine/profile_introduction.md new file mode 100644 index 0000000000..9175ea9a59 --- /dev/null +++ b/docs/docs/profile_engine/profile_introduction.md @@ -0,0 +1,24 @@ +--- +id: profile_introduction +title: Profile Introduction +sidebar_position: 1 +slug: /profile_introduction +displayed_sidebar: mediator +--- + +# Profile Introduction + +Mediator allows you to define profiles for your software supply chain. + +The anatomy of a profile is the profile itself, which outlines the rules to be +checked, the rule types, and the evaluation engine. + +As of time of writing, mediator supports the following evaluation engines: + +* **[Open Profile Agent](https://www.openprofileagent.org/)** (OPA) profile language. +* **[JQ](https://jqlang.github.io/jq/)** - a lightweight and flexible command-line JSON processor. + +Each engine is designed to be extensible, allowing you to integrate your own +logic and processes. + +Please see the [examples](https://github.com/stacklok/mediator/tree/main/examples) directory for examples of profiles, and [Manage Profiles](./manage_profiles.md) for more details on how to set up profiles and rule types. diff --git a/docs/docs/protodocs/proto.md b/docs/docs/protodocs/proto.md index c2c78603e5..08dc115725 100644 --- a/docs/docs/protodocs/proto.md +++ b/docs/docs/protodocs/proto.md @@ -16,8 +16,8 @@ - [CreateKeyPairResponse](#mediator-v1-CreateKeyPairResponse) - [CreateOrganizationRequest](#mediator-v1-CreateOrganizationRequest) - [CreateOrganizationResponse](#mediator-v1-CreateOrganizationResponse) - - [CreatePolicyRequest](#mediator-v1-CreatePolicyRequest) - - [CreatePolicyResponse](#mediator-v1-CreatePolicyResponse) + - [CreateProfileRequest](#mediator-v1-CreateProfileRequest) + - [CreateProfileResponse](#mediator-v1-CreateProfileResponse) - [CreateProjectRequest](#mediator-v1-CreateProjectRequest) - [CreateProjectResponse](#mediator-v1-CreateProjectResponse) - [CreateRoleByOrganizationRequest](#mediator-v1-CreateRoleByOrganizationRequest) @@ -30,8 +30,8 @@ - [CreateUserResponse](#mediator-v1-CreateUserResponse) - [DeleteOrganizationRequest](#mediator-v1-DeleteOrganizationRequest) - [DeleteOrganizationResponse](#mediator-v1-DeleteOrganizationResponse) - - [DeletePolicyRequest](#mediator-v1-DeletePolicyRequest) - - [DeletePolicyResponse](#mediator-v1-DeletePolicyResponse) + - [DeleteProfileRequest](#mediator-v1-DeleteProfileRequest) + - [DeleteProfileResponse](#mediator-v1-DeleteProfileResponse) - [DeleteProjectRequest](#mediator-v1-DeleteProjectRequest) - [DeleteProjectResponse](#mediator-v1-DeleteProjectResponse) - [DeleteRoleRequest](#mediator-v1-DeleteRoleRequest) @@ -58,13 +58,13 @@ - [GetOrganizationResponse](#mediator-v1-GetOrganizationResponse) - [GetOrganizationsRequest](#mediator-v1-GetOrganizationsRequest) - [GetOrganizationsResponse](#mediator-v1-GetOrganizationsResponse) - - [GetPolicyByIdRequest](#mediator-v1-GetPolicyByIdRequest) - - [GetPolicyByIdResponse](#mediator-v1-GetPolicyByIdResponse) - - [GetPolicyStatusByNameRequest](#mediator-v1-GetPolicyStatusByNameRequest) - - [GetPolicyStatusByNameRequest.EntityTypedId](#mediator-v1-GetPolicyStatusByNameRequest-EntityTypedId) - - [GetPolicyStatusByNameResponse](#mediator-v1-GetPolicyStatusByNameResponse) - - [GetPolicyStatusByProjectRequest](#mediator-v1-GetPolicyStatusByProjectRequest) - - [GetPolicyStatusByProjectResponse](#mediator-v1-GetPolicyStatusByProjectResponse) + - [GetProfileByIdRequest](#mediator-v1-GetProfileByIdRequest) + - [GetProfileByIdResponse](#mediator-v1-GetProfileByIdResponse) + - [GetProfileStatusByNameRequest](#mediator-v1-GetProfileStatusByNameRequest) + - [GetProfileStatusByNameRequest.EntityTypedId](#mediator-v1-GetProfileStatusByNameRequest-EntityTypedId) + - [GetProfileStatusByNameResponse](#mediator-v1-GetProfileStatusByNameResponse) + - [GetProfileStatusByProjectRequest](#mediator-v1-GetProfileStatusByProjectRequest) + - [GetProfileStatusByProjectResponse](#mediator-v1-GetProfileStatusByProjectResponse) - [GetProjectByIdRequest](#mediator-v1-GetProjectByIdRequest) - [GetProjectByIdResponse](#mediator-v1-GetProjectByIdResponse) - [GetProjectByNameRequest](#mediator-v1-GetProjectByNameRequest) @@ -114,8 +114,8 @@ - [GithubWorkflow](#mediator-v1-GithubWorkflow) - [ListArtifactsRequest](#mediator-v1-ListArtifactsRequest) - [ListArtifactsResponse](#mediator-v1-ListArtifactsResponse) - - [ListPoliciesRequest](#mediator-v1-ListPoliciesRequest) - - [ListPoliciesResponse](#mediator-v1-ListPoliciesResponse) + - [ListProfilesRequest](#mediator-v1-ListProfilesRequest) + - [ListProfilesResponse](#mediator-v1-ListProfilesResponse) - [ListRepositoriesRequest](#mediator-v1-ListRepositoriesRequest) - [ListRepositoriesResponse](#mediator-v1-ListRepositoriesResponse) - [ListRuleTypesRequest](#mediator-v1-ListRuleTypesRequest) @@ -123,12 +123,12 @@ - [LogOutRequest](#mediator-v1-LogOutRequest) - [LogOutResponse](#mediator-v1-LogOutResponse) - [OrganizationRecord](#mediator-v1-OrganizationRecord) - - [Policy](#mediator-v1-Policy) - - [Policy.Rule](#mediator-v1-Policy-Rule) - - [PolicyStatus](#mediator-v1-PolicyStatus) - [PrDependencies](#mediator-v1-PrDependencies) - [PrDependencies.ContextualDependency](#mediator-v1-PrDependencies-ContextualDependency) - [PrDependencies.ContextualDependency.FilePatch](#mediator-v1-PrDependencies-ContextualDependency-FilePatch) + - [Profile](#mediator-v1-Profile) + - [Profile.Rule](#mediator-v1-Profile-Rule) + - [ProfileStatus](#mediator-v1-ProfileStatus) - [ProjectRecord](#mediator-v1-ProjectRecord) - [Provider](#mediator-v1-Provider) - [Provider.Context](#mediator-v1-Provider-Context) @@ -191,7 +191,7 @@ - [KeyService](#mediator-v1-KeyService) - [OAuthService](#mediator-v1-OAuthService) - [OrganizationService](#mediator-v1-OrganizationService) - - [PolicyService](#mediator-v1-PolicyService) + - [ProfileService](#mediator-v1-ProfileService) - [ProjectService](#mediator-v1-ProjectService) - [RepositoryService](#mediator-v1-RepositoryService) - [RoleService](#mediator-v1-RoleService) @@ -405,30 +405,30 @@ Organization service - + -### CreatePolicyRequest -Policy service +### CreateProfileRequest +Profile service | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| policy | [Policy](#mediator-v1-Policy) | | | +| profile | [Profile](#mediator-v1-Profile) | | | - + -### CreatePolicyResponse +### CreateProfileResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| policy | [Policy](#mediator-v1-Policy) | | | +| profile | [Profile](#mediator-v1-Profile) | | | @@ -644,25 +644,25 @@ DeleteOrganizationResponse represents a response to a delete organization reques - + -### DeletePolicyRequest +### DeleteProfileRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | context | [Context](#mediator-v1-Context) | | context is the context in which the rule type is evaluated. | -| id | [string](#string) | | id is the id of the policy to delete | +| id | [string](#string) | | id is the id of the profile to delete | - + -### DeletePolicyResponse +### DeleteProfileResponse @@ -1066,48 +1066,48 @@ list organizations - + -### GetPolicyByIdRequest -get policy by id +### GetProfileByIdRequest +get profile by id | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| context | [Context](#mediator-v1-Context) | | context is the context which contains the policies | -| id | [string](#string) | | id is the id of the policy to get | +| context | [Context](#mediator-v1-Context) | | context is the context which contains the profiles | +| id | [string](#string) | | id is the id of the profile to get | - + -### GetPolicyByIdResponse +### GetProfileByIdResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| policy | [Policy](#mediator-v1-Policy) | | | +| profile | [Profile](#mediator-v1-Profile) | | | - + -### GetPolicyStatusByNameRequest +### GetProfileStatusByNameRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | context | [Context](#mediator-v1-Context) | | context is the context in which the rule type is evaluated. | -| name | [string](#string) | | name is the name of the policy to get | -| entity | [GetPolicyStatusByNameRequest.EntityTypedId](#mediator-v1-GetPolicyStatusByNameRequest-EntityTypedId) | | | +| name | [string](#string) | | name is the name of the profile to get | +| entity | [GetProfileStatusByNameRequest.EntityTypedId](#mediator-v1-GetProfileStatusByNameRequest-EntityTypedId) | | | | all | [bool](#bool) | | | | rule | [string](#string) | | | @@ -1116,9 +1116,9 @@ get policy by id - + -### GetPolicyStatusByNameRequest.EntityTypedId +### GetProfileStatusByNameRequest.EntityTypedId EntiryTypeId is a message that carries an ID together with a type to uniquely identify an entity such as (repo, 1), (artifact, 2), ... if the struct is reused in other messages, it should be moved to a top-level definition @@ -1134,15 +1134,15 @@ if the struct is reused in other messages, it should be moved to a top-level def - + -### GetPolicyStatusByNameResponse +### GetProfileStatusByNameResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| policy_status | [PolicyStatus](#mediator-v1-PolicyStatus) | | policy_status is the status of the policy | +| profile_status | [ProfileStatus](#mediator-v1-ProfileStatus) | | profile_status is the status of the profile | | rule_evaluation_status | [RuleEvaluationStatus](#mediator-v1-RuleEvaluationStatus) | repeated | rule_evaluation_status is the status of the rules | @@ -1150,9 +1150,9 @@ if the struct is reused in other messages, it should be moved to a top-level def - + -### GetPolicyStatusByProjectRequest +### GetProfileStatusByProjectRequest @@ -1165,15 +1165,15 @@ if the struct is reused in other messages, it should be moved to a top-level def - + -### GetPolicyStatusByProjectResponse +### GetProfileStatusByProjectResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| policy_status | [PolicyStatus](#mediator-v1-PolicyStatus) | repeated | policy_status is the status of the policy | +| profile_status | [ProfileStatus](#mediator-v1-ProfileStatus) | repeated | profile_status is the status of the profile | @@ -1950,30 +1950,30 @@ GitType defines the git data ingester. - + -### ListPoliciesRequest -list policies +### ListProfilesRequest +list profiles | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| context | [Context](#mediator-v1-Context) | | context is the context which contains the policies | +| context | [Context](#mediator-v1-Context) | | context is the context which contains the profiles | - + -### ListPoliciesResponse +### ListProfilesResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| policies | [Policy](#mediator-v1-Policy) | repeated | | +| profiles | [Profile](#mediator-v1-Profile) | repeated | | @@ -2083,105 +2083,105 @@ ListRuleTypesResponse is the response to list rule types. - + + +### PrDependencies -### Policy -Policy defines a policy that is user defined. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| context | [Context](#mediator-v1-Context) | | context is the context in which the policy is evaluated. | -| id | [string](#string) | optional | id is the id of the policy. This is optional and is set by the system. | -| name | [string](#string) | | name is the name of the policy instance. | -| repository | [Policy.Rule](#mediator-v1-Policy-Rule) | repeated | These are the entities that one could set in the policy. | -| build_environment | [Policy.Rule](#mediator-v1-Policy-Rule) | repeated | | -| artifact | [Policy.Rule](#mediator-v1-Policy-Rule) | repeated | | -| pull_request | [Policy.Rule](#mediator-v1-Policy-Rule) | repeated | | -| remediate | [string](#string) | optional | whether and how to remediate (on,off,dry_run) this is optional as the default is set by the system | +| pr | [PullRequest](#mediator-v1-PullRequest) | | | +| deps | [PrDependencies.ContextualDependency](#mediator-v1-PrDependencies-ContextualDependency) | repeated | | - + + +### PrDependencies.ContextualDependency -### Policy.Rule -Rule defines the individual call of a certain rule type. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| type | [string](#string) | | type is the type of the rule to be instantiated. | -| params | [google.protobuf.Struct](#google-protobuf-Struct) | | params are the parameters that are passed to the rule. This is optional and depends on the rule type. | -| def | [google.protobuf.Struct](#google-protobuf-Struct) | | def is the definition of the rule. This depends on the rule type. | +| dep | [Dependency](#mediator-v1-Dependency) | | | +| file | [PrDependencies.ContextualDependency.FilePatch](#mediator-v1-PrDependencies-ContextualDependency-FilePatch) | | | - + + +### PrDependencies.ContextualDependency.FilePatch -### PolicyStatus -get the overall policy status | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| policy_id | [string](#string) | | policy_id is the id of the policy | -| policy_name | [string](#string) | | policy_name is the name of the policy | -| policy_status | [string](#string) | | policy_status is the status of the policy | -| last_updated | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | last_updated is the last time the policy was updated | - +| name | [string](#string) | | file changed, e.g. package-lock.json | +| patch_url | [string](#string) | | points to the the raw patchfile | - -### PrDependencies + +### Profile +Profile defines a profile that is user defined. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| pr | [PullRequest](#mediator-v1-PullRequest) | | | -| deps | [PrDependencies.ContextualDependency](#mediator-v1-PrDependencies-ContextualDependency) | repeated | | +| context | [Context](#mediator-v1-Context) | | context is the context in which the profile is evaluated. | +| id | [string](#string) | optional | id is the id of the profile. This is optional and is set by the system. | +| name | [string](#string) | | name is the name of the profile instance. | +| repository | [Profile.Rule](#mediator-v1-Profile-Rule) | repeated | These are the entities that one could set in the profile. | +| build_environment | [Profile.Rule](#mediator-v1-Profile-Rule) | repeated | | +| artifact | [Profile.Rule](#mediator-v1-Profile-Rule) | repeated | | +| pull_request | [Profile.Rule](#mediator-v1-Profile-Rule) | repeated | | +| remediate | [string](#string) | optional | whether and how to remediate (on,off,dry_run) this is optional as the default is set by the system | - - -### PrDependencies.ContextualDependency + +### Profile.Rule +Rule defines the individual call of a certain rule type. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| dep | [Dependency](#mediator-v1-Dependency) | | | -| file | [PrDependencies.ContextualDependency.FilePatch](#mediator-v1-PrDependencies-ContextualDependency-FilePatch) | | | - +| type | [string](#string) | | type is the type of the rule to be instantiated. | +| params | [google.protobuf.Struct](#google-protobuf-Struct) | | params are the parameters that are passed to the rule. This is optional and depends on the rule type. | +| def | [google.protobuf.Struct](#google-protobuf-Struct) | | def is the definition of the rule. This depends on the rule type. | - -### PrDependencies.ContextualDependency.FilePatch + +### ProfileStatus +get the overall profile status | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| name | [string](#string) | | file changed, e.g. package-lock.json | -| patch_url | [string](#string) | | points to the the raw patchfile | +| profile_id | [string](#string) | | profile_id is the id of the profile | +| profile_name | [string](#string) | | profile_name is the name of the profile | +| profile_status | [string](#string) | | profile_status is the status of the profile | +| last_updated | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | last_updated is the last time the profile was updated | @@ -2593,17 +2593,17 @@ This is used to fetch data from a REST endpoint. ### RuleEvaluationStatus -get the status of the rules for a given policy +get the status of the rules for a given profile | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| policy_id | [string](#string) | | policy_id is the id of the policy | +| profile_id | [string](#string) | | profile_id is the id of the profile | | rule_id | [string](#string) | | rule_id is the id of the rule | | rule_name | [string](#string) | | rule_name is the name of the rule | | entity | [string](#string) | | entity is the entity that was evaluated | | status | [string](#string) | | status is the status of the evaluation | -| last_updated | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | last_updated is the last time the policy was updated | +| last_updated | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | last_updated is the last time the profile was updated | | entity_info | [RuleEvaluationStatus.EntityInfoEntry](#mediator-v1-RuleEvaluationStatus-EntityInfoEntry) | repeated | entity_info is the information about the entity | | details | [string](#string) | | details is the description of the evaluation if any | | guidance | [string](#string) | | guidance is the guidance for the evaluation if any | @@ -2684,7 +2684,7 @@ endpoint and how we compare it to the rule. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | type | [string](#string) | | type is the type of the data evaluation. Right now only `jq` is supported as a driver | -| jq | [RuleType.Definition.Eval.JQComparison](#mediator-v1-RuleType-Definition-Eval-JQComparison) | repeated | jq is only used if the `jq` type is selected. It defines the comparisons that are made between the ingested data and the policy rule. | +| jq | [RuleType.Definition.Eval.JQComparison](#mediator-v1-RuleType-Definition-Eval-JQComparison) | repeated | jq is only used if the `jq` type is selected. It defines the comparisons that are made between the ingested data and the profile rule. | | rego | [RuleType.Definition.Eval.Rego](#mediator-v1-RuleType-Definition-Eval-Rego) | optional | rego is only used if the `rego` type is selected. | | vulncheck | [RuleType.Definition.Eval.Vulncheck](#mediator-v1-RuleType-Definition-Eval-Vulncheck) | optional | vulncheck is only used if the `vulncheck` type is selected. | @@ -2702,7 +2702,7 @@ endpoint and how we compare it to the rule. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | ingested | [RuleType.Definition.Eval.JQComparison.Operator](#mediator-v1-RuleType-Definition-Eval-JQComparison-Operator) | | Ingested points to the data retrieved in the `ingest` section | -| policy | [RuleType.Definition.Eval.JQComparison.Operator](#mediator-v1-RuleType-Definition-Eval-JQComparison-Operator) | | Policy points to the policy itself. | +| profile | [RuleType.Definition.Eval.JQComparison.Operator](#mediator-v1-RuleType-Definition-Eval-JQComparison-Operator) | | Profile points to the profile itself. | @@ -2732,8 +2732,8 @@ endpoint and how we compare it to the rule. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| type | [string](#string) | | type is the type of evaluation engine to use for rego. We currently have two modes of operation: - deny-by-default: this is the default mode of operation where we deny access by default and allow access only if the policy explicitly allows it. It expects the policy to set an `allow` variable to true or false. - constraints: this is the mode of operation where we allow access by default and deny access only if a violation is found. It expects the policy to set a `violations` variable with a "msg" field. | -| def | [string](#string) | | def is the definition of the rego policy. | +| type | [string](#string) | | type is the type of evaluation engine to use for rego. We currently have two modes of operation: - deny-by-default: this is the default mode of operation where we deny access by default and allow access only if the profile explicitly allows it. It expects the profile to set an `allow` variable to true or false. - constraints: this is the mode of operation where we allow access by default and deny access only if a violation is found. It expects the profile to set a `violations` variable with a "msg" field. | +| def | [string](#string) | | def is the definition of the rego profile. | @@ -3136,19 +3136,19 @@ manage Organizations CRUD | DeleteOrganization | [DeleteOrganizationRequest](#mediator-v1-DeleteOrganizationRequest) | [DeleteOrganizationResponse](#mediator-v1-DeleteOrganizationResponse) | | - + -### PolicyService +### ProfileService | Method Name | Request Type | Response Type | Description | | ----------- | ------------ | ------------- | ------------| -| CreatePolicy | [CreatePolicyRequest](#mediator-v1-CreatePolicyRequest) | [CreatePolicyResponse](#mediator-v1-CreatePolicyResponse) | | -| DeletePolicy | [DeletePolicyRequest](#mediator-v1-DeletePolicyRequest) | [DeletePolicyResponse](#mediator-v1-DeletePolicyResponse) | | -| ListPolicies | [ListPoliciesRequest](#mediator-v1-ListPoliciesRequest) | [ListPoliciesResponse](#mediator-v1-ListPoliciesResponse) | | -| GetPolicyById | [GetPolicyByIdRequest](#mediator-v1-GetPolicyByIdRequest) | [GetPolicyByIdResponse](#mediator-v1-GetPolicyByIdResponse) | | -| GetPolicyStatusByName | [GetPolicyStatusByNameRequest](#mediator-v1-GetPolicyStatusByNameRequest) | [GetPolicyStatusByNameResponse](#mediator-v1-GetPolicyStatusByNameResponse) | | -| GetPolicyStatusByProject | [GetPolicyStatusByProjectRequest](#mediator-v1-GetPolicyStatusByProjectRequest) | [GetPolicyStatusByProjectResponse](#mediator-v1-GetPolicyStatusByProjectResponse) | | +| CreateProfile | [CreateProfileRequest](#mediator-v1-CreateProfileRequest) | [CreateProfileResponse](#mediator-v1-CreateProfileResponse) | | +| DeleteProfile | [DeleteProfileRequest](#mediator-v1-DeleteProfileRequest) | [DeleteProfileResponse](#mediator-v1-DeleteProfileResponse) | | +| ListProfiles | [ListProfilesRequest](#mediator-v1-ListProfilesRequest) | [ListProfilesResponse](#mediator-v1-ListProfilesResponse) | | +| GetProfileById | [GetProfileByIdRequest](#mediator-v1-GetProfileByIdRequest) | [GetProfileByIdResponse](#mediator-v1-GetProfileByIdResponse) | | +| GetProfileStatusByName | [GetProfileStatusByNameRequest](#mediator-v1-GetProfileStatusByNameRequest) | [GetProfileStatusByNameResponse](#mediator-v1-GetProfileStatusByNameResponse) | | +| GetProfileStatusByProject | [GetProfileStatusByProjectRequest](#mediator-v1-GetProfileStatusByProjectRequest) | [GetProfileStatusByProjectResponse](#mediator-v1-GetProfileStatusByProjectResponse) | | | ListRuleTypes | [ListRuleTypesRequest](#mediator-v1-ListRuleTypesRequest) | [ListRuleTypesResponse](#mediator-v1-ListRuleTypesResponse) | | | GetRuleTypeByName | [GetRuleTypeByNameRequest](#mediator-v1-GetRuleTypeByNameRequest) | [GetRuleTypeByNameResponse](#mediator-v1-GetRuleTypeByNameResponse) | | | GetRuleTypeById | [GetRuleTypeByIdRequest](#mediator-v1-GetRuleTypeByIdRequest) | [GetRuleTypeByIdResponse](#mediator-v1-GetRuleTypeByIdResponse) | | diff --git a/docs/sidebars.js b/docs/sidebars.js index 5a3409f0db..f00329c90d 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -59,10 +59,10 @@ const sidebars = { }, { type: 'category', - label: 'Policy Engine', + label: 'Profile Engine', items: [ - 'policy_engine/policy_introduction', - 'policy_engine/manage_policies', + 'profile_engine/profile_introduction', + 'profile_engine/manage_profiles', ], }, { diff --git a/examples/github/policies/pr_vuln_check.yaml b/examples/github/profiles/pr_vuln_check.yaml similarity index 82% rename from examples/github/policies/pr_vuln_check.yaml rename to examples/github/profiles/pr_vuln_check.yaml index 45e67e20c9..4bf716cd49 100644 --- a/examples/github/policies/pr_vuln_check.yaml +++ b/examples/github/profiles/pr_vuln_check.yaml @@ -1,13 +1,13 @@ -# sample policy for validating artifact signatures +# sample profile for validating artifact signatures version: v1 -type: policy -name: acme-github-policy-pr-vuln-check +type: profile +name: acme-github-profile-pr-vuln-check context: provider: github pull_request: - type: pr_vulnerability_check def: - action: policy_only + action: profile_only ecosystem_config: - name: npm vulnerability_database_type: osv diff --git a/examples/github/policies/policy.yaml b/examples/github/profiles/profile.yaml similarity index 96% rename from examples/github/policies/policy.yaml rename to examples/github/profiles/profile.yaml index 3dfea3319e..206a80cb09 100644 --- a/examples/github/policies/policy.yaml +++ b/examples/github/profiles/profile.yaml @@ -1,8 +1,8 @@ --- -# sample policy for validating repositories +# sample profile for validating repositories version: v1 -type: policy -name: acme-github-policy +type: profile +name: acme-github-profile context: provider: github repository: diff --git a/examples/github/policies/policy_artifact.yaml b/examples/github/profiles/profile_artifact.yaml similarity index 68% rename from examples/github/policies/policy_artifact.yaml rename to examples/github/profiles/profile_artifact.yaml index 0698d5fd97..6672038a1c 100644 --- a/examples/github/policies/policy_artifact.yaml +++ b/examples/github/profiles/profile_artifact.yaml @@ -1,8 +1,8 @@ --- -# sample policy for validating artifact signatures +# sample profile for validating artifact signatures version: v1 -type: policy -name: acme-github-policy-artifact +type: profile +name: acme-github-profile-artifact context: provider: github artifact: diff --git a/examples/github/rule-types/actions_check_pinned_tags.yaml b/examples/github/rule-types/actions_check_pinned_tags.yaml index f980a4d90f..22c95a8dc6 100644 --- a/examples/github/rule-types/actions_check_pinned_tags.yaml +++ b/examples/github/rule-types/actions_check_pinned_tags.yaml @@ -29,7 +29,7 @@ def: type: git git: branch: main - # Defines the configuration for evaluating data ingested against the given policy + # Defines the configuration for evaluating data ingested against the given profile # This example uses the checks for that github actions are using pinned tags # for the uses directive, in the form of SHA-1 hash # For example, this wil fail: diff --git a/examples/github/rule-types/allowed_selected_actions.yaml b/examples/github/rule-types/allowed_selected_actions.yaml index b4ef86bc67..e4a93ec272 100644 --- a/examples/github/rule-types/allowed_selected_actions.yaml +++ b/examples/github/rule-types/allowed_selected_actions.yaml @@ -6,7 +6,7 @@ context: provider: github description: | Verifies the settings for selected actions and reusable workflows that are allowed - in a repository. To use this rule, the repository policy for allowed_actions must + in a repository. To use this rule, the repository profile for allowed_actions must be configured to selected. guidance: | Having an overview over which actions and reusable workflows are allowed in a repository is important and allows for a better overall security posture. @@ -44,21 +44,21 @@ def: endpoint: "/repos/{{.Entity.Owner}}/{{.Entity.Repository}}/actions/permissions/selected-actions" # This is the method to use to retrieve the data. It should already default to JSON parse: json - # Defines the configuration for evaluating data ingested against the given policy + # Defines the configuration for evaluating data ingested against the given profile eval: type: jq jq: # Ingested points to the data retrieved in the `ingest` section - ingested: def: ".github_owned_allowed" - # policy points to the policy itself. - policy: + # profile points to the profile itself. + profile: def: '.github_owned_allowed' - ingested: def: ".verified_allowed" - policy: + profile: def: '.verified_allowed' - ingested: def: ".patterns_allowed" - policy: + profile: def: ".patterns_allowed" \ No newline at end of file diff --git a/examples/github/rule-types/artifact_signature.yaml b/examples/github/rule-types/artifact_signature.yaml index 7309ae88a6..ec299e96a6 100644 --- a/examples/github/rule-types/artifact_signature.yaml +++ b/examples/github/rule-types/artifact_signature.yaml @@ -53,7 +53,7 @@ def: type: artifact # Currently no configuration artifact: {} - # Defines the configuration for evaluating data ingested against the given policy + # Defines the configuration for evaluating data ingested against the given profile eval: type: rego rego: @@ -68,7 +68,7 @@ def: allow if { every artifactVersion in input.ingested { - every key, value in input.policy { + every key, value in input.profile { artifactVersion.Verification[key] == value } } diff --git a/examples/github/rule-types/branch_protection.yaml b/examples/github/rule-types/branch_protection.yaml index 3c1940a663..4a774e5dad 100644 --- a/examples/github/rule-types/branch_protection.yaml +++ b/examples/github/rule-types/branch_protection.yaml @@ -82,33 +82,33 @@ def: endpoint: '/repos/{{.Entity.Owner}}/{{.Entity.Repository}}/branches/{{ index .Params "branch" }}/protection' # This is the method to use to retrieve the data. It should already default to JSON parse: json - # Defines the configuration for evaluating data ingested against the given policy + # Defines the configuration for evaluating data ingested against the given profile eval: type: jq jq: # Ingested points to the data retrieved in the `ingest` section - ingested: def: ".required_pull_request_reviews.dismiss_stale_reviews" - # policy points to the policy itself. - policy: + # profile points to the profile itself. + profile: def: ".required_pull_request_reviews.dismiss_stale_reviews" - ingested: def: ".required_pull_request_reviews.require_code_owner_reviews" - policy: + profile: def: ".required_pull_request_reviews.require_code_owner_reviews" - ingested: def: ".required_pull_request_reviews.required_approving_review_count" - policy: + profile: def: ".required_pull_request_reviews.required_approving_review_count" - ingested: def: ".required_linear_history.enabled" - policy: + profile: def: ".required_linear_history" - ingested: def: ".allow_force_pushes.enabled" - policy: + profile: def: ".allow_force_pushes" - ingested: def: ".allow_deletions.enabled" - policy: + profile: def: ".allow_deletions" diff --git a/examples/github/rule-types/codeql_enabled.yaml b/examples/github/rule-types/codeql_enabled.yaml index ca79a2e496..7f14dccffc 100644 --- a/examples/github/rule-types/codeql_enabled.yaml +++ b/examples/github/rule-types/codeql_enabled.yaml @@ -28,7 +28,7 @@ def: type: git git: branch: main - # Defines the configuration for evaluating data ingested against the given policy + # Defines the configuration for evaluating data ingested against the given profile eval: type: rego rego: diff --git a/examples/github/rule-types/default_workflow_permissions.yaml b/examples/github/rule-types/default_workflow_permissions.yaml index 9a353704c6..15f3701981 100644 --- a/examples/github/rule-types/default_workflow_permissions.yaml +++ b/examples/github/rule-types/default_workflow_permissions.yaml @@ -36,17 +36,17 @@ def: rest: endpoint: "/repos/{{.Entity.Owner}}/{{.Entity.Repository}}/actions/permissions/workflow" parse: json - # Defines the configuration for evaluating data ingested against the given policy + # Defines the configuration for evaluating data ingested against the given profile eval: type: jq jq: # Ingested points to the data retrieved in the `ingest` section - ingested: def: ".default_workflow_permissions" - # policy points to the policy itself. - policy: + # profile points to the profile itself. + profile: def: ".default_workflow_permissions" - ingested: def: ".can_approve_pull_request_reviews" - policy: + profile: def: ".can_approve_pull_request_reviews" \ No newline at end of file diff --git a/examples/github/rule-types/dependabot_configured.yaml b/examples/github/rule-types/dependabot_configured.yaml index 045afd67be..f4daa6d1eb 100644 --- a/examples/github/rule-types/dependabot_configured.yaml +++ b/examples/github/rule-types/dependabot_configured.yaml @@ -45,7 +45,7 @@ def: type: git git: branch: main - # Defines the configuration for evaluating data ingested against the given policy + # Defines the configuration for evaluating data ingested against the given profile # This example uses the checks for a dependabot configuration in the dependabot.yml file # configured to run weekly for the package ecosystem specified. # Another example, for NPM could be: @@ -70,12 +70,12 @@ def: # Ensure a configuration contains the package ecosystem daily update schedule update := config.updates[_] - update["package-ecosystem"] == input.policy.package_ecosystem - update.schedule.interval == input.policy.schedule_interval + update["package-ecosystem"] == input.profile.package_ecosystem + update.schedule.interval == input.profile.schedule_interval } # We skip if the apply_if_file is specified and the file does not exist skip { - input.policy.apply_if_file != "" - not file.exists(input.policy.apply_if_file) + input.profile.apply_if_file != "" + not file.exists(input.profile.apply_if_file) } \ No newline at end of file diff --git a/examples/github/rule-types/dockerfile_no_latest_tag.yaml b/examples/github/rule-types/dockerfile_no_latest_tag.yaml index 85b11db01c..e1b676d352 100644 --- a/examples/github/rule-types/dockerfile_no_latest_tag.yaml +++ b/examples/github/rule-types/dockerfile_no_latest_tag.yaml @@ -21,7 +21,7 @@ def: type: git git: branch: main - # Defines the configuration for evaluating data ingested against the given policy + # Defines the configuration for evaluating data ingested against the given profile # This example uses the checks for that github actions are using pinned tags # for the uses directive, in the form of SHA-1 hash # For example, this wil fail: diff --git a/examples/github/rule-types/github_actions_allowed.yaml b/examples/github/rule-types/github_actions_allowed.yaml index 8182a0e738..65e9f109b3 100644 --- a/examples/github/rule-types/github_actions_allowed.yaml +++ b/examples/github/rule-types/github_actions_allowed.yaml @@ -13,7 +13,7 @@ description: | It is recommended to use the `selected` option for allowed actions, and then select the actions that are allowed to run. guidance: | - Configure your repository to match the organization's policy for allowed actions. + Configure your repository to match the organization's profile for allowed actions. For more information, see https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#managing-github-actions-permissions-for-your-repository @@ -28,7 +28,7 @@ def: properties: allowed_actions: type: string - description: The permissions policy that controls the actions and reusable workflows that are allowed to run. + description: The permissions profile that controls the actions and reusable workflows that are allowed to run. enum: - "all" - "local_only" @@ -44,14 +44,14 @@ def: endpoint: "/repos/{{.Entity.Owner}}/{{.Entity.Repository}}/actions/permissions" # This is the method to use to retrieve the data. It should already default to JSON parse: json - # Defines the configuration for evaluating data ingested against the given policy + # Defines the configuration for evaluating data ingested against the given profile eval: type: jq jq: # Ingested points to the data retrieved in the `ingest` section - ingested: def: ".allowed_actions" - policy: + profile: def: ".allowed_actions" remediate: type: rest @@ -59,4 +59,4 @@ def: method: PUT # (jakub): PATCH doesn't seem to work endpoint: "/repos/{{.Entity.Owner}}/{{.Entity.Repository}}/actions/permissions" body: | - { "enabled": true, "allowed_actions": "{{.Policy.allowed_actions}}" } + { "enabled": true, "allowed_actions": "{{.Profile.allowed_actions}}" } diff --git a/examples/github/rule-types/pr_vulnerability_check.yaml b/examples/github/rule-types/pr_vulnerability_check.yaml index 7a9f920658..1e2c15f55c 100644 --- a/examples/github/rule-types/pr_vulnerability_check.yaml +++ b/examples/github/rule-types/pr_vulnerability_check.yaml @@ -25,8 +25,8 @@ def: - commit_status # mediator will comment and suggest changes on the PR if a vulnerability is found, but not request changes - comment - # the evaluator engine will merely pass on an error, marking the policy as failed if a vulnerability is found - - policy_only + # the evaluator engine will merely pass on an error, marking the profile as failed if a vulnerability is found + - profile_only default: review ecosystem_config: type: array @@ -58,7 +58,7 @@ def: depfile: package-lock.json - name: go depfile: go.sum - # Defines the configuration for evaluating data ingested against the given policy + # Defines the configuration for evaluating data ingested against the given profile eval: type: vulncheck vulncheck: {} \ No newline at end of file diff --git a/examples/github/rule-types/repo_workflow_access_level.yaml b/examples/github/rule-types/repo_workflow_access_level.yaml index 516c97523b..36386123ec 100644 --- a/examples/github/rule-types/repo_workflow_access_level.yaml +++ b/examples/github/rule-types/repo_workflow_access_level.yaml @@ -36,13 +36,13 @@ def: endpoint: "/repos/{{.Entity.Owner}}/{{.Entity.Repository}}/actions/permissions/access" # This is the method to use to retrieve the data. It should already default to JSON parse: json - # Defines the configuration for evaluating data ingested against the given policy + # Defines the configuration for evaluating data ingested against the given profile eval: type: jq jq: # Ingested points to the data retrieved in the `ingest` section - ingested: def: ".access_level" - # policy points to the policy itself. - policy: + # profile points to the profile itself. + profile: def: '.access_level' diff --git a/examples/github/rule-types/secret_push_protection.yaml b/examples/github/rule-types/secret_push_protection.yaml index 04fd824bf4..216af3c521 100644 --- a/examples/github/rule-types/secret_push_protection.yaml +++ b/examples/github/rule-types/secret_push_protection.yaml @@ -32,13 +32,13 @@ def: endpoint: "/repos/{{.Entity.Owner}}/{{.Entity.Repository}}" # This is the method to use to retrieve the data. It should already default to JSON parse: json - # Defines the configuration for evaluating data ingested against the given policy + # Defines the configuration for evaluating data ingested against the given profile eval: type: jq jq: # Ingested points to the data retrieved in the `ingest` section - ingested: def: '.security_and_analysis.secret_scanning_push_protection.status == "enabled"' - # policy points to the policy itself. - policy: + # profile points to the profile itself. + profile: def: ".enabled" diff --git a/examples/github/rule-types/secret_scanning.yaml b/examples/github/rule-types/secret_scanning.yaml index 942d2efc3b..bfc07e58a3 100644 --- a/examples/github/rule-types/secret_scanning.yaml +++ b/examples/github/rule-types/secret_scanning.yaml @@ -34,13 +34,13 @@ def: endpoint: "/repos/{{.Entity.Owner}}/{{.Entity.Repository}}" # This is the method to use to retrieve the data. It should already default to JSON parse: json - # Defines the configuration for evaluating data ingested against the given policy + # Defines the configuration for evaluating data ingested against the given profile eval: type: jq jq: # Ingested points to the data retrieved in the `ingest` section - ingested: def: '.security_and_analysis.secret_scanning.status == "enabled"' - # policy points to the policy itself. - policy: + # profile points to the profile itself. + profile: def: ".enabled" diff --git a/examples/github/rule-types/trivy_action_enabled.yaml b/examples/github/rule-types/trivy_action_enabled.yaml index 820eee87f7..3c4a43a129 100644 --- a/examples/github/rule-types/trivy_action_enabled.yaml +++ b/examples/github/rule-types/trivy_action_enabled.yaml @@ -38,7 +38,7 @@ def: type: git git: branch: main - # Defines the configuration for evaluating data ingested against the given policy + # Defines the configuration for evaluating data ingested against the given profile eval: type: rego rego: diff --git a/internal/controlplane/handlers_policy.go b/internal/controlplane/handlers_profile.go similarity index 79% rename from internal/controlplane/handlers_policy.go rename to internal/controlplane/handlers_profile.go index 3faf106d85..27494072f1 100644 --- a/internal/controlplane/handlers_policy.go +++ b/internal/controlplane/handlers_profile.go @@ -94,7 +94,7 @@ func verifyValidProject(ctx context.Context, in *engine.EntityContext) error { // validateRemediateType returns the appropriate remediate type or the // NULL DB type if the input is invalid, thus letting the server run -// the policy with the default remediate type. +// the profile with the default remediate type. func validateRemediateType(r string) db.NullRemediateType { switch r { case "on": @@ -108,11 +108,11 @@ func validateRemediateType(r string) db.NullRemediateType { return db.NullRemediateType{Valid: false} } -// CreatePolicy creates a policy for a group +// CreateProfile creates a profile for a group // nolint: gocyclo -func (s *Server) CreatePolicy(ctx context.Context, - cpr *mediatorv1.CreatePolicyRequest) (*mediatorv1.CreatePolicyResponse, error) { - in := cpr.GetPolicy() +func (s *Server) CreateProfile(ctx context.Context, + cpr *mediatorv1.CreateProfileRequest) (*mediatorv1.CreateProfileResponse, error) { + in := cpr.GetProfile() ctx, err := s.authAndContextValidation(ctx, in.GetContext()) if err != nil { @@ -130,10 +130,10 @@ func (s *Server) CreatePolicy(ctx context.Context, } if err := in.Validate(); err != nil { - return nil, status.Errorf(codes.InvalidArgument, "invalid policy: %v", err) + return nil, status.Errorf(codes.InvalidArgument, "invalid profile: %v", err) } - err = engine.TraverseAllRulesForPipeline(in, func(r *mediatorv1.Policy_Rule) error { + err = engine.TraverseAllRulesForPipeline(in, func(r *mediatorv1.Profile_Rule) error { // TODO: This will need to be updated to support // the hierarchy tree once that's settled in. rtdb, err := s.store.GetRuleTypeByName(ctx, db.GetRuleTypeByNameParams{ @@ -178,61 +178,61 @@ func (s *Server) CreatePolicy(ctx context.Context, if errors.As(err, &violation) { log.Printf("error validating rule: %v", violation) return nil, util.UserVisibleError(codes.InvalidArgument, - "policy contained invalid rule '%s': %s", violation.RuleType, violation.Err) + "profile contained invalid rule '%s': %s", violation.RuleType, violation.Err) } log.Printf("error getting rule type: %v", err) - return nil, status.Errorf(codes.Internal, "error creating policy") + return nil, status.Errorf(codes.Internal, "error creating profile") } // Now that we know it's valid, let's persist it! tx, err := s.store.BeginTransaction() if err != nil { log.Printf("error starting transaction: %v", err) - return nil, status.Errorf(codes.Internal, "error creating policy") + return nil, status.Errorf(codes.Internal, "error creating profile") } defer s.store.Rollback(tx) qtx := s.store.GetQuerierWithTransaction(tx) - params := db.CreatePolicyParams{ + params := db.CreateProfileParams{ Provider: provider.Name, ProjectID: entityCtx.GetProject().GetID(), Name: in.GetName(), Remediate: validateRemediateType(in.GetRemediate()), } - // Create policy - policy, err := qtx.CreatePolicy(ctx, params) + // Create profile + profile, err := qtx.CreateProfile(ctx, params) if err != nil { - log.Printf("error creating policy: %v", err) - return nil, status.Errorf(codes.Internal, "error creating policy") + log.Printf("error creating profile: %v", err) + return nil, status.Errorf(codes.Internal, "error creating profile") } // Create entity rules entries - for ent, entRules := range map[mediatorv1.Entity][]*mediatorv1.Policy_Rule{ + for ent, entRules := range map[mediatorv1.Entity][]*mediatorv1.Profile_Rule{ mediatorv1.Entity_ENTITY_REPOSITORIES: in.GetRepository(), mediatorv1.Entity_ENTITY_ARTIFACTS: in.GetArtifact(), mediatorv1.Entity_ENTITY_BUILD_ENVIRONMENTS: in.GetBuildEnvironment(), mediatorv1.Entity_ENTITY_PULL_REQUESTS: in.GetPullRequest(), } { - if err := createPolicyRulesForEntity(ctx, ent, &policy, qtx, entRules); err != nil { + if err := createProfileRulesForEntity(ctx, ent, &profile, qtx, entRules); err != nil { return nil, err } } if err := tx.Commit(); err != nil { log.Printf("error committing transaction: %v", err) - return nil, status.Errorf(codes.Internal, "error creating policy") + return nil, status.Errorf(codes.Internal, "error creating profile") } - idStr := policy.ID.String() + idStr := profile.ID.String() in.Id = &idStr - resp := &mediatorv1.CreatePolicyResponse{ - Policy: in, + resp := &mediatorv1.CreateProfileResponse{ + Profile: in, } - msg, err := reconcilers.NewPolicyInitMessage(entityCtx.Provider.Name, entityCtx.Project.ID) + msg, err := reconcilers.NewProfileInitMessage(entityCtx.Provider.Name, entityCtx.Project.ID) if err != nil { log.Printf("error creating reconciler event: %v", err) // error is non-fatal @@ -240,19 +240,19 @@ func (s *Server) CreatePolicy(ctx context.Context, } // This is a non-fatal error, so we'll just log it and continue with the next ones - if err := s.evt.Publish(reconcilers.InternalPolicyInitEventTopic, msg); err != nil { + if err := s.evt.Publish(reconcilers.InternalProfileInitEventTopic, msg); err != nil { log.Printf("error publishing reconciler event: %v", err) } return resp, nil } -func createPolicyRulesForEntity( +func createProfileRulesForEntity( ctx context.Context, entity mediatorv1.Entity, - policy *db.Policy, + profile *db.Profile, qtx db.Querier, - rules []*mediatorv1.Policy_Rule, + rules []*mediatorv1.Profile_Rule, ) error { if rules == nil { return nil @@ -261,10 +261,10 @@ func createPolicyRulesForEntity( marshalled, err := json.Marshal(rules) if err != nil { log.Printf("error marshalling %s rules: %v", entity, err) - return status.Errorf(codes.Internal, "error creating policy") + return status.Errorf(codes.Internal, "error creating profile") } - _, err = qtx.CreatePolicyForEntity(ctx, db.CreatePolicyForEntityParams{ - PolicyID: policy.ID, + _, err = qtx.CreateProfileForEntity(ctx, db.CreateProfileForEntityParams{ + ProfileID: profile.ID, Entity: entities.EntityTypeToDB(entity), ContextualRules: marshalled, }) @@ -272,38 +272,38 @@ func createPolicyRulesForEntity( return err } -// DeletePolicy is a method to delete a policy -func (s *Server) DeletePolicy(ctx context.Context, - in *mediatorv1.DeletePolicyRequest) (*mediatorv1.DeletePolicyResponse, error) { +// DeleteProfile is a method to delete a profile +func (s *Server) DeleteProfile(ctx context.Context, + in *mediatorv1.DeleteProfileRequest) (*mediatorv1.DeleteProfileResponse, error) { _, err := s.authAndContextValidation(ctx, in.GetContext()) if err != nil { return nil, status.Errorf(codes.InvalidArgument, "error ensuring default group: %v", err) } - parsedPolicyID, err := uuid.Parse(in.Id) + parsedProfileID, err := uuid.Parse(in.Id) if err != nil { - return nil, util.UserVisibleError(codes.InvalidArgument, "invalid policy ID") + return nil, util.UserVisibleError(codes.InvalidArgument, "invalid profile ID") } - _, err = s.store.GetPolicyByID(ctx, parsedPolicyID) + _, err = s.store.GetProfileByID(ctx, parsedProfileID) if err != nil { if errors.Is(err, sql.ErrNoRows) { - return nil, status.Error(codes.NotFound, "policy not found") + return nil, status.Error(codes.NotFound, "profile not found") } - return nil, status.Errorf(codes.Internal, "failed to get policy: %s", err) + return nil, status.Errorf(codes.Internal, "failed to get profile: %s", err) } - err = s.store.DeletePolicy(ctx, parsedPolicyID) + err = s.store.DeleteProfile(ctx, parsedProfileID) if err != nil { - return nil, status.Errorf(codes.Internal, "failed to delete policy: %s", err) + return nil, status.Errorf(codes.Internal, "failed to delete profile: %s", err) } - return &mediatorv1.DeletePolicyResponse{}, nil + return &mediatorv1.DeleteProfileResponse{}, nil } -// ListPolicies is a method to get all policies for a group -func (s *Server) ListPolicies(ctx context.Context, - in *mediatorv1.ListPoliciesRequest) (*mediatorv1.ListPoliciesResponse, error) { +// ListProfiles is a method to get all profiles for a group +func (s *Server) ListProfiles(ctx context.Context, + in *mediatorv1.ListProfilesRequest) (*mediatorv1.ListProfilesResponse, error) { ctx, err := s.authAndContextValidation(ctx, in.GetContext()) if err != nil { return nil, status.Errorf(codes.InvalidArgument, "error ensuring default group: %v", err) @@ -311,23 +311,23 @@ func (s *Server) ListPolicies(ctx context.Context, entityCtx := engine.EntityFromContext(ctx) - policies, err := s.store.ListPoliciesByProjectID(ctx, entityCtx.Project.ID) + profiles, err := s.store.ListProfilesByProjectID(ctx, entityCtx.Project.ID) if err != nil { - return nil, status.Errorf(codes.Unknown, "failed to get policies: %s", err) + return nil, status.Errorf(codes.Unknown, "failed to get profiles: %s", err) } - var resp mediatorv1.ListPoliciesResponse - resp.Policies = make([]*mediatorv1.Policy, 0, len(policies)) - for _, policy := range engine.MergeDatabaseListIntoPolicies(policies, entityCtx) { - resp.Policies = append(resp.Policies, policy) + var resp mediatorv1.ListProfilesResponse + resp.Profiles = make([]*mediatorv1.Profile, 0, len(profiles)) + for _, profile := range engine.MergeDatabaseListIntoProfiles(profiles, entityCtx) { + resp.Profiles = append(resp.Profiles, profile) } return &resp, nil } -// GetPolicyById is a method to get a policy by id -func (s *Server) GetPolicyById(ctx context.Context, - in *mediatorv1.GetPolicyByIdRequest) (*mediatorv1.GetPolicyByIdResponse, error) { +// GetProfileById is a method to get a profile by id +func (s *Server) GetProfileById(ctx context.Context, + in *mediatorv1.GetProfileByIdRequest) (*mediatorv1.GetProfileByIdResponse, error) { ctx, err := s.authAndContextValidation(ctx, in.GetContext()) if err != nil { return nil, status.Errorf(codes.InvalidArgument, "error ensuring default group: %v", err) @@ -335,30 +335,30 @@ func (s *Server) GetPolicyById(ctx context.Context, entityCtx := engine.EntityFromContext(ctx) - parsedPolicyID, err := uuid.Parse(in.Id) + parsedProfileID, err := uuid.Parse(in.Id) if err != nil { - return nil, util.UserVisibleError(codes.InvalidArgument, "invalid policy ID") + return nil, util.UserVisibleError(codes.InvalidArgument, "invalid profile ID") } - policies, err := s.store.GetPolicyByProjectAndID(ctx, db.GetPolicyByProjectAndIDParams{ + profiles, err := s.store.GetProfileByProjectAndID(ctx, db.GetProfileByProjectAndIDParams{ ProjectID: entityCtx.Project.ID, - ID: parsedPolicyID, + ID: parsedProfileID, }) if err != nil { - return nil, status.Errorf(codes.Unknown, "failed to get policy: %s", err) + return nil, status.Errorf(codes.Unknown, "failed to get profile: %s", err) } - var resp mediatorv1.GetPolicyByIdResponse - pols := engine.MergeDatabaseGetIntoPolicies(policies, entityCtx) + var resp mediatorv1.GetProfileByIdResponse + pols := engine.MergeDatabaseGetIntoProfiles(profiles, entityCtx) if len(pols) == 0 { - return nil, status.Errorf(codes.NotFound, "policy not found") + return nil, status.Errorf(codes.NotFound, "profile not found") } else if len(pols) > 1 { - return nil, status.Errorf(codes.Unknown, "failed to get policy: %s", err) + return nil, status.Errorf(codes.Unknown, "failed to get profile: %s", err) } - // This should be only one policy - for _, policy := range pols { - resp.Policy = policy + // This should be only one profile + for _, profile := range pols { + resp.Profile = profile } return &resp, nil @@ -369,7 +369,7 @@ func getRuleEvalEntityInfo( store db.Store, entityType *db.NullEntities, selector *uuid.NullUUID, - rs db.ListRuleEvaluationStatusByPolicyIdRow, + rs db.ListRuleEvaluationStatusByProfileIdRow, providerName string, ) map[string]string { entityInfo := map[string]string{ @@ -401,10 +401,10 @@ func getRuleEvalEntityInfo( return entityInfo } -// GetPolicyStatusByName is a method to get policy status +// GetProfileStatusByName is a method to get profile status // nolint:gocyclo // TODO: Refactor this to be more readable -func (s *Server) GetPolicyStatusByName(ctx context.Context, - in *mediatorv1.GetPolicyStatusByNameRequest) (*mediatorv1.GetPolicyStatusByNameResponse, error) { +func (s *Server) GetProfileStatusByName(ctx context.Context, + in *mediatorv1.GetProfileStatusByNameRequest) (*mediatorv1.GetProfileStatusByNameResponse, error) { ctx, err := s.authAndContextValidation(ctx, in.GetContext()) if err != nil { return nil, status.Errorf(codes.InvalidArgument, "error ensuring default group: %v", err) @@ -412,15 +412,15 @@ func (s *Server) GetPolicyStatusByName(ctx context.Context, entityCtx := engine.EntityFromContext(ctx) - dbstat, err := s.store.GetPolicyStatusByNameAndProject(ctx, db.GetPolicyStatusByNameAndProjectParams{ + dbstat, err := s.store.GetProfileStatusByNameAndProject(ctx, db.GetProfileStatusByNameAndProjectParams{ ProjectID: entityCtx.Project.ID, Name: in.Name, }) if err != nil { if errors.Is(err, sql.ErrNoRows) { - return nil, status.Errorf(codes.NotFound, "policy status not found") + return nil, status.Errorf(codes.NotFound, "profile status not found") } - return nil, status.Errorf(codes.Unknown, "failed to get policy: %s", err) + return nil, status.Errorf(codes.Unknown, "failed to get profile: %s", err) } var rulestats []*mediatorv1.RuleEvaluationStatus @@ -452,8 +452,8 @@ func (s *Server) GetPolicyStatusByName(ctx context.Context, // TODO: Handle retrieving status for other types of entities if selector != nil { - dbrulestat, err := s.store.ListRuleEvaluationStatusByPolicyId(ctx, db.ListRuleEvaluationStatusByPolicyIdParams{ - PolicyID: dbstat.ID, + dbrulestat, err := s.store.ListRuleEvaluationStatusByProfileId(ctx, db.ListRuleEvaluationStatusByProfileIdParams{ + ProfileID: dbstat.ID, EntityID: *selector, EntityType: *dbEntity, RuleName: *rule, @@ -477,7 +477,7 @@ func (s *Server) GetPolicyStatusByName(ctx context.Context, } st := &mediatorv1.RuleEvaluationStatus{ - PolicyId: dbstat.ID.String(), + ProfileId: dbstat.ID.String(), RuleId: rs.RuleTypeID.String(), RuleName: rs.RuleTypeName, Entity: string(rs.Entity), @@ -500,20 +500,20 @@ func (s *Server) GetPolicyStatusByName(ctx context.Context, // TODO: Add other entities once we have database entries for them } - return &mediatorv1.GetPolicyStatusByNameResponse{ - PolicyStatus: &mediatorv1.PolicyStatus{ - PolicyId: dbstat.ID.String(), - PolicyName: dbstat.Name, - PolicyStatus: string(dbstat.PolicyStatus), - LastUpdated: timestamppb.New(dbstat.LastUpdated), + return &mediatorv1.GetProfileStatusByNameResponse{ + ProfileStatus: &mediatorv1.ProfileStatus{ + ProfileId: dbstat.ID.String(), + ProfileName: dbstat.Name, + ProfileStatus: string(dbstat.ProfileStatus), + LastUpdated: timestamppb.New(dbstat.LastUpdated), }, RuleEvaluationStatus: rulestats, }, nil } -// GetPolicyStatusByProject is a method to get policy status for a group -func (s *Server) GetPolicyStatusByProject(ctx context.Context, - in *mediatorv1.GetPolicyStatusByProjectRequest) (*mediatorv1.GetPolicyStatusByProjectResponse, error) { +// GetProfileStatusByProject is a method to get profile status for a group +func (s *Server) GetProfileStatusByProject(ctx context.Context, + in *mediatorv1.GetProfileStatusByProjectRequest) (*mediatorv1.GetProfileStatusByProjectResponse, error) { ctx, err := s.authAndContextValidation(ctx, in.GetContext()) if err != nil { return nil, status.Errorf(codes.InvalidArgument, "error ensuring default group: %v", err) @@ -521,24 +521,24 @@ func (s *Server) GetPolicyStatusByProject(ctx context.Context, entityCtx := engine.EntityFromContext(ctx) - // read policy status - dbstats, err := s.store.GetPolicyStatusByProject(ctx, entityCtx.Project.ID) + // read profile status + dbstats, err := s.store.GetProfileStatusByProject(ctx, entityCtx.Project.ID) if err != nil { if errors.Is(err, sql.ErrNoRows) { - return nil, status.Errorf(codes.NotFound, "policy statuses not found for group") + return nil, status.Errorf(codes.NotFound, "profile statuses not found for group") } - return nil, status.Errorf(codes.Unknown, "failed to get policy status: %s", err) + return nil, status.Errorf(codes.Unknown, "failed to get profile status: %s", err) } - res := &mediatorv1.GetPolicyStatusByProjectResponse{ - PolicyStatus: make([]*mediatorv1.PolicyStatus, 0, len(dbstats)), + res := &mediatorv1.GetProfileStatusByProjectResponse{ + ProfileStatus: make([]*mediatorv1.ProfileStatus, 0, len(dbstats)), } for _, dbstat := range dbstats { - res.PolicyStatus = append(res.PolicyStatus, &mediatorv1.PolicyStatus{ - PolicyId: dbstat.ID.String(), - PolicyName: dbstat.Name, - PolicyStatus: string(dbstat.PolicyStatus), + res.ProfileStatus = append(res.ProfileStatus, &mediatorv1.ProfileStatus{ + ProfileId: dbstat.ID.String(), + ProfileName: dbstat.Name, + ProfileStatus: string(dbstat.ProfileStatus), }) } diff --git a/internal/controlplane/register_handlers.go b/internal/controlplane/register_handlers.go index ebc92b99d9..1064c24bd9 100644 --- a/internal/controlplane/register_handlers.go +++ b/internal/controlplane/register_handlers.go @@ -67,8 +67,8 @@ func RegisterGatewayHTTPHandlers(ctx context.Context, gwmux *runtime.ServeMux, g log.Fatalf("failed to register gateway: %v", err) } - // Register the Policy service - if err := pb.RegisterPolicyServiceHandlerFromEndpoint(ctx, gwmux, grpcAddress, opts); err != nil { + // Register the Profile service + if err := pb.RegisterProfileServiceHandlerFromEndpoint(ctx, gwmux, grpcAddress, opts); err != nil { log.Fatalf("failed to register gateway: %v", err) } @@ -108,8 +108,8 @@ func RegisterGRPCServices(s *Server) { // Register the Repository service pb.RegisterRepositoryServiceServer(s.grpcServer, s) - // Register the Policy service - pb.RegisterPolicyServiceServer(s.grpcServer, s) + // Register the Profile service + pb.RegisterProfileServiceServer(s.grpcServer, s) // Register the Key service pb.RegisterKeyServiceServer(s.grpcServer, s) diff --git a/internal/controlplane/server.go b/internal/controlplane/server.go index e842325aba..49cf59eaa2 100644 --- a/internal/controlplane/server.go +++ b/internal/controlplane/server.go @@ -71,7 +71,7 @@ type Server struct { pb.UnimplementedRoleServiceServer pb.UnimplementedUserServiceServer pb.UnimplementedRepositoryServiceServer - pb.UnimplementedPolicyServiceServer + pb.UnimplementedProfileServiceServer pb.UnimplementedArtifactServiceServer pb.UnimplementedKeyServiceServer OAuth2 *oauth2.Config diff --git a/internal/db/models.go b/internal/db/models.go index 665d453997..e771683ab1 100644 --- a/internal/db/models.go +++ b/internal/db/models.go @@ -257,16 +257,16 @@ type ArtifactVersion struct { CreatedAt time.Time `json:"created_at"` } -type EntityPolicy struct { +type EntityProfile struct { ID uuid.UUID `json:"id"` Entity Entities `json:"entity"` - PolicyID uuid.UUID `json:"policy_id"` + ProfileID uuid.UUID `json:"profile_id"` ContextualRules json.RawMessage `json:"contextual_rules"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` } -type Policy struct { +type Profile struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Provider string `json:"provider"` @@ -276,11 +276,11 @@ type Policy struct { UpdatedAt time.Time `json:"updated_at"` } -type PolicyStatus struct { - ID uuid.UUID `json:"id"` - PolicyID uuid.UUID `json:"policy_id"` - PolicyStatus EvalStatusTypes `json:"policy_status"` - LastUpdated time.Time `json:"last_updated"` +type ProfileStatus struct { + ID uuid.UUID `json:"id"` + ProfileID uuid.UUID `json:"profile_id"` + ProfileStatus EvalStatusTypes `json:"profile_status"` + LastUpdated time.Time `json:"last_updated"` } type Project struct { @@ -346,7 +346,7 @@ type Role struct { type RuleEvaluationStatus struct { ID uuid.UUID `json:"id"` Entity Entities `json:"entity"` - PolicyID uuid.UUID `json:"policy_id"` + ProfileID uuid.UUID `json:"profile_id"` RuleTypeID uuid.UUID `json:"rule_type_id"` EvalStatus EvalStatusTypes `json:"eval_status"` RemediationStatus RemediationStatusTypes `json:"remediation_status"` diff --git a/internal/db/policy_status.sql.go b/internal/db/profile_status.sql.go similarity index 68% rename from internal/db/policy_status.sql.go rename to internal/db/profile_status.sql.go index df8995b005..261ceaa58e 100644 --- a/internal/db/policy_status.sql.go +++ b/internal/db/profile_status.sql.go @@ -1,7 +1,7 @@ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.19.1 -// source: policy_status.sql +// source: profile_status.sql package db @@ -15,7 +15,7 @@ import ( const createRuleEvaluationStatusForRepository = `-- name: CreateRuleEvaluationStatusForRepository :exec INSERT INTO rule_evaluation_status ( - policy_id, + profile_id, repository_id, rule_type_id, entity, @@ -26,7 +26,7 @@ INSERT INTO rule_evaluation_status ( ` type CreateRuleEvaluationStatusForRepositoryParams struct { - PolicyID uuid.UUID `json:"policy_id"` + ProfileID uuid.UUID `json:"profile_id"` RepositoryID uuid.NullUUID `json:"repository_id"` RuleTypeID uuid.UUID `json:"rule_type_id"` EvalStatus EvalStatusTypes `json:"eval_status"` @@ -35,7 +35,7 @@ type CreateRuleEvaluationStatusForRepositoryParams struct { func (q *Queries) CreateRuleEvaluationStatusForRepository(ctx context.Context, arg CreateRuleEvaluationStatusForRepositoryParams) error { _, err := q.db.ExecContext(ctx, createRuleEvaluationStatusForRepository, - arg.PolicyID, + arg.ProfileID, arg.RepositoryID, arg.RuleTypeID, arg.EvalStatus, @@ -44,92 +44,92 @@ func (q *Queries) CreateRuleEvaluationStatusForRepository(ctx context.Context, a return err } -const getPolicyStatusByIdAndProject = `-- name: GetPolicyStatusByIdAndProject :one -SELECT p.id, p.name, ps.policy_status, ps.last_updated FROM policy_status ps -INNER JOIN policies p ON p.id = ps.policy_id +const getProfileStatusByIdAndProject = `-- name: GetProfileStatusByIdAndProject :one +SELECT p.id, p.name, ps.profile_status, ps.last_updated FROM profile_status ps +INNER JOIN profiles p ON p.id = ps.profile_id WHERE p.id = $1 AND p.project_id = $2 ` -type GetPolicyStatusByIdAndProjectParams struct { +type GetProfileStatusByIdAndProjectParams struct { ID uuid.UUID `json:"id"` ProjectID uuid.UUID `json:"project_id"` } -type GetPolicyStatusByIdAndProjectRow struct { - ID uuid.UUID `json:"id"` - Name string `json:"name"` - PolicyStatus EvalStatusTypes `json:"policy_status"` - LastUpdated time.Time `json:"last_updated"` +type GetProfileStatusByIdAndProjectRow struct { + ID uuid.UUID `json:"id"` + Name string `json:"name"` + ProfileStatus EvalStatusTypes `json:"profile_status"` + LastUpdated time.Time `json:"last_updated"` } -func (q *Queries) GetPolicyStatusByIdAndProject(ctx context.Context, arg GetPolicyStatusByIdAndProjectParams) (GetPolicyStatusByIdAndProjectRow, error) { - row := q.db.QueryRowContext(ctx, getPolicyStatusByIdAndProject, arg.ID, arg.ProjectID) - var i GetPolicyStatusByIdAndProjectRow +func (q *Queries) GetProfileStatusByIdAndProject(ctx context.Context, arg GetProfileStatusByIdAndProjectParams) (GetProfileStatusByIdAndProjectRow, error) { + row := q.db.QueryRowContext(ctx, getProfileStatusByIdAndProject, arg.ID, arg.ProjectID) + var i GetProfileStatusByIdAndProjectRow err := row.Scan( &i.ID, &i.Name, - &i.PolicyStatus, + &i.ProfileStatus, &i.LastUpdated, ) return i, err } -const getPolicyStatusByNameAndProject = `-- name: GetPolicyStatusByNameAndProject :one -SELECT p.id, p.name, ps.policy_status, ps.last_updated FROM policy_status ps -INNER JOIN policies p ON p.id = ps.policy_id +const getProfileStatusByNameAndProject = `-- name: GetProfileStatusByNameAndProject :one +SELECT p.id, p.name, ps.profile_status, ps.last_updated FROM profile_status ps +INNER JOIN profiles p ON p.id = ps.profile_id WHERE p.name = $1 AND p.project_id = $2 ` -type GetPolicyStatusByNameAndProjectParams struct { +type GetProfileStatusByNameAndProjectParams struct { Name string `json:"name"` ProjectID uuid.UUID `json:"project_id"` } -type GetPolicyStatusByNameAndProjectRow struct { - ID uuid.UUID `json:"id"` - Name string `json:"name"` - PolicyStatus EvalStatusTypes `json:"policy_status"` - LastUpdated time.Time `json:"last_updated"` +type GetProfileStatusByNameAndProjectRow struct { + ID uuid.UUID `json:"id"` + Name string `json:"name"` + ProfileStatus EvalStatusTypes `json:"profile_status"` + LastUpdated time.Time `json:"last_updated"` } -func (q *Queries) GetPolicyStatusByNameAndProject(ctx context.Context, arg GetPolicyStatusByNameAndProjectParams) (GetPolicyStatusByNameAndProjectRow, error) { - row := q.db.QueryRowContext(ctx, getPolicyStatusByNameAndProject, arg.Name, arg.ProjectID) - var i GetPolicyStatusByNameAndProjectRow +func (q *Queries) GetProfileStatusByNameAndProject(ctx context.Context, arg GetProfileStatusByNameAndProjectParams) (GetProfileStatusByNameAndProjectRow, error) { + row := q.db.QueryRowContext(ctx, getProfileStatusByNameAndProject, arg.Name, arg.ProjectID) + var i GetProfileStatusByNameAndProjectRow err := row.Scan( &i.ID, &i.Name, - &i.PolicyStatus, + &i.ProfileStatus, &i.LastUpdated, ) return i, err } -const getPolicyStatusByProject = `-- name: GetPolicyStatusByProject :many -SELECT p.id, p.name, ps.policy_status, ps.last_updated FROM policy_status ps -INNER JOIN policies p ON p.id = ps.policy_id +const getProfileStatusByProject = `-- name: GetProfileStatusByProject :many +SELECT p.id, p.name, ps.profile_status, ps.last_updated FROM profile_status ps +INNER JOIN profiles p ON p.id = ps.profile_id WHERE p.project_id = $1 ` -type GetPolicyStatusByProjectRow struct { - ID uuid.UUID `json:"id"` - Name string `json:"name"` - PolicyStatus EvalStatusTypes `json:"policy_status"` - LastUpdated time.Time `json:"last_updated"` +type GetProfileStatusByProjectRow struct { + ID uuid.UUID `json:"id"` + Name string `json:"name"` + ProfileStatus EvalStatusTypes `json:"profile_status"` + LastUpdated time.Time `json:"last_updated"` } -func (q *Queries) GetPolicyStatusByProject(ctx context.Context, projectID uuid.UUID) ([]GetPolicyStatusByProjectRow, error) { - rows, err := q.db.QueryContext(ctx, getPolicyStatusByProject, projectID) +func (q *Queries) GetProfileStatusByProject(ctx context.Context, projectID uuid.UUID) ([]GetProfileStatusByProjectRow, error) { + rows, err := q.db.QueryContext(ctx, getProfileStatusByProject, projectID) if err != nil { return nil, err } defer rows.Close() - items := []GetPolicyStatusByProjectRow{} + items := []GetProfileStatusByProjectRow{} for rows.Next() { - var i GetPolicyStatusByProjectRow + var i GetProfileStatusByProjectRow if err := rows.Scan( &i.ID, &i.Name, - &i.PolicyStatus, + &i.ProfileStatus, &i.LastUpdated, ); err != nil { return nil, err @@ -145,12 +145,12 @@ func (q *Queries) GetPolicyStatusByProject(ctx context.Context, projectID uuid.U return items, nil } -const listRuleEvaluationStatusByPolicyId = `-- name: ListRuleEvaluationStatusByPolicyId :many +const listRuleEvaluationStatusByProfileId = `-- name: ListRuleEvaluationStatusByProfileId :many SELECT res.eval_status as eval_status, res.eval_last_updated as eval_last_updated, res.eval_details as eval_details, res.remediation_status as rem_status, res.remediation_details as rem_details, res.remediation_last_updated as rem_last_updated, res.repository_id as repository_id, res.entity as entity, repo.repo_name as repo_name, repo.repo_owner as repo_owner, repo.provider as provider, rt.name as rule_type_name, rt.id as rule_type_id FROM rule_evaluation_status res INNER JOIN repositories repo ON repo.id = res.repository_id INNER JOIN rule_type rt ON rt.id = res.rule_type_id -WHERE res.policy_id = $1 AND +WHERE res.profile_id = $1 AND ( CASE WHEN $2::entities = 'repository' AND res.repository_id = $3::UUID THEN true @@ -161,14 +161,14 @@ WHERE res.policy_id = $1 AND ) AND (rt.name = $4 OR $4 IS NULL) ` -type ListRuleEvaluationStatusByPolicyIdParams struct { - PolicyID uuid.UUID `json:"policy_id"` +type ListRuleEvaluationStatusByProfileIdParams struct { + ProfileID uuid.UUID `json:"profile_id"` EntityType NullEntities `json:"entity_type"` EntityID uuid.NullUUID `json:"entity_id"` RuleName sql.NullString `json:"rule_name"` } -type ListRuleEvaluationStatusByPolicyIdRow struct { +type ListRuleEvaluationStatusByProfileIdRow struct { EvalStatus EvalStatusTypes `json:"eval_status"` EvalLastUpdated time.Time `json:"eval_last_updated"` EvalDetails string `json:"eval_details"` @@ -184,9 +184,9 @@ type ListRuleEvaluationStatusByPolicyIdRow struct { RuleTypeID uuid.UUID `json:"rule_type_id"` } -func (q *Queries) ListRuleEvaluationStatusByPolicyId(ctx context.Context, arg ListRuleEvaluationStatusByPolicyIdParams) ([]ListRuleEvaluationStatusByPolicyIdRow, error) { - rows, err := q.db.QueryContext(ctx, listRuleEvaluationStatusByPolicyId, - arg.PolicyID, +func (q *Queries) ListRuleEvaluationStatusByProfileId(ctx context.Context, arg ListRuleEvaluationStatusByProfileIdParams) ([]ListRuleEvaluationStatusByProfileIdRow, error) { + rows, err := q.db.QueryContext(ctx, listRuleEvaluationStatusByProfileId, + arg.ProfileID, arg.EntityType, arg.EntityID, arg.RuleName, @@ -195,9 +195,9 @@ func (q *Queries) ListRuleEvaluationStatusByPolicyId(ctx context.Context, arg Li return nil, err } defer rows.Close() - items := []ListRuleEvaluationStatusByPolicyIdRow{} + items := []ListRuleEvaluationStatusByProfileIdRow{} for rows.Next() { - var i ListRuleEvaluationStatusByPolicyIdRow + var i ListRuleEvaluationStatusByProfileIdRow if err := rows.Scan( &i.EvalStatus, &i.EvalLastUpdated, @@ -253,7 +253,7 @@ func (q *Queries) UpdateRuleEvaluationStatusForRepository(ctx context.Context, a const upsertRuleEvaluationStatus = `-- name: UpsertRuleEvaluationStatus :exec INSERT INTO rule_evaluation_status ( - policy_id, + profile_id, repository_id, artifact_id, rule_type_id, @@ -265,14 +265,14 @@ INSERT INTO rule_evaluation_status ( remediation_last_updated, eval_last_updated ) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, NOW()) -ON CONFLICT(policy_id, repository_id, COALESCE(artifact_id, '00000000-0000-0000-0000-000000000000'::UUID), entity, rule_type_id) DO UPDATE SET +ON CONFLICT(profile_id, repository_id, COALESCE(artifact_id, '00000000-0000-0000-0000-000000000000'::UUID), entity, rule_type_id) DO UPDATE SET eval_status = $6, eval_details = $7, remediation_status = $8, remediation_details = $9, remediation_last_updated = COALESCE($10, rule_evaluation_status.remediation_last_updated), -- don't overwrite timestamp already set with NULL eval_last_updated = NOW() -WHERE rule_evaluation_status.policy_id = $1 +WHERE rule_evaluation_status.profile_id = $1 AND rule_evaluation_status.repository_id = $2 AND rule_evaluation_status.artifact_id IS NOT DISTINCT FROM $3 AND rule_evaluation_status.rule_type_id = $4 @@ -280,7 +280,7 @@ WHERE rule_evaluation_status.policy_id = $1 ` type UpsertRuleEvaluationStatusParams struct { - PolicyID uuid.UUID `json:"policy_id"` + ProfileID uuid.UUID `json:"profile_id"` RepositoryID uuid.NullUUID `json:"repository_id"` ArtifactID uuid.NullUUID `json:"artifact_id"` RuleTypeID uuid.UUID `json:"rule_type_id"` @@ -294,7 +294,7 @@ type UpsertRuleEvaluationStatusParams struct { func (q *Queries) UpsertRuleEvaluationStatus(ctx context.Context, arg UpsertRuleEvaluationStatusParams) error { _, err := q.db.ExecContext(ctx, upsertRuleEvaluationStatus, - arg.PolicyID, + arg.ProfileID, arg.RepositoryID, arg.ArtifactID, arg.RuleTypeID, diff --git a/internal/db/policies.sql.go b/internal/db/profiles.sql.go similarity index 56% rename from internal/db/policies.sql.go rename to internal/db/profiles.sql.go index 24a349a283..781b9ff82f 100644 --- a/internal/db/policies.sql.go +++ b/internal/db/profiles.sql.go @@ -1,7 +1,7 @@ // Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.19.1 -// source: policies.sql +// source: profiles.sql package db @@ -13,29 +13,29 @@ import ( "github.com/google/uuid" ) -const createPolicy = `-- name: CreatePolicy :one -INSERT INTO policies ( +const createProfile = `-- name: CreateProfile :one +INSERT INTO profiles ( provider, project_id, remediate, name) VALUES ($1, $2, $3, $4) RETURNING id, name, provider, project_id, remediate, created_at, updated_at ` -type CreatePolicyParams struct { +type CreateProfileParams struct { Provider string `json:"provider"` ProjectID uuid.UUID `json:"project_id"` Remediate NullRemediateType `json:"remediate"` Name string `json:"name"` } -func (q *Queries) CreatePolicy(ctx context.Context, arg CreatePolicyParams) (Policy, error) { - row := q.db.QueryRowContext(ctx, createPolicy, +func (q *Queries) CreateProfile(ctx context.Context, arg CreateProfileParams) (Profile, error) { + row := q.db.QueryRowContext(ctx, createProfile, arg.Provider, arg.ProjectID, arg.Remediate, arg.Name, ) - var i Policy + var i Profile err := row.Scan( &i.ID, &i.Name, @@ -48,26 +48,26 @@ func (q *Queries) CreatePolicy(ctx context.Context, arg CreatePolicyParams) (Pol return i, err } -const createPolicyForEntity = `-- name: CreatePolicyForEntity :one -INSERT INTO entity_policies ( +const createProfileForEntity = `-- name: CreateProfileForEntity :one +INSERT INTO entity_profiles ( entity, - policy_id, - contextual_rules) VALUES ($1, $2, $3::jsonb) RETURNING id, entity, policy_id, contextual_rules, created_at, updated_at + profile_id, + contextual_rules) VALUES ($1, $2, $3::jsonb) RETURNING id, entity, profile_id, contextual_rules, created_at, updated_at ` -type CreatePolicyForEntityParams struct { +type CreateProfileForEntityParams struct { Entity Entities `json:"entity"` - PolicyID uuid.UUID `json:"policy_id"` + ProfileID uuid.UUID `json:"profile_id"` ContextualRules json.RawMessage `json:"contextual_rules"` } -func (q *Queries) CreatePolicyForEntity(ctx context.Context, arg CreatePolicyForEntityParams) (EntityPolicy, error) { - row := q.db.QueryRowContext(ctx, createPolicyForEntity, arg.Entity, arg.PolicyID, arg.ContextualRules) - var i EntityPolicy +func (q *Queries) CreateProfileForEntity(ctx context.Context, arg CreateProfileForEntityParams) (EntityProfile, error) { + row := q.db.QueryRowContext(ctx, createProfileForEntity, arg.Entity, arg.ProfileID, arg.ContextualRules) + var i EntityProfile err := row.Scan( &i.ID, &i.Entity, - &i.PolicyID, + &i.ProfileID, &i.ContextualRules, &i.CreatedAt, &i.UpdatedAt, @@ -75,23 +75,23 @@ func (q *Queries) CreatePolicyForEntity(ctx context.Context, arg CreatePolicyFor return i, err } -const deletePolicy = `-- name: DeletePolicy :exec -DELETE FROM policies +const deleteProfile = `-- name: DeleteProfile :exec +DELETE FROM profiles WHERE id = $1 ` -func (q *Queries) DeletePolicy(ctx context.Context, id uuid.UUID) error { - _, err := q.db.ExecContext(ctx, deletePolicy, id) +func (q *Queries) DeleteProfile(ctx context.Context, id uuid.UUID) error { + _, err := q.db.ExecContext(ctx, deleteProfile, id) return err } -const getPolicyByID = `-- name: GetPolicyByID :one -SELECT id, name, provider, project_id, remediate, created_at, updated_at FROM policies WHERE id = $1 +const getProfileByID = `-- name: GetProfileByID :one +SELECT id, name, provider, project_id, remediate, created_at, updated_at FROM profiles WHERE id = $1 ` -func (q *Queries) GetPolicyByID(ctx context.Context, id uuid.UUID) (Policy, error) { - row := q.db.QueryRowContext(ctx, getPolicyByID, id) - var i Policy +func (q *Queries) GetProfileByID(ctx context.Context, id uuid.UUID) (Profile, error) { + row := q.db.QueryRowContext(ctx, getProfileByID, id) + var i Profile err := row.Scan( &i.ID, &i.Name, @@ -104,17 +104,17 @@ func (q *Queries) GetPolicyByID(ctx context.Context, id uuid.UUID) (Policy, erro return i, err } -const getPolicyByProjectAndID = `-- name: GetPolicyByProjectAndID :many -SELECT policies.id, name, provider, project_id, remediate, policies.created_at, policies.updated_at, entity_policies.id, entity, policy_id, contextual_rules, entity_policies.created_at, entity_policies.updated_at FROM policies JOIN entity_policies ON policies.id = entity_policies.policy_id -WHERE policies.project_id = $1 AND policies.id = $2 +const getProfileByProjectAndID = `-- name: GetProfileByProjectAndID :many +SELECT profiles.id, name, provider, project_id, remediate, profiles.created_at, profiles.updated_at, entity_profiles.id, entity, profile_id, contextual_rules, entity_profiles.created_at, entity_profiles.updated_at FROM profiles JOIN entity_profiles ON profiles.id = entity_profiles.profile_id +WHERE profiles.project_id = $1 AND profiles.id = $2 ` -type GetPolicyByProjectAndIDParams struct { +type GetProfileByProjectAndIDParams struct { ProjectID uuid.UUID `json:"project_id"` ID uuid.UUID `json:"id"` } -type GetPolicyByProjectAndIDRow struct { +type GetProfileByProjectAndIDRow struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Provider string `json:"provider"` @@ -124,21 +124,21 @@ type GetPolicyByProjectAndIDRow struct { UpdatedAt time.Time `json:"updated_at"` ID_2 uuid.UUID `json:"id_2"` Entity Entities `json:"entity"` - PolicyID uuid.UUID `json:"policy_id"` + ProfileID uuid.UUID `json:"profile_id"` ContextualRules json.RawMessage `json:"contextual_rules"` CreatedAt_2 time.Time `json:"created_at_2"` UpdatedAt_2 time.Time `json:"updated_at_2"` } -func (q *Queries) GetPolicyByProjectAndID(ctx context.Context, arg GetPolicyByProjectAndIDParams) ([]GetPolicyByProjectAndIDRow, error) { - rows, err := q.db.QueryContext(ctx, getPolicyByProjectAndID, arg.ProjectID, arg.ID) +func (q *Queries) GetProfileByProjectAndID(ctx context.Context, arg GetProfileByProjectAndIDParams) ([]GetProfileByProjectAndIDRow, error) { + rows, err := q.db.QueryContext(ctx, getProfileByProjectAndID, arg.ProjectID, arg.ID) if err != nil { return nil, err } defer rows.Close() - items := []GetPolicyByProjectAndIDRow{} + items := []GetProfileByProjectAndIDRow{} for rows.Next() { - var i GetPolicyByProjectAndIDRow + var i GetProfileByProjectAndIDRow if err := rows.Scan( &i.ID, &i.Name, @@ -149,7 +149,7 @@ func (q *Queries) GetPolicyByProjectAndID(ctx context.Context, arg GetPolicyByPr &i.UpdatedAt, &i.ID_2, &i.Entity, - &i.PolicyID, + &i.ProfileID, &i.ContextualRules, &i.CreatedAt_2, &i.UpdatedAt_2, @@ -167,17 +167,17 @@ func (q *Queries) GetPolicyByProjectAndID(ctx context.Context, arg GetPolicyByPr return items, nil } -const getPolicyByProjectAndName = `-- name: GetPolicyByProjectAndName :many -SELECT policies.id, name, provider, project_id, remediate, policies.created_at, policies.updated_at, entity_policies.id, entity, policy_id, contextual_rules, entity_policies.created_at, entity_policies.updated_at FROM policies JOIN entity_policies ON policies.id = entity_policies.policy_id -WHERE policies.project_id = $1 AND policies.name = $2 +const getProfileByProjectAndName = `-- name: GetProfileByProjectAndName :many +SELECT profiles.id, name, provider, project_id, remediate, profiles.created_at, profiles.updated_at, entity_profiles.id, entity, profile_id, contextual_rules, entity_profiles.created_at, entity_profiles.updated_at FROM profiles JOIN entity_profiles ON profiles.id = entity_profiles.profile_id +WHERE profiles.project_id = $1 AND profiles.name = $2 ` -type GetPolicyByProjectAndNameParams struct { +type GetProfileByProjectAndNameParams struct { ProjectID uuid.UUID `json:"project_id"` Name string `json:"name"` } -type GetPolicyByProjectAndNameRow struct { +type GetProfileByProjectAndNameRow struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Provider string `json:"provider"` @@ -187,21 +187,21 @@ type GetPolicyByProjectAndNameRow struct { UpdatedAt time.Time `json:"updated_at"` ID_2 uuid.UUID `json:"id_2"` Entity Entities `json:"entity"` - PolicyID uuid.UUID `json:"policy_id"` + ProfileID uuid.UUID `json:"profile_id"` ContextualRules json.RawMessage `json:"contextual_rules"` CreatedAt_2 time.Time `json:"created_at_2"` UpdatedAt_2 time.Time `json:"updated_at_2"` } -func (q *Queries) GetPolicyByProjectAndName(ctx context.Context, arg GetPolicyByProjectAndNameParams) ([]GetPolicyByProjectAndNameRow, error) { - rows, err := q.db.QueryContext(ctx, getPolicyByProjectAndName, arg.ProjectID, arg.Name) +func (q *Queries) GetProfileByProjectAndName(ctx context.Context, arg GetProfileByProjectAndNameParams) ([]GetProfileByProjectAndNameRow, error) { + rows, err := q.db.QueryContext(ctx, getProfileByProjectAndName, arg.ProjectID, arg.Name) if err != nil { return nil, err } defer rows.Close() - items := []GetPolicyByProjectAndNameRow{} + items := []GetProfileByProjectAndNameRow{} for rows.Next() { - var i GetPolicyByProjectAndNameRow + var i GetProfileByProjectAndNameRow if err := rows.Scan( &i.ID, &i.Name, @@ -212,7 +212,7 @@ func (q *Queries) GetPolicyByProjectAndName(ctx context.Context, arg GetPolicyBy &i.UpdatedAt, &i.ID_2, &i.Entity, - &i.PolicyID, + &i.ProfileID, &i.ContextualRules, &i.CreatedAt_2, &i.UpdatedAt_2, @@ -230,12 +230,12 @@ func (q *Queries) GetPolicyByProjectAndName(ctx context.Context, arg GetPolicyBy return items, nil } -const listPoliciesByProjectID = `-- name: ListPoliciesByProjectID :many -SELECT policies.id, name, provider, project_id, remediate, policies.created_at, policies.updated_at, entity_policies.id, entity, policy_id, contextual_rules, entity_policies.created_at, entity_policies.updated_at FROM policies JOIN entity_policies ON policies.id = entity_policies.policy_id -WHERE policies.project_id = $1 +const listProfilesByProjectID = `-- name: ListProfilesByProjectID :many +SELECT profiles.id, name, provider, project_id, remediate, profiles.created_at, profiles.updated_at, entity_profiles.id, entity, profile_id, contextual_rules, entity_profiles.created_at, entity_profiles.updated_at FROM profiles JOIN entity_profiles ON profiles.id = entity_profiles.profile_id +WHERE profiles.project_id = $1 ` -type ListPoliciesByProjectIDRow struct { +type ListProfilesByProjectIDRow struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Provider string `json:"provider"` @@ -245,21 +245,21 @@ type ListPoliciesByProjectIDRow struct { UpdatedAt time.Time `json:"updated_at"` ID_2 uuid.UUID `json:"id_2"` Entity Entities `json:"entity"` - PolicyID uuid.UUID `json:"policy_id"` + ProfileID uuid.UUID `json:"profile_id"` ContextualRules json.RawMessage `json:"contextual_rules"` CreatedAt_2 time.Time `json:"created_at_2"` UpdatedAt_2 time.Time `json:"updated_at_2"` } -func (q *Queries) ListPoliciesByProjectID(ctx context.Context, projectID uuid.UUID) ([]ListPoliciesByProjectIDRow, error) { - rows, err := q.db.QueryContext(ctx, listPoliciesByProjectID, projectID) +func (q *Queries) ListProfilesByProjectID(ctx context.Context, projectID uuid.UUID) ([]ListProfilesByProjectIDRow, error) { + rows, err := q.db.QueryContext(ctx, listProfilesByProjectID, projectID) if err != nil { return nil, err } defer rows.Close() - items := []ListPoliciesByProjectIDRow{} + items := []ListProfilesByProjectIDRow{} for rows.Next() { - var i ListPoliciesByProjectIDRow + var i ListProfilesByProjectIDRow if err := rows.Scan( &i.ID, &i.Name, @@ -270,7 +270,7 @@ func (q *Queries) ListPoliciesByProjectID(ctx context.Context, projectID uuid.UU &i.UpdatedAt, &i.ID_2, &i.Entity, - &i.PolicyID, + &i.ProfileID, &i.ContextualRules, &i.CreatedAt_2, &i.UpdatedAt_2, diff --git a/internal/db/querier.go b/internal/db/querier.go index b9e629caac..f1e492c704 100644 --- a/internal/db/querier.go +++ b/internal/db/querier.go @@ -17,8 +17,8 @@ type Querier interface { CreateArtifact(ctx context.Context, arg CreateArtifactParams) (Artifact, error) CreateArtifactVersion(ctx context.Context, arg CreateArtifactVersionParams) (ArtifactVersion, error) CreateOrganization(ctx context.Context, arg CreateOrganizationParams) (Project, error) - CreatePolicy(ctx context.Context, arg CreatePolicyParams) (Policy, error) - CreatePolicyForEntity(ctx context.Context, arg CreatePolicyForEntityParams) (EntityPolicy, error) + CreateProfile(ctx context.Context, arg CreateProfileParams) (Profile, error) + CreateProfileForEntity(ctx context.Context, arg CreateProfileForEntityParams) (EntityProfile, error) CreateProject(ctx context.Context, arg CreateProjectParams) (Project, error) CreateProvider(ctx context.Context, arg CreateProviderParams) (Provider, error) CreateRepository(ctx context.Context, arg CreateRepositoryParams) (Repository, error) @@ -34,7 +34,7 @@ type Querier interface { DeleteExpiredSessionStates(ctx context.Context) error DeleteOldArtifactVersions(ctx context.Context, arg DeleteOldArtifactVersionsParams) error DeleteOrganization(ctx context.Context, id uuid.UUID) error - DeletePolicy(ctx context.Context, id uuid.UUID) error + DeleteProfile(ctx context.Context, id uuid.UUID) error DeleteProject(ctx context.Context, id uuid.UUID) ([]DeleteProjectRow, error) DeleteProvider(ctx context.Context, arg DeleteProviderParams) error DeleteRepository(ctx context.Context, id uuid.UUID) error @@ -56,12 +56,12 @@ type Querier interface { GetOrganizationForUpdate(ctx context.Context, name string) (Project, error) GetParentProjects(ctx context.Context, id uuid.UUID) ([]uuid.UUID, error) GetParentProjectsUntil(ctx context.Context, arg GetParentProjectsUntilParams) ([]uuid.UUID, error) - GetPolicyByID(ctx context.Context, id uuid.UUID) (Policy, error) - GetPolicyByProjectAndID(ctx context.Context, arg GetPolicyByProjectAndIDParams) ([]GetPolicyByProjectAndIDRow, error) - GetPolicyByProjectAndName(ctx context.Context, arg GetPolicyByProjectAndNameParams) ([]GetPolicyByProjectAndNameRow, error) - GetPolicyStatusByIdAndProject(ctx context.Context, arg GetPolicyStatusByIdAndProjectParams) (GetPolicyStatusByIdAndProjectRow, error) - GetPolicyStatusByNameAndProject(ctx context.Context, arg GetPolicyStatusByNameAndProjectParams) (GetPolicyStatusByNameAndProjectRow, error) - GetPolicyStatusByProject(ctx context.Context, projectID uuid.UUID) ([]GetPolicyStatusByProjectRow, error) + GetProfileByID(ctx context.Context, id uuid.UUID) (Profile, error) + GetProfileByProjectAndID(ctx context.Context, arg GetProfileByProjectAndIDParams) ([]GetProfileByProjectAndIDRow, error) + GetProfileByProjectAndName(ctx context.Context, arg GetProfileByProjectAndNameParams) ([]GetProfileByProjectAndNameRow, error) + GetProfileStatusByIdAndProject(ctx context.Context, arg GetProfileStatusByIdAndProjectParams) (GetProfileStatusByIdAndProjectRow, error) + GetProfileStatusByNameAndProject(ctx context.Context, arg GetProfileStatusByNameAndProjectParams) (GetProfileStatusByNameAndProjectRow, error) + GetProfileStatusByProject(ctx context.Context, projectID uuid.UUID) ([]GetProfileStatusByProjectRow, error) GetProjectByID(ctx context.Context, id uuid.UUID) (Project, error) GetProjectByName(ctx context.Context, name string) (Project, error) GetProjectIDPortBySessionState(ctx context.Context, sessionState string) (GetProjectIDPortBySessionStateRow, error) @@ -90,14 +90,14 @@ type Querier interface { ListArtifactVersionsByArtifactIDAndTag(ctx context.Context, arg ListArtifactVersionsByArtifactIDAndTagParams) ([]ArtifactVersion, error) ListArtifactsByRepoID(ctx context.Context, repositoryID uuid.UUID) ([]Artifact, error) ListOrganizations(ctx context.Context, arg ListOrganizationsParams) ([]Project, error) - ListPoliciesByProjectID(ctx context.Context, projectID uuid.UUID) ([]ListPoliciesByProjectIDRow, error) + ListProfilesByProjectID(ctx context.Context, projectID uuid.UUID) ([]ListProfilesByProjectIDRow, error) ListProvidersByProjectID(ctx context.Context, projectID uuid.UUID) ([]Provider, error) ListRegisteredRepositoriesByProjectIDAndProvider(ctx context.Context, arg ListRegisteredRepositoriesByProjectIDAndProviderParams) ([]Repository, error) ListRepositoriesByOwner(ctx context.Context, arg ListRepositoriesByOwnerParams) ([]Repository, error) ListRepositoriesByProjectID(ctx context.Context, arg ListRepositoriesByProjectIDParams) ([]Repository, error) ListRoles(ctx context.Context, arg ListRolesParams) ([]Role, error) ListRolesByProjectID(ctx context.Context, arg ListRolesByProjectIDParams) ([]Role, error) - ListRuleEvaluationStatusByPolicyId(ctx context.Context, arg ListRuleEvaluationStatusByPolicyIdParams) ([]ListRuleEvaluationStatusByPolicyIdRow, error) + ListRuleEvaluationStatusByProfileId(ctx context.Context, arg ListRuleEvaluationStatusByProfileIdParams) ([]ListRuleEvaluationStatusByProfileIdRow, error) ListRuleTypesByProviderAndProject(ctx context.Context, arg ListRuleTypesByProviderAndProjectParams) ([]RuleType, error) ListUsers(ctx context.Context, arg ListUsersParams) ([]User, error) ListUsersByOrganization(ctx context.Context, arg ListUsersByOrganizationParams) ([]User, error) diff --git a/internal/engine/doc.go b/internal/engine/doc.go index 77d1c8bdaa..67cda0d93b 100644 --- a/internal/engine/doc.go +++ b/internal/engine/doc.go @@ -13,6 +13,6 @@ // limitations under the License. // Package rule provides the CLI subcommand for managing rules -// Package engine provides an implementation of the policy-engine-related +// Package engine provides an implementation of the profile-engine-related // objects, interfaces and functionality. package engine diff --git a/internal/engine/entity_event.go b/internal/engine/entity_event.go index 13610cc4c5..b2457db8f1 100644 --- a/internal/engine/entity_event.go +++ b/internal/engine/entity_event.go @@ -282,14 +282,14 @@ func (eiw *EntityInfoWrapper) unmarshalEntity(msg *message.Message) error { } func (eiw *EntityInfoWrapper) evalStatusParams( - policyID uuid.UUID, + profileID uuid.UUID, ruleTypeID uuid.UUID, evalErr error, remediateErr error, ) *createOrUpdateEvalStatusParams { repoID := uuid.MustParse(eiw.OwnershipData[RepositoryIDEventKey]) params := &createOrUpdateEvalStatusParams{ - policyID: policyID, + profileID: profileID, repoID: repoID, ruleTypeEntity: entities.EntityTypeToDB(eiw.Type), ruleTypeID: ruleTypeID, diff --git a/internal/engine/eval/eval_test.go b/internal/engine/eval/eval_test.go index e1c4cc7724..193f5851c1 100644 --- a/internal/engine/eval/eval_test.go +++ b/internal/engine/eval/eval_test.go @@ -46,7 +46,7 @@ func TestNewRuleEvaluatorWorks(t *testing.T) { Type: "jq", Jq: []*pb.RuleType_Definition_Eval_JQComparison{ { - Policy: &pb.RuleType_Definition_Eval_JQComparison_Operator{ + Profile: &pb.RuleType_Definition_Eval_JQComparison_Operator{ Def: ".", }, Ingested: &pb.RuleType_Definition_Eval_JQComparison_Operator{ @@ -132,7 +132,7 @@ func TestNewRuleEvaluatorFails(t *testing.T) { }, }, { - name: "missing jq policy accessor", + name: "missing jq profile accessor", args: args{ rt: &pb.RuleType{ Def: &pb.RuleType_Definition{ diff --git a/internal/engine/eval/jq/jq.go b/internal/engine/eval/jq/jq.go index a512332778..d681122ac5 100644 --- a/internal/engine/eval/jq/jq.go +++ b/internal/engine/eval/jq/jq.go @@ -13,7 +13,7 @@ // limitations under the License. // Package rule provides the CLI subcommand for managing rules -// Package jq provides the jq policy evaluator +// Package jq provides the jq profile evaluator package jq import ( @@ -42,12 +42,12 @@ func NewJQEvaluator(assertions []*pb.RuleType_Definition_Eval_JQComparison) (*Ev for idx := range assertions { a := assertions[idx] - if a.Policy == nil { - return nil, fmt.Errorf("missing policy accessor") + if a.Profile == nil { + return nil, fmt.Errorf("missing profile accessor") } - if a.Policy.Def == "" { - return nil, fmt.Errorf("missing policy accessor definition") + if a.Profile.Def == "" { + return nil, fmt.Errorf("missing profile accessor definition") } if a.Ingested == nil { @@ -72,14 +72,14 @@ func (jqe *Evaluator) Eval(ctx context.Context, pol map[string]any, res *engif.R obj := res.Object for idx := range jqe.assertions { - var policyVal, dataVal any + var profileVal, dataVal any a := jqe.assertions[idx] - policyVal, err := util.JQReadFrom[any](ctx, a.Policy.Def, pol) + profileVal, err := util.JQReadFrom[any](ctx, a.Profile.Def, pol) // we ignore util.ErrNoValueFound because we want to allow the JQ accessor to return the default value // which is fine for DeepEqual if err != nil && !errors.Is(err, util.ErrNoValueFound) { - return fmt.Errorf("cannot get values from policy accessor: %w", err) + return fmt.Errorf("cannot get values from profile accessor: %w", err) } dataVal, err = util.JQReadFrom[any](ctx, a.Ingested.Def, obj) @@ -88,9 +88,9 @@ func (jqe *Evaluator) Eval(ctx context.Context, pol map[string]any, res *engif.R } // Deep compare - if !reflect.DeepEqual(policyVal, dataVal) { - msg := fmt.Sprintf("data does not match policy: for assertion %d, got %v, want %v", - idx, dataVal, policyVal) + if !reflect.DeepEqual(profileVal, dataVal) { + msg := fmt.Sprintf("data does not match profile: for assertion %d, got %v, want %v", + idx, dataVal, profileVal) marshalledAssertion, err := json.MarshalIndent(a, "", " ") if err == nil { diff --git a/internal/engine/eval/jq/jq_test.go b/internal/engine/eval/jq/jq_test.go index 7198e598ea..d9c7336a17 100644 --- a/internal/engine/eval/jq/jq_test.go +++ b/internal/engine/eval/jq/jq_test.go @@ -42,7 +42,7 @@ func TestNewJQEvaluatorValid(t *testing.T) { args: args{ assertions: []*pb.RuleType_Definition_Eval_JQComparison{ { - Policy: &pb.RuleType_Definition_Eval_JQComparison_Operator{ + Profile: &pb.RuleType_Definition_Eval_JQComparison_Operator{ Def: ".", }, Ingested: &pb.RuleType_Definition_Eval_JQComparison_Operator{ @@ -57,7 +57,7 @@ func TestNewJQEvaluatorValid(t *testing.T) { args: args{ assertions: []*pb.RuleType_Definition_Eval_JQComparison{ { - Policy: &pb.RuleType_Definition_Eval_JQComparison_Operator{ + Profile: &pb.RuleType_Definition_Eval_JQComparison_Operator{ Def: ".a", }, Ingested: &pb.RuleType_Definition_Eval_JQComparison_Operator{ @@ -65,7 +65,7 @@ func TestNewJQEvaluatorValid(t *testing.T) { }, }, { - Policy: &pb.RuleType_Definition_Eval_JQComparison_Operator{ + Profile: &pb.RuleType_Definition_Eval_JQComparison_Operator{ Def: ".b", }, Ingested: &pb.RuleType_Definition_Eval_JQComparison_Operator{ @@ -111,11 +111,11 @@ func TestNewJQEvaluatorInvalid(t *testing.T) { }, }, { - name: "invalid nil policy accessor", + name: "invalid nil profile accessor", args: args{ assertions: []*pb.RuleType_Definition_Eval_JQComparison{ { - Policy: nil, + Profile: nil, Ingested: &pb.RuleType_Definition_Eval_JQComparison_Operator{ Def: ".", }, @@ -124,11 +124,11 @@ func TestNewJQEvaluatorInvalid(t *testing.T) { }, }, { - name: "invalid empty policy accessor", + name: "invalid empty profile accessor", args: args{ assertions: []*pb.RuleType_Definition_Eval_JQComparison{ { - Policy: &pb.RuleType_Definition_Eval_JQComparison_Operator{}, + Profile: &pb.RuleType_Definition_Eval_JQComparison_Operator{}, Ingested: &pb.RuleType_Definition_Eval_JQComparison_Operator{ Def: ".", }, @@ -141,7 +141,7 @@ func TestNewJQEvaluatorInvalid(t *testing.T) { args: args{ assertions: []*pb.RuleType_Definition_Eval_JQComparison{ { - Policy: &pb.RuleType_Definition_Eval_JQComparison_Operator{ + Profile: &pb.RuleType_Definition_Eval_JQComparison_Operator{ Def: ".", }, Ingested: nil, @@ -154,7 +154,7 @@ func TestNewJQEvaluatorInvalid(t *testing.T) { args: args{ assertions: []*pb.RuleType_Definition_Eval_JQComparison{ { - Policy: &pb.RuleType_Definition_Eval_JQComparison_Operator{ + Profile: &pb.RuleType_Definition_Eval_JQComparison_Operator{ Def: ".", }, Ingested: &pb.RuleType_Definition_Eval_JQComparison_Operator{}, @@ -167,13 +167,13 @@ func TestNewJQEvaluatorInvalid(t *testing.T) { args: args{ assertions: []*pb.RuleType_Definition_Eval_JQComparison{ { - Policy: &pb.RuleType_Definition_Eval_JQComparison_Operator{ + Profile: &pb.RuleType_Definition_Eval_JQComparison_Operator{ Def: ".", }, Ingested: nil, }, { - Policy: &pb.RuleType_Definition_Eval_JQComparison_Operator{ + Profile: &pb.RuleType_Definition_Eval_JQComparison_Operator{ Def: ".", }, Ingested: &pb.RuleType_Definition_Eval_JQComparison_Operator{ @@ -212,7 +212,7 @@ func TestValidJQEvals(t *testing.T) { name: "valid single rule evaluates string", assertions: []*pb.RuleType_Definition_Eval_JQComparison{ { - Policy: &pb.RuleType_Definition_Eval_JQComparison_Operator{ + Profile: &pb.RuleType_Definition_Eval_JQComparison_Operator{ Def: ".simple", }, Ingested: &pb.RuleType_Definition_Eval_JQComparison_Operator{ @@ -233,7 +233,7 @@ func TestValidJQEvals(t *testing.T) { name: "valid single rule evaluates int", assertions: []*pb.RuleType_Definition_Eval_JQComparison{ { - Policy: &pb.RuleType_Definition_Eval_JQComparison_Operator{ + Profile: &pb.RuleType_Definition_Eval_JQComparison_Operator{ Def: ".simple", }, Ingested: &pb.RuleType_Definition_Eval_JQComparison_Operator{ @@ -254,7 +254,7 @@ func TestValidJQEvals(t *testing.T) { name: "valid single rule evaluates bool", assertions: []*pb.RuleType_Definition_Eval_JQComparison{ { - Policy: &pb.RuleType_Definition_Eval_JQComparison_Operator{ + Profile: &pb.RuleType_Definition_Eval_JQComparison_Operator{ Def: ".simple", }, Ingested: &pb.RuleType_Definition_Eval_JQComparison_Operator{ @@ -275,7 +275,7 @@ func TestValidJQEvals(t *testing.T) { name: "valid single rule evaluates array", assertions: []*pb.RuleType_Definition_Eval_JQComparison{ { - Policy: &pb.RuleType_Definition_Eval_JQComparison_Operator{ + Profile: &pb.RuleType_Definition_Eval_JQComparison_Operator{ Def: ".simple", }, Ingested: &pb.RuleType_Definition_Eval_JQComparison_Operator{ @@ -324,7 +324,7 @@ func TestValidJQEvalsFailed(t *testing.T) { name: "string doesn't match", assertions: []*pb.RuleType_Definition_Eval_JQComparison{ { - Policy: &pb.RuleType_Definition_Eval_JQComparison_Operator{ + Profile: &pb.RuleType_Definition_Eval_JQComparison_Operator{ Def: ".simple", }, Ingested: &pb.RuleType_Definition_Eval_JQComparison_Operator{ @@ -345,7 +345,7 @@ func TestValidJQEvalsFailed(t *testing.T) { name: "int doesn't match", assertions: []*pb.RuleType_Definition_Eval_JQComparison{ { - Policy: &pb.RuleType_Definition_Eval_JQComparison_Operator{ + Profile: &pb.RuleType_Definition_Eval_JQComparison_Operator{ Def: ".simple", }, Ingested: &pb.RuleType_Definition_Eval_JQComparison_Operator{ @@ -366,7 +366,7 @@ func TestValidJQEvalsFailed(t *testing.T) { name: "bool doesn't match", assertions: []*pb.RuleType_Definition_Eval_JQComparison{ { - Policy: &pb.RuleType_Definition_Eval_JQComparison_Operator{ + Profile: &pb.RuleType_Definition_Eval_JQComparison_Operator{ Def: ".simple", }, Ingested: &pb.RuleType_Definition_Eval_JQComparison_Operator{ @@ -387,7 +387,7 @@ func TestValidJQEvalsFailed(t *testing.T) { name: "type doesn't match", assertions: []*pb.RuleType_Definition_Eval_JQComparison{ { - Policy: &pb.RuleType_Definition_Eval_JQComparison_Operator{ + Profile: &pb.RuleType_Definition_Eval_JQComparison_Operator{ Def: ".simple", }, Ingested: &pb.RuleType_Definition_Eval_JQComparison_Operator{ @@ -408,7 +408,7 @@ func TestValidJQEvalsFailed(t *testing.T) { name: "array doesn't match", assertions: []*pb.RuleType_Definition_Eval_JQComparison{ { - Policy: &pb.RuleType_Definition_Eval_JQComparison_Operator{ + Profile: &pb.RuleType_Definition_Eval_JQComparison_Operator{ Def: ".simple", }, Ingested: &pb.RuleType_Definition_Eval_JQComparison_Operator{ @@ -429,7 +429,7 @@ func TestValidJQEvalsFailed(t *testing.T) { name: "accessor doesn't match", assertions: []*pb.RuleType_Definition_Eval_JQComparison{ { - Policy: &pb.RuleType_Definition_Eval_JQComparison_Operator{ + Profile: &pb.RuleType_Definition_Eval_JQComparison_Operator{ Def: ".should_match", }, // This returns nil @@ -476,10 +476,10 @@ func TestInvalidJQEvals(t *testing.T) { args args }{ { - name: "invalid policy accessor", + name: "invalid profile accessor", assertions: []*pb.RuleType_Definition_Eval_JQComparison{ { - Policy: &pb.RuleType_Definition_Eval_JQComparison_Operator{ + Profile: &pb.RuleType_Definition_Eval_JQComparison_Operator{ Def: "invalid | foobar", }, Ingested: &pb.RuleType_Definition_Eval_JQComparison_Operator{ @@ -500,7 +500,7 @@ func TestInvalidJQEvals(t *testing.T) { name: "invalid ingested accessor", assertions: []*pb.RuleType_Definition_Eval_JQComparison{ { - Policy: &pb.RuleType_Definition_Eval_JQComparison_Operator{ + Profile: &pb.RuleType_Definition_Eval_JQComparison_Operator{ Def: ".simple", }, Ingested: &pb.RuleType_Definition_Eval_JQComparison_Operator{ diff --git a/internal/engine/eval/rego/config.go b/internal/engine/eval/rego/config.go index 34acdcc48b..a38ad27fcd 100644 --- a/internal/engine/eval/rego/config.go +++ b/internal/engine/eval/rego/config.go @@ -29,7 +29,7 @@ import ( type Config struct { // Type is the type of evaluation to perform Type EvaluationType `json:"type" mapstructure:"type" validate:"required"` - // Def is the definition of the policy + // Def is the definition of the profile Def string `json:"def" mapstructure:"def" validate:"required"` } diff --git a/internal/engine/eval/rego/eval.go b/internal/engine/eval/rego/eval.go index 9f0c3aa4e8..03be577fbd 100644 --- a/internal/engine/eval/rego/eval.go +++ b/internal/engine/eval/rego/eval.go @@ -50,8 +50,8 @@ type Evaluator struct { // Input is the input for the rego evaluator type Input struct { - // Policy is the values set for the policy - Policy map[string]any `json:"policy"` + // Profile is the values set for the profile + Profile map[string]any `json:"profile"` // Ingested is the values set for the ingested data Ingested any `json:"ingested"` } @@ -117,11 +117,11 @@ func (e *Evaluator) Eval(ctx context.Context, pol map[string]any, res *engif.Res } rs, err := pq.Eval(ctx, rego.EvalInput(&Input{ - Policy: pol, + Profile: pol, Ingested: obj, })) if err != nil { - return fmt.Errorf("error evaluating policy. Might be wrong input: %w", err) + return fmt.Errorf("error evaluating profile. Might be wrong input: %w", err) } return e.reseval.parseResult(rs) diff --git a/internal/engine/eval/rego/rego_test.go b/internal/engine/eval/rego/rego_test.go index ed7cbe257b..1b97b973c2 100644 --- a/internal/engine/eval/rego/rego_test.go +++ b/internal/engine/eval/rego/rego_test.go @@ -28,9 +28,9 @@ import ( pb "github.com/stacklok/mediator/pkg/api/protobuf/go/mediator/v1" ) -// Evaluates a simple query against a simple policy -// In this case, the policy is a simple "allow" rule. -// The given policy map is empty since all the policy +// Evaluates a simple query against a simple profile +// In this case, the profile is a simple "allow" rule. +// The given profile map is empty since all the profile // needed in ths test case is contained in the rego // definition. func TestEvaluatorDenyByDefaultEvalSimple(t *testing.T) { @@ -177,12 +177,12 @@ violations[{"msg": msg}] { require.ErrorContains(t, err, "- evaluation failure: datum should not contain bar") } -// Evaluates a simple query against a simple policy -// In this case, the policy is a simple "allow" rule. -// The given policy map has a value for the "data" key +// Evaluates a simple query against a simple profile +// In this case, the profile is a simple "allow" rule. +// The given profile map has a value for the "data" key // which is used in the rego definition. The ingested -// data has to match the policy data. -func TestDenyByDefaultEvaluationWithPolicy(t *testing.T) { +// data has to match the profile data. +func TestDenyByDefaultEvaluationWithProfile(t *testing.T) { t.Parallel() e, err := rego.NewRegoEvaluator( @@ -194,7 +194,7 @@ package mediator default allow = false allow { - input.policy.data == input.ingested.data + input.profile.data == input.ingested.data }`, }, ) @@ -221,7 +221,7 @@ allow { require.ErrorIs(t, err, engerrors.ErrEvaluationFailed, "should have failed the evaluation") } -func TestConstrainedEvaluationWithPolicy(t *testing.T) { +func TestConstrainedEvaluationWithProfile(t *testing.T) { t.Parallel() e, err := rego.NewRegoEvaluator( @@ -231,8 +231,8 @@ func TestConstrainedEvaluationWithPolicy(t *testing.T) { package mediator violations[{"msg": msg}] { - input.policy.data != input.ingested.data - msg := sprintf("data did not match policy: %s", [input.policy.data]) + input.profile.data != input.ingested.data + msg := sprintf("data did not match profile: %s", [input.profile.data]) }`, }, ) @@ -257,7 +257,7 @@ violations[{"msg": msg}] { }, }) require.ErrorIs(t, err, engerrors.ErrEvaluationFailed, "should have failed the evaluation") - assert.ErrorContains(t, err, "data did not match policy: foo", "should have failed the evaluation") + assert.ErrorContains(t, err, "data did not match profile: foo", "should have failed the evaluation") } func TestCantCreateEvaluatorWithInvalidConfig(t *testing.T) { @@ -290,8 +290,8 @@ func TestCantCreateEvaluatorWithInvalidConfig(t *testing.T) { } // This test case reflects the scenario where the user provided -// a rego policy definition that has a syntax error. -func TestCantEvaluateWithInvalidPolicy(t *testing.T) { +// a rego profile definition that has a syntax error. +func TestCantEvaluateWithInvalidProfile(t *testing.T) { t.Parallel() e, err := rego.NewRegoEvaluator( @@ -313,7 +313,7 @@ violations[{"msg": msg}] {`, func TestCantEvaluateWithCompilerError(t *testing.T) { t.Parallel() - // This policy is using a variable that is restricted + // This profile is using a variable that is restricted // in OPA's strict mode. e, err := rego.NewRegoEvaluator( &pb.RuleType_Definition_Eval_Rego{ diff --git a/internal/engine/eval/vulncheck/actions.go b/internal/engine/eval/vulncheck/actions.go index 20fb5bdfcb..324222ce1f 100644 --- a/internal/engine/eval/vulncheck/actions.go +++ b/internal/engine/eval/vulncheck/actions.go @@ -47,8 +47,8 @@ func newPrStatusHandler( return newCommitStatusPrHandler(ctx, pr, client) case actionComment: return newReviewPrHandler(ctx, pr, client, withVulnsFoundReviewStatus(github.String("COMMENT"))) - case actionPolicyOnly: - return newPolicyOnlyPrHandler(), nil + case actionProfileOnly: + return newProfileOnlyPrHandler(), nil default: return nil, fmt.Errorf("unknown action: %s", action) } diff --git a/internal/engine/eval/vulncheck/config.go b/internal/engine/eval/vulncheck/config.go index 144e84015d..9b733098ed 100644 --- a/internal/engine/eval/vulncheck/config.go +++ b/internal/engine/eval/vulncheck/config.go @@ -38,7 +38,7 @@ const ( actionReviewPr action = "review" actionComment action = "comment" actionCommitStatus action = "commit_status" - actionPolicyOnly action = "policy_only" + actionProfileOnly action = "profile_only" ) type packageRepository struct { diff --git a/internal/engine/eval/vulncheck/review.go b/internal/engine/eval/vulncheck/review.go index 70e0f283c4..0c63802800 100644 --- a/internal/engine/eval/vulncheck/review.go +++ b/internal/engine/eval/vulncheck/review.go @@ -415,19 +415,19 @@ func (csh *commitStatusPrHandler) setCommitStatus( } // just satisfies the interface but really does nothing. Useful for testing. -type policyOnlyPrHandler struct{} +type profileOnlyPrHandler struct{} -func (policyOnlyPrHandler) trackVulnerableDep( +func (profileOnlyPrHandler) trackVulnerableDep( _ context.Context, _ *pb.PrDependencies_ContextualDependency, _ patchLocatorFormatter) error { return nil } -func (policyOnlyPrHandler) submit(_ context.Context) error { +func (profileOnlyPrHandler) submit(_ context.Context) error { return nil } -func newPolicyOnlyPrHandler() prStatusHandler { - return &policyOnlyPrHandler{} +func newProfileOnlyPrHandler() prStatusHandler { + return &profileOnlyPrHandler{} } diff --git a/internal/engine/eval_status.go b/internal/engine/eval_status.go index 1ec2c37838..cb374517fc 100644 --- a/internal/engine/eval_status.go +++ b/internal/engine/eval_status.go @@ -30,10 +30,10 @@ import ( // createOrUpdateEvalStatusParams is a helper struct to pass parameters to createOrUpdateEvalStatus // to avoid confusion with the parameters order. Since at the moment all our entities are bound to -// a repo and most policies are expecting a repo, the repoID parameter is mandatory. For entities +// a repo and most profiles are expecting a repo, the repoID parameter is mandatory. For entities // other than artifacts, the artifactID should be 0 which is translated to NULL in the database. type createOrUpdateEvalStatusParams struct { - policyID uuid.UUID + profileID uuid.UUID repoID uuid.UUID artifactID *uuid.UUID ruleTypeEntity db.Entities @@ -51,8 +51,8 @@ func (e *Executor) createOrUpdateEvalStatus( } if errors.Is(params.evalErr, evalerrors.ErrEvaluationSkipSilently) { - log.Printf("silent skip of rule %s for policy %s for entity %s in repo %s", - params.ruleTypeID, params.policyID, params.ruleTypeEntity, params.repoID) + log.Printf("silent skip of rule %s for profile %s for entity %s in repo %s", + params.ruleTypeID, params.profileID, params.ruleTypeEntity, params.repoID) return nil } @@ -65,7 +65,7 @@ func (e *Executor) createOrUpdateEvalStatus( } err := e.querier.UpsertRuleEvaluationStatus(ctx, db.UpsertRuleEvaluationStatusParams{ - PolicyID: params.policyID, + ProfileID: params.profileID, RepositoryID: uuid.NullUUID{ UUID: params.repoID, Valid: true, diff --git a/internal/engine/executor.go b/internal/engine/executor.go index 85c65ed796..dc88a2da60 100644 --- a/internal/engine/executor.go +++ b/internal/engine/executor.go @@ -115,16 +115,16 @@ func (e *Executor) evalEntityEvent( ectx *EntityContext, cli *providers.ProviderBuilder, ) error { - // Get policies relevant to group - dbpols, err := e.querier.ListPoliciesByProjectID(ctx, *inf.ProjectID) + // Get profiles relevant to group + dbpols, err := e.querier.ListProfilesByProjectID(ctx, *inf.ProjectID) if err != nil { - return fmt.Errorf("error getting policies: %w", err) + return fmt.Errorf("error getting profiles: %w", err) } - for _, pol := range MergeDatabaseListIntoPolicies(dbpols, ectx) { - policyID, err := uuid.Parse(*pol.Id) + for _, pol := range MergeDatabaseListIntoProfiles(dbpols, ectx) { + profileID, err := uuid.Parse(*pol.Id) if err != nil { - return fmt.Errorf("error parsing policy ID: %w", err) + return fmt.Errorf("error parsing profile ID: %w", err) } remAction := interfaces.RemediationActionOptFromString(pol.Remediate) @@ -135,9 +135,9 @@ func (e *Executor) evalEntityEvent( return fmt.Errorf("error getting rules for entity: %w", err) } - // Let's evaluate all the rules for this policy - err = TraverseRules(relevant, func(rule *pb.Policy_Rule) error { - rt, rte, err := e.getEvaluator(ctx, policyID, ectx.Provider.Name, cli, ectx, rule) + // Let's evaluate all the rules for this profile + err = TraverseRules(relevant, func(rule *pb.Profile_Rule) error { + rt, rte, err := e.getEvaluator(ctx, profileID, ectx.Provider.Name, cli, ectx, rule) if err != nil { return err } @@ -152,7 +152,7 @@ func (e *Executor) evalEntityEvent( logEval(ctx, pol, rule, inf, evalResult, remediateResult) return e.createOrUpdateEvalStatus(ctx, inf.evalStatusParams( - policyID, ruleTypeID, evalResult, remediateResult)) + profileID, ruleTypeID, evalResult, remediateResult)) }) if err != nil { @@ -160,7 +160,7 @@ func (e *Executor) evalEntityEvent( if pol.Id != nil { p = *pol.Id } - return fmt.Errorf("error traversing rules for policy %s: %w", p, err) + return fmt.Errorf("error traversing rules for profile %s: %w", p, err) } } return nil @@ -168,13 +168,13 @@ func (e *Executor) evalEntityEvent( func (e *Executor) getEvaluator( ctx context.Context, - policyID uuid.UUID, + profileID uuid.UUID, prov string, cli *providers.ProviderBuilder, ectx *EntityContext, - rule *pb.Policy_Rule, + rule *pb.Profile_Rule, ) (*pb.RuleType, *RuleTypeEngine, error) { - log.Printf("Evaluating rule: %s for policy %s", rule.Type, policyID) + log.Printf("Evaluating rule: %s for profile %s", rule.Type, profileID) dbrt, err := e.querier.GetRuleTypeByName(ctx, db.GetRuleTypeByNameParams{ Provider: prov, @@ -183,12 +183,12 @@ func (e *Executor) getEvaluator( }) if err != nil { - return nil, nil, fmt.Errorf("error getting rule type when traversing policy %s: %w", policyID, err) + return nil, nil, fmt.Errorf("error getting rule type when traversing profile %s: %w", profileID, err) } rt, err := RuleTypePBFromDB(&dbrt, ectx) if err != nil { - return nil, nil, fmt.Errorf("error parsing rule type when traversing policy %s: %w", policyID, err) + return nil, nil, fmt.Errorf("error parsing rule type when traversing profile %s: %w", profileID, err) } // TODO(jaosorior): Rule types should be cached in memory so @@ -203,14 +203,14 @@ func (e *Executor) getEvaluator( func logEval( ctx context.Context, - pol *pb.Policy, - rule *pb.Policy_Rule, + pol *pb.Profile, + rule *pb.Profile_Rule, inf *EntityInfoWrapper, evalResult error, remediateResult error, ) { logger := zerolog.Ctx(ctx).Debug(). - Str("policy", pol.Name). + Str("profile", pol.Name). Str("ruleType", rule.Type). Str("projectId", inf.ProjectID.String()). Str("repositoryId", inf.OwnershipData[RepositoryIDEventKey]) diff --git a/internal/engine/executor_test.go b/internal/engine/executor_test.go index 6c701a3a6b..14af33fdd8 100644 --- a/internal/engine/executor_test.go +++ b/internal/engine/executor_test.go @@ -74,7 +74,7 @@ func TestExecutor_handleEntityEvent(t *testing.T) { providerName := "github" providerID := uuid.New() passthroughRuleType := "passthrough" - policyID := uuid.New() + profileID := uuid.New() ruleTypeID := uuid.New() repositoryID := uuid.New() @@ -112,8 +112,8 @@ func TestExecutor_handleEntityEvent(t *testing.T) { EncryptedToken: authtoken, }, nil) - // list one policy - crs := []*mediatorv1.Policy_Rule{ + // list one profile + crs := []*mediatorv1.Profile_Rule{ { Type: passthroughRuleType, Def: &structpb.Struct{}, @@ -124,11 +124,11 @@ func TestExecutor_handleEntityEvent(t *testing.T) { require.NoError(t, err, "expected no error") mockStore.EXPECT(). - ListPoliciesByProjectID(gomock.Any(), projectID). - Return([]db.ListPoliciesByProjectIDRow{ + ListProfilesByProjectID(gomock.Any(), projectID). + Return([]db.ListProfilesByProjectIDRow{ { - ID: policyID, - Name: "test-policy", + ID: profileID, + Name: "test-profile", Entity: db.EntitiesRepository, Provider: providerName, ProjectID: projectID, @@ -177,7 +177,7 @@ default allow = true`, // Upload passing status mockStore.EXPECT(). UpsertRuleEvaluationStatus(gomock.Any(), db.UpsertRuleEvaluationStatusParams{ - PolicyID: policyID, + ProfileID: profileID, RepositoryID: uuid.NullUUID{ UUID: repositoryID, Valid: true, diff --git a/internal/engine/ingester/git/config.go b/internal/engine/ingester/git/config.go index 3c62cd284f..bb42094fa5 100644 --- a/internal/engine/ingester/git/config.go +++ b/internal/engine/ingester/git/config.go @@ -15,7 +15,7 @@ // Package git provides the git rule data ingest engine package git -// IngesterConfig is the policy-provided configuration for the git ingester +// IngesterConfig is the profile-provided configuration for the git ingester // This allows for users to pass in configuration to the ingester // in different calls as opposed to having to set it in the rule type. type IngesterConfig struct { diff --git a/internal/engine/interfaces/interface.go b/internal/engine/interfaces/interface.go index 16e44cb0ac..e16145b991 100644 --- a/internal/engine/interfaces/interface.go +++ b/internal/engine/interfaces/interface.go @@ -32,7 +32,7 @@ type Ingester interface { // Evaluator is the interface for a rule type evaluator type Evaluator interface { - Eval(ctx context.Context, policy map[string]any, res *Result) error + Eval(ctx context.Context, profile map[string]any, res *Result) error } // Result is the result of an ingester diff --git a/internal/engine/policy.go b/internal/engine/profile.go similarity index 67% rename from internal/engine/policy.go rename to internal/engine/profile.go index 06f80ea5db..bd73dfd4a5 100644 --- a/internal/engine/policy.go +++ b/internal/engine/profile.go @@ -48,8 +48,8 @@ func (e *RuleValidationError) Error() string { return e.String() } -// ParseYAML parses a YAML pipeline policy and validates it -func ParseYAML(r io.Reader) (*pb.Policy, error) { +// ParseYAML parses a YAML pipeline profile and validates it +func ParseYAML(r io.Reader) (*pb.Profile, error) { w := &bytes.Buffer{} if err := jsonyaml.TranscodeYAMLToJSON(r, w); err != nil { return nil, fmt.Errorf("error converting yaml to json: %w", err) @@ -57,9 +57,9 @@ func ParseYAML(r io.Reader) (*pb.Policy, error) { return ParseJSON(w) } -// ParseJSON parses a JSON pipeline policy and validates it -func ParseJSON(r io.Reader) (*pb.Policy, error) { - var out pb.Policy +// ParseJSON parses a JSON pipeline profile and validates it +func ParseJSON(r io.Reader) (*pb.Profile, error) { + var out pb.Profile dec := json.NewDecoder(r) if err := dec.Decode(&out); err != nil { @@ -67,21 +67,21 @@ func ParseJSON(r io.Reader) (*pb.Policy, error) { } if err := out.Validate(); err != nil { - return nil, fmt.Errorf("error validating policy: %w", err) + return nil, fmt.Errorf("error validating profile: %w", err) } return &out, nil } -// ReadPolicyFromFile reads a pipeline policy from a file and returns it as a protobuf -func ReadPolicyFromFile(fpath string) (*pb.Policy, error) { +// ReadProfileFromFile reads a pipeline profile from a file and returns it as a protobuf +func ReadProfileFromFile(fpath string) (*pb.Profile, error) { f, err := os.Open(filepath.Clean(fpath)) if err != nil { return nil, fmt.Errorf("error opening file: %w", err) } defer f.Close() - var out *pb.Policy + var out *pb.Profile if filepath.Ext(fpath) == ".json" { out, err = ParseJSON(f) @@ -90,14 +90,14 @@ func ReadPolicyFromFile(fpath string) (*pb.Policy, error) { out, err = ParseYAML(f) } if err != nil { - return nil, fmt.Errorf("error parsing policy: %w", err) + return nil, fmt.Errorf("error parsing profile: %w", err) } return out, nil } // GetRulesForEntity returns the rules for the given entity -func GetRulesForEntity(p *pb.Policy, entity pb.Entity) ([]*pb.Policy_Rule, error) { +func GetRulesForEntity(p *pb.Profile, entity pb.Entity) ([]*pb.Profile_Rule, error) { switch entity { case pb.Entity_ENTITY_REPOSITORIES: return p.Repository, nil @@ -114,8 +114,8 @@ func GetRulesForEntity(p *pb.Policy, entity pb.Entity) ([]*pb.Policy_Rule, error } } -// TraverseAllRulesForPipeline traverses all rules for the given pipeline policy -func TraverseAllRulesForPipeline(p *pb.Policy, fn func(*pb.Policy_Rule) error) error { +// TraverseAllRulesForPipeline traverses all rules for the given pipeline profile +func TraverseAllRulesForPipeline(p *pb.Profile, fn func(*pb.Profile_Rule) error) error { if err := TraverseRules(p.Repository, fn); err != nil { return fmt.Errorf("error traversing repository rules: %w", err) } @@ -134,7 +134,7 @@ func TraverseAllRulesForPipeline(p *pb.Policy, fn func(*pb.Policy_Rule) error) e // TraverseRules traverses the rules and calls the given function for each rule // TODO: do we want to collect and return _all_ errors, rather than just the first, // to prevent whack-a-mole fixing? -func TraverseRules(rules []*pb.Policy_Rule, fn func(*pb.Policy_Rule) error) error { +func TraverseRules(rules []*pb.Profile_Rule, fn func(*pb.Profile_Rule) error) error { for _, rule := range rules { if err := fn(rule); err != nil { return &RuleValidationError{err.Error(), rule.GetType()} @@ -144,24 +144,24 @@ func TraverseRules(rules []*pb.Policy_Rule, fn func(*pb.Policy_Rule) error) erro return nil } -// MergeDatabaseListIntoPolicies merges the database list policies into the given -// policies map. This assumes that the policies belong to the same group. +// MergeDatabaseListIntoProfiles merges the database list profiles into the given +// profiles map. This assumes that the profiles belong to the same group. // // TODO(jaosorior): This will have to consider the project tree once we migrate to that -func MergeDatabaseListIntoPolicies(ppl []db.ListPoliciesByProjectIDRow, ectx *EntityContext) map[string]*pb.Policy { - policies := map[string]*pb.Policy{} +func MergeDatabaseListIntoProfiles(ppl []db.ListProfilesByProjectIDRow, ectx *EntityContext) map[string]*pb.Profile { + profiles := map[string]*pb.Profile{} for idx := range ppl { p := ppl[idx] // NOTE: names are unique within a given Provider & Project ID (Unique index), // so we don't need to worry about collisions. - // first we check if policy already exists, if not we create a new one - // first we check if policy already exists, if not we create a new one - if _, ok := policies[p.Name]; !ok { - policyID := p.ID.String() - policies[p.Name] = &pb.Policy{ - Id: &policyID, + // first we check if profile already exists, if not we create a new one + // first we check if profile already exists, if not we create a new one + if _, ok := profiles[p.Name]; !ok { + profileID := p.ID.String() + profiles[p.Name] = &pb.Profile{ + Id: &profileID, Name: p.Name, Context: &pb.Context{ Provider: ectx.Provider.Name, @@ -171,23 +171,23 @@ func MergeDatabaseListIntoPolicies(ppl []db.ListPoliciesByProjectIDRow, ectx *En if p.Remediate.Valid { sRem := string(p.Remediate.RemediateType) - policies[p.Name].Remediate = &sRem + profiles[p.Name].Remediate = &sRem } } - if pm := rowInfoToPolicyMap(policies[p.Name], p.Entity, p.ContextualRules); pm != nil { - policies[p.Name] = pm + if pm := rowInfoToProfileMap(profiles[p.Name], p.Entity, p.ContextualRules); pm != nil { + profiles[p.Name] = pm } } - return policies + return profiles } -// MergeDatabaseGetIntoPolicies merges the database get policies into the given -// policies map. This assumes that the policies belong to the same group. +// MergeDatabaseGetIntoProfiles merges the database get profiles into the given +// profiles map. This assumes that the profiles belong to the same group. // // TODO(jaosorior): This will have to consider the project tree once we migrate to that -func MergeDatabaseGetIntoPolicies(ppl []db.GetPolicyByProjectAndIDRow, ectx *EntityContext) map[string]*pb.Policy { - policies := map[string]*pb.Policy{} +func MergeDatabaseGetIntoProfiles(ppl []db.GetProfileByProjectAndIDRow, ectx *EntityContext) map[string]*pb.Profile { + profiles := map[string]*pb.Profile{} for idx := range ppl { p := ppl[idx] @@ -195,11 +195,11 @@ func MergeDatabaseGetIntoPolicies(ppl []db.GetPolicyByProjectAndIDRow, ectx *Ent // NOTE: names are unique within a given Provider & Project ID (Unique index), // so we don't need to worry about collisions. - // first we check if policy already exists, if not we create a new one - if _, ok := policies[p.Name]; !ok { - policyID := p.ID.String() - policies[p.Name] = &pb.Policy{ - Id: &policyID, + // first we check if profile already exists, if not we create a new one + if _, ok := profiles[p.Name]; !ok { + profileID := p.ID.String() + profiles[p.Name] = &pb.Profile{ + Id: &profileID, Name: p.Name, Context: &pb.Context{ Provider: ectx.Provider.Name, @@ -209,32 +209,32 @@ func MergeDatabaseGetIntoPolicies(ppl []db.GetPolicyByProjectAndIDRow, ectx *Ent if p.Remediate.Valid { sRem := string(p.Remediate.RemediateType) - policies[p.Name].Remediate = &sRem + profiles[p.Name].Remediate = &sRem } } - if pm := rowInfoToPolicyMap(policies[p.Name], p.Entity, p.ContextualRules); pm != nil { - policies[p.Name] = pm + if pm := rowInfoToProfileMap(profiles[p.Name], p.Entity, p.ContextualRules); pm != nil { + profiles[p.Name] = pm } } - return policies + return profiles } -// rowInfoToPolicyMap adds the database row information to the given map of -// policies. This assumes that the policies belong to the same group. +// rowInfoToProfileMap adds the database row information to the given map of +// profiles. This assumes that the profiles belong to the same group. // Note that this function is thought to be called from scpecific Merge functions // and thus the logic is targetted to that. -func rowInfoToPolicyMap( - policy *pb.Policy, +func rowInfoToProfileMap( + profile *pb.Profile, entity db.Entities, contextualRules json.RawMessage, -) *pb.Policy { +) *pb.Profile { if !entities.EntityTypeFromDB(entity).IsValid() { log.Printf("unknown entity found in database: %s", entity) return nil } - var ruleset []*pb.Policy_Rule + var ruleset []*pb.Profile_Rule if err := json.Unmarshal(contextualRules, &ruleset); err != nil { // We merely print the error and continue. This is because the user @@ -245,17 +245,17 @@ func rowInfoToPolicyMap( switch entities.EntityTypeFromDB(entity) { case pb.Entity_ENTITY_REPOSITORIES: - policy.Repository = ruleset + profile.Repository = ruleset case pb.Entity_ENTITY_BUILD_ENVIRONMENTS: - policy.BuildEnvironment = ruleset + profile.BuildEnvironment = ruleset case pb.Entity_ENTITY_ARTIFACTS: - policy.Artifact = ruleset + profile.Artifact = ruleset case pb.Entity_ENTITY_PULL_REQUESTS: - policy.PullRequest = ruleset + profile.PullRequest = ruleset case pb.Entity_ENTITY_UNSPECIFIED: // This shouldn't happen log.Printf("unknown entity found in database: %s", entity) } - return policy + return profile } diff --git a/internal/engine/policy_test.go b/internal/engine/profile_test.go similarity index 88% rename from internal/engine/policy_test.go rename to internal/engine/profile_test.go index e04abf1593..d324da7eec 100644 --- a/internal/engine/policy_test.go +++ b/internal/engine/profile_test.go @@ -30,17 +30,17 @@ var ( defaultOrg = "ACME" ) -func comparePolicies(t *testing.T, a *mediatorv1.Policy, b *mediatorv1.Policy) { +func compareProfiles(t *testing.T, a *mediatorv1.Profile, b *mediatorv1.Profile) { t.Helper() - require.Equal(t, a.Name, b.Name, "policy names should match") - require.Equal(t, a.Context, b.Context, "policy contexts should match") + require.Equal(t, a.Name, b.Name, "profile names should match") + require.Equal(t, a.Context, b.Context, "profile contexts should match") compareEntityRules(t, a.Repository, b.Repository) compareEntityRules(t, a.BuildEnvironment, b.BuildEnvironment) compareEntityRules(t, a.Artifact, b.Artifact) } -func compareEntityRules(t *testing.T, a []*mediatorv1.Policy_Rule, b []*mediatorv1.Policy_Rule) { +func compareEntityRules(t *testing.T, a []*mediatorv1.Profile_Rule, b []*mediatorv1.Profile_Rule) { t.Helper() require.Equal(t, len(a), len(b), "rule sets should have the same length") @@ -50,7 +50,7 @@ func compareEntityRules(t *testing.T, a []*mediatorv1.Policy_Rule, b []*mediator } } -func compareRule(t *testing.T, a *mediatorv1.Policy_Rule, b *mediatorv1.Policy_Rule) { +func compareRule(t *testing.T, a *mediatorv1.Profile_Rule, b *mediatorv1.Profile_Rule) { t.Helper() require.Equal(t, a.Type, b.Type, "rule types should match") @@ -109,18 +109,18 @@ func TestParseYAML(t *testing.T) { tests := []struct { name string - policy string - want *mediatorv1.Policy + profile string + want *mediatorv1.Profile wantErr bool errIs error }{ { name: "valid", - policy: ` + profile: ` --- version: v1 -type: policy -name: acme-github-policy +type: profile +name: acme-github-profile context: organization: ACME provider: github @@ -141,13 +141,13 @@ artifact: def: state: exists `, - want: &mediatorv1.Policy{ - Name: "acme-github-policy", + want: &mediatorv1.Profile{ + Name: "acme-github-profile", Context: &mediatorv1.Context{ Organization: &defaultOrg, Provider: "github", }, - Repository: []*mediatorv1.Policy_Rule{ + Repository: []*mediatorv1.Profile_Rule{ { Type: "secret_scanning", Def: &structpb.Struct{ @@ -161,7 +161,7 @@ artifact: }, }, }, - BuildEnvironment: []*mediatorv1.Policy_Rule{ + BuildEnvironment: []*mediatorv1.Profile_Rule{ { Type: "no_org_wide_github_action_permissions", Def: &structpb.Struct{ @@ -175,7 +175,7 @@ artifact: }, }, }, - Artifact: []*mediatorv1.Policy_Rule{ + Artifact: []*mediatorv1.Profile_Rule{ { Type: "ctlog_entry", Params: &structpb.Struct{ @@ -212,11 +212,11 @@ artifact: }, { name: "valid with only repository", - policy: ` + profile: ` --- version: v1 -type: policy -name: acme-github-policy +type: profile +name: acme-github-profile context: organization: ACME provider: github @@ -225,13 +225,13 @@ repository: def: enabled: true `, - want: &mediatorv1.Policy{ - Name: "acme-github-policy", + want: &mediatorv1.Profile{ + Name: "acme-github-profile", Context: &mediatorv1.Context{ Organization: &defaultOrg, Provider: "github", }, - Repository: []*mediatorv1.Policy_Rule{ + Repository: []*mediatorv1.Profile_Rule{ { Type: "secret_scanning", Def: &structpb.Struct{ @@ -249,11 +249,11 @@ repository: }, { name: "invalid because of bad YAML", - policy: ` + profile: ` --- version: v1 -type: policy -name: acme-github-policy +type: profile +name: acme-github-profile context: organization: ACME provider: github @@ -265,11 +265,11 @@ repository: }, { name: "invalid with no definition", - policy: ` + profile: ` --- version: v1 -type: policy -name: acme-github-policy +type: profile +name: acme-github-profile context: organization: ACME provider: github @@ -281,11 +281,11 @@ repository: }, { name: "invalid with nil rule", - policy: ` + profile: ` --- version: v1 -type: policy -name: acme-github-policy +type: profile +name: acme-github-profile context: organization: ACME provider: github @@ -300,10 +300,10 @@ repository: }, { name: "invalid with no name", - policy: ` + profile: ` --- version: v1 -type: policy +type: profile repository: - type: secret_scanning def: @@ -319,7 +319,7 @@ repository: t.Run(tt.name, func(t *testing.T) { t.Parallel() - r := strings.NewReader(tt.policy) + r := strings.NewReader(tt.profile) got, err := engine.ParseYAML(r) if tt.wantErr { @@ -331,7 +331,7 @@ repository: } require.NoError(t, err, "ParseYAML should not have errored") - comparePolicies(t, tt.want, got) + compareProfiles(t, tt.want, got) }) } } @@ -339,13 +339,13 @@ repository: func TestGetRulesForEntity(t *testing.T) { t.Parallel() - pol := &mediatorv1.Policy{ - Name: "acme-github-policy", + pol := &mediatorv1.Profile{ + Name: "acme-github-profile", Context: &mediatorv1.Context{ Organization: &defaultOrg, Provider: "github", }, - Repository: []*mediatorv1.Policy_Rule{ + Repository: []*mediatorv1.Profile_Rule{ { Type: "secret_scanning", Def: &structpb.Struct{ @@ -359,7 +359,7 @@ func TestGetRulesForEntity(t *testing.T) { }, }, }, - BuildEnvironment: []*mediatorv1.Policy_Rule{ + BuildEnvironment: []*mediatorv1.Profile_Rule{ { Type: "no_org_wide_github_action_permissions", Def: &structpb.Struct{ @@ -373,7 +373,7 @@ func TestGetRulesForEntity(t *testing.T) { }, }, }, - Artifact: []*mediatorv1.Policy_Rule{ + Artifact: []*mediatorv1.Profile_Rule{ { Type: "ctlog_entry", Params: &structpb.Struct{ @@ -409,13 +409,13 @@ func TestGetRulesForEntity(t *testing.T) { } type args struct { - p *mediatorv1.Policy + p *mediatorv1.Profile entity mediatorv1.Entity } tests := []struct { name string args args - want []*mediatorv1.Policy_Rule + want []*mediatorv1.Profile_Rule wantErr bool }{ { @@ -424,7 +424,7 @@ func TestGetRulesForEntity(t *testing.T) { p: pol, entity: mediatorv1.Entity_ENTITY_REPOSITORIES, }, - want: []*mediatorv1.Policy_Rule{ + want: []*mediatorv1.Profile_Rule{ { Type: "secret_scanning", Def: &structpb.Struct{ @@ -445,7 +445,7 @@ func TestGetRulesForEntity(t *testing.T) { p: pol, entity: mediatorv1.Entity_ENTITY_BUILD_ENVIRONMENTS, }, - want: []*mediatorv1.Policy_Rule{ + want: []*mediatorv1.Profile_Rule{ { Type: "no_org_wide_github_action_permissions", Def: &structpb.Struct{ @@ -466,7 +466,7 @@ func TestGetRulesForEntity(t *testing.T) { p: pol, entity: mediatorv1.Entity_ENTITY_ARTIFACTS, }, - want: []*mediatorv1.Policy_Rule{ + want: []*mediatorv1.Profile_Rule{ { Type: "ctlog_entry", Params: &structpb.Struct{ @@ -521,7 +521,7 @@ func TestGetRulesForEntity(t *testing.T) { func TestFilterRulesForType(t *testing.T) { t.Parallel() - crs := []*mediatorv1.Policy_Rule{ + crs := []*mediatorv1.Profile_Rule{ { Type: "secret_scanning", Def: &structpb.Struct{ @@ -580,7 +580,7 @@ func TestFilterRulesForType(t *testing.T) { } type args struct { - cr []*mediatorv1.Policy_Rule + cr []*mediatorv1.Profile_Rule rt *mediatorv1.RuleType } tests := []struct { @@ -626,8 +626,8 @@ func TestFilterRulesForType(t *testing.T) { t.Run(tt.name, func(t *testing.T) { t.Parallel() - got := []*mediatorv1.Policy_Rule{} - err := engine.TraverseRules(tt.args.cr, func(pp *mediatorv1.Policy_Rule) error { + got := []*mediatorv1.Profile_Rule{} + err := engine.TraverseRules(tt.args.cr, func(pp *mediatorv1.Profile_Rule) error { if pp.Type == tt.args.rt.Name { got = append(got, pp) } diff --git a/internal/engine/remediate/remediate_test.go b/internal/engine/remediate/remediate_test.go index 1c118ff802..76f0909525 100644 --- a/internal/engine/remediate/remediate_test.go +++ b/internal/engine/remediate/remediate_test.go @@ -79,7 +79,7 @@ func TestNewRuleRemediator(t *testing.T) { Type: rest.RemediateType, Rest: &pb.RestType{ Method: "POST", - Endpoint: "{{.Policy.endpoint}}", + Endpoint: "{{.Profile.endpoint}}", Body: &simpleBodyTemplate, }, }, diff --git a/internal/engine/remediate/rest/rest.go b/internal/engine/remediate/rest/rest.go index 144f438cc5..7e4275fe16 100644 --- a/internal/engine/remediate/rest/rest.go +++ b/internal/engine/remediate/rest/rest.go @@ -98,8 +98,8 @@ func NewRestRemediate( type EndpointTemplateParams struct { // Entity is the entity to be evaluated Entity any - // Policy are the parameters to be used in the template - Policy map[string]any + // Profile are the parameters to be used in the template + Profile map[string]any } // Remediate actually performs the remediation @@ -110,8 +110,8 @@ func (r *Remediator) Remediate( pol map[string]any, ) error { retp := &EndpointTemplateParams{ - Entity: ent, - Policy: pol, + Entity: ent, + Profile: pol, } endpoint := new(bytes.Buffer) diff --git a/internal/engine/remediate/rest/rest_test.go b/internal/engine/remediate/rest/rest_test.go index 7431286503..577bc9b03a 100644 --- a/internal/engine/remediate/rest/rest_test.go +++ b/internal/engine/remediate/rest/rest_test.go @@ -37,7 +37,7 @@ import ( var ( simpleBodyTemplate = "{\"foo\": \"bar\"}" - bodyTemplateWithVars = `{ "enabled": true, "allowed_actions": "{{.Policy.allowed_actions}}" }` + bodyTemplateWithVars = `{ "enabled": true, "allowed_actions": "{{.Profile.allowed_actions}}" }` invalidBodyTemplate = "{\"foo\": {{bar}" validProviderBuilder = providers.NewProviderBuilder( &db.Provider{ diff --git a/internal/engine/rule_types.go b/internal/engine/rule_types.go index a193ce8d85..aa40a75203 100644 --- a/internal/engine/rule_types.go +++ b/internal/engine/rule_types.go @@ -92,10 +92,10 @@ func NewRuleValidator(rt *mediatorv1.RuleType) (*RuleValidator, error) { }, nil } -// ValidateRuleDefAgainstSchema validates the given contextual policy against the +// ValidateRuleDefAgainstSchema validates the given contextual profile against the // schema for this rule type -func (r *RuleValidator) ValidateRuleDefAgainstSchema(contextualPolicy map[string]any) error { - if err := validateAgainstSchema(r.schema, contextualPolicy); err != nil { +func (r *RuleValidator) ValidateRuleDefAgainstSchema(contextualProfile map[string]any) error { + if err := validateAgainstSchema(r.schema, contextualProfile); err != nil { return &RuleValidationError{ RuleType: r.ruleTypeName, Err: err.Error(), @@ -230,7 +230,7 @@ func (r *RuleTypeEngine) GetID() string { } // GetRuleInstanceValidator returns the rule instance validator for this rule type. -// By instance we mean a rule that has been instantiated in a policy from a given rule type. +// By instance we mean a rule that has been instantiated in a profile from a given rule type. func (r *RuleTypeEngine) GetRuleInstanceValidator() *RuleValidator { return r.rval } @@ -285,7 +285,7 @@ func (r *RuleTypeEngine) shouldRemediate(remAction engif.RemediateActionOpt, eva case engif.ActionOptOff: return false, nil case engif.ActionOptUnknown: - return false, errors.New("unknown remediation action, check your policy definition") + return false, errors.New("unknown remediation action, check your profile definition") case engif.ActionOptDryRun, engif.ActionOptOn: runRemediation = !errors.Is(evalErr, evalerrors.ErrEvaluationSkipped) || errors.Is(evalErr, evalerrors.ErrEvaluationSkipSilently) @@ -334,15 +334,15 @@ func RuleTypePBFromDB(rt *db.RuleType, ectx *EntityContext) (*mediatorv1.RuleTyp }, nil } -// GetRulesFromPolicyOfType returns the rules from the policy of the given type -func GetRulesFromPolicyOfType(p *mediatorv1.Policy, rt *mediatorv1.RuleType) ([]*mediatorv1.Policy_Rule, error) { +// GetRulesFromProfileOfType returns the rules from the profile of the given type +func GetRulesFromProfileOfType(p *mediatorv1.Profile, rt *mediatorv1.RuleType) ([]*mediatorv1.Profile_Rule, error) { contextualRules, err := GetRulesForEntity(p, mediatorv1.EntityFromString(rt.Def.InEntity)) if err != nil { return nil, fmt.Errorf("error getting rules for entity: %w", err) } - rules := []*mediatorv1.Policy_Rule{} - err = TraverseRules(contextualRules, func(r *mediatorv1.Policy_Rule) error { + rules := []*mediatorv1.Profile_Rule{} + err = TraverseRules(contextualRules, func(r *mediatorv1.Profile_Rule) error { if r.Type == rt.Name { rules = append(rules, r) } diff --git a/internal/engine/rule_types_test.go b/internal/engine/rule_types_test.go index ced4574a42..1f94004e95 100644 --- a/internal/engine/rule_types_test.go +++ b/internal/engine/rule_types_test.go @@ -29,9 +29,9 @@ import ( func TestExampleRulesAreValidatedCorrectly(t *testing.T) { t.Parallel() - t.Log("parsing example policy") - pol, err := engine.ReadPolicyFromFile("../../examples/github/policies/policy.yaml") - require.NoError(t, err, "failed to parse example policy") + t.Log("parsing example profile") + pol, err := engine.ReadProfileFromFile("../../examples/github/profiles/profile.yaml") + require.NoError(t, err, "failed to parse example profile") // open rules in example directory err = filepath.Walk("../../examples/github/rule-types", func(path string, info os.FileInfo, err error) error { @@ -64,8 +64,8 @@ func TestExampleRulesAreValidatedCorrectly(t *testing.T) { rval, err := engine.NewRuleValidator(rt) require.NoError(t, err, "failed to create rule validator for rule type %s", path) - rules, err := engine.GetRulesFromPolicyOfType(pol, rt) - require.NoError(t, err, "failed to get rules from policy for rule type %s", path) + rules, err := engine.GetRulesFromProfileOfType(pol, rt) + require.NoError(t, err, "failed to get rules from profile for rule type %s", path) t.Log("validating rules") for _, ruleCall := range rules { diff --git a/internal/reconcilers/artifacts.go b/internal/reconcilers/artifacts.go index 5a4a24a835..e025e71be9 100644 --- a/internal/reconcilers/artifacts.go +++ b/internal/reconcilers/artifacts.go @@ -111,7 +111,7 @@ func (e *Reconciler) handleArtifactsReconcilerEvent(ctx context.Context, evt *Re return fmt.Errorf("error building client: %w", err) } - // evaluate policy for repo + // evaluate profile for repo repo := &pb.RepositoryResult{ Owner: repository.RepoOwner, Repository: repository.RepoName, diff --git a/internal/reconcilers/reconcilers.go b/internal/reconcilers/reconcilers.go index d2a6999a13..561164c7e9 100644 --- a/internal/reconcilers/reconcilers.go +++ b/internal/reconcilers/reconcilers.go @@ -26,8 +26,8 @@ import ( const ( // InternalReconcilerEventTopic is the topic for internal reconciler events InternalReconcilerEventTopic = "internal.repo.reconciler.event" - // InternalPolicyInitEventTopic is the topic for internal init events - InternalPolicyInitEventTopic = "internal.policy.init.event" + // InternalProfileInitEventTopic is the topic for internal init events + InternalProfileInitEventTopic = "internal.profile.init.event" ) // Reconciler is a helper that reconciles entities @@ -54,5 +54,5 @@ func NewReconciler(store db.Store, evt *events.Eventer, authCfg *config.AuthConf // Register implements the Consumer interface. func (e *Reconciler) Register(r events.Registrar) { r.Register(InternalReconcilerEventTopic, e.handleRepoReconcilerEvent) - r.Register(InternalPolicyInitEventTopic, e.handlePolicyInitEvent) + r.Register(InternalProfileInitEventTopic, e.handleProfileInitEvent) } diff --git a/internal/reconcilers/run_policy.go b/internal/reconcilers/run_profile.go similarity index 80% rename from internal/reconcilers/run_policy.go rename to internal/reconcilers/run_profile.go index 547cba9551..2306359a2e 100644 --- a/internal/reconcilers/run_policy.go +++ b/internal/reconcilers/run_profile.go @@ -34,18 +34,18 @@ import ( pb "github.com/stacklok/mediator/pkg/api/protobuf/go/mediator/v1" ) -// PolicyInitEvent is an event that is sent to the reconciler topic -// when a new policy is created. It is used to initialize the policy +// ProfileInitEvent is an event that is sent to the reconciler topic +// when a new profile is created. It is used to initialize the profile // by iterating over all registered entities for the relevant group -// and sending a policy evaluation event for each one. -type PolicyInitEvent struct { +// and sending a profile evaluation event for each one. +type ProfileInitEvent struct { // Project is the project that the event is relevant to Project uuid.UUID `json:"project" validate:"gte=0"` } -// NewPolicyInitMessage creates a new repos init event -func NewPolicyInitMessage(provider string, projectID uuid.UUID) (*message.Message, error) { - evt := &PolicyInitEvent{ +// NewProfileInitMessage creates a new repos init event +func NewProfileInitMessage(provider string, projectID uuid.UUID) (*message.Message, error) { + evt := &ProfileInitEvent{ Project: projectID, } @@ -59,13 +59,13 @@ func NewPolicyInitMessage(provider string, projectID uuid.UUID) (*message.Messag return msg, nil } -// handlePolicyInitEvent handles a policy init event. +// handleProfileInitEvent handles a profile init event. // It is responsible for iterating over all registered repositories -// for the group and sending a policy evaluation event for each one. -func (e *Reconciler) handlePolicyInitEvent(msg *message.Message) error { +// for the group and sending a profile evaluation event for each one. +func (e *Reconciler) handleProfileInitEvent(msg *message.Message) error { prov := msg.Metadata.Get("provider") - var evt PolicyInitEvent + var evt ProfileInitEvent if err := json.Unmarshal(msg.Payload, &evt); err != nil { return fmt.Errorf("error unmarshalling payload: %w", err) } @@ -105,18 +105,18 @@ func (e *Reconciler) handlePolicyInitEvent(msg *message.Message) error { } ctx := msg.Context() - log.Printf("handling policy init event for group %d", evt.Project) - if err := e.publishPolicyInitEvents(ctx, ectx); err != nil { + log.Printf("handling profile init event for group %d", evt.Project) + if err := e.publishProfileInitEvents(ctx, ectx); err != nil { // We don't return an error since watermill will retry // the message. - log.Printf("publishPolicyInitEvents: error publishing policy events: %v", err) + log.Printf("publishProfileInitEvents: error publishing profile events: %v", err) return nil } return nil } -func (s *Reconciler) publishPolicyInitEvents( +func (s *Reconciler) publishProfileInitEvents( ctx context.Context, ectx *engine.EntityContext, ) error { @@ -126,7 +126,7 @@ func (s *Reconciler) publishPolicyInitEvents( ProjectID: ectx.Project.ID, }) if err != nil { - return fmt.Errorf("publishPolicyInitEvents: error getting registered repos: %v", err) + return fmt.Errorf("publishProfileInitEvents: error getting registered repos: %v", err) } for _, dbrepo := range dbrepos { @@ -156,20 +156,20 @@ func (s *Reconciler) publishPolicyInitEvents( } } - // after we've initialized repository policies, let's initialize artifacts + // after we've initialized repository profiles, let's initialize artifacts // TODO(jakub): this should be done in an iterator of sorts for i := range dbrepos { pdb := &dbrepos[i] - err := s.publishArtifactPolicyInitEvents(ctx, ectx, pdb) + err := s.publishArtifactProfileInitEvents(ctx, ectx, pdb) if err != nil { - return fmt.Errorf("publishPolicyInitEvents: error publishing artifact events: %v", err) + return fmt.Errorf("publishProfileInitEvents: error publishing artifact events: %v", err) } } return nil } -func (s *Reconciler) publishArtifactPolicyInitEvents( +func (s *Reconciler) publishArtifactProfileInitEvents( ctx context.Context, ectx *engine.EntityContext, dbrepo *db.Repository, diff --git a/pkg/api/openapi/mediator/v1/mediator.swagger.json b/pkg/api/openapi/mediator/v1/mediator.swagger.json index 05b0e059ba..8193dbc290 100644 --- a/pkg/api/openapi/mediator/v1/mediator.swagger.json +++ b/pkg/api/openapi/mediator/v1/mediator.swagger.json @@ -36,7 +36,7 @@ "name": "UserService" }, { - "name": "PolicyService" + "name": "ProfileService" }, { "name": "KeyService" @@ -890,56 +890,14 @@ ] } }, - "/api/v1/policies": { - "get": { - "operationId": "PolicyService_ListPolicies", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1ListPoliciesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "context.provider", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "context.organization", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "context.project", - "in": "query", - "required": false, - "type": "string" - } - ], - "tags": [ - "PolicyService" - ] - } - }, - "/api/v1/policy": { + "/api/v1/profile": { "post": { - "operationId": "PolicyService_CreatePolicy", + "operationId": "ProfileService_CreateProfile", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1CreatePolicyResponse" + "$ref": "#/definitions/v1CreateProfileResponse" } }, "default": { @@ -955,23 +913,23 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/v1CreatePolicyRequest" + "$ref": "#/definitions/v1CreateProfileRequest" } } ], "tags": [ - "PolicyService" + "ProfileService" ] } }, - "/api/v1/policy/name/{name}/status": { + "/api/v1/profile/name/{name}/status": { "get": { - "operationId": "PolicyService_GetPolicyStatusByName", + "operationId": "ProfileService_GetProfileStatusByName", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1GetPolicyStatusByNameResponse" + "$ref": "#/definitions/v1GetProfileStatusByNameResponse" } }, "default": { @@ -984,7 +942,7 @@ "parameters": [ { "name": "name", - "description": "name is the name of the policy to get", + "description": "name is the name of the profile to get", "in": "path", "required": true, "type": "string" @@ -1043,18 +1001,18 @@ } ], "tags": [ - "PolicyService" + "ProfileService" ] } }, - "/api/v1/policy/{id}": { + "/api/v1/profile/{id}": { "get": { - "operationId": "PolicyService_GetPolicyById", + "operationId": "ProfileService_GetProfileById", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1GetPolicyByIdResponse" + "$ref": "#/definitions/v1GetProfileByIdResponse" } }, "default": { @@ -1067,7 +1025,7 @@ "parameters": [ { "name": "id", - "description": "id is the id of the policy to get", + "description": "id is the id of the profile to get", "in": "path", "required": true, "type": "string" @@ -1092,16 +1050,16 @@ } ], "tags": [ - "PolicyService" + "ProfileService" ] }, "delete": { - "operationId": "PolicyService_DeletePolicy", + "operationId": "ProfileService_DeleteProfile", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1DeletePolicyResponse" + "$ref": "#/definitions/v1DeleteProfileResponse" } }, "default": { @@ -1114,7 +1072,7 @@ "parameters": [ { "name": "id", - "description": "id is the id of the policy to delete", + "description": "id is the id of the profile to delete", "in": "path", "required": true, "type": "string" @@ -1139,18 +1097,60 @@ } ], "tags": [ - "PolicyService" + "ProfileService" + ] + } + }, + "/api/v1/profile_status": { + "get": { + "operationId": "ProfileService_GetProfileStatusByProject", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetProfileStatusByProjectResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "context.provider", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "context.organization", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "context.project", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "ProfileService" ] } }, - "/api/v1/policy_status": { + "/api/v1/profiles": { "get": { - "operationId": "PolicyService_GetPolicyStatusByProject", + "operationId": "ProfileService_ListProfiles", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v1GetPolicyStatusByProjectResponse" + "$ref": "#/definitions/v1ListProfilesResponse" } }, "default": { @@ -1181,7 +1181,7 @@ } ], "tags": [ - "PolicyService" + "ProfileService" ] } }, @@ -1847,7 +1847,7 @@ }, "/api/v1/rule_type": { "post": { - "operationId": "PolicyService_CreateRuleType", + "operationId": "ProfileService_CreateRuleType", "responses": { "200": { "description": "A successful response.", @@ -1874,11 +1874,11 @@ } ], "tags": [ - "PolicyService" + "ProfileService" ] }, "put": { - "operationId": "PolicyService_UpdateRuleType", + "operationId": "ProfileService_UpdateRuleType", "responses": { "200": { "description": "A successful response.", @@ -1905,13 +1905,13 @@ } ], "tags": [ - "PolicyService" + "ProfileService" ] } }, "/api/v1/rule_type/name/{name}": { "get": { - "operationId": "PolicyService_GetRuleTypeByName", + "operationId": "ProfileService_GetRuleTypeByName", "responses": { "200": { "description": "A successful response.", @@ -1954,13 +1954,13 @@ } ], "tags": [ - "PolicyService" + "ProfileService" ] } }, "/api/v1/rule_type/{id}": { "get": { - "operationId": "PolicyService_GetRuleTypeById", + "operationId": "ProfileService_GetRuleTypeById", "responses": { "200": { "description": "A successful response.", @@ -2003,11 +2003,11 @@ } ], "tags": [ - "PolicyService" + "ProfileService" ] }, "delete": { - "operationId": "PolicyService_DeleteRuleType", + "operationId": "ProfileService_DeleteRuleType", "responses": { "200": { "description": "A successful response.", @@ -2050,13 +2050,13 @@ } ], "tags": [ - "PolicyService" + "ProfileService" ] } }, "/api/v1/rule_types": { "get": { - "operationId": "PolicyService_ListRuleTypes", + "operationId": "ProfileService_ListRuleTypes", "responses": { "200": { "description": "A successful response.", @@ -2092,7 +2092,7 @@ } ], "tags": [ - "PolicyService" + "ProfileService" ] } }, @@ -2387,7 +2387,7 @@ "type": "object", "$ref": "#/definitions/EvalJQComparison" }, - "description": "jq is only used if the `jq` type is selected.\nIt defines the comparisons that are made between\nthe ingested data and the policy rule." + "description": "jq is only used if the `jq` type is selected.\nIt defines the comparisons that are made between\nthe ingested data and the profile rule." }, "rego": { "$ref": "#/definitions/EvalRego", @@ -2461,9 +2461,9 @@ "$ref": "#/definitions/JQComparisonOperator", "title": "Ingested points to the data retrieved in the `ingest` section" }, - "policy": { + "profile": { "$ref": "#/definitions/JQComparisonOperator", - "description": "Policy points to the policy itself." + "description": "Profile points to the profile itself." } } }, @@ -2472,11 +2472,11 @@ "properties": { "type": { "type": "string", - "description": "type is the type of evaluation engine to use\nfor rego. We currently have two modes of operation:\n- deny-by-default: this is the default mode of operation\n where we deny access by default and allow access only\n if the policy explicitly allows it. It expects the\n policy to set an `allow` variable to true or false.\n- constraints: this is the mode of operation where we\n allow access by default and deny access only if a\n violation is found. It expects the policy to set a\n `violations` variable with a \"msg\" field." + "description": "type is the type of evaluation engine to use\nfor rego. We currently have two modes of operation:\n- deny-by-default: this is the default mode of operation\n where we deny access by default and allow access only\n if the profile explicitly allows it. It expects the\n profile to set an `allow` variable to true or false.\n- constraints: this is the mode of operation where we\n allow access by default and deny access only if a\n violation is found. It expects the profile to set a\n `violations` variable with a \"msg\" field." }, "def": { "type": "string", - "description": "def is the definition of the rego policy." + "description": "def is the definition of the rego profile." } } }, @@ -2493,7 +2493,7 @@ } } }, - "GetPolicyStatusByNameRequestEntityTypedId": { + "GetProfileStatusByNameRequestEntityTypedId": { "type": "object", "properties": { "type": { @@ -2515,7 +2515,7 @@ } } }, - "PolicyRule": { + "ProfileRule": { "type": "object", "properties": { "type": { @@ -2776,20 +2776,20 @@ } } }, - "v1CreatePolicyRequest": { + "v1CreateProfileRequest": { "type": "object", "properties": { - "policy": { - "$ref": "#/definitions/v1Policy" + "profile": { + "$ref": "#/definitions/v1Profile" } }, - "title": "Policy service" + "title": "Profile service" }, - "v1CreatePolicyResponse": { + "v1CreateProfileResponse": { "type": "object", "properties": { - "policy": { - "$ref": "#/definitions/v1Policy" + "profile": { + "$ref": "#/definitions/v1Profile" } } }, @@ -3003,7 +3003,7 @@ "type": "object", "title": "DeleteOrganizationResponse represents a response to a delete organization request" }, - "v1DeletePolicyResponse": { + "v1DeleteProfileResponse": { "type": "object" }, "v1DeleteProjectResponse": { @@ -3168,20 +3168,20 @@ } } }, - "v1GetPolicyByIdResponse": { + "v1GetProfileByIdResponse": { "type": "object", "properties": { - "policy": { - "$ref": "#/definitions/v1Policy" + "profile": { + "$ref": "#/definitions/v1Profile" } } }, - "v1GetPolicyStatusByNameResponse": { + "v1GetProfileStatusByNameResponse": { "type": "object", "properties": { - "policyStatus": { - "$ref": "#/definitions/v1PolicyStatus", - "title": "policy_status is the status of the policy" + "profileStatus": { + "$ref": "#/definitions/v1ProfileStatus", + "title": "profile_status is the status of the profile" }, "ruleEvaluationStatus": { "type": "array", @@ -3193,16 +3193,16 @@ } } }, - "v1GetPolicyStatusByProjectResponse": { + "v1GetProfileStatusByProjectResponse": { "type": "object", "properties": { - "policyStatus": { + "profileStatus": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/v1PolicyStatus" + "$ref": "#/definitions/v1ProfileStatus" }, - "title": "policy_status is the status of the policy" + "title": "profile_status is the status of the profile" } } }, @@ -3492,14 +3492,14 @@ } } }, - "v1ListPoliciesResponse": { + "v1ListProfilesResponse": { "type": "object", "properties": { - "policies": { + "profiles": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/v1Policy" + "$ref": "#/definitions/v1Profile" } } } @@ -3558,48 +3558,48 @@ } } }, - "v1Policy": { + "v1Profile": { "type": "object", "properties": { "context": { "$ref": "#/definitions/mediatorv1Context", - "description": "context is the context in which the policy is evaluated." + "description": "context is the context in which the profile is evaluated." }, "id": { "type": "string", - "description": "id is the id of the policy.\nThis is optional and is set by the system." + "description": "id is the id of the profile.\nThis is optional and is set by the system." }, "name": { "type": "string", - "description": "name is the name of the policy instance." + "description": "name is the name of the profile instance." }, "repository": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/PolicyRule" + "$ref": "#/definitions/ProfileRule" }, - "description": "These are the entities that one could set in the policy." + "description": "These are the entities that one could set in the profile." }, "buildEnvironment": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/PolicyRule" + "$ref": "#/definitions/ProfileRule" } }, "artifact": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/PolicyRule" + "$ref": "#/definitions/ProfileRule" } }, "pullRequest": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/PolicyRule" + "$ref": "#/definitions/ProfileRule" } }, "remediate": { @@ -3607,30 +3607,30 @@ "title": "whether and how to remediate (on,off,dry_run)\nthis is optional as the default is set by the system" } }, - "description": "Policy defines a policy that is user defined." + "description": "Profile defines a profile that is user defined." }, - "v1PolicyStatus": { + "v1ProfileStatus": { "type": "object", "properties": { - "policyId": { + "profileId": { "type": "string", - "title": "policy_id is the id of the policy" + "title": "profile_id is the id of the profile" }, - "policyName": { + "profileName": { "type": "string", - "title": "policy_name is the name of the policy" + "title": "profile_name is the name of the profile" }, - "policyStatus": { + "profileStatus": { "type": "string", - "title": "policy_status is the status of the policy" + "title": "profile_status is the status of the profile" }, "lastUpdated": { "type": "string", "format": "date-time", - "title": "last_updated is the last time the policy was updated" + "title": "last_updated is the last time the profile was updated" } }, - "title": "get the overall policy status" + "title": "get the overall profile status" }, "v1ProjectRecord": { "type": "object", @@ -3904,9 +3904,9 @@ "v1RuleEvaluationStatus": { "type": "object", "properties": { - "policyId": { + "profileId": { "type": "string", - "title": "policy_id is the id of the policy" + "title": "profile_id is the id of the profile" }, "ruleId": { "type": "string", @@ -3927,7 +3927,7 @@ "lastUpdated": { "type": "string", "format": "date-time", - "title": "last_updated is the last time the policy was updated" + "title": "last_updated is the last time the profile was updated" }, "entityInfo": { "type": "object", @@ -3958,7 +3958,7 @@ "title": "remediation_details is the description of the remediation attempt if any" } }, - "title": "get the status of the rules for a given policy" + "title": "get the status of the rules for a given profile" }, "v1RuleType": { "type": "object", diff --git a/pkg/api/protobuf/go/mediator/v1/mediator.pb.go b/pkg/api/protobuf/go/mediator/v1/mediator.pb.go index 86badefc2d..f69f466e2f 100644 --- a/pkg/api/protobuf/go/mediator/v1/mediator.pb.go +++ b/pkg/api/protobuf/go/mediator/v1/mediator.pb.go @@ -7214,17 +7214,17 @@ func (x *GetUserResponse) GetRoles() []*RoleRecord { return nil } -// Policy service -type CreatePolicyRequest struct { +// Profile service +type CreateProfileRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Policy *Policy `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` + Profile *Profile `protobuf:"bytes,1,opt,name=profile,proto3" json:"profile,omitempty"` } -func (x *CreatePolicyRequest) Reset() { - *x = CreatePolicyRequest{} +func (x *CreateProfileRequest) Reset() { + *x = CreateProfileRequest{} if protoimpl.UnsafeEnabled { mi := &file_mediator_v1_mediator_proto_msgTypes[115] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7232,13 +7232,13 @@ func (x *CreatePolicyRequest) Reset() { } } -func (x *CreatePolicyRequest) String() string { +func (x *CreateProfileRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreatePolicyRequest) ProtoMessage() {} +func (*CreateProfileRequest) ProtoMessage() {} -func (x *CreatePolicyRequest) ProtoReflect() protoreflect.Message { +func (x *CreateProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_mediator_v1_mediator_proto_msgTypes[115] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7250,28 +7250,28 @@ func (x *CreatePolicyRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreatePolicyRequest.ProtoReflect.Descriptor instead. -func (*CreatePolicyRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use CreateProfileRequest.ProtoReflect.Descriptor instead. +func (*CreateProfileRequest) Descriptor() ([]byte, []int) { return file_mediator_v1_mediator_proto_rawDescGZIP(), []int{115} } -func (x *CreatePolicyRequest) GetPolicy() *Policy { +func (x *CreateProfileRequest) GetProfile() *Profile { if x != nil { - return x.Policy + return x.Profile } return nil } -type CreatePolicyResponse struct { +type CreateProfileResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Policy *Policy `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` + Profile *Profile `protobuf:"bytes,1,opt,name=profile,proto3" json:"profile,omitempty"` } -func (x *CreatePolicyResponse) Reset() { - *x = CreatePolicyResponse{} +func (x *CreateProfileResponse) Reset() { + *x = CreateProfileResponse{} if protoimpl.UnsafeEnabled { mi := &file_mediator_v1_mediator_proto_msgTypes[116] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7279,13 +7279,13 @@ func (x *CreatePolicyResponse) Reset() { } } -func (x *CreatePolicyResponse) String() string { +func (x *CreateProfileResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreatePolicyResponse) ProtoMessage() {} +func (*CreateProfileResponse) ProtoMessage() {} -func (x *CreatePolicyResponse) ProtoReflect() protoreflect.Message { +func (x *CreateProfileResponse) ProtoReflect() protoreflect.Message { mi := &file_mediator_v1_mediator_proto_msgTypes[116] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7297,31 +7297,31 @@ func (x *CreatePolicyResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreatePolicyResponse.ProtoReflect.Descriptor instead. -func (*CreatePolicyResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use CreateProfileResponse.ProtoReflect.Descriptor instead. +func (*CreateProfileResponse) Descriptor() ([]byte, []int) { return file_mediator_v1_mediator_proto_rawDescGZIP(), []int{116} } -func (x *CreatePolicyResponse) GetPolicy() *Policy { +func (x *CreateProfileResponse) GetProfile() *Profile { if x != nil { - return x.Policy + return x.Profile } return nil } -type DeletePolicyRequest struct { +type DeleteProfileRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // context is the context in which the rule type is evaluated. Context *Context `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` - // id is the id of the policy to delete + // id is the id of the profile to delete Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` } -func (x *DeletePolicyRequest) Reset() { - *x = DeletePolicyRequest{} +func (x *DeleteProfileRequest) Reset() { + *x = DeleteProfileRequest{} if protoimpl.UnsafeEnabled { mi := &file_mediator_v1_mediator_proto_msgTypes[117] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7329,13 +7329,13 @@ func (x *DeletePolicyRequest) Reset() { } } -func (x *DeletePolicyRequest) String() string { +func (x *DeleteProfileRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeletePolicyRequest) ProtoMessage() {} +func (*DeleteProfileRequest) ProtoMessage() {} -func (x *DeletePolicyRequest) ProtoReflect() protoreflect.Message { +func (x *DeleteProfileRequest) ProtoReflect() protoreflect.Message { mi := &file_mediator_v1_mediator_proto_msgTypes[117] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7347,33 +7347,33 @@ func (x *DeletePolicyRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeletePolicyRequest.ProtoReflect.Descriptor instead. -func (*DeletePolicyRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use DeleteProfileRequest.ProtoReflect.Descriptor instead. +func (*DeleteProfileRequest) Descriptor() ([]byte, []int) { return file_mediator_v1_mediator_proto_rawDescGZIP(), []int{117} } -func (x *DeletePolicyRequest) GetContext() *Context { +func (x *DeleteProfileRequest) GetContext() *Context { if x != nil { return x.Context } return nil } -func (x *DeletePolicyRequest) GetId() string { +func (x *DeleteProfileRequest) GetId() string { if x != nil { return x.Id } return "" } -type DeletePolicyResponse struct { +type DeleteProfileResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *DeletePolicyResponse) Reset() { - *x = DeletePolicyResponse{} +func (x *DeleteProfileResponse) Reset() { + *x = DeleteProfileResponse{} if protoimpl.UnsafeEnabled { mi := &file_mediator_v1_mediator_proto_msgTypes[118] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7381,13 +7381,13 @@ func (x *DeletePolicyResponse) Reset() { } } -func (x *DeletePolicyResponse) String() string { +func (x *DeleteProfileResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeletePolicyResponse) ProtoMessage() {} +func (*DeleteProfileResponse) ProtoMessage() {} -func (x *DeletePolicyResponse) ProtoReflect() protoreflect.Message { +func (x *DeleteProfileResponse) ProtoReflect() protoreflect.Message { mi := &file_mediator_v1_mediator_proto_msgTypes[118] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7399,23 +7399,23 @@ func (x *DeletePolicyResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeletePolicyResponse.ProtoReflect.Descriptor instead. -func (*DeletePolicyResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use DeleteProfileResponse.ProtoReflect.Descriptor instead. +func (*DeleteProfileResponse) Descriptor() ([]byte, []int) { return file_mediator_v1_mediator_proto_rawDescGZIP(), []int{118} } -// list policies -type ListPoliciesRequest struct { +// list profiles +type ListProfilesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // context is the context which contains the policies + // context is the context which contains the profiles Context *Context `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` } -func (x *ListPoliciesRequest) Reset() { - *x = ListPoliciesRequest{} +func (x *ListProfilesRequest) Reset() { + *x = ListProfilesRequest{} if protoimpl.UnsafeEnabled { mi := &file_mediator_v1_mediator_proto_msgTypes[119] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7423,13 +7423,13 @@ func (x *ListPoliciesRequest) Reset() { } } -func (x *ListPoliciesRequest) String() string { +func (x *ListProfilesRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListPoliciesRequest) ProtoMessage() {} +func (*ListProfilesRequest) ProtoMessage() {} -func (x *ListPoliciesRequest) ProtoReflect() protoreflect.Message { +func (x *ListProfilesRequest) ProtoReflect() protoreflect.Message { mi := &file_mediator_v1_mediator_proto_msgTypes[119] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7441,28 +7441,28 @@ func (x *ListPoliciesRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListPoliciesRequest.ProtoReflect.Descriptor instead. -func (*ListPoliciesRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ListProfilesRequest.ProtoReflect.Descriptor instead. +func (*ListProfilesRequest) Descriptor() ([]byte, []int) { return file_mediator_v1_mediator_proto_rawDescGZIP(), []int{119} } -func (x *ListPoliciesRequest) GetContext() *Context { +func (x *ListProfilesRequest) GetContext() *Context { if x != nil { return x.Context } return nil } -type ListPoliciesResponse struct { +type ListProfilesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Policies []*Policy `protobuf:"bytes,1,rep,name=policies,proto3" json:"policies,omitempty"` + Profiles []*Profile `protobuf:"bytes,1,rep,name=profiles,proto3" json:"profiles,omitempty"` } -func (x *ListPoliciesResponse) Reset() { - *x = ListPoliciesResponse{} +func (x *ListProfilesResponse) Reset() { + *x = ListProfilesResponse{} if protoimpl.UnsafeEnabled { mi := &file_mediator_v1_mediator_proto_msgTypes[120] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7470,13 +7470,13 @@ func (x *ListPoliciesResponse) Reset() { } } -func (x *ListPoliciesResponse) String() string { +func (x *ListProfilesResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListPoliciesResponse) ProtoMessage() {} +func (*ListProfilesResponse) ProtoMessage() {} -func (x *ListPoliciesResponse) ProtoReflect() protoreflect.Message { +func (x *ListProfilesResponse) ProtoReflect() protoreflect.Message { mi := &file_mediator_v1_mediator_proto_msgTypes[120] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7488,32 +7488,32 @@ func (x *ListPoliciesResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListPoliciesResponse.ProtoReflect.Descriptor instead. -func (*ListPoliciesResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ListProfilesResponse.ProtoReflect.Descriptor instead. +func (*ListProfilesResponse) Descriptor() ([]byte, []int) { return file_mediator_v1_mediator_proto_rawDescGZIP(), []int{120} } -func (x *ListPoliciesResponse) GetPolicies() []*Policy { +func (x *ListProfilesResponse) GetProfiles() []*Profile { if x != nil { - return x.Policies + return x.Profiles } return nil } -// get policy by id -type GetPolicyByIdRequest struct { +// get profile by id +type GetProfileByIdRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // context is the context which contains the policies + // context is the context which contains the profiles Context *Context `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` - // id is the id of the policy to get + // id is the id of the profile to get Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` } -func (x *GetPolicyByIdRequest) Reset() { - *x = GetPolicyByIdRequest{} +func (x *GetProfileByIdRequest) Reset() { + *x = GetProfileByIdRequest{} if protoimpl.UnsafeEnabled { mi := &file_mediator_v1_mediator_proto_msgTypes[121] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7521,13 +7521,13 @@ func (x *GetPolicyByIdRequest) Reset() { } } -func (x *GetPolicyByIdRequest) String() string { +func (x *GetProfileByIdRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetPolicyByIdRequest) ProtoMessage() {} +func (*GetProfileByIdRequest) ProtoMessage() {} -func (x *GetPolicyByIdRequest) ProtoReflect() protoreflect.Message { +func (x *GetProfileByIdRequest) ProtoReflect() protoreflect.Message { mi := &file_mediator_v1_mediator_proto_msgTypes[121] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7539,35 +7539,35 @@ func (x *GetPolicyByIdRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetPolicyByIdRequest.ProtoReflect.Descriptor instead. -func (*GetPolicyByIdRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetProfileByIdRequest.ProtoReflect.Descriptor instead. +func (*GetProfileByIdRequest) Descriptor() ([]byte, []int) { return file_mediator_v1_mediator_proto_rawDescGZIP(), []int{121} } -func (x *GetPolicyByIdRequest) GetContext() *Context { +func (x *GetProfileByIdRequest) GetContext() *Context { if x != nil { return x.Context } return nil } -func (x *GetPolicyByIdRequest) GetId() string { +func (x *GetProfileByIdRequest) GetId() string { if x != nil { return x.Id } return "" } -type GetPolicyByIdResponse struct { +type GetProfileByIdResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Policy *Policy `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"` + Profile *Profile `protobuf:"bytes,1,opt,name=profile,proto3" json:"profile,omitempty"` } -func (x *GetPolicyByIdResponse) Reset() { - *x = GetPolicyByIdResponse{} +func (x *GetProfileByIdResponse) Reset() { + *x = GetProfileByIdResponse{} if protoimpl.UnsafeEnabled { mi := &file_mediator_v1_mediator_proto_msgTypes[122] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7575,13 +7575,13 @@ func (x *GetPolicyByIdResponse) Reset() { } } -func (x *GetPolicyByIdResponse) String() string { +func (x *GetProfileByIdResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetPolicyByIdResponse) ProtoMessage() {} +func (*GetProfileByIdResponse) ProtoMessage() {} -func (x *GetPolicyByIdResponse) ProtoReflect() protoreflect.Message { +func (x *GetProfileByIdResponse) ProtoReflect() protoreflect.Message { mi := &file_mediator_v1_mediator_proto_msgTypes[122] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7593,36 +7593,36 @@ func (x *GetPolicyByIdResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetPolicyByIdResponse.ProtoReflect.Descriptor instead. -func (*GetPolicyByIdResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetProfileByIdResponse.ProtoReflect.Descriptor instead. +func (*GetProfileByIdResponse) Descriptor() ([]byte, []int) { return file_mediator_v1_mediator_proto_rawDescGZIP(), []int{122} } -func (x *GetPolicyByIdResponse) GetPolicy() *Policy { +func (x *GetProfileByIdResponse) GetProfile() *Profile { if x != nil { - return x.Policy + return x.Profile } return nil } -// get the overall policy status -type PolicyStatus struct { +// get the overall profile status +type ProfileStatus struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // policy_id is the id of the policy - PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` - // policy_name is the name of the policy - PolicyName string `protobuf:"bytes,2,opt,name=policy_name,json=policyName,proto3" json:"policy_name,omitempty"` - // policy_status is the status of the policy - PolicyStatus string `protobuf:"bytes,3,opt,name=policy_status,json=policyStatus,proto3" json:"policy_status,omitempty"` - // last_updated is the last time the policy was updated + // profile_id is the id of the profile + ProfileId string `protobuf:"bytes,1,opt,name=profile_id,json=profileId,proto3" json:"profile_id,omitempty"` + // profile_name is the name of the profile + ProfileName string `protobuf:"bytes,2,opt,name=profile_name,json=profileName,proto3" json:"profile_name,omitempty"` + // profile_status is the status of the profile + ProfileStatus string `protobuf:"bytes,3,opt,name=profile_status,json=profileStatus,proto3" json:"profile_status,omitempty"` + // last_updated is the last time the profile was updated LastUpdated *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` } -func (x *PolicyStatus) Reset() { - *x = PolicyStatus{} +func (x *ProfileStatus) Reset() { + *x = ProfileStatus{} if protoimpl.UnsafeEnabled { mi := &file_mediator_v1_mediator_proto_msgTypes[123] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7630,13 +7630,13 @@ func (x *PolicyStatus) Reset() { } } -func (x *PolicyStatus) String() string { +func (x *ProfileStatus) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PolicyStatus) ProtoMessage() {} +func (*ProfileStatus) ProtoMessage() {} -func (x *PolicyStatus) ProtoReflect() protoreflect.Message { +func (x *ProfileStatus) ProtoReflect() protoreflect.Message { mi := &file_mediator_v1_mediator_proto_msgTypes[123] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7648,47 +7648,47 @@ func (x *PolicyStatus) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use PolicyStatus.ProtoReflect.Descriptor instead. -func (*PolicyStatus) Descriptor() ([]byte, []int) { +// Deprecated: Use ProfileStatus.ProtoReflect.Descriptor instead. +func (*ProfileStatus) Descriptor() ([]byte, []int) { return file_mediator_v1_mediator_proto_rawDescGZIP(), []int{123} } -func (x *PolicyStatus) GetPolicyId() string { +func (x *ProfileStatus) GetProfileId() string { if x != nil { - return x.PolicyId + return x.ProfileId } return "" } -func (x *PolicyStatus) GetPolicyName() string { +func (x *ProfileStatus) GetProfileName() string { if x != nil { - return x.PolicyName + return x.ProfileName } return "" } -func (x *PolicyStatus) GetPolicyStatus() string { +func (x *ProfileStatus) GetProfileStatus() string { if x != nil { - return x.PolicyStatus + return x.ProfileStatus } return "" } -func (x *PolicyStatus) GetLastUpdated() *timestamppb.Timestamp { +func (x *ProfileStatus) GetLastUpdated() *timestamppb.Timestamp { if x != nil { return x.LastUpdated } return nil } -// get the status of the rules for a given policy +// get the status of the rules for a given profile type RuleEvaluationStatus struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // policy_id is the id of the policy - PolicyId string `protobuf:"bytes,1,opt,name=policy_id,json=policyId,proto3" json:"policy_id,omitempty"` + // profile_id is the id of the profile + ProfileId string `protobuf:"bytes,1,opt,name=profile_id,json=profileId,proto3" json:"profile_id,omitempty"` // rule_id is the id of the rule RuleId string `protobuf:"bytes,2,opt,name=rule_id,json=ruleId,proto3" json:"rule_id,omitempty"` // rule_name is the name of the rule @@ -7697,7 +7697,7 @@ type RuleEvaluationStatus struct { Entity string `protobuf:"bytes,4,opt,name=entity,proto3" json:"entity,omitempty"` // status is the status of the evaluation Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` - // last_updated is the last time the policy was updated + // last_updated is the last time the profile was updated LastUpdated *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` // entity_info is the information about the entity EntityInfo map[string]string `protobuf:"bytes,7,rep,name=entity_info,json=entityInfo,proto3" json:"entity_info,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` @@ -7745,9 +7745,9 @@ func (*RuleEvaluationStatus) Descriptor() ([]byte, []int) { return file_mediator_v1_mediator_proto_rawDescGZIP(), []int{124} } -func (x *RuleEvaluationStatus) GetPolicyId() string { +func (x *RuleEvaluationStatus) GetProfileId() string { if x != nil { - return x.PolicyId + return x.ProfileId } return "" } @@ -7829,22 +7829,22 @@ func (x *RuleEvaluationStatus) GetRemediationDetails() string { return "" } -type GetPolicyStatusByNameRequest struct { +type GetProfileStatusByNameRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // context is the context in which the rule type is evaluated. Context *Context `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` - // name is the name of the policy to get - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Entity *GetPolicyStatusByNameRequest_EntityTypedId `protobuf:"bytes,3,opt,name=entity,proto3" json:"entity,omitempty"` - All bool `protobuf:"varint,4,opt,name=all,proto3" json:"all,omitempty"` - Rule string `protobuf:"bytes,5,opt,name=rule,proto3" json:"rule,omitempty"` + // name is the name of the profile to get + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Entity *GetProfileStatusByNameRequest_EntityTypedId `protobuf:"bytes,3,opt,name=entity,proto3" json:"entity,omitempty"` + All bool `protobuf:"varint,4,opt,name=all,proto3" json:"all,omitempty"` + Rule string `protobuf:"bytes,5,opt,name=rule,proto3" json:"rule,omitempty"` } -func (x *GetPolicyStatusByNameRequest) Reset() { - *x = GetPolicyStatusByNameRequest{} +func (x *GetProfileStatusByNameRequest) Reset() { + *x = GetProfileStatusByNameRequest{} if protoimpl.UnsafeEnabled { mi := &file_mediator_v1_mediator_proto_msgTypes[125] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7852,13 +7852,13 @@ func (x *GetPolicyStatusByNameRequest) Reset() { } } -func (x *GetPolicyStatusByNameRequest) String() string { +func (x *GetProfileStatusByNameRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetPolicyStatusByNameRequest) ProtoMessage() {} +func (*GetProfileStatusByNameRequest) ProtoMessage() {} -func (x *GetPolicyStatusByNameRequest) ProtoReflect() protoreflect.Message { +func (x *GetProfileStatusByNameRequest) ProtoReflect() protoreflect.Message { mi := &file_mediator_v1_mediator_proto_msgTypes[125] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7870,59 +7870,59 @@ func (x *GetPolicyStatusByNameRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetPolicyStatusByNameRequest.ProtoReflect.Descriptor instead. -func (*GetPolicyStatusByNameRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetProfileStatusByNameRequest.ProtoReflect.Descriptor instead. +func (*GetProfileStatusByNameRequest) Descriptor() ([]byte, []int) { return file_mediator_v1_mediator_proto_rawDescGZIP(), []int{125} } -func (x *GetPolicyStatusByNameRequest) GetContext() *Context { +func (x *GetProfileStatusByNameRequest) GetContext() *Context { if x != nil { return x.Context } return nil } -func (x *GetPolicyStatusByNameRequest) GetName() string { +func (x *GetProfileStatusByNameRequest) GetName() string { if x != nil { return x.Name } return "" } -func (x *GetPolicyStatusByNameRequest) GetEntity() *GetPolicyStatusByNameRequest_EntityTypedId { +func (x *GetProfileStatusByNameRequest) GetEntity() *GetProfileStatusByNameRequest_EntityTypedId { if x != nil { return x.Entity } return nil } -func (x *GetPolicyStatusByNameRequest) GetAll() bool { +func (x *GetProfileStatusByNameRequest) GetAll() bool { if x != nil { return x.All } return false } -func (x *GetPolicyStatusByNameRequest) GetRule() string { +func (x *GetProfileStatusByNameRequest) GetRule() string { if x != nil { return x.Rule } return "" } -type GetPolicyStatusByNameResponse struct { +type GetProfileStatusByNameResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // policy_status is the status of the policy - PolicyStatus *PolicyStatus `protobuf:"bytes,1,opt,name=policy_status,json=policyStatus,proto3" json:"policy_status,omitempty"` + // profile_status is the status of the profile + ProfileStatus *ProfileStatus `protobuf:"bytes,1,opt,name=profile_status,json=profileStatus,proto3" json:"profile_status,omitempty"` // rule_evaluation_status is the status of the rules RuleEvaluationStatus []*RuleEvaluationStatus `protobuf:"bytes,2,rep,name=rule_evaluation_status,json=ruleEvaluationStatus,proto3" json:"rule_evaluation_status,omitempty"` } -func (x *GetPolicyStatusByNameResponse) Reset() { - *x = GetPolicyStatusByNameResponse{} +func (x *GetProfileStatusByNameResponse) Reset() { + *x = GetProfileStatusByNameResponse{} if protoimpl.UnsafeEnabled { mi := &file_mediator_v1_mediator_proto_msgTypes[126] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7930,13 +7930,13 @@ func (x *GetPolicyStatusByNameResponse) Reset() { } } -func (x *GetPolicyStatusByNameResponse) String() string { +func (x *GetProfileStatusByNameResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetPolicyStatusByNameResponse) ProtoMessage() {} +func (*GetProfileStatusByNameResponse) ProtoMessage() {} -func (x *GetPolicyStatusByNameResponse) ProtoReflect() protoreflect.Message { +func (x *GetProfileStatusByNameResponse) ProtoReflect() protoreflect.Message { mi := &file_mediator_v1_mediator_proto_msgTypes[126] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7948,26 +7948,26 @@ func (x *GetPolicyStatusByNameResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetPolicyStatusByNameResponse.ProtoReflect.Descriptor instead. -func (*GetPolicyStatusByNameResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetProfileStatusByNameResponse.ProtoReflect.Descriptor instead. +func (*GetProfileStatusByNameResponse) Descriptor() ([]byte, []int) { return file_mediator_v1_mediator_proto_rawDescGZIP(), []int{126} } -func (x *GetPolicyStatusByNameResponse) GetPolicyStatus() *PolicyStatus { +func (x *GetProfileStatusByNameResponse) GetProfileStatus() *ProfileStatus { if x != nil { - return x.PolicyStatus + return x.ProfileStatus } return nil } -func (x *GetPolicyStatusByNameResponse) GetRuleEvaluationStatus() []*RuleEvaluationStatus { +func (x *GetProfileStatusByNameResponse) GetRuleEvaluationStatus() []*RuleEvaluationStatus { if x != nil { return x.RuleEvaluationStatus } return nil } -type GetPolicyStatusByProjectRequest struct { +type GetProfileStatusByProjectRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -7976,8 +7976,8 @@ type GetPolicyStatusByProjectRequest struct { Context *Context `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` } -func (x *GetPolicyStatusByProjectRequest) Reset() { - *x = GetPolicyStatusByProjectRequest{} +func (x *GetProfileStatusByProjectRequest) Reset() { + *x = GetProfileStatusByProjectRequest{} if protoimpl.UnsafeEnabled { mi := &file_mediator_v1_mediator_proto_msgTypes[127] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7985,13 +7985,13 @@ func (x *GetPolicyStatusByProjectRequest) Reset() { } } -func (x *GetPolicyStatusByProjectRequest) String() string { +func (x *GetProfileStatusByProjectRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetPolicyStatusByProjectRequest) ProtoMessage() {} +func (*GetProfileStatusByProjectRequest) ProtoMessage() {} -func (x *GetPolicyStatusByProjectRequest) ProtoReflect() protoreflect.Message { +func (x *GetProfileStatusByProjectRequest) ProtoReflect() protoreflect.Message { mi := &file_mediator_v1_mediator_proto_msgTypes[127] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -8003,29 +8003,29 @@ func (x *GetPolicyStatusByProjectRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetPolicyStatusByProjectRequest.ProtoReflect.Descriptor instead. -func (*GetPolicyStatusByProjectRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetProfileStatusByProjectRequest.ProtoReflect.Descriptor instead. +func (*GetProfileStatusByProjectRequest) Descriptor() ([]byte, []int) { return file_mediator_v1_mediator_proto_rawDescGZIP(), []int{127} } -func (x *GetPolicyStatusByProjectRequest) GetContext() *Context { +func (x *GetProfileStatusByProjectRequest) GetContext() *Context { if x != nil { return x.Context } return nil } -type GetPolicyStatusByProjectResponse struct { +type GetProfileStatusByProjectResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // policy_status is the status of the policy - PolicyStatus []*PolicyStatus `protobuf:"bytes,1,rep,name=policy_status,json=policyStatus,proto3" json:"policy_status,omitempty"` + // profile_status is the status of the profile + ProfileStatus []*ProfileStatus `protobuf:"bytes,1,rep,name=profile_status,json=profileStatus,proto3" json:"profile_status,omitempty"` } -func (x *GetPolicyStatusByProjectResponse) Reset() { - *x = GetPolicyStatusByProjectResponse{} +func (x *GetProfileStatusByProjectResponse) Reset() { + *x = GetProfileStatusByProjectResponse{} if protoimpl.UnsafeEnabled { mi := &file_mediator_v1_mediator_proto_msgTypes[128] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -8033,13 +8033,13 @@ func (x *GetPolicyStatusByProjectResponse) Reset() { } } -func (x *GetPolicyStatusByProjectResponse) String() string { +func (x *GetProfileStatusByProjectResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetPolicyStatusByProjectResponse) ProtoMessage() {} +func (*GetProfileStatusByProjectResponse) ProtoMessage() {} -func (x *GetPolicyStatusByProjectResponse) ProtoReflect() protoreflect.Message { +func (x *GetProfileStatusByProjectResponse) ProtoReflect() protoreflect.Message { mi := &file_mediator_v1_mediator_proto_msgTypes[128] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -8051,14 +8051,14 @@ func (x *GetPolicyStatusByProjectResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetPolicyStatusByProjectResponse.ProtoReflect.Descriptor instead. -func (*GetPolicyStatusByProjectResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetProfileStatusByProjectResponse.ProtoReflect.Descriptor instead. +func (*GetProfileStatusByProjectResponse) Descriptor() ([]byte, []int) { return file_mediator_v1_mediator_proto_rawDescGZIP(), []int{128} } -func (x *GetPolicyStatusByProjectResponse) GetPolicyStatus() []*PolicyStatus { +func (x *GetProfileStatusByProjectResponse) GetProfileStatus() []*ProfileStatus { if x != nil { - return x.PolicyStatus + return x.ProfileStatus } return nil } @@ -9511,31 +9511,31 @@ func (x *RuleType) GetGuidance() string { return "" } -// Policy defines a policy that is user defined. -type Policy struct { +// Profile defines a profile that is user defined. +type Profile struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // context is the context in which the policy is evaluated. + // context is the context in which the profile is evaluated. Context *Context `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"` - // id is the id of the policy. + // id is the id of the profile. // This is optional and is set by the system. Id *string `protobuf:"bytes,2,opt,name=id,proto3,oneof" json:"id,omitempty"` - // name is the name of the policy instance. + // name is the name of the profile instance. Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - // These are the entities that one could set in the policy. - Repository []*Policy_Rule `protobuf:"bytes,4,rep,name=repository,proto3" json:"repository,omitempty"` - BuildEnvironment []*Policy_Rule `protobuf:"bytes,5,rep,name=build_environment,json=buildEnvironment,proto3" json:"build_environment,omitempty"` - Artifact []*Policy_Rule `protobuf:"bytes,6,rep,name=artifact,proto3" json:"artifact,omitempty"` - PullRequest []*Policy_Rule `protobuf:"bytes,7,rep,name=pull_request,json=pullRequest,proto3" json:"pull_request,omitempty"` + // These are the entities that one could set in the profile. + Repository []*Profile_Rule `protobuf:"bytes,4,rep,name=repository,proto3" json:"repository,omitempty"` + BuildEnvironment []*Profile_Rule `protobuf:"bytes,5,rep,name=build_environment,json=buildEnvironment,proto3" json:"build_environment,omitempty"` + Artifact []*Profile_Rule `protobuf:"bytes,6,rep,name=artifact,proto3" json:"artifact,omitempty"` + PullRequest []*Profile_Rule `protobuf:"bytes,7,rep,name=pull_request,json=pullRequest,proto3" json:"pull_request,omitempty"` // whether and how to remediate (on,off,dry_run) // this is optional as the default is set by the system Remediate *string `protobuf:"bytes,8,opt,name=remediate,proto3,oneof" json:"remediate,omitempty"` } -func (x *Policy) Reset() { - *x = Policy{} +func (x *Profile) Reset() { + *x = Profile{} if protoimpl.UnsafeEnabled { mi := &file_mediator_v1_mediator_proto_msgTypes[155] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -9543,13 +9543,13 @@ func (x *Policy) Reset() { } } -func (x *Policy) String() string { +func (x *Profile) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Policy) ProtoMessage() {} +func (*Profile) ProtoMessage() {} -func (x *Policy) ProtoReflect() protoreflect.Message { +func (x *Profile) ProtoReflect() protoreflect.Message { mi := &file_mediator_v1_mediator_proto_msgTypes[155] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -9561,61 +9561,61 @@ func (x *Policy) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Policy.ProtoReflect.Descriptor instead. -func (*Policy) Descriptor() ([]byte, []int) { +// Deprecated: Use Profile.ProtoReflect.Descriptor instead. +func (*Profile) Descriptor() ([]byte, []int) { return file_mediator_v1_mediator_proto_rawDescGZIP(), []int{155} } -func (x *Policy) GetContext() *Context { +func (x *Profile) GetContext() *Context { if x != nil { return x.Context } return nil } -func (x *Policy) GetId() string { +func (x *Profile) GetId() string { if x != nil && x.Id != nil { return *x.Id } return "" } -func (x *Policy) GetName() string { +func (x *Profile) GetName() string { if x != nil { return x.Name } return "" } -func (x *Policy) GetRepository() []*Policy_Rule { +func (x *Profile) GetRepository() []*Profile_Rule { if x != nil { return x.Repository } return nil } -func (x *Policy) GetBuildEnvironment() []*Policy_Rule { +func (x *Profile) GetBuildEnvironment() []*Profile_Rule { if x != nil { return x.BuildEnvironment } return nil } -func (x *Policy) GetArtifact() []*Policy_Rule { +func (x *Profile) GetArtifact() []*Profile_Rule { if x != nil { return x.Artifact } return nil } -func (x *Policy) GetPullRequest() []*Policy_Rule { +func (x *Profile) GetPullRequest() []*Profile_Rule { if x != nil { return x.PullRequest } return nil } -func (x *Policy) GetRemediate() string { +func (x *Profile) GetRemediate() string { if x != nil && x.Remediate != nil { return *x.Remediate } @@ -9735,7 +9735,7 @@ func (x *PrDependencies_ContextualDependency_FilePatch) GetPatchUrl() string { // EntiryTypeId is a message that carries an ID together with a type to uniquely identify an entity // such as (repo, 1), (artifact, 2), ... // if the struct is reused in other messages, it should be moved to a top-level definition -type GetPolicyStatusByNameRequest_EntityTypedId struct { +type GetProfileStatusByNameRequest_EntityTypedId struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -9746,8 +9746,8 @@ type GetPolicyStatusByNameRequest_EntityTypedId struct { Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` } -func (x *GetPolicyStatusByNameRequest_EntityTypedId) Reset() { - *x = GetPolicyStatusByNameRequest_EntityTypedId{} +func (x *GetProfileStatusByNameRequest_EntityTypedId) Reset() { + *x = GetProfileStatusByNameRequest_EntityTypedId{} if protoimpl.UnsafeEnabled { mi := &file_mediator_v1_mediator_proto_msgTypes[159] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -9755,13 +9755,13 @@ func (x *GetPolicyStatusByNameRequest_EntityTypedId) Reset() { } } -func (x *GetPolicyStatusByNameRequest_EntityTypedId) String() string { +func (x *GetProfileStatusByNameRequest_EntityTypedId) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetPolicyStatusByNameRequest_EntityTypedId) ProtoMessage() {} +func (*GetProfileStatusByNameRequest_EntityTypedId) ProtoMessage() {} -func (x *GetPolicyStatusByNameRequest_EntityTypedId) ProtoReflect() protoreflect.Message { +func (x *GetProfileStatusByNameRequest_EntityTypedId) ProtoReflect() protoreflect.Message { mi := &file_mediator_v1_mediator_proto_msgTypes[159] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -9773,19 +9773,19 @@ func (x *GetPolicyStatusByNameRequest_EntityTypedId) ProtoReflect() protoreflect return mi.MessageOf(x) } -// Deprecated: Use GetPolicyStatusByNameRequest_EntityTypedId.ProtoReflect.Descriptor instead. -func (*GetPolicyStatusByNameRequest_EntityTypedId) Descriptor() ([]byte, []int) { +// Deprecated: Use GetProfileStatusByNameRequest_EntityTypedId.ProtoReflect.Descriptor instead. +func (*GetProfileStatusByNameRequest_EntityTypedId) Descriptor() ([]byte, []int) { return file_mediator_v1_mediator_proto_rawDescGZIP(), []int{125, 0} } -func (x *GetPolicyStatusByNameRequest_EntityTypedId) GetType() Entity { +func (x *GetProfileStatusByNameRequest_EntityTypedId) GetType() Entity { if x != nil { return x.Type } return Entity_ENTITY_UNSPECIFIED } -func (x *GetPolicyStatusByNameRequest_EntityTypedId) GetId() string { +func (x *GetProfileStatusByNameRequest_EntityTypedId) GetId() string { if x != nil { return x.Id } @@ -10168,7 +10168,7 @@ type RuleType_Definition_Eval struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // jq is only used if the `jq` type is selected. // It defines the comparisons that are made between - // the ingested data and the policy rule. + // the ingested data and the profile rule. Jq []*RuleType_Definition_Eval_JQComparison `protobuf:"bytes,2,rep,name=jq,proto3" json:"jq,omitempty"` // rego is only used if the `rego` type is selected. Rego *RuleType_Definition_Eval_Rego `protobuf:"bytes,3,opt,name=rego,proto3,oneof" json:"rego,omitempty"` @@ -10298,8 +10298,8 @@ type RuleType_Definition_Eval_JQComparison struct { // Ingested points to the data retrieved in the `ingest` section Ingested *RuleType_Definition_Eval_JQComparison_Operator `protobuf:"bytes,1,opt,name=ingested,proto3" json:"ingested,omitempty"` - // Policy points to the policy itself. - Policy *RuleType_Definition_Eval_JQComparison_Operator `protobuf:"bytes,2,opt,name=policy,proto3" json:"policy,omitempty"` + // Profile points to the profile itself. + Profile *RuleType_Definition_Eval_JQComparison_Operator `protobuf:"bytes,2,opt,name=profile,proto3" json:"profile,omitempty"` } func (x *RuleType_Definition_Eval_JQComparison) Reset() { @@ -10341,9 +10341,9 @@ func (x *RuleType_Definition_Eval_JQComparison) GetIngested() *RuleType_Definiti return nil } -func (x *RuleType_Definition_Eval_JQComparison) GetPolicy() *RuleType_Definition_Eval_JQComparison_Operator { +func (x *RuleType_Definition_Eval_JQComparison) GetProfile() *RuleType_Definition_Eval_JQComparison_Operator { if x != nil { - return x.Policy + return x.Profile } return nil } @@ -10357,14 +10357,14 @@ type RuleType_Definition_Eval_Rego struct { // for rego. We currently have two modes of operation: // - deny-by-default: this is the default mode of operation // where we deny access by default and allow access only - // if the policy explicitly allows it. It expects the - // policy to set an `allow` variable to true or false. + // if the profile explicitly allows it. It expects the + // profile to set an `allow` variable to true or false. // - constraints: this is the mode of operation where we // allow access by default and deny access only if a - // violation is found. It expects the policy to set a + // violation is found. It expects the profile to set a // `violations` variable with a "msg" field. Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - // def is the definition of the rego policy. + // def is the definition of the rego profile. Def string `protobuf:"bytes,2,opt,name=def,proto3" json:"def,omitempty"` } @@ -10519,7 +10519,7 @@ func (x *RuleType_Definition_Eval_JQComparison_Operator) GetDef() string { } // Rule defines the individual call of a certain rule type. -type Policy_Rule struct { +type Profile_Rule struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -10534,8 +10534,8 @@ type Policy_Rule struct { Def *structpb.Struct `protobuf:"bytes,3,opt,name=def,proto3" json:"def,omitempty"` } -func (x *Policy_Rule) Reset() { - *x = Policy_Rule{} +func (x *Profile_Rule) Reset() { + *x = Profile_Rule{} if protoimpl.UnsafeEnabled { mi := &file_mediator_v1_mediator_proto_msgTypes[171] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10543,13 +10543,13 @@ func (x *Policy_Rule) Reset() { } } -func (x *Policy_Rule) String() string { +func (x *Profile_Rule) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Policy_Rule) ProtoMessage() {} +func (*Profile_Rule) ProtoMessage() {} -func (x *Policy_Rule) ProtoReflect() protoreflect.Message { +func (x *Profile_Rule) ProtoReflect() protoreflect.Message { mi := &file_mediator_v1_mediator_proto_msgTypes[171] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -10561,26 +10561,26 @@ func (x *Policy_Rule) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Policy_Rule.ProtoReflect.Descriptor instead. -func (*Policy_Rule) Descriptor() ([]byte, []int) { +// Deprecated: Use Profile_Rule.ProtoReflect.Descriptor instead. +func (*Profile_Rule) Descriptor() ([]byte, []int) { return file_mediator_v1_mediator_proto_rawDescGZIP(), []int{155, 0} } -func (x *Policy_Rule) GetType() string { +func (x *Profile_Rule) GetType() string { if x != nil { return x.Type } return "" } -func (x *Policy_Rule) GetParams() *structpb.Struct { +func (x *Profile_Rule) GetParams() *structpb.Struct { if x != nil { return x.Params } return nil } -func (x *Policy_Rule) GetDef() *structpb.Struct { +func (x *Profile_Rule) GetDef() *structpb.Struct { if x != nil { return x.Def } @@ -11557,906 +11557,910 @@ var file_mediator_v1_mediator_proto_rawDesc = []byte{ 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x75, 0x73, 0x65, 0x72, - 0x22, 0x42, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x22, 0x43, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x06, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, - 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x55, 0x0a, 0x13, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x22, 0x16, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, - 0x47, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x64, 0x69, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x08, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x22, 0x56, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x46, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, + 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x47, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x22, 0x56, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x64, + 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x45, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x64, + 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x48, 0x0a, 0x14, 0x4c, 0x69, 0x73, + 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x30, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x73, 0x22, 0x57, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x48, 0x0a, 0x16, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x07, 0x70, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x22, 0xb7, 0x01, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x22, 0xfb, 0x04, 0x0a, 0x14, 0x52, 0x75, 0x6c, 0x65, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x75, 0x6c, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x75, 0x6c, 0x65, 0x49, + 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3d, + 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x52, 0x0a, + 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x67, + 0x75, 0x69, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, + 0x75, 0x69, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x6d, 0x65, 0x64, + 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x59, 0x0a, 0x18, 0x72, 0x65, 0x6d, 0x65, 0x64, 0x69, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x16, 0x72, 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x88, 0x01, + 0x01, 0x12, 0x2f, 0x0a, 0x13, 0x72, 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, + 0x72, 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x72, 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x22, 0xa5, + 0x02, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x22, 0x44, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x79, 0x49, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x06, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x64, 0x69, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0xb0, 0x01, 0x0a, 0x0c, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, - 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, - 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x22, 0xf9, 0x04, 0x0a, 0x14, 0x52, 0x75, - 0x6c, 0x65, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x49, 0x64, 0x12, - 0x17, 0x0a, 0x07, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x72, 0x75, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x75, 0x6c, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x75, 0x6c, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x12, 0x52, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6d, 0x65, 0x64, 0x69, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x45, 0x76, 0x61, 0x6c, - 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x45, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x75, 0x69, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2d, - 0x0a, 0x12, 0x72, 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x59, 0x0a, - 0x18, 0x72, 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x73, - 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x16, 0x72, - 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x61, 0x73, 0x74, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x13, 0x72, 0x65, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x45, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x1b, 0x0a, 0x19, 0x5f, 0x72, 0x65, 0x6d, - 0x65, 0x64, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x22, 0xa3, 0x02, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4f, 0x0a, 0x06, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, - 0x64, 0x49, 0x64, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x61, - 0x6c, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x12, 0x12, 0x0a, - 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x75, 0x6c, - 0x65, 0x1a, 0x48, 0x0a, 0x0d, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x64, - 0x49, 0x64, 0x12, 0x27, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x13, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xb8, 0x01, 0x0a, 0x1d, - 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, - 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, - 0x0d, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x0c, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x57, 0x0a, - 0x16, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, - 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x14, 0x72, 0x75, 0x6c, 0x65, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x51, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x50, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x64, 0x49, 0x64, 0x52, 0x06, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x1a, 0x48, 0x0a, 0x0d, + 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x64, 0x49, 0x64, 0x12, 0x27, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xbc, 0x01, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x70, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x70, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x57, 0x0a, 0x16, + 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x65, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x45, + 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x14, 0x72, 0x75, 0x6c, 0x65, 0x45, 0x76, 0x61, 0x6c, 0x75, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x52, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x62, 0x0a, 0x20, 0x47, 0x65, 0x74, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x50, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, - 0x0d, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x0c, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3c, 0x0a, - 0x13, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6b, 0x65, - 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x35, 0x0a, 0x14, 0x47, - 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, - 0x65, 0x79, 0x22, 0x55, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, - 0x61, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, - 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x70, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x22, 0x5d, 0x0a, 0x15, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6b, 0x65, 0x79, 0x49, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x2f, 0x0a, 0x12, 0x52, 0x45, 0x53, 0x54, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x19, - 0x0a, 0x08, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x62, 0x61, 0x73, 0x65, 0x55, 0x72, 0x6c, 0x22, 0x32, 0x0a, 0x14, 0x47, 0x69, 0x74, - 0x48, 0x75, 0x62, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0xab, 0x03, - 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, - 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1d, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x32, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, - 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x03, 0x64, 0x65, 0x66, 0x1a, 0x47, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x1a, 0x9a, - 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, - 0x04, 0x72, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x45, 0x53, 0x54, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x04, - 0x72, 0x65, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x06, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x69, 0x74, 0x48, 0x75, 0x62, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x01, 0x52, 0x06, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x72, 0x65, 0x73, 0x74, - 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x22, 0x8a, 0x01, 0x0a, 0x07, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x6f, 0x72, 0x67, - 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, - 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x88, 0x01, 0x01, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, - 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0x0a, 0x08, - 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x46, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x22, 0x4d, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x0a, 0x72, 0x75, 0x6c, - 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x72, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, - 0x5e, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x79, - 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, - 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, - 0x4f, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x79, - 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x09, - 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, - 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x72, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x22, 0x58, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, - 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4d, 0x0a, 0x17, 0x47, 0x65, - 0x74, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x08, 0x72, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4b, 0x0a, 0x15, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x32, 0x0a, 0x09, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x72, 0x75, - 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4c, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x66, 0x0a, 0x21, 0x47, 0x65, 0x74, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x50, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, + 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x22, 0x3c, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x6b, 0x65, 0x79, 0x5f, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x6b, 0x65, 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, + 0x35, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x55, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4b, 0x65, 0x79, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, + 0x0a, 0x0a, 0x70, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x73, 0x73, 0x70, 0x68, 0x72, 0x61, 0x73, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x22, 0x5d, 0x0a, + 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6b, 0x65, 0x79, 0x5f, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x6b, 0x65, 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x2f, 0x0a, 0x12, + 0x52, 0x45, 0x53, 0x54, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x61, 0x73, 0x65, 0x55, 0x72, 0x6c, 0x22, 0x32, 0x0a, + 0x14, 0x47, 0x69, 0x74, 0x48, 0x75, 0x62, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x22, 0xab, 0x03, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6d, 0x70, 0x6c, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x1a, 0x47, 0x0a, 0x07, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x1a, 0x9a, 0x01, 0x0a, 0x0a, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x38, 0x0a, 0x04, 0x72, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1f, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x45, + 0x53, 0x54, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x48, 0x00, 0x52, 0x04, 0x72, 0x65, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x3e, 0x0a, 0x06, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x69, 0x74, 0x48, 0x75, 0x62, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x01, + 0x52, 0x06, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, + 0x72, 0x65, 0x73, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x22, + 0x8a, 0x01, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, + 0x12, 0x1d, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x01, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x88, 0x01, 0x01, 0x42, + 0x0f, 0x0a, 0x0d, 0x5f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x46, 0x0a, 0x14, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x22, 0x4d, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, + 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, + 0x0a, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x72, 0x75, 0x6c, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x73, 0x22, 0x5e, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x4f, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x72, 0x75, 0x6c, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x22, 0x4b, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x75, - 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, - 0x09, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x72, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x22, 0x4c, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x72, - 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x72, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, - 0x57, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, - 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x17, 0x0a, - 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x62, - 0x6f, 0x64, 0x79, 0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x72, 0x73, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x73, 0x65, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x25, 0x0a, 0x0b, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x0e, 0x0a, 0x0c, - 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x3e, 0x0a, 0x07, - 0x47, 0x69, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x6f, 0x6e, 0x65, - 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x6f, 0x6e, - 0x65, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x22, 0x86, 0x01, 0x0a, - 0x08, 0x44, 0x69, 0x66, 0x66, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3f, 0x0a, 0x0a, 0x65, 0x63, 0x6f, - 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, - 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x0a, - 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x39, 0x0a, 0x09, 0x45, 0x63, - 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, - 0x65, 0x70, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, - 0x70, 0x66, 0x69, 0x6c, 0x65, 0x22, 0xdd, 0x0c, 0x0a, 0x08, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, - 0x52, 0x02, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, - 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x32, 0x0a, 0x03, 0x64, - 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x54, 0x79, 0x70, 0x65, 0x22, 0x58, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, + 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4d, + 0x0a, 0x17, 0x47, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x79, 0x49, + 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x72, 0x75, 0x6c, + 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x08, 0x72, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4b, 0x0a, + 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x09, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x08, 0x72, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4c, 0x0a, 0x16, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, + 0x72, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4b, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x32, 0x0a, 0x09, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x72, 0x75, 0x6c, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4c, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, + 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x32, 0x0a, 0x09, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x72, 0x75, 0x6c, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x22, 0x57, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6c, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x18, 0x0a, 0x16, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, + 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x17, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, + 0x72, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x72, 0x73, 0x65, + 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x25, 0x0a, 0x0b, 0x42, 0x75, 0x69, + 0x6c, 0x74, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x22, 0x0e, 0x0a, 0x0c, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, + 0x22, 0x3e, 0x0a, 0x07, 0x47, 0x69, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x63, + 0x6c, 0x6f, 0x6e, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, + 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, + 0x22, 0x86, 0x01, 0x0a, 0x08, 0x44, 0x69, 0x66, 0x66, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3f, 0x0a, + 0x0a, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x69, 0x66, 0x66, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x45, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x52, 0x0a, 0x65, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x39, + 0x0a, 0x09, 0x45, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x64, 0x65, 0x70, 0x66, 0x69, 0x6c, 0x65, 0x22, 0xdf, 0x0c, 0x0a, 0x08, 0x52, 0x75, + 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, + 0x32, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x2e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, + 0x64, 0x65, 0x66, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x64, 0x61, 0x6e, 0x63, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x75, 0x69, 0x64, 0x61, 0x6e, 0x63, + 0x65, 0x1a, 0x80, 0x0b, 0x0a, 0x0a, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x38, 0x0a, + 0x0b, 0x72, 0x75, 0x6c, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 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, 0x72, 0x75, 0x6c, + 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x3f, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 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, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x53, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x88, 0x01, 0x01, 0x12, 0x3f, 0x0a, 0x06, 0x69, 0x6e, 0x67, 0x65, + 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, - 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x65, 0x66, 0x12, - 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x75, 0x69, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x75, 0x69, 0x64, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0xfe, 0x0a, - 0x0a, 0x0a, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, - 0x69, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x38, 0x0a, 0x0b, 0x72, 0x75, 0x6c, - 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 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, 0x72, 0x75, 0x6c, 0x65, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x12, 0x3f, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5f, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x18, 0x03, 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, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x88, 0x01, 0x01, 0x12, 0x3f, 0x0a, 0x06, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x65, 0x66, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x52, 0x06, 0x69, - 0x6e, 0x67, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x04, 0x65, 0x76, 0x61, 0x6c, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x65, 0x66, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x52, 0x04, 0x65, 0x76, 0x61, 0x6c, - 0x12, 0x48, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x65, 0x66, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x52, - 0x09, 0x72, 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x1a, 0xd1, 0x02, 0x0a, 0x06, 0x49, - 0x6e, 0x67, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x72, 0x65, 0x73, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, - 0x52, 0x04, 0x72, 0x65, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, 0x07, 0x62, 0x75, 0x69, - 0x6c, 0x74, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, - 0x54, 0x79, 0x70, 0x65, 0x48, 0x01, 0x52, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x88, - 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, - 0x02, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2b, - 0x0a, 0x03, 0x67, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x69, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x48, 0x03, 0x52, 0x03, 0x67, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, 0x2e, 0x0a, 0x04, 0x64, - 0x69, 0x66, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x54, 0x79, 0x70, 0x65, - 0x48, 0x04, 0x52, 0x04, 0x64, 0x69, 0x66, 0x66, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x72, 0x65, 0x73, 0x74, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, - 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x42, 0x06, 0x0a, - 0x04, 0x5f, 0x67, 0x69, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x64, 0x69, 0x66, 0x66, 0x1a, 0xd2, - 0x04, 0x0a, 0x04, 0x45, 0x76, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x42, 0x0a, 0x02, 0x6a, - 0x71, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x49, 0x6e, 0x67, 0x65, 0x73, + 0x74, 0x52, 0x06, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x04, 0x65, 0x76, 0x61, + 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x44, - 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x2e, 0x4a, - 0x51, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x52, 0x02, 0x6a, 0x71, 0x12, - 0x43, 0x0a, 0x04, 0x72, 0x65, 0x67, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, - 0x54, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x45, 0x76, 0x61, 0x6c, 0x2e, 0x52, 0x65, 0x67, 0x6f, 0x48, 0x00, 0x52, 0x04, 0x72, 0x65, 0x67, - 0x6f, 0x88, 0x01, 0x01, 0x12, 0x52, 0x0a, 0x09, 0x76, 0x75, 0x6c, 0x6e, 0x63, 0x68, 0x65, 0x63, - 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x52, 0x04, + 0x65, 0x76, 0x61, 0x6c, 0x12, 0x48, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x44, - 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x2e, 0x56, - 0x75, 0x6c, 0x6e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x01, 0x52, 0x09, 0x76, 0x75, 0x6c, 0x6e, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x88, 0x01, 0x01, 0x1a, 0xda, 0x01, 0x0a, 0x0c, 0x4a, 0x51, 0x43, - 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x08, 0x69, 0x6e, 0x67, - 0x65, 0x73, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x6d, 0x65, + 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6d, 0x65, 0x64, 0x69, + 0x61, 0x74, 0x65, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x1a, 0xd1, + 0x02, 0x0a, 0x06, 0x49, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a, + 0x04, 0x72, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x48, 0x00, 0x52, 0x04, 0x72, 0x65, 0x73, 0x74, 0x88, 0x01, 0x01, 0x12, 0x37, 0x0a, + 0x07, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, + 0x6c, 0x74, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x48, 0x01, 0x52, 0x07, 0x62, 0x75, 0x69, 0x6c, + 0x74, 0x69, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x3a, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x48, 0x02, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x2b, 0x0a, 0x03, 0x67, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x69, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x03, 0x52, 0x03, 0x67, 0x69, 0x74, 0x88, 0x01, 0x01, 0x12, + 0x2e, 0x0a, 0x04, 0x64, 0x69, 0x66, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, + 0x54, 0x79, 0x70, 0x65, 0x48, 0x04, 0x52, 0x04, 0x64, 0x69, 0x66, 0x66, 0x88, 0x01, 0x01, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x62, 0x75, 0x69, + 0x6c, 0x74, 0x69, 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x67, 0x69, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x64, 0x69, + 0x66, 0x66, 0x1a, 0xd4, 0x04, 0x0a, 0x04, 0x45, 0x76, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x42, 0x0a, 0x02, 0x6a, 0x71, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x76, - 0x61, 0x6c, 0x2e, 0x4a, 0x51, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x2e, - 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, - 0x65, 0x64, 0x12, 0x53, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x2e, 0x4a, 0x51, 0x43, 0x6f, 0x6d, 0x70, - 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, - 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x1c, 0x0a, 0x08, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x64, 0x65, 0x66, 0x1a, 0x2c, 0x0a, 0x04, 0x52, 0x65, 0x67, 0x6f, 0x12, 0x12, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x64, 0x65, 0x66, 0x1a, 0x37, 0x0a, 0x09, 0x56, 0x75, 0x6c, 0x6e, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x64, 0x62, - 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x72, 0x65, 0x67, 0x6f, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x76, 0x75, 0x6c, 0x6e, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x1a, 0x58, 0x0a, 0x09, 0x52, 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x72, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x04, 0x72, 0x65, 0x73, - 0x74, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x42, 0x0f, 0x0a, - 0x0d, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x42, 0x05, - 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x22, 0x85, 0x04, 0x0a, 0x06, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, - 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x72, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x79, 0x12, 0x45, 0x0a, 0x11, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x65, 0x6e, 0x76, - 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, - 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x10, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x45, - 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x08, 0x61, 0x72, - 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, - 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x12, 0x3b, 0x0a, 0x0c, 0x70, 0x75, 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x75, 0x6c, 0x65, - 0x52, 0x0b, 0x70, 0x75, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, - 0x09, 0x72, 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x01, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, - 0x1a, 0x76, 0x0a, 0x04, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 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, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x29, 0x0a, - 0x03, 0x64, 0x65, 0x66, 0x18, 0x03, 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, 0x03, 0x64, 0x65, 0x66, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x42, - 0x0c, 0x0a, 0x0a, 0x5f, 0x72, 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x2a, 0x7b, 0x0a, - 0x0b, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x18, - 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x4f, 0x42, - 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, - 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x4f, 0x42, 0x4a, - 0x45, 0x43, 0x54, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, - 0x54, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4f, 0x57, - 0x4e, 0x45, 0x52, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x5a, 0x0a, 0x0c, 0x44, 0x65, - 0x70, 0x45, 0x63, 0x6f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x45, - 0x50, 0x5f, 0x45, 0x43, 0x4f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x45, 0x50, - 0x5f, 0x45, 0x43, 0x4f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x4e, 0x50, 0x4d, 0x10, 0x01, - 0x12, 0x14, 0x0a, 0x10, 0x44, 0x45, 0x50, 0x5f, 0x45, 0x43, 0x4f, 0x53, 0x59, 0x53, 0x54, 0x45, - 0x4d, 0x5f, 0x47, 0x4f, 0x10, 0x02, 0x2a, 0x98, 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x45, 0x50, 0x4f, 0x5f, 0x46, 0x49, - 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x48, 0x4f, 0x57, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x45, 0x50, 0x4f, 0x5f, - 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x48, 0x4f, 0x57, 0x5f, 0x41, 0x4c, 0x4c, 0x10, - 0x01, 0x12, 0x28, 0x0a, 0x24, 0x52, 0x45, 0x50, 0x4f, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, - 0x5f, 0x53, 0x48, 0x4f, 0x57, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, - 0x45, 0x52, 0x45, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x24, 0x0a, 0x20, 0x52, - 0x45, 0x50, 0x4f, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x48, 0x4f, 0x57, 0x5f, - 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, - 0x03, 0x2a, 0x88, 0x01, 0x0a, 0x06, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x12, - 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x52, - 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x49, 0x45, 0x53, 0x10, 0x01, 0x12, 0x1d, 0x0a, - 0x19, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x45, 0x4e, - 0x56, 0x49, 0x52, 0x4f, 0x4e, 0x4d, 0x45, 0x4e, 0x54, 0x53, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, - 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x41, 0x52, 0x54, 0x49, 0x46, 0x41, 0x43, 0x54, 0x53, - 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x55, 0x4c, - 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x53, 0x10, 0x04, 0x32, 0x81, 0x01, 0x0a, - 0x0d, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x70, - 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x1f, 0x2e, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, - 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1e, 0xaa, 0xf8, 0x18, 0x04, 0x08, 0x01, 0x10, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, - 0x12, 0x0e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x32, 0x9c, 0x02, 0x0a, 0x0f, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x84, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, - 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x64, 0x69, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, - 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0xaa, - 0xf8, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, - 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x12, 0x81, 0x01, 0x0a, 0x0f, - 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x42, 0x79, 0x49, 0x64, 0x12, - 0x23, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x42, 0x79, - 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0xaa, 0xf8, 0x18, 0x02, - 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x31, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x32, - 0xe8, 0x08, 0x0a, 0x0c, 0x4f, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x8a, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x52, 0x4c, 0x12, 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x61, 0x6c, 0x2e, 0x4a, 0x51, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x52, + 0x02, 0x6a, 0x71, 0x12, 0x43, 0x0a, 0x04, 0x72, 0x65, 0x67, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x2e, 0x52, 0x65, 0x67, 0x6f, 0x48, 0x00, 0x52, + 0x04, 0x72, 0x65, 0x67, 0x6f, 0x88, 0x01, 0x01, 0x12, 0x52, 0x0a, 0x09, 0x76, 0x75, 0x6c, 0x6e, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x2e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x76, + 0x61, 0x6c, 0x2e, 0x56, 0x75, 0x6c, 0x6e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x01, 0x52, 0x09, + 0x76, 0x75, 0x6c, 0x6e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x88, 0x01, 0x01, 0x1a, 0xdc, 0x01, 0x0a, + 0x0c, 0x4a, 0x51, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x12, 0x57, 0x0a, + 0x08, 0x69, 0x6e, 0x67, 0x65, 0x73, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x3b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, + 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x2e, 0x4a, 0x51, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, + 0x73, 0x6f, 0x6e, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x69, 0x6e, + 0x67, 0x65, 0x73, 0x74, 0x65, 0x64, 0x12, 0x55, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x44, + 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x76, 0x61, 0x6c, 0x2e, 0x4a, + 0x51, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x69, 0x73, 0x6f, 0x6e, 0x2e, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x6f, 0x72, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x1a, 0x1c, 0x0a, + 0x08, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x65, 0x66, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x65, 0x66, 0x1a, 0x2c, 0x0a, 0x04, 0x52, + 0x65, 0x67, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x65, 0x66, 0x1a, 0x37, 0x0a, 0x09, 0x56, 0x75, 0x6c, + 0x6e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x62, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x64, 0x62, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x72, 0x65, 0x67, 0x6f, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, + 0x76, 0x75, 0x6c, 0x6e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x1a, 0x58, 0x0a, 0x09, 0x52, 0x65, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x72, 0x65, + 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, + 0x00, 0x52, 0x04, 0x72, 0x65, 0x73, 0x74, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x72, + 0x65, 0x73, 0x74, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5f, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x22, 0x8a, 0x04, 0x0a, 0x07, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x02, 0x69, 0x64, 0x88, 0x01, 0x01, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x39, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, + 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x46, 0x0a, 0x11, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, + 0x65, 0x52, 0x10, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, + 0x52, 0x08, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x70, 0x75, + 0x6c, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x0b, 0x70, 0x75, 0x6c, + 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x09, 0x72, + 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x1a, 0x76, 0x0a, 0x04, 0x52, + 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x18, 0x02, 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, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x29, 0x0a, 0x03, 0x64, 0x65, 0x66, 0x18, + 0x03, 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, 0x03, + 0x64, 0x65, 0x66, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x69, 0x64, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x72, + 0x65, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x2a, 0x7b, 0x0a, 0x0b, 0x4f, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x18, 0x4f, 0x42, 0x4a, 0x45, 0x43, + 0x54, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, + 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4f, + 0x57, 0x4e, 0x45, 0x52, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x02, 0x12, 0x15, + 0x0a, 0x11, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x5f, 0x55, + 0x53, 0x45, 0x52, 0x10, 0x03, 0x2a, 0x5a, 0x0a, 0x0c, 0x44, 0x65, 0x70, 0x45, 0x63, 0x6f, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x45, 0x50, 0x5f, 0x45, 0x43, 0x4f, + 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x45, 0x50, 0x5f, 0x45, 0x43, 0x4f, 0x53, + 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x4e, 0x50, 0x4d, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x44, + 0x45, 0x50, 0x5f, 0x45, 0x43, 0x4f, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x47, 0x4f, 0x10, + 0x02, 0x2a, 0x98, 0x01, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x12, 0x20, 0x0a, 0x1c, 0x52, 0x45, 0x50, 0x4f, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, + 0x53, 0x48, 0x4f, 0x57, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x45, 0x50, 0x4f, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, + 0x52, 0x5f, 0x53, 0x48, 0x4f, 0x57, 0x5f, 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x28, 0x0a, 0x24, + 0x52, 0x45, 0x50, 0x4f, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x48, 0x4f, 0x57, + 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x45, 0x44, 0x5f, + 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x24, 0x0a, 0x20, 0x52, 0x45, 0x50, 0x4f, 0x5f, 0x46, + 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x48, 0x4f, 0x57, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x53, + 0x54, 0x45, 0x52, 0x45, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x03, 0x2a, 0x88, 0x01, 0x0a, + 0x06, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x4e, 0x54, 0x49, 0x54, + 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x17, 0x0a, 0x13, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, + 0x54, 0x4f, 0x52, 0x49, 0x45, 0x53, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x45, 0x4e, 0x54, 0x49, + 0x54, 0x59, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x56, 0x49, 0x52, 0x4f, 0x4e, + 0x4d, 0x45, 0x4e, 0x54, 0x53, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x4e, 0x54, 0x49, 0x54, + 0x59, 0x5f, 0x41, 0x52, 0x54, 0x49, 0x46, 0x41, 0x43, 0x54, 0x53, 0x10, 0x03, 0x12, 0x18, 0x0a, + 0x14, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x55, 0x4c, 0x4c, 0x5f, 0x52, 0x45, 0x51, + 0x55, 0x45, 0x53, 0x54, 0x53, 0x10, 0x04, 0x32, 0x81, 0x01, 0x0a, 0x0d, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x70, 0x0a, 0x0b, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x65, 0x61, 0x6c, + 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x64, 0x69, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x48, 0x65, 0x61, + 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0xaa, 0xf8, 0x18, + 0x04, 0x08, 0x01, 0x10, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x32, 0x9c, 0x02, 0x0a, 0x0f, + 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x84, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x73, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0xaa, 0xf8, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x12, 0x81, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x42, 0x79, 0x49, 0x64, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x64, + 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x72, 0x74, + 0x69, 0x66, 0x61, 0x63, 0x74, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x32, 0xe8, 0x08, 0x0a, 0x0c, 0x4f, + 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8a, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x55, 0x52, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0xaa, 0xf8, 0x18, - 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x75, 0x72, 0x6c, 0x12, 0x90, 0x01, - 0x0a, 0x17, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x46, 0x6f, - 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x4c, 0x49, 0x12, 0x2b, 0x2e, 0x6d, 0x65, 0x64, 0x69, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x43, 0x6f, 0x64, 0x65, 0x46, 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x4c, 0x49, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x32, 0xaa, 0xf8, - 0x18, 0x02, 0x08, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, - 0x6b, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x63, 0x6c, 0x69, - 0x12, 0xa8, 0x01, 0x0a, 0x17, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x64, - 0x65, 0x46, 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x45, 0x42, 0x12, 0x2b, 0x2e, 0x6d, - 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, - 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x46, 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, - 0x45, 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x65, 0x64, 0x69, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x43, 0x6f, 0x64, 0x65, 0x46, 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x45, 0x42, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0xaa, 0xf8, 0x18, 0x02, 0x08, 0x01, 0x82, + 0x55, 0x52, 0x4c, 0x12, 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x55, 0x52, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x52, 0x4c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x61, 0x75, 0x74, 0x68, 0x2f, 0x75, 0x72, 0x6c, 0x12, 0x90, 0x01, 0x0a, 0x17, 0x45, 0x78, 0x63, + 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x46, 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x43, 0x4c, 0x49, 0x12, 0x2b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x46, + 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x43, 0x4c, 0x49, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, + 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x22, 0x32, 0xaa, 0xf8, 0x18, 0x02, 0x08, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x2f, 0x7b, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x77, 0x65, 0x62, 0x12, 0x95, 0x01, 0x0a, 0x12, - 0x53, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x2e, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, - 0x74, 0x68, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x12, 0x8c, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4f, 0x61, - 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x64, 0x69, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4f, 0x61, - 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0xaa, 0xf8, 0x18, 0x02, 0x20, 0x01, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x2d, 0x61, - 0x6c, 0x6c, 0x12, 0xb4, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4f, 0x61, 0x75, - 0x74, 0x68, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2b, - 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, - 0x6f, 0x6b, 0x65, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x65, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x63, 0x6c, 0x69, 0x12, 0xa8, 0x01, 0x0a, 0x17, + 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x46, 0x6f, 0x72, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x45, 0x42, 0x12, 0x2b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, + 0x64, 0x65, 0x46, 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x45, 0x42, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x46, + 0x6f, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x45, 0x42, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x32, 0xaa, 0xf8, 0x18, 0x02, 0x08, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, + 0x12, 0x24, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, + 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x7d, 0x2f, 0x77, 0x65, 0x62, 0x12, 0x95, 0x01, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x72, 0x65, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x26, 0x2e, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, + 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, + 0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x7b, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x8c, + 0x01, 0x0a, 0x11, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, - 0x4f, 0x61, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0xaa, 0xf8, 0x18, 0x04, 0x18, - 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x01, 0x2a, 0x22, 0x2b, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x2f, 0x7b, 0x70, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x17, 0x56, 0x65, - 0x72, 0x69, 0x66, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x2b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x38, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x65, 0x72, - 0x69, 0x66, 0x79, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x7b, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x7d, 0x32, 0xd0, 0x04, 0x0a, 0x0b, 0x41, - 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x61, 0x0a, 0x06, 0x4c, 0x6f, - 0x67, 0x4f, 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, - 0x6f, 0x67, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x79, 0x0a, - 0x0c, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x20, 0x2e, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, - 0x6b, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x24, 0xaa, 0xf8, 0x18, 0x02, 0x20, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, + 0x4f, 0x61, 0x75, 0x74, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x28, 0xaa, 0xf8, 0x18, 0x02, 0x20, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x2f, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x2d, 0x61, 0x6c, 0x6c, 0x12, 0xb4, 0x01, + 0x0a, 0x17, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2b, 0x2e, 0x6d, 0x65, 0x64, 0x69, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4f, 0x61, + 0x75, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4f, 0x61, 0x75, 0x74, 0x68, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x01, 0x2a, 0x22, 0x2b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, + 0x2f, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xae, 0x01, 0x0a, 0x17, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x72, 0x6f, 0x6d, + 0x12, 0x2b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x65, 0x72, 0x69, 0x66, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, + 0x66, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x46, + 0x72, 0x6f, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0xaa, 0xf8, 0x18, + 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2f, 0x7b, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x7b, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x7d, 0x32, 0xd0, 0x04, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x61, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x4f, 0x75, 0x74, 0x12, + 0x1a, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, + 0x67, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x4f, 0x75, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, - 0x68, 0x2f, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x8c, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x76, - 0x6f, 0x6b, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x23, 0x2e, 0x6d, + 0x68, 0x2f, 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x79, 0x0a, 0x0c, 0x52, 0x65, 0x76, 0x6f, + 0x6b, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x65, 0x64, + 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0xaa, + 0xf8, 0x18, 0x02, 0x20, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x72, 0x65, 0x76, + 0x6f, 0x6b, 0x65, 0x12, 0x8c, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x55, 0x73, 0x65, 0x72, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, - 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0xaa, 0xf8, 0x18, 0x02, 0x20, 0x01, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x2f, 0x7b, 0x75, - 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x74, 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65, - 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0x5e, 0x0a, - 0x06, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x1a, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x32, 0xc2, 0x06, - 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x9f, 0x01, 0x0a, 0x10, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, - 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, - 0x63, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x32, 0x3a, 0x01, 0x2a, 0x22, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, - 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, - 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x12, 0xa9, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x26, 0x2e, 0x6d, - 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0xaa, - 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x3a, 0x01, 0x2a, - 0x22, 0x2f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x7b, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x12, 0x97, 0x01, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, - 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x36, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x2a, 0x12, 0x28, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, + 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x2e, 0xaa, 0xf8, 0x18, 0x02, 0x20, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, + 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x7d, 0x12, 0x74, 0x0a, 0x0c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, + 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, + 0x2f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0x5e, 0x0a, 0x06, 0x56, 0x65, 0x72, 0x69, + 0x66, 0x79, 0x12, 0x1a, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, + 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, + 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x32, 0xc2, 0x06, 0x0a, 0x11, 0x52, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x9f, + 0x01, 0x0a, 0x10, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x69, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x65, 0x64, 0x69, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x3e, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x3a, 0x01, + 0x2a, 0x22, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x12, 0x97, 0x01, 0x0a, 0x11, - 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x49, - 0x64, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x49, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x73, 0x79, 0x6e, 0x63, + 0x12, 0xa9, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, + 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x3a, 0x01, 0x2a, 0x22, 0x2f, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2f, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x7d, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x97, 0x01, 0x0a, + 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, + 0x73, 0x12, 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, + 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, + 0x65, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x7b, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x12, 0x97, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x49, 0x64, 0x12, 0x25, 0x2e, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, + 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0xaa, 0xf8, 0x18, + 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x69, 0x64, + 0x2f, 0x7b, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x7d, + 0x12, 0xaa, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x33, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, - 0x72, 0x79, 0x2f, 0x69, 0x64, 0x2f, 0x7b, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, - 0x79, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xaa, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x2e, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, - 0x72, 0x79, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x40, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, - 0x72, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x7b, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x7d, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, - 0x65, 0x7d, 0x32, 0xa6, 0x01, 0x0a, 0x17, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x50, 0x72, 0x6f, - 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8a, - 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x74, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x50, 0x72, - 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x28, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x4e, + 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0xaa, 0xf8, 0x18, + 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x7d, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x32, 0xa6, 0x01, + 0x0a, 0x17, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8a, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1a, 0x12, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, - 0x68, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xf6, 0x05, 0x0a, 0x13, - 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x8c, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, - 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, - 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0xaa, 0xf8, 0x18, - 0x02, 0x20, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x84, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, - 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0xaa, 0xf8, 0x18, 0x02, 0x20, 0x01, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x17, 0x12, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x61, - 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x0f, 0x47, 0x65, - 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, - 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x6e, 0x12, 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x65, 0x64, + 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x72, 0x61, 0x6e, + 0x63, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x70, 0x72, 0x6f, 0x74, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xf6, 0x05, 0x0a, 0x13, 0x4f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8c, + 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0xaa, 0xf8, 0x18, 0x02, 0x20, 0x01, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x84, 0x01, + 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, - 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x7b, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x7d, 0x12, 0x9f, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x2e, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, - 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x23, 0xaa, 0xf8, 0x18, 0x02, 0x20, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x37, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x61, + 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x9f, 0x01, 0x0a, + 0x15, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x2f, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, - 0x12, 0x21, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, - 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, - 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0xaa, 0xf8, 0x18, - 0x02, 0x20, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x2a, 0x19, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, - 0x7b, 0x69, 0x64, 0x7d, 0x32, 0xad, 0x05, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7a, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x22, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, - 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x12, 0x84, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x01, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x8c, 0x01, 0x0a, 0x10, 0x47, - 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x79, - 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0xaa, 0xf8, - 0x18, 0x04, 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6e, 0x61, - 0x6d, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x8a, 0x01, 0x0a, 0x0e, 0x47, 0x65, - 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x79, 0x49, 0x64, 0x12, 0x22, 0x2e, 0x6d, - 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, - 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x23, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x01, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x69, 0x64, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x7c, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, - 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x2a, 0x14, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, - 0x7b, 0x69, 0x64, 0x7d, 0x32, 0xc6, 0x07, 0x0a, 0x0b, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0xa5, 0x01, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, - 0x6f, 0x6c, 0x65, 0x42, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x2c, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x79, 0x4f, 0x72, 0x67, 0x61, - 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2d, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, - 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, - 0x2a, 0x22, 0x19, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, - 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x91, 0x01, 0x0a, - 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x79, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x12, 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x79, 0x50, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, - 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x12, 0x70, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1e, - 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, - 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x21, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x2a, - 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x7b, 0x69, - 0x64, 0x7d, 0x12, 0x78, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x1c, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, + 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xaa, + 0xf8, 0x18, 0x02, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x8e, + 0x01, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0xaa, 0xf8, 0x18, 0x02, 0x20, 0x01, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x1b, 0x2a, 0x19, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, + 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x32, + 0xad, 0x05, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x7a, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0xaa, 0xf8, 0x18, 0x04, + 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x84, + 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, - 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, - 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xaa, 0xf8, 0x18, - 0x04, 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x61, - 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x96, 0x01, 0x0a, - 0x11, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x64, 0x69, + 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x20, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x32, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x24, 0x12, 0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x8c, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x2e, 0x6d, 0x65, 0x64, + 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x25, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x2f, 0x7b, 0x6e, + 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x8a, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x42, 0x79, 0x49, 0x64, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x2f, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, + 0x12, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x2f, 0x69, 0x64, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, + 0x7d, 0x12, 0x7c, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0xaa, 0xf8, 0x18, 0x04, 0x18, + 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x2a, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x32, + 0xc6, 0x07, 0x0a, 0x0b, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0xa5, 0x01, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x79, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x2e, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x6d, 0x65, 0x64, + 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, + 0x6f, 0x6c, 0x65, 0x42, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0xaa, 0xf8, 0x18, 0x04, 0x18, + 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x91, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, + 0x27, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, + 0x65, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x27, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, + 0x6f, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x70, 0x0a, 0x0a, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x64, 0x69, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, + 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x64, 0x69, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x6f, + 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0xaa, 0xf8, 0x18, 0x04, + 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x2a, 0x11, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x78, 0x0a, + 0x08, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, - 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x32, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x24, 0x12, 0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, - 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x73, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, - 0x42, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x01, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x96, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, + 0x6f, 0x6c, 0x65, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x25, 0x2e, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, + 0x6f, 0x6c, 0x65, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0xaa, 0xf8, + 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, + 0x12, 0x73, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x64, 0x12, + 0x1f, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x21, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x13, 0x12, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x6c, 0x65, + 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x80, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, + 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x79, 0x4e, + 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x64, + 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, + 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, + 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x6e, 0x61, 0x6d, + 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x32, 0xf9, 0x07, 0x0a, 0x0b, 0x55, 0x73, 0x65, + 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6e, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x3a, 0x01, 0x2a, 0x22, 0x0c, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x12, 0x70, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, - 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x80, 0x01, 0x0a, 0x0d, 0x47, - 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x2e, 0x6d, - 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, - 0x6c, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x22, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x28, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x6f, 0x6c, - 0x65, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x32, 0xf9, 0x07, - 0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6e, 0x0a, - 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0xaa, 0xf8, - 0x18, 0x04, 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x3a, 0x01, 0x2a, 0x22, - 0x0c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x12, 0x70, 0x0a, - 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x65, - 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0xaa, 0xf8, - 0x18, 0x04, 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x2a, 0x11, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, - 0x64, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x1c, 0x2e, 0x6d, 0x65, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x2a, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, + 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x64, 0x0a, 0x08, 0x47, 0x65, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x1c, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x1b, 0xaa, 0xf8, 0x18, 0x02, 0x20, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x0f, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, + 0x12, 0xa2, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x42, 0x79, 0x4f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, - 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x65, 0x64, 0x69, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0xaa, 0xf8, 0x18, 0x02, 0x20, 0x01, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, - 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0xa2, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x42, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x2a, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x42, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, - 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, - 0x65, 0x72, 0x73, 0x42, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xaa, 0xf8, 0x18, 0x04, 0x18, - 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x11, 0x47, - 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x42, 0x79, - 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2a, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, - 0x1a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x78, 0x0a, 0x0b, 0x47, - 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x64, - 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, - 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x65, + 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, + 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, - 0x72, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0xaa, - 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x03, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x75, 0x73, 0x65, - 0x72, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x8f, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, - 0x72, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x2e, 0x6d, 0x65, 0x64, + 0x72, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0xaa, 0xf8, 0x18, 0x04, + 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x78, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x42, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x64, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, + 0x28, 0x03, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x7d, + 0x12, 0x8f, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6d, 0x65, + 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x2e, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x01, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, + 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x7d, 0x12, 0x60, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1b, 0x2e, + 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, - 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x25, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, - 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, - 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x12, 0x60, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, - 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1c, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0xaa, - 0xf8, 0x18, 0x02, 0x28, 0x03, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x32, 0xc3, 0x0c, 0x0a, 0x0d, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x76, 0x0a, 0x0c, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x20, 0x2e, 0x6d, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x03, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x75, 0x73, 0x65, 0x72, 0x32, 0xd8, 0x0c, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7a, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x21, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, - 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x12, 0x78, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, - 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x2a, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x73, 0x0a, - 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x20, 0x2e, - 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x1e, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, - 0x12, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, - 0x65, 0x73, 0x12, 0x73, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, - 0x79, 0x49, 0x64, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x79, 0x49, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x79, - 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x15, 0x12, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9f, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x29, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, - 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, - 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, - 0x65, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x9c, 0x01, 0x0a, 0x18, 0x47, 0x65, - 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x50, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2c, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x23, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x17, 0x12, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x78, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, + 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x22, 0xaa, 0xf8, 0x18, 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, + 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x12, 0x7c, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0xaa, 0xf8, 0x18, + 0x04, 0x18, 0x01, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x2a, 0x14, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2f, 0x7b, 0x69, 0x64, + 0x7d, 0x12, 0x73, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, + 0x73, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x77, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x64, 0x12, 0x22, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, + 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, + 0xa3, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x2e, 0x6d, 0x65, 0x64, + 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, + 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x30, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x24, 0x12, 0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, + 0x6c, 0x65, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0xa0, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x12, 0x2d, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x42, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x24, 0xaa, 0xf8, 0x18, 0x02, 0x28, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, + 0x12, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x78, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, @@ -12667,20 +12671,20 @@ var file_mediator_v1_mediator_proto_goTypes = []interface{}{ (*GetUserBySubjectResponse)(nil), // 116: mediator.v1.GetUserBySubjectResponse (*GetUserRequest)(nil), // 117: mediator.v1.GetUserRequest (*GetUserResponse)(nil), // 118: mediator.v1.GetUserResponse - (*CreatePolicyRequest)(nil), // 119: mediator.v1.CreatePolicyRequest - (*CreatePolicyResponse)(nil), // 120: mediator.v1.CreatePolicyResponse - (*DeletePolicyRequest)(nil), // 121: mediator.v1.DeletePolicyRequest - (*DeletePolicyResponse)(nil), // 122: mediator.v1.DeletePolicyResponse - (*ListPoliciesRequest)(nil), // 123: mediator.v1.ListPoliciesRequest - (*ListPoliciesResponse)(nil), // 124: mediator.v1.ListPoliciesResponse - (*GetPolicyByIdRequest)(nil), // 125: mediator.v1.GetPolicyByIdRequest - (*GetPolicyByIdResponse)(nil), // 126: mediator.v1.GetPolicyByIdResponse - (*PolicyStatus)(nil), // 127: mediator.v1.PolicyStatus + (*CreateProfileRequest)(nil), // 119: mediator.v1.CreateProfileRequest + (*CreateProfileResponse)(nil), // 120: mediator.v1.CreateProfileResponse + (*DeleteProfileRequest)(nil), // 121: mediator.v1.DeleteProfileRequest + (*DeleteProfileResponse)(nil), // 122: mediator.v1.DeleteProfileResponse + (*ListProfilesRequest)(nil), // 123: mediator.v1.ListProfilesRequest + (*ListProfilesResponse)(nil), // 124: mediator.v1.ListProfilesResponse + (*GetProfileByIdRequest)(nil), // 125: mediator.v1.GetProfileByIdRequest + (*GetProfileByIdResponse)(nil), // 126: mediator.v1.GetProfileByIdResponse + (*ProfileStatus)(nil), // 127: mediator.v1.ProfileStatus (*RuleEvaluationStatus)(nil), // 128: mediator.v1.RuleEvaluationStatus - (*GetPolicyStatusByNameRequest)(nil), // 129: mediator.v1.GetPolicyStatusByNameRequest - (*GetPolicyStatusByNameResponse)(nil), // 130: mediator.v1.GetPolicyStatusByNameResponse - (*GetPolicyStatusByProjectRequest)(nil), // 131: mediator.v1.GetPolicyStatusByProjectRequest - (*GetPolicyStatusByProjectResponse)(nil), // 132: mediator.v1.GetPolicyStatusByProjectResponse + (*GetProfileStatusByNameRequest)(nil), // 129: mediator.v1.GetProfileStatusByNameRequest + (*GetProfileStatusByNameResponse)(nil), // 130: mediator.v1.GetProfileStatusByNameResponse + (*GetProfileStatusByProjectRequest)(nil), // 131: mediator.v1.GetProfileStatusByProjectRequest + (*GetProfileStatusByProjectResponse)(nil), // 132: mediator.v1.GetProfileStatusByProjectResponse (*GetPublicKeyRequest)(nil), // 133: mediator.v1.GetPublicKeyRequest (*GetPublicKeyResponse)(nil), // 134: mediator.v1.GetPublicKeyResponse (*CreateKeyPairRequest)(nil), // 135: mediator.v1.CreateKeyPairRequest @@ -12707,11 +12711,11 @@ var file_mediator_v1_mediator_proto_goTypes = []interface{}{ (*GitType)(nil), // 156: mediator.v1.GitType (*DiffType)(nil), // 157: mediator.v1.DiffType (*RuleType)(nil), // 158: mediator.v1.RuleType - (*Policy)(nil), // 159: mediator.v1.Policy + (*Profile)(nil), // 159: mediator.v1.Profile (*PrDependencies_ContextualDependency)(nil), // 160: mediator.v1.PrDependencies.ContextualDependency (*PrDependencies_ContextualDependency_FilePatch)(nil), // 161: mediator.v1.PrDependencies.ContextualDependency.FilePatch nil, // 162: mediator.v1.RuleEvaluationStatus.EntityInfoEntry - (*GetPolicyStatusByNameRequest_EntityTypedId)(nil), // 163: mediator.v1.GetPolicyStatusByNameRequest.EntityTypedId + (*GetProfileStatusByNameRequest_EntityTypedId)(nil), // 163: mediator.v1.GetProfileStatusByNameRequest.EntityTypedId (*Provider_Context)(nil), // 164: mediator.v1.Provider.Context (*Provider_Definition)(nil), // 165: mediator.v1.Provider.Definition (*DiffType_Ecosystem)(nil), // 166: mediator.v1.DiffType.Ecosystem @@ -12723,7 +12727,7 @@ var file_mediator_v1_mediator_proto_goTypes = []interface{}{ (*RuleType_Definition_Eval_Rego)(nil), // 172: mediator.v1.RuleType.Definition.Eval.Rego (*RuleType_Definition_Eval_Vulncheck)(nil), // 173: mediator.v1.RuleType.Definition.Eval.Vulncheck (*RuleType_Definition_Eval_JQComparison_Operator)(nil), // 174: mediator.v1.RuleType.Definition.Eval.JQComparison.Operator - (*Policy_Rule)(nil), // 175: mediator.v1.Policy.Rule + (*Profile_Rule)(nil), // 175: mediator.v1.Profile.Rule (*timestamppb.Timestamp)(nil), // 176: google.protobuf.Timestamp (*wrapperspb.StringValue)(nil), // 177: google.protobuf.StringValue (*structpb.Struct)(nil), // 178: google.protobuf.Struct @@ -12813,23 +12817,23 @@ var file_mediator_v1_mediator_proto_depIdxs = []int32{ 106, // 79: mediator.v1.GetUserResponse.user:type_name -> mediator.v1.UserRecord 80, // 80: mediator.v1.GetUserResponse.projects:type_name -> mediator.v1.ProjectRecord 93, // 81: mediator.v1.GetUserResponse.roles:type_name -> mediator.v1.RoleRecord - 159, // 82: mediator.v1.CreatePolicyRequest.policy:type_name -> mediator.v1.Policy - 159, // 83: mediator.v1.CreatePolicyResponse.policy:type_name -> mediator.v1.Policy - 140, // 84: mediator.v1.DeletePolicyRequest.context:type_name -> mediator.v1.Context - 140, // 85: mediator.v1.ListPoliciesRequest.context:type_name -> mediator.v1.Context - 159, // 86: mediator.v1.ListPoliciesResponse.policies:type_name -> mediator.v1.Policy - 140, // 87: mediator.v1.GetPolicyByIdRequest.context:type_name -> mediator.v1.Context - 159, // 88: mediator.v1.GetPolicyByIdResponse.policy:type_name -> mediator.v1.Policy - 176, // 89: mediator.v1.PolicyStatus.last_updated:type_name -> google.protobuf.Timestamp + 159, // 82: mediator.v1.CreateProfileRequest.profile:type_name -> mediator.v1.Profile + 159, // 83: mediator.v1.CreateProfileResponse.profile:type_name -> mediator.v1.Profile + 140, // 84: mediator.v1.DeleteProfileRequest.context:type_name -> mediator.v1.Context + 140, // 85: mediator.v1.ListProfilesRequest.context:type_name -> mediator.v1.Context + 159, // 86: mediator.v1.ListProfilesResponse.profiles:type_name -> mediator.v1.Profile + 140, // 87: mediator.v1.GetProfileByIdRequest.context:type_name -> mediator.v1.Context + 159, // 88: mediator.v1.GetProfileByIdResponse.profile:type_name -> mediator.v1.Profile + 176, // 89: mediator.v1.ProfileStatus.last_updated:type_name -> google.protobuf.Timestamp 176, // 90: mediator.v1.RuleEvaluationStatus.last_updated:type_name -> google.protobuf.Timestamp 162, // 91: mediator.v1.RuleEvaluationStatus.entity_info:type_name -> mediator.v1.RuleEvaluationStatus.EntityInfoEntry 176, // 92: mediator.v1.RuleEvaluationStatus.remediation_last_updated:type_name -> google.protobuf.Timestamp - 140, // 93: mediator.v1.GetPolicyStatusByNameRequest.context:type_name -> mediator.v1.Context - 163, // 94: mediator.v1.GetPolicyStatusByNameRequest.entity:type_name -> mediator.v1.GetPolicyStatusByNameRequest.EntityTypedId - 127, // 95: mediator.v1.GetPolicyStatusByNameResponse.policy_status:type_name -> mediator.v1.PolicyStatus - 128, // 96: mediator.v1.GetPolicyStatusByNameResponse.rule_evaluation_status:type_name -> mediator.v1.RuleEvaluationStatus - 140, // 97: mediator.v1.GetPolicyStatusByProjectRequest.context:type_name -> mediator.v1.Context - 127, // 98: mediator.v1.GetPolicyStatusByProjectResponse.policy_status:type_name -> mediator.v1.PolicyStatus + 140, // 93: mediator.v1.GetProfileStatusByNameRequest.context:type_name -> mediator.v1.Context + 163, // 94: mediator.v1.GetProfileStatusByNameRequest.entity:type_name -> mediator.v1.GetProfileStatusByNameRequest.EntityTypedId + 127, // 95: mediator.v1.GetProfileStatusByNameResponse.profile_status:type_name -> mediator.v1.ProfileStatus + 128, // 96: mediator.v1.GetProfileStatusByNameResponse.rule_evaluation_status:type_name -> mediator.v1.RuleEvaluationStatus + 140, // 97: mediator.v1.GetProfileStatusByProjectRequest.context:type_name -> mediator.v1.Context + 127, // 98: mediator.v1.GetProfileStatusByProjectResponse.profile_status:type_name -> mediator.v1.ProfileStatus 164, // 99: mediator.v1.Provider.context:type_name -> mediator.v1.Provider.Context 165, // 100: mediator.v1.Provider.def:type_name -> mediator.v1.Provider.Definition 140, // 101: mediator.v1.ListRuleTypesRequest.context:type_name -> mediator.v1.Context @@ -12846,14 +12850,14 @@ var file_mediator_v1_mediator_proto_depIdxs = []int32{ 166, // 112: mediator.v1.DiffType.ecosystems:type_name -> mediator.v1.DiffType.Ecosystem 140, // 113: mediator.v1.RuleType.context:type_name -> mediator.v1.Context 167, // 114: mediator.v1.RuleType.def:type_name -> mediator.v1.RuleType.Definition - 140, // 115: mediator.v1.Policy.context:type_name -> mediator.v1.Context - 175, // 116: mediator.v1.Policy.repository:type_name -> mediator.v1.Policy.Rule - 175, // 117: mediator.v1.Policy.build_environment:type_name -> mediator.v1.Policy.Rule - 175, // 118: mediator.v1.Policy.artifact:type_name -> mediator.v1.Policy.Rule - 175, // 119: mediator.v1.Policy.pull_request:type_name -> mediator.v1.Policy.Rule + 140, // 115: mediator.v1.Profile.context:type_name -> mediator.v1.Context + 175, // 116: mediator.v1.Profile.repository:type_name -> mediator.v1.Profile.Rule + 175, // 117: mediator.v1.Profile.build_environment:type_name -> mediator.v1.Profile.Rule + 175, // 118: mediator.v1.Profile.artifact:type_name -> mediator.v1.Profile.Rule + 175, // 119: mediator.v1.Profile.pull_request:type_name -> mediator.v1.Profile.Rule 14, // 120: mediator.v1.PrDependencies.ContextualDependency.dep:type_name -> mediator.v1.Dependency 161, // 121: mediator.v1.PrDependencies.ContextualDependency.file:type_name -> mediator.v1.PrDependencies.ContextualDependency.FilePatch - 3, // 122: mediator.v1.GetPolicyStatusByNameRequest.EntityTypedId.type:type_name -> mediator.v1.Entity + 3, // 122: mediator.v1.GetProfileStatusByNameRequest.EntityTypedId.type:type_name -> mediator.v1.Entity 137, // 123: mediator.v1.Provider.Definition.rest:type_name -> mediator.v1.RESTProviderConfig 138, // 124: mediator.v1.Provider.Definition.github:type_name -> mediator.v1.GitHubProviderConfig 178, // 125: mediator.v1.RuleType.Definition.rule_schema:type_name -> google.protobuf.Struct @@ -12871,9 +12875,9 @@ var file_mediator_v1_mediator_proto_depIdxs = []int32{ 173, // 137: mediator.v1.RuleType.Definition.Eval.vulncheck:type_name -> mediator.v1.RuleType.Definition.Eval.Vulncheck 153, // 138: mediator.v1.RuleType.Definition.Remediate.rest:type_name -> mediator.v1.RestType 174, // 139: mediator.v1.RuleType.Definition.Eval.JQComparison.ingested:type_name -> mediator.v1.RuleType.Definition.Eval.JQComparison.Operator - 174, // 140: mediator.v1.RuleType.Definition.Eval.JQComparison.policy:type_name -> mediator.v1.RuleType.Definition.Eval.JQComparison.Operator - 178, // 141: mediator.v1.Policy.Rule.params:type_name -> google.protobuf.Struct - 178, // 142: mediator.v1.Policy.Rule.def:type_name -> google.protobuf.Struct + 174, // 140: mediator.v1.RuleType.Definition.Eval.JQComparison.profile:type_name -> mediator.v1.RuleType.Definition.Eval.JQComparison.Operator + 178, // 141: mediator.v1.Profile.Rule.params:type_name -> google.protobuf.Struct + 178, // 142: mediator.v1.Profile.Rule.def:type_name -> google.protobuf.Struct 179, // 143: mediator.v1.rpc_options:extendee -> google.protobuf.MethodOptions 4, // 144: mediator.v1.rpc_options:type_name -> mediator.v1.RpcOptions 16, // 145: mediator.v1.HealthService.CheckHealth:input_type -> mediator.v1.CheckHealthRequest @@ -12922,18 +12926,18 @@ var file_mediator_v1_mediator_proto_depIdxs = []int32{ 113, // 188: mediator.v1.UserService.GetUserById:input_type -> mediator.v1.GetUserByIdRequest 115, // 189: mediator.v1.UserService.GetUserBySubject:input_type -> mediator.v1.GetUserBySubjectRequest 117, // 190: mediator.v1.UserService.GetUser:input_type -> mediator.v1.GetUserRequest - 119, // 191: mediator.v1.PolicyService.CreatePolicy:input_type -> mediator.v1.CreatePolicyRequest - 121, // 192: mediator.v1.PolicyService.DeletePolicy:input_type -> mediator.v1.DeletePolicyRequest - 123, // 193: mediator.v1.PolicyService.ListPolicies:input_type -> mediator.v1.ListPoliciesRequest - 125, // 194: mediator.v1.PolicyService.GetPolicyById:input_type -> mediator.v1.GetPolicyByIdRequest - 129, // 195: mediator.v1.PolicyService.GetPolicyStatusByName:input_type -> mediator.v1.GetPolicyStatusByNameRequest - 131, // 196: mediator.v1.PolicyService.GetPolicyStatusByProject:input_type -> mediator.v1.GetPolicyStatusByProjectRequest - 141, // 197: mediator.v1.PolicyService.ListRuleTypes:input_type -> mediator.v1.ListRuleTypesRequest - 143, // 198: mediator.v1.PolicyService.GetRuleTypeByName:input_type -> mediator.v1.GetRuleTypeByNameRequest - 145, // 199: mediator.v1.PolicyService.GetRuleTypeById:input_type -> mediator.v1.GetRuleTypeByIdRequest - 147, // 200: mediator.v1.PolicyService.CreateRuleType:input_type -> mediator.v1.CreateRuleTypeRequest - 149, // 201: mediator.v1.PolicyService.UpdateRuleType:input_type -> mediator.v1.UpdateRuleTypeRequest - 151, // 202: mediator.v1.PolicyService.DeleteRuleType:input_type -> mediator.v1.DeleteRuleTypeRequest + 119, // 191: mediator.v1.ProfileService.CreateProfile:input_type -> mediator.v1.CreateProfileRequest + 121, // 192: mediator.v1.ProfileService.DeleteProfile:input_type -> mediator.v1.DeleteProfileRequest + 123, // 193: mediator.v1.ProfileService.ListProfiles:input_type -> mediator.v1.ListProfilesRequest + 125, // 194: mediator.v1.ProfileService.GetProfileById:input_type -> mediator.v1.GetProfileByIdRequest + 129, // 195: mediator.v1.ProfileService.GetProfileStatusByName:input_type -> mediator.v1.GetProfileStatusByNameRequest + 131, // 196: mediator.v1.ProfileService.GetProfileStatusByProject:input_type -> mediator.v1.GetProfileStatusByProjectRequest + 141, // 197: mediator.v1.ProfileService.ListRuleTypes:input_type -> mediator.v1.ListRuleTypesRequest + 143, // 198: mediator.v1.ProfileService.GetRuleTypeByName:input_type -> mediator.v1.GetRuleTypeByNameRequest + 145, // 199: mediator.v1.ProfileService.GetRuleTypeById:input_type -> mediator.v1.GetRuleTypeByIdRequest + 147, // 200: mediator.v1.ProfileService.CreateRuleType:input_type -> mediator.v1.CreateRuleTypeRequest + 149, // 201: mediator.v1.ProfileService.UpdateRuleType:input_type -> mediator.v1.UpdateRuleTypeRequest + 151, // 202: mediator.v1.ProfileService.DeleteRuleType:input_type -> mediator.v1.DeleteRuleTypeRequest 133, // 203: mediator.v1.KeyService.GetPublicKey:input_type -> mediator.v1.GetPublicKeyRequest 135, // 204: mediator.v1.KeyService.CreateKeyPair:input_type -> mediator.v1.CreateKeyPairRequest 17, // 205: mediator.v1.HealthService.CheckHealth:output_type -> mediator.v1.CheckHealthResponse @@ -12982,18 +12986,18 @@ var file_mediator_v1_mediator_proto_depIdxs = []int32{ 114, // 248: mediator.v1.UserService.GetUserById:output_type -> mediator.v1.GetUserByIdResponse 116, // 249: mediator.v1.UserService.GetUserBySubject:output_type -> mediator.v1.GetUserBySubjectResponse 118, // 250: mediator.v1.UserService.GetUser:output_type -> mediator.v1.GetUserResponse - 120, // 251: mediator.v1.PolicyService.CreatePolicy:output_type -> mediator.v1.CreatePolicyResponse - 122, // 252: mediator.v1.PolicyService.DeletePolicy:output_type -> mediator.v1.DeletePolicyResponse - 124, // 253: mediator.v1.PolicyService.ListPolicies:output_type -> mediator.v1.ListPoliciesResponse - 126, // 254: mediator.v1.PolicyService.GetPolicyById:output_type -> mediator.v1.GetPolicyByIdResponse - 130, // 255: mediator.v1.PolicyService.GetPolicyStatusByName:output_type -> mediator.v1.GetPolicyStatusByNameResponse - 132, // 256: mediator.v1.PolicyService.GetPolicyStatusByProject:output_type -> mediator.v1.GetPolicyStatusByProjectResponse - 142, // 257: mediator.v1.PolicyService.ListRuleTypes:output_type -> mediator.v1.ListRuleTypesResponse - 144, // 258: mediator.v1.PolicyService.GetRuleTypeByName:output_type -> mediator.v1.GetRuleTypeByNameResponse - 146, // 259: mediator.v1.PolicyService.GetRuleTypeById:output_type -> mediator.v1.GetRuleTypeByIdResponse - 148, // 260: mediator.v1.PolicyService.CreateRuleType:output_type -> mediator.v1.CreateRuleTypeResponse - 150, // 261: mediator.v1.PolicyService.UpdateRuleType:output_type -> mediator.v1.UpdateRuleTypeResponse - 152, // 262: mediator.v1.PolicyService.DeleteRuleType:output_type -> mediator.v1.DeleteRuleTypeResponse + 120, // 251: mediator.v1.ProfileService.CreateProfile:output_type -> mediator.v1.CreateProfileResponse + 122, // 252: mediator.v1.ProfileService.DeleteProfile:output_type -> mediator.v1.DeleteProfileResponse + 124, // 253: mediator.v1.ProfileService.ListProfiles:output_type -> mediator.v1.ListProfilesResponse + 126, // 254: mediator.v1.ProfileService.GetProfileById:output_type -> mediator.v1.GetProfileByIdResponse + 130, // 255: mediator.v1.ProfileService.GetProfileStatusByName:output_type -> mediator.v1.GetProfileStatusByNameResponse + 132, // 256: mediator.v1.ProfileService.GetProfileStatusByProject:output_type -> mediator.v1.GetProfileStatusByProjectResponse + 142, // 257: mediator.v1.ProfileService.ListRuleTypes:output_type -> mediator.v1.ListRuleTypesResponse + 144, // 258: mediator.v1.ProfileService.GetRuleTypeByName:output_type -> mediator.v1.GetRuleTypeByNameResponse + 146, // 259: mediator.v1.ProfileService.GetRuleTypeById:output_type -> mediator.v1.GetRuleTypeByIdResponse + 148, // 260: mediator.v1.ProfileService.CreateRuleType:output_type -> mediator.v1.CreateRuleTypeResponse + 150, // 261: mediator.v1.ProfileService.UpdateRuleType:output_type -> mediator.v1.UpdateRuleTypeResponse + 152, // 262: mediator.v1.ProfileService.DeleteRuleType:output_type -> mediator.v1.DeleteRuleTypeResponse 134, // 263: mediator.v1.KeyService.GetPublicKey:output_type -> mediator.v1.GetPublicKeyResponse 136, // 264: mediator.v1.KeyService.CreateKeyPair:output_type -> mediator.v1.CreateKeyPairResponse 205, // [205:265] is the sub-list for method output_type @@ -14390,7 +14394,7 @@ func file_mediator_v1_mediator_proto_init() { } } file_mediator_v1_mediator_proto_msgTypes[115].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePolicyRequest); i { + switch v := v.(*CreateProfileRequest); i { case 0: return &v.state case 1: @@ -14402,7 +14406,7 @@ func file_mediator_v1_mediator_proto_init() { } } file_mediator_v1_mediator_proto_msgTypes[116].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreatePolicyResponse); i { + switch v := v.(*CreateProfileResponse); i { case 0: return &v.state case 1: @@ -14414,7 +14418,7 @@ func file_mediator_v1_mediator_proto_init() { } } file_mediator_v1_mediator_proto_msgTypes[117].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeletePolicyRequest); i { + switch v := v.(*DeleteProfileRequest); i { case 0: return &v.state case 1: @@ -14426,7 +14430,7 @@ func file_mediator_v1_mediator_proto_init() { } } file_mediator_v1_mediator_proto_msgTypes[118].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeletePolicyResponse); i { + switch v := v.(*DeleteProfileResponse); i { case 0: return &v.state case 1: @@ -14438,7 +14442,7 @@ func file_mediator_v1_mediator_proto_init() { } } file_mediator_v1_mediator_proto_msgTypes[119].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPoliciesRequest); i { + switch v := v.(*ListProfilesRequest); i { case 0: return &v.state case 1: @@ -14450,7 +14454,7 @@ func file_mediator_v1_mediator_proto_init() { } } file_mediator_v1_mediator_proto_msgTypes[120].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListPoliciesResponse); i { + switch v := v.(*ListProfilesResponse); i { case 0: return &v.state case 1: @@ -14462,7 +14466,7 @@ func file_mediator_v1_mediator_proto_init() { } } file_mediator_v1_mediator_proto_msgTypes[121].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPolicyByIdRequest); i { + switch v := v.(*GetProfileByIdRequest); i { case 0: return &v.state case 1: @@ -14474,7 +14478,7 @@ func file_mediator_v1_mediator_proto_init() { } } file_mediator_v1_mediator_proto_msgTypes[122].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPolicyByIdResponse); i { + switch v := v.(*GetProfileByIdResponse); i { case 0: return &v.state case 1: @@ -14486,7 +14490,7 @@ func file_mediator_v1_mediator_proto_init() { } } file_mediator_v1_mediator_proto_msgTypes[123].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PolicyStatus); i { + switch v := v.(*ProfileStatus); i { case 0: return &v.state case 1: @@ -14510,7 +14514,7 @@ func file_mediator_v1_mediator_proto_init() { } } file_mediator_v1_mediator_proto_msgTypes[125].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPolicyStatusByNameRequest); i { + switch v := v.(*GetProfileStatusByNameRequest); i { case 0: return &v.state case 1: @@ -14522,7 +14526,7 @@ func file_mediator_v1_mediator_proto_init() { } } file_mediator_v1_mediator_proto_msgTypes[126].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPolicyStatusByNameResponse); i { + switch v := v.(*GetProfileStatusByNameResponse); i { case 0: return &v.state case 1: @@ -14534,7 +14538,7 @@ func file_mediator_v1_mediator_proto_init() { } } file_mediator_v1_mediator_proto_msgTypes[127].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPolicyStatusByProjectRequest); i { + switch v := v.(*GetProfileStatusByProjectRequest); i { case 0: return &v.state case 1: @@ -14546,7 +14550,7 @@ func file_mediator_v1_mediator_proto_init() { } } file_mediator_v1_mediator_proto_msgTypes[128].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPolicyStatusByProjectResponse); i { + switch v := v.(*GetProfileStatusByProjectResponse); i { case 0: return &v.state case 1: @@ -14870,7 +14874,7 @@ func file_mediator_v1_mediator_proto_init() { } } file_mediator_v1_mediator_proto_msgTypes[155].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Policy); i { + switch v := v.(*Profile); i { case 0: return &v.state case 1: @@ -14906,7 +14910,7 @@ func file_mediator_v1_mediator_proto_init() { } } file_mediator_v1_mediator_proto_msgTypes[159].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPolicyStatusByNameRequest_EntityTypedId); i { + switch v := v.(*GetProfileStatusByNameRequest_EntityTypedId); i { case 0: return &v.state case 1: @@ -15050,7 +15054,7 @@ func file_mediator_v1_mediator_proto_init() { } } file_mediator_v1_mediator_proto_msgTypes[171].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Policy_Rule); i { + switch v := v.(*Profile_Rule); i { case 0: return &v.state case 1: diff --git a/pkg/api/protobuf/go/mediator/v1/mediator.pb.gw.go b/pkg/api/protobuf/go/mediator/v1/mediator.pb.gw.go index 44e6ee1a1c..f03925570e 100644 --- a/pkg/api/protobuf/go/mediator/v1/mediator.pb.gw.go +++ b/pkg/api/protobuf/go/mediator/v1/mediator.pb.gw.go @@ -2523,8 +2523,8 @@ func local_request_UserService_GetUser_0(ctx context.Context, marshaler runtime. } -func request_PolicyService_CreatePolicy_0(ctx context.Context, marshaler runtime.Marshaler, client PolicyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePolicyRequest +func request_ProfileService_CreateProfile_0(ctx context.Context, marshaler runtime.Marshaler, client ProfileServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateProfileRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -2535,13 +2535,13 @@ func request_PolicyService_CreatePolicy_0(ctx context.Context, marshaler runtime return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.CreatePolicy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.CreateProfile(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_PolicyService_CreatePolicy_0(ctx context.Context, marshaler runtime.Marshaler, server PolicyServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreatePolicyRequest +func local_request_ProfileService_CreateProfile_0(ctx context.Context, marshaler runtime.Marshaler, server ProfileServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateProfileRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -2552,17 +2552,17 @@ func local_request_PolicyService_CreatePolicy_0(ctx context.Context, marshaler r return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CreatePolicy(ctx, &protoReq) + msg, err := server.CreateProfile(ctx, &protoReq) return msg, metadata, err } var ( - filter_PolicyService_DeletePolicy_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} + filter_ProfileService_DeleteProfile_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} ) -func request_PolicyService_DeletePolicy_0(ctx context.Context, marshaler runtime.Marshaler, client PolicyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletePolicyRequest +func request_ProfileService_DeleteProfile_0(ctx context.Context, marshaler runtime.Marshaler, client ProfileServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteProfileRequest var metadata runtime.ServerMetadata var ( @@ -2585,17 +2585,17 @@ func request_PolicyService_DeletePolicy_0(ctx context.Context, marshaler runtime if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PolicyService_DeletePolicy_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ProfileService_DeleteProfile_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.DeletePolicy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.DeleteProfile(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_PolicyService_DeletePolicy_0(ctx context.Context, marshaler runtime.Marshaler, server PolicyServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeletePolicyRequest +func local_request_ProfileService_DeleteProfile_0(ctx context.Context, marshaler runtime.Marshaler, server ProfileServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteProfileRequest var metadata runtime.ServerMetadata var ( @@ -2618,57 +2618,57 @@ func local_request_PolicyService_DeletePolicy_0(ctx context.Context, marshaler r if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PolicyService_DeletePolicy_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ProfileService_DeleteProfile_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.DeletePolicy(ctx, &protoReq) + msg, err := server.DeleteProfile(ctx, &protoReq) return msg, metadata, err } var ( - filter_PolicyService_ListPolicies_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_ProfileService_ListProfiles_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_PolicyService_ListPolicies_0(ctx context.Context, marshaler runtime.Marshaler, client PolicyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListPoliciesRequest +func request_ProfileService_ListProfiles_0(ctx context.Context, marshaler runtime.Marshaler, client ProfileServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListProfilesRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PolicyService_ListPolicies_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ProfileService_ListProfiles_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ListPolicies(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.ListProfiles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_PolicyService_ListPolicies_0(ctx context.Context, marshaler runtime.Marshaler, server PolicyServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListPoliciesRequest +func local_request_ProfileService_ListProfiles_0(ctx context.Context, marshaler runtime.Marshaler, server ProfileServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListProfilesRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PolicyService_ListPolicies_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ProfileService_ListProfiles_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ListPolicies(ctx, &protoReq) + msg, err := server.ListProfiles(ctx, &protoReq) return msg, metadata, err } var ( - filter_PolicyService_GetPolicyById_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} + filter_ProfileService_GetProfileById_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} ) -func request_PolicyService_GetPolicyById_0(ctx context.Context, marshaler runtime.Marshaler, client PolicyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPolicyByIdRequest +func request_ProfileService_GetProfileById_0(ctx context.Context, marshaler runtime.Marshaler, client ProfileServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetProfileByIdRequest var metadata runtime.ServerMetadata var ( @@ -2691,17 +2691,17 @@ func request_PolicyService_GetPolicyById_0(ctx context.Context, marshaler runtim if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PolicyService_GetPolicyById_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ProfileService_GetProfileById_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetPolicyById(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GetProfileById(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_PolicyService_GetPolicyById_0(ctx context.Context, marshaler runtime.Marshaler, server PolicyServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPolicyByIdRequest +func local_request_ProfileService_GetProfileById_0(ctx context.Context, marshaler runtime.Marshaler, server ProfileServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetProfileByIdRequest var metadata runtime.ServerMetadata var ( @@ -2724,21 +2724,21 @@ func local_request_PolicyService_GetPolicyById_0(ctx context.Context, marshaler if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PolicyService_GetPolicyById_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ProfileService_GetProfileById_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetPolicyById(ctx, &protoReq) + msg, err := server.GetProfileById(ctx, &protoReq) return msg, metadata, err } var ( - filter_PolicyService_GetPolicyStatusByName_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} + filter_ProfileService_GetProfileStatusByName_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} ) -func request_PolicyService_GetPolicyStatusByName_0(ctx context.Context, marshaler runtime.Marshaler, client PolicyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPolicyStatusByNameRequest +func request_ProfileService_GetProfileStatusByName_0(ctx context.Context, marshaler runtime.Marshaler, client ProfileServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetProfileStatusByNameRequest var metadata runtime.ServerMetadata var ( @@ -2761,17 +2761,17 @@ func request_PolicyService_GetPolicyStatusByName_0(ctx context.Context, marshale if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PolicyService_GetPolicyStatusByName_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ProfileService_GetProfileStatusByName_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetPolicyStatusByName(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GetProfileStatusByName(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_PolicyService_GetPolicyStatusByName_0(ctx context.Context, marshaler runtime.Marshaler, server PolicyServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPolicyStatusByNameRequest +func local_request_ProfileService_GetProfileStatusByName_0(ctx context.Context, marshaler runtime.Marshaler, server ProfileServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetProfileStatusByNameRequest var metadata runtime.ServerMetadata var ( @@ -2794,63 +2794,63 @@ func local_request_PolicyService_GetPolicyStatusByName_0(ctx context.Context, ma if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PolicyService_GetPolicyStatusByName_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ProfileService_GetProfileStatusByName_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetPolicyStatusByName(ctx, &protoReq) + msg, err := server.GetProfileStatusByName(ctx, &protoReq) return msg, metadata, err } var ( - filter_PolicyService_GetPolicyStatusByProject_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_ProfileService_GetProfileStatusByProject_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_PolicyService_GetPolicyStatusByProject_0(ctx context.Context, marshaler runtime.Marshaler, client PolicyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPolicyStatusByProjectRequest +func request_ProfileService_GetProfileStatusByProject_0(ctx context.Context, marshaler runtime.Marshaler, client ProfileServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetProfileStatusByProjectRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PolicyService_GetPolicyStatusByProject_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ProfileService_GetProfileStatusByProject_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetPolicyStatusByProject(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GetProfileStatusByProject(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_PolicyService_GetPolicyStatusByProject_0(ctx context.Context, marshaler runtime.Marshaler, server PolicyServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPolicyStatusByProjectRequest +func local_request_ProfileService_GetProfileStatusByProject_0(ctx context.Context, marshaler runtime.Marshaler, server ProfileServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetProfileStatusByProjectRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PolicyService_GetPolicyStatusByProject_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ProfileService_GetProfileStatusByProject_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetPolicyStatusByProject(ctx, &protoReq) + msg, err := server.GetProfileStatusByProject(ctx, &protoReq) return msg, metadata, err } var ( - filter_PolicyService_ListRuleTypes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_ProfileService_ListRuleTypes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_PolicyService_ListRuleTypes_0(ctx context.Context, marshaler runtime.Marshaler, client PolicyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_ProfileService_ListRuleTypes_0(ctx context.Context, marshaler runtime.Marshaler, client ProfileServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListRuleTypesRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PolicyService_ListRuleTypes_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ProfileService_ListRuleTypes_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -2859,14 +2859,14 @@ func request_PolicyService_ListRuleTypes_0(ctx context.Context, marshaler runtim } -func local_request_PolicyService_ListRuleTypes_0(ctx context.Context, marshaler runtime.Marshaler, server PolicyServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_ProfileService_ListRuleTypes_0(ctx context.Context, marshaler runtime.Marshaler, server ProfileServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListRuleTypesRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PolicyService_ListRuleTypes_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ProfileService_ListRuleTypes_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -2876,10 +2876,10 @@ func local_request_PolicyService_ListRuleTypes_0(ctx context.Context, marshaler } var ( - filter_PolicyService_GetRuleTypeByName_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} + filter_ProfileService_GetRuleTypeByName_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} ) -func request_PolicyService_GetRuleTypeByName_0(ctx context.Context, marshaler runtime.Marshaler, client PolicyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_ProfileService_GetRuleTypeByName_0(ctx context.Context, marshaler runtime.Marshaler, client ProfileServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetRuleTypeByNameRequest var metadata runtime.ServerMetadata @@ -2903,7 +2903,7 @@ func request_PolicyService_GetRuleTypeByName_0(ctx context.Context, marshaler ru if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PolicyService_GetRuleTypeByName_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ProfileService_GetRuleTypeByName_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -2912,7 +2912,7 @@ func request_PolicyService_GetRuleTypeByName_0(ctx context.Context, marshaler ru } -func local_request_PolicyService_GetRuleTypeByName_0(ctx context.Context, marshaler runtime.Marshaler, server PolicyServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_ProfileService_GetRuleTypeByName_0(ctx context.Context, marshaler runtime.Marshaler, server ProfileServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetRuleTypeByNameRequest var metadata runtime.ServerMetadata @@ -2936,7 +2936,7 @@ func local_request_PolicyService_GetRuleTypeByName_0(ctx context.Context, marsha if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PolicyService_GetRuleTypeByName_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ProfileService_GetRuleTypeByName_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -2946,10 +2946,10 @@ func local_request_PolicyService_GetRuleTypeByName_0(ctx context.Context, marsha } var ( - filter_PolicyService_GetRuleTypeById_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} + filter_ProfileService_GetRuleTypeById_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} ) -func request_PolicyService_GetRuleTypeById_0(ctx context.Context, marshaler runtime.Marshaler, client PolicyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_ProfileService_GetRuleTypeById_0(ctx context.Context, marshaler runtime.Marshaler, client ProfileServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetRuleTypeByIdRequest var metadata runtime.ServerMetadata @@ -2973,7 +2973,7 @@ func request_PolicyService_GetRuleTypeById_0(ctx context.Context, marshaler runt if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PolicyService_GetRuleTypeById_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ProfileService_GetRuleTypeById_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -2982,7 +2982,7 @@ func request_PolicyService_GetRuleTypeById_0(ctx context.Context, marshaler runt } -func local_request_PolicyService_GetRuleTypeById_0(ctx context.Context, marshaler runtime.Marshaler, server PolicyServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_ProfileService_GetRuleTypeById_0(ctx context.Context, marshaler runtime.Marshaler, server ProfileServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetRuleTypeByIdRequest var metadata runtime.ServerMetadata @@ -3006,7 +3006,7 @@ func local_request_PolicyService_GetRuleTypeById_0(ctx context.Context, marshale if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PolicyService_GetRuleTypeById_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ProfileService_GetRuleTypeById_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -3015,7 +3015,7 @@ func local_request_PolicyService_GetRuleTypeById_0(ctx context.Context, marshale } -func request_PolicyService_CreateRuleType_0(ctx context.Context, marshaler runtime.Marshaler, client PolicyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_ProfileService_CreateRuleType_0(ctx context.Context, marshaler runtime.Marshaler, client ProfileServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CreateRuleTypeRequest var metadata runtime.ServerMetadata @@ -3032,7 +3032,7 @@ func request_PolicyService_CreateRuleType_0(ctx context.Context, marshaler runti } -func local_request_PolicyService_CreateRuleType_0(ctx context.Context, marshaler runtime.Marshaler, server PolicyServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_ProfileService_CreateRuleType_0(ctx context.Context, marshaler runtime.Marshaler, server ProfileServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CreateRuleTypeRequest var metadata runtime.ServerMetadata @@ -3049,7 +3049,7 @@ func local_request_PolicyService_CreateRuleType_0(ctx context.Context, marshaler } -func request_PolicyService_UpdateRuleType_0(ctx context.Context, marshaler runtime.Marshaler, client PolicyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_ProfileService_UpdateRuleType_0(ctx context.Context, marshaler runtime.Marshaler, client ProfileServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UpdateRuleTypeRequest var metadata runtime.ServerMetadata @@ -3066,7 +3066,7 @@ func request_PolicyService_UpdateRuleType_0(ctx context.Context, marshaler runti } -func local_request_PolicyService_UpdateRuleType_0(ctx context.Context, marshaler runtime.Marshaler, server PolicyServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_ProfileService_UpdateRuleType_0(ctx context.Context, marshaler runtime.Marshaler, server ProfileServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UpdateRuleTypeRequest var metadata runtime.ServerMetadata @@ -3084,10 +3084,10 @@ func local_request_PolicyService_UpdateRuleType_0(ctx context.Context, marshaler } var ( - filter_PolicyService_DeleteRuleType_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} + filter_ProfileService_DeleteRuleType_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} ) -func request_PolicyService_DeleteRuleType_0(ctx context.Context, marshaler runtime.Marshaler, client PolicyServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_ProfileService_DeleteRuleType_0(ctx context.Context, marshaler runtime.Marshaler, client ProfileServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DeleteRuleTypeRequest var metadata runtime.ServerMetadata @@ -3111,7 +3111,7 @@ func request_PolicyService_DeleteRuleType_0(ctx context.Context, marshaler runti if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PolicyService_DeleteRuleType_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ProfileService_DeleteRuleType_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -3120,7 +3120,7 @@ func request_PolicyService_DeleteRuleType_0(ctx context.Context, marshaler runti } -func local_request_PolicyService_DeleteRuleType_0(ctx context.Context, marshaler runtime.Marshaler, server PolicyServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_ProfileService_DeleteRuleType_0(ctx context.Context, marshaler runtime.Marshaler, server ProfileServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DeleteRuleTypeRequest var metadata runtime.ServerMetadata @@ -3144,7 +3144,7 @@ func local_request_PolicyService_DeleteRuleType_0(ctx context.Context, marshaler if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_PolicyService_DeleteRuleType_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ProfileService_DeleteRuleType_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -4463,13 +4463,13 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux return nil } -// RegisterPolicyServiceHandlerServer registers the http handlers for service PolicyService to "mux". -// UnaryRPC :call PolicyServiceServer directly. +// RegisterProfileServiceHandlerServer registers the http handlers for service ProfileService to "mux". +// UnaryRPC :call ProfileServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPolicyServiceHandlerFromEndpoint instead. -func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PolicyServiceServer) error { +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterProfileServiceHandlerFromEndpoint instead. +func RegisterProfileServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProfileServiceServer) error { - mux.Handle("POST", pattern_PolicyService_CreatePolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_ProfileService_CreateProfile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -4477,12 +4477,12 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.PolicyService/CreatePolicy", runtime.WithHTTPPathPattern("/api/v1/policy")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.ProfileService/CreateProfile", runtime.WithHTTPPathPattern("/api/v1/profile")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PolicyService_CreatePolicy_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ProfileService_CreateProfile_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -4490,11 +4490,11 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM return } - forward_PolicyService_CreatePolicy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_CreateProfile_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("DELETE", pattern_PolicyService_DeletePolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_ProfileService_DeleteProfile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -4502,12 +4502,12 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.PolicyService/DeletePolicy", runtime.WithHTTPPathPattern("/api/v1/policy/{id}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.ProfileService/DeleteProfile", runtime.WithHTTPPathPattern("/api/v1/profile/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PolicyService_DeletePolicy_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ProfileService_DeleteProfile_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -4515,11 +4515,11 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM return } - forward_PolicyService_DeletePolicy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_DeleteProfile_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_PolicyService_ListPolicies_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_ProfileService_ListProfiles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -4527,12 +4527,12 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.PolicyService/ListPolicies", runtime.WithHTTPPathPattern("/api/v1/policies")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.ProfileService/ListProfiles", runtime.WithHTTPPathPattern("/api/v1/profiles")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PolicyService_ListPolicies_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ProfileService_ListProfiles_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -4540,11 +4540,11 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM return } - forward_PolicyService_ListPolicies_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_ListProfiles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_PolicyService_GetPolicyById_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_ProfileService_GetProfileById_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -4552,12 +4552,12 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.PolicyService/GetPolicyById", runtime.WithHTTPPathPattern("/api/v1/policy/{id}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.ProfileService/GetProfileById", runtime.WithHTTPPathPattern("/api/v1/profile/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PolicyService_GetPolicyById_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ProfileService_GetProfileById_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -4565,11 +4565,11 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM return } - forward_PolicyService_GetPolicyById_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_GetProfileById_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_PolicyService_GetPolicyStatusByName_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_ProfileService_GetProfileStatusByName_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -4577,12 +4577,12 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.PolicyService/GetPolicyStatusByName", runtime.WithHTTPPathPattern("/api/v1/policy/name/{name}/status")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.ProfileService/GetProfileStatusByName", runtime.WithHTTPPathPattern("/api/v1/profile/name/{name}/status")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PolicyService_GetPolicyStatusByName_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ProfileService_GetProfileStatusByName_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -4590,11 +4590,11 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM return } - forward_PolicyService_GetPolicyStatusByName_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_GetProfileStatusByName_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_PolicyService_GetPolicyStatusByProject_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_ProfileService_GetProfileStatusByProject_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -4602,12 +4602,12 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.PolicyService/GetPolicyStatusByProject", runtime.WithHTTPPathPattern("/api/v1/policy_status")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.ProfileService/GetProfileStatusByProject", runtime.WithHTTPPathPattern("/api/v1/profile_status")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PolicyService_GetPolicyStatusByProject_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ProfileService_GetProfileStatusByProject_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -4615,11 +4615,11 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM return } - forward_PolicyService_GetPolicyStatusByProject_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_GetProfileStatusByProject_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_PolicyService_ListRuleTypes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_ProfileService_ListRuleTypes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -4627,12 +4627,12 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.PolicyService/ListRuleTypes", runtime.WithHTTPPathPattern("/api/v1/rule_types")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.ProfileService/ListRuleTypes", runtime.WithHTTPPathPattern("/api/v1/rule_types")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PolicyService_ListRuleTypes_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ProfileService_ListRuleTypes_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -4640,11 +4640,11 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM return } - forward_PolicyService_ListRuleTypes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_ListRuleTypes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_PolicyService_GetRuleTypeByName_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_ProfileService_GetRuleTypeByName_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -4652,12 +4652,12 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.PolicyService/GetRuleTypeByName", runtime.WithHTTPPathPattern("/api/v1/rule_type/name/{name}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.ProfileService/GetRuleTypeByName", runtime.WithHTTPPathPattern("/api/v1/rule_type/name/{name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PolicyService_GetRuleTypeByName_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ProfileService_GetRuleTypeByName_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -4665,11 +4665,11 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM return } - forward_PolicyService_GetRuleTypeByName_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_GetRuleTypeByName_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_PolicyService_GetRuleTypeById_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_ProfileService_GetRuleTypeById_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -4677,12 +4677,12 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.PolicyService/GetRuleTypeById", runtime.WithHTTPPathPattern("/api/v1/rule_type/{id}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.ProfileService/GetRuleTypeById", runtime.WithHTTPPathPattern("/api/v1/rule_type/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PolicyService_GetRuleTypeById_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ProfileService_GetRuleTypeById_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -4690,11 +4690,11 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM return } - forward_PolicyService_GetRuleTypeById_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_GetRuleTypeById_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_PolicyService_CreateRuleType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_ProfileService_CreateRuleType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -4702,12 +4702,12 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.PolicyService/CreateRuleType", runtime.WithHTTPPathPattern("/api/v1/rule_type")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.ProfileService/CreateRuleType", runtime.WithHTTPPathPattern("/api/v1/rule_type")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PolicyService_CreateRuleType_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ProfileService_CreateRuleType_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -4715,11 +4715,11 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM return } - forward_PolicyService_CreateRuleType_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_CreateRuleType_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("PUT", pattern_PolicyService_UpdateRuleType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("PUT", pattern_ProfileService_UpdateRuleType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -4727,12 +4727,12 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.PolicyService/UpdateRuleType", runtime.WithHTTPPathPattern("/api/v1/rule_type")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.ProfileService/UpdateRuleType", runtime.WithHTTPPathPattern("/api/v1/rule_type")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PolicyService_UpdateRuleType_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ProfileService_UpdateRuleType_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -4740,11 +4740,11 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM return } - forward_PolicyService_UpdateRuleType_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_UpdateRuleType_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("DELETE", pattern_PolicyService_DeleteRuleType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_ProfileService_DeleteRuleType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -4752,12 +4752,12 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.PolicyService/DeleteRuleType", runtime.WithHTTPPathPattern("/api/v1/rule_type/{id}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/mediator.v1.ProfileService/DeleteRuleType", runtime.WithHTTPPathPattern("/api/v1/rule_type/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_PolicyService_DeleteRuleType_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ProfileService_DeleteRuleType_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -4765,7 +4765,7 @@ func RegisterPolicyServiceHandlerServer(ctx context.Context, mux *runtime.ServeM return } - forward_PolicyService_DeleteRuleType_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_DeleteRuleType_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6477,9 +6477,9 @@ var ( forward_UserService_GetUser_0 = runtime.ForwardResponseMessage ) -// RegisterPolicyServiceHandlerFromEndpoint is same as RegisterPolicyServiceHandler but +// RegisterProfileServiceHandlerFromEndpoint is same as RegisterProfileServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterPolicyServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { +func RegisterProfileServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err @@ -6499,283 +6499,283 @@ func RegisterPolicyServiceHandlerFromEndpoint(ctx context.Context, mux *runtime. }() }() - return RegisterPolicyServiceHandler(ctx, mux, conn) + return RegisterProfileServiceHandler(ctx, mux, conn) } -// RegisterPolicyServiceHandler registers the http handlers for service PolicyService to "mux". +// RegisterProfileServiceHandler registers the http handlers for service ProfileService to "mux". // The handlers forward requests to the grpc endpoint over "conn". -func RegisterPolicyServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterPolicyServiceHandlerClient(ctx, mux, NewPolicyServiceClient(conn)) +func RegisterProfileServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterProfileServiceHandlerClient(ctx, mux, NewProfileServiceClient(conn)) } -// RegisterPolicyServiceHandlerClient registers the http handlers for service PolicyService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PolicyServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PolicyServiceClient" +// RegisterProfileServiceHandlerClient registers the http handlers for service ProfileService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ProfileServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ProfileServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "PolicyServiceClient" to call the correct interceptors. -func RegisterPolicyServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PolicyServiceClient) error { +// "ProfileServiceClient" to call the correct interceptors. +func RegisterProfileServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProfileServiceClient) error { - mux.Handle("POST", pattern_PolicyService_CreatePolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_ProfileService_CreateProfile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.PolicyService/CreatePolicy", runtime.WithHTTPPathPattern("/api/v1/policy")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.ProfileService/CreateProfile", runtime.WithHTTPPathPattern("/api/v1/profile")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PolicyService_CreatePolicy_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_ProfileService_CreateProfile_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PolicyService_CreatePolicy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_CreateProfile_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("DELETE", pattern_PolicyService_DeletePolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_ProfileService_DeleteProfile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.PolicyService/DeletePolicy", runtime.WithHTTPPathPattern("/api/v1/policy/{id}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.ProfileService/DeleteProfile", runtime.WithHTTPPathPattern("/api/v1/profile/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PolicyService_DeletePolicy_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_ProfileService_DeleteProfile_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PolicyService_DeletePolicy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_DeleteProfile_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_PolicyService_ListPolicies_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_ProfileService_ListProfiles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.PolicyService/ListPolicies", runtime.WithHTTPPathPattern("/api/v1/policies")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.ProfileService/ListProfiles", runtime.WithHTTPPathPattern("/api/v1/profiles")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PolicyService_ListPolicies_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_ProfileService_ListProfiles_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PolicyService_ListPolicies_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_ListProfiles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_PolicyService_GetPolicyById_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_ProfileService_GetProfileById_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.PolicyService/GetPolicyById", runtime.WithHTTPPathPattern("/api/v1/policy/{id}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.ProfileService/GetProfileById", runtime.WithHTTPPathPattern("/api/v1/profile/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PolicyService_GetPolicyById_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_ProfileService_GetProfileById_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PolicyService_GetPolicyById_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_GetProfileById_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_PolicyService_GetPolicyStatusByName_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_ProfileService_GetProfileStatusByName_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.PolicyService/GetPolicyStatusByName", runtime.WithHTTPPathPattern("/api/v1/policy/name/{name}/status")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.ProfileService/GetProfileStatusByName", runtime.WithHTTPPathPattern("/api/v1/profile/name/{name}/status")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PolicyService_GetPolicyStatusByName_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_ProfileService_GetProfileStatusByName_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PolicyService_GetPolicyStatusByName_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_GetProfileStatusByName_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_PolicyService_GetPolicyStatusByProject_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_ProfileService_GetProfileStatusByProject_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.PolicyService/GetPolicyStatusByProject", runtime.WithHTTPPathPattern("/api/v1/policy_status")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.ProfileService/GetProfileStatusByProject", runtime.WithHTTPPathPattern("/api/v1/profile_status")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PolicyService_GetPolicyStatusByProject_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_ProfileService_GetProfileStatusByProject_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PolicyService_GetPolicyStatusByProject_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_GetProfileStatusByProject_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_PolicyService_ListRuleTypes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_ProfileService_ListRuleTypes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.PolicyService/ListRuleTypes", runtime.WithHTTPPathPattern("/api/v1/rule_types")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.ProfileService/ListRuleTypes", runtime.WithHTTPPathPattern("/api/v1/rule_types")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PolicyService_ListRuleTypes_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_ProfileService_ListRuleTypes_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PolicyService_ListRuleTypes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_ListRuleTypes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_PolicyService_GetRuleTypeByName_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_ProfileService_GetRuleTypeByName_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.PolicyService/GetRuleTypeByName", runtime.WithHTTPPathPattern("/api/v1/rule_type/name/{name}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.ProfileService/GetRuleTypeByName", runtime.WithHTTPPathPattern("/api/v1/rule_type/name/{name}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PolicyService_GetRuleTypeByName_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_ProfileService_GetRuleTypeByName_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PolicyService_GetRuleTypeByName_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_GetRuleTypeByName_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_PolicyService_GetRuleTypeById_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_ProfileService_GetRuleTypeById_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.PolicyService/GetRuleTypeById", runtime.WithHTTPPathPattern("/api/v1/rule_type/{id}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.ProfileService/GetRuleTypeById", runtime.WithHTTPPathPattern("/api/v1/rule_type/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PolicyService_GetRuleTypeById_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_ProfileService_GetRuleTypeById_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PolicyService_GetRuleTypeById_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_GetRuleTypeById_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_PolicyService_CreateRuleType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_ProfileService_CreateRuleType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.PolicyService/CreateRuleType", runtime.WithHTTPPathPattern("/api/v1/rule_type")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.ProfileService/CreateRuleType", runtime.WithHTTPPathPattern("/api/v1/rule_type")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PolicyService_CreateRuleType_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_ProfileService_CreateRuleType_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PolicyService_CreateRuleType_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_CreateRuleType_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("PUT", pattern_PolicyService_UpdateRuleType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("PUT", pattern_ProfileService_UpdateRuleType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.PolicyService/UpdateRuleType", runtime.WithHTTPPathPattern("/api/v1/rule_type")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.ProfileService/UpdateRuleType", runtime.WithHTTPPathPattern("/api/v1/rule_type")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PolicyService_UpdateRuleType_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_ProfileService_UpdateRuleType_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PolicyService_UpdateRuleType_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_UpdateRuleType_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("DELETE", pattern_PolicyService_DeleteRuleType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_ProfileService_DeleteRuleType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.PolicyService/DeleteRuleType", runtime.WithHTTPPathPattern("/api/v1/rule_type/{id}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/mediator.v1.ProfileService/DeleteRuleType", runtime.WithHTTPPathPattern("/api/v1/rule_type/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_PolicyService_DeleteRuleType_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_ProfileService_DeleteRuleType_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_PolicyService_DeleteRuleType_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProfileService_DeleteRuleType_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -6783,55 +6783,55 @@ func RegisterPolicyServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } var ( - pattern_PolicyService_CreatePolicy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "policy"}, "")) + pattern_ProfileService_CreateProfile_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "profile"}, "")) - pattern_PolicyService_DeletePolicy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "policy", "id"}, "")) + pattern_ProfileService_DeleteProfile_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "profile", "id"}, "")) - pattern_PolicyService_ListPolicies_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "policies"}, "")) + pattern_ProfileService_ListProfiles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "profiles"}, "")) - pattern_PolicyService_GetPolicyById_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "policy", "id"}, "")) + pattern_ProfileService_GetProfileById_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "profile", "id"}, "")) - pattern_PolicyService_GetPolicyStatusByName_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "policy", "name", "status"}, "")) + pattern_ProfileService_GetProfileStatusByName_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "profile", "name", "status"}, "")) - pattern_PolicyService_GetPolicyStatusByProject_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "policy_status"}, "")) + pattern_ProfileService_GetProfileStatusByProject_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "profile_status"}, "")) - pattern_PolicyService_ListRuleTypes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "rule_types"}, "")) + pattern_ProfileService_ListRuleTypes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "rule_types"}, "")) - pattern_PolicyService_GetRuleTypeByName_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "rule_type", "name"}, "")) + pattern_ProfileService_GetRuleTypeByName_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "rule_type", "name"}, "")) - pattern_PolicyService_GetRuleTypeById_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "rule_type", "id"}, "")) + pattern_ProfileService_GetRuleTypeById_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "rule_type", "id"}, "")) - pattern_PolicyService_CreateRuleType_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "rule_type"}, "")) + pattern_ProfileService_CreateRuleType_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "rule_type"}, "")) - pattern_PolicyService_UpdateRuleType_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "rule_type"}, "")) + pattern_ProfileService_UpdateRuleType_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "rule_type"}, "")) - pattern_PolicyService_DeleteRuleType_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "rule_type", "id"}, "")) + pattern_ProfileService_DeleteRuleType_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "v1", "rule_type", "id"}, "")) ) var ( - forward_PolicyService_CreatePolicy_0 = runtime.ForwardResponseMessage + forward_ProfileService_CreateProfile_0 = runtime.ForwardResponseMessage - forward_PolicyService_DeletePolicy_0 = runtime.ForwardResponseMessage + forward_ProfileService_DeleteProfile_0 = runtime.ForwardResponseMessage - forward_PolicyService_ListPolicies_0 = runtime.ForwardResponseMessage + forward_ProfileService_ListProfiles_0 = runtime.ForwardResponseMessage - forward_PolicyService_GetPolicyById_0 = runtime.ForwardResponseMessage + forward_ProfileService_GetProfileById_0 = runtime.ForwardResponseMessage - forward_PolicyService_GetPolicyStatusByName_0 = runtime.ForwardResponseMessage + forward_ProfileService_GetProfileStatusByName_0 = runtime.ForwardResponseMessage - forward_PolicyService_GetPolicyStatusByProject_0 = runtime.ForwardResponseMessage + forward_ProfileService_GetProfileStatusByProject_0 = runtime.ForwardResponseMessage - forward_PolicyService_ListRuleTypes_0 = runtime.ForwardResponseMessage + forward_ProfileService_ListRuleTypes_0 = runtime.ForwardResponseMessage - forward_PolicyService_GetRuleTypeByName_0 = runtime.ForwardResponseMessage + forward_ProfileService_GetRuleTypeByName_0 = runtime.ForwardResponseMessage - forward_PolicyService_GetRuleTypeById_0 = runtime.ForwardResponseMessage + forward_ProfileService_GetRuleTypeById_0 = runtime.ForwardResponseMessage - forward_PolicyService_CreateRuleType_0 = runtime.ForwardResponseMessage + forward_ProfileService_CreateRuleType_0 = runtime.ForwardResponseMessage - forward_PolicyService_UpdateRuleType_0 = runtime.ForwardResponseMessage + forward_ProfileService_UpdateRuleType_0 = runtime.ForwardResponseMessage - forward_PolicyService_DeleteRuleType_0 = runtime.ForwardResponseMessage + forward_ProfileService_DeleteRuleType_0 = runtime.ForwardResponseMessage ) // RegisterKeyServiceHandlerFromEndpoint is same as RegisterKeyServiceHandler but diff --git a/pkg/api/protobuf/go/mediator/v1/mediator_grpc.pb.go b/pkg/api/protobuf/go/mediator/v1/mediator_grpc.pb.go index db497136ee..63c7812702 100644 --- a/pkg/api/protobuf/go/mediator/v1/mediator_grpc.pb.go +++ b/pkg/api/protobuf/go/mediator/v1/mediator_grpc.pb.go @@ -2288,30 +2288,30 @@ var UserService_ServiceDesc = grpc.ServiceDesc{ } const ( - PolicyService_CreatePolicy_FullMethodName = "/mediator.v1.PolicyService/CreatePolicy" - PolicyService_DeletePolicy_FullMethodName = "/mediator.v1.PolicyService/DeletePolicy" - PolicyService_ListPolicies_FullMethodName = "/mediator.v1.PolicyService/ListPolicies" - PolicyService_GetPolicyById_FullMethodName = "/mediator.v1.PolicyService/GetPolicyById" - PolicyService_GetPolicyStatusByName_FullMethodName = "/mediator.v1.PolicyService/GetPolicyStatusByName" - PolicyService_GetPolicyStatusByProject_FullMethodName = "/mediator.v1.PolicyService/GetPolicyStatusByProject" - PolicyService_ListRuleTypes_FullMethodName = "/mediator.v1.PolicyService/ListRuleTypes" - PolicyService_GetRuleTypeByName_FullMethodName = "/mediator.v1.PolicyService/GetRuleTypeByName" - PolicyService_GetRuleTypeById_FullMethodName = "/mediator.v1.PolicyService/GetRuleTypeById" - PolicyService_CreateRuleType_FullMethodName = "/mediator.v1.PolicyService/CreateRuleType" - PolicyService_UpdateRuleType_FullMethodName = "/mediator.v1.PolicyService/UpdateRuleType" - PolicyService_DeleteRuleType_FullMethodName = "/mediator.v1.PolicyService/DeleteRuleType" + ProfileService_CreateProfile_FullMethodName = "/mediator.v1.ProfileService/CreateProfile" + ProfileService_DeleteProfile_FullMethodName = "/mediator.v1.ProfileService/DeleteProfile" + ProfileService_ListProfiles_FullMethodName = "/mediator.v1.ProfileService/ListProfiles" + ProfileService_GetProfileById_FullMethodName = "/mediator.v1.ProfileService/GetProfileById" + ProfileService_GetProfileStatusByName_FullMethodName = "/mediator.v1.ProfileService/GetProfileStatusByName" + ProfileService_GetProfileStatusByProject_FullMethodName = "/mediator.v1.ProfileService/GetProfileStatusByProject" + ProfileService_ListRuleTypes_FullMethodName = "/mediator.v1.ProfileService/ListRuleTypes" + ProfileService_GetRuleTypeByName_FullMethodName = "/mediator.v1.ProfileService/GetRuleTypeByName" + ProfileService_GetRuleTypeById_FullMethodName = "/mediator.v1.ProfileService/GetRuleTypeById" + ProfileService_CreateRuleType_FullMethodName = "/mediator.v1.ProfileService/CreateRuleType" + ProfileService_UpdateRuleType_FullMethodName = "/mediator.v1.ProfileService/UpdateRuleType" + ProfileService_DeleteRuleType_FullMethodName = "/mediator.v1.ProfileService/DeleteRuleType" ) -// PolicyServiceClient is the client API for PolicyService service. +// ProfileServiceClient is the client API for ProfileService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type PolicyServiceClient interface { - CreatePolicy(ctx context.Context, in *CreatePolicyRequest, opts ...grpc.CallOption) (*CreatePolicyResponse, error) - DeletePolicy(ctx context.Context, in *DeletePolicyRequest, opts ...grpc.CallOption) (*DeletePolicyResponse, error) - ListPolicies(ctx context.Context, in *ListPoliciesRequest, opts ...grpc.CallOption) (*ListPoliciesResponse, error) - GetPolicyById(ctx context.Context, in *GetPolicyByIdRequest, opts ...grpc.CallOption) (*GetPolicyByIdResponse, error) - GetPolicyStatusByName(ctx context.Context, in *GetPolicyStatusByNameRequest, opts ...grpc.CallOption) (*GetPolicyStatusByNameResponse, error) - GetPolicyStatusByProject(ctx context.Context, in *GetPolicyStatusByProjectRequest, opts ...grpc.CallOption) (*GetPolicyStatusByProjectResponse, error) +type ProfileServiceClient interface { + CreateProfile(ctx context.Context, in *CreateProfileRequest, opts ...grpc.CallOption) (*CreateProfileResponse, error) + DeleteProfile(ctx context.Context, in *DeleteProfileRequest, opts ...grpc.CallOption) (*DeleteProfileResponse, error) + ListProfiles(ctx context.Context, in *ListProfilesRequest, opts ...grpc.CallOption) (*ListProfilesResponse, error) + GetProfileById(ctx context.Context, in *GetProfileByIdRequest, opts ...grpc.CallOption) (*GetProfileByIdResponse, error) + GetProfileStatusByName(ctx context.Context, in *GetProfileStatusByNameRequest, opts ...grpc.CallOption) (*GetProfileStatusByNameResponse, error) + GetProfileStatusByProject(ctx context.Context, in *GetProfileStatusByProjectRequest, opts ...grpc.CallOption) (*GetProfileStatusByProjectResponse, error) ListRuleTypes(ctx context.Context, in *ListRuleTypesRequest, opts ...grpc.CallOption) (*ListRuleTypesResponse, error) GetRuleTypeByName(ctx context.Context, in *GetRuleTypeByNameRequest, opts ...grpc.CallOption) (*GetRuleTypeByNameResponse, error) GetRuleTypeById(ctx context.Context, in *GetRuleTypeByIdRequest, opts ...grpc.CallOption) (*GetRuleTypeByIdResponse, error) @@ -2320,464 +2320,464 @@ type PolicyServiceClient interface { DeleteRuleType(ctx context.Context, in *DeleteRuleTypeRequest, opts ...grpc.CallOption) (*DeleteRuleTypeResponse, error) } -type policyServiceClient struct { +type profileServiceClient struct { cc grpc.ClientConnInterface } -func NewPolicyServiceClient(cc grpc.ClientConnInterface) PolicyServiceClient { - return &policyServiceClient{cc} +func NewProfileServiceClient(cc grpc.ClientConnInterface) ProfileServiceClient { + return &profileServiceClient{cc} } -func (c *policyServiceClient) CreatePolicy(ctx context.Context, in *CreatePolicyRequest, opts ...grpc.CallOption) (*CreatePolicyResponse, error) { - out := new(CreatePolicyResponse) - err := c.cc.Invoke(ctx, PolicyService_CreatePolicy_FullMethodName, in, out, opts...) +func (c *profileServiceClient) CreateProfile(ctx context.Context, in *CreateProfileRequest, opts ...grpc.CallOption) (*CreateProfileResponse, error) { + out := new(CreateProfileResponse) + err := c.cc.Invoke(ctx, ProfileService_CreateProfile_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *policyServiceClient) DeletePolicy(ctx context.Context, in *DeletePolicyRequest, opts ...grpc.CallOption) (*DeletePolicyResponse, error) { - out := new(DeletePolicyResponse) - err := c.cc.Invoke(ctx, PolicyService_DeletePolicy_FullMethodName, in, out, opts...) +func (c *profileServiceClient) DeleteProfile(ctx context.Context, in *DeleteProfileRequest, opts ...grpc.CallOption) (*DeleteProfileResponse, error) { + out := new(DeleteProfileResponse) + err := c.cc.Invoke(ctx, ProfileService_DeleteProfile_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *policyServiceClient) ListPolicies(ctx context.Context, in *ListPoliciesRequest, opts ...grpc.CallOption) (*ListPoliciesResponse, error) { - out := new(ListPoliciesResponse) - err := c.cc.Invoke(ctx, PolicyService_ListPolicies_FullMethodName, in, out, opts...) +func (c *profileServiceClient) ListProfiles(ctx context.Context, in *ListProfilesRequest, opts ...grpc.CallOption) (*ListProfilesResponse, error) { + out := new(ListProfilesResponse) + err := c.cc.Invoke(ctx, ProfileService_ListProfiles_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *policyServiceClient) GetPolicyById(ctx context.Context, in *GetPolicyByIdRequest, opts ...grpc.CallOption) (*GetPolicyByIdResponse, error) { - out := new(GetPolicyByIdResponse) - err := c.cc.Invoke(ctx, PolicyService_GetPolicyById_FullMethodName, in, out, opts...) +func (c *profileServiceClient) GetProfileById(ctx context.Context, in *GetProfileByIdRequest, opts ...grpc.CallOption) (*GetProfileByIdResponse, error) { + out := new(GetProfileByIdResponse) + err := c.cc.Invoke(ctx, ProfileService_GetProfileById_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *policyServiceClient) GetPolicyStatusByName(ctx context.Context, in *GetPolicyStatusByNameRequest, opts ...grpc.CallOption) (*GetPolicyStatusByNameResponse, error) { - out := new(GetPolicyStatusByNameResponse) - err := c.cc.Invoke(ctx, PolicyService_GetPolicyStatusByName_FullMethodName, in, out, opts...) +func (c *profileServiceClient) GetProfileStatusByName(ctx context.Context, in *GetProfileStatusByNameRequest, opts ...grpc.CallOption) (*GetProfileStatusByNameResponse, error) { + out := new(GetProfileStatusByNameResponse) + err := c.cc.Invoke(ctx, ProfileService_GetProfileStatusByName_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *policyServiceClient) GetPolicyStatusByProject(ctx context.Context, in *GetPolicyStatusByProjectRequest, opts ...grpc.CallOption) (*GetPolicyStatusByProjectResponse, error) { - out := new(GetPolicyStatusByProjectResponse) - err := c.cc.Invoke(ctx, PolicyService_GetPolicyStatusByProject_FullMethodName, in, out, opts...) +func (c *profileServiceClient) GetProfileStatusByProject(ctx context.Context, in *GetProfileStatusByProjectRequest, opts ...grpc.CallOption) (*GetProfileStatusByProjectResponse, error) { + out := new(GetProfileStatusByProjectResponse) + err := c.cc.Invoke(ctx, ProfileService_GetProfileStatusByProject_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *policyServiceClient) ListRuleTypes(ctx context.Context, in *ListRuleTypesRequest, opts ...grpc.CallOption) (*ListRuleTypesResponse, error) { +func (c *profileServiceClient) ListRuleTypes(ctx context.Context, in *ListRuleTypesRequest, opts ...grpc.CallOption) (*ListRuleTypesResponse, error) { out := new(ListRuleTypesResponse) - err := c.cc.Invoke(ctx, PolicyService_ListRuleTypes_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ProfileService_ListRuleTypes_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *policyServiceClient) GetRuleTypeByName(ctx context.Context, in *GetRuleTypeByNameRequest, opts ...grpc.CallOption) (*GetRuleTypeByNameResponse, error) { +func (c *profileServiceClient) GetRuleTypeByName(ctx context.Context, in *GetRuleTypeByNameRequest, opts ...grpc.CallOption) (*GetRuleTypeByNameResponse, error) { out := new(GetRuleTypeByNameResponse) - err := c.cc.Invoke(ctx, PolicyService_GetRuleTypeByName_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ProfileService_GetRuleTypeByName_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *policyServiceClient) GetRuleTypeById(ctx context.Context, in *GetRuleTypeByIdRequest, opts ...grpc.CallOption) (*GetRuleTypeByIdResponse, error) { +func (c *profileServiceClient) GetRuleTypeById(ctx context.Context, in *GetRuleTypeByIdRequest, opts ...grpc.CallOption) (*GetRuleTypeByIdResponse, error) { out := new(GetRuleTypeByIdResponse) - err := c.cc.Invoke(ctx, PolicyService_GetRuleTypeById_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ProfileService_GetRuleTypeById_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *policyServiceClient) CreateRuleType(ctx context.Context, in *CreateRuleTypeRequest, opts ...grpc.CallOption) (*CreateRuleTypeResponse, error) { +func (c *profileServiceClient) CreateRuleType(ctx context.Context, in *CreateRuleTypeRequest, opts ...grpc.CallOption) (*CreateRuleTypeResponse, error) { out := new(CreateRuleTypeResponse) - err := c.cc.Invoke(ctx, PolicyService_CreateRuleType_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ProfileService_CreateRuleType_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *policyServiceClient) UpdateRuleType(ctx context.Context, in *UpdateRuleTypeRequest, opts ...grpc.CallOption) (*UpdateRuleTypeResponse, error) { +func (c *profileServiceClient) UpdateRuleType(ctx context.Context, in *UpdateRuleTypeRequest, opts ...grpc.CallOption) (*UpdateRuleTypeResponse, error) { out := new(UpdateRuleTypeResponse) - err := c.cc.Invoke(ctx, PolicyService_UpdateRuleType_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ProfileService_UpdateRuleType_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *policyServiceClient) DeleteRuleType(ctx context.Context, in *DeleteRuleTypeRequest, opts ...grpc.CallOption) (*DeleteRuleTypeResponse, error) { +func (c *profileServiceClient) DeleteRuleType(ctx context.Context, in *DeleteRuleTypeRequest, opts ...grpc.CallOption) (*DeleteRuleTypeResponse, error) { out := new(DeleteRuleTypeResponse) - err := c.cc.Invoke(ctx, PolicyService_DeleteRuleType_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, ProfileService_DeleteRuleType_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -// PolicyServiceServer is the server API for PolicyService service. -// All implementations must embed UnimplementedPolicyServiceServer +// ProfileServiceServer is the server API for ProfileService service. +// All implementations must embed UnimplementedProfileServiceServer // for forward compatibility -type PolicyServiceServer interface { - CreatePolicy(context.Context, *CreatePolicyRequest) (*CreatePolicyResponse, error) - DeletePolicy(context.Context, *DeletePolicyRequest) (*DeletePolicyResponse, error) - ListPolicies(context.Context, *ListPoliciesRequest) (*ListPoliciesResponse, error) - GetPolicyById(context.Context, *GetPolicyByIdRequest) (*GetPolicyByIdResponse, error) - GetPolicyStatusByName(context.Context, *GetPolicyStatusByNameRequest) (*GetPolicyStatusByNameResponse, error) - GetPolicyStatusByProject(context.Context, *GetPolicyStatusByProjectRequest) (*GetPolicyStatusByProjectResponse, error) +type ProfileServiceServer interface { + CreateProfile(context.Context, *CreateProfileRequest) (*CreateProfileResponse, error) + DeleteProfile(context.Context, *DeleteProfileRequest) (*DeleteProfileResponse, error) + ListProfiles(context.Context, *ListProfilesRequest) (*ListProfilesResponse, error) + GetProfileById(context.Context, *GetProfileByIdRequest) (*GetProfileByIdResponse, error) + GetProfileStatusByName(context.Context, *GetProfileStatusByNameRequest) (*GetProfileStatusByNameResponse, error) + GetProfileStatusByProject(context.Context, *GetProfileStatusByProjectRequest) (*GetProfileStatusByProjectResponse, error) ListRuleTypes(context.Context, *ListRuleTypesRequest) (*ListRuleTypesResponse, error) GetRuleTypeByName(context.Context, *GetRuleTypeByNameRequest) (*GetRuleTypeByNameResponse, error) GetRuleTypeById(context.Context, *GetRuleTypeByIdRequest) (*GetRuleTypeByIdResponse, error) CreateRuleType(context.Context, *CreateRuleTypeRequest) (*CreateRuleTypeResponse, error) UpdateRuleType(context.Context, *UpdateRuleTypeRequest) (*UpdateRuleTypeResponse, error) DeleteRuleType(context.Context, *DeleteRuleTypeRequest) (*DeleteRuleTypeResponse, error) - mustEmbedUnimplementedPolicyServiceServer() + mustEmbedUnimplementedProfileServiceServer() } -// UnimplementedPolicyServiceServer must be embedded to have forward compatible implementations. -type UnimplementedPolicyServiceServer struct { +// UnimplementedProfileServiceServer must be embedded to have forward compatible implementations. +type UnimplementedProfileServiceServer struct { } -func (UnimplementedPolicyServiceServer) CreatePolicy(context.Context, *CreatePolicyRequest) (*CreatePolicyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreatePolicy not implemented") +func (UnimplementedProfileServiceServer) CreateProfile(context.Context, *CreateProfileRequest) (*CreateProfileResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateProfile not implemented") } -func (UnimplementedPolicyServiceServer) DeletePolicy(context.Context, *DeletePolicyRequest) (*DeletePolicyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeletePolicy not implemented") +func (UnimplementedProfileServiceServer) DeleteProfile(context.Context, *DeleteProfileRequest) (*DeleteProfileResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteProfile not implemented") } -func (UnimplementedPolicyServiceServer) ListPolicies(context.Context, *ListPoliciesRequest) (*ListPoliciesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListPolicies not implemented") +func (UnimplementedProfileServiceServer) ListProfiles(context.Context, *ListProfilesRequest) (*ListProfilesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListProfiles not implemented") } -func (UnimplementedPolicyServiceServer) GetPolicyById(context.Context, *GetPolicyByIdRequest) (*GetPolicyByIdResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPolicyById not implemented") +func (UnimplementedProfileServiceServer) GetProfileById(context.Context, *GetProfileByIdRequest) (*GetProfileByIdResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetProfileById not implemented") } -func (UnimplementedPolicyServiceServer) GetPolicyStatusByName(context.Context, *GetPolicyStatusByNameRequest) (*GetPolicyStatusByNameResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPolicyStatusByName not implemented") +func (UnimplementedProfileServiceServer) GetProfileStatusByName(context.Context, *GetProfileStatusByNameRequest) (*GetProfileStatusByNameResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetProfileStatusByName not implemented") } -func (UnimplementedPolicyServiceServer) GetPolicyStatusByProject(context.Context, *GetPolicyStatusByProjectRequest) (*GetPolicyStatusByProjectResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPolicyStatusByProject not implemented") +func (UnimplementedProfileServiceServer) GetProfileStatusByProject(context.Context, *GetProfileStatusByProjectRequest) (*GetProfileStatusByProjectResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetProfileStatusByProject not implemented") } -func (UnimplementedPolicyServiceServer) ListRuleTypes(context.Context, *ListRuleTypesRequest) (*ListRuleTypesResponse, error) { +func (UnimplementedProfileServiceServer) ListRuleTypes(context.Context, *ListRuleTypesRequest) (*ListRuleTypesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListRuleTypes not implemented") } -func (UnimplementedPolicyServiceServer) GetRuleTypeByName(context.Context, *GetRuleTypeByNameRequest) (*GetRuleTypeByNameResponse, error) { +func (UnimplementedProfileServiceServer) GetRuleTypeByName(context.Context, *GetRuleTypeByNameRequest) (*GetRuleTypeByNameResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRuleTypeByName not implemented") } -func (UnimplementedPolicyServiceServer) GetRuleTypeById(context.Context, *GetRuleTypeByIdRequest) (*GetRuleTypeByIdResponse, error) { +func (UnimplementedProfileServiceServer) GetRuleTypeById(context.Context, *GetRuleTypeByIdRequest) (*GetRuleTypeByIdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRuleTypeById not implemented") } -func (UnimplementedPolicyServiceServer) CreateRuleType(context.Context, *CreateRuleTypeRequest) (*CreateRuleTypeResponse, error) { +func (UnimplementedProfileServiceServer) CreateRuleType(context.Context, *CreateRuleTypeRequest) (*CreateRuleTypeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateRuleType not implemented") } -func (UnimplementedPolicyServiceServer) UpdateRuleType(context.Context, *UpdateRuleTypeRequest) (*UpdateRuleTypeResponse, error) { +func (UnimplementedProfileServiceServer) UpdateRuleType(context.Context, *UpdateRuleTypeRequest) (*UpdateRuleTypeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateRuleType not implemented") } -func (UnimplementedPolicyServiceServer) DeleteRuleType(context.Context, *DeleteRuleTypeRequest) (*DeleteRuleTypeResponse, error) { +func (UnimplementedProfileServiceServer) DeleteRuleType(context.Context, *DeleteRuleTypeRequest) (*DeleteRuleTypeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteRuleType not implemented") } -func (UnimplementedPolicyServiceServer) mustEmbedUnimplementedPolicyServiceServer() {} +func (UnimplementedProfileServiceServer) mustEmbedUnimplementedProfileServiceServer() {} -// UnsafePolicyServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to PolicyServiceServer will +// UnsafeProfileServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ProfileServiceServer will // result in compilation errors. -type UnsafePolicyServiceServer interface { - mustEmbedUnimplementedPolicyServiceServer() +type UnsafeProfileServiceServer interface { + mustEmbedUnimplementedProfileServiceServer() } -func RegisterPolicyServiceServer(s grpc.ServiceRegistrar, srv PolicyServiceServer) { - s.RegisterService(&PolicyService_ServiceDesc, srv) +func RegisterProfileServiceServer(s grpc.ServiceRegistrar, srv ProfileServiceServer) { + s.RegisterService(&ProfileService_ServiceDesc, srv) } -func _PolicyService_CreatePolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreatePolicyRequest) +func _ProfileService_CreateProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateProfileRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PolicyServiceServer).CreatePolicy(ctx, in) + return srv.(ProfileServiceServer).CreateProfile(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: PolicyService_CreatePolicy_FullMethodName, + FullMethod: ProfileService_CreateProfile_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PolicyServiceServer).CreatePolicy(ctx, req.(*CreatePolicyRequest)) + return srv.(ProfileServiceServer).CreateProfile(ctx, req.(*CreateProfileRequest)) } return interceptor(ctx, in, info, handler) } -func _PolicyService_DeletePolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeletePolicyRequest) +func _ProfileService_DeleteProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteProfileRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PolicyServiceServer).DeletePolicy(ctx, in) + return srv.(ProfileServiceServer).DeleteProfile(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: PolicyService_DeletePolicy_FullMethodName, + FullMethod: ProfileService_DeleteProfile_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PolicyServiceServer).DeletePolicy(ctx, req.(*DeletePolicyRequest)) + return srv.(ProfileServiceServer).DeleteProfile(ctx, req.(*DeleteProfileRequest)) } return interceptor(ctx, in, info, handler) } -func _PolicyService_ListPolicies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListPoliciesRequest) +func _ProfileService_ListProfiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListProfilesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PolicyServiceServer).ListPolicies(ctx, in) + return srv.(ProfileServiceServer).ListProfiles(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: PolicyService_ListPolicies_FullMethodName, + FullMethod: ProfileService_ListProfiles_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PolicyServiceServer).ListPolicies(ctx, req.(*ListPoliciesRequest)) + return srv.(ProfileServiceServer).ListProfiles(ctx, req.(*ListProfilesRequest)) } return interceptor(ctx, in, info, handler) } -func _PolicyService_GetPolicyById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPolicyByIdRequest) +func _ProfileService_GetProfileById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetProfileByIdRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PolicyServiceServer).GetPolicyById(ctx, in) + return srv.(ProfileServiceServer).GetProfileById(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: PolicyService_GetPolicyById_FullMethodName, + FullMethod: ProfileService_GetProfileById_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PolicyServiceServer).GetPolicyById(ctx, req.(*GetPolicyByIdRequest)) + return srv.(ProfileServiceServer).GetProfileById(ctx, req.(*GetProfileByIdRequest)) } return interceptor(ctx, in, info, handler) } -func _PolicyService_GetPolicyStatusByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPolicyStatusByNameRequest) +func _ProfileService_GetProfileStatusByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetProfileStatusByNameRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PolicyServiceServer).GetPolicyStatusByName(ctx, in) + return srv.(ProfileServiceServer).GetProfileStatusByName(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: PolicyService_GetPolicyStatusByName_FullMethodName, + FullMethod: ProfileService_GetProfileStatusByName_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PolicyServiceServer).GetPolicyStatusByName(ctx, req.(*GetPolicyStatusByNameRequest)) + return srv.(ProfileServiceServer).GetProfileStatusByName(ctx, req.(*GetProfileStatusByNameRequest)) } return interceptor(ctx, in, info, handler) } -func _PolicyService_GetPolicyStatusByProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPolicyStatusByProjectRequest) +func _ProfileService_GetProfileStatusByProject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetProfileStatusByProjectRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PolicyServiceServer).GetPolicyStatusByProject(ctx, in) + return srv.(ProfileServiceServer).GetProfileStatusByProject(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: PolicyService_GetPolicyStatusByProject_FullMethodName, + FullMethod: ProfileService_GetProfileStatusByProject_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PolicyServiceServer).GetPolicyStatusByProject(ctx, req.(*GetPolicyStatusByProjectRequest)) + return srv.(ProfileServiceServer).GetProfileStatusByProject(ctx, req.(*GetProfileStatusByProjectRequest)) } return interceptor(ctx, in, info, handler) } -func _PolicyService_ListRuleTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _ProfileService_ListRuleTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListRuleTypesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PolicyServiceServer).ListRuleTypes(ctx, in) + return srv.(ProfileServiceServer).ListRuleTypes(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: PolicyService_ListRuleTypes_FullMethodName, + FullMethod: ProfileService_ListRuleTypes_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PolicyServiceServer).ListRuleTypes(ctx, req.(*ListRuleTypesRequest)) + return srv.(ProfileServiceServer).ListRuleTypes(ctx, req.(*ListRuleTypesRequest)) } return interceptor(ctx, in, info, handler) } -func _PolicyService_GetRuleTypeByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _ProfileService_GetRuleTypeByName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetRuleTypeByNameRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PolicyServiceServer).GetRuleTypeByName(ctx, in) + return srv.(ProfileServiceServer).GetRuleTypeByName(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: PolicyService_GetRuleTypeByName_FullMethodName, + FullMethod: ProfileService_GetRuleTypeByName_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PolicyServiceServer).GetRuleTypeByName(ctx, req.(*GetRuleTypeByNameRequest)) + return srv.(ProfileServiceServer).GetRuleTypeByName(ctx, req.(*GetRuleTypeByNameRequest)) } return interceptor(ctx, in, info, handler) } -func _PolicyService_GetRuleTypeById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _ProfileService_GetRuleTypeById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetRuleTypeByIdRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PolicyServiceServer).GetRuleTypeById(ctx, in) + return srv.(ProfileServiceServer).GetRuleTypeById(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: PolicyService_GetRuleTypeById_FullMethodName, + FullMethod: ProfileService_GetRuleTypeById_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PolicyServiceServer).GetRuleTypeById(ctx, req.(*GetRuleTypeByIdRequest)) + return srv.(ProfileServiceServer).GetRuleTypeById(ctx, req.(*GetRuleTypeByIdRequest)) } return interceptor(ctx, in, info, handler) } -func _PolicyService_CreateRuleType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _ProfileService_CreateRuleType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateRuleTypeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PolicyServiceServer).CreateRuleType(ctx, in) + return srv.(ProfileServiceServer).CreateRuleType(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: PolicyService_CreateRuleType_FullMethodName, + FullMethod: ProfileService_CreateRuleType_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PolicyServiceServer).CreateRuleType(ctx, req.(*CreateRuleTypeRequest)) + return srv.(ProfileServiceServer).CreateRuleType(ctx, req.(*CreateRuleTypeRequest)) } return interceptor(ctx, in, info, handler) } -func _PolicyService_UpdateRuleType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _ProfileService_UpdateRuleType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateRuleTypeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PolicyServiceServer).UpdateRuleType(ctx, in) + return srv.(ProfileServiceServer).UpdateRuleType(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: PolicyService_UpdateRuleType_FullMethodName, + FullMethod: ProfileService_UpdateRuleType_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PolicyServiceServer).UpdateRuleType(ctx, req.(*UpdateRuleTypeRequest)) + return srv.(ProfileServiceServer).UpdateRuleType(ctx, req.(*UpdateRuleTypeRequest)) } return interceptor(ctx, in, info, handler) } -func _PolicyService_DeleteRuleType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _ProfileService_DeleteRuleType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteRuleTypeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PolicyServiceServer).DeleteRuleType(ctx, in) + return srv.(ProfileServiceServer).DeleteRuleType(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: PolicyService_DeleteRuleType_FullMethodName, + FullMethod: ProfileService_DeleteRuleType_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PolicyServiceServer).DeleteRuleType(ctx, req.(*DeleteRuleTypeRequest)) + return srv.(ProfileServiceServer).DeleteRuleType(ctx, req.(*DeleteRuleTypeRequest)) } return interceptor(ctx, in, info, handler) } -// PolicyService_ServiceDesc is the grpc.ServiceDesc for PolicyService service. +// ProfileService_ServiceDesc is the grpc.ServiceDesc for ProfileService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) -var PolicyService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "mediator.v1.PolicyService", - HandlerType: (*PolicyServiceServer)(nil), +var ProfileService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "mediator.v1.ProfileService", + HandlerType: (*ProfileServiceServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "CreatePolicy", - Handler: _PolicyService_CreatePolicy_Handler, + MethodName: "CreateProfile", + Handler: _ProfileService_CreateProfile_Handler, }, { - MethodName: "DeletePolicy", - Handler: _PolicyService_DeletePolicy_Handler, + MethodName: "DeleteProfile", + Handler: _ProfileService_DeleteProfile_Handler, }, { - MethodName: "ListPolicies", - Handler: _PolicyService_ListPolicies_Handler, + MethodName: "ListProfiles", + Handler: _ProfileService_ListProfiles_Handler, }, { - MethodName: "GetPolicyById", - Handler: _PolicyService_GetPolicyById_Handler, + MethodName: "GetProfileById", + Handler: _ProfileService_GetProfileById_Handler, }, { - MethodName: "GetPolicyStatusByName", - Handler: _PolicyService_GetPolicyStatusByName_Handler, + MethodName: "GetProfileStatusByName", + Handler: _ProfileService_GetProfileStatusByName_Handler, }, { - MethodName: "GetPolicyStatusByProject", - Handler: _PolicyService_GetPolicyStatusByProject_Handler, + MethodName: "GetProfileStatusByProject", + Handler: _ProfileService_GetProfileStatusByProject_Handler, }, { MethodName: "ListRuleTypes", - Handler: _PolicyService_ListRuleTypes_Handler, + Handler: _ProfileService_ListRuleTypes_Handler, }, { MethodName: "GetRuleTypeByName", - Handler: _PolicyService_GetRuleTypeByName_Handler, + Handler: _ProfileService_GetRuleTypeByName_Handler, }, { MethodName: "GetRuleTypeById", - Handler: _PolicyService_GetRuleTypeById_Handler, + Handler: _ProfileService_GetRuleTypeById_Handler, }, { MethodName: "CreateRuleType", - Handler: _PolicyService_CreateRuleType_Handler, + Handler: _ProfileService_CreateRuleType_Handler, }, { MethodName: "UpdateRuleType", - Handler: _PolicyService_UpdateRuleType_Handler, + Handler: _ProfileService_UpdateRuleType_Handler, }, { MethodName: "DeleteRuleType", - Handler: _PolicyService_DeleteRuleType_Handler, + Handler: _ProfileService_DeleteRuleType_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/pkg/api/protobuf/go/mediator/v1/policy.go b/pkg/api/protobuf/go/mediator/v1/profile.go similarity index 100% rename from pkg/api/protobuf/go/mediator/v1/policy.go rename to pkg/api/protobuf/go/mediator/v1/profile.go diff --git a/pkg/api/protobuf/go/mediator/v1/validators.go b/pkg/api/protobuf/go/mediator/v1/validators.go index ebf3037817..e626a2df25 100644 --- a/pkg/api/protobuf/go/mediator/v1/validators.go +++ b/pkg/api/protobuf/go/mediator/v1/validators.go @@ -20,7 +20,7 @@ import ( ) var ( - // ErrValidationFailed is returned when a policy fails validation + // ErrValidationFailed is returned when a profile fails validation ErrValidationFailed = fmt.Errorf("validation failed") ) @@ -118,13 +118,13 @@ func (def *RuleType_Definition) Validate() error { return nil } -// Validate validates a pipeline policy -func (p *Policy) Validate() error { +// Validate validates a pipeline profile +func (p *Profile) Validate() error { if p.Name == "" { - return fmt.Errorf("%w: policy name cannot be empty", ErrValidationFailed) + return fmt.Errorf("%w: profile name cannot be empty", ErrValidationFailed) } - // If the policy is nil or empty, we don't need to validate it + // If the profile is nil or empty, we don't need to validate it if p.Repository != nil && len(p.Repository) > 0 { return validateEntity(p.Repository) } @@ -144,7 +144,7 @@ func (p *Policy) Validate() error { return nil } -func validateEntity(e []*Policy_Rule) error { +func validateEntity(e []*Profile_Rule) error { if len(e) == 0 { return fmt.Errorf("%w: entity rules cannot be empty", ErrValidationFailed) } @@ -162,7 +162,7 @@ func validateEntity(e []*Policy_Rule) error { return nil } -func validateRule(r *Policy_Rule) error { +func validateRule(r *Profile_Rule) error { if r.Type == "" { return fmt.Errorf("%w: rule type cannot be empty", ErrValidationFailed) } diff --git a/proto/mediator/v1/mediator.proto b/proto/mediator/v1/mediator.proto index 0915b00b00..c0ab380ba1 100644 --- a/proto/mediator/v1/mediator.proto +++ b/proto/mediator/v1/mediator.proto @@ -665,10 +665,10 @@ service UserService { } -service PolicyService { - rpc CreatePolicy (CreatePolicyRequest) returns (CreatePolicyResponse) { +service ProfileService { + rpc CreateProfile (CreateProfileRequest) returns (CreateProfileResponse) { option (google.api.http) = { - post: "/api/v1/policy" + post: "/api/v1/profile" body: "*" }; @@ -678,9 +678,9 @@ service PolicyService { }; } - rpc DeletePolicy (DeletePolicyRequest) returns (DeletePolicyResponse) { + rpc DeleteProfile (DeleteProfileRequest) returns (DeleteProfileResponse) { option (google.api.http) = { - delete: "/api/v1/policy/{id}" + delete: "/api/v1/profile/{id}" }; option (rpc_options) = { @@ -689,9 +689,9 @@ service PolicyService { }; } - rpc ListPolicies (ListPoliciesRequest) returns (ListPoliciesResponse) { + rpc ListProfiles (ListProfilesRequest) returns (ListProfilesResponse) { option (google.api.http) = { - get: "/api/v1/policies" + get: "/api/v1/profiles" }; option (rpc_options) = { @@ -700,15 +700,15 @@ service PolicyService { }; } - rpc GetPolicyById (GetPolicyByIdRequest) returns (GetPolicyByIdResponse) { + rpc GetProfileById (GetProfileByIdRequest) returns (GetProfileByIdResponse) { option (google.api.http) = { - get: "/api/v1/policy/{id}" + get: "/api/v1/profile/{id}" }; } - rpc GetPolicyStatusByName (GetPolicyStatusByNameRequest) returns (GetPolicyStatusByNameResponse) { + rpc GetProfileStatusByName (GetProfileStatusByNameRequest) returns (GetProfileStatusByNameResponse) { option (google.api.http) = { - get: "/api/v1/policy/name/{name}/status" + get: "/api/v1/profile/name/{name}/status" }; option (rpc_options) = { @@ -717,9 +717,9 @@ service PolicyService { }; } - rpc GetPolicyStatusByProject (GetPolicyStatusByProjectRequest) returns (GetPolicyStatusByProjectResponse) { + rpc GetProfileStatusByProject (GetProfileStatusByProjectRequest) returns (GetProfileStatusByProjectResponse) { option (google.api.http) = { - get: "/api/v1/policy_status" + get: "/api/v1/profile_status" }; option (rpc_options) = { @@ -1426,63 +1426,63 @@ message GetUserResponse { repeated RoleRecord roles = 3; } -// Policy service -message CreatePolicyRequest { - Policy policy = 1; +// Profile service +message CreateProfileRequest { + Profile profile = 1; } -message CreatePolicyResponse { - Policy policy = 1; +message CreateProfileResponse { + Profile profile = 1; } -message DeletePolicyRequest { +message DeleteProfileRequest { // context is the context in which the rule type is evaluated. Context context = 1; - // id is the id of the policy to delete + // id is the id of the profile to delete string id = 2; } -message DeletePolicyResponse { +message DeleteProfileResponse { } -// list policies -message ListPoliciesRequest { - // context is the context which contains the policies +// list profiles +message ListProfilesRequest { + // context is the context which contains the profiles Context context = 1; } -message ListPoliciesResponse { - repeated Policy policies = 1; +message ListProfilesResponse { + repeated Profile profiles = 1; } -// get policy by id -message GetPolicyByIdRequest { - // context is the context which contains the policies +// get profile by id +message GetProfileByIdRequest { + // context is the context which contains the profiles Context context = 1; - // id is the id of the policy to get + // id is the id of the profile to get string id = 2; } -message GetPolicyByIdResponse { - Policy policy = 1; +message GetProfileByIdResponse { + Profile profile = 1; } -// get the overall policy status -message PolicyStatus { - // policy_id is the id of the policy - string policy_id = 1; - // policy_name is the name of the policy - string policy_name = 2; - // policy_status is the status of the policy - string policy_status = 3; - // last_updated is the last time the policy was updated +// get the overall profile status +message ProfileStatus { + // profile_id is the id of the profile + string profile_id = 1; + // profile_name is the name of the profile + string profile_name = 2; + // profile_status is the status of the profile + string profile_status = 3; + // last_updated is the last time the profile was updated google.protobuf.Timestamp last_updated = 4; } -// get the status of the rules for a given policy +// get the status of the rules for a given profile message RuleEvaluationStatus { - // policy_id is the id of the policy - string policy_id = 1; + // profile_id is the id of the profile + string profile_id = 1; // rule_id is the id of the rule string rule_id = 2; // rule_name is the name of the rule @@ -1491,7 +1491,7 @@ message RuleEvaluationStatus { string entity = 4; // status is the status of the evaluation string status = 5; - // last_updated is the last time the policy was updated + // last_updated is the last time the profile was updated google.protobuf.Timestamp last_updated = 6; // entity_info is the information about the entity map entity_info = 7; @@ -1507,10 +1507,10 @@ message RuleEvaluationStatus { string remediation_details = 12; } -message GetPolicyStatusByNameRequest { +message GetProfileStatusByNameRequest { // context is the context in which the rule type is evaluated. Context context = 1; - // name is the name of the policy to get + // name is the name of the profile to get string name = 2; // EntiryTypeId is a message that carries an ID together with a type to uniquely identify an entity @@ -1528,22 +1528,22 @@ message GetPolicyStatusByNameRequest { string rule = 5; } -message GetPolicyStatusByNameResponse { - // policy_status is the status of the policy - PolicyStatus policy_status = 1; +message GetProfileStatusByNameResponse { + // profile_status is the status of the profile + ProfileStatus profile_status = 1; // rule_evaluation_status is the status of the rules repeated RuleEvaluationStatus rule_evaluation_status = 2; } -message GetPolicyStatusByProjectRequest { +message GetProfileStatusByProjectRequest { // context is the context in which the rule type is evaluated. Context context = 1; } -message GetPolicyStatusByProjectResponse { - // policy_status is the status of the policy - repeated PolicyStatus policy_status = 1; +message GetProfileStatusByProjectResponse { + // profile_status is the status of the profile + repeated ProfileStatus profile_status = 1; } message GetPublicKeyRequest { @@ -1839,8 +1839,8 @@ message RuleType { // Ingested points to the data retrieved in the `ingest` section Operator ingested = 1; - // Policy points to the policy itself. - Operator policy = 2; + // Profile points to the profile itself. + Operator profile = 2; } message Rego { @@ -1848,14 +1848,14 @@ message RuleType { // for rego. We currently have two modes of operation: // - deny-by-default: this is the default mode of operation // where we deny access by default and allow access only - // if the policy explicitly allows it. It expects the - // policy to set an `allow` variable to true or false. + // if the profile explicitly allows it. It expects the + // profile to set an `allow` variable to true or false. // - constraints: this is the mode of operation where we // allow access by default and deny access only if a - // violation is found. It expects the policy to set a + // violation is found. It expects the profile to set a // `violations` variable with a "msg" field. string type = 1; - // def is the definition of the rego policy. + // def is the definition of the rego profile. string def = 2; } @@ -1868,7 +1868,7 @@ message RuleType { // jq is only used if the `jq` type is selected. // It defines the comparisons that are made between - // the ingested data and the policy rule. + // the ingested data and the profile rule. repeated JQComparison jq = 2; // rego is only used if the `rego` type is selected. @@ -1897,16 +1897,16 @@ message RuleType { string guidance = 6; } - // Policy defines a policy that is user defined. - message Policy { - // context is the context in which the policy is evaluated. + // Profile defines a profile that is user defined. + message Profile { + // context is the context in which the profile is evaluated. Context context = 1; - // id is the id of the policy. + // id is the id of the profile. // This is optional and is set by the system. optional string id = 2; - // name is the name of the policy instance. + // name is the name of the profile instance. string name = 3; // Rule defines the individual call of a certain rule type. @@ -1921,7 +1921,7 @@ message RuleType { google.protobuf.Struct def = 3; } - // These are the entities that one could set in the policy. + // These are the entities that one could set in the profile. repeated Rule repository = 4; repeated Rule build_environment = 5; repeated Rule artifact = 6; diff --git a/tools/setup.sh b/tools/setup.sh index b3c848d80b..962988f177 100755 --- a/tools/setup.sh +++ b/tools/setup.sh @@ -29,6 +29,6 @@ echo '$ medic rule_type create -f examples/github/rule-types/' echo '---' medic rule_type create -f examples/github/rule-types/ -#echo '$ medic policy create -f examples/github/policies/policy.yaml' +#echo '$ medic profile create -f examples/github/profiles/profile.yaml' #echo '---' -medic policy create -f examples/github/policies/policy.yaml +medic profile create -f examples/github/profiles/profile.yaml