From 08be0c51fcb43e1ed91b775d5523f0eb792e5ee6 Mon Sep 17 00:00:00 2001 From: Michael Okoko <10512379+idoqo@users.noreply.github.com> Date: Wed, 7 Feb 2024 12:27:42 +0100 Subject: [PATCH] PMM-12677 stt naming cleanup (#2805) * update tests * rename security checks to advisor checks * update test files * update route --- api-tests/server/advisors_test.go | 68 +- api-tests/server/helpers.go | 16 +- api/management/v1/checks.pb.go | 935 +++-- api/management/v1/checks.pb.gw.go | 198 +- api/management/v1/checks.pb.validate.go | 477 ++- api/management/v1/checks.proto | 80 +- api/management/v1/checks_grpc.pb.go | 200 +- .../advisor_service_client.go} | 106 +- .../change_advisor_checks_parameters.go | 144 + .../change_advisor_checks_responses.go | 459 +++ .../get_failed_checks_parameters.go | 2 +- .../get_failed_checks_responses.go | 6 +- .../list_advisor_checks_parameters.go | 146 + .../list_advisor_checks_responses.go | 523 +++ .../list_advisors_parameters.go | 2 +- .../list_advisors_responses.go | 26 +- .../list_failed_services_parameters.go | 2 +- .../list_failed_services_responses.go | 6 +- .../start_advisor_checks_parameters.go | 144 + .../start_advisor_checks_responses.go | 295 ++ .../json/client/pmm_management_api_client.go | 10 +- .../change_security_checks_parameters.go | 144 - .../change_security_checks_responses.go | 459 --- .../list_security_checks_parameters.go | 146 - .../list_security_checks_responses.go | 523 --- .../start_security_checks_parameters.go | 144 - .../start_security_checks_responses.go | 295 -- api/management/v1/json/v1.json | 1324 +++--- api/swagger/swagger-dev.json | 3614 ++++++++--------- api/swagger/swagger.json | 1330 +++--- descriptor.bin | Bin 680604 -> 680576 bytes managed/cmd/pmm-managed/main.go | 4 +- managed/services/checks/checks.go | 2 +- managed/services/management/checks.go | 70 +- managed/services/management/checks_test.go | 54 +- 35 files changed, 5973 insertions(+), 5981 deletions(-) rename api/management/v1/json/client/{security_checks_service/security_checks_service_client.go => advisor_service/advisor_service_client.go} (75%) create mode 100644 api/management/v1/json/client/advisor_service/change_advisor_checks_parameters.go create mode 100644 api/management/v1/json/client/advisor_service/change_advisor_checks_responses.go rename api/management/v1/json/client/{security_checks_service => advisor_service}/get_failed_checks_parameters.go (99%) rename api/management/v1/json/client/{security_checks_service => advisor_service}/get_failed_checks_responses.go (98%) create mode 100644 api/management/v1/json/client/advisor_service/list_advisor_checks_parameters.go create mode 100644 api/management/v1/json/client/advisor_service/list_advisor_checks_responses.go rename api/management/v1/json/client/{security_checks_service => advisor_service}/list_advisors_parameters.go (99%) rename api/management/v1/json/client/{security_checks_service => advisor_service}/list_advisors_responses.go (91%) rename api/management/v1/json/client/{security_checks_service => advisor_service}/list_failed_services_parameters.go (99%) rename api/management/v1/json/client/{security_checks_service => advisor_service}/list_failed_services_responses.go (97%) create mode 100644 api/management/v1/json/client/advisor_service/start_advisor_checks_parameters.go create mode 100644 api/management/v1/json/client/advisor_service/start_advisor_checks_responses.go delete mode 100644 api/management/v1/json/client/security_checks_service/change_security_checks_parameters.go delete mode 100644 api/management/v1/json/client/security_checks_service/change_security_checks_responses.go delete mode 100644 api/management/v1/json/client/security_checks_service/list_security_checks_parameters.go delete mode 100644 api/management/v1/json/client/security_checks_service/list_security_checks_responses.go delete mode 100644 api/management/v1/json/client/security_checks_service/start_security_checks_parameters.go delete mode 100644 api/management/v1/json/client/security_checks_service/start_security_checks_responses.go diff --git a/api-tests/server/advisors_test.go b/api-tests/server/advisors_test.go index a11ee87129..9fb41d532f 100644 --- a/api-tests/server/advisors_test.go +++ b/api-tests/server/advisors_test.go @@ -26,7 +26,7 @@ import ( pmmapitests "github.com/percona/pmm/api-tests" managementClient "github.com/percona/pmm/api/management/v1/json/client" - security_checks "github.com/percona/pmm/api/management/v1/json/client/security_checks_service" + advisor "github.com/percona/pmm/api/management/v1/json/client/advisor_service" serverClient "github.com/percona/pmm/api/server/v1/json/client" "github.com/percona/pmm/api/server/v1/json/client/server_service" ) @@ -36,7 +36,7 @@ func TestStartChecks(t *testing.T) { toggleAdvisorChecks(t, true) t.Cleanup(func() { restoreSettingsDefaults(t) }) - resp, err := managementClient.Default.SecurityChecksService.StartSecurityChecks(nil) + resp, err := managementClient.Default.AdvisorService.StartAdvisorChecks(nil) require.NoError(t, err) assert.NotNil(t, resp) }) @@ -45,7 +45,7 @@ func TestStartChecks(t *testing.T) { toggleAdvisorChecks(t, false) t.Cleanup(func() { restoreSettingsDefaults(t) }) - resp, err := managementClient.Default.SecurityChecksService.StartSecurityChecks(nil) + resp, err := managementClient.Default.AdvisorService.StartAdvisorChecks(nil) pmmapitests.AssertAPIErrorf(t, err, 400, codes.FailedPrecondition, `Advisor checks are disabled.`) assert.Nil(t, resp) }) @@ -60,7 +60,7 @@ func TestGetAdvisorCheckResults(t *testing.T) { toggleAdvisorChecks(t, true) t.Cleanup(func() { restoreSettingsDefaults(t) }) - results, err := managementClient.Default.SecurityChecksService.GetFailedChecks(nil) + results, err := managementClient.Default.AdvisorService.GetFailedChecks(nil) pmmapitests.AssertAPIErrorf(t, err, 400, codes.FailedPrecondition, `Advisor checks are disabled.`) assert.Nil(t, results) }) @@ -69,21 +69,21 @@ func TestGetAdvisorCheckResults(t *testing.T) { toggleAdvisorChecks(t, true) t.Cleanup(func() { restoreSettingsDefaults(t) }) - resp, err := managementClient.Default.SecurityChecksService.StartSecurityChecks(nil) + resp, err := managementClient.Default.AdvisorService.StartAdvisorChecks(nil) require.NoError(t, err) assert.NotNil(t, resp) - results, err := managementClient.Default.SecurityChecksService.GetFailedChecks(nil) + results, err := managementClient.Default.AdvisorService.GetFailedChecks(nil) require.NoError(t, err) assert.NotNil(t, results) }) } -func TestListSecurityChecks(t *testing.T) { +func TestListAdvisorChecks(t *testing.T) { toggleAdvisorChecks(t, true) t.Cleanup(func() { restoreSettingsDefaults(t) }) - resp, err := managementClient.Default.SecurityChecksService.ListSecurityChecks(nil) + resp, err := managementClient.Default.AdvisorService.ListAdvisorChecks(nil) require.NoError(t, err) assert.NotNil(t, resp) assert.NotEmpty(t, resp.Payload.Checks) @@ -98,7 +98,7 @@ func TestListAdvisors(t *testing.T) { toggleAdvisorChecks(t, true) t.Cleanup(func() { restoreSettingsDefaults(t) }) - resp, err := managementClient.Default.SecurityChecksService.ListAdvisors(nil) + resp, err := managementClient.Default.AdvisorService.ListAdvisors(nil) require.NoError(t, err) assert.NotNil(t, resp) assert.NotEmpty(t, resp.Payload.Advisors) @@ -118,25 +118,25 @@ func TestListAdvisors(t *testing.T) { } } -func TestChangeSecurityChecks(t *testing.T) { +func TestChangeAdvisorChecks(t *testing.T) { toggleAdvisorChecks(t, true) t.Cleanup(func() { restoreSettingsDefaults(t) }) t.Run("enable disable", func(t *testing.T) { t.Run("enable disable", func(t *testing.T) { - resp, err := managementClient.Default.SecurityChecksService.ListSecurityChecks(nil) + resp, err := managementClient.Default.AdvisorService.ListAdvisorChecks(nil) require.NoError(t, err) require.NotEmpty(t, resp.Payload.Checks) - var check *security_checks.ListSecurityChecksOKBodyChecksItems0 + var check *advisor.ListAdvisorChecksOKBodyChecksItems0 // enable ⥁ disable loop, it checks current state of first returned check and changes its state, // then in second iteration it returns state to its origin. for i := 0; i < 2; i++ { check = resp.Payload.Checks[0] - params := &security_checks.ChangeSecurityChecksParams{ - Body: security_checks.ChangeSecurityChecksBody{ - Params: []*security_checks.ChangeSecurityChecksParamsBodyParamsItems0{ + params := &advisor.ChangeAdvisorChecksParams{ + Body: advisor.ChangeAdvisorChecksBody{ + Params: []*advisor.ChangeAdvisorChecksParamsBodyParamsItems0{ { Name: check.Name, Enable: pointer.ToBool(!check.Enabled), @@ -146,10 +146,10 @@ func TestChangeSecurityChecks(t *testing.T) { Context: pmmapitests.Context, } - _, err = managementClient.Default.SecurityChecksService.ChangeSecurityChecks(params) + _, err = managementClient.Default.AdvisorService.ChangeAdvisorChecks(params) require.NoError(t, err) - resp, err = managementClient.Default.SecurityChecksService.ListSecurityChecks(nil) + resp, err = managementClient.Default.AdvisorService.ListAdvisorChecks(nil) require.NoError(t, err) require.NotEmpty(t, resp.Payload.Checks) @@ -165,15 +165,15 @@ func TestChangeSecurityChecks(t *testing.T) { t.Run("change interval error", func(t *testing.T) { t.Cleanup(func() { restoreCheckIntervalDefaults(t) }) - resp, err := managementClient.Default.SecurityChecksService.ListSecurityChecks(nil) + resp, err := managementClient.Default.AdvisorService.ListAdvisorChecks(nil) require.NoError(t, err) require.NotEmpty(t, resp.Payload.Checks) check := resp.Payload.Checks[0] interval := *check.Interval - params := &security_checks.ChangeSecurityChecksParams{ - Body: security_checks.ChangeSecurityChecksBody{ - Params: []*security_checks.ChangeSecurityChecksParamsBodyParamsItems0{ + params := &advisor.ChangeAdvisorChecksParams{ + Body: advisor.ChangeAdvisorChecksBody{ + Params: []*advisor.ChangeAdvisorChecksParamsBodyParamsItems0{ { Name: check.Name, Interval: pointer.ToString("unknown_interval"), @@ -183,10 +183,10 @@ func TestChangeSecurityChecks(t *testing.T) { Context: pmmapitests.Context, } - _, err = managementClient.Default.SecurityChecksService.ChangeSecurityChecks(params) + _, err = managementClient.Default.AdvisorService.ChangeAdvisorChecks(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid value for enum type: \"unknown_interval\"") - resp, err = managementClient.Default.SecurityChecksService.ListSecurityChecks(nil) + resp, err = managementClient.Default.AdvisorService.ListAdvisorChecks(nil) require.NoError(t, err) require.NotEmpty(t, resp.Payload.Checks) @@ -204,39 +204,39 @@ func TestChangeSecurityChecks(t *testing.T) { t.Run("change interval normal", func(t *testing.T) { t.Cleanup(func() { restoreSettingsDefaults(t) }) - resp, err := managementClient.Default.SecurityChecksService.ListSecurityChecks(nil) + resp, err := managementClient.Default.AdvisorService.ListAdvisorChecks(nil) require.NoError(t, err) require.NotEmpty(t, resp.Payload.Checks) // convert all checks to RARE interval - pp := make([]*security_checks.ChangeSecurityChecksParamsBodyParamsItems0, len(resp.Payload.Checks)) + pp := make([]*advisor.ChangeAdvisorChecksParamsBodyParamsItems0, len(resp.Payload.Checks)) for i, check := range resp.Payload.Checks { - pp[i] = &security_checks.ChangeSecurityChecksParamsBodyParamsItems0{ + pp[i] = &advisor.ChangeAdvisorChecksParamsBodyParamsItems0{ Name: check.Name, - Interval: pointer.ToString(security_checks.ChangeSecurityChecksParamsBodyParamsItems0IntervalSECURITYCHECKINTERVALRARE), + Interval: pointer.ToString(advisor.ChangeAdvisorChecksParamsBodyParamsItems0IntervalADVISORCHECKINTERVALRARE), } } - params := &security_checks.ChangeSecurityChecksParams{ - Body: security_checks.ChangeSecurityChecksBody{Params: pp}, + params := &advisor.ChangeAdvisorChecksParams{ + Body: advisor.ChangeAdvisorChecksBody{Params: pp}, Context: pmmapitests.Context, } - _, err = managementClient.Default.SecurityChecksService.ChangeSecurityChecks(params) + _, err = managementClient.Default.AdvisorService.ChangeAdvisorChecks(params) require.NoError(t, err) - resp, err = managementClient.Default.SecurityChecksService.ListSecurityChecks(nil) + resp, err = managementClient.Default.AdvisorService.ListAdvisorChecks(nil) require.NoError(t, err) require.NotEmpty(t, resp.Payload.Checks) for _, check := range resp.Payload.Checks { - assert.Equal(t, "SECURITY_CHECK_INTERVAL_RARE", *check.Interval) + assert.Equal(t, "ADVISOR_CHECK_INTERVAL_RARE", *check.Interval) } t.Run("intervals should be preserved on restart", func(t *testing.T) { - resp, err := managementClient.Default.SecurityChecksService.ListSecurityChecks(nil) + resp, err := managementClient.Default.AdvisorService.ListAdvisorChecks(nil) require.NoError(t, err) require.NotEmpty(t, resp.Payload.Checks) - assert.Equal(t, "SECURITY_CHECK_INTERVAL_RARE", *resp.Payload.Checks[0].Interval) + assert.Equal(t, "ADVISOR_CHECK_INTERVAL_RARE", *resp.Payload.Checks[0].Interval) }) }) }) diff --git a/api-tests/server/helpers.go b/api-tests/server/helpers.go index 6f1c0ff671..7387fcbe61 100644 --- a/api-tests/server/helpers.go +++ b/api-tests/server/helpers.go @@ -25,7 +25,7 @@ import ( pmmapitests "github.com/percona/pmm/api-tests" managementClient "github.com/percona/pmm/api/management/v1/json/client" - security_checks "github.com/percona/pmm/api/management/v1/json/client/security_checks_service" + advisor "github.com/percona/pmm/api/management/v1/json/client/advisor_service" serverClient "github.com/percona/pmm/api/server/v1/json/client" server "github.com/percona/pmm/api/server/v1/json/client/server_service" ) @@ -77,26 +77,26 @@ func restoreSettingsDefaults(t *testing.T) { func restoreCheckIntervalDefaults(t *testing.T) { t.Helper() - resp, err := managementClient.Default.SecurityChecksService.ListSecurityChecks(nil) + resp, err := managementClient.Default.AdvisorService.ListAdvisorChecks(nil) require.NoError(t, err) require.NotEmpty(t, resp.Payload.Checks) - var params *security_checks.ChangeSecurityChecksParams + var params *advisor.ChangeAdvisorChecksParams for _, check := range resp.Payload.Checks { - params = &security_checks.ChangeSecurityChecksParams{ - Body: security_checks.ChangeSecurityChecksBody{ - Params: []*security_checks.ChangeSecurityChecksParamsBodyParamsItems0{ + params = &advisor.ChangeAdvisorChecksParams{ + Body: advisor.ChangeAdvisorChecksBody{ + Params: []*advisor.ChangeAdvisorChecksParamsBodyParamsItems0{ { Name: check.Name, - Interval: pointer.ToString(security_checks.ChangeSecurityChecksParamsBodyParamsItems0IntervalSECURITYCHECKINTERVALSTANDARD), + Interval: pointer.ToString(advisor.ChangeAdvisorChecksParamsBodyParamsItems0IntervalADVISORCHECKINTERVALSTANDARD), }, }, }, Context: pmmapitests.Context, } - _, err = managementClient.Default.SecurityChecksService.ChangeSecurityChecks(params) + _, err = managementClient.Default.AdvisorService.ChangeAdvisorChecks(params) require.NoError(t, err) } } diff --git a/api/management/v1/checks.pb.go b/api/management/v1/checks.pb.go index 33798281b5..4c11349a77 100644 --- a/api/management/v1/checks.pb.go +++ b/api/management/v1/checks.pb.go @@ -23,56 +23,56 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// SecurityCheckInterval represents possible execution interval values for checks. -type SecurityCheckInterval int32 +// AdvisorCheckInterval represents possible execution interval values for checks. +type AdvisorCheckInterval int32 const ( - SecurityCheckInterval_SECURITY_CHECK_INTERVAL_UNSPECIFIED SecurityCheckInterval = 0 - SecurityCheckInterval_SECURITY_CHECK_INTERVAL_STANDARD SecurityCheckInterval = 1 - SecurityCheckInterval_SECURITY_CHECK_INTERVAL_FREQUENT SecurityCheckInterval = 2 - SecurityCheckInterval_SECURITY_CHECK_INTERVAL_RARE SecurityCheckInterval = 3 + AdvisorCheckInterval_ADVISOR_CHECK_INTERVAL_UNSPECIFIED AdvisorCheckInterval = 0 + AdvisorCheckInterval_ADVISOR_CHECK_INTERVAL_STANDARD AdvisorCheckInterval = 1 + AdvisorCheckInterval_ADVISOR_CHECK_INTERVAL_FREQUENT AdvisorCheckInterval = 2 + AdvisorCheckInterval_ADVISOR_CHECK_INTERVAL_RARE AdvisorCheckInterval = 3 ) -// Enum value maps for SecurityCheckInterval. +// Enum value maps for AdvisorCheckInterval. var ( - SecurityCheckInterval_name = map[int32]string{ - 0: "SECURITY_CHECK_INTERVAL_UNSPECIFIED", - 1: "SECURITY_CHECK_INTERVAL_STANDARD", - 2: "SECURITY_CHECK_INTERVAL_FREQUENT", - 3: "SECURITY_CHECK_INTERVAL_RARE", - } - SecurityCheckInterval_value = map[string]int32{ - "SECURITY_CHECK_INTERVAL_UNSPECIFIED": 0, - "SECURITY_CHECK_INTERVAL_STANDARD": 1, - "SECURITY_CHECK_INTERVAL_FREQUENT": 2, - "SECURITY_CHECK_INTERVAL_RARE": 3, + AdvisorCheckInterval_name = map[int32]string{ + 0: "ADVISOR_CHECK_INTERVAL_UNSPECIFIED", + 1: "ADVISOR_CHECK_INTERVAL_STANDARD", + 2: "ADVISOR_CHECK_INTERVAL_FREQUENT", + 3: "ADVISOR_CHECK_INTERVAL_RARE", + } + AdvisorCheckInterval_value = map[string]int32{ + "ADVISOR_CHECK_INTERVAL_UNSPECIFIED": 0, + "ADVISOR_CHECK_INTERVAL_STANDARD": 1, + "ADVISOR_CHECK_INTERVAL_FREQUENT": 2, + "ADVISOR_CHECK_INTERVAL_RARE": 3, } ) -func (x SecurityCheckInterval) Enum() *SecurityCheckInterval { - p := new(SecurityCheckInterval) +func (x AdvisorCheckInterval) Enum() *AdvisorCheckInterval { + p := new(AdvisorCheckInterval) *p = x return p } -func (x SecurityCheckInterval) String() string { +func (x AdvisorCheckInterval) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (SecurityCheckInterval) Descriptor() protoreflect.EnumDescriptor { +func (AdvisorCheckInterval) Descriptor() protoreflect.EnumDescriptor { return file_management_v1_checks_proto_enumTypes[0].Descriptor() } -func (SecurityCheckInterval) Type() protoreflect.EnumType { +func (AdvisorCheckInterval) Type() protoreflect.EnumType { return &file_management_v1_checks_proto_enumTypes[0] } -func (x SecurityCheckInterval) Number() protoreflect.EnumNumber { +func (x AdvisorCheckInterval) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use SecurityCheckInterval.Descriptor instead. -func (SecurityCheckInterval) EnumDescriptor() ([]byte, []int) { +// Deprecated: Use AdvisorCheckInterval.Descriptor instead. +func (AdvisorCheckInterval) EnumDescriptor() ([]byte, []int) { return file_management_v1_checks_proto_rawDescGZIP(), []int{0} } @@ -128,8 +128,8 @@ func (AdvisorCheckFamily) EnumDescriptor() ([]byte, []int) { return file_management_v1_checks_proto_rawDescGZIP(), []int{1} } -// SecurityCheckResult represents the check result returned from pmm-managed after running the check. -type SecurityCheckResult struct { +// AdvisorCheckResult represents the check result returned from pmm-managed after running the check. +type AdvisorCheckResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -144,8 +144,8 @@ type SecurityCheckResult struct { ServiceName string `protobuf:"bytes,6,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` } -func (x *SecurityCheckResult) Reset() { - *x = SecurityCheckResult{} +func (x *AdvisorCheckResult) Reset() { + *x = AdvisorCheckResult{} if protoimpl.UnsafeEnabled { mi := &file_management_v1_checks_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -153,13 +153,13 @@ func (x *SecurityCheckResult) Reset() { } } -func (x *SecurityCheckResult) String() string { +func (x *AdvisorCheckResult) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SecurityCheckResult) ProtoMessage() {} +func (*AdvisorCheckResult) ProtoMessage() {} -func (x *SecurityCheckResult) ProtoReflect() protoreflect.Message { +func (x *AdvisorCheckResult) ProtoReflect() protoreflect.Message { mi := &file_management_v1_checks_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -171,47 +171,47 @@ func (x *SecurityCheckResult) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SecurityCheckResult.ProtoReflect.Descriptor instead. -func (*SecurityCheckResult) Descriptor() ([]byte, []int) { +// Deprecated: Use AdvisorCheckResult.ProtoReflect.Descriptor instead. +func (*AdvisorCheckResult) Descriptor() ([]byte, []int) { return file_management_v1_checks_proto_rawDescGZIP(), []int{0} } -func (x *SecurityCheckResult) GetSummary() string { +func (x *AdvisorCheckResult) GetSummary() string { if x != nil { return x.Summary } return "" } -func (x *SecurityCheckResult) GetDescription() string { +func (x *AdvisorCheckResult) GetDescription() string { if x != nil { return x.Description } return "" } -func (x *SecurityCheckResult) GetSeverity() Severity { +func (x *AdvisorCheckResult) GetSeverity() Severity { if x != nil { return x.Severity } return Severity_SEVERITY_UNSPECIFIED } -func (x *SecurityCheckResult) GetLabels() map[string]string { +func (x *AdvisorCheckResult) GetLabels() map[string]string { if x != nil { return x.Labels } return nil } -func (x *SecurityCheckResult) GetReadMoreUrl() string { +func (x *AdvisorCheckResult) GetReadMoreUrl() string { if x != nil { return x.ReadMoreUrl } return "" } -func (x *SecurityCheckResult) GetServiceName() string { +func (x *AdvisorCheckResult) GetServiceName() string { if x != nil { return x.ServiceName } @@ -463,8 +463,8 @@ func (x *CheckResult) GetSilenced() bool { return false } -// SecurityCheck contains check name and status. -type SecurityCheck struct { +// AdvisorCheck contains check name and status. +type AdvisorCheck struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -478,13 +478,13 @@ type SecurityCheck struct { // Short human-readable summary. Summary string `protobuf:"bytes,4,opt,name=summary,proto3" json:"summary,omitempty"` // Check execution interval. - Interval SecurityCheckInterval `protobuf:"varint,5,opt,name=interval,proto3,enum=management.v1.SecurityCheckInterval" json:"interval,omitempty"` + Interval AdvisorCheckInterval `protobuf:"varint,5,opt,name=interval,proto3,enum=management.v1.AdvisorCheckInterval" json:"interval,omitempty"` // DB family. Family AdvisorCheckFamily `protobuf:"varint,6,opt,name=family,proto3,enum=management.v1.AdvisorCheckFamily" json:"family,omitempty"` } -func (x *SecurityCheck) Reset() { - *x = SecurityCheck{} +func (x *AdvisorCheck) Reset() { + *x = AdvisorCheck{} if protoimpl.UnsafeEnabled { mi := &file_management_v1_checks_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -492,13 +492,13 @@ func (x *SecurityCheck) Reset() { } } -func (x *SecurityCheck) String() string { +func (x *AdvisorCheck) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SecurityCheck) ProtoMessage() {} +func (*AdvisorCheck) ProtoMessage() {} -func (x *SecurityCheck) ProtoReflect() protoreflect.Message { +func (x *AdvisorCheck) ProtoReflect() protoreflect.Message { mi := &file_management_v1_checks_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -510,47 +510,47 @@ func (x *SecurityCheck) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SecurityCheck.ProtoReflect.Descriptor instead. -func (*SecurityCheck) Descriptor() ([]byte, []int) { +// Deprecated: Use AdvisorCheck.ProtoReflect.Descriptor instead. +func (*AdvisorCheck) Descriptor() ([]byte, []int) { return file_management_v1_checks_proto_rawDescGZIP(), []int{3} } -func (x *SecurityCheck) GetName() string { +func (x *AdvisorCheck) GetName() string { if x != nil { return x.Name } return "" } -func (x *SecurityCheck) GetEnabled() bool { +func (x *AdvisorCheck) GetEnabled() bool { if x != nil { return x.Enabled } return false } -func (x *SecurityCheck) GetDescription() string { +func (x *AdvisorCheck) GetDescription() string { if x != nil { return x.Description } return "" } -func (x *SecurityCheck) GetSummary() string { +func (x *AdvisorCheck) GetSummary() string { if x != nil { return x.Summary } return "" } -func (x *SecurityCheck) GetInterval() SecurityCheckInterval { +func (x *AdvisorCheck) GetInterval() AdvisorCheckInterval { if x != nil { return x.Interval } - return SecurityCheckInterval_SECURITY_CHECK_INTERVAL_UNSPECIFIED + return AdvisorCheckInterval_ADVISOR_CHECK_INTERVAL_UNSPECIFIED } -func (x *SecurityCheck) GetFamily() AdvisorCheckFamily { +func (x *AdvisorCheck) GetFamily() AdvisorCheckFamily { if x != nil { return x.Family } @@ -573,7 +573,7 @@ type Advisor struct { // Category. Category string `protobuf:"bytes,5,opt,name=category,proto3" json:"category,omitempty"` // Advisor checks. - Checks []*SecurityCheck `protobuf:"bytes,6,rep,name=checks,proto3" json:"checks,omitempty"` + Checks []*AdvisorCheck `protobuf:"bytes,6,rep,name=checks,proto3" json:"checks,omitempty"` } func (x *Advisor) Reset() { @@ -643,15 +643,15 @@ func (x *Advisor) GetCategory() string { return "" } -func (x *Advisor) GetChecks() []*SecurityCheck { +func (x *Advisor) GetChecks() []*AdvisorCheck { if x != nil { return x.Checks } return nil } -// ChangeSecurityCheckParams specifies a single check parameters. -type ChangeSecurityCheckParams struct { +// ChangeAdvisorCheckParams specifies a single check parameters. +type ChangeAdvisorCheckParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -660,11 +660,11 @@ type ChangeSecurityCheckParams struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Enable *bool `protobuf:"varint,2,opt,name=enable,proto3,oneof" json:"enable,omitempty"` // check execution interval. - Interval SecurityCheckInterval `protobuf:"varint,4,opt,name=interval,proto3,enum=management.v1.SecurityCheckInterval" json:"interval,omitempty"` + Interval AdvisorCheckInterval `protobuf:"varint,4,opt,name=interval,proto3,enum=management.v1.AdvisorCheckInterval" json:"interval,omitempty"` } -func (x *ChangeSecurityCheckParams) Reset() { - *x = ChangeSecurityCheckParams{} +func (x *ChangeAdvisorCheckParams) Reset() { + *x = ChangeAdvisorCheckParams{} if protoimpl.UnsafeEnabled { mi := &file_management_v1_checks_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -672,13 +672,13 @@ func (x *ChangeSecurityCheckParams) Reset() { } } -func (x *ChangeSecurityCheckParams) String() string { +func (x *ChangeAdvisorCheckParams) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ChangeSecurityCheckParams) ProtoMessage() {} +func (*ChangeAdvisorCheckParams) ProtoMessage() {} -func (x *ChangeSecurityCheckParams) ProtoReflect() protoreflect.Message { +func (x *ChangeAdvisorCheckParams) ProtoReflect() protoreflect.Message { mi := &file_management_v1_checks_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -690,33 +690,33 @@ func (x *ChangeSecurityCheckParams) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ChangeSecurityCheckParams.ProtoReflect.Descriptor instead. -func (*ChangeSecurityCheckParams) Descriptor() ([]byte, []int) { +// Deprecated: Use ChangeAdvisorCheckParams.ProtoReflect.Descriptor instead. +func (*ChangeAdvisorCheckParams) Descriptor() ([]byte, []int) { return file_management_v1_checks_proto_rawDescGZIP(), []int{5} } -func (x *ChangeSecurityCheckParams) GetName() string { +func (x *ChangeAdvisorCheckParams) GetName() string { if x != nil { return x.Name } return "" } -func (x *ChangeSecurityCheckParams) GetEnable() bool { +func (x *ChangeAdvisorCheckParams) GetEnable() bool { if x != nil && x.Enable != nil { return *x.Enable } return false } -func (x *ChangeSecurityCheckParams) GetInterval() SecurityCheckInterval { +func (x *ChangeAdvisorCheckParams) GetInterval() AdvisorCheckInterval { if x != nil { return x.Interval } - return SecurityCheckInterval_SECURITY_CHECK_INTERVAL_UNSPECIFIED + return AdvisorCheckInterval_ADVISOR_CHECK_INTERVAL_UNSPECIFIED } -type StartSecurityChecksRequest struct { +type StartAdvisorChecksRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -725,8 +725,8 @@ type StartSecurityChecksRequest struct { Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` } -func (x *StartSecurityChecksRequest) Reset() { - *x = StartSecurityChecksRequest{} +func (x *StartAdvisorChecksRequest) Reset() { + *x = StartAdvisorChecksRequest{} if protoimpl.UnsafeEnabled { mi := &file_management_v1_checks_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -734,13 +734,13 @@ func (x *StartSecurityChecksRequest) Reset() { } } -func (x *StartSecurityChecksRequest) String() string { +func (x *StartAdvisorChecksRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StartSecurityChecksRequest) ProtoMessage() {} +func (*StartAdvisorChecksRequest) ProtoMessage() {} -func (x *StartSecurityChecksRequest) ProtoReflect() protoreflect.Message { +func (x *StartAdvisorChecksRequest) ProtoReflect() protoreflect.Message { mi := &file_management_v1_checks_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -752,26 +752,26 @@ func (x *StartSecurityChecksRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StartSecurityChecksRequest.ProtoReflect.Descriptor instead. -func (*StartSecurityChecksRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use StartAdvisorChecksRequest.ProtoReflect.Descriptor instead. +func (*StartAdvisorChecksRequest) Descriptor() ([]byte, []int) { return file_management_v1_checks_proto_rawDescGZIP(), []int{6} } -func (x *StartSecurityChecksRequest) GetNames() []string { +func (x *StartAdvisorChecksRequest) GetNames() []string { if x != nil { return x.Names } return nil } -type StartSecurityChecksResponse struct { +type StartAdvisorChecksResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *StartSecurityChecksResponse) Reset() { - *x = StartSecurityChecksResponse{} +func (x *StartAdvisorChecksResponse) Reset() { + *x = StartAdvisorChecksResponse{} if protoimpl.UnsafeEnabled { mi := &file_management_v1_checks_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -779,13 +779,13 @@ func (x *StartSecurityChecksResponse) Reset() { } } -func (x *StartSecurityChecksResponse) String() string { +func (x *StartAdvisorChecksResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StartSecurityChecksResponse) ProtoMessage() {} +func (*StartAdvisorChecksResponse) ProtoMessage() {} -func (x *StartSecurityChecksResponse) ProtoReflect() protoreflect.Message { +func (x *StartAdvisorChecksResponse) ProtoReflect() protoreflect.Message { mi := &file_management_v1_checks_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -797,19 +797,19 @@ func (x *StartSecurityChecksResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StartSecurityChecksResponse.ProtoReflect.Descriptor instead. -func (*StartSecurityChecksResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use StartAdvisorChecksResponse.ProtoReflect.Descriptor instead. +func (*StartAdvisorChecksResponse) Descriptor() ([]byte, []int) { return file_management_v1_checks_proto_rawDescGZIP(), []int{7} } -type ListSecurityChecksRequest struct { +type ListAdvisorChecksRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *ListSecurityChecksRequest) Reset() { - *x = ListSecurityChecksRequest{} +func (x *ListAdvisorChecksRequest) Reset() { + *x = ListAdvisorChecksRequest{} if protoimpl.UnsafeEnabled { mi := &file_management_v1_checks_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -817,13 +817,13 @@ func (x *ListSecurityChecksRequest) Reset() { } } -func (x *ListSecurityChecksRequest) String() string { +func (x *ListAdvisorChecksRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListSecurityChecksRequest) ProtoMessage() {} +func (*ListAdvisorChecksRequest) ProtoMessage() {} -func (x *ListSecurityChecksRequest) ProtoReflect() protoreflect.Message { +func (x *ListAdvisorChecksRequest) ProtoReflect() protoreflect.Message { mi := &file_management_v1_checks_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -835,21 +835,21 @@ func (x *ListSecurityChecksRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListSecurityChecksRequest.ProtoReflect.Descriptor instead. -func (*ListSecurityChecksRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ListAdvisorChecksRequest.ProtoReflect.Descriptor instead. +func (*ListAdvisorChecksRequest) Descriptor() ([]byte, []int) { return file_management_v1_checks_proto_rawDescGZIP(), []int{8} } -type ListSecurityChecksResponse struct { +type ListAdvisorChecksResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Checks []*SecurityCheck `protobuf:"bytes,1,rep,name=checks,proto3" json:"checks,omitempty"` + Checks []*AdvisorCheck `protobuf:"bytes,1,rep,name=checks,proto3" json:"checks,omitempty"` } -func (x *ListSecurityChecksResponse) Reset() { - *x = ListSecurityChecksResponse{} +func (x *ListAdvisorChecksResponse) Reset() { + *x = ListAdvisorChecksResponse{} if protoimpl.UnsafeEnabled { mi := &file_management_v1_checks_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -857,13 +857,13 @@ func (x *ListSecurityChecksResponse) Reset() { } } -func (x *ListSecurityChecksResponse) String() string { +func (x *ListAdvisorChecksResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListSecurityChecksResponse) ProtoMessage() {} +func (*ListAdvisorChecksResponse) ProtoMessage() {} -func (x *ListSecurityChecksResponse) ProtoReflect() protoreflect.Message { +func (x *ListAdvisorChecksResponse) ProtoReflect() protoreflect.Message { mi := &file_management_v1_checks_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -875,12 +875,12 @@ func (x *ListSecurityChecksResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListSecurityChecksResponse.ProtoReflect.Descriptor instead. -func (*ListSecurityChecksResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ListAdvisorChecksResponse.ProtoReflect.Descriptor instead. +func (*ListAdvisorChecksResponse) Descriptor() ([]byte, []int) { return file_management_v1_checks_proto_rawDescGZIP(), []int{9} } -func (x *ListSecurityChecksResponse) GetChecks() []*SecurityCheck { +func (x *ListAdvisorChecksResponse) GetChecks() []*AdvisorCheck { if x != nil { return x.Checks } @@ -972,16 +972,16 @@ func (x *ListAdvisorsResponse) GetAdvisors() []*Advisor { return nil } -type ChangeSecurityChecksRequest struct { +type ChangeAdvisorChecksRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Params []*ChangeSecurityCheckParams `protobuf:"bytes,1,rep,name=params,proto3" json:"params,omitempty"` + Params []*ChangeAdvisorCheckParams `protobuf:"bytes,1,rep,name=params,proto3" json:"params,omitempty"` } -func (x *ChangeSecurityChecksRequest) Reset() { - *x = ChangeSecurityChecksRequest{} +func (x *ChangeAdvisorChecksRequest) Reset() { + *x = ChangeAdvisorChecksRequest{} if protoimpl.UnsafeEnabled { mi := &file_management_v1_checks_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -989,13 +989,13 @@ func (x *ChangeSecurityChecksRequest) Reset() { } } -func (x *ChangeSecurityChecksRequest) String() string { +func (x *ChangeAdvisorChecksRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ChangeSecurityChecksRequest) ProtoMessage() {} +func (*ChangeAdvisorChecksRequest) ProtoMessage() {} -func (x *ChangeSecurityChecksRequest) ProtoReflect() protoreflect.Message { +func (x *ChangeAdvisorChecksRequest) ProtoReflect() protoreflect.Message { mi := &file_management_v1_checks_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1007,26 +1007,26 @@ func (x *ChangeSecurityChecksRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ChangeSecurityChecksRequest.ProtoReflect.Descriptor instead. -func (*ChangeSecurityChecksRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ChangeAdvisorChecksRequest.ProtoReflect.Descriptor instead. +func (*ChangeAdvisorChecksRequest) Descriptor() ([]byte, []int) { return file_management_v1_checks_proto_rawDescGZIP(), []int{12} } -func (x *ChangeSecurityChecksRequest) GetParams() []*ChangeSecurityCheckParams { +func (x *ChangeAdvisorChecksRequest) GetParams() []*ChangeAdvisorCheckParams { if x != nil { return x.Params } return nil } -type ChangeSecurityChecksResponse struct { +type ChangeAdvisorChecksResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *ChangeSecurityChecksResponse) Reset() { - *x = ChangeSecurityChecksResponse{} +func (x *ChangeAdvisorChecksResponse) Reset() { + *x = ChangeAdvisorChecksResponse{} if protoimpl.UnsafeEnabled { mi := &file_management_v1_checks_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1034,13 +1034,13 @@ func (x *ChangeSecurityChecksResponse) Reset() { } } -func (x *ChangeSecurityChecksResponse) String() string { +func (x *ChangeAdvisorChecksResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ChangeSecurityChecksResponse) ProtoMessage() {} +func (*ChangeAdvisorChecksResponse) ProtoMessage() {} -func (x *ChangeSecurityChecksResponse) ProtoReflect() protoreflect.Message { +func (x *ChangeAdvisorChecksResponse) ProtoReflect() protoreflect.Message { mi := &file_management_v1_checks_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1052,8 +1052,8 @@ func (x *ChangeSecurityChecksResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ChangeSecurityChecksResponse.ProtoReflect.Descriptor instead. -func (*ChangeSecurityChecksResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ChangeAdvisorChecksResponse.ProtoReflect.Descriptor instead. +func (*ChangeAdvisorChecksResponse) Descriptor() ([]byte, []int) { return file_management_v1_checks_proto_rawDescGZIP(), []int{13} } @@ -1266,296 +1266,291 @@ var file_management_v1_checks_proto_rawDesc = []byte{ 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd0, 0x02, 0x0a, 0x13, 0x53, 0x65, 0x63, 0x75, - 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x08, 0x73, - 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, - 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, - 0x12, 0x46, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x72, 0x65, 0x61, 0x64, - 0x5f, 0x6d, 0x6f, 0x72, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x6f, 0x72, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x21, 0x0a, 0x0c, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x1a, - 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 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, 0x22, 0xf0, 0x02, 0x0a, 0x12, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, - 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x49, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x6e, 0x63, 0x79, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x65, 0x6d, - 0x65, 0x72, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, - 0x61, 0x6c, 0x65, 0x72, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x0a, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, - 0x0e, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x77, 0x61, - 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x6f, - 0x74, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x0b, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, - 0x0a, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x09, 0x69, 0x6e, 0x66, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, - 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9a, 0x03, - 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, - 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x08, 0x73, 0x65, 0x76, - 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x76, 0x65, - 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x3e, - 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, - 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x22, - 0x0a, 0x0d, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x6f, 0x72, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x6f, 0x72, 0x65, 0x55, - 0x72, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x69, 0x6c, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x69, 0x6c, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x1a, - 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 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, 0x22, 0xf6, 0x01, 0x0a, 0x0d, 0x53, - 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, - 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x40, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, - 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x52, 0x08, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x39, 0x0a, 0x06, 0x66, 0x61, 0x6d, 0x69, - 0x6c, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x06, 0x66, 0x61, 0x6d, - 0x69, 0x6c, 0x79, 0x22, 0xc5, 0x01, 0x0a, 0x07, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, - 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, - 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x34, 0x0a, 0x06, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x52, 0x06, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x22, 0x99, 0x01, 0x0a, 0x19, - 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, - 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, - 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x88, 0x01, 0x01, 0x12, 0x40, 0x0a, 0x08, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, - 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x09, 0x0a, 0x07, - 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x32, 0x0a, 0x1a, 0x53, 0x74, 0x61, 0x72, 0x74, - 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x4c, 0x69, - 0x73, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x52, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x53, - 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x52, 0x06, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x4c, - 0x69, 0x73, 0x74, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x4a, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, - 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x61, 0x64, - 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x76, - 0x69, 0x73, 0x6f, 0x72, 0x52, 0x08, 0x61, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x22, 0x5f, - 0x0a, 0x1b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, - 0x1e, 0x0a, 0x1c, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, - 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x1b, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x57, 0x0a, 0x1a, - 0x4c, 0x69, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x73, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x46, 0x61, 0x69, 0x6c, - 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x3a, - 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0a, - 0x70, 0x61, 0x67, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x8b, 0x01, 0x0a, 0x17, 0x47, - 0x65, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x0b, - 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x52, 0x0a, 0x70, 0x61, - 0x67, 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x2a, 0xae, 0x01, 0x0a, 0x15, 0x53, 0x65, 0x63, - 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x12, 0x27, 0x0a, 0x23, 0x53, 0x45, 0x43, 0x55, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x43, - 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x53, - 0x45, 0x43, 0x55, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x49, 0x4e, - 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x10, - 0x01, 0x12, 0x24, 0x0a, 0x20, 0x53, 0x45, 0x43, 0x55, 0x52, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x48, - 0x45, 0x43, 0x4b, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x46, 0x52, 0x45, - 0x51, 0x55, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x45, 0x43, 0x55, 0x52, - 0x49, 0x54, 0x59, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, - 0x41, 0x4c, 0x5f, 0x52, 0x41, 0x52, 0x45, 0x10, 0x03, 0x2a, 0xa1, 0x01, 0x0a, 0x12, 0x41, 0x64, - 0x76, 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, - 0x12, 0x24, 0x0a, 0x20, 0x41, 0x44, 0x56, 0x49, 0x53, 0x4f, 0x52, 0x5f, 0x43, 0x48, 0x45, 0x43, - 0x4b, 0x5f, 0x46, 0x41, 0x4d, 0x49, 0x4c, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x44, 0x56, 0x49, 0x53, 0x4f, - 0x52, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x46, 0x41, 0x4d, 0x49, 0x4c, 0x59, 0x5f, 0x4d, - 0x59, 0x53, 0x51, 0x4c, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x44, 0x56, 0x49, 0x53, 0x4f, - 0x52, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x46, 0x41, 0x4d, 0x49, 0x4c, 0x59, 0x5f, 0x50, - 0x4f, 0x53, 0x54, 0x47, 0x52, 0x45, 0x53, 0x51, 0x4c, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x41, - 0x44, 0x56, 0x49, 0x53, 0x4f, 0x52, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x46, 0x41, 0x4d, - 0x49, 0x4c, 0x59, 0x5f, 0x4d, 0x4f, 0x4e, 0x47, 0x4f, 0x44, 0x42, 0x10, 0x03, 0x32, 0xa0, 0x0c, - 0x0a, 0x15, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8f, 0x02, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, - 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x28, - 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x61, 0x69, - 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0xa3, 0x01, 0x92, 0x41, 0x65, 0x12, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x20, - 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x1a, - 0x4d, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, - 0x6f, 0x66, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, - 0x20, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x61, - 0x6e, 0x64, 0x20, 0x61, 0x20, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x20, 0x6f, 0x66, 0x20, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x35, 0x3a, 0x01, 0x2a, 0x22, 0x30, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, - 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0xe5, 0x01, 0x0a, 0x0f, 0x47, 0x65, - 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x25, 0x2e, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x82, 0x01, 0x92, - 0x41, 0x4a, 0x12, 0x11, 0x47, 0x65, 0x74, 0x20, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x20, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x73, 0x1a, 0x35, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x20, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x67, 0x69, - 0x76, 0x65, 0x6e, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x2f, 0x3a, 0x01, 0x2a, 0x22, 0x2a, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, - 0x65, 0x63, 0x6b, 0x73, 0x2f, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x73, 0x12, 0xcf, 0x02, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, - 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x29, 0x2e, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, - 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, - 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0xe0, 0x01, 0x92, 0x41, 0xae, 0x01, 0x12, 0x15, 0x53, 0x74, 0x61, 0x72, 0x74, 0x20, 0x53, - 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x20, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x1a, 0x94, - 0x01, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x73, 0x20, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, - 0x74, 0x79, 0x20, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x20, 0x54, 0x6f, 0x6f, 0x6c, 0x20, 0x63, - 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, - 0x73, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, - 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x2e, 0x20, - 0x41, 0x6c, 0x6c, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x65, 0x64, 0x20, 0x69, 0x66, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x20, 0x61, 0x72, 0x65, 0x6e, 0x27, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x22, 0x23, - 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x53, - 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x2f, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x12, 0xe1, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x75, - 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x28, 0x2e, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, - 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, - 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x76, 0x92, 0x41, 0x46, 0x12, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x61, 0x64, 0x76, 0x69, 0x73, - 0x6f, 0x72, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x1a, 0x2f, 0x52, 0x65, 0x74, 0x75, 0x72, - 0x6e, 0x73, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x73, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, - 0x3a, 0x01, 0x2a, 0x22, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x2f, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x73, 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x12, 0xc5, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, - 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x76, - 0x69, 0x73, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xce, 0x02, 0x0a, 0x12, 0x41, 0x64, 0x76, 0x69, + 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x08, 0x73, 0x65, + 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x76, + 0x65, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, + 0x45, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x2d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, + 0x6f, 0x72, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, + 0x65, 0x61, 0x64, 0x4d, 0x6f, 0x72, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0x39, 0x0a, + 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 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, 0x22, 0xf0, 0x02, 0x0a, 0x12, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, + 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, + 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x65, 0x6d, 0x65, 0x72, + 0x67, 0x65, 0x6e, 0x63, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, + 0x65, 0x72, 0x74, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0a, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x63, + 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x63, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x43, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x77, 0x61, 0x72, 0x6e, + 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x69, + 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, + 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, + 0x6e, 0x66, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x09, 0x69, 0x6e, 0x66, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, + 0x62, 0x75, 0x67, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0a, 0x64, 0x65, 0x62, 0x75, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x9a, 0x03, 0x0a, 0x0b, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, + 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, + 0x74, 0x79, 0x52, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x3e, 0x0a, 0x06, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x22, 0x0a, 0x0d, + 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6d, 0x6f, 0x72, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x4d, 0x6f, 0x72, 0x65, 0x55, 0x72, 0x6c, + 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x69, 0x6c, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x69, 0x6c, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x1a, 0x39, 0x0a, + 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 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, 0x22, 0xf4, 0x01, 0x0a, 0x0c, 0x41, 0x64, 0x76, + 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x79, 0x12, 0x3f, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x12, 0x39, 0x0a, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x22, + 0xc4, 0x01, 0x0a, 0x07, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x63, + 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, + 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, + 0x79, 0x12, 0x33, 0x0a, 0x06, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x06, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x22, 0x97, 0x01, 0x0a, 0x18, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x88, 0x01, 0x01, 0x12, 0x3f, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x52, 0x08, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x22, 0x31, 0x0a, 0x19, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x64, 0x76, 0x69, + 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x1a, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x50, 0x0a, + 0x19, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x06, 0x63, 0x68, + 0x65, 0x63, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x76, 0x69, 0x73, + 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x06, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x22, + 0x15, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4a, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, + 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, + 0x0a, 0x08, 0x61, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x52, 0x08, 0x61, 0x64, 0x76, 0x69, 0x73, 0x6f, + 0x72, 0x73, 0x22, 0x5d, 0x0a, 0x1a, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x64, 0x76, 0x69, + 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x3f, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x64, 0x76, 0x69, 0x73, + 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x1b, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x57, 0x0a, + 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x73, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x46, 0x61, 0x69, + 0x6c, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, + 0x3a, 0x0a, 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x0a, 0x70, 0x61, 0x67, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x8b, 0x01, 0x0a, 0x17, + 0x47, 0x65, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x3a, 0x0a, + 0x0b, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x52, 0x0a, 0x70, + 0x61, 0x67, 0x65, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x73, 0x2a, 0xa9, 0x01, 0x0a, 0x14, 0x41, 0x64, + 0x76, 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, + 0x61, 0x6c, 0x12, 0x26, 0x0a, 0x22, 0x41, 0x44, 0x56, 0x49, 0x53, 0x4f, 0x52, 0x5f, 0x43, 0x48, + 0x45, 0x43, 0x4b, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x44, + 0x56, 0x49, 0x53, 0x4f, 0x52, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x49, 0x4e, 0x54, 0x45, + 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x10, 0x01, 0x12, + 0x23, 0x0a, 0x1f, 0x41, 0x44, 0x56, 0x49, 0x53, 0x4f, 0x52, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, + 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x46, 0x52, 0x45, 0x51, 0x55, 0x45, + 0x4e, 0x54, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x44, 0x56, 0x49, 0x53, 0x4f, 0x52, 0x5f, + 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x52, + 0x41, 0x52, 0x45, 0x10, 0x03, 0x2a, 0xa1, 0x01, 0x0a, 0x12, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, + 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x24, 0x0a, 0x20, + 0x41, 0x44, 0x56, 0x49, 0x53, 0x4f, 0x52, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x46, 0x41, + 0x4d, 0x49, 0x4c, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x44, 0x56, 0x49, 0x53, 0x4f, 0x52, 0x5f, 0x43, 0x48, + 0x45, 0x43, 0x4b, 0x5f, 0x46, 0x41, 0x4d, 0x49, 0x4c, 0x59, 0x5f, 0x4d, 0x59, 0x53, 0x51, 0x4c, + 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x44, 0x56, 0x49, 0x53, 0x4f, 0x52, 0x5f, 0x43, 0x48, + 0x45, 0x43, 0x4b, 0x5f, 0x46, 0x41, 0x4d, 0x49, 0x4c, 0x59, 0x5f, 0x50, 0x4f, 0x53, 0x54, 0x47, + 0x52, 0x45, 0x53, 0x51, 0x4c, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x44, 0x56, 0x49, 0x53, + 0x4f, 0x52, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x5f, 0x46, 0x41, 0x4d, 0x49, 0x4c, 0x59, 0x5f, + 0x4d, 0x4f, 0x4e, 0x47, 0x4f, 0x44, 0x42, 0x10, 0x03, 0x32, 0xe1, 0x0b, 0x0a, 0x0e, 0x41, 0x64, + 0x76, 0x69, 0x73, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x89, 0x02, 0x0a, + 0x12, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x12, 0x28, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9d, 0x01, 0x92, 0x41, 0x65, 0x12, 0x14, + 0x4c, 0x69, 0x73, 0x74, 0x20, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x20, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x73, 0x1a, 0x4d, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, + 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x20, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x20, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x79, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x3a, 0x01, 0x2a, 0x22, 0x2a, 0x2f, 0x76, + 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x41, 0x64, 0x76, + 0x69, 0x73, 0x6f, 0x72, 0x73, 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0xde, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, + 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x25, 0x2e, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7c, 0x92, 0x41, 0x4a, + 0x12, 0x11, 0x47, 0x65, 0x74, 0x20, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x20, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x1a, 0x35, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x67, 0x69, 0x76, 0x65, + 0x6e, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, + 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x2f, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x2f, 0x46, 0x61, 0x69, + 0x6c, 0x65, 0x64, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0xbe, 0x02, 0x0a, 0x12, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, + 0x12, 0x28, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd2, 0x01, 0x92, 0x41, 0xa0, 0x01, 0x12, 0x14, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x20, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x20, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x73, 0x1a, 0x87, 0x01, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x73, 0x20, 0x41, 0x64, + 0x76, 0x69, 0x73, 0x6f, 0x72, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x61, 0x6e, 0x64, + 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x6c, + 0x6c, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x64, 0x2e, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, + 0x61, 0x62, 0x6c, 0x65, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, + 0x20, 0x62, 0x65, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x20, 0x69, 0x66, 0x20, 0x63, + 0x68, 0x65, 0x63, 0x6b, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x61, 0x72, 0x65, 0x6e, 0x27, + 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x2e, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x22, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x2f, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0xde, 0x01, 0x0a, 0x11, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, + 0x12, 0x27, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, + 0x76, 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x76, 0x92, 0x41, 0x46, 0x12, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x61, + 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x1a, 0x2f, 0x52, + 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, + 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, + 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x27, 0x3a, 0x01, 0x2a, 0x22, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, + 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0xc5, 0x01, 0x0a, 0x0c, + 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x12, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x6c, 0x92, 0x41, 0x42, 0x12, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x61, 0x64, 0x76, - 0x69, 0x73, 0x6f, 0x72, 0x73, 0x1a, 0x31, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, - 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, - 0x73, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, - 0x2a, 0x22, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x2f, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x2f, 0x4c, 0x69, 0x73, 0x74, 0x12, - 0x8e, 0x02, 0x0a, 0x14, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, - 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x2a, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, - 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, - 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x9c, 0x01, 0x92, 0x41, 0x6a, 0x12, 0x16, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, - 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x20, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x1a, - 0x50, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, - 0x73, 0x20, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x20, 0x54, 0x68, 0x72, 0x65, 0x61, - 0x64, 0x20, 0x54, 0x6f, 0x6f, 0x6c, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x6f, 0x72, - 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x20, 0x62, 0x79, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x01, 0x2a, 0x22, 0x24, 0x2f, 0x76, 0x31, 0x2f, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x53, 0x65, 0x63, 0x75, 0x72, - 0x69, 0x74, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x2f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x42, 0xac, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x3b, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, - 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, - 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x0e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6c, 0x92, 0x41, 0x42, 0x12, 0x0d, 0x4c, 0x69, 0x73, 0x74, + 0x20, 0x61, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x1a, 0x31, 0x52, 0x65, 0x74, 0x75, 0x72, + 0x6e, 0x73, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x64, 0x76, + 0x69, 0x73, 0x6f, 0x72, 0x73, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, + 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x2f, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0xf7, 0x01, 0x0a, 0x13, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x64, + 0x76, 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x12, 0x29, 0x2e, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x41, 0x64, 0x76, + 0x69, 0x73, 0x6f, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x88, 0x01, 0x92, 0x41, 0x5c, 0x12, 0x15, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x20, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x20, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x1a, + 0x43, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x2f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x20, 0x41, 0x64, 0x76, 0x69, 0x73, 0x6f, 0x72, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, + 0x20, 0x6f, 0x72, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x69, + 0x72, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x20, 0x62, 0x79, 0x20, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x01, 0x2a, 0x22, 0x1e, 0x2f, + 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x41, 0x64, + 0x76, 0x69, 0x73, 0x6f, 0x72, 0x73, 0x2f, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0xac, 0x01, + 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, + 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, + 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x19, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1574,62 +1569,62 @@ var ( file_management_v1_checks_proto_enumTypes = make([]protoimpl.EnumInfo, 2) file_management_v1_checks_proto_msgTypes = make([]protoimpl.MessageInfo, 20) file_management_v1_checks_proto_goTypes = []interface{}{ - (SecurityCheckInterval)(0), // 0: management.v1.SecurityCheckInterval - (AdvisorCheckFamily)(0), // 1: management.v1.AdvisorCheckFamily - (*SecurityCheckResult)(nil), // 2: management.v1.SecurityCheckResult - (*CheckResultSummary)(nil), // 3: management.v1.CheckResultSummary - (*CheckResult)(nil), // 4: management.v1.CheckResult - (*SecurityCheck)(nil), // 5: management.v1.SecurityCheck - (*Advisor)(nil), // 6: management.v1.Advisor - (*ChangeSecurityCheckParams)(nil), // 7: management.v1.ChangeSecurityCheckParams - (*StartSecurityChecksRequest)(nil), // 8: management.v1.StartSecurityChecksRequest - (*StartSecurityChecksResponse)(nil), // 9: management.v1.StartSecurityChecksResponse - (*ListSecurityChecksRequest)(nil), // 10: management.v1.ListSecurityChecksRequest - (*ListSecurityChecksResponse)(nil), // 11: management.v1.ListSecurityChecksResponse - (*ListAdvisorsRequest)(nil), // 12: management.v1.ListAdvisorsRequest - (*ListAdvisorsResponse)(nil), // 13: management.v1.ListAdvisorsResponse - (*ChangeSecurityChecksRequest)(nil), // 14: management.v1.ChangeSecurityChecksRequest - (*ChangeSecurityChecksResponse)(nil), // 15: management.v1.ChangeSecurityChecksResponse - (*ListFailedServicesRequest)(nil), // 16: management.v1.ListFailedServicesRequest - (*ListFailedServicesResponse)(nil), // 17: management.v1.ListFailedServicesResponse - (*GetFailedChecksRequest)(nil), // 18: management.v1.GetFailedChecksRequest - (*GetFailedChecksResponse)(nil), // 19: management.v1.GetFailedChecksResponse - nil, // 20: management.v1.SecurityCheckResult.LabelsEntry - nil, // 21: management.v1.CheckResult.LabelsEntry - (Severity)(0), // 22: management.v1.Severity - (*PageParams)(nil), // 23: management.v1.PageParams - (*PageTotals)(nil), // 24: management.v1.PageTotals + (AdvisorCheckInterval)(0), // 0: management.v1.AdvisorCheckInterval + (AdvisorCheckFamily)(0), // 1: management.v1.AdvisorCheckFamily + (*AdvisorCheckResult)(nil), // 2: management.v1.AdvisorCheckResult + (*CheckResultSummary)(nil), // 3: management.v1.CheckResultSummary + (*CheckResult)(nil), // 4: management.v1.CheckResult + (*AdvisorCheck)(nil), // 5: management.v1.AdvisorCheck + (*Advisor)(nil), // 6: management.v1.Advisor + (*ChangeAdvisorCheckParams)(nil), // 7: management.v1.ChangeAdvisorCheckParams + (*StartAdvisorChecksRequest)(nil), // 8: management.v1.StartAdvisorChecksRequest + (*StartAdvisorChecksResponse)(nil), // 9: management.v1.StartAdvisorChecksResponse + (*ListAdvisorChecksRequest)(nil), // 10: management.v1.ListAdvisorChecksRequest + (*ListAdvisorChecksResponse)(nil), // 11: management.v1.ListAdvisorChecksResponse + (*ListAdvisorsRequest)(nil), // 12: management.v1.ListAdvisorsRequest + (*ListAdvisorsResponse)(nil), // 13: management.v1.ListAdvisorsResponse + (*ChangeAdvisorChecksRequest)(nil), // 14: management.v1.ChangeAdvisorChecksRequest + (*ChangeAdvisorChecksResponse)(nil), // 15: management.v1.ChangeAdvisorChecksResponse + (*ListFailedServicesRequest)(nil), // 16: management.v1.ListFailedServicesRequest + (*ListFailedServicesResponse)(nil), // 17: management.v1.ListFailedServicesResponse + (*GetFailedChecksRequest)(nil), // 18: management.v1.GetFailedChecksRequest + (*GetFailedChecksResponse)(nil), // 19: management.v1.GetFailedChecksResponse + nil, // 20: management.v1.AdvisorCheckResult.LabelsEntry + nil, // 21: management.v1.CheckResult.LabelsEntry + (Severity)(0), // 22: management.v1.Severity + (*PageParams)(nil), // 23: management.v1.PageParams + (*PageTotals)(nil), // 24: management.v1.PageTotals } ) var file_management_v1_checks_proto_depIdxs = []int32{ - 22, // 0: management.v1.SecurityCheckResult.severity:type_name -> management.v1.Severity - 20, // 1: management.v1.SecurityCheckResult.labels:type_name -> management.v1.SecurityCheckResult.LabelsEntry + 22, // 0: management.v1.AdvisorCheckResult.severity:type_name -> management.v1.Severity + 20, // 1: management.v1.AdvisorCheckResult.labels:type_name -> management.v1.AdvisorCheckResult.LabelsEntry 22, // 2: management.v1.CheckResult.severity:type_name -> management.v1.Severity 21, // 3: management.v1.CheckResult.labels:type_name -> management.v1.CheckResult.LabelsEntry - 0, // 4: management.v1.SecurityCheck.interval:type_name -> management.v1.SecurityCheckInterval - 1, // 5: management.v1.SecurityCheck.family:type_name -> management.v1.AdvisorCheckFamily - 5, // 6: management.v1.Advisor.checks:type_name -> management.v1.SecurityCheck - 0, // 7: management.v1.ChangeSecurityCheckParams.interval:type_name -> management.v1.SecurityCheckInterval - 5, // 8: management.v1.ListSecurityChecksResponse.checks:type_name -> management.v1.SecurityCheck + 0, // 4: management.v1.AdvisorCheck.interval:type_name -> management.v1.AdvisorCheckInterval + 1, // 5: management.v1.AdvisorCheck.family:type_name -> management.v1.AdvisorCheckFamily + 5, // 6: management.v1.Advisor.checks:type_name -> management.v1.AdvisorCheck + 0, // 7: management.v1.ChangeAdvisorCheckParams.interval:type_name -> management.v1.AdvisorCheckInterval + 5, // 8: management.v1.ListAdvisorChecksResponse.checks:type_name -> management.v1.AdvisorCheck 6, // 9: management.v1.ListAdvisorsResponse.advisors:type_name -> management.v1.Advisor - 7, // 10: management.v1.ChangeSecurityChecksRequest.params:type_name -> management.v1.ChangeSecurityCheckParams + 7, // 10: management.v1.ChangeAdvisorChecksRequest.params:type_name -> management.v1.ChangeAdvisorCheckParams 3, // 11: management.v1.ListFailedServicesResponse.result:type_name -> management.v1.CheckResultSummary 23, // 12: management.v1.GetFailedChecksRequest.page_params:type_name -> management.v1.PageParams 4, // 13: management.v1.GetFailedChecksResponse.results:type_name -> management.v1.CheckResult 24, // 14: management.v1.GetFailedChecksResponse.page_totals:type_name -> management.v1.PageTotals - 16, // 15: management.v1.SecurityChecksService.ListFailedServices:input_type -> management.v1.ListFailedServicesRequest - 18, // 16: management.v1.SecurityChecksService.GetFailedChecks:input_type -> management.v1.GetFailedChecksRequest - 8, // 17: management.v1.SecurityChecksService.StartSecurityChecks:input_type -> management.v1.StartSecurityChecksRequest - 10, // 18: management.v1.SecurityChecksService.ListSecurityChecks:input_type -> management.v1.ListSecurityChecksRequest - 12, // 19: management.v1.SecurityChecksService.ListAdvisors:input_type -> management.v1.ListAdvisorsRequest - 14, // 20: management.v1.SecurityChecksService.ChangeSecurityChecks:input_type -> management.v1.ChangeSecurityChecksRequest - 17, // 21: management.v1.SecurityChecksService.ListFailedServices:output_type -> management.v1.ListFailedServicesResponse - 19, // 22: management.v1.SecurityChecksService.GetFailedChecks:output_type -> management.v1.GetFailedChecksResponse - 9, // 23: management.v1.SecurityChecksService.StartSecurityChecks:output_type -> management.v1.StartSecurityChecksResponse - 11, // 24: management.v1.SecurityChecksService.ListSecurityChecks:output_type -> management.v1.ListSecurityChecksResponse - 13, // 25: management.v1.SecurityChecksService.ListAdvisors:output_type -> management.v1.ListAdvisorsResponse - 15, // 26: management.v1.SecurityChecksService.ChangeSecurityChecks:output_type -> management.v1.ChangeSecurityChecksResponse + 16, // 15: management.v1.AdvisorService.ListFailedServices:input_type -> management.v1.ListFailedServicesRequest + 18, // 16: management.v1.AdvisorService.GetFailedChecks:input_type -> management.v1.GetFailedChecksRequest + 8, // 17: management.v1.AdvisorService.StartAdvisorChecks:input_type -> management.v1.StartAdvisorChecksRequest + 10, // 18: management.v1.AdvisorService.ListAdvisorChecks:input_type -> management.v1.ListAdvisorChecksRequest + 12, // 19: management.v1.AdvisorService.ListAdvisors:input_type -> management.v1.ListAdvisorsRequest + 14, // 20: management.v1.AdvisorService.ChangeAdvisorChecks:input_type -> management.v1.ChangeAdvisorChecksRequest + 17, // 21: management.v1.AdvisorService.ListFailedServices:output_type -> management.v1.ListFailedServicesResponse + 19, // 22: management.v1.AdvisorService.GetFailedChecks:output_type -> management.v1.GetFailedChecksResponse + 9, // 23: management.v1.AdvisorService.StartAdvisorChecks:output_type -> management.v1.StartAdvisorChecksResponse + 11, // 24: management.v1.AdvisorService.ListAdvisorChecks:output_type -> management.v1.ListAdvisorChecksResponse + 13, // 25: management.v1.AdvisorService.ListAdvisors:output_type -> management.v1.ListAdvisorsResponse + 15, // 26: management.v1.AdvisorService.ChangeAdvisorChecks:output_type -> management.v1.ChangeAdvisorChecksResponse 21, // [21:27] is the sub-list for method output_type 15, // [15:21] is the sub-list for method input_type 15, // [15:15] is the sub-list for extension type_name @@ -1646,7 +1641,7 @@ func file_management_v1_checks_proto_init() { file_management_v1_severity_proto_init() if !protoimpl.UnsafeEnabled { file_management_v1_checks_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecurityCheckResult); i { + switch v := v.(*AdvisorCheckResult); i { case 0: return &v.state case 1: @@ -1682,7 +1677,7 @@ func file_management_v1_checks_proto_init() { } } file_management_v1_checks_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SecurityCheck); i { + switch v := v.(*AdvisorCheck); i { case 0: return &v.state case 1: @@ -1706,7 +1701,7 @@ func file_management_v1_checks_proto_init() { } } file_management_v1_checks_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeSecurityCheckParams); i { + switch v := v.(*ChangeAdvisorCheckParams); i { case 0: return &v.state case 1: @@ -1718,7 +1713,7 @@ func file_management_v1_checks_proto_init() { } } file_management_v1_checks_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StartSecurityChecksRequest); i { + switch v := v.(*StartAdvisorChecksRequest); i { case 0: return &v.state case 1: @@ -1730,7 +1725,7 @@ func file_management_v1_checks_proto_init() { } } file_management_v1_checks_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StartSecurityChecksResponse); i { + switch v := v.(*StartAdvisorChecksResponse); i { case 0: return &v.state case 1: @@ -1742,7 +1737,7 @@ func file_management_v1_checks_proto_init() { } } file_management_v1_checks_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSecurityChecksRequest); i { + switch v := v.(*ListAdvisorChecksRequest); i { case 0: return &v.state case 1: @@ -1754,7 +1749,7 @@ func file_management_v1_checks_proto_init() { } } file_management_v1_checks_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSecurityChecksResponse); i { + switch v := v.(*ListAdvisorChecksResponse); i { case 0: return &v.state case 1: @@ -1790,7 +1785,7 @@ func file_management_v1_checks_proto_init() { } } file_management_v1_checks_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeSecurityChecksRequest); i { + switch v := v.(*ChangeAdvisorChecksRequest); i { case 0: return &v.state case 1: @@ -1802,7 +1797,7 @@ func file_management_v1_checks_proto_init() { } } file_management_v1_checks_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChangeSecurityChecksResponse); i { + switch v := v.(*ChangeAdvisorChecksResponse); i { case 0: return &v.state case 1: diff --git a/api/management/v1/checks.pb.gw.go b/api/management/v1/checks.pb.gw.go index 364a5fd37c..7807582d2c 100644 --- a/api/management/v1/checks.pb.gw.go +++ b/api/management/v1/checks.pb.gw.go @@ -33,7 +33,7 @@ var ( _ = metadata.Join ) -func request_SecurityChecksService_ListFailedServices_0(ctx context.Context, marshaler runtime.Marshaler, client SecurityChecksServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_AdvisorService_ListFailedServices_0(ctx context.Context, marshaler runtime.Marshaler, client AdvisorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListFailedServicesRequest var metadata runtime.ServerMetadata @@ -49,7 +49,7 @@ func request_SecurityChecksService_ListFailedServices_0(ctx context.Context, mar return msg, metadata, err } -func local_request_SecurityChecksService_ListFailedServices_0(ctx context.Context, marshaler runtime.Marshaler, server SecurityChecksServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_AdvisorService_ListFailedServices_0(ctx context.Context, marshaler runtime.Marshaler, server AdvisorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListFailedServicesRequest var metadata runtime.ServerMetadata @@ -65,7 +65,7 @@ func local_request_SecurityChecksService_ListFailedServices_0(ctx context.Contex return msg, metadata, err } -func request_SecurityChecksService_GetFailedChecks_0(ctx context.Context, marshaler runtime.Marshaler, client SecurityChecksServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_AdvisorService_GetFailedChecks_0(ctx context.Context, marshaler runtime.Marshaler, client AdvisorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetFailedChecksRequest var metadata runtime.ServerMetadata @@ -81,7 +81,7 @@ func request_SecurityChecksService_GetFailedChecks_0(ctx context.Context, marsha return msg, metadata, err } -func local_request_SecurityChecksService_GetFailedChecks_0(ctx context.Context, marshaler runtime.Marshaler, server SecurityChecksServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_AdvisorService_GetFailedChecks_0(ctx context.Context, marshaler runtime.Marshaler, server AdvisorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetFailedChecksRequest var metadata runtime.ServerMetadata @@ -97,8 +97,8 @@ func local_request_SecurityChecksService_GetFailedChecks_0(ctx context.Context, return msg, metadata, err } -func request_SecurityChecksService_StartSecurityChecks_0(ctx context.Context, marshaler runtime.Marshaler, client SecurityChecksServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq StartSecurityChecksRequest +func request_AdvisorService_StartAdvisorChecks_0(ctx context.Context, marshaler runtime.Marshaler, client AdvisorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq StartAdvisorChecksRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -109,12 +109,12 @@ func request_SecurityChecksService_StartSecurityChecks_0(ctx context.Context, ma return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.StartSecurityChecks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.StartAdvisorChecks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_SecurityChecksService_StartSecurityChecks_0(ctx context.Context, marshaler runtime.Marshaler, server SecurityChecksServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq StartSecurityChecksRequest +func local_request_AdvisorService_StartAdvisorChecks_0(ctx context.Context, marshaler runtime.Marshaler, server AdvisorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq StartAdvisorChecksRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -125,12 +125,12 @@ func local_request_SecurityChecksService_StartSecurityChecks_0(ctx context.Conte return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.StartSecurityChecks(ctx, &protoReq) + msg, err := server.StartAdvisorChecks(ctx, &protoReq) return msg, metadata, err } -func request_SecurityChecksService_ListSecurityChecks_0(ctx context.Context, marshaler runtime.Marshaler, client SecurityChecksServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListSecurityChecksRequest +func request_AdvisorService_ListAdvisorChecks_0(ctx context.Context, marshaler runtime.Marshaler, client AdvisorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListAdvisorChecksRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -141,12 +141,12 @@ func request_SecurityChecksService_ListSecurityChecks_0(ctx context.Context, mar return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ListSecurityChecks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.ListAdvisorChecks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_SecurityChecksService_ListSecurityChecks_0(ctx context.Context, marshaler runtime.Marshaler, server SecurityChecksServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListSecurityChecksRequest +func local_request_AdvisorService_ListAdvisorChecks_0(ctx context.Context, marshaler runtime.Marshaler, server AdvisorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListAdvisorChecksRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -157,11 +157,11 @@ func local_request_SecurityChecksService_ListSecurityChecks_0(ctx context.Contex return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ListSecurityChecks(ctx, &protoReq) + msg, err := server.ListAdvisorChecks(ctx, &protoReq) return msg, metadata, err } -func request_SecurityChecksService_ListAdvisors_0(ctx context.Context, marshaler runtime.Marshaler, client SecurityChecksServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_AdvisorService_ListAdvisors_0(ctx context.Context, marshaler runtime.Marshaler, client AdvisorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListAdvisorsRequest var metadata runtime.ServerMetadata @@ -177,7 +177,7 @@ func request_SecurityChecksService_ListAdvisors_0(ctx context.Context, marshaler return msg, metadata, err } -func local_request_SecurityChecksService_ListAdvisors_0(ctx context.Context, marshaler runtime.Marshaler, server SecurityChecksServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_AdvisorService_ListAdvisors_0(ctx context.Context, marshaler runtime.Marshaler, server AdvisorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListAdvisorsRequest var metadata runtime.ServerMetadata @@ -193,8 +193,8 @@ func local_request_SecurityChecksService_ListAdvisors_0(ctx context.Context, mar return msg, metadata, err } -func request_SecurityChecksService_ChangeSecurityChecks_0(ctx context.Context, marshaler runtime.Marshaler, client SecurityChecksServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ChangeSecurityChecksRequest +func request_AdvisorService_ChangeAdvisorChecks_0(ctx context.Context, marshaler runtime.Marshaler, client AdvisorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ChangeAdvisorChecksRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -205,12 +205,12 @@ func request_SecurityChecksService_ChangeSecurityChecks_0(ctx context.Context, m return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ChangeSecurityChecks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.ChangeAdvisorChecks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_SecurityChecksService_ChangeSecurityChecks_0(ctx context.Context, marshaler runtime.Marshaler, server SecurityChecksServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ChangeSecurityChecksRequest +func local_request_AdvisorService_ChangeAdvisorChecks_0(ctx context.Context, marshaler runtime.Marshaler, server AdvisorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ChangeAdvisorChecksRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -221,16 +221,16 @@ func local_request_SecurityChecksService_ChangeSecurityChecks_0(ctx context.Cont return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ChangeSecurityChecks(ctx, &protoReq) + msg, err := server.ChangeAdvisorChecks(ctx, &protoReq) return msg, metadata, err } -// RegisterSecurityChecksServiceHandlerServer registers the http handlers for service SecurityChecksService to "mux". -// UnaryRPC :call SecurityChecksServiceServer directly. +// RegisterAdvisorServiceHandlerServer registers the http handlers for service AdvisorService to "mux". +// UnaryRPC :call AdvisorServiceServer 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 RegisterSecurityChecksServiceHandlerFromEndpoint instead. -func RegisterSecurityChecksServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SecurityChecksServiceServer) error { - mux.Handle("POST", pattern_SecurityChecksService_ListFailedServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAdvisorServiceHandlerFromEndpoint instead. +func RegisterAdvisorServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AdvisorServiceServer) error { + mux.Handle("POST", pattern_AdvisorService_ListFailedServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -238,12 +238,12 @@ func RegisterSecurityChecksServiceHandlerServer(ctx context.Context, mux *runtim inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.SecurityChecksService/ListFailedServices", runtime.WithHTTPPathPattern("/v1/management/SecurityChecks/ListFailedServices")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.AdvisorService/ListFailedServices", runtime.WithHTTPPathPattern("/v1/management/Advisors/ListFailedServices")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SecurityChecksService_ListFailedServices_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AdvisorService_ListFailedServices_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 { @@ -251,10 +251,10 @@ func RegisterSecurityChecksServiceHandlerServer(ctx context.Context, mux *runtim return } - forward_SecurityChecksService_ListFailedServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AdvisorService_ListFailedServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_SecurityChecksService_GetFailedChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AdvisorService_GetFailedChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -262,12 +262,12 @@ func RegisterSecurityChecksServiceHandlerServer(ctx context.Context, mux *runtim inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.SecurityChecksService/GetFailedChecks", runtime.WithHTTPPathPattern("/v1/management/SecurityChecks/FailedChecks")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.AdvisorService/GetFailedChecks", runtime.WithHTTPPathPattern("/v1/management/Advisors/FailedChecks")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SecurityChecksService_GetFailedChecks_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AdvisorService_GetFailedChecks_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 { @@ -275,10 +275,10 @@ func RegisterSecurityChecksServiceHandlerServer(ctx context.Context, mux *runtim return } - forward_SecurityChecksService_GetFailedChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AdvisorService_GetFailedChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_SecurityChecksService_StartSecurityChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AdvisorService_StartAdvisorChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -286,12 +286,12 @@ func RegisterSecurityChecksServiceHandlerServer(ctx context.Context, mux *runtim inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.SecurityChecksService/StartSecurityChecks", runtime.WithHTTPPathPattern("/v1/management/SecurityChecks/Start")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.AdvisorService/StartAdvisorChecks", runtime.WithHTTPPathPattern("/v1/management/Advisors/StartChecks")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SecurityChecksService_StartSecurityChecks_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AdvisorService_StartAdvisorChecks_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 { @@ -299,10 +299,10 @@ func RegisterSecurityChecksServiceHandlerServer(ctx context.Context, mux *runtim return } - forward_SecurityChecksService_StartSecurityChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AdvisorService_StartAdvisorChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_SecurityChecksService_ListSecurityChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AdvisorService_ListAdvisorChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -310,12 +310,12 @@ func RegisterSecurityChecksServiceHandlerServer(ctx context.Context, mux *runtim inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.SecurityChecksService/ListSecurityChecks", runtime.WithHTTPPathPattern("/v1/management/SecurityChecks/List")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.AdvisorService/ListAdvisorChecks", runtime.WithHTTPPathPattern("/v1/management/Advisors/ListChecks")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SecurityChecksService_ListSecurityChecks_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AdvisorService_ListAdvisorChecks_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 { @@ -323,10 +323,10 @@ func RegisterSecurityChecksServiceHandlerServer(ctx context.Context, mux *runtim return } - forward_SecurityChecksService_ListSecurityChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AdvisorService_ListAdvisorChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_SecurityChecksService_ListAdvisors_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AdvisorService_ListAdvisors_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -334,12 +334,12 @@ func RegisterSecurityChecksServiceHandlerServer(ctx context.Context, mux *runtim inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.SecurityChecksService/ListAdvisors", runtime.WithHTTPPathPattern("/v1/management/Advisors/List")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.AdvisorService/ListAdvisors", runtime.WithHTTPPathPattern("/v1/management/Advisors/List")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SecurityChecksService_ListAdvisors_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AdvisorService_ListAdvisors_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 { @@ -347,10 +347,10 @@ func RegisterSecurityChecksServiceHandlerServer(ctx context.Context, mux *runtim return } - forward_SecurityChecksService_ListAdvisors_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AdvisorService_ListAdvisors_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_SecurityChecksService_ChangeSecurityChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AdvisorService_ChangeAdvisorChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -358,12 +358,12 @@ func RegisterSecurityChecksServiceHandlerServer(ctx context.Context, mux *runtim inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.SecurityChecksService/ChangeSecurityChecks", runtime.WithHTTPPathPattern("/v1/management/SecurityChecks/Change")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.AdvisorService/ChangeAdvisorChecks", runtime.WithHTTPPathPattern("/v1/management/Advisors/Change")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SecurityChecksService_ChangeSecurityChecks_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AdvisorService_ChangeAdvisorChecks_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 { @@ -371,15 +371,15 @@ func RegisterSecurityChecksServiceHandlerServer(ctx context.Context, mux *runtim return } - forward_SecurityChecksService_ChangeSecurityChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AdvisorService_ChangeAdvisorChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil } -// RegisterSecurityChecksServiceHandlerFromEndpoint is same as RegisterSecurityChecksServiceHandler but +// RegisterAdvisorServiceHandlerFromEndpoint is same as RegisterAdvisorServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterSecurityChecksServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { +func RegisterAdvisorServiceHandlerFromEndpoint(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 @@ -399,174 +399,174 @@ func RegisterSecurityChecksServiceHandlerFromEndpoint(ctx context.Context, mux * }() }() - return RegisterSecurityChecksServiceHandler(ctx, mux, conn) + return RegisterAdvisorServiceHandler(ctx, mux, conn) } -// RegisterSecurityChecksServiceHandler registers the http handlers for service SecurityChecksService to "mux". +// RegisterAdvisorServiceHandler registers the http handlers for service AdvisorService to "mux". // The handlers forward requests to the grpc endpoint over "conn". -func RegisterSecurityChecksServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterSecurityChecksServiceHandlerClient(ctx, mux, NewSecurityChecksServiceClient(conn)) +func RegisterAdvisorServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterAdvisorServiceHandlerClient(ctx, mux, NewAdvisorServiceClient(conn)) } -// RegisterSecurityChecksServiceHandlerClient registers the http handlers for service SecurityChecksService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SecurityChecksServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SecurityChecksServiceClient" +// RegisterAdvisorServiceHandlerClient registers the http handlers for service AdvisorService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AdvisorServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AdvisorServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "SecurityChecksServiceClient" to call the correct interceptors. -func RegisterSecurityChecksServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SecurityChecksServiceClient) error { - mux.Handle("POST", pattern_SecurityChecksService_ListFailedServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { +// "AdvisorServiceClient" to call the correct interceptors. +func RegisterAdvisorServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AdvisorServiceClient) error { + mux.Handle("POST", pattern_AdvisorService_ListFailedServices_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, "/management.v1.SecurityChecksService/ListFailedServices", runtime.WithHTTPPathPattern("/v1/management/SecurityChecks/ListFailedServices")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.AdvisorService/ListFailedServices", runtime.WithHTTPPathPattern("/v1/management/Advisors/ListFailedServices")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SecurityChecksService_ListFailedServices_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AdvisorService_ListFailedServices_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SecurityChecksService_ListFailedServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AdvisorService_ListFailedServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_SecurityChecksService_GetFailedChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AdvisorService_GetFailedChecks_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, "/management.v1.SecurityChecksService/GetFailedChecks", runtime.WithHTTPPathPattern("/v1/management/SecurityChecks/FailedChecks")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.AdvisorService/GetFailedChecks", runtime.WithHTTPPathPattern("/v1/management/Advisors/FailedChecks")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SecurityChecksService_GetFailedChecks_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AdvisorService_GetFailedChecks_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SecurityChecksService_GetFailedChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AdvisorService_GetFailedChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_SecurityChecksService_StartSecurityChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AdvisorService_StartAdvisorChecks_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, "/management.v1.SecurityChecksService/StartSecurityChecks", runtime.WithHTTPPathPattern("/v1/management/SecurityChecks/Start")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.AdvisorService/StartAdvisorChecks", runtime.WithHTTPPathPattern("/v1/management/Advisors/StartChecks")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SecurityChecksService_StartSecurityChecks_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AdvisorService_StartAdvisorChecks_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SecurityChecksService_StartSecurityChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AdvisorService_StartAdvisorChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_SecurityChecksService_ListSecurityChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AdvisorService_ListAdvisorChecks_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, "/management.v1.SecurityChecksService/ListSecurityChecks", runtime.WithHTTPPathPattern("/v1/management/SecurityChecks/List")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.AdvisorService/ListAdvisorChecks", runtime.WithHTTPPathPattern("/v1/management/Advisors/ListChecks")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SecurityChecksService_ListSecurityChecks_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AdvisorService_ListAdvisorChecks_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SecurityChecksService_ListSecurityChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AdvisorService_ListAdvisorChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_SecurityChecksService_ListAdvisors_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AdvisorService_ListAdvisors_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, "/management.v1.SecurityChecksService/ListAdvisors", runtime.WithHTTPPathPattern("/v1/management/Advisors/List")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.AdvisorService/ListAdvisors", runtime.WithHTTPPathPattern("/v1/management/Advisors/List")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SecurityChecksService_ListAdvisors_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AdvisorService_ListAdvisors_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SecurityChecksService_ListAdvisors_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AdvisorService_ListAdvisors_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_SecurityChecksService_ChangeSecurityChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AdvisorService_ChangeAdvisorChecks_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, "/management.v1.SecurityChecksService/ChangeSecurityChecks", runtime.WithHTTPPathPattern("/v1/management/SecurityChecks/Change")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.AdvisorService/ChangeAdvisorChecks", runtime.WithHTTPPathPattern("/v1/management/Advisors/Change")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SecurityChecksService_ChangeSecurityChecks_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AdvisorService_ChangeAdvisorChecks_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SecurityChecksService_ChangeSecurityChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AdvisorService_ChangeAdvisorChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil } var ( - pattern_SecurityChecksService_ListFailedServices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "SecurityChecks", "ListFailedServices"}, "")) + pattern_AdvisorService_ListFailedServices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Advisors", "ListFailedServices"}, "")) - pattern_SecurityChecksService_GetFailedChecks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "SecurityChecks", "FailedChecks"}, "")) + pattern_AdvisorService_GetFailedChecks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Advisors", "FailedChecks"}, "")) - pattern_SecurityChecksService_StartSecurityChecks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "SecurityChecks", "Start"}, "")) + pattern_AdvisorService_StartAdvisorChecks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Advisors", "StartChecks"}, "")) - pattern_SecurityChecksService_ListSecurityChecks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "SecurityChecks", "List"}, "")) + pattern_AdvisorService_ListAdvisorChecks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Advisors", "ListChecks"}, "")) - pattern_SecurityChecksService_ListAdvisors_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Advisors", "List"}, "")) + pattern_AdvisorService_ListAdvisors_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Advisors", "List"}, "")) - pattern_SecurityChecksService_ChangeSecurityChecks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "SecurityChecks", "Change"}, "")) + pattern_AdvisorService_ChangeAdvisorChecks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Advisors", "Change"}, "")) ) var ( - forward_SecurityChecksService_ListFailedServices_0 = runtime.ForwardResponseMessage + forward_AdvisorService_ListFailedServices_0 = runtime.ForwardResponseMessage - forward_SecurityChecksService_GetFailedChecks_0 = runtime.ForwardResponseMessage + forward_AdvisorService_GetFailedChecks_0 = runtime.ForwardResponseMessage - forward_SecurityChecksService_StartSecurityChecks_0 = runtime.ForwardResponseMessage + forward_AdvisorService_StartAdvisorChecks_0 = runtime.ForwardResponseMessage - forward_SecurityChecksService_ListSecurityChecks_0 = runtime.ForwardResponseMessage + forward_AdvisorService_ListAdvisorChecks_0 = runtime.ForwardResponseMessage - forward_SecurityChecksService_ListAdvisors_0 = runtime.ForwardResponseMessage + forward_AdvisorService_ListAdvisors_0 = runtime.ForwardResponseMessage - forward_SecurityChecksService_ChangeSecurityChecks_0 = runtime.ForwardResponseMessage + forward_AdvisorService_ChangeAdvisorChecks_0 = runtime.ForwardResponseMessage ) diff --git a/api/management/v1/checks.pb.validate.go b/api/management/v1/checks.pb.validate.go index 7d3a5fe289..0ccccb2a66 100644 --- a/api/management/v1/checks.pb.validate.go +++ b/api/management/v1/checks.pb.validate.go @@ -35,22 +35,22 @@ var ( _ = sort.Sort ) -// Validate checks the field values on SecurityCheckResult with the rules +// Validate checks the field values on AdvisorCheckResult with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. -func (m *SecurityCheckResult) Validate() error { +func (m *AdvisorCheckResult) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on SecurityCheckResult with the rules +// ValidateAll checks the field values on AdvisorCheckResult with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// SecurityCheckResultMultiError, or nil if none found. -func (m *SecurityCheckResult) ValidateAll() error { +// AdvisorCheckResultMultiError, or nil if none found. +func (m *AdvisorCheckResult) ValidateAll() error { return m.validate(true) } -func (m *SecurityCheckResult) validate(all bool) error { +func (m *AdvisorCheckResult) validate(all bool) error { if m == nil { return nil } @@ -70,19 +70,19 @@ func (m *SecurityCheckResult) validate(all bool) error { // no validation rules for ServiceName if len(errors) > 0 { - return SecurityCheckResultMultiError(errors) + return AdvisorCheckResultMultiError(errors) } return nil } -// SecurityCheckResultMultiError is an error wrapping multiple validation -// errors returned by SecurityCheckResult.ValidateAll() if the designated -// constraints aren't met. -type SecurityCheckResultMultiError []error +// AdvisorCheckResultMultiError is an error wrapping multiple validation errors +// returned by AdvisorCheckResult.ValidateAll() if the designated constraints +// aren't met. +type AdvisorCheckResultMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m SecurityCheckResultMultiError) Error() string { +func (m AdvisorCheckResultMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -91,11 +91,11 @@ func (m SecurityCheckResultMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m SecurityCheckResultMultiError) AllErrors() []error { return m } +func (m AdvisorCheckResultMultiError) AllErrors() []error { return m } -// SecurityCheckResultValidationError is the validation error returned by -// SecurityCheckResult.Validate if the designated constraints aren't met. -type SecurityCheckResultValidationError struct { +// AdvisorCheckResultValidationError is the validation error returned by +// AdvisorCheckResult.Validate if the designated constraints aren't met. +type AdvisorCheckResultValidationError struct { field string reason string cause error @@ -103,24 +103,24 @@ type SecurityCheckResultValidationError struct { } // Field function returns field value. -func (e SecurityCheckResultValidationError) Field() string { return e.field } +func (e AdvisorCheckResultValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e SecurityCheckResultValidationError) Reason() string { return e.reason } +func (e AdvisorCheckResultValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e SecurityCheckResultValidationError) Cause() error { return e.cause } +func (e AdvisorCheckResultValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e SecurityCheckResultValidationError) Key() bool { return e.key } +func (e AdvisorCheckResultValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e SecurityCheckResultValidationError) ErrorName() string { - return "SecurityCheckResultValidationError" +func (e AdvisorCheckResultValidationError) ErrorName() string { + return "AdvisorCheckResultValidationError" } // Error satisfies the builtin error interface -func (e SecurityCheckResultValidationError) Error() string { +func (e AdvisorCheckResultValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -132,14 +132,14 @@ func (e SecurityCheckResultValidationError) Error() string { } return fmt.Sprintf( - "invalid %sSecurityCheckResult.%s: %s%s", + "invalid %sAdvisorCheckResult.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = SecurityCheckResultValidationError{} +var _ error = AdvisorCheckResultValidationError{} var _ interface { Field() string @@ -147,7 +147,7 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = SecurityCheckResultValidationError{} +} = AdvisorCheckResultValidationError{} // Validate checks the field values on CheckResultSummary with the rules // defined in the proto definition for this message. If any rules are @@ -388,22 +388,22 @@ var _ interface { ErrorName() string } = CheckResultValidationError{} -// Validate checks the field values on SecurityCheck with the rules defined in +// Validate checks the field values on AdvisorCheck with the rules defined in // the proto definition for this message. If any rules are violated, the first // error encountered is returned, or nil if there are no violations. -func (m *SecurityCheck) Validate() error { +func (m *AdvisorCheck) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on SecurityCheck with the rules defined +// ValidateAll checks the field values on AdvisorCheck with the rules defined // in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in SecurityCheckMultiError, or +// result is a list of violation errors wrapped in AdvisorCheckMultiError, or // nil if none found. -func (m *SecurityCheck) ValidateAll() error { +func (m *AdvisorCheck) ValidateAll() error { return m.validate(true) } -func (m *SecurityCheck) validate(all bool) error { +func (m *AdvisorCheck) validate(all bool) error { if m == nil { return nil } @@ -423,19 +423,18 @@ func (m *SecurityCheck) validate(all bool) error { // no validation rules for Family if len(errors) > 0 { - return SecurityCheckMultiError(errors) + return AdvisorCheckMultiError(errors) } return nil } -// SecurityCheckMultiError is an error wrapping multiple validation errors -// returned by SecurityCheck.ValidateAll() if the designated constraints -// aren't met. -type SecurityCheckMultiError []error +// AdvisorCheckMultiError is an error wrapping multiple validation errors +// returned by AdvisorCheck.ValidateAll() if the designated constraints aren't met. +type AdvisorCheckMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m SecurityCheckMultiError) Error() string { +func (m AdvisorCheckMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -444,11 +443,11 @@ func (m SecurityCheckMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m SecurityCheckMultiError) AllErrors() []error { return m } +func (m AdvisorCheckMultiError) AllErrors() []error { return m } -// SecurityCheckValidationError is the validation error returned by -// SecurityCheck.Validate if the designated constraints aren't met. -type SecurityCheckValidationError struct { +// AdvisorCheckValidationError is the validation error returned by +// AdvisorCheck.Validate if the designated constraints aren't met. +type AdvisorCheckValidationError struct { field string reason string cause error @@ -456,22 +455,22 @@ type SecurityCheckValidationError struct { } // Field function returns field value. -func (e SecurityCheckValidationError) Field() string { return e.field } +func (e AdvisorCheckValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e SecurityCheckValidationError) Reason() string { return e.reason } +func (e AdvisorCheckValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e SecurityCheckValidationError) Cause() error { return e.cause } +func (e AdvisorCheckValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e SecurityCheckValidationError) Key() bool { return e.key } +func (e AdvisorCheckValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e SecurityCheckValidationError) ErrorName() string { return "SecurityCheckValidationError" } +func (e AdvisorCheckValidationError) ErrorName() string { return "AdvisorCheckValidationError" } // Error satisfies the builtin error interface -func (e SecurityCheckValidationError) Error() string { +func (e AdvisorCheckValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -483,14 +482,14 @@ func (e SecurityCheckValidationError) Error() string { } return fmt.Sprintf( - "invalid %sSecurityCheck.%s: %s%s", + "invalid %sAdvisorCheck.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = SecurityCheckValidationError{} +var _ error = AdvisorCheckValidationError{} var _ interface { Field() string @@ -498,7 +497,7 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = SecurityCheckValidationError{} +} = AdvisorCheckValidationError{} // Validate checks the field values on Advisor with the rules defined in the // proto definition for this message. If any rules are violated, the first @@ -642,22 +641,22 @@ var _ interface { ErrorName() string } = AdvisorValidationError{} -// Validate checks the field values on ChangeSecurityCheckParams with the rules +// Validate checks the field values on ChangeAdvisorCheckParams with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. -func (m *ChangeSecurityCheckParams) Validate() error { +func (m *ChangeAdvisorCheckParams) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on ChangeSecurityCheckParams with the +// ValidateAll checks the field values on ChangeAdvisorCheckParams with the // rules defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// ChangeSecurityCheckParamsMultiError, or nil if none found. -func (m *ChangeSecurityCheckParams) ValidateAll() error { +// ChangeAdvisorCheckParamsMultiError, or nil if none found. +func (m *ChangeAdvisorCheckParams) ValidateAll() error { return m.validate(true) } -func (m *ChangeSecurityCheckParams) validate(all bool) error { +func (m *ChangeAdvisorCheckParams) validate(all bool) error { if m == nil { return nil } @@ -673,19 +672,19 @@ func (m *ChangeSecurityCheckParams) validate(all bool) error { } if len(errors) > 0 { - return ChangeSecurityCheckParamsMultiError(errors) + return ChangeAdvisorCheckParamsMultiError(errors) } return nil } -// ChangeSecurityCheckParamsMultiError is an error wrapping multiple validation -// errors returned by ChangeSecurityCheckParams.ValidateAll() if the -// designated constraints aren't met. -type ChangeSecurityCheckParamsMultiError []error +// ChangeAdvisorCheckParamsMultiError is an error wrapping multiple validation +// errors returned by ChangeAdvisorCheckParams.ValidateAll() if the designated +// constraints aren't met. +type ChangeAdvisorCheckParamsMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m ChangeSecurityCheckParamsMultiError) Error() string { +func (m ChangeAdvisorCheckParamsMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -694,11 +693,11 @@ func (m ChangeSecurityCheckParamsMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m ChangeSecurityCheckParamsMultiError) AllErrors() []error { return m } +func (m ChangeAdvisorCheckParamsMultiError) AllErrors() []error { return m } -// ChangeSecurityCheckParamsValidationError is the validation error returned by -// ChangeSecurityCheckParams.Validate if the designated constraints aren't met. -type ChangeSecurityCheckParamsValidationError struct { +// ChangeAdvisorCheckParamsValidationError is the validation error returned by +// ChangeAdvisorCheckParams.Validate if the designated constraints aren't met. +type ChangeAdvisorCheckParamsValidationError struct { field string reason string cause error @@ -706,24 +705,24 @@ type ChangeSecurityCheckParamsValidationError struct { } // Field function returns field value. -func (e ChangeSecurityCheckParamsValidationError) Field() string { return e.field } +func (e ChangeAdvisorCheckParamsValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e ChangeSecurityCheckParamsValidationError) Reason() string { return e.reason } +func (e ChangeAdvisorCheckParamsValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e ChangeSecurityCheckParamsValidationError) Cause() error { return e.cause } +func (e ChangeAdvisorCheckParamsValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e ChangeSecurityCheckParamsValidationError) Key() bool { return e.key } +func (e ChangeAdvisorCheckParamsValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e ChangeSecurityCheckParamsValidationError) ErrorName() string { - return "ChangeSecurityCheckParamsValidationError" +func (e ChangeAdvisorCheckParamsValidationError) ErrorName() string { + return "ChangeAdvisorCheckParamsValidationError" } // Error satisfies the builtin error interface -func (e ChangeSecurityCheckParamsValidationError) Error() string { +func (e ChangeAdvisorCheckParamsValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -735,14 +734,14 @@ func (e ChangeSecurityCheckParamsValidationError) Error() string { } return fmt.Sprintf( - "invalid %sChangeSecurityCheckParams.%s: %s%s", + "invalid %sChangeAdvisorCheckParams.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = ChangeSecurityCheckParamsValidationError{} +var _ error = ChangeAdvisorCheckParamsValidationError{} var _ interface { Field() string @@ -750,24 +749,24 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = ChangeSecurityCheckParamsValidationError{} +} = ChangeAdvisorCheckParamsValidationError{} -// Validate checks the field values on StartSecurityChecksRequest with the -// rules defined in the proto definition for this message. If any rules are +// Validate checks the field values on StartAdvisorChecksRequest with the rules +// defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. -func (m *StartSecurityChecksRequest) Validate() error { +func (m *StartAdvisorChecksRequest) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on StartSecurityChecksRequest with the +// ValidateAll checks the field values on StartAdvisorChecksRequest with the // rules defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// StartSecurityChecksRequestMultiError, or nil if none found. -func (m *StartSecurityChecksRequest) ValidateAll() error { +// StartAdvisorChecksRequestMultiError, or nil if none found. +func (m *StartAdvisorChecksRequest) ValidateAll() error { return m.validate(true) } -func (m *StartSecurityChecksRequest) validate(all bool) error { +func (m *StartAdvisorChecksRequest) validate(all bool) error { if m == nil { return nil } @@ -775,19 +774,19 @@ func (m *StartSecurityChecksRequest) validate(all bool) error { var errors []error if len(errors) > 0 { - return StartSecurityChecksRequestMultiError(errors) + return StartAdvisorChecksRequestMultiError(errors) } return nil } -// StartSecurityChecksRequestMultiError is an error wrapping multiple -// validation errors returned by StartSecurityChecksRequest.ValidateAll() if -// the designated constraints aren't met. -type StartSecurityChecksRequestMultiError []error +// StartAdvisorChecksRequestMultiError is an error wrapping multiple validation +// errors returned by StartAdvisorChecksRequest.ValidateAll() if the +// designated constraints aren't met. +type StartAdvisorChecksRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m StartSecurityChecksRequestMultiError) Error() string { +func (m StartAdvisorChecksRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -796,11 +795,11 @@ func (m StartSecurityChecksRequestMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m StartSecurityChecksRequestMultiError) AllErrors() []error { return m } +func (m StartAdvisorChecksRequestMultiError) AllErrors() []error { return m } -// StartSecurityChecksRequestValidationError is the validation error returned -// by StartSecurityChecksRequest.Validate if the designated constraints aren't met. -type StartSecurityChecksRequestValidationError struct { +// StartAdvisorChecksRequestValidationError is the validation error returned by +// StartAdvisorChecksRequest.Validate if the designated constraints aren't met. +type StartAdvisorChecksRequestValidationError struct { field string reason string cause error @@ -808,24 +807,24 @@ type StartSecurityChecksRequestValidationError struct { } // Field function returns field value. -func (e StartSecurityChecksRequestValidationError) Field() string { return e.field } +func (e StartAdvisorChecksRequestValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e StartSecurityChecksRequestValidationError) Reason() string { return e.reason } +func (e StartAdvisorChecksRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e StartSecurityChecksRequestValidationError) Cause() error { return e.cause } +func (e StartAdvisorChecksRequestValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e StartSecurityChecksRequestValidationError) Key() bool { return e.key } +func (e StartAdvisorChecksRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e StartSecurityChecksRequestValidationError) ErrorName() string { - return "StartSecurityChecksRequestValidationError" +func (e StartAdvisorChecksRequestValidationError) ErrorName() string { + return "StartAdvisorChecksRequestValidationError" } // Error satisfies the builtin error interface -func (e StartSecurityChecksRequestValidationError) Error() string { +func (e StartAdvisorChecksRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -837,14 +836,14 @@ func (e StartSecurityChecksRequestValidationError) Error() string { } return fmt.Sprintf( - "invalid %sStartSecurityChecksRequest.%s: %s%s", + "invalid %sStartAdvisorChecksRequest.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = StartSecurityChecksRequestValidationError{} +var _ error = StartAdvisorChecksRequestValidationError{} var _ interface { Field() string @@ -852,24 +851,24 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = StartSecurityChecksRequestValidationError{} +} = StartAdvisorChecksRequestValidationError{} -// Validate checks the field values on StartSecurityChecksResponse with the +// Validate checks the field values on StartAdvisorChecksResponse with the // rules defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. -func (m *StartSecurityChecksResponse) Validate() error { +func (m *StartAdvisorChecksResponse) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on StartSecurityChecksResponse with the +// ValidateAll checks the field values on StartAdvisorChecksResponse with the // rules defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// StartSecurityChecksResponseMultiError, or nil if none found. -func (m *StartSecurityChecksResponse) ValidateAll() error { +// StartAdvisorChecksResponseMultiError, or nil if none found. +func (m *StartAdvisorChecksResponse) ValidateAll() error { return m.validate(true) } -func (m *StartSecurityChecksResponse) validate(all bool) error { +func (m *StartAdvisorChecksResponse) validate(all bool) error { if m == nil { return nil } @@ -877,19 +876,19 @@ func (m *StartSecurityChecksResponse) validate(all bool) error { var errors []error if len(errors) > 0 { - return StartSecurityChecksResponseMultiError(errors) + return StartAdvisorChecksResponseMultiError(errors) } return nil } -// StartSecurityChecksResponseMultiError is an error wrapping multiple -// validation errors returned by StartSecurityChecksResponse.ValidateAll() if +// StartAdvisorChecksResponseMultiError is an error wrapping multiple +// validation errors returned by StartAdvisorChecksResponse.ValidateAll() if // the designated constraints aren't met. -type StartSecurityChecksResponseMultiError []error +type StartAdvisorChecksResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m StartSecurityChecksResponseMultiError) Error() string { +func (m StartAdvisorChecksResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -898,12 +897,11 @@ func (m StartSecurityChecksResponseMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m StartSecurityChecksResponseMultiError) AllErrors() []error { return m } +func (m StartAdvisorChecksResponseMultiError) AllErrors() []error { return m } -// StartSecurityChecksResponseValidationError is the validation error returned -// by StartSecurityChecksResponse.Validate if the designated constraints -// aren't met. -type StartSecurityChecksResponseValidationError struct { +// StartAdvisorChecksResponseValidationError is the validation error returned +// by StartAdvisorChecksResponse.Validate if the designated constraints aren't met. +type StartAdvisorChecksResponseValidationError struct { field string reason string cause error @@ -911,24 +909,24 @@ type StartSecurityChecksResponseValidationError struct { } // Field function returns field value. -func (e StartSecurityChecksResponseValidationError) Field() string { return e.field } +func (e StartAdvisorChecksResponseValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e StartSecurityChecksResponseValidationError) Reason() string { return e.reason } +func (e StartAdvisorChecksResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e StartSecurityChecksResponseValidationError) Cause() error { return e.cause } +func (e StartAdvisorChecksResponseValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e StartSecurityChecksResponseValidationError) Key() bool { return e.key } +func (e StartAdvisorChecksResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e StartSecurityChecksResponseValidationError) ErrorName() string { - return "StartSecurityChecksResponseValidationError" +func (e StartAdvisorChecksResponseValidationError) ErrorName() string { + return "StartAdvisorChecksResponseValidationError" } // Error satisfies the builtin error interface -func (e StartSecurityChecksResponseValidationError) Error() string { +func (e StartAdvisorChecksResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -940,14 +938,14 @@ func (e StartSecurityChecksResponseValidationError) Error() string { } return fmt.Sprintf( - "invalid %sStartSecurityChecksResponse.%s: %s%s", + "invalid %sStartAdvisorChecksResponse.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = StartSecurityChecksResponseValidationError{} +var _ error = StartAdvisorChecksResponseValidationError{} var _ interface { Field() string @@ -955,24 +953,24 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = StartSecurityChecksResponseValidationError{} +} = StartAdvisorChecksResponseValidationError{} -// Validate checks the field values on ListSecurityChecksRequest with the rules +// Validate checks the field values on ListAdvisorChecksRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. -func (m *ListSecurityChecksRequest) Validate() error { +func (m *ListAdvisorChecksRequest) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on ListSecurityChecksRequest with the +// ValidateAll checks the field values on ListAdvisorChecksRequest with the // rules defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// ListSecurityChecksRequestMultiError, or nil if none found. -func (m *ListSecurityChecksRequest) ValidateAll() error { +// ListAdvisorChecksRequestMultiError, or nil if none found. +func (m *ListAdvisorChecksRequest) ValidateAll() error { return m.validate(true) } -func (m *ListSecurityChecksRequest) validate(all bool) error { +func (m *ListAdvisorChecksRequest) validate(all bool) error { if m == nil { return nil } @@ -980,19 +978,19 @@ func (m *ListSecurityChecksRequest) validate(all bool) error { var errors []error if len(errors) > 0 { - return ListSecurityChecksRequestMultiError(errors) + return ListAdvisorChecksRequestMultiError(errors) } return nil } -// ListSecurityChecksRequestMultiError is an error wrapping multiple validation -// errors returned by ListSecurityChecksRequest.ValidateAll() if the -// designated constraints aren't met. -type ListSecurityChecksRequestMultiError []error +// ListAdvisorChecksRequestMultiError is an error wrapping multiple validation +// errors returned by ListAdvisorChecksRequest.ValidateAll() if the designated +// constraints aren't met. +type ListAdvisorChecksRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m ListSecurityChecksRequestMultiError) Error() string { +func (m ListAdvisorChecksRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -1001,11 +999,11 @@ func (m ListSecurityChecksRequestMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m ListSecurityChecksRequestMultiError) AllErrors() []error { return m } +func (m ListAdvisorChecksRequestMultiError) AllErrors() []error { return m } -// ListSecurityChecksRequestValidationError is the validation error returned by -// ListSecurityChecksRequest.Validate if the designated constraints aren't met. -type ListSecurityChecksRequestValidationError struct { +// ListAdvisorChecksRequestValidationError is the validation error returned by +// ListAdvisorChecksRequest.Validate if the designated constraints aren't met. +type ListAdvisorChecksRequestValidationError struct { field string reason string cause error @@ -1013,24 +1011,24 @@ type ListSecurityChecksRequestValidationError struct { } // Field function returns field value. -func (e ListSecurityChecksRequestValidationError) Field() string { return e.field } +func (e ListAdvisorChecksRequestValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e ListSecurityChecksRequestValidationError) Reason() string { return e.reason } +func (e ListAdvisorChecksRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e ListSecurityChecksRequestValidationError) Cause() error { return e.cause } +func (e ListAdvisorChecksRequestValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e ListSecurityChecksRequestValidationError) Key() bool { return e.key } +func (e ListAdvisorChecksRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e ListSecurityChecksRequestValidationError) ErrorName() string { - return "ListSecurityChecksRequestValidationError" +func (e ListAdvisorChecksRequestValidationError) ErrorName() string { + return "ListAdvisorChecksRequestValidationError" } // Error satisfies the builtin error interface -func (e ListSecurityChecksRequestValidationError) Error() string { +func (e ListAdvisorChecksRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -1042,14 +1040,14 @@ func (e ListSecurityChecksRequestValidationError) Error() string { } return fmt.Sprintf( - "invalid %sListSecurityChecksRequest.%s: %s%s", + "invalid %sListAdvisorChecksRequest.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = ListSecurityChecksRequestValidationError{} +var _ error = ListAdvisorChecksRequestValidationError{} var _ interface { Field() string @@ -1057,24 +1055,24 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = ListSecurityChecksRequestValidationError{} +} = ListAdvisorChecksRequestValidationError{} -// Validate checks the field values on ListSecurityChecksResponse with the -// rules defined in the proto definition for this message. If any rules are +// Validate checks the field values on ListAdvisorChecksResponse with the rules +// defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. -func (m *ListSecurityChecksResponse) Validate() error { +func (m *ListAdvisorChecksResponse) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on ListSecurityChecksResponse with the +// ValidateAll checks the field values on ListAdvisorChecksResponse with the // rules defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// ListSecurityChecksResponseMultiError, or nil if none found. -func (m *ListSecurityChecksResponse) ValidateAll() error { +// ListAdvisorChecksResponseMultiError, or nil if none found. +func (m *ListAdvisorChecksResponse) ValidateAll() error { return m.validate(true) } -func (m *ListSecurityChecksResponse) validate(all bool) error { +func (m *ListAdvisorChecksResponse) validate(all bool) error { if m == nil { return nil } @@ -1088,7 +1086,7 @@ func (m *ListSecurityChecksResponse) validate(all bool) error { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, ListSecurityChecksResponseValidationError{ + errors = append(errors, ListAdvisorChecksResponseValidationError{ field: fmt.Sprintf("Checks[%v]", idx), reason: "embedded message failed validation", cause: err, @@ -1096,7 +1094,7 @@ func (m *ListSecurityChecksResponse) validate(all bool) error { } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, ListSecurityChecksResponseValidationError{ + errors = append(errors, ListAdvisorChecksResponseValidationError{ field: fmt.Sprintf("Checks[%v]", idx), reason: "embedded message failed validation", cause: err, @@ -1105,7 +1103,7 @@ func (m *ListSecurityChecksResponse) validate(all bool) error { } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return ListSecurityChecksResponseValidationError{ + return ListAdvisorChecksResponseValidationError{ field: fmt.Sprintf("Checks[%v]", idx), reason: "embedded message failed validation", cause: err, @@ -1116,19 +1114,19 @@ func (m *ListSecurityChecksResponse) validate(all bool) error { } if len(errors) > 0 { - return ListSecurityChecksResponseMultiError(errors) + return ListAdvisorChecksResponseMultiError(errors) } return nil } -// ListSecurityChecksResponseMultiError is an error wrapping multiple -// validation errors returned by ListSecurityChecksResponse.ValidateAll() if -// the designated constraints aren't met. -type ListSecurityChecksResponseMultiError []error +// ListAdvisorChecksResponseMultiError is an error wrapping multiple validation +// errors returned by ListAdvisorChecksResponse.ValidateAll() if the +// designated constraints aren't met. +type ListAdvisorChecksResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m ListSecurityChecksResponseMultiError) Error() string { +func (m ListAdvisorChecksResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -1137,11 +1135,11 @@ func (m ListSecurityChecksResponseMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m ListSecurityChecksResponseMultiError) AllErrors() []error { return m } +func (m ListAdvisorChecksResponseMultiError) AllErrors() []error { return m } -// ListSecurityChecksResponseValidationError is the validation error returned -// by ListSecurityChecksResponse.Validate if the designated constraints aren't met. -type ListSecurityChecksResponseValidationError struct { +// ListAdvisorChecksResponseValidationError is the validation error returned by +// ListAdvisorChecksResponse.Validate if the designated constraints aren't met. +type ListAdvisorChecksResponseValidationError struct { field string reason string cause error @@ -1149,24 +1147,24 @@ type ListSecurityChecksResponseValidationError struct { } // Field function returns field value. -func (e ListSecurityChecksResponseValidationError) Field() string { return e.field } +func (e ListAdvisorChecksResponseValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e ListSecurityChecksResponseValidationError) Reason() string { return e.reason } +func (e ListAdvisorChecksResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e ListSecurityChecksResponseValidationError) Cause() error { return e.cause } +func (e ListAdvisorChecksResponseValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e ListSecurityChecksResponseValidationError) Key() bool { return e.key } +func (e ListAdvisorChecksResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e ListSecurityChecksResponseValidationError) ErrorName() string { - return "ListSecurityChecksResponseValidationError" +func (e ListAdvisorChecksResponseValidationError) ErrorName() string { + return "ListAdvisorChecksResponseValidationError" } // Error satisfies the builtin error interface -func (e ListSecurityChecksResponseValidationError) Error() string { +func (e ListAdvisorChecksResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -1178,14 +1176,14 @@ func (e ListSecurityChecksResponseValidationError) Error() string { } return fmt.Sprintf( - "invalid %sListSecurityChecksResponse.%s: %s%s", + "invalid %sListAdvisorChecksResponse.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = ListSecurityChecksResponseValidationError{} +var _ error = ListAdvisorChecksResponseValidationError{} var _ interface { Field() string @@ -1193,7 +1191,7 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = ListSecurityChecksResponseValidationError{} +} = ListAdvisorChecksResponseValidationError{} // Validate checks the field values on ListAdvisorsRequest with the rules // defined in the proto definition for this message. If any rules are @@ -1433,22 +1431,22 @@ var _ interface { ErrorName() string } = ListAdvisorsResponseValidationError{} -// Validate checks the field values on ChangeSecurityChecksRequest with the +// Validate checks the field values on ChangeAdvisorChecksRequest with the // rules defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. -func (m *ChangeSecurityChecksRequest) Validate() error { +func (m *ChangeAdvisorChecksRequest) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on ChangeSecurityChecksRequest with the +// ValidateAll checks the field values on ChangeAdvisorChecksRequest with the // rules defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// ChangeSecurityChecksRequestMultiError, or nil if none found. -func (m *ChangeSecurityChecksRequest) ValidateAll() error { +// ChangeAdvisorChecksRequestMultiError, or nil if none found. +func (m *ChangeAdvisorChecksRequest) ValidateAll() error { return m.validate(true) } -func (m *ChangeSecurityChecksRequest) validate(all bool) error { +func (m *ChangeAdvisorChecksRequest) validate(all bool) error { if m == nil { return nil } @@ -1462,7 +1460,7 @@ func (m *ChangeSecurityChecksRequest) validate(all bool) error { switch v := interface{}(item).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, ChangeSecurityChecksRequestValidationError{ + errors = append(errors, ChangeAdvisorChecksRequestValidationError{ field: fmt.Sprintf("Params[%v]", idx), reason: "embedded message failed validation", cause: err, @@ -1470,7 +1468,7 @@ func (m *ChangeSecurityChecksRequest) validate(all bool) error { } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, ChangeSecurityChecksRequestValidationError{ + errors = append(errors, ChangeAdvisorChecksRequestValidationError{ field: fmt.Sprintf("Params[%v]", idx), reason: "embedded message failed validation", cause: err, @@ -1479,7 +1477,7 @@ func (m *ChangeSecurityChecksRequest) validate(all bool) error { } } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return ChangeSecurityChecksRequestValidationError{ + return ChangeAdvisorChecksRequestValidationError{ field: fmt.Sprintf("Params[%v]", idx), reason: "embedded message failed validation", cause: err, @@ -1490,19 +1488,19 @@ func (m *ChangeSecurityChecksRequest) validate(all bool) error { } if len(errors) > 0 { - return ChangeSecurityChecksRequestMultiError(errors) + return ChangeAdvisorChecksRequestMultiError(errors) } return nil } -// ChangeSecurityChecksRequestMultiError is an error wrapping multiple -// validation errors returned by ChangeSecurityChecksRequest.ValidateAll() if +// ChangeAdvisorChecksRequestMultiError is an error wrapping multiple +// validation errors returned by ChangeAdvisorChecksRequest.ValidateAll() if // the designated constraints aren't met. -type ChangeSecurityChecksRequestMultiError []error +type ChangeAdvisorChecksRequestMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m ChangeSecurityChecksRequestMultiError) Error() string { +func (m ChangeAdvisorChecksRequestMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -1511,12 +1509,11 @@ func (m ChangeSecurityChecksRequestMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m ChangeSecurityChecksRequestMultiError) AllErrors() []error { return m } +func (m ChangeAdvisorChecksRequestMultiError) AllErrors() []error { return m } -// ChangeSecurityChecksRequestValidationError is the validation error returned -// by ChangeSecurityChecksRequest.Validate if the designated constraints -// aren't met. -type ChangeSecurityChecksRequestValidationError struct { +// ChangeAdvisorChecksRequestValidationError is the validation error returned +// by ChangeAdvisorChecksRequest.Validate if the designated constraints aren't met. +type ChangeAdvisorChecksRequestValidationError struct { field string reason string cause error @@ -1524,24 +1521,24 @@ type ChangeSecurityChecksRequestValidationError struct { } // Field function returns field value. -func (e ChangeSecurityChecksRequestValidationError) Field() string { return e.field } +func (e ChangeAdvisorChecksRequestValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e ChangeSecurityChecksRequestValidationError) Reason() string { return e.reason } +func (e ChangeAdvisorChecksRequestValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e ChangeSecurityChecksRequestValidationError) Cause() error { return e.cause } +func (e ChangeAdvisorChecksRequestValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e ChangeSecurityChecksRequestValidationError) Key() bool { return e.key } +func (e ChangeAdvisorChecksRequestValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e ChangeSecurityChecksRequestValidationError) ErrorName() string { - return "ChangeSecurityChecksRequestValidationError" +func (e ChangeAdvisorChecksRequestValidationError) ErrorName() string { + return "ChangeAdvisorChecksRequestValidationError" } // Error satisfies the builtin error interface -func (e ChangeSecurityChecksRequestValidationError) Error() string { +func (e ChangeAdvisorChecksRequestValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -1553,14 +1550,14 @@ func (e ChangeSecurityChecksRequestValidationError) Error() string { } return fmt.Sprintf( - "invalid %sChangeSecurityChecksRequest.%s: %s%s", + "invalid %sChangeAdvisorChecksRequest.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = ChangeSecurityChecksRequestValidationError{} +var _ error = ChangeAdvisorChecksRequestValidationError{} var _ interface { Field() string @@ -1568,24 +1565,24 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = ChangeSecurityChecksRequestValidationError{} +} = ChangeAdvisorChecksRequestValidationError{} -// Validate checks the field values on ChangeSecurityChecksResponse with the +// Validate checks the field values on ChangeAdvisorChecksResponse with the // rules defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. -func (m *ChangeSecurityChecksResponse) Validate() error { +func (m *ChangeAdvisorChecksResponse) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on ChangeSecurityChecksResponse with the +// ValidateAll checks the field values on ChangeAdvisorChecksResponse with the // rules defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// ChangeSecurityChecksResponseMultiError, or nil if none found. -func (m *ChangeSecurityChecksResponse) ValidateAll() error { +// ChangeAdvisorChecksResponseMultiError, or nil if none found. +func (m *ChangeAdvisorChecksResponse) ValidateAll() error { return m.validate(true) } -func (m *ChangeSecurityChecksResponse) validate(all bool) error { +func (m *ChangeAdvisorChecksResponse) validate(all bool) error { if m == nil { return nil } @@ -1593,19 +1590,19 @@ func (m *ChangeSecurityChecksResponse) validate(all bool) error { var errors []error if len(errors) > 0 { - return ChangeSecurityChecksResponseMultiError(errors) + return ChangeAdvisorChecksResponseMultiError(errors) } return nil } -// ChangeSecurityChecksResponseMultiError is an error wrapping multiple -// validation errors returned by ChangeSecurityChecksResponse.ValidateAll() if +// ChangeAdvisorChecksResponseMultiError is an error wrapping multiple +// validation errors returned by ChangeAdvisorChecksResponse.ValidateAll() if // the designated constraints aren't met. -type ChangeSecurityChecksResponseMultiError []error +type ChangeAdvisorChecksResponseMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m ChangeSecurityChecksResponseMultiError) Error() string { +func (m ChangeAdvisorChecksResponseMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -1614,12 +1611,12 @@ func (m ChangeSecurityChecksResponseMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m ChangeSecurityChecksResponseMultiError) AllErrors() []error { return m } +func (m ChangeAdvisorChecksResponseMultiError) AllErrors() []error { return m } -// ChangeSecurityChecksResponseValidationError is the validation error returned -// by ChangeSecurityChecksResponse.Validate if the designated constraints +// ChangeAdvisorChecksResponseValidationError is the validation error returned +// by ChangeAdvisorChecksResponse.Validate if the designated constraints // aren't met. -type ChangeSecurityChecksResponseValidationError struct { +type ChangeAdvisorChecksResponseValidationError struct { field string reason string cause error @@ -1627,24 +1624,24 @@ type ChangeSecurityChecksResponseValidationError struct { } // Field function returns field value. -func (e ChangeSecurityChecksResponseValidationError) Field() string { return e.field } +func (e ChangeAdvisorChecksResponseValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e ChangeSecurityChecksResponseValidationError) Reason() string { return e.reason } +func (e ChangeAdvisorChecksResponseValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e ChangeSecurityChecksResponseValidationError) Cause() error { return e.cause } +func (e ChangeAdvisorChecksResponseValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e ChangeSecurityChecksResponseValidationError) Key() bool { return e.key } +func (e ChangeAdvisorChecksResponseValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e ChangeSecurityChecksResponseValidationError) ErrorName() string { - return "ChangeSecurityChecksResponseValidationError" +func (e ChangeAdvisorChecksResponseValidationError) ErrorName() string { + return "ChangeAdvisorChecksResponseValidationError" } // Error satisfies the builtin error interface -func (e ChangeSecurityChecksResponseValidationError) Error() string { +func (e ChangeAdvisorChecksResponseValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -1656,14 +1653,14 @@ func (e ChangeSecurityChecksResponseValidationError) Error() string { } return fmt.Sprintf( - "invalid %sChangeSecurityChecksResponse.%s: %s%s", + "invalid %sChangeAdvisorChecksResponse.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = ChangeSecurityChecksResponseValidationError{} +var _ error = ChangeAdvisorChecksResponseValidationError{} var _ interface { Field() string @@ -1671,7 +1668,7 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = ChangeSecurityChecksResponseValidationError{} +} = ChangeAdvisorChecksResponseValidationError{} // Validate checks the field values on ListFailedServicesRequest with the rules // defined in the proto definition for this message. If any rules are diff --git a/api/management/v1/checks.proto b/api/management/v1/checks.proto index 2f9322049d..94abd049a3 100644 --- a/api/management/v1/checks.proto +++ b/api/management/v1/checks.proto @@ -7,12 +7,12 @@ import "management/v1/pagination.proto"; import "management/v1/severity.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; -// SecurityCheckInterval represents possible execution interval values for checks. -enum SecurityCheckInterval { - SECURITY_CHECK_INTERVAL_UNSPECIFIED = 0; - SECURITY_CHECK_INTERVAL_STANDARD = 1; - SECURITY_CHECK_INTERVAL_FREQUENT = 2; - SECURITY_CHECK_INTERVAL_RARE = 3; +// AdvisorCheckInterval represents possible execution interval values for checks. +enum AdvisorCheckInterval { + ADVISOR_CHECK_INTERVAL_UNSPECIFIED = 0; + ADVISOR_CHECK_INTERVAL_STANDARD = 1; + ADVISOR_CHECK_INTERVAL_FREQUENT = 2; + ADVISOR_CHECK_INTERVAL_RARE = 3; } enum AdvisorCheckFamily { @@ -22,8 +22,8 @@ enum AdvisorCheckFamily { ADVISOR_CHECK_FAMILY_MONGODB = 3; } -// SecurityCheckResult represents the check result returned from pmm-managed after running the check. -message SecurityCheckResult { +// AdvisorCheckResult represents the check result returned from pmm-managed after running the check. +message AdvisorCheckResult { string summary = 1; string description = 2; Severity severity = 3; @@ -74,8 +74,8 @@ message CheckResult { bool silenced = 10; } -// SecurityCheck contains check name and status. -message SecurityCheck { +// AdvisorCheck contains check name and status. +message AdvisorCheck { // Machine-readable name (ID) that is used in expression. string name = 1; // True if that check is enabled. @@ -85,7 +85,7 @@ message SecurityCheck { // Short human-readable summary. string summary = 4; // Check execution interval. - SecurityCheckInterval interval = 5; + AdvisorCheckInterval interval = 5; // DB family. AdvisorCheckFamily family = 6; } @@ -102,29 +102,29 @@ message Advisor { // Category. string category = 5; // Advisor checks. - repeated SecurityCheck checks = 6; + repeated AdvisorCheck checks = 6; } -// ChangeSecurityCheckParams specifies a single check parameters. -message ChangeSecurityCheckParams { +// ChangeAdvisorCheckParams specifies a single check parameters. +message ChangeAdvisorCheckParams { // The name of the check to change. string name = 1; optional bool enable = 2; // check execution interval. - SecurityCheckInterval interval = 4; + AdvisorCheckInterval interval = 4; } -message StartSecurityChecksRequest { +message StartAdvisorChecksRequest { // Names of the checks that should be started. repeated string names = 1; } -message StartSecurityChecksResponse {} +message StartAdvisorChecksResponse {} -message ListSecurityChecksRequest {} +message ListAdvisorChecksRequest {} -message ListSecurityChecksResponse { - repeated SecurityCheck checks = 1; +message ListAdvisorChecksResponse { + repeated AdvisorCheck checks = 1; } message ListAdvisorsRequest {} @@ -133,11 +133,11 @@ message ListAdvisorsResponse { repeated Advisor advisors = 1; } -message ChangeSecurityChecksRequest { - repeated ChangeSecurityCheckParams params = 1; +message ChangeAdvisorChecksRequest { + repeated ChangeAdvisorCheckParams params = 1; } -message ChangeSecurityChecksResponse {} +message ChangeAdvisorChecksResponse {} message ListFailedServicesRequest {} @@ -155,12 +155,12 @@ message GetFailedChecksResponse { PageTotals page_totals = 2; } -// SecurityChecks service provides public Management API methods for Security Checks Service. -service SecurityChecksService { +// AdvisorService service provides public Management API methods for Advisor Service. +service AdvisorService { // ListFailedServices returns a list of services with failed checks. rpc ListFailedServices(ListFailedServicesRequest) returns (ListFailedServicesResponse) { option (google.api.http) = { - post: "/v1/management/SecurityChecks/ListFailedServices" + post: "/v1/management/Advisors/ListFailedServices" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { @@ -171,7 +171,7 @@ service SecurityChecksService { // GetFailedChecks returns the checks result for a given service. rpc GetFailedChecks(GetFailedChecksRequest) returns (GetFailedChecksResponse) { option (google.api.http) = { - post: "/v1/management/SecurityChecks/FailedChecks" + post: "/v1/management/Advisors/FailedChecks" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { @@ -179,21 +179,21 @@ service SecurityChecksService { description: "Returns the latest check results for a given service." }; } - // StartSecurityChecks executes Security Thread Tool checks and returns when all checks are executed. - rpc StartSecurityChecks(StartSecurityChecksRequest) returns (StartSecurityChecksResponse) { + // StartAdvisorChecks executes Advisor checks and returns when all checks are executed. + rpc StartAdvisorChecks(StartAdvisorChecksRequest) returns (StartAdvisorChecksResponse) { option (google.api.http) = { - post: "/v1/management/SecurityChecks/Start" + post: "/v1/management/Advisors/StartChecks" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Start Security Checks" - description: "Executes Security Thread Tool checks and returns when all checks are executed. All available checks will be started if check names aren't specified." + summary: "Start Advisor Checks" + description: "Executes Advisor checks and returns when all checks are executed. All available checks will be started if check names aren't specified." }; } - // ListSecurityChecks returns a list of advisor checks available to the user.. - rpc ListSecurityChecks(ListSecurityChecksRequest) returns (ListSecurityChecksResponse) { + // ListAdvisorChecks returns a list of advisor checks available to the user.. + rpc ListAdvisorChecks(ListAdvisorChecksRequest) returns (ListAdvisorChecksResponse) { option (google.api.http) = { - post: "/v1/management/SecurityChecks/List" + post: "/v1/management/Advisors/ListChecks" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { @@ -212,15 +212,15 @@ service SecurityChecksService { description: "Returns a list of advisors available to the user." }; } - // ChangeSecurityChecks enables/disables Security Thread Tool checks or changes their interval by names. - rpc ChangeSecurityChecks(ChangeSecurityChecksRequest) returns (ChangeSecurityChecksResponse) { + // ChangeAdvisorChecks enables/disables Advisor checks or changes their interval by names. + rpc ChangeAdvisorChecks(ChangeAdvisorChecksRequest) returns (ChangeAdvisorChecksResponse) { option (google.api.http) = { - post: "/v1/management/SecurityChecks/Change" + post: "/v1/management/Advisors/Change" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Change Security Checks" - description: "Enables/disables Security Thread Tool checks or changes their interval by names." + summary: "Change Advisor Checks" + description: "Enables/disables Advisor checks or changes their interval by names." }; } } diff --git a/api/management/v1/checks_grpc.pb.go b/api/management/v1/checks_grpc.pb.go index 1faad0a0a3..02371832c0 100644 --- a/api/management/v1/checks_grpc.pb.go +++ b/api/management/v1/checks_grpc.pb.go @@ -20,290 +20,290 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - SecurityChecksService_ListFailedServices_FullMethodName = "/management.v1.SecurityChecksService/ListFailedServices" - SecurityChecksService_GetFailedChecks_FullMethodName = "/management.v1.SecurityChecksService/GetFailedChecks" - SecurityChecksService_StartSecurityChecks_FullMethodName = "/management.v1.SecurityChecksService/StartSecurityChecks" - SecurityChecksService_ListSecurityChecks_FullMethodName = "/management.v1.SecurityChecksService/ListSecurityChecks" - SecurityChecksService_ListAdvisors_FullMethodName = "/management.v1.SecurityChecksService/ListAdvisors" - SecurityChecksService_ChangeSecurityChecks_FullMethodName = "/management.v1.SecurityChecksService/ChangeSecurityChecks" + AdvisorService_ListFailedServices_FullMethodName = "/management.v1.AdvisorService/ListFailedServices" + AdvisorService_GetFailedChecks_FullMethodName = "/management.v1.AdvisorService/GetFailedChecks" + AdvisorService_StartAdvisorChecks_FullMethodName = "/management.v1.AdvisorService/StartAdvisorChecks" + AdvisorService_ListAdvisorChecks_FullMethodName = "/management.v1.AdvisorService/ListAdvisorChecks" + AdvisorService_ListAdvisors_FullMethodName = "/management.v1.AdvisorService/ListAdvisors" + AdvisorService_ChangeAdvisorChecks_FullMethodName = "/management.v1.AdvisorService/ChangeAdvisorChecks" ) -// SecurityChecksServiceClient is the client API for SecurityChecksService service. +// AdvisorServiceClient is the client API for AdvisorService 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 SecurityChecksServiceClient interface { +type AdvisorServiceClient interface { // ListFailedServices returns a list of services with failed checks. ListFailedServices(ctx context.Context, in *ListFailedServicesRequest, opts ...grpc.CallOption) (*ListFailedServicesResponse, error) // GetFailedChecks returns the checks result for a given service. GetFailedChecks(ctx context.Context, in *GetFailedChecksRequest, opts ...grpc.CallOption) (*GetFailedChecksResponse, error) - // StartSecurityChecks executes Security Thread Tool checks and returns when all checks are executed. - StartSecurityChecks(ctx context.Context, in *StartSecurityChecksRequest, opts ...grpc.CallOption) (*StartSecurityChecksResponse, error) - // ListSecurityChecks returns a list of advisor checks available to the user.. - ListSecurityChecks(ctx context.Context, in *ListSecurityChecksRequest, opts ...grpc.CallOption) (*ListSecurityChecksResponse, error) + // StartAdvisorChecks executes Advisor checks and returns when all checks are executed. + StartAdvisorChecks(ctx context.Context, in *StartAdvisorChecksRequest, opts ...grpc.CallOption) (*StartAdvisorChecksResponse, error) + // ListAdvisorChecks returns a list of advisor checks available to the user.. + ListAdvisorChecks(ctx context.Context, in *ListAdvisorChecksRequest, opts ...grpc.CallOption) (*ListAdvisorChecksResponse, error) // ListAdvisors returns a list of advisors available for the user. ListAdvisors(ctx context.Context, in *ListAdvisorsRequest, opts ...grpc.CallOption) (*ListAdvisorsResponse, error) - // ChangeSecurityChecks enables/disables Security Thread Tool checks or changes their interval by names. - ChangeSecurityChecks(ctx context.Context, in *ChangeSecurityChecksRequest, opts ...grpc.CallOption) (*ChangeSecurityChecksResponse, error) + // ChangeAdvisorChecks enables/disables Advisor checks or changes their interval by names. + ChangeAdvisorChecks(ctx context.Context, in *ChangeAdvisorChecksRequest, opts ...grpc.CallOption) (*ChangeAdvisorChecksResponse, error) } -type securityChecksServiceClient struct { +type advisorServiceClient struct { cc grpc.ClientConnInterface } -func NewSecurityChecksServiceClient(cc grpc.ClientConnInterface) SecurityChecksServiceClient { - return &securityChecksServiceClient{cc} +func NewAdvisorServiceClient(cc grpc.ClientConnInterface) AdvisorServiceClient { + return &advisorServiceClient{cc} } -func (c *securityChecksServiceClient) ListFailedServices(ctx context.Context, in *ListFailedServicesRequest, opts ...grpc.CallOption) (*ListFailedServicesResponse, error) { +func (c *advisorServiceClient) ListFailedServices(ctx context.Context, in *ListFailedServicesRequest, opts ...grpc.CallOption) (*ListFailedServicesResponse, error) { out := new(ListFailedServicesResponse) - err := c.cc.Invoke(ctx, SecurityChecksService_ListFailedServices_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AdvisorService_ListFailedServices_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *securityChecksServiceClient) GetFailedChecks(ctx context.Context, in *GetFailedChecksRequest, opts ...grpc.CallOption) (*GetFailedChecksResponse, error) { +func (c *advisorServiceClient) GetFailedChecks(ctx context.Context, in *GetFailedChecksRequest, opts ...grpc.CallOption) (*GetFailedChecksResponse, error) { out := new(GetFailedChecksResponse) - err := c.cc.Invoke(ctx, SecurityChecksService_GetFailedChecks_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AdvisorService_GetFailedChecks_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *securityChecksServiceClient) StartSecurityChecks(ctx context.Context, in *StartSecurityChecksRequest, opts ...grpc.CallOption) (*StartSecurityChecksResponse, error) { - out := new(StartSecurityChecksResponse) - err := c.cc.Invoke(ctx, SecurityChecksService_StartSecurityChecks_FullMethodName, in, out, opts...) +func (c *advisorServiceClient) StartAdvisorChecks(ctx context.Context, in *StartAdvisorChecksRequest, opts ...grpc.CallOption) (*StartAdvisorChecksResponse, error) { + out := new(StartAdvisorChecksResponse) + err := c.cc.Invoke(ctx, AdvisorService_StartAdvisorChecks_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *securityChecksServiceClient) ListSecurityChecks(ctx context.Context, in *ListSecurityChecksRequest, opts ...grpc.CallOption) (*ListSecurityChecksResponse, error) { - out := new(ListSecurityChecksResponse) - err := c.cc.Invoke(ctx, SecurityChecksService_ListSecurityChecks_FullMethodName, in, out, opts...) +func (c *advisorServiceClient) ListAdvisorChecks(ctx context.Context, in *ListAdvisorChecksRequest, opts ...grpc.CallOption) (*ListAdvisorChecksResponse, error) { + out := new(ListAdvisorChecksResponse) + err := c.cc.Invoke(ctx, AdvisorService_ListAdvisorChecks_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *securityChecksServiceClient) ListAdvisors(ctx context.Context, in *ListAdvisorsRequest, opts ...grpc.CallOption) (*ListAdvisorsResponse, error) { +func (c *advisorServiceClient) ListAdvisors(ctx context.Context, in *ListAdvisorsRequest, opts ...grpc.CallOption) (*ListAdvisorsResponse, error) { out := new(ListAdvisorsResponse) - err := c.cc.Invoke(ctx, SecurityChecksService_ListAdvisors_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, AdvisorService_ListAdvisors_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *securityChecksServiceClient) ChangeSecurityChecks(ctx context.Context, in *ChangeSecurityChecksRequest, opts ...grpc.CallOption) (*ChangeSecurityChecksResponse, error) { - out := new(ChangeSecurityChecksResponse) - err := c.cc.Invoke(ctx, SecurityChecksService_ChangeSecurityChecks_FullMethodName, in, out, opts...) +func (c *advisorServiceClient) ChangeAdvisorChecks(ctx context.Context, in *ChangeAdvisorChecksRequest, opts ...grpc.CallOption) (*ChangeAdvisorChecksResponse, error) { + out := new(ChangeAdvisorChecksResponse) + err := c.cc.Invoke(ctx, AdvisorService_ChangeAdvisorChecks_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -// SecurityChecksServiceServer is the server API for SecurityChecksService service. -// All implementations must embed UnimplementedSecurityChecksServiceServer +// AdvisorServiceServer is the server API for AdvisorService service. +// All implementations must embed UnimplementedAdvisorServiceServer // for forward compatibility -type SecurityChecksServiceServer interface { +type AdvisorServiceServer interface { // ListFailedServices returns a list of services with failed checks. ListFailedServices(context.Context, *ListFailedServicesRequest) (*ListFailedServicesResponse, error) // GetFailedChecks returns the checks result for a given service. GetFailedChecks(context.Context, *GetFailedChecksRequest) (*GetFailedChecksResponse, error) - // StartSecurityChecks executes Security Thread Tool checks and returns when all checks are executed. - StartSecurityChecks(context.Context, *StartSecurityChecksRequest) (*StartSecurityChecksResponse, error) - // ListSecurityChecks returns a list of advisor checks available to the user.. - ListSecurityChecks(context.Context, *ListSecurityChecksRequest) (*ListSecurityChecksResponse, error) + // StartAdvisorChecks executes Advisor checks and returns when all checks are executed. + StartAdvisorChecks(context.Context, *StartAdvisorChecksRequest) (*StartAdvisorChecksResponse, error) + // ListAdvisorChecks returns a list of advisor checks available to the user.. + ListAdvisorChecks(context.Context, *ListAdvisorChecksRequest) (*ListAdvisorChecksResponse, error) // ListAdvisors returns a list of advisors available for the user. ListAdvisors(context.Context, *ListAdvisorsRequest) (*ListAdvisorsResponse, error) - // ChangeSecurityChecks enables/disables Security Thread Tool checks or changes their interval by names. - ChangeSecurityChecks(context.Context, *ChangeSecurityChecksRequest) (*ChangeSecurityChecksResponse, error) - mustEmbedUnimplementedSecurityChecksServiceServer() + // ChangeAdvisorChecks enables/disables Advisor checks or changes their interval by names. + ChangeAdvisorChecks(context.Context, *ChangeAdvisorChecksRequest) (*ChangeAdvisorChecksResponse, error) + mustEmbedUnimplementedAdvisorServiceServer() } -// UnimplementedSecurityChecksServiceServer must be embedded to have forward compatible implementations. -type UnimplementedSecurityChecksServiceServer struct{} +// UnimplementedAdvisorServiceServer must be embedded to have forward compatible implementations. +type UnimplementedAdvisorServiceServer struct{} -func (UnimplementedSecurityChecksServiceServer) ListFailedServices(context.Context, *ListFailedServicesRequest) (*ListFailedServicesResponse, error) { +func (UnimplementedAdvisorServiceServer) ListFailedServices(context.Context, *ListFailedServicesRequest) (*ListFailedServicesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListFailedServices not implemented") } -func (UnimplementedSecurityChecksServiceServer) GetFailedChecks(context.Context, *GetFailedChecksRequest) (*GetFailedChecksResponse, error) { +func (UnimplementedAdvisorServiceServer) GetFailedChecks(context.Context, *GetFailedChecksRequest) (*GetFailedChecksResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetFailedChecks not implemented") } -func (UnimplementedSecurityChecksServiceServer) StartSecurityChecks(context.Context, *StartSecurityChecksRequest) (*StartSecurityChecksResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method StartSecurityChecks not implemented") +func (UnimplementedAdvisorServiceServer) StartAdvisorChecks(context.Context, *StartAdvisorChecksRequest) (*StartAdvisorChecksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StartAdvisorChecks not implemented") } -func (UnimplementedSecurityChecksServiceServer) ListSecurityChecks(context.Context, *ListSecurityChecksRequest) (*ListSecurityChecksResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListSecurityChecks not implemented") +func (UnimplementedAdvisorServiceServer) ListAdvisorChecks(context.Context, *ListAdvisorChecksRequest) (*ListAdvisorChecksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListAdvisorChecks not implemented") } -func (UnimplementedSecurityChecksServiceServer) ListAdvisors(context.Context, *ListAdvisorsRequest) (*ListAdvisorsResponse, error) { +func (UnimplementedAdvisorServiceServer) ListAdvisors(context.Context, *ListAdvisorsRequest) (*ListAdvisorsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAdvisors not implemented") } -func (UnimplementedSecurityChecksServiceServer) ChangeSecurityChecks(context.Context, *ChangeSecurityChecksRequest) (*ChangeSecurityChecksResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ChangeSecurityChecks not implemented") +func (UnimplementedAdvisorServiceServer) ChangeAdvisorChecks(context.Context, *ChangeAdvisorChecksRequest) (*ChangeAdvisorChecksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ChangeAdvisorChecks not implemented") } -func (UnimplementedSecurityChecksServiceServer) mustEmbedUnimplementedSecurityChecksServiceServer() {} +func (UnimplementedAdvisorServiceServer) mustEmbedUnimplementedAdvisorServiceServer() {} -// UnsafeSecurityChecksServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to SecurityChecksServiceServer will +// UnsafeAdvisorServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AdvisorServiceServer will // result in compilation errors. -type UnsafeSecurityChecksServiceServer interface { - mustEmbedUnimplementedSecurityChecksServiceServer() +type UnsafeAdvisorServiceServer interface { + mustEmbedUnimplementedAdvisorServiceServer() } -func RegisterSecurityChecksServiceServer(s grpc.ServiceRegistrar, srv SecurityChecksServiceServer) { - s.RegisterService(&SecurityChecksService_ServiceDesc, srv) +func RegisterAdvisorServiceServer(s grpc.ServiceRegistrar, srv AdvisorServiceServer) { + s.RegisterService(&AdvisorService_ServiceDesc, srv) } -func _SecurityChecksService_ListFailedServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AdvisorService_ListFailedServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListFailedServicesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SecurityChecksServiceServer).ListFailedServices(ctx, in) + return srv.(AdvisorServiceServer).ListFailedServices(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SecurityChecksService_ListFailedServices_FullMethodName, + FullMethod: AdvisorService_ListFailedServices_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SecurityChecksServiceServer).ListFailedServices(ctx, req.(*ListFailedServicesRequest)) + return srv.(AdvisorServiceServer).ListFailedServices(ctx, req.(*ListFailedServicesRequest)) } return interceptor(ctx, in, info, handler) } -func _SecurityChecksService_GetFailedChecks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AdvisorService_GetFailedChecks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetFailedChecksRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SecurityChecksServiceServer).GetFailedChecks(ctx, in) + return srv.(AdvisorServiceServer).GetFailedChecks(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SecurityChecksService_GetFailedChecks_FullMethodName, + FullMethod: AdvisorService_GetFailedChecks_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SecurityChecksServiceServer).GetFailedChecks(ctx, req.(*GetFailedChecksRequest)) + return srv.(AdvisorServiceServer).GetFailedChecks(ctx, req.(*GetFailedChecksRequest)) } return interceptor(ctx, in, info, handler) } -func _SecurityChecksService_StartSecurityChecks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StartSecurityChecksRequest) +func _AdvisorService_StartAdvisorChecks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StartAdvisorChecksRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SecurityChecksServiceServer).StartSecurityChecks(ctx, in) + return srv.(AdvisorServiceServer).StartAdvisorChecks(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SecurityChecksService_StartSecurityChecks_FullMethodName, + FullMethod: AdvisorService_StartAdvisorChecks_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SecurityChecksServiceServer).StartSecurityChecks(ctx, req.(*StartSecurityChecksRequest)) + return srv.(AdvisorServiceServer).StartAdvisorChecks(ctx, req.(*StartAdvisorChecksRequest)) } return interceptor(ctx, in, info, handler) } -func _SecurityChecksService_ListSecurityChecks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListSecurityChecksRequest) +func _AdvisorService_ListAdvisorChecks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAdvisorChecksRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SecurityChecksServiceServer).ListSecurityChecks(ctx, in) + return srv.(AdvisorServiceServer).ListAdvisorChecks(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SecurityChecksService_ListSecurityChecks_FullMethodName, + FullMethod: AdvisorService_ListAdvisorChecks_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SecurityChecksServiceServer).ListSecurityChecks(ctx, req.(*ListSecurityChecksRequest)) + return srv.(AdvisorServiceServer).ListAdvisorChecks(ctx, req.(*ListAdvisorChecksRequest)) } return interceptor(ctx, in, info, handler) } -func _SecurityChecksService_ListAdvisors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _AdvisorService_ListAdvisors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListAdvisorsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SecurityChecksServiceServer).ListAdvisors(ctx, in) + return srv.(AdvisorServiceServer).ListAdvisors(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SecurityChecksService_ListAdvisors_FullMethodName, + FullMethod: AdvisorService_ListAdvisors_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SecurityChecksServiceServer).ListAdvisors(ctx, req.(*ListAdvisorsRequest)) + return srv.(AdvisorServiceServer).ListAdvisors(ctx, req.(*ListAdvisorsRequest)) } return interceptor(ctx, in, info, handler) } -func _SecurityChecksService_ChangeSecurityChecks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ChangeSecurityChecksRequest) +func _AdvisorService_ChangeAdvisorChecks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ChangeAdvisorChecksRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SecurityChecksServiceServer).ChangeSecurityChecks(ctx, in) + return srv.(AdvisorServiceServer).ChangeAdvisorChecks(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SecurityChecksService_ChangeSecurityChecks_FullMethodName, + FullMethod: AdvisorService_ChangeAdvisorChecks_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SecurityChecksServiceServer).ChangeSecurityChecks(ctx, req.(*ChangeSecurityChecksRequest)) + return srv.(AdvisorServiceServer).ChangeAdvisorChecks(ctx, req.(*ChangeAdvisorChecksRequest)) } return interceptor(ctx, in, info, handler) } -// SecurityChecksService_ServiceDesc is the grpc.ServiceDesc for SecurityChecksService service. +// AdvisorService_ServiceDesc is the grpc.ServiceDesc for AdvisorService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) -var SecurityChecksService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "management.v1.SecurityChecksService", - HandlerType: (*SecurityChecksServiceServer)(nil), +var AdvisorService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "management.v1.AdvisorService", + HandlerType: (*AdvisorServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListFailedServices", - Handler: _SecurityChecksService_ListFailedServices_Handler, + Handler: _AdvisorService_ListFailedServices_Handler, }, { MethodName: "GetFailedChecks", - Handler: _SecurityChecksService_GetFailedChecks_Handler, + Handler: _AdvisorService_GetFailedChecks_Handler, }, { - MethodName: "StartSecurityChecks", - Handler: _SecurityChecksService_StartSecurityChecks_Handler, + MethodName: "StartAdvisorChecks", + Handler: _AdvisorService_StartAdvisorChecks_Handler, }, { - MethodName: "ListSecurityChecks", - Handler: _SecurityChecksService_ListSecurityChecks_Handler, + MethodName: "ListAdvisorChecks", + Handler: _AdvisorService_ListAdvisorChecks_Handler, }, { MethodName: "ListAdvisors", - Handler: _SecurityChecksService_ListAdvisors_Handler, + Handler: _AdvisorService_ListAdvisors_Handler, }, { - MethodName: "ChangeSecurityChecks", - Handler: _SecurityChecksService_ChangeSecurityChecks_Handler, + MethodName: "ChangeAdvisorChecks", + Handler: _AdvisorService_ChangeAdvisorChecks_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/api/management/v1/json/client/security_checks_service/security_checks_service_client.go b/api/management/v1/json/client/advisor_service/advisor_service_client.go similarity index 75% rename from api/management/v1/json/client/security_checks_service/security_checks_service_client.go rename to api/management/v1/json/client/advisor_service/advisor_service_client.go index 3f0d6d2828..1314453542 100644 --- a/api/management/v1/json/client/security_checks_service/security_checks_service_client.go +++ b/api/management/v1/json/client/advisor_service/advisor_service_client.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package security_checks_service +package advisor_service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -10,13 +10,13 @@ import ( "github.com/go-openapi/strfmt" ) -// New creates a new security checks service API client. +// New creates a new advisor service API client. func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } /* -Client for security checks service API +Client for advisor service API */ type Client struct { transport runtime.ClientTransport @@ -28,40 +28,40 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { - ChangeSecurityChecks(params *ChangeSecurityChecksParams, opts ...ClientOption) (*ChangeSecurityChecksOK, error) + ChangeAdvisorChecks(params *ChangeAdvisorChecksParams, opts ...ClientOption) (*ChangeAdvisorChecksOK, error) GetFailedChecks(params *GetFailedChecksParams, opts ...ClientOption) (*GetFailedChecksOK, error) + ListAdvisorChecks(params *ListAdvisorChecksParams, opts ...ClientOption) (*ListAdvisorChecksOK, error) + ListAdvisors(params *ListAdvisorsParams, opts ...ClientOption) (*ListAdvisorsOK, error) ListFailedServices(params *ListFailedServicesParams, opts ...ClientOption) (*ListFailedServicesOK, error) - ListSecurityChecks(params *ListSecurityChecksParams, opts ...ClientOption) (*ListSecurityChecksOK, error) - - StartSecurityChecks(params *StartSecurityChecksParams, opts ...ClientOption) (*StartSecurityChecksOK, error) + StartAdvisorChecks(params *StartAdvisorChecksParams, opts ...ClientOption) (*StartAdvisorChecksOK, error) SetTransport(transport runtime.ClientTransport) } /* -ChangeSecurityChecks changes security checks +ChangeAdvisorChecks changes advisor checks -Enables/disables Security Thread Tool checks or changes their interval by names. +Enables/disables Advisor checks or changes their interval by names. */ -func (a *Client) ChangeSecurityChecks(params *ChangeSecurityChecksParams, opts ...ClientOption) (*ChangeSecurityChecksOK, error) { +func (a *Client) ChangeAdvisorChecks(params *ChangeAdvisorChecksParams, opts ...ClientOption) (*ChangeAdvisorChecksOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewChangeSecurityChecksParams() + params = NewChangeAdvisorChecksParams() } op := &runtime.ClientOperation{ - ID: "ChangeSecurityChecks", + ID: "ChangeAdvisorChecks", Method: "POST", - PathPattern: "/v1/management/SecurityChecks/Change", + PathPattern: "/v1/management/Advisors/Change", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, Params: params, - Reader: &ChangeSecurityChecksReader{formats: a.formats}, + Reader: &ChangeAdvisorChecksReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, } @@ -73,12 +73,12 @@ func (a *Client) ChangeSecurityChecks(params *ChangeSecurityChecksParams, opts . if err != nil { return nil, err } - success, ok := result.(*ChangeSecurityChecksOK) + success, ok := result.(*ChangeAdvisorChecksOK) if ok { return success, nil } // unexpected success response - unexpectedSuccess := result.(*ChangeSecurityChecksDefault) + unexpectedSuccess := result.(*ChangeAdvisorChecksDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } @@ -95,7 +95,7 @@ func (a *Client) GetFailedChecks(params *GetFailedChecksParams, opts ...ClientOp op := &runtime.ClientOperation{ ID: "GetFailedChecks", Method: "POST", - PathPattern: "/v1/management/SecurityChecks/FailedChecks", + PathPattern: "/v1/management/Advisors/FailedChecks", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, @@ -122,24 +122,24 @@ func (a *Client) GetFailedChecks(params *GetFailedChecksParams, opts ...ClientOp } /* -ListAdvisors lists advisors +ListAdvisorChecks lists advisor checks -Returns a list of advisors available to the user. +Returns a list of checks available to the user. */ -func (a *Client) ListAdvisors(params *ListAdvisorsParams, opts ...ClientOption) (*ListAdvisorsOK, error) { +func (a *Client) ListAdvisorChecks(params *ListAdvisorChecksParams, opts ...ClientOption) (*ListAdvisorChecksOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewListAdvisorsParams() + params = NewListAdvisorChecksParams() } op := &runtime.ClientOperation{ - ID: "ListAdvisors", + ID: "ListAdvisorChecks", Method: "POST", - PathPattern: "/v1/management/Advisors/List", + PathPattern: "/v1/management/Advisors/ListChecks", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, Params: params, - Reader: &ListAdvisorsReader{formats: a.formats}, + Reader: &ListAdvisorChecksReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, } @@ -151,34 +151,34 @@ func (a *Client) ListAdvisors(params *ListAdvisorsParams, opts ...ClientOption) if err != nil { return nil, err } - success, ok := result.(*ListAdvisorsOK) + success, ok := result.(*ListAdvisorChecksOK) if ok { return success, nil } // unexpected success response - unexpectedSuccess := result.(*ListAdvisorsDefault) + unexpectedSuccess := result.(*ListAdvisorChecksDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -ListFailedServices lists failed services +ListAdvisors lists advisors -Returns a list of services with failed checks and a summary of check results. +Returns a list of advisors available to the user. */ -func (a *Client) ListFailedServices(params *ListFailedServicesParams, opts ...ClientOption) (*ListFailedServicesOK, error) { +func (a *Client) ListAdvisors(params *ListAdvisorsParams, opts ...ClientOption) (*ListAdvisorsOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewListFailedServicesParams() + params = NewListAdvisorsParams() } op := &runtime.ClientOperation{ - ID: "ListFailedServices", + ID: "ListAdvisors", Method: "POST", - PathPattern: "/v1/management/SecurityChecks/ListFailedServices", + PathPattern: "/v1/management/Advisors/List", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, Params: params, - Reader: &ListFailedServicesReader{formats: a.formats}, + Reader: &ListAdvisorsReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, } @@ -190,34 +190,34 @@ func (a *Client) ListFailedServices(params *ListFailedServicesParams, opts ...Cl if err != nil { return nil, err } - success, ok := result.(*ListFailedServicesOK) + success, ok := result.(*ListAdvisorsOK) if ok { return success, nil } // unexpected success response - unexpectedSuccess := result.(*ListFailedServicesDefault) + unexpectedSuccess := result.(*ListAdvisorsDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -ListSecurityChecks lists advisor checks +ListFailedServices lists failed services -Returns a list of checks available to the user. +Returns a list of services with failed checks and a summary of check results. */ -func (a *Client) ListSecurityChecks(params *ListSecurityChecksParams, opts ...ClientOption) (*ListSecurityChecksOK, error) { +func (a *Client) ListFailedServices(params *ListFailedServicesParams, opts ...ClientOption) (*ListFailedServicesOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewListSecurityChecksParams() + params = NewListFailedServicesParams() } op := &runtime.ClientOperation{ - ID: "ListSecurityChecks", + ID: "ListFailedServices", Method: "POST", - PathPattern: "/v1/management/SecurityChecks/List", + PathPattern: "/v1/management/Advisors/ListFailedServices", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, Params: params, - Reader: &ListSecurityChecksReader{formats: a.formats}, + Reader: &ListFailedServicesReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, } @@ -229,34 +229,34 @@ func (a *Client) ListSecurityChecks(params *ListSecurityChecksParams, opts ...Cl if err != nil { return nil, err } - success, ok := result.(*ListSecurityChecksOK) + success, ok := result.(*ListFailedServicesOK) if ok { return success, nil } // unexpected success response - unexpectedSuccess := result.(*ListSecurityChecksDefault) + unexpectedSuccess := result.(*ListFailedServicesDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -StartSecurityChecks starts security checks +StartAdvisorChecks starts advisor checks -Executes Security Thread Tool checks and returns when all checks are executed. All available checks will be started if check names aren't specified. +Executes Advisor checks and returns when all checks are executed. All available checks will be started if check names aren't specified. */ -func (a *Client) StartSecurityChecks(params *StartSecurityChecksParams, opts ...ClientOption) (*StartSecurityChecksOK, error) { +func (a *Client) StartAdvisorChecks(params *StartAdvisorChecksParams, opts ...ClientOption) (*StartAdvisorChecksOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewStartSecurityChecksParams() + params = NewStartAdvisorChecksParams() } op := &runtime.ClientOperation{ - ID: "StartSecurityChecks", + ID: "StartAdvisorChecks", Method: "POST", - PathPattern: "/v1/management/SecurityChecks/Start", + PathPattern: "/v1/management/Advisors/StartChecks", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, Params: params, - Reader: &StartSecurityChecksReader{formats: a.formats}, + Reader: &StartAdvisorChecksReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, } @@ -268,12 +268,12 @@ func (a *Client) StartSecurityChecks(params *StartSecurityChecksParams, opts ... if err != nil { return nil, err } - success, ok := result.(*StartSecurityChecksOK) + success, ok := result.(*StartAdvisorChecksOK) if ok { return success, nil } // unexpected success response - unexpectedSuccess := result.(*StartSecurityChecksDefault) + unexpectedSuccess := result.(*StartAdvisorChecksDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } diff --git a/api/management/v1/json/client/advisor_service/change_advisor_checks_parameters.go b/api/management/v1/json/client/advisor_service/change_advisor_checks_parameters.go new file mode 100644 index 0000000000..9f9ee29908 --- /dev/null +++ b/api/management/v1/json/client/advisor_service/change_advisor_checks_parameters.go @@ -0,0 +1,144 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package advisor_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewChangeAdvisorChecksParams creates a new ChangeAdvisorChecksParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewChangeAdvisorChecksParams() *ChangeAdvisorChecksParams { + return &ChangeAdvisorChecksParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewChangeAdvisorChecksParamsWithTimeout creates a new ChangeAdvisorChecksParams object +// with the ability to set a timeout on a request. +func NewChangeAdvisorChecksParamsWithTimeout(timeout time.Duration) *ChangeAdvisorChecksParams { + return &ChangeAdvisorChecksParams{ + timeout: timeout, + } +} + +// NewChangeAdvisorChecksParamsWithContext creates a new ChangeAdvisorChecksParams object +// with the ability to set a context for a request. +func NewChangeAdvisorChecksParamsWithContext(ctx context.Context) *ChangeAdvisorChecksParams { + return &ChangeAdvisorChecksParams{ + Context: ctx, + } +} + +// NewChangeAdvisorChecksParamsWithHTTPClient creates a new ChangeAdvisorChecksParams object +// with the ability to set a custom HTTPClient for a request. +func NewChangeAdvisorChecksParamsWithHTTPClient(client *http.Client) *ChangeAdvisorChecksParams { + return &ChangeAdvisorChecksParams{ + HTTPClient: client, + } +} + +/* +ChangeAdvisorChecksParams contains all the parameters to send to the API endpoint + + for the change advisor checks operation. + + Typically these are written to a http.Request. +*/ +type ChangeAdvisorChecksParams struct { + // Body. + Body ChangeAdvisorChecksBody + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the change advisor checks params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ChangeAdvisorChecksParams) WithDefaults() *ChangeAdvisorChecksParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the change advisor checks params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ChangeAdvisorChecksParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the change advisor checks params +func (o *ChangeAdvisorChecksParams) WithTimeout(timeout time.Duration) *ChangeAdvisorChecksParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the change advisor checks params +func (o *ChangeAdvisorChecksParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the change advisor checks params +func (o *ChangeAdvisorChecksParams) WithContext(ctx context.Context) *ChangeAdvisorChecksParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the change advisor checks params +func (o *ChangeAdvisorChecksParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the change advisor checks params +func (o *ChangeAdvisorChecksParams) WithHTTPClient(client *http.Client) *ChangeAdvisorChecksParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the change advisor checks params +func (o *ChangeAdvisorChecksParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the change advisor checks params +func (o *ChangeAdvisorChecksParams) WithBody(body ChangeAdvisorChecksBody) *ChangeAdvisorChecksParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the change advisor checks params +func (o *ChangeAdvisorChecksParams) SetBody(body ChangeAdvisorChecksBody) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *ChangeAdvisorChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/management/v1/json/client/advisor_service/change_advisor_checks_responses.go b/api/management/v1/json/client/advisor_service/change_advisor_checks_responses.go new file mode 100644 index 0000000000..8c248293dd --- /dev/null +++ b/api/management/v1/json/client/advisor_service/change_advisor_checks_responses.go @@ -0,0 +1,459 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package advisor_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ChangeAdvisorChecksReader is a Reader for the ChangeAdvisorChecks structure. +type ChangeAdvisorChecksReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ChangeAdvisorChecksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewChangeAdvisorChecksOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewChangeAdvisorChecksDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewChangeAdvisorChecksOK creates a ChangeAdvisorChecksOK with default headers values +func NewChangeAdvisorChecksOK() *ChangeAdvisorChecksOK { + return &ChangeAdvisorChecksOK{} +} + +/* +ChangeAdvisorChecksOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ChangeAdvisorChecksOK struct { + Payload interface{} +} + +func (o *ChangeAdvisorChecksOK) Error() string { + return fmt.Sprintf("[POST /v1/management/Advisors/Change][%d] changeAdvisorChecksOk %+v", 200, o.Payload) +} + +func (o *ChangeAdvisorChecksOK) GetPayload() interface{} { + return o.Payload +} + +func (o *ChangeAdvisorChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewChangeAdvisorChecksDefault creates a ChangeAdvisorChecksDefault with default headers values +func NewChangeAdvisorChecksDefault(code int) *ChangeAdvisorChecksDefault { + return &ChangeAdvisorChecksDefault{ + _statusCode: code, + } +} + +/* +ChangeAdvisorChecksDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ChangeAdvisorChecksDefault struct { + _statusCode int + + Payload *ChangeAdvisorChecksDefaultBody +} + +// Code gets the status code for the change advisor checks default response +func (o *ChangeAdvisorChecksDefault) Code() int { + return o._statusCode +} + +func (o *ChangeAdvisorChecksDefault) Error() string { + return fmt.Sprintf("[POST /v1/management/Advisors/Change][%d] ChangeAdvisorChecks default %+v", o._statusCode, o.Payload) +} + +func (o *ChangeAdvisorChecksDefault) GetPayload() *ChangeAdvisorChecksDefaultBody { + return o.Payload +} + +func (o *ChangeAdvisorChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeAdvisorChecksDefaultBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/* +ChangeAdvisorChecksBody change advisor checks body +swagger:model ChangeAdvisorChecksBody +*/ +type ChangeAdvisorChecksBody struct { + // params + Params []*ChangeAdvisorChecksParamsBodyParamsItems0 `json:"params"` +} + +// Validate validates this change advisor checks body +func (o *ChangeAdvisorChecksBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateParams(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *ChangeAdvisorChecksBody) validateParams(formats strfmt.Registry) error { + if swag.IsZero(o.Params) { // not required + return nil + } + + for i := 0; i < len(o.Params); i++ { + if swag.IsZero(o.Params[i]) { // not required + continue + } + + if o.Params[i] != nil { + if err := o.Params[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "params" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "params" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this change advisor checks body based on the context it is used +func (o *ChangeAdvisorChecksBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateParams(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *ChangeAdvisorChecksBody) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Params); i++ { + if o.Params[i] != nil { + if err := o.Params[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "params" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "params" + "." + strconv.Itoa(i)) + } + return err + } + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *ChangeAdvisorChecksBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ChangeAdvisorChecksBody) UnmarshalBinary(b []byte) error { + var res ChangeAdvisorChecksBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ChangeAdvisorChecksDefaultBody change advisor checks default body +swagger:model ChangeAdvisorChecksDefaultBody +*/ +type ChangeAdvisorChecksDefaultBody struct { + // code + Code int32 `json:"code,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // details + Details []*ChangeAdvisorChecksDefaultBodyDetailsItems0 `json:"details"` +} + +// Validate validates this change advisor checks default body +func (o *ChangeAdvisorChecksDefaultBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *ChangeAdvisorChecksDefaultBody) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(o.Details) { // not required + return nil + } + + for i := 0; i < len(o.Details); i++ { + if swag.IsZero(o.Details[i]) { // not required + continue + } + + if o.Details[i] != nil { + if err := o.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ChangeAdvisorChecks default" + "." + "details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ChangeAdvisorChecks default" + "." + "details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this change advisor checks default body based on the context it is used +func (o *ChangeAdvisorChecksDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *ChangeAdvisorChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { + if err := o.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ChangeAdvisorChecks default" + "." + "details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ChangeAdvisorChecks default" + "." + "details" + "." + strconv.Itoa(i)) + } + return err + } + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *ChangeAdvisorChecksDefaultBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ChangeAdvisorChecksDefaultBody) UnmarshalBinary(b []byte) error { + var res ChangeAdvisorChecksDefaultBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ChangeAdvisorChecksDefaultBodyDetailsItems0 change advisor checks default body details items0 +swagger:model ChangeAdvisorChecksDefaultBodyDetailsItems0 +*/ +type ChangeAdvisorChecksDefaultBodyDetailsItems0 struct { + // at type + AtType string `json:"@type,omitempty"` +} + +// Validate validates this change advisor checks default body details items0 +func (o *ChangeAdvisorChecksDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this change advisor checks default body details items0 based on context it is used +func (o *ChangeAdvisorChecksDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ChangeAdvisorChecksDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ChangeAdvisorChecksDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { + var res ChangeAdvisorChecksDefaultBodyDetailsItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ChangeAdvisorChecksParamsBodyParamsItems0 ChangeAdvisorCheckParams specifies a single check parameters. +swagger:model ChangeAdvisorChecksParamsBodyParamsItems0 +*/ +type ChangeAdvisorChecksParamsBodyParamsItems0 struct { + // The name of the check to change. + Name string `json:"name,omitempty"` + + // enable + Enable *bool `json:"enable,omitempty"` + + // AdvisorCheckInterval represents possible execution interval values for checks. + // Enum: [ADVISOR_CHECK_INTERVAL_UNSPECIFIED ADVISOR_CHECK_INTERVAL_STANDARD ADVISOR_CHECK_INTERVAL_FREQUENT ADVISOR_CHECK_INTERVAL_RARE] + Interval *string `json:"interval,omitempty"` +} + +// Validate validates this change advisor checks params body params items0 +func (o *ChangeAdvisorChecksParamsBodyParamsItems0) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateInterval(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var changeAdvisorChecksParamsBodyParamsItems0TypeIntervalPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["ADVISOR_CHECK_INTERVAL_UNSPECIFIED","ADVISOR_CHECK_INTERVAL_STANDARD","ADVISOR_CHECK_INTERVAL_FREQUENT","ADVISOR_CHECK_INTERVAL_RARE"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + changeAdvisorChecksParamsBodyParamsItems0TypeIntervalPropEnum = append(changeAdvisorChecksParamsBodyParamsItems0TypeIntervalPropEnum, v) + } +} + +const ( + + // ChangeAdvisorChecksParamsBodyParamsItems0IntervalADVISORCHECKINTERVALUNSPECIFIED captures enum value "ADVISOR_CHECK_INTERVAL_UNSPECIFIED" + ChangeAdvisorChecksParamsBodyParamsItems0IntervalADVISORCHECKINTERVALUNSPECIFIED string = "ADVISOR_CHECK_INTERVAL_UNSPECIFIED" + + // ChangeAdvisorChecksParamsBodyParamsItems0IntervalADVISORCHECKINTERVALSTANDARD captures enum value "ADVISOR_CHECK_INTERVAL_STANDARD" + ChangeAdvisorChecksParamsBodyParamsItems0IntervalADVISORCHECKINTERVALSTANDARD string = "ADVISOR_CHECK_INTERVAL_STANDARD" + + // ChangeAdvisorChecksParamsBodyParamsItems0IntervalADVISORCHECKINTERVALFREQUENT captures enum value "ADVISOR_CHECK_INTERVAL_FREQUENT" + ChangeAdvisorChecksParamsBodyParamsItems0IntervalADVISORCHECKINTERVALFREQUENT string = "ADVISOR_CHECK_INTERVAL_FREQUENT" + + // ChangeAdvisorChecksParamsBodyParamsItems0IntervalADVISORCHECKINTERVALRARE captures enum value "ADVISOR_CHECK_INTERVAL_RARE" + ChangeAdvisorChecksParamsBodyParamsItems0IntervalADVISORCHECKINTERVALRARE string = "ADVISOR_CHECK_INTERVAL_RARE" +) + +// prop value enum +func (o *ChangeAdvisorChecksParamsBodyParamsItems0) validateIntervalEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, changeAdvisorChecksParamsBodyParamsItems0TypeIntervalPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *ChangeAdvisorChecksParamsBodyParamsItems0) validateInterval(formats strfmt.Registry) error { + if swag.IsZero(o.Interval) { // not required + return nil + } + + // value enum + if err := o.validateIntervalEnum("interval", "body", *o.Interval); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this change advisor checks params body params items0 based on context it is used +func (o *ChangeAdvisorChecksParamsBodyParamsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ChangeAdvisorChecksParamsBodyParamsItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ChangeAdvisorChecksParamsBodyParamsItems0) UnmarshalBinary(b []byte) error { + var res ChangeAdvisorChecksParamsBodyParamsItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/management/v1/json/client/security_checks_service/get_failed_checks_parameters.go b/api/management/v1/json/client/advisor_service/get_failed_checks_parameters.go similarity index 99% rename from api/management/v1/json/client/security_checks_service/get_failed_checks_parameters.go rename to api/management/v1/json/client/advisor_service/get_failed_checks_parameters.go index 6cdff87cb3..53b57c7d97 100644 --- a/api/management/v1/json/client/security_checks_service/get_failed_checks_parameters.go +++ b/api/management/v1/json/client/advisor_service/get_failed_checks_parameters.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package security_checks_service +package advisor_service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/api/management/v1/json/client/security_checks_service/get_failed_checks_responses.go b/api/management/v1/json/client/advisor_service/get_failed_checks_responses.go similarity index 98% rename from api/management/v1/json/client/security_checks_service/get_failed_checks_responses.go rename to api/management/v1/json/client/advisor_service/get_failed_checks_responses.go index 69c480119d..0a6ee3aa37 100644 --- a/api/management/v1/json/client/security_checks_service/get_failed_checks_responses.go +++ b/api/management/v1/json/client/advisor_service/get_failed_checks_responses.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package security_checks_service +package advisor_service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -60,7 +60,7 @@ type GetFailedChecksOK struct { } func (o *GetFailedChecksOK) Error() string { - return fmt.Sprintf("[POST /v1/management/SecurityChecks/FailedChecks][%d] getFailedChecksOk %+v", 200, o.Payload) + return fmt.Sprintf("[POST /v1/management/Advisors/FailedChecks][%d] getFailedChecksOk %+v", 200, o.Payload) } func (o *GetFailedChecksOK) GetPayload() *GetFailedChecksOKBody { @@ -102,7 +102,7 @@ func (o *GetFailedChecksDefault) Code() int { } func (o *GetFailedChecksDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/SecurityChecks/FailedChecks][%d] GetFailedChecks default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[POST /v1/management/Advisors/FailedChecks][%d] GetFailedChecks default %+v", o._statusCode, o.Payload) } func (o *GetFailedChecksDefault) GetPayload() *GetFailedChecksDefaultBody { diff --git a/api/management/v1/json/client/advisor_service/list_advisor_checks_parameters.go b/api/management/v1/json/client/advisor_service/list_advisor_checks_parameters.go new file mode 100644 index 0000000000..650143049a --- /dev/null +++ b/api/management/v1/json/client/advisor_service/list_advisor_checks_parameters.go @@ -0,0 +1,146 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package advisor_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewListAdvisorChecksParams creates a new ListAdvisorChecksParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewListAdvisorChecksParams() *ListAdvisorChecksParams { + return &ListAdvisorChecksParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewListAdvisorChecksParamsWithTimeout creates a new ListAdvisorChecksParams object +// with the ability to set a timeout on a request. +func NewListAdvisorChecksParamsWithTimeout(timeout time.Duration) *ListAdvisorChecksParams { + return &ListAdvisorChecksParams{ + timeout: timeout, + } +} + +// NewListAdvisorChecksParamsWithContext creates a new ListAdvisorChecksParams object +// with the ability to set a context for a request. +func NewListAdvisorChecksParamsWithContext(ctx context.Context) *ListAdvisorChecksParams { + return &ListAdvisorChecksParams{ + Context: ctx, + } +} + +// NewListAdvisorChecksParamsWithHTTPClient creates a new ListAdvisorChecksParams object +// with the ability to set a custom HTTPClient for a request. +func NewListAdvisorChecksParamsWithHTTPClient(client *http.Client) *ListAdvisorChecksParams { + return &ListAdvisorChecksParams{ + HTTPClient: client, + } +} + +/* +ListAdvisorChecksParams contains all the parameters to send to the API endpoint + + for the list advisor checks operation. + + Typically these are written to a http.Request. +*/ +type ListAdvisorChecksParams struct { + // Body. + Body interface{} + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the list advisor checks params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ListAdvisorChecksParams) WithDefaults() *ListAdvisorChecksParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the list advisor checks params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ListAdvisorChecksParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the list advisor checks params +func (o *ListAdvisorChecksParams) WithTimeout(timeout time.Duration) *ListAdvisorChecksParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the list advisor checks params +func (o *ListAdvisorChecksParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the list advisor checks params +func (o *ListAdvisorChecksParams) WithContext(ctx context.Context) *ListAdvisorChecksParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the list advisor checks params +func (o *ListAdvisorChecksParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the list advisor checks params +func (o *ListAdvisorChecksParams) WithHTTPClient(client *http.Client) *ListAdvisorChecksParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the list advisor checks params +func (o *ListAdvisorChecksParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the list advisor checks params +func (o *ListAdvisorChecksParams) WithBody(body interface{}) *ListAdvisorChecksParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the list advisor checks params +func (o *ListAdvisorChecksParams) SetBody(body interface{}) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *ListAdvisorChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/management/v1/json/client/advisor_service/list_advisor_checks_responses.go b/api/management/v1/json/client/advisor_service/list_advisor_checks_responses.go new file mode 100644 index 0000000000..dd6e175abc --- /dev/null +++ b/api/management/v1/json/client/advisor_service/list_advisor_checks_responses.go @@ -0,0 +1,523 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package advisor_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// ListAdvisorChecksReader is a Reader for the ListAdvisorChecks structure. +type ListAdvisorChecksReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ListAdvisorChecksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewListAdvisorChecksOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewListAdvisorChecksDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewListAdvisorChecksOK creates a ListAdvisorChecksOK with default headers values +func NewListAdvisorChecksOK() *ListAdvisorChecksOK { + return &ListAdvisorChecksOK{} +} + +/* +ListAdvisorChecksOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ListAdvisorChecksOK struct { + Payload *ListAdvisorChecksOKBody +} + +func (o *ListAdvisorChecksOK) Error() string { + return fmt.Sprintf("[POST /v1/management/Advisors/ListChecks][%d] listAdvisorChecksOk %+v", 200, o.Payload) +} + +func (o *ListAdvisorChecksOK) GetPayload() *ListAdvisorChecksOKBody { + return o.Payload +} + +func (o *ListAdvisorChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAdvisorChecksOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewListAdvisorChecksDefault creates a ListAdvisorChecksDefault with default headers values +func NewListAdvisorChecksDefault(code int) *ListAdvisorChecksDefault { + return &ListAdvisorChecksDefault{ + _statusCode: code, + } +} + +/* +ListAdvisorChecksDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ListAdvisorChecksDefault struct { + _statusCode int + + Payload *ListAdvisorChecksDefaultBody +} + +// Code gets the status code for the list advisor checks default response +func (o *ListAdvisorChecksDefault) Code() int { + return o._statusCode +} + +func (o *ListAdvisorChecksDefault) Error() string { + return fmt.Sprintf("[POST /v1/management/Advisors/ListChecks][%d] ListAdvisorChecks default %+v", o._statusCode, o.Payload) +} + +func (o *ListAdvisorChecksDefault) GetPayload() *ListAdvisorChecksDefaultBody { + return o.Payload +} + +func (o *ListAdvisorChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAdvisorChecksDefaultBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/* +ListAdvisorChecksDefaultBody list advisor checks default body +swagger:model ListAdvisorChecksDefaultBody +*/ +type ListAdvisorChecksDefaultBody struct { + // code + Code int32 `json:"code,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // details + Details []*ListAdvisorChecksDefaultBodyDetailsItems0 `json:"details"` +} + +// Validate validates this list advisor checks default body +func (o *ListAdvisorChecksDefaultBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *ListAdvisorChecksDefaultBody) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(o.Details) { // not required + return nil + } + + for i := 0; i < len(o.Details); i++ { + if swag.IsZero(o.Details[i]) { // not required + continue + } + + if o.Details[i] != nil { + if err := o.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ListAdvisorChecks default" + "." + "details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ListAdvisorChecks default" + "." + "details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this list advisor checks default body based on the context it is used +func (o *ListAdvisorChecksDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *ListAdvisorChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { + if err := o.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ListAdvisorChecks default" + "." + "details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("ListAdvisorChecks default" + "." + "details" + "." + strconv.Itoa(i)) + } + return err + } + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *ListAdvisorChecksDefaultBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ListAdvisorChecksDefaultBody) UnmarshalBinary(b []byte) error { + var res ListAdvisorChecksDefaultBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ListAdvisorChecksDefaultBodyDetailsItems0 list advisor checks default body details items0 +swagger:model ListAdvisorChecksDefaultBodyDetailsItems0 +*/ +type ListAdvisorChecksDefaultBodyDetailsItems0 struct { + // at type + AtType string `json:"@type,omitempty"` +} + +// Validate validates this list advisor checks default body details items0 +func (o *ListAdvisorChecksDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this list advisor checks default body details items0 based on context it is used +func (o *ListAdvisorChecksDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ListAdvisorChecksDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ListAdvisorChecksDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { + var res ListAdvisorChecksDefaultBodyDetailsItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ListAdvisorChecksOKBody list advisor checks OK body +swagger:model ListAdvisorChecksOKBody +*/ +type ListAdvisorChecksOKBody struct { + // checks + Checks []*ListAdvisorChecksOKBodyChecksItems0 `json:"checks"` +} + +// Validate validates this list advisor checks OK body +func (o *ListAdvisorChecksOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateChecks(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *ListAdvisorChecksOKBody) validateChecks(formats strfmt.Registry) error { + if swag.IsZero(o.Checks) { // not required + return nil + } + + for i := 0; i < len(o.Checks); i++ { + if swag.IsZero(o.Checks[i]) { // not required + continue + } + + if o.Checks[i] != nil { + if err := o.Checks[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listAdvisorChecksOk" + "." + "checks" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("listAdvisorChecksOk" + "." + "checks" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this list advisor checks OK body based on the context it is used +func (o *ListAdvisorChecksOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateChecks(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *ListAdvisorChecksOKBody) contextValidateChecks(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Checks); i++ { + if o.Checks[i] != nil { + if err := o.Checks[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listAdvisorChecksOk" + "." + "checks" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("listAdvisorChecksOk" + "." + "checks" + "." + strconv.Itoa(i)) + } + return err + } + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *ListAdvisorChecksOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ListAdvisorChecksOKBody) UnmarshalBinary(b []byte) error { + var res ListAdvisorChecksOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ListAdvisorChecksOKBodyChecksItems0 AdvisorCheck contains check name and status. +swagger:model ListAdvisorChecksOKBodyChecksItems0 +*/ +type ListAdvisorChecksOKBodyChecksItems0 struct { + // Machine-readable name (ID) that is used in expression. + Name string `json:"name,omitempty"` + + // True if that check is enabled. + Enabled bool `json:"enabled,omitempty"` + + // Long human-readable description. + Description string `json:"description,omitempty"` + + // Short human-readable summary. + Summary string `json:"summary,omitempty"` + + // AdvisorCheckInterval represents possible execution interval values for checks. + // Enum: [ADVISOR_CHECK_INTERVAL_UNSPECIFIED ADVISOR_CHECK_INTERVAL_STANDARD ADVISOR_CHECK_INTERVAL_FREQUENT ADVISOR_CHECK_INTERVAL_RARE] + Interval *string `json:"interval,omitempty"` + + // family + // Enum: [ADVISOR_CHECK_FAMILY_UNSPECIFIED ADVISOR_CHECK_FAMILY_MYSQL ADVISOR_CHECK_FAMILY_POSTGRESQL ADVISOR_CHECK_FAMILY_MONGODB] + Family *string `json:"family,omitempty"` +} + +// Validate validates this list advisor checks OK body checks items0 +func (o *ListAdvisorChecksOKBodyChecksItems0) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateInterval(formats); err != nil { + res = append(res, err) + } + + if err := o.validateFamily(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var listAdvisorChecksOkBodyChecksItems0TypeIntervalPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["ADVISOR_CHECK_INTERVAL_UNSPECIFIED","ADVISOR_CHECK_INTERVAL_STANDARD","ADVISOR_CHECK_INTERVAL_FREQUENT","ADVISOR_CHECK_INTERVAL_RARE"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + listAdvisorChecksOkBodyChecksItems0TypeIntervalPropEnum = append(listAdvisorChecksOkBodyChecksItems0TypeIntervalPropEnum, v) + } +} + +const ( + + // ListAdvisorChecksOKBodyChecksItems0IntervalADVISORCHECKINTERVALUNSPECIFIED captures enum value "ADVISOR_CHECK_INTERVAL_UNSPECIFIED" + ListAdvisorChecksOKBodyChecksItems0IntervalADVISORCHECKINTERVALUNSPECIFIED string = "ADVISOR_CHECK_INTERVAL_UNSPECIFIED" + + // ListAdvisorChecksOKBodyChecksItems0IntervalADVISORCHECKINTERVALSTANDARD captures enum value "ADVISOR_CHECK_INTERVAL_STANDARD" + ListAdvisorChecksOKBodyChecksItems0IntervalADVISORCHECKINTERVALSTANDARD string = "ADVISOR_CHECK_INTERVAL_STANDARD" + + // ListAdvisorChecksOKBodyChecksItems0IntervalADVISORCHECKINTERVALFREQUENT captures enum value "ADVISOR_CHECK_INTERVAL_FREQUENT" + ListAdvisorChecksOKBodyChecksItems0IntervalADVISORCHECKINTERVALFREQUENT string = "ADVISOR_CHECK_INTERVAL_FREQUENT" + + // ListAdvisorChecksOKBodyChecksItems0IntervalADVISORCHECKINTERVALRARE captures enum value "ADVISOR_CHECK_INTERVAL_RARE" + ListAdvisorChecksOKBodyChecksItems0IntervalADVISORCHECKINTERVALRARE string = "ADVISOR_CHECK_INTERVAL_RARE" +) + +// prop value enum +func (o *ListAdvisorChecksOKBodyChecksItems0) validateIntervalEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, listAdvisorChecksOkBodyChecksItems0TypeIntervalPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *ListAdvisorChecksOKBodyChecksItems0) validateInterval(formats strfmt.Registry) error { + if swag.IsZero(o.Interval) { // not required + return nil + } + + // value enum + if err := o.validateIntervalEnum("interval", "body", *o.Interval); err != nil { + return err + } + + return nil +} + +var listAdvisorChecksOkBodyChecksItems0TypeFamilyPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["ADVISOR_CHECK_FAMILY_UNSPECIFIED","ADVISOR_CHECK_FAMILY_MYSQL","ADVISOR_CHECK_FAMILY_POSTGRESQL","ADVISOR_CHECK_FAMILY_MONGODB"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + listAdvisorChecksOkBodyChecksItems0TypeFamilyPropEnum = append(listAdvisorChecksOkBodyChecksItems0TypeFamilyPropEnum, v) + } +} + +const ( + + // ListAdvisorChecksOKBodyChecksItems0FamilyADVISORCHECKFAMILYUNSPECIFIED captures enum value "ADVISOR_CHECK_FAMILY_UNSPECIFIED" + ListAdvisorChecksOKBodyChecksItems0FamilyADVISORCHECKFAMILYUNSPECIFIED string = "ADVISOR_CHECK_FAMILY_UNSPECIFIED" + + // ListAdvisorChecksOKBodyChecksItems0FamilyADVISORCHECKFAMILYMYSQL captures enum value "ADVISOR_CHECK_FAMILY_MYSQL" + ListAdvisorChecksOKBodyChecksItems0FamilyADVISORCHECKFAMILYMYSQL string = "ADVISOR_CHECK_FAMILY_MYSQL" + + // ListAdvisorChecksOKBodyChecksItems0FamilyADVISORCHECKFAMILYPOSTGRESQL captures enum value "ADVISOR_CHECK_FAMILY_POSTGRESQL" + ListAdvisorChecksOKBodyChecksItems0FamilyADVISORCHECKFAMILYPOSTGRESQL string = "ADVISOR_CHECK_FAMILY_POSTGRESQL" + + // ListAdvisorChecksOKBodyChecksItems0FamilyADVISORCHECKFAMILYMONGODB captures enum value "ADVISOR_CHECK_FAMILY_MONGODB" + ListAdvisorChecksOKBodyChecksItems0FamilyADVISORCHECKFAMILYMONGODB string = "ADVISOR_CHECK_FAMILY_MONGODB" +) + +// prop value enum +func (o *ListAdvisorChecksOKBodyChecksItems0) validateFamilyEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, listAdvisorChecksOkBodyChecksItems0TypeFamilyPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *ListAdvisorChecksOKBodyChecksItems0) validateFamily(formats strfmt.Registry) error { + if swag.IsZero(o.Family) { // not required + return nil + } + + // value enum + if err := o.validateFamilyEnum("family", "body", *o.Family); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this list advisor checks OK body checks items0 based on context it is used +func (o *ListAdvisorChecksOKBodyChecksItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ListAdvisorChecksOKBodyChecksItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ListAdvisorChecksOKBodyChecksItems0) UnmarshalBinary(b []byte) error { + var res ListAdvisorChecksOKBodyChecksItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/management/v1/json/client/security_checks_service/list_advisors_parameters.go b/api/management/v1/json/client/advisor_service/list_advisors_parameters.go similarity index 99% rename from api/management/v1/json/client/security_checks_service/list_advisors_parameters.go rename to api/management/v1/json/client/advisor_service/list_advisors_parameters.go index b1ca10cb5e..f2a9825780 100644 --- a/api/management/v1/json/client/security_checks_service/list_advisors_parameters.go +++ b/api/management/v1/json/client/advisor_service/list_advisors_parameters.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package security_checks_service +package advisor_service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/api/management/v1/json/client/security_checks_service/list_advisors_responses.go b/api/management/v1/json/client/advisor_service/list_advisors_responses.go similarity index 91% rename from api/management/v1/json/client/security_checks_service/list_advisors_responses.go rename to api/management/v1/json/client/advisor_service/list_advisors_responses.go index af08917273..d72c8fdf58 100644 --- a/api/management/v1/json/client/security_checks_service/list_advisors_responses.go +++ b/api/management/v1/json/client/advisor_service/list_advisors_responses.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package security_checks_service +package advisor_service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -473,7 +473,7 @@ func (o *ListAdvisorsOKBodyAdvisorsItems0) UnmarshalBinary(b []byte) error { } /* -ListAdvisorsOKBodyAdvisorsItems0ChecksItems0 SecurityCheck contains check name and status. +ListAdvisorsOKBodyAdvisorsItems0ChecksItems0 AdvisorCheck contains check name and status. swagger:model ListAdvisorsOKBodyAdvisorsItems0ChecksItems0 */ type ListAdvisorsOKBodyAdvisorsItems0ChecksItems0 struct { @@ -489,8 +489,8 @@ type ListAdvisorsOKBodyAdvisorsItems0ChecksItems0 struct { // Short human-readable summary. Summary string `json:"summary,omitempty"` - // SecurityCheckInterval represents possible execution interval values for checks. - // Enum: [SECURITY_CHECK_INTERVAL_UNSPECIFIED SECURITY_CHECK_INTERVAL_STANDARD SECURITY_CHECK_INTERVAL_FREQUENT SECURITY_CHECK_INTERVAL_RARE] + // AdvisorCheckInterval represents possible execution interval values for checks. + // Enum: [ADVISOR_CHECK_INTERVAL_UNSPECIFIED ADVISOR_CHECK_INTERVAL_STANDARD ADVISOR_CHECK_INTERVAL_FREQUENT ADVISOR_CHECK_INTERVAL_RARE] Interval *string `json:"interval,omitempty"` // family @@ -520,7 +520,7 @@ var listAdvisorsOkBodyAdvisorsItems0ChecksItems0TypeIntervalPropEnum []interface func init() { var res []string - if err := json.Unmarshal([]byte(`["SECURITY_CHECK_INTERVAL_UNSPECIFIED","SECURITY_CHECK_INTERVAL_STANDARD","SECURITY_CHECK_INTERVAL_FREQUENT","SECURITY_CHECK_INTERVAL_RARE"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["ADVISOR_CHECK_INTERVAL_UNSPECIFIED","ADVISOR_CHECK_INTERVAL_STANDARD","ADVISOR_CHECK_INTERVAL_FREQUENT","ADVISOR_CHECK_INTERVAL_RARE"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -530,17 +530,17 @@ func init() { const ( - // ListAdvisorsOKBodyAdvisorsItems0ChecksItems0IntervalSECURITYCHECKINTERVALUNSPECIFIED captures enum value "SECURITY_CHECK_INTERVAL_UNSPECIFIED" - ListAdvisorsOKBodyAdvisorsItems0ChecksItems0IntervalSECURITYCHECKINTERVALUNSPECIFIED string = "SECURITY_CHECK_INTERVAL_UNSPECIFIED" + // ListAdvisorsOKBodyAdvisorsItems0ChecksItems0IntervalADVISORCHECKINTERVALUNSPECIFIED captures enum value "ADVISOR_CHECK_INTERVAL_UNSPECIFIED" + ListAdvisorsOKBodyAdvisorsItems0ChecksItems0IntervalADVISORCHECKINTERVALUNSPECIFIED string = "ADVISOR_CHECK_INTERVAL_UNSPECIFIED" - // ListAdvisorsOKBodyAdvisorsItems0ChecksItems0IntervalSECURITYCHECKINTERVALSTANDARD captures enum value "SECURITY_CHECK_INTERVAL_STANDARD" - ListAdvisorsOKBodyAdvisorsItems0ChecksItems0IntervalSECURITYCHECKINTERVALSTANDARD string = "SECURITY_CHECK_INTERVAL_STANDARD" + // ListAdvisorsOKBodyAdvisorsItems0ChecksItems0IntervalADVISORCHECKINTERVALSTANDARD captures enum value "ADVISOR_CHECK_INTERVAL_STANDARD" + ListAdvisorsOKBodyAdvisorsItems0ChecksItems0IntervalADVISORCHECKINTERVALSTANDARD string = "ADVISOR_CHECK_INTERVAL_STANDARD" - // ListAdvisorsOKBodyAdvisorsItems0ChecksItems0IntervalSECURITYCHECKINTERVALFREQUENT captures enum value "SECURITY_CHECK_INTERVAL_FREQUENT" - ListAdvisorsOKBodyAdvisorsItems0ChecksItems0IntervalSECURITYCHECKINTERVALFREQUENT string = "SECURITY_CHECK_INTERVAL_FREQUENT" + // ListAdvisorsOKBodyAdvisorsItems0ChecksItems0IntervalADVISORCHECKINTERVALFREQUENT captures enum value "ADVISOR_CHECK_INTERVAL_FREQUENT" + ListAdvisorsOKBodyAdvisorsItems0ChecksItems0IntervalADVISORCHECKINTERVALFREQUENT string = "ADVISOR_CHECK_INTERVAL_FREQUENT" - // ListAdvisorsOKBodyAdvisorsItems0ChecksItems0IntervalSECURITYCHECKINTERVALRARE captures enum value "SECURITY_CHECK_INTERVAL_RARE" - ListAdvisorsOKBodyAdvisorsItems0ChecksItems0IntervalSECURITYCHECKINTERVALRARE string = "SECURITY_CHECK_INTERVAL_RARE" + // ListAdvisorsOKBodyAdvisorsItems0ChecksItems0IntervalADVISORCHECKINTERVALRARE captures enum value "ADVISOR_CHECK_INTERVAL_RARE" + ListAdvisorsOKBodyAdvisorsItems0ChecksItems0IntervalADVISORCHECKINTERVALRARE string = "ADVISOR_CHECK_INTERVAL_RARE" ) // prop value enum diff --git a/api/management/v1/json/client/security_checks_service/list_failed_services_parameters.go b/api/management/v1/json/client/advisor_service/list_failed_services_parameters.go similarity index 99% rename from api/management/v1/json/client/security_checks_service/list_failed_services_parameters.go rename to api/management/v1/json/client/advisor_service/list_failed_services_parameters.go index 5710dc6929..de3c52c777 100644 --- a/api/management/v1/json/client/security_checks_service/list_failed_services_parameters.go +++ b/api/management/v1/json/client/advisor_service/list_failed_services_parameters.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package security_checks_service +package advisor_service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/api/management/v1/json/client/security_checks_service/list_failed_services_responses.go b/api/management/v1/json/client/advisor_service/list_failed_services_responses.go similarity index 97% rename from api/management/v1/json/client/security_checks_service/list_failed_services_responses.go rename to api/management/v1/json/client/advisor_service/list_failed_services_responses.go index 985b277324..1c1f4c5ab0 100644 --- a/api/management/v1/json/client/security_checks_service/list_failed_services_responses.go +++ b/api/management/v1/json/client/advisor_service/list_failed_services_responses.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package security_checks_service +package advisor_service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command @@ -58,7 +58,7 @@ type ListFailedServicesOK struct { } func (o *ListFailedServicesOK) Error() string { - return fmt.Sprintf("[POST /v1/management/SecurityChecks/ListFailedServices][%d] listFailedServicesOk %+v", 200, o.Payload) + return fmt.Sprintf("[POST /v1/management/Advisors/ListFailedServices][%d] listFailedServicesOk %+v", 200, o.Payload) } func (o *ListFailedServicesOK) GetPayload() *ListFailedServicesOKBody { @@ -100,7 +100,7 @@ func (o *ListFailedServicesDefault) Code() int { } func (o *ListFailedServicesDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/SecurityChecks/ListFailedServices][%d] ListFailedServices default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[POST /v1/management/Advisors/ListFailedServices][%d] ListFailedServices default %+v", o._statusCode, o.Payload) } func (o *ListFailedServicesDefault) GetPayload() *ListFailedServicesDefaultBody { diff --git a/api/management/v1/json/client/advisor_service/start_advisor_checks_parameters.go b/api/management/v1/json/client/advisor_service/start_advisor_checks_parameters.go new file mode 100644 index 0000000000..879f8418f6 --- /dev/null +++ b/api/management/v1/json/client/advisor_service/start_advisor_checks_parameters.go @@ -0,0 +1,144 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package advisor_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewStartAdvisorChecksParams creates a new StartAdvisorChecksParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewStartAdvisorChecksParams() *StartAdvisorChecksParams { + return &StartAdvisorChecksParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewStartAdvisorChecksParamsWithTimeout creates a new StartAdvisorChecksParams object +// with the ability to set a timeout on a request. +func NewStartAdvisorChecksParamsWithTimeout(timeout time.Duration) *StartAdvisorChecksParams { + return &StartAdvisorChecksParams{ + timeout: timeout, + } +} + +// NewStartAdvisorChecksParamsWithContext creates a new StartAdvisorChecksParams object +// with the ability to set a context for a request. +func NewStartAdvisorChecksParamsWithContext(ctx context.Context) *StartAdvisorChecksParams { + return &StartAdvisorChecksParams{ + Context: ctx, + } +} + +// NewStartAdvisorChecksParamsWithHTTPClient creates a new StartAdvisorChecksParams object +// with the ability to set a custom HTTPClient for a request. +func NewStartAdvisorChecksParamsWithHTTPClient(client *http.Client) *StartAdvisorChecksParams { + return &StartAdvisorChecksParams{ + HTTPClient: client, + } +} + +/* +StartAdvisorChecksParams contains all the parameters to send to the API endpoint + + for the start advisor checks operation. + + Typically these are written to a http.Request. +*/ +type StartAdvisorChecksParams struct { + // Body. + Body StartAdvisorChecksBody + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the start advisor checks params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *StartAdvisorChecksParams) WithDefaults() *StartAdvisorChecksParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the start advisor checks params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *StartAdvisorChecksParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the start advisor checks params +func (o *StartAdvisorChecksParams) WithTimeout(timeout time.Duration) *StartAdvisorChecksParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the start advisor checks params +func (o *StartAdvisorChecksParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the start advisor checks params +func (o *StartAdvisorChecksParams) WithContext(ctx context.Context) *StartAdvisorChecksParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the start advisor checks params +func (o *StartAdvisorChecksParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the start advisor checks params +func (o *StartAdvisorChecksParams) WithHTTPClient(client *http.Client) *StartAdvisorChecksParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the start advisor checks params +func (o *StartAdvisorChecksParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the start advisor checks params +func (o *StartAdvisorChecksParams) WithBody(body StartAdvisorChecksBody) *StartAdvisorChecksParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the start advisor checks params +func (o *StartAdvisorChecksParams) SetBody(body StartAdvisorChecksBody) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *StartAdvisorChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/management/v1/json/client/advisor_service/start_advisor_checks_responses.go b/api/management/v1/json/client/advisor_service/start_advisor_checks_responses.go new file mode 100644 index 0000000000..d466ac9247 --- /dev/null +++ b/api/management/v1/json/client/advisor_service/start_advisor_checks_responses.go @@ -0,0 +1,295 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package advisor_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// StartAdvisorChecksReader is a Reader for the StartAdvisorChecks structure. +type StartAdvisorChecksReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *StartAdvisorChecksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewStartAdvisorChecksOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewStartAdvisorChecksDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewStartAdvisorChecksOK creates a StartAdvisorChecksOK with default headers values +func NewStartAdvisorChecksOK() *StartAdvisorChecksOK { + return &StartAdvisorChecksOK{} +} + +/* +StartAdvisorChecksOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type StartAdvisorChecksOK struct { + Payload interface{} +} + +func (o *StartAdvisorChecksOK) Error() string { + return fmt.Sprintf("[POST /v1/management/Advisors/StartChecks][%d] startAdvisorChecksOk %+v", 200, o.Payload) +} + +func (o *StartAdvisorChecksOK) GetPayload() interface{} { + return o.Payload +} + +func (o *StartAdvisorChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewStartAdvisorChecksDefault creates a StartAdvisorChecksDefault with default headers values +func NewStartAdvisorChecksDefault(code int) *StartAdvisorChecksDefault { + return &StartAdvisorChecksDefault{ + _statusCode: code, + } +} + +/* +StartAdvisorChecksDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type StartAdvisorChecksDefault struct { + _statusCode int + + Payload *StartAdvisorChecksDefaultBody +} + +// Code gets the status code for the start advisor checks default response +func (o *StartAdvisorChecksDefault) Code() int { + return o._statusCode +} + +func (o *StartAdvisorChecksDefault) Error() string { + return fmt.Sprintf("[POST /v1/management/Advisors/StartChecks][%d] StartAdvisorChecks default %+v", o._statusCode, o.Payload) +} + +func (o *StartAdvisorChecksDefault) GetPayload() *StartAdvisorChecksDefaultBody { + return o.Payload +} + +func (o *StartAdvisorChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartAdvisorChecksDefaultBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/* +StartAdvisorChecksBody start advisor checks body +swagger:model StartAdvisorChecksBody +*/ +type StartAdvisorChecksBody struct { + // Names of the checks that should be started. + Names []string `json:"names"` +} + +// Validate validates this start advisor checks body +func (o *StartAdvisorChecksBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this start advisor checks body based on context it is used +func (o *StartAdvisorChecksBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *StartAdvisorChecksBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *StartAdvisorChecksBody) UnmarshalBinary(b []byte) error { + var res StartAdvisorChecksBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +StartAdvisorChecksDefaultBody start advisor checks default body +swagger:model StartAdvisorChecksDefaultBody +*/ +type StartAdvisorChecksDefaultBody struct { + // code + Code int32 `json:"code,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // details + Details []*StartAdvisorChecksDefaultBodyDetailsItems0 `json:"details"` +} + +// Validate validates this start advisor checks default body +func (o *StartAdvisorChecksDefaultBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *StartAdvisorChecksDefaultBody) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(o.Details) { // not required + return nil + } + + for i := 0; i < len(o.Details); i++ { + if swag.IsZero(o.Details[i]) { // not required + continue + } + + if o.Details[i] != nil { + if err := o.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("StartAdvisorChecks default" + "." + "details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("StartAdvisorChecks default" + "." + "details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this start advisor checks default body based on the context it is used +func (o *StartAdvisorChecksDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *StartAdvisorChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { + if err := o.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("StartAdvisorChecks default" + "." + "details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("StartAdvisorChecks default" + "." + "details" + "." + strconv.Itoa(i)) + } + return err + } + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *StartAdvisorChecksDefaultBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *StartAdvisorChecksDefaultBody) UnmarshalBinary(b []byte) error { + var res StartAdvisorChecksDefaultBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +StartAdvisorChecksDefaultBodyDetailsItems0 start advisor checks default body details items0 +swagger:model StartAdvisorChecksDefaultBodyDetailsItems0 +*/ +type StartAdvisorChecksDefaultBodyDetailsItems0 struct { + // at type + AtType string `json:"@type,omitempty"` +} + +// Validate validates this start advisor checks default body details items0 +func (o *StartAdvisorChecksDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this start advisor checks default body details items0 based on context it is used +func (o *StartAdvisorChecksDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *StartAdvisorChecksDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *StartAdvisorChecksDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { + var res StartAdvisorChecksDefaultBodyDetailsItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/management/v1/json/client/pmm_management_api_client.go b/api/management/v1/json/client/pmm_management_api_client.go index 2985030154..4efaed37c0 100644 --- a/api/management/v1/json/client/pmm_management_api_client.go +++ b/api/management/v1/json/client/pmm_management_api_client.go @@ -11,6 +11,7 @@ import ( "github.com/go-openapi/strfmt" "github.com/percona/pmm/api/management/v1/json/client/actions_service" + "github.com/percona/pmm/api/management/v1/json/client/advisor_service" "github.com/percona/pmm/api/management/v1/json/client/annotation_service" "github.com/percona/pmm/api/management/v1/json/client/external_service" "github.com/percona/pmm/api/management/v1/json/client/ha_proxy_service" @@ -20,7 +21,6 @@ import ( "github.com/percona/pmm/api/management/v1/json/client/postgre_sql_service" "github.com/percona/pmm/api/management/v1/json/client/proxy_sql_service" "github.com/percona/pmm/api/management/v1/json/client/rds_service" - "github.com/percona/pmm/api/management/v1/json/client/security_checks_service" "github.com/percona/pmm/api/management/v1/json/client/service" ) @@ -67,6 +67,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *PMMManagem cli := new(PMMManagementAPI) cli.Transport = transport cli.ActionsService = actions_service.New(transport, formats) + cli.AdvisorService = advisor_service.New(transport, formats) cli.AnnotationService = annotation_service.New(transport, formats) cli.ExternalService = external_service.New(transport, formats) cli.HAProxyService = ha_proxy_service.New(transport, formats) @@ -76,7 +77,6 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *PMMManagem cli.PostgreSQLService = postgre_sql_service.New(transport, formats) cli.ProxySQLService = proxy_sql_service.New(transport, formats) cli.RDSService = rds_service.New(transport, formats) - cli.SecurityChecksService = security_checks_service.New(transport, formats) cli.Service = service.New(transport, formats) return cli } @@ -124,6 +124,8 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { type PMMManagementAPI struct { ActionsService actions_service.ClientService + AdvisorService advisor_service.ClientService + AnnotationService annotation_service.ClientService ExternalService external_service.ClientService @@ -142,8 +144,6 @@ type PMMManagementAPI struct { RDSService rds_service.ClientService - SecurityChecksService security_checks_service.ClientService - Service service.ClientService Transport runtime.ClientTransport @@ -153,6 +153,7 @@ type PMMManagementAPI struct { func (c *PMMManagementAPI) SetTransport(transport runtime.ClientTransport) { c.Transport = transport c.ActionsService.SetTransport(transport) + c.AdvisorService.SetTransport(transport) c.AnnotationService.SetTransport(transport) c.ExternalService.SetTransport(transport) c.HAProxyService.SetTransport(transport) @@ -162,6 +163,5 @@ func (c *PMMManagementAPI) SetTransport(transport runtime.ClientTransport) { c.PostgreSQLService.SetTransport(transport) c.ProxySQLService.SetTransport(transport) c.RDSService.SetTransport(transport) - c.SecurityChecksService.SetTransport(transport) c.Service.SetTransport(transport) } diff --git a/api/management/v1/json/client/security_checks_service/change_security_checks_parameters.go b/api/management/v1/json/client/security_checks_service/change_security_checks_parameters.go deleted file mode 100644 index 6e7f07270d..0000000000 --- a/api/management/v1/json/client/security_checks_service/change_security_checks_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security_checks_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewChangeSecurityChecksParams creates a new ChangeSecurityChecksParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewChangeSecurityChecksParams() *ChangeSecurityChecksParams { - return &ChangeSecurityChecksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewChangeSecurityChecksParamsWithTimeout creates a new ChangeSecurityChecksParams object -// with the ability to set a timeout on a request. -func NewChangeSecurityChecksParamsWithTimeout(timeout time.Duration) *ChangeSecurityChecksParams { - return &ChangeSecurityChecksParams{ - timeout: timeout, - } -} - -// NewChangeSecurityChecksParamsWithContext creates a new ChangeSecurityChecksParams object -// with the ability to set a context for a request. -func NewChangeSecurityChecksParamsWithContext(ctx context.Context) *ChangeSecurityChecksParams { - return &ChangeSecurityChecksParams{ - Context: ctx, - } -} - -// NewChangeSecurityChecksParamsWithHTTPClient creates a new ChangeSecurityChecksParams object -// with the ability to set a custom HTTPClient for a request. -func NewChangeSecurityChecksParamsWithHTTPClient(client *http.Client) *ChangeSecurityChecksParams { - return &ChangeSecurityChecksParams{ - HTTPClient: client, - } -} - -/* -ChangeSecurityChecksParams contains all the parameters to send to the API endpoint - - for the change security checks operation. - - Typically these are written to a http.Request. -*/ -type ChangeSecurityChecksParams struct { - // Body. - Body ChangeSecurityChecksBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the change security checks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ChangeSecurityChecksParams) WithDefaults() *ChangeSecurityChecksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the change security checks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ChangeSecurityChecksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the change security checks params -func (o *ChangeSecurityChecksParams) WithTimeout(timeout time.Duration) *ChangeSecurityChecksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the change security checks params -func (o *ChangeSecurityChecksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the change security checks params -func (o *ChangeSecurityChecksParams) WithContext(ctx context.Context) *ChangeSecurityChecksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the change security checks params -func (o *ChangeSecurityChecksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the change security checks params -func (o *ChangeSecurityChecksParams) WithHTTPClient(client *http.Client) *ChangeSecurityChecksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the change security checks params -func (o *ChangeSecurityChecksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the change security checks params -func (o *ChangeSecurityChecksParams) WithBody(body ChangeSecurityChecksBody) *ChangeSecurityChecksParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the change security checks params -func (o *ChangeSecurityChecksParams) SetBody(body ChangeSecurityChecksBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ChangeSecurityChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/management/v1/json/client/security_checks_service/change_security_checks_responses.go b/api/management/v1/json/client/security_checks_service/change_security_checks_responses.go deleted file mode 100644 index 5a903a889b..0000000000 --- a/api/management/v1/json/client/security_checks_service/change_security_checks_responses.go +++ /dev/null @@ -1,459 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security_checks_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ChangeSecurityChecksReader is a Reader for the ChangeSecurityChecks structure. -type ChangeSecurityChecksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ChangeSecurityChecksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewChangeSecurityChecksOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewChangeSecurityChecksDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewChangeSecurityChecksOK creates a ChangeSecurityChecksOK with default headers values -func NewChangeSecurityChecksOK() *ChangeSecurityChecksOK { - return &ChangeSecurityChecksOK{} -} - -/* -ChangeSecurityChecksOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type ChangeSecurityChecksOK struct { - Payload interface{} -} - -func (o *ChangeSecurityChecksOK) Error() string { - return fmt.Sprintf("[POST /v1/management/SecurityChecks/Change][%d] changeSecurityChecksOk %+v", 200, o.Payload) -} - -func (o *ChangeSecurityChecksOK) GetPayload() interface{} { - return o.Payload -} - -func (o *ChangeSecurityChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewChangeSecurityChecksDefault creates a ChangeSecurityChecksDefault with default headers values -func NewChangeSecurityChecksDefault(code int) *ChangeSecurityChecksDefault { - return &ChangeSecurityChecksDefault{ - _statusCode: code, - } -} - -/* -ChangeSecurityChecksDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type ChangeSecurityChecksDefault struct { - _statusCode int - - Payload *ChangeSecurityChecksDefaultBody -} - -// Code gets the status code for the change security checks default response -func (o *ChangeSecurityChecksDefault) Code() int { - return o._statusCode -} - -func (o *ChangeSecurityChecksDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/SecurityChecks/Change][%d] ChangeSecurityChecks default %+v", o._statusCode, o.Payload) -} - -func (o *ChangeSecurityChecksDefault) GetPayload() *ChangeSecurityChecksDefaultBody { - return o.Payload -} - -func (o *ChangeSecurityChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeSecurityChecksDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -ChangeSecurityChecksBody change security checks body -swagger:model ChangeSecurityChecksBody -*/ -type ChangeSecurityChecksBody struct { - // params - Params []*ChangeSecurityChecksParamsBodyParamsItems0 `json:"params"` -} - -// Validate validates this change security checks body -func (o *ChangeSecurityChecksBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateParams(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ChangeSecurityChecksBody) validateParams(formats strfmt.Registry) error { - if swag.IsZero(o.Params) { // not required - return nil - } - - for i := 0; i < len(o.Params); i++ { - if swag.IsZero(o.Params[i]) { // not required - continue - } - - if o.Params[i] != nil { - if err := o.Params[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this change security checks body based on the context it is used -func (o *ChangeSecurityChecksBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateParams(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ChangeSecurityChecksBody) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Params); i++ { - if o.Params[i] != nil { - if err := o.Params[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "params" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "params" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ChangeSecurityChecksBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ChangeSecurityChecksBody) UnmarshalBinary(b []byte) error { - var res ChangeSecurityChecksBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ChangeSecurityChecksDefaultBody change security checks default body -swagger:model ChangeSecurityChecksDefaultBody -*/ -type ChangeSecurityChecksDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*ChangeSecurityChecksDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this change security checks default body -func (o *ChangeSecurityChecksDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ChangeSecurityChecksDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ChangeSecurityChecks default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ChangeSecurityChecks default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this change security checks default body based on the context it is used -func (o *ChangeSecurityChecksDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ChangeSecurityChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ChangeSecurityChecks default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ChangeSecurityChecks default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ChangeSecurityChecksDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ChangeSecurityChecksDefaultBody) UnmarshalBinary(b []byte) error { - var res ChangeSecurityChecksDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ChangeSecurityChecksDefaultBodyDetailsItems0 change security checks default body details items0 -swagger:model ChangeSecurityChecksDefaultBodyDetailsItems0 -*/ -type ChangeSecurityChecksDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this change security checks default body details items0 -func (o *ChangeSecurityChecksDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this change security checks default body details items0 based on context it is used -func (o *ChangeSecurityChecksDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ChangeSecurityChecksDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ChangeSecurityChecksDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res ChangeSecurityChecksDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ChangeSecurityChecksParamsBodyParamsItems0 ChangeSecurityCheckParams specifies a single check parameters. -swagger:model ChangeSecurityChecksParamsBodyParamsItems0 -*/ -type ChangeSecurityChecksParamsBodyParamsItems0 struct { - // The name of the check to change. - Name string `json:"name,omitempty"` - - // enable - Enable *bool `json:"enable,omitempty"` - - // SecurityCheckInterval represents possible execution interval values for checks. - // Enum: [SECURITY_CHECK_INTERVAL_UNSPECIFIED SECURITY_CHECK_INTERVAL_STANDARD SECURITY_CHECK_INTERVAL_FREQUENT SECURITY_CHECK_INTERVAL_RARE] - Interval *string `json:"interval,omitempty"` -} - -// Validate validates this change security checks params body params items0 -func (o *ChangeSecurityChecksParamsBodyParamsItems0) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateInterval(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var changeSecurityChecksParamsBodyParamsItems0TypeIntervalPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["SECURITY_CHECK_INTERVAL_UNSPECIFIED","SECURITY_CHECK_INTERVAL_STANDARD","SECURITY_CHECK_INTERVAL_FREQUENT","SECURITY_CHECK_INTERVAL_RARE"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - changeSecurityChecksParamsBodyParamsItems0TypeIntervalPropEnum = append(changeSecurityChecksParamsBodyParamsItems0TypeIntervalPropEnum, v) - } -} - -const ( - - // ChangeSecurityChecksParamsBodyParamsItems0IntervalSECURITYCHECKINTERVALUNSPECIFIED captures enum value "SECURITY_CHECK_INTERVAL_UNSPECIFIED" - ChangeSecurityChecksParamsBodyParamsItems0IntervalSECURITYCHECKINTERVALUNSPECIFIED string = "SECURITY_CHECK_INTERVAL_UNSPECIFIED" - - // ChangeSecurityChecksParamsBodyParamsItems0IntervalSECURITYCHECKINTERVALSTANDARD captures enum value "SECURITY_CHECK_INTERVAL_STANDARD" - ChangeSecurityChecksParamsBodyParamsItems0IntervalSECURITYCHECKINTERVALSTANDARD string = "SECURITY_CHECK_INTERVAL_STANDARD" - - // ChangeSecurityChecksParamsBodyParamsItems0IntervalSECURITYCHECKINTERVALFREQUENT captures enum value "SECURITY_CHECK_INTERVAL_FREQUENT" - ChangeSecurityChecksParamsBodyParamsItems0IntervalSECURITYCHECKINTERVALFREQUENT string = "SECURITY_CHECK_INTERVAL_FREQUENT" - - // ChangeSecurityChecksParamsBodyParamsItems0IntervalSECURITYCHECKINTERVALRARE captures enum value "SECURITY_CHECK_INTERVAL_RARE" - ChangeSecurityChecksParamsBodyParamsItems0IntervalSECURITYCHECKINTERVALRARE string = "SECURITY_CHECK_INTERVAL_RARE" -) - -// prop value enum -func (o *ChangeSecurityChecksParamsBodyParamsItems0) validateIntervalEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, changeSecurityChecksParamsBodyParamsItems0TypeIntervalPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *ChangeSecurityChecksParamsBodyParamsItems0) validateInterval(formats strfmt.Registry) error { - if swag.IsZero(o.Interval) { // not required - return nil - } - - // value enum - if err := o.validateIntervalEnum("interval", "body", *o.Interval); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this change security checks params body params items0 based on context it is used -func (o *ChangeSecurityChecksParamsBodyParamsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ChangeSecurityChecksParamsBodyParamsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ChangeSecurityChecksParamsBodyParamsItems0) UnmarshalBinary(b []byte) error { - var res ChangeSecurityChecksParamsBodyParamsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/management/v1/json/client/security_checks_service/list_security_checks_parameters.go b/api/management/v1/json/client/security_checks_service/list_security_checks_parameters.go deleted file mode 100644 index b5f9646435..0000000000 --- a/api/management/v1/json/client/security_checks_service/list_security_checks_parameters.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security_checks_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewListSecurityChecksParams creates a new ListSecurityChecksParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewListSecurityChecksParams() *ListSecurityChecksParams { - return &ListSecurityChecksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewListSecurityChecksParamsWithTimeout creates a new ListSecurityChecksParams object -// with the ability to set a timeout on a request. -func NewListSecurityChecksParamsWithTimeout(timeout time.Duration) *ListSecurityChecksParams { - return &ListSecurityChecksParams{ - timeout: timeout, - } -} - -// NewListSecurityChecksParamsWithContext creates a new ListSecurityChecksParams object -// with the ability to set a context for a request. -func NewListSecurityChecksParamsWithContext(ctx context.Context) *ListSecurityChecksParams { - return &ListSecurityChecksParams{ - Context: ctx, - } -} - -// NewListSecurityChecksParamsWithHTTPClient creates a new ListSecurityChecksParams object -// with the ability to set a custom HTTPClient for a request. -func NewListSecurityChecksParamsWithHTTPClient(client *http.Client) *ListSecurityChecksParams { - return &ListSecurityChecksParams{ - HTTPClient: client, - } -} - -/* -ListSecurityChecksParams contains all the parameters to send to the API endpoint - - for the list security checks operation. - - Typically these are written to a http.Request. -*/ -type ListSecurityChecksParams struct { - // Body. - Body interface{} - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the list security checks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListSecurityChecksParams) WithDefaults() *ListSecurityChecksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the list security checks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ListSecurityChecksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the list security checks params -func (o *ListSecurityChecksParams) WithTimeout(timeout time.Duration) *ListSecurityChecksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the list security checks params -func (o *ListSecurityChecksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the list security checks params -func (o *ListSecurityChecksParams) WithContext(ctx context.Context) *ListSecurityChecksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the list security checks params -func (o *ListSecurityChecksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the list security checks params -func (o *ListSecurityChecksParams) WithHTTPClient(client *http.Client) *ListSecurityChecksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the list security checks params -func (o *ListSecurityChecksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the list security checks params -func (o *ListSecurityChecksParams) WithBody(body interface{}) *ListSecurityChecksParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the list security checks params -func (o *ListSecurityChecksParams) SetBody(body interface{}) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *ListSecurityChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/management/v1/json/client/security_checks_service/list_security_checks_responses.go b/api/management/v1/json/client/security_checks_service/list_security_checks_responses.go deleted file mode 100644 index 52ea5a99cc..0000000000 --- a/api/management/v1/json/client/security_checks_service/list_security_checks_responses.go +++ /dev/null @@ -1,523 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security_checks_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ListSecurityChecksReader is a Reader for the ListSecurityChecks structure. -type ListSecurityChecksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListSecurityChecksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListSecurityChecksOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewListSecurityChecksDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewListSecurityChecksOK creates a ListSecurityChecksOK with default headers values -func NewListSecurityChecksOK() *ListSecurityChecksOK { - return &ListSecurityChecksOK{} -} - -/* -ListSecurityChecksOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type ListSecurityChecksOK struct { - Payload *ListSecurityChecksOKBody -} - -func (o *ListSecurityChecksOK) Error() string { - return fmt.Sprintf("[POST /v1/management/SecurityChecks/List][%d] listSecurityChecksOk %+v", 200, o.Payload) -} - -func (o *ListSecurityChecksOK) GetPayload() *ListSecurityChecksOKBody { - return o.Payload -} - -func (o *ListSecurityChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListSecurityChecksOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListSecurityChecksDefault creates a ListSecurityChecksDefault with default headers values -func NewListSecurityChecksDefault(code int) *ListSecurityChecksDefault { - return &ListSecurityChecksDefault{ - _statusCode: code, - } -} - -/* -ListSecurityChecksDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type ListSecurityChecksDefault struct { - _statusCode int - - Payload *ListSecurityChecksDefaultBody -} - -// Code gets the status code for the list security checks default response -func (o *ListSecurityChecksDefault) Code() int { - return o._statusCode -} - -func (o *ListSecurityChecksDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/SecurityChecks/List][%d] ListSecurityChecks default %+v", o._statusCode, o.Payload) -} - -func (o *ListSecurityChecksDefault) GetPayload() *ListSecurityChecksDefaultBody { - return o.Payload -} - -func (o *ListSecurityChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListSecurityChecksDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -ListSecurityChecksDefaultBody list security checks default body -swagger:model ListSecurityChecksDefaultBody -*/ -type ListSecurityChecksDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*ListSecurityChecksDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this list security checks default body -func (o *ListSecurityChecksDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListSecurityChecksDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ListSecurityChecks default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ListSecurityChecks default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this list security checks default body based on the context it is used -func (o *ListSecurityChecksDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListSecurityChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ListSecurityChecks default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("ListSecurityChecks default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListSecurityChecksDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListSecurityChecksDefaultBody) UnmarshalBinary(b []byte) error { - var res ListSecurityChecksDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListSecurityChecksDefaultBodyDetailsItems0 list security checks default body details items0 -swagger:model ListSecurityChecksDefaultBodyDetailsItems0 -*/ -type ListSecurityChecksDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this list security checks default body details items0 -func (o *ListSecurityChecksDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this list security checks default body details items0 based on context it is used -func (o *ListSecurityChecksDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListSecurityChecksDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListSecurityChecksDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res ListSecurityChecksDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListSecurityChecksOKBody list security checks OK body -swagger:model ListSecurityChecksOKBody -*/ -type ListSecurityChecksOKBody struct { - // checks - Checks []*ListSecurityChecksOKBodyChecksItems0 `json:"checks"` -} - -// Validate validates this list security checks OK body -func (o *ListSecurityChecksOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateChecks(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListSecurityChecksOKBody) validateChecks(formats strfmt.Registry) error { - if swag.IsZero(o.Checks) { // not required - return nil - } - - for i := 0; i < len(o.Checks); i++ { - if swag.IsZero(o.Checks[i]) { // not required - continue - } - - if o.Checks[i] != nil { - if err := o.Checks[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("listSecurityChecksOk" + "." + "checks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("listSecurityChecksOk" + "." + "checks" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this list security checks OK body based on the context it is used -func (o *ListSecurityChecksOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateChecks(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *ListSecurityChecksOKBody) contextValidateChecks(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Checks); i++ { - if o.Checks[i] != nil { - if err := o.Checks[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("listSecurityChecksOk" + "." + "checks" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("listSecurityChecksOk" + "." + "checks" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *ListSecurityChecksOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListSecurityChecksOKBody) UnmarshalBinary(b []byte) error { - var res ListSecurityChecksOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -ListSecurityChecksOKBodyChecksItems0 SecurityCheck contains check name and status. -swagger:model ListSecurityChecksOKBodyChecksItems0 -*/ -type ListSecurityChecksOKBodyChecksItems0 struct { - // Machine-readable name (ID) that is used in expression. - Name string `json:"name,omitempty"` - - // True if that check is enabled. - Enabled bool `json:"enabled,omitempty"` - - // Long human-readable description. - Description string `json:"description,omitempty"` - - // Short human-readable summary. - Summary string `json:"summary,omitempty"` - - // SecurityCheckInterval represents possible execution interval values for checks. - // Enum: [SECURITY_CHECK_INTERVAL_UNSPECIFIED SECURITY_CHECK_INTERVAL_STANDARD SECURITY_CHECK_INTERVAL_FREQUENT SECURITY_CHECK_INTERVAL_RARE] - Interval *string `json:"interval,omitempty"` - - // family - // Enum: [ADVISOR_CHECK_FAMILY_UNSPECIFIED ADVISOR_CHECK_FAMILY_MYSQL ADVISOR_CHECK_FAMILY_POSTGRESQL ADVISOR_CHECK_FAMILY_MONGODB] - Family *string `json:"family,omitempty"` -} - -// Validate validates this list security checks OK body checks items0 -func (o *ListSecurityChecksOKBodyChecksItems0) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateInterval(formats); err != nil { - res = append(res, err) - } - - if err := o.validateFamily(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var listSecurityChecksOkBodyChecksItems0TypeIntervalPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["SECURITY_CHECK_INTERVAL_UNSPECIFIED","SECURITY_CHECK_INTERVAL_STANDARD","SECURITY_CHECK_INTERVAL_FREQUENT","SECURITY_CHECK_INTERVAL_RARE"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - listSecurityChecksOkBodyChecksItems0TypeIntervalPropEnum = append(listSecurityChecksOkBodyChecksItems0TypeIntervalPropEnum, v) - } -} - -const ( - - // ListSecurityChecksOKBodyChecksItems0IntervalSECURITYCHECKINTERVALUNSPECIFIED captures enum value "SECURITY_CHECK_INTERVAL_UNSPECIFIED" - ListSecurityChecksOKBodyChecksItems0IntervalSECURITYCHECKINTERVALUNSPECIFIED string = "SECURITY_CHECK_INTERVAL_UNSPECIFIED" - - // ListSecurityChecksOKBodyChecksItems0IntervalSECURITYCHECKINTERVALSTANDARD captures enum value "SECURITY_CHECK_INTERVAL_STANDARD" - ListSecurityChecksOKBodyChecksItems0IntervalSECURITYCHECKINTERVALSTANDARD string = "SECURITY_CHECK_INTERVAL_STANDARD" - - // ListSecurityChecksOKBodyChecksItems0IntervalSECURITYCHECKINTERVALFREQUENT captures enum value "SECURITY_CHECK_INTERVAL_FREQUENT" - ListSecurityChecksOKBodyChecksItems0IntervalSECURITYCHECKINTERVALFREQUENT string = "SECURITY_CHECK_INTERVAL_FREQUENT" - - // ListSecurityChecksOKBodyChecksItems0IntervalSECURITYCHECKINTERVALRARE captures enum value "SECURITY_CHECK_INTERVAL_RARE" - ListSecurityChecksOKBodyChecksItems0IntervalSECURITYCHECKINTERVALRARE string = "SECURITY_CHECK_INTERVAL_RARE" -) - -// prop value enum -func (o *ListSecurityChecksOKBodyChecksItems0) validateIntervalEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, listSecurityChecksOkBodyChecksItems0TypeIntervalPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *ListSecurityChecksOKBodyChecksItems0) validateInterval(formats strfmt.Registry) error { - if swag.IsZero(o.Interval) { // not required - return nil - } - - // value enum - if err := o.validateIntervalEnum("interval", "body", *o.Interval); err != nil { - return err - } - - return nil -} - -var listSecurityChecksOkBodyChecksItems0TypeFamilyPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["ADVISOR_CHECK_FAMILY_UNSPECIFIED","ADVISOR_CHECK_FAMILY_MYSQL","ADVISOR_CHECK_FAMILY_POSTGRESQL","ADVISOR_CHECK_FAMILY_MONGODB"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - listSecurityChecksOkBodyChecksItems0TypeFamilyPropEnum = append(listSecurityChecksOkBodyChecksItems0TypeFamilyPropEnum, v) - } -} - -const ( - - // ListSecurityChecksOKBodyChecksItems0FamilyADVISORCHECKFAMILYUNSPECIFIED captures enum value "ADVISOR_CHECK_FAMILY_UNSPECIFIED" - ListSecurityChecksOKBodyChecksItems0FamilyADVISORCHECKFAMILYUNSPECIFIED string = "ADVISOR_CHECK_FAMILY_UNSPECIFIED" - - // ListSecurityChecksOKBodyChecksItems0FamilyADVISORCHECKFAMILYMYSQL captures enum value "ADVISOR_CHECK_FAMILY_MYSQL" - ListSecurityChecksOKBodyChecksItems0FamilyADVISORCHECKFAMILYMYSQL string = "ADVISOR_CHECK_FAMILY_MYSQL" - - // ListSecurityChecksOKBodyChecksItems0FamilyADVISORCHECKFAMILYPOSTGRESQL captures enum value "ADVISOR_CHECK_FAMILY_POSTGRESQL" - ListSecurityChecksOKBodyChecksItems0FamilyADVISORCHECKFAMILYPOSTGRESQL string = "ADVISOR_CHECK_FAMILY_POSTGRESQL" - - // ListSecurityChecksOKBodyChecksItems0FamilyADVISORCHECKFAMILYMONGODB captures enum value "ADVISOR_CHECK_FAMILY_MONGODB" - ListSecurityChecksOKBodyChecksItems0FamilyADVISORCHECKFAMILYMONGODB string = "ADVISOR_CHECK_FAMILY_MONGODB" -) - -// prop value enum -func (o *ListSecurityChecksOKBodyChecksItems0) validateFamilyEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, listSecurityChecksOkBodyChecksItems0TypeFamilyPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *ListSecurityChecksOKBodyChecksItems0) validateFamily(formats strfmt.Registry) error { - if swag.IsZero(o.Family) { // not required - return nil - } - - // value enum - if err := o.validateFamilyEnum("family", "body", *o.Family); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this list security checks OK body checks items0 based on context it is used -func (o *ListSecurityChecksOKBodyChecksItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *ListSecurityChecksOKBodyChecksItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *ListSecurityChecksOKBodyChecksItems0) UnmarshalBinary(b []byte) error { - var res ListSecurityChecksOKBodyChecksItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/management/v1/json/client/security_checks_service/start_security_checks_parameters.go b/api/management/v1/json/client/security_checks_service/start_security_checks_parameters.go deleted file mode 100644 index e45effe362..0000000000 --- a/api/management/v1/json/client/security_checks_service/start_security_checks_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security_checks_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewStartSecurityChecksParams creates a new StartSecurityChecksParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewStartSecurityChecksParams() *StartSecurityChecksParams { - return &StartSecurityChecksParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewStartSecurityChecksParamsWithTimeout creates a new StartSecurityChecksParams object -// with the ability to set a timeout on a request. -func NewStartSecurityChecksParamsWithTimeout(timeout time.Duration) *StartSecurityChecksParams { - return &StartSecurityChecksParams{ - timeout: timeout, - } -} - -// NewStartSecurityChecksParamsWithContext creates a new StartSecurityChecksParams object -// with the ability to set a context for a request. -func NewStartSecurityChecksParamsWithContext(ctx context.Context) *StartSecurityChecksParams { - return &StartSecurityChecksParams{ - Context: ctx, - } -} - -// NewStartSecurityChecksParamsWithHTTPClient creates a new StartSecurityChecksParams object -// with the ability to set a custom HTTPClient for a request. -func NewStartSecurityChecksParamsWithHTTPClient(client *http.Client) *StartSecurityChecksParams { - return &StartSecurityChecksParams{ - HTTPClient: client, - } -} - -/* -StartSecurityChecksParams contains all the parameters to send to the API endpoint - - for the start security checks operation. - - Typically these are written to a http.Request. -*/ -type StartSecurityChecksParams struct { - // Body. - Body StartSecurityChecksBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the start security checks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *StartSecurityChecksParams) WithDefaults() *StartSecurityChecksParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the start security checks params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *StartSecurityChecksParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the start security checks params -func (o *StartSecurityChecksParams) WithTimeout(timeout time.Duration) *StartSecurityChecksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the start security checks params -func (o *StartSecurityChecksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the start security checks params -func (o *StartSecurityChecksParams) WithContext(ctx context.Context) *StartSecurityChecksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the start security checks params -func (o *StartSecurityChecksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the start security checks params -func (o *StartSecurityChecksParams) WithHTTPClient(client *http.Client) *StartSecurityChecksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the start security checks params -func (o *StartSecurityChecksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the start security checks params -func (o *StartSecurityChecksParams) WithBody(body StartSecurityChecksBody) *StartSecurityChecksParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the start security checks params -func (o *StartSecurityChecksParams) SetBody(body StartSecurityChecksBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *StartSecurityChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/management/v1/json/client/security_checks_service/start_security_checks_responses.go b/api/management/v1/json/client/security_checks_service/start_security_checks_responses.go deleted file mode 100644 index 861f9ec7ac..0000000000 --- a/api/management/v1/json/client/security_checks_service/start_security_checks_responses.go +++ /dev/null @@ -1,295 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package security_checks_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// StartSecurityChecksReader is a Reader for the StartSecurityChecks structure. -type StartSecurityChecksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *StartSecurityChecksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewStartSecurityChecksOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewStartSecurityChecksDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewStartSecurityChecksOK creates a StartSecurityChecksOK with default headers values -func NewStartSecurityChecksOK() *StartSecurityChecksOK { - return &StartSecurityChecksOK{} -} - -/* -StartSecurityChecksOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type StartSecurityChecksOK struct { - Payload interface{} -} - -func (o *StartSecurityChecksOK) Error() string { - return fmt.Sprintf("[POST /v1/management/SecurityChecks/Start][%d] startSecurityChecksOk %+v", 200, o.Payload) -} - -func (o *StartSecurityChecksOK) GetPayload() interface{} { - return o.Payload -} - -func (o *StartSecurityChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewStartSecurityChecksDefault creates a StartSecurityChecksDefault with default headers values -func NewStartSecurityChecksDefault(code int) *StartSecurityChecksDefault { - return &StartSecurityChecksDefault{ - _statusCode: code, - } -} - -/* -StartSecurityChecksDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type StartSecurityChecksDefault struct { - _statusCode int - - Payload *StartSecurityChecksDefaultBody -} - -// Code gets the status code for the start security checks default response -func (o *StartSecurityChecksDefault) Code() int { - return o._statusCode -} - -func (o *StartSecurityChecksDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/SecurityChecks/Start][%d] StartSecurityChecks default %+v", o._statusCode, o.Payload) -} - -func (o *StartSecurityChecksDefault) GetPayload() *StartSecurityChecksDefaultBody { - return o.Payload -} - -func (o *StartSecurityChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartSecurityChecksDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -StartSecurityChecksBody start security checks body -swagger:model StartSecurityChecksBody -*/ -type StartSecurityChecksBody struct { - // Names of the checks that should be started. - Names []string `json:"names"` -} - -// Validate validates this start security checks body -func (o *StartSecurityChecksBody) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this start security checks body based on context it is used -func (o *StartSecurityChecksBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *StartSecurityChecksBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *StartSecurityChecksBody) UnmarshalBinary(b []byte) error { - var res StartSecurityChecksBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -StartSecurityChecksDefaultBody start security checks default body -swagger:model StartSecurityChecksDefaultBody -*/ -type StartSecurityChecksDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*StartSecurityChecksDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this start security checks default body -func (o *StartSecurityChecksDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *StartSecurityChecksDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("StartSecurityChecks default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("StartSecurityChecks default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this start security checks default body based on the context it is used -func (o *StartSecurityChecksDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *StartSecurityChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("StartSecurityChecks default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("StartSecurityChecks default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *StartSecurityChecksDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *StartSecurityChecksDefaultBody) UnmarshalBinary(b []byte) error { - var res StartSecurityChecksDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -StartSecurityChecksDefaultBodyDetailsItems0 start security checks default body details items0 -swagger:model StartSecurityChecksDefaultBodyDetailsItems0 -*/ -type StartSecurityChecksDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this start security checks default body details items0 -func (o *StartSecurityChecksDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this start security checks default body details items0 based on context it is used -func (o *StartSecurityChecksDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *StartSecurityChecksDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *StartSecurityChecksDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res StartSecurityChecksDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/management/v1/json/v1.json b/api/management/v1/json/v1.json index 350d22db1d..5d79e8f13e 100644 --- a/api/management/v1/json/v1.json +++ b/api/management/v1/json/v1.json @@ -1368,11 +1368,276 @@ } } }, + "/v1/management/Advisors/Change": { + "post": { + "description": "Enables/disables Advisor checks or changes their interval by names.", + "tags": [ + "AdvisorService" + ], + "summary": "Change Advisor Checks", + "operationId": "ChangeAdvisorChecks", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "params": { + "type": "array", + "items": { + "description": "ChangeAdvisorCheckParams specifies a single check parameters.", + "type": "object", + "properties": { + "enable": { + "type": "boolean", + "x-nullable": true, + "x-order": 1 + }, + "interval": { + "description": "AdvisorCheckInterval represents possible execution interval values for checks.", + "type": "string", + "default": "ADVISOR_CHECK_INTERVAL_UNSPECIFIED", + "enum": [ + "ADVISOR_CHECK_INTERVAL_UNSPECIFIED", + "ADVISOR_CHECK_INTERVAL_STANDARD", + "ADVISOR_CHECK_INTERVAL_FREQUENT", + "ADVISOR_CHECK_INTERVAL_RARE" + ], + "x-order": 2 + }, + "name": { + "description": "The name of the check to change.", + "type": "string", + "x-order": 0 + } + } + }, + "x-order": 0 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + }, + "message": { + "type": "string", + "x-order": 1 + } + } + } + } + } + } + }, + "/v1/management/Advisors/FailedChecks": { + "post": { + "description": "Returns the latest check results for a given service.", + "tags": [ + "AdvisorService" + ], + "summary": "Get Failed Checks", + "operationId": "GetFailedChecks", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "page_params": { + "description": "PageParams represents page request parameters for pagination.", + "type": "object", + "properties": { + "index": { + "description": "Index of the requested page, starts from 0.", + "type": "integer", + "format": "int32", + "x-order": 1 + }, + "page_size": { + "description": "Maximum number of results per page.", + "type": "integer", + "format": "int32", + "x-order": 0 + } + }, + "x-order": 1 + }, + "service_id": { + "type": "string", + "x-order": 0 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "page_totals": { + "description": "PageTotals represents total values for pagination.", + "type": "object", + "properties": { + "total_items": { + "description": "Total number of results.", + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "total_pages": { + "description": "Total number of pages.", + "type": "integer", + "format": "int32", + "x-order": 1 + } + }, + "x-order": 1 + }, + "results": { + "type": "array", + "items": { + "description": "CheckResult represents the check results for a given service.", + "type": "object", + "properties": { + "check_name": { + "type": "string", + "title": "Name of the check that failed", + "x-order": 7 + }, + "description": { + "type": "string", + "x-order": 1 + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 3 + }, + "read_more_url": { + "description": "URL containing information on how to resolve an issue detected by an Advisor check.", + "type": "string", + "x-order": 4 + }, + "service_id": { + "description": "ID of the monitored service on which the check ran.", + "type": "string", + "x-order": 6 + }, + "service_name": { + "description": "Name of the monitored service on which the check ran.", + "type": "string", + "x-order": 5 + }, + "severity": { + "description": "Severity represents severity level of the check result or alert.", + "type": "string", + "default": "SEVERITY_UNSPECIFIED", + "enum": [ + "SEVERITY_UNSPECIFIED", + "SEVERITY_EMERGENCY", + "SEVERITY_ALERT", + "SEVERITY_CRITICAL", + "SEVERITY_ERROR", + "SEVERITY_WARNING", + "SEVERITY_NOTICE", + "SEVERITY_INFO", + "SEVERITY_DEBUG" + ], + "x-order": 2 + }, + "silenced": { + "type": "boolean", + "title": "Silence status of the check result", + "x-order": 8 + }, + "summary": { + "type": "string", + "x-order": 0 + } + } + }, + "x-order": 0 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + }, + "message": { + "type": "string", + "x-order": 1 + } + } + } + } + } + } + }, "/v1/management/Advisors/List": { "post": { "description": "Returns a list of advisors available to the user.", "tags": [ - "SecurityChecksService" + "AdvisorService" ], "summary": "List advisors", "operationId": "ListAdvisors", @@ -1406,7 +1671,7 @@ "description": "Advisor checks.", "type": "array", "items": { - "description": "SecurityCheck contains check name and status.", + "description": "AdvisorCheck contains check name and status.", "type": "object", "properties": { "description": { @@ -1431,14 +1696,14 @@ "x-order": 5 }, "interval": { - "description": "SecurityCheckInterval represents possible execution interval values for checks.", + "description": "AdvisorCheckInterval represents possible execution interval values for checks.", "type": "string", - "default": "SECURITY_CHECK_INTERVAL_UNSPECIFIED", + "default": "ADVISOR_CHECK_INTERVAL_UNSPECIFIED", "enum": [ - "SECURITY_CHECK_INTERVAL_UNSPECIFIED", - "SECURITY_CHECK_INTERVAL_STANDARD", - "SECURITY_CHECK_INTERVAL_FREQUENT", - "SECURITY_CHECK_INTERVAL_RARE" + "ADVISOR_CHECK_INTERVAL_UNSPECIFIED", + "ADVISOR_CHECK_INTERVAL_STANDARD", + "ADVISOR_CHECK_INTERVAL_FREQUENT", + "ADVISOR_CHECK_INTERVAL_RARE" ], "x-order": 4 }, @@ -1517,48 +1782,269 @@ } } }, - "/v1/management/Annotations/Add": { + "/v1/management/Advisors/ListChecks": { "post": { - "description": "Adds annotation.", + "description": "Returns a list of checks available to the user.", "tags": [ - "AnnotationService" + "AdvisorService" ], - "summary": "Add Annotation", - "operationId": "AddAnnotation", + "summary": "List advisor checks", + "operationId": "ListAdvisorChecks", "parameters": [ { - "description": "AddAnnotationRequest is a params to add new annotation.", "name": "body", "in": "body", "required": true, "schema": { - "description": "AddAnnotationRequest is a params to add new annotation.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { "type": "object", "properties": { - "node_name": { - "description": "Used for annotate node.", - "type": "string", + "checks": { + "type": "array", + "items": { + "description": "AdvisorCheck contains check name and status.", + "type": "object", + "properties": { + "description": { + "description": "Long human-readable description.", + "type": "string", + "x-order": 2 + }, + "enabled": { + "description": "True if that check is enabled.", + "type": "boolean", + "x-order": 1 + }, + "family": { + "type": "string", + "default": "ADVISOR_CHECK_FAMILY_UNSPECIFIED", + "enum": [ + "ADVISOR_CHECK_FAMILY_UNSPECIFIED", + "ADVISOR_CHECK_FAMILY_MYSQL", + "ADVISOR_CHECK_FAMILY_POSTGRESQL", + "ADVISOR_CHECK_FAMILY_MONGODB" + ], + "x-order": 5 + }, + "interval": { + "description": "AdvisorCheckInterval represents possible execution interval values for checks.", + "type": "string", + "default": "ADVISOR_CHECK_INTERVAL_UNSPECIFIED", + "enum": [ + "ADVISOR_CHECK_INTERVAL_UNSPECIFIED", + "ADVISOR_CHECK_INTERVAL_STANDARD", + "ADVISOR_CHECK_INTERVAL_FREQUENT", + "ADVISOR_CHECK_INTERVAL_RARE" + ], + "x-order": 4 + }, + "name": { + "description": "Machine-readable name (ID) that is used in expression.", + "type": "string", + "x-order": 0 + }, + "summary": { + "description": "Short human-readable summary.", + "type": "string", + "x-order": 3 + } + } + }, + "x-order": 0 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, "x-order": 2 }, - "service_names": { - "description": "Used for annotate services.", + "message": { + "type": "string", + "x-order": 1 + } + } + } + } + } + } + }, + "/v1/management/Advisors/ListFailedServices": { + "post": { + "description": "Returns a list of services with failed checks and a summary of check results.", + "tags": [ + "AdvisorService" + ], + "summary": "List Failed Services", + "operationId": "ListFailedServices", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "result": { "type": "array", "items": { - "type": "string" + "description": "CheckResultSummary is a summary of check results.", + "type": "object", + "properties": { + "alert_count": { + "description": "Number of failed checks for this service with severity level \"ALERT\".", + "type": "integer", + "format": "int64", + "x-order": 3 + }, + "critical_count": { + "description": "Number of failed checks for this service with severity level \"CRITICAL\".", + "type": "integer", + "format": "int64", + "x-order": 4 + }, + "debug_count": { + "description": "Number of failed checks for this service with severity level \"DEBUG\".", + "type": "integer", + "format": "int64", + "x-order": 9 + }, + "emergency_count": { + "description": "Number of failed checks for this service with severity level \"EMERGENCY\".", + "type": "integer", + "format": "int64", + "x-order": 2 + }, + "error_count": { + "description": "Number of failed checks for this service with severity level \"ERROR\".", + "type": "integer", + "format": "int64", + "x-order": 5 + }, + "info_count": { + "description": "Number of failed checks for this service with severity level \"INFO\".", + "type": "integer", + "format": "int64", + "x-order": 8 + }, + "notice_count": { + "description": "Number of failed checks for this service with severity level \"NOTICE\".", + "type": "integer", + "format": "int64", + "x-order": 7 + }, + "service_id": { + "type": "string", + "x-order": 1 + }, + "service_name": { + "type": "string", + "x-order": 0 + }, + "warning_count": { + "description": "Number of failed checks for this service with severity level \"WARNING\".", + "type": "integer", + "format": "int64", + "x-order": 6 + } + } }, - "x-order": 3 + "x-order": 0 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 }, - "tags": { - "description": "Tags are used to filter annotations.", + "details": { "type": "array", "items": { - "type": "string" + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false }, - "x-order": 1 + "x-order": 2 }, - "text": { - "description": "An annotation description. Required.", + "message": { "type": "string", + "x-order": 1 + } + } + } + } + } + } + }, + "/v1/management/Advisors/StartChecks": { + "post": { + "description": "Executes Advisor checks and returns when all checks are executed. All available checks will be started if check names aren't specified.", + "tags": [ + "AdvisorService" + ], + "summary": "Start Advisor Checks", + "operationId": "StartAdvisorChecks", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "names": { + "description": "Names of the checks that should be started.", + "type": "array", + "items": { + "type": "string" + }, "x-order": 0 } } @@ -1606,27 +2092,116 @@ } } }, - "/v1/management/External/Add": { + "/v1/management/Annotations/Add": { "post": { - "description": "Adds external service and adds external exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds an \"external exporter\" agent to inventory, which is running on provided \"runs_on_node_id\".", + "description": "Adds annotation.", "tags": [ - "ExternalService" + "AnnotationService" ], - "summary": "Add External Service", - "operationId": "AddExternal", + "summary": "Add Annotation", + "operationId": "AddAnnotation", "parameters": [ { + "description": "AddAnnotationRequest is a params to add new annotation.", "name": "body", "in": "body", "required": true, "schema": { + "description": "AddAnnotationRequest is a params to add new annotation.", "type": "object", "properties": { - "add_node": { - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", - "type": "object", - "properties": { - "az": { + "node_name": { + "description": "Used for annotate node.", + "type": "string", + "x-order": 2 + }, + "service_names": { + "description": "Used for annotate services.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 3 + }, + "tags": { + "description": "Tags are used to filter annotations.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 1 + }, + "text": { + "description": "An annotation description. Required.", + "type": "string", + "x-order": 0 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + }, + "message": { + "type": "string", + "x-order": 1 + } + } + } + } + } + } + }, + "/v1/management/External/Add": { + "post": { + "description": "Adds external service and adds external exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds an \"external exporter\" agent to inventory, which is running on provided \"runs_on_node_id\".", + "tags": [ + "ExternalService" + ], + "summary": "Add External Service", + "operationId": "AddExternal", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "add_node": { + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + "type": "object", + "properties": { + "az": { "description": "Node availability zone.", "type": "string", "x-order": 8 @@ -6060,404 +6635,9 @@ }, "table_count": { "description": "Actual table count at the moment of adding.", - "type": "integer", - "format": "int32", - "x-order": 5 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/RDS/Discover": { - "post": { - "description": "Discovers RDS instances.", - "tags": [ - "RDSService" - ], - "summary": "Discover RDS", - "operationId": "DiscoverRDS", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "aws_access_key": { - "description": "AWS Access key. Optional.", - "type": "string", - "x-order": 0 - }, - "aws_secret_key": { - "description": "AWS Secret key. Optional.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "rds_instances": { - "type": "array", - "items": { - "description": "DiscoverRDSInstance models an unique RDS instance for the list of instances returned by Discovery.", - "type": "object", - "properties": { - "address": { - "description": "Address used to connect to it.", - "type": "string", - "x-order": 4 - }, - "az": { - "description": "AWS availability zone.", - "type": "string", - "x-order": 1 - }, - "engine": { - "description": "DiscoverRDSEngine describes supported RDS instance engines.", - "type": "string", - "default": "DISCOVER_RDS_ENGINE_UNSPECIFIED", - "enum": [ - "DISCOVER_RDS_ENGINE_UNSPECIFIED", - "DISCOVER_RDS_ENGINE_MYSQL", - "DISCOVER_RDS_ENGINE_POSTGRESQL" - ], - "x-order": 6 - }, - "engine_version": { - "description": "Engine version.", - "type": "string", - "x-order": 7 - }, - "instance_id": { - "description": "AWS instance ID.", - "type": "string", - "x-order": 2 - }, - "node_model": { - "description": "AWS instance class.", - "type": "string", - "x-order": 3 - }, - "port": { - "description": "Access port.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "region": { - "description": "AWS region.", - "type": "string", - "x-order": 0 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/SecurityChecks/Change": { - "post": { - "description": "Enables/disables Security Thread Tool checks or changes their interval by names.", - "tags": [ - "SecurityChecksService" - ], - "summary": "Change Security Checks", - "operationId": "ChangeSecurityChecks", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "description": "ChangeSecurityCheckParams specifies a single check parameters.", - "type": "object", - "properties": { - "enable": { - "type": "boolean", - "x-nullable": true, - "x-order": 1 - }, - "interval": { - "description": "SecurityCheckInterval represents possible execution interval values for checks.", - "type": "string", - "default": "SECURITY_CHECK_INTERVAL_UNSPECIFIED", - "enum": [ - "SECURITY_CHECK_INTERVAL_UNSPECIFIED", - "SECURITY_CHECK_INTERVAL_STANDARD", - "SECURITY_CHECK_INTERVAL_FREQUENT", - "SECURITY_CHECK_INTERVAL_RARE" - ], - "x-order": 2 - }, - "name": { - "description": "The name of the check to change.", - "type": "string", - "x-order": 0 - } - } - }, - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/SecurityChecks/FailedChecks": { - "post": { - "description": "Returns the latest check results for a given service.", - "tags": [ - "SecurityChecksService" - ], - "summary": "Get Failed Checks", - "operationId": "GetFailedChecks", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "page_params": { - "description": "PageParams represents page request parameters for pagination.", - "type": "object", - "properties": { - "index": { - "description": "Index of the requested page, starts from 0.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "page_size": { - "description": "Maximum number of results per page.", - "type": "integer", - "format": "int32", - "x-order": 0 - } - }, - "x-order": 1 - }, - "service_id": { - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "page_totals": { - "description": "PageTotals represents total values for pagination.", - "type": "object", - "properties": { - "total_items": { - "description": "Total number of results.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "total_pages": { - "description": "Total number of pages.", - "type": "integer", - "format": "int32", - "x-order": 1 - } - }, - "x-order": 1 - }, - "results": { - "type": "array", - "items": { - "description": "CheckResult represents the check results for a given service.", - "type": "object", - "properties": { - "check_name": { - "type": "string", - "title": "Name of the check that failed", - "x-order": 7 - }, - "description": { - "type": "string", - "x-order": 1 - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 3 - }, - "read_more_url": { - "description": "URL containing information on how to resolve an issue detected by an Advisor check.", - "type": "string", - "x-order": 4 - }, - "service_id": { - "description": "ID of the monitored service on which the check ran.", - "type": "string", - "x-order": 6 - }, - "service_name": { - "description": "Name of the monitored service on which the check ran.", - "type": "string", - "x-order": 5 - }, - "severity": { - "description": "Severity represents severity level of the check result or alert.", - "type": "string", - "default": "SEVERITY_UNSPECIFIED", - "enum": [ - "SEVERITY_UNSPECIFIED", - "SEVERITY_EMERGENCY", - "SEVERITY_ALERT", - "SEVERITY_CRITICAL", - "SEVERITY_ERROR", - "SEVERITY_WARNING", - "SEVERITY_NOTICE", - "SEVERITY_INFO", - "SEVERITY_DEBUG" - ], - "x-order": 2 - }, - "silenced": { - "type": "boolean", - "title": "Silence status of the check result", - "x-order": 8 - }, - "summary": { - "type": "string", - "x-order": 0 - } - } - }, - "x-order": 0 + "type": "integer", + "format": "int32", + "x-order": 5 } } } @@ -6496,137 +6676,35 @@ } } }, - "/v1/management/SecurityChecks/List": { + "/v1/management/RDS/Discover": { "post": { - "description": "Returns a list of checks available to the user.", + "description": "Discovers RDS instances.", "tags": [ - "SecurityChecksService" + "RDSService" ], - "summary": "List advisor checks", - "operationId": "ListSecurityChecks", + "summary": "Discover RDS", + "operationId": "DiscoverRDS", "parameters": [ { "name": "body", "in": "body", "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "checks": { - "type": "array", - "items": { - "description": "SecurityCheck contains check name and status.", - "type": "object", - "properties": { - "description": { - "description": "Long human-readable description.", - "type": "string", - "x-order": 2 - }, - "enabled": { - "description": "True if that check is enabled.", - "type": "boolean", - "x-order": 1 - }, - "family": { - "type": "string", - "default": "ADVISOR_CHECK_FAMILY_UNSPECIFIED", - "enum": [ - "ADVISOR_CHECK_FAMILY_UNSPECIFIED", - "ADVISOR_CHECK_FAMILY_MYSQL", - "ADVISOR_CHECK_FAMILY_POSTGRESQL", - "ADVISOR_CHECK_FAMILY_MONGODB" - ], - "x-order": 5 - }, - "interval": { - "description": "SecurityCheckInterval represents possible execution interval values for checks.", - "type": "string", - "default": "SECURITY_CHECK_INTERVAL_UNSPECIFIED", - "enum": [ - "SECURITY_CHECK_INTERVAL_UNSPECIFIED", - "SECURITY_CHECK_INTERVAL_STANDARD", - "SECURITY_CHECK_INTERVAL_FREQUENT", - "SECURITY_CHECK_INTERVAL_RARE" - ], - "x-order": 4 - }, - "name": { - "description": "Machine-readable name (ID) that is used in expression.", - "type": "string", - "x-order": 0 - }, - "summary": { - "description": "Short human-readable summary.", - "type": "string", - "x-order": 3 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", "schema": { "type": "object", "properties": { - "code": { - "type": "integer", - "format": "int32", + "aws_access_key": { + "description": "AWS Access key. Optional.", + "type": "string", "x-order": 0 }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { + "aws_secret_key": { + "description": "AWS Secret key. Optional.", "type": "string", "x-order": 1 } } } } - } - } - }, - "/v1/management/SecurityChecks/ListFailedServices": { - "post": { - "description": "Returns a list of services with failed checks and a summary of check results.", - "tags": [ - "SecurityChecksService" - ], - "summary": "List Failed Services", - "operationId": "ListFailedServices", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } ], "responses": { "200": { @@ -6634,143 +6712,65 @@ "schema": { "type": "object", "properties": { - "result": { + "rds_instances": { "type": "array", "items": { - "description": "CheckResultSummary is a summary of check results.", + "description": "DiscoverRDSInstance models an unique RDS instance for the list of instances returned by Discovery.", "type": "object", "properties": { - "alert_count": { - "description": "Number of failed checks for this service with severity level \"ALERT\".", - "type": "integer", - "format": "int64", - "x-order": 3 - }, - "critical_count": { - "description": "Number of failed checks for this service with severity level \"CRITICAL\".", - "type": "integer", - "format": "int64", + "address": { + "description": "Address used to connect to it.", + "type": "string", "x-order": 4 }, - "debug_count": { - "description": "Number of failed checks for this service with severity level \"DEBUG\".", - "type": "integer", - "format": "int64", - "x-order": 9 - }, - "emergency_count": { - "description": "Number of failed checks for this service with severity level \"EMERGENCY\".", - "type": "integer", - "format": "int64", - "x-order": 2 - }, - "error_count": { - "description": "Number of failed checks for this service with severity level \"ERROR\".", - "type": "integer", - "format": "int64", - "x-order": 5 + "az": { + "description": "AWS availability zone.", + "type": "string", + "x-order": 1 }, - "info_count": { - "description": "Number of failed checks for this service with severity level \"INFO\".", - "type": "integer", - "format": "int64", - "x-order": 8 + "engine": { + "description": "DiscoverRDSEngine describes supported RDS instance engines.", + "type": "string", + "default": "DISCOVER_RDS_ENGINE_UNSPECIFIED", + "enum": [ + "DISCOVER_RDS_ENGINE_UNSPECIFIED", + "DISCOVER_RDS_ENGINE_MYSQL", + "DISCOVER_RDS_ENGINE_POSTGRESQL" + ], + "x-order": 6 }, - "notice_count": { - "description": "Number of failed checks for this service with severity level \"NOTICE\".", - "type": "integer", - "format": "int64", + "engine_version": { + "description": "Engine version.", + "type": "string", "x-order": 7 }, - "service_id": { + "instance_id": { + "description": "AWS instance ID.", "type": "string", - "x-order": 1 + "x-order": 2 }, - "service_name": { + "node_model": { + "description": "AWS instance class.", "type": "string", - "x-order": 0 + "x-order": 3 }, - "warning_count": { - "description": "Number of failed checks for this service with severity level \"WARNING\".", + "port": { + "description": "Access port.", "type": "integer", "format": "int64", - "x-order": 6 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { + "x-order": 5 + }, + "region": { + "description": "AWS region.", "type": "string", "x-order": 0 } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/SecurityChecks/Start": { - "post": { - "description": "Executes Security Thread Tool checks and returns when all checks are executed. All available checks will be started if check names aren't specified.", - "tags": [ - "SecurityChecksService" - ], - "summary": "Start Security Checks", - "operationId": "StartSecurityChecks", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "names": { - "description": "Names of the checks that should be started.", - "type": "array", - "items": { - "type": "string" + } }, "x-order": 0 } } } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } }, "default": { "description": "An unexpected error response.", @@ -6901,7 +6901,7 @@ "name": "AnnotationService" }, { - "name": "SecurityChecksService" + "name": "AdvisorService" }, { "name": "ExternalService" diff --git a/api/swagger/swagger-dev.json b/api/swagger/swagger-dev.json index 4691cf0a8c..35994d5b6a 100644 --- a/api/swagger/swagger-dev.json +++ b/api/swagger/swagger-dev.json @@ -16399,11 +16399,276 @@ } } }, + "/v1/management/Advisors/Change": { + "post": { + "description": "Enables/disables Advisor checks or changes their interval by names.", + "tags": [ + "AdvisorService" + ], + "summary": "Change Advisor Checks", + "operationId": "ChangeAdvisorChecks", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "params": { + "type": "array", + "items": { + "description": "ChangeAdvisorCheckParams specifies a single check parameters.", + "type": "object", + "properties": { + "name": { + "description": "The name of the check to change.", + "type": "string", + "x-order": 0 + }, + "enable": { + "type": "boolean", + "x-nullable": true, + "x-order": 1 + }, + "interval": { + "description": "AdvisorCheckInterval represents possible execution interval values for checks.", + "type": "string", + "default": "ADVISOR_CHECK_INTERVAL_UNSPECIFIED", + "enum": [ + "ADVISOR_CHECK_INTERVAL_UNSPECIFIED", + "ADVISOR_CHECK_INTERVAL_STANDARD", + "ADVISOR_CHECK_INTERVAL_FREQUENT", + "ADVISOR_CHECK_INTERVAL_RARE" + ], + "x-order": 2 + } + } + }, + "x-order": 0 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + } + } + } + } + } + } + }, + "/v1/management/Advisors/FailedChecks": { + "post": { + "description": "Returns the latest check results for a given service.", + "tags": [ + "AdvisorService" + ], + "summary": "Get Failed Checks", + "operationId": "GetFailedChecks", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "x-order": 0 + }, + "page_params": { + "description": "PageParams represents page request parameters for pagination.", + "type": "object", + "properties": { + "page_size": { + "description": "Maximum number of results per page.", + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "index": { + "description": "Index of the requested page, starts from 0.", + "type": "integer", + "format": "int32", + "x-order": 1 + } + }, + "x-order": 1 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "description": "CheckResult represents the check results for a given service.", + "type": "object", + "properties": { + "summary": { + "type": "string", + "x-order": 0 + }, + "description": { + "type": "string", + "x-order": 1 + }, + "severity": { + "description": "Severity represents severity level of the check result or alert.", + "type": "string", + "default": "SEVERITY_UNSPECIFIED", + "enum": [ + "SEVERITY_UNSPECIFIED", + "SEVERITY_EMERGENCY", + "SEVERITY_ALERT", + "SEVERITY_CRITICAL", + "SEVERITY_ERROR", + "SEVERITY_WARNING", + "SEVERITY_NOTICE", + "SEVERITY_INFO", + "SEVERITY_DEBUG" + ], + "x-order": 2 + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 3 + }, + "read_more_url": { + "description": "URL containing information on how to resolve an issue detected by an Advisor check.", + "type": "string", + "x-order": 4 + }, + "service_name": { + "description": "Name of the monitored service on which the check ran.", + "type": "string", + "x-order": 5 + }, + "service_id": { + "description": "ID of the monitored service on which the check ran.", + "type": "string", + "x-order": 6 + }, + "check_name": { + "type": "string", + "title": "Name of the check that failed", + "x-order": 7 + }, + "silenced": { + "type": "boolean", + "title": "Silence status of the check result", + "x-order": 8 + } + } + }, + "x-order": 0 + }, + "page_totals": { + "description": "PageTotals represents total values for pagination.", + "type": "object", + "properties": { + "total_items": { + "description": "Total number of results.", + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "total_pages": { + "description": "Total number of pages.", + "type": "integer", + "format": "int32", + "x-order": 1 + } + }, + "x-order": 1 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + } + } + } + } + } + } + }, "/v1/management/Advisors/List": { "post": { "description": "Returns a list of advisors available to the user.", "tags": [ - "SecurityChecksService" + "AdvisorService" ], "summary": "List advisors", "operationId": "ListAdvisors", @@ -16457,7 +16722,7 @@ "description": "Advisor checks.", "type": "array", "items": { - "description": "SecurityCheck contains check name and status.", + "description": "AdvisorCheck contains check name and status.", "type": "object", "properties": { "name": { @@ -16481,14 +16746,14 @@ "x-order": 3 }, "interval": { - "description": "SecurityCheckInterval represents possible execution interval values for checks.", + "description": "AdvisorCheckInterval represents possible execution interval values for checks.", "type": "string", - "default": "SECURITY_CHECK_INTERVAL_UNSPECIFIED", + "default": "ADVISOR_CHECK_INTERVAL_UNSPECIFIED", "enum": [ - "SECURITY_CHECK_INTERVAL_UNSPECIFIED", - "SECURITY_CHECK_INTERVAL_STANDARD", - "SECURITY_CHECK_INTERVAL_FREQUENT", - "SECURITY_CHECK_INTERVAL_RARE" + "ADVISOR_CHECK_INTERVAL_UNSPECIFIED", + "ADVISOR_CHECK_INTERVAL_STANDARD", + "ADVISOR_CHECK_INTERVAL_FREQUENT", + "ADVISOR_CHECK_INTERVAL_RARE" ], "x-order": 4 }, @@ -16548,37 +16813,137 @@ } } }, - "/v1/management/Agent/List": { + "/v1/management/Advisors/ListChecks": { "post": { - "description": "Returns a filtered list of Agents.", + "description": "Returns a list of checks available to the user.", "tags": [ - "AgentService" + "AdvisorService" ], - "summary": "List Agents", - "operationId": "ListAgentsMixin9", + "summary": "List advisor checks", + "operationId": "ListAdvisorChecks", "parameters": [ { - "description": "Only one of the parameters below must be set.", "name": "body", "in": "body", "required": true, "schema": { - "description": "Only one of the parameters below must be set.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { "type": "object", "properties": { - "service_id": { - "description": "Return only Agents that relate to a specific ServiceID.", - "type": "string", + "checks": { + "type": "array", + "items": { + "description": "AdvisorCheck contains check name and status.", + "type": "object", + "properties": { + "name": { + "description": "Machine-readable name (ID) that is used in expression.", + "type": "string", + "x-order": 0 + }, + "enabled": { + "description": "True if that check is enabled.", + "type": "boolean", + "x-order": 1 + }, + "description": { + "description": "Long human-readable description.", + "type": "string", + "x-order": 2 + }, + "summary": { + "description": "Short human-readable summary.", + "type": "string", + "x-order": 3 + }, + "interval": { + "description": "AdvisorCheckInterval represents possible execution interval values for checks.", + "type": "string", + "default": "ADVISOR_CHECK_INTERVAL_UNSPECIFIED", + "enum": [ + "ADVISOR_CHECK_INTERVAL_UNSPECIFIED", + "ADVISOR_CHECK_INTERVAL_STANDARD", + "ADVISOR_CHECK_INTERVAL_FREQUENT", + "ADVISOR_CHECK_INTERVAL_RARE" + ], + "x-order": 4 + }, + "family": { + "type": "string", + "default": "ADVISOR_CHECK_FAMILY_UNSPECIFIED", + "enum": [ + "ADVISOR_CHECK_FAMILY_UNSPECIFIED", + "ADVISOR_CHECK_FAMILY_MYSQL", + "ADVISOR_CHECK_FAMILY_POSTGRESQL", + "ADVISOR_CHECK_FAMILY_MONGODB" + ], + "x-order": 5 + } + } + }, + "x-order": 0 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", "x-order": 0 }, - "node_id": { - "description": "Return only Agents that relate to a specific NodeID.", + "message": { "type": "string", "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 } } } } + } + } + }, + "/v1/management/Advisors/ListFailedServices": { + "post": { + "description": "Returns a list of services with failed checks and a summary of check results.", + "tags": [ + "AdvisorService" + ], + "summary": "List Failed Services", + "operationId": "ListFailedServices", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object" + } + } ], "responses": { "200": { @@ -16586,308 +16951,67 @@ "schema": { "type": "object", "properties": { - "agents": { - "description": "List of Agents.", + "result": { "type": "array", "items": { + "description": "CheckResultSummary is a summary of check results.", "type": "object", "properties": { - "agent_id": { - "description": "Unique agent identifier.", + "service_name": { "type": "string", "x-order": 0 }, - "is_agent_password_set": { - "description": "True if the agent password is set.", - "type": "boolean", + "service_id": { + "type": "string", "x-order": 1 }, - "agent_type": { - "description": "Agent type.", - "type": "string", + "emergency_count": { + "description": "Number of failed checks for this service with severity level \"EMERGENCY\".", + "type": "integer", + "format": "int64", "x-order": 2 }, - "aws_access_key": { - "description": "AWS Access Key.", - "type": "string", + "alert_count": { + "description": "Number of failed checks for this service with severity level \"ALERT\".", + "type": "integer", + "format": "int64", "x-order": 3 }, - "is_aws_secret_key_set": { - "description": "True if AWS Secret Key is set.", - "type": "boolean", + "critical_count": { + "description": "Number of failed checks for this service with severity level \"CRITICAL\".", + "type": "integer", + "format": "int64", "x-order": 4 }, - "azure_options": { - "type": "object", - "properties": { - "client_id": { - "description": "Azure client ID.", - "type": "string", - "x-order": 0 - }, - "is_client_secret_set": { - "description": "True if Azure client secret is set.", - "type": "boolean", - "x-order": 1 - }, - "resource_group": { - "description": "Azure resource group.", - "type": "string", - "x-order": 2 - }, - "subscription_id": { - "description": "Azure subscription ID.", - "type": "string", - "x-order": 3 - }, - "tenant_id": { - "description": "Azure tenant ID.", - "type": "string", - "x-order": 4 - } - }, + "error_count": { + "description": "Number of failed checks for this service with severity level \"ERROR\".", + "type": "integer", + "format": "int64", "x-order": 5 }, - "created_at": { - "description": "Creation timestamp.", - "type": "string", - "format": "date-time", + "warning_count": { + "description": "Number of failed checks for this service with severity level \"WARNING\".", + "type": "integer", + "format": "int64", "x-order": 6 }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, + "notice_count": { + "description": "Number of failed checks for this service with severity level \"NOTICE\".", + "type": "integer", + "format": "int64", "x-order": 7 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 8 - }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 9 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", + "info_count": { + "description": "Number of failed checks for this service with severity level \"INFO\".", "type": "integer", "format": "int64", - "x-order": 10 - }, - "log_level": { - "description": "Log level for exporter.", - "type": "string", - "x-order": 11 + "x-order": 8 }, - "max_query_length": { - "description": "Limit query length in QAN.", + "debug_count": { + "description": "Number of failed checks for this service with severity level \"DEBUG\".", "type": "integer", - "format": "int32", - "x-order": 12 - }, - "max_query_log_size": { - "description": "Limit query log size in QAN.", - "type": "string", "format": "int64", - "x-order": 13 - }, - "metrics_path": { - "description": "Path under which metrics are exposed, used to generate URI.", - "type": "string", - "x-order": 14 - }, - "metrics_scheme": { - "description": "Scheme to generate URI to exporter metrics endpoints.", - "type": "string", - "x-order": 15 - }, - "mongo_db_options": { - "type": "object", - "properties": { - "is_tls_certificate_key_set": { - "description": "True if TLS certificate is set.", - "type": "boolean", - "x-order": 0 - }, - "is_tls_certificate_key_file_password_set": { - "description": "True if TLS certificate file password is set.", - "type": "boolean", - "x-order": 1 - }, - "authentication_mechanism": { - "description": "MongoDB auth mechanism.", - "type": "string", - "x-order": 2 - }, - "authentication_database": { - "description": "MongoDB auth database.", - "type": "string", - "x-order": 3 - }, - "stats_collections": { - "description": "MongoDB stats collections.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 4 - }, - "collections_limit": { - "description": "MongoDB collections limit.", - "type": "integer", - "format": "int32", - "x-order": 5 - }, - "enable_all_collectors": { - "description": "True if all collectors are enabled.", - "type": "boolean", - "x-order": 6 - } - }, - "x-order": 16 - }, - "mysql_options": { - "type": "object", - "properties": { - "is_tls_key_set": { - "description": "True if TLS key is set.", - "type": "boolean", - "x-order": 0 - } - }, - "x-order": 17 - }, - "node_id": { - "description": "A unique node identifier.", - "type": "string", - "x-order": 18 - }, - "is_password_set": { - "description": "True if password for connecting the agent to the database is set.", - "type": "boolean", - "x-order": 19 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier.", - "type": "string", - "x-order": 20 - }, - "postgresql_options": { - "type": "object", - "properties": { - "is_ssl_key_set": { - "description": "True if TLS key is set.", - "type": "boolean", - "x-order": 0 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 1 - } - }, - "x-order": 21 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 22 - }, - "push_metrics": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 23 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 24 - }, - "comments_parsing_disabled": { - "description": "True if query comments parsing is disabled.", - "type": "boolean", - "x-order": 25 - }, - "rds_basic_metrics_disabled": { - "description": "True if RDS basic metrics are disdabled.", - "type": "boolean", - "x-order": 26 - }, - "rds_enhanced_metrics_disabled": { - "description": "True if RDS enhanced metrics are disdabled.", - "type": "boolean", - "x-order": 27 - }, - "runs_on_node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 28 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 29 - }, - "status": { - "description": "Actual Agent status.", - "type": "string", - "x-order": 30 - }, - "table_count": { - "description": "Last known table count.", - "type": "integer", - "format": "int32", - "x-order": 31 - }, - "table_count_tablestats_group_limit": { - "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled.", - "type": "integer", - "format": "int32", - "x-order": 32 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 33 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 34 - }, - "username": { - "description": "HTTP basic auth username for collecting metrics.", - "type": "string", - "x-order": 35 - }, - "updated_at": { - "description": "Last update timestamp.", - "type": "string", - "format": "date-time", - "x-order": 36 - }, - "version": { - "description": "Agent version.", - "type": "string", - "x-order": 37 - }, - "is_connected": { - "description": "True if Agent is running and connected to pmm-managed.", - "type": "boolean", - "x-order": 38 - }, - "expose_exporter": { - "description": "True if an exporter agent is exposed on all host addresses.", - "type": "boolean", - "x-order": 39 + "x-order": 9 } } }, @@ -16930,49 +17054,29 @@ } } }, - "/v1/management/Annotations/Add": { + "/v1/management/Advisors/StartChecks": { "post": { - "description": "Adds annotation.", + "description": "Executes Advisor checks and returns when all checks are executed. All available checks will be started if check names aren't specified.", "tags": [ - "AnnotationService" + "AdvisorService" ], - "summary": "Add Annotation", - "operationId": "AddAnnotation", + "summary": "Start Advisor Checks", + "operationId": "StartAdvisorChecks", "parameters": [ { - "description": "AddAnnotationRequest is a params to add new annotation.", "name": "body", "in": "body", "required": true, "schema": { - "description": "AddAnnotationRequest is a params to add new annotation.", "type": "object", "properties": { - "text": { - "description": "An annotation description. Required.", - "type": "string", - "x-order": 0 - }, - "tags": { - "description": "Tags are used to filter annotations.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 1 - }, - "node_name": { - "description": "Used for annotate node.", - "type": "string", - "x-order": 2 - }, - "service_names": { - "description": "Used for annotate services.", + "names": { + "description": "Names of the checks that should be started.", "type": "array", "items": { "type": "string" }, - "x-order": 3 + "x-order": 0 } } } @@ -17019,185 +17123,33 @@ } } }, - "/v1/management/External/Add": { + "/v1/management/Agent/List": { "post": { - "description": "Adds external service and adds external exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds an \"external exporter\" agent to inventory, which is running on provided \"runs_on_node_id\".", + "description": "Returns a filtered list of Agents.", "tags": [ - "ExternalService" + "AgentService" ], - "summary": "Add External Service", - "operationId": "AddExternal", + "summary": "List Agents", + "operationId": "ListAgentsMixin9", "parameters": [ { + "description": "Only one of the parameters below must be set.", "name": "body", "in": "body", "required": true, "schema": { + "description": "Only one of the parameters below must be set.", "type": "object", "properties": { - "runs_on_node_id": { - "description": "Node identifier on which an external exporter is been running.\nruns_on_node_id always should be passed with node_id.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "service_id": { + "description": "Return only Agents that relate to a specific ServiceID.", "type": "string", "x-order": 0 }, - "node_name": { - "description": "Node name on which a service and node is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "node_id": { + "description": "Return only Agents that relate to a specific NodeID.", "type": "string", "x-order": 1 - }, - "add_node": { - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", - "type": "object", - "properties": { - "node_type": { - "description": "NodeType describes supported Node types.", - "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "enum": [ - "NODE_TYPE_UNSPECIFIED", - "NODE_TYPE_GENERIC_NODE", - "NODE_TYPE_CONTAINER_NODE", - "NODE_TYPE_REMOTE_NODE", - "NODE_TYPE_REMOTE_RDS_NODE", - "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" - ], - "x-order": 0 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "machine_id": { - "description": "Linux machine-id.", - "type": "string", - "x-order": 2 - }, - "distro": { - "description": "Linux distribution name and version.", - "type": "string", - "x-order": 3 - }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", - "type": "string", - "x-order": 4 - }, - "container_name": { - "description": "Container name.", - "type": "string", - "x-order": 5 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 6 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 7 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Node.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - } - }, - "x-order": 2 - }, - "address": { - "description": "Node and Exporter access address (DNS name or IP).\naddress always should be passed with add_node.", - "type": "string", - "x-order": 3 - }, - "service_name": { - "description": "Unique across all Services user-defined name. Required.", - "type": "string", - "x-order": 4 - }, - "username": { - "description": "HTTP basic auth username for collecting metrics.", - "type": "string", - "x-order": 5 - }, - "password": { - "description": "HTTP basic auth password for collecting metrics.", - "type": "string", - "x-order": 6 - }, - "scheme": { - "description": "Scheme to generate URI to exporter metrics endpoints.", - "type": "string", - "x-order": 7 - }, - "metrics_path": { - "description": "Path under which metrics are exposed, used to generate URI.", - "type": "string", - "x-order": 8 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 9 - }, - "node_id": { - "description": "Node identifier on which an external service is been running.\nnode_id always should be passed with runs_on_node_id.", - "type": "string", - "x-order": 10 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 11 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 12 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 13 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Service.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 14 - }, - "group": { - "description": "Group name of external service.", - "type": "string", - "x-order": 15 - }, - "metrics_mode": { - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", - "type": "string", - "default": "METRICS_MODE_UNSPECIFIED", - "enum": [ - "METRICS_MODE_UNSPECIFIED", - "METRICS_MODE_PULL", - "METRICS_MODE_PUSH" - ], - "x-order": 16 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 17 } } } @@ -17209,153 +17161,776 @@ "schema": { "type": "object", "properties": { - "service": { - "description": "ExternalService represents a generic External service instance.", - "type": "object", - "properties": { - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", - "x-order": 1 - }, - "node_id": { - "description": "Node identifier where this service instance runs.", - "type": "string", - "x-order": 2 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 3 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 4 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 6 - }, - "group": { - "description": "Group name of external service.", - "type": "string", - "x-order": 7 - } - }, - "x-order": 0 - }, - "external_exporter": { - "description": "ExternalExporter runs on any Node type, including Remote Node.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "runs_on_node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "If disabled, metrics from this exporter will not be collected.", - "type": "boolean", - "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "username": { - "description": "HTTP basic auth username for collecting metrics.", - "type": "string", - "x-order": 4 - }, - "scheme": { - "description": "Scheme to generate URI to exporter metrics endpoints.", - "type": "string", - "x-order": 5 - }, - "metrics_path": { - "description": "Path under which metrics are exposed, used to generate URI.", - "type": "string", - "x-order": 6 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 7 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 8 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 9 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 10 - } - }, - "x-order": 1 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { + "agents": { + "description": "List of Agents.", "type": "array", "items": { "type": "object", "properties": { - "@type": { + "agent_id": { + "description": "Unique agent identifier.", "type": "string", "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } + }, + "is_agent_password_set": { + "description": "True if the agent password is set.", + "type": "boolean", + "x-order": 1 + }, + "agent_type": { + "description": "Agent type.", + "type": "string", + "x-order": 2 + }, + "aws_access_key": { + "description": "AWS Access Key.", + "type": "string", + "x-order": 3 + }, + "is_aws_secret_key_set": { + "description": "True if AWS Secret Key is set.", + "type": "boolean", + "x-order": 4 + }, + "azure_options": { + "type": "object", + "properties": { + "client_id": { + "description": "Azure client ID.", + "type": "string", + "x-order": 0 + }, + "is_client_secret_set": { + "description": "True if Azure client secret is set.", + "type": "boolean", + "x-order": 1 + }, + "resource_group": { + "description": "Azure resource group.", + "type": "string", + "x-order": 2 + }, + "subscription_id": { + "description": "Azure subscription ID.", + "type": "string", + "x-order": 3 + }, + "tenant_id": { + "description": "Azure tenant ID.", + "type": "string", + "x-order": 4 + } + }, + "x-order": 5 + }, + "created_at": { + "description": "Creation timestamp.", + "type": "string", + "format": "date-time", + "x-order": 6 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 7 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 8 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 9 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 10 + }, + "log_level": { + "description": "Log level for exporter.", + "type": "string", + "x-order": 11 + }, + "max_query_length": { + "description": "Limit query length in QAN.", + "type": "integer", + "format": "int32", + "x-order": 12 + }, + "max_query_log_size": { + "description": "Limit query log size in QAN.", + "type": "string", + "format": "int64", + "x-order": 13 + }, + "metrics_path": { + "description": "Path under which metrics are exposed, used to generate URI.", + "type": "string", + "x-order": 14 + }, + "metrics_scheme": { + "description": "Scheme to generate URI to exporter metrics endpoints.", + "type": "string", + "x-order": 15 + }, + "mongo_db_options": { + "type": "object", + "properties": { + "is_tls_certificate_key_set": { + "description": "True if TLS certificate is set.", + "type": "boolean", + "x-order": 0 + }, + "is_tls_certificate_key_file_password_set": { + "description": "True if TLS certificate file password is set.", + "type": "boolean", + "x-order": 1 + }, + "authentication_mechanism": { + "description": "MongoDB auth mechanism.", + "type": "string", + "x-order": 2 + }, + "authentication_database": { + "description": "MongoDB auth database.", + "type": "string", + "x-order": 3 + }, + "stats_collections": { + "description": "MongoDB stats collections.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 4 + }, + "collections_limit": { + "description": "MongoDB collections limit.", + "type": "integer", + "format": "int32", + "x-order": 5 + }, + "enable_all_collectors": { + "description": "True if all collectors are enabled.", + "type": "boolean", + "x-order": 6 + } + }, + "x-order": 16 + }, + "mysql_options": { + "type": "object", + "properties": { + "is_tls_key_set": { + "description": "True if TLS key is set.", + "type": "boolean", + "x-order": 0 + } + }, + "x-order": 17 + }, + "node_id": { + "description": "A unique node identifier.", + "type": "string", + "x-order": 18 + }, + "is_password_set": { + "description": "True if password for connecting the agent to the database is set.", + "type": "boolean", + "x-order": 19 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier.", + "type": "string", + "x-order": 20 + }, + "postgresql_options": { + "type": "object", + "properties": { + "is_ssl_key_set": { + "description": "True if TLS key is set.", + "type": "boolean", + "x-order": 0 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 1 + } + }, + "x-order": 21 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 22 + }, + "push_metrics": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 23 + }, + "query_examples_disabled": { + "description": "True if query examples are disabled.", + "type": "boolean", + "x-order": 24 + }, + "comments_parsing_disabled": { + "description": "True if query comments parsing is disabled.", + "type": "boolean", + "x-order": 25 + }, + "rds_basic_metrics_disabled": { + "description": "True if RDS basic metrics are disdabled.", + "type": "boolean", + "x-order": 26 + }, + "rds_enhanced_metrics_disabled": { + "description": "True if RDS enhanced metrics are disdabled.", + "type": "boolean", + "x-order": 27 + }, + "runs_on_node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 28 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 29 + }, + "status": { + "description": "Actual Agent status.", + "type": "string", + "x-order": 30 + }, + "table_count": { + "description": "Last known table count.", + "type": "integer", + "format": "int32", + "x-order": 31 + }, + "table_count_tablestats_group_limit": { + "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled.", + "type": "integer", + "format": "int32", + "x-order": 32 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 33 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 34 + }, + "username": { + "description": "HTTP basic auth username for collecting metrics.", + "type": "string", + "x-order": 35 + }, + "updated_at": { + "description": "Last update timestamp.", + "type": "string", + "format": "date-time", + "x-order": 36 + }, + "version": { + "description": "Agent version.", + "type": "string", + "x-order": 37 + }, + "is_connected": { + "description": "True if Agent is running and connected to pmm-managed.", + "type": "boolean", + "x-order": 38 + }, + "expose_exporter": { + "description": "True if an exporter agent is exposed on all host addresses.", + "type": "boolean", + "x-order": 39 + } + } + }, + "x-order": 0 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + } + } + } + } + } + } + }, + "/v1/management/Annotations/Add": { + "post": { + "description": "Adds annotation.", + "tags": [ + "AnnotationService" + ], + "summary": "Add Annotation", + "operationId": "AddAnnotation", + "parameters": [ + { + "description": "AddAnnotationRequest is a params to add new annotation.", + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "AddAnnotationRequest is a params to add new annotation.", + "type": "object", + "properties": { + "text": { + "description": "An annotation description. Required.", + "type": "string", + "x-order": 0 + }, + "tags": { + "description": "Tags are used to filter annotations.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 1 + }, + "node_name": { + "description": "Used for annotate node.", + "type": "string", + "x-order": 2 + }, + "service_names": { + "description": "Used for annotate services.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 3 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + } + } + } + } + } + } + }, + "/v1/management/External/Add": { + "post": { + "description": "Adds external service and adds external exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds an \"external exporter\" agent to inventory, which is running on provided \"runs_on_node_id\".", + "tags": [ + "ExternalService" + ], + "summary": "Add External Service", + "operationId": "AddExternal", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "runs_on_node_id": { + "description": "Node identifier on which an external exporter is been running.\nruns_on_node_id always should be passed with node_id.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "type": "string", + "x-order": 0 + }, + "node_name": { + "description": "Node name on which a service and node is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "type": "string", + "x-order": 1 + }, + "add_node": { + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + "type": "object", + "properties": { + "node_type": { + "description": "NodeType describes supported Node types.", + "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "enum": [ + "NODE_TYPE_UNSPECIFIED", + "NODE_TYPE_GENERIC_NODE", + "NODE_TYPE_CONTAINER_NODE", + "NODE_TYPE_REMOTE_NODE", + "NODE_TYPE_REMOTE_RDS_NODE", + "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" + ], + "x-order": 0 + }, + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 + }, + "machine_id": { + "description": "Linux machine-id.", + "type": "string", + "x-order": 2 + }, + "distro": { + "description": "Linux distribution name and version.", + "type": "string", + "x-order": 3 + }, + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "type": "string", + "x-order": 4 + }, + "container_name": { + "description": "Container name.", + "type": "string", + "x-order": 5 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 6 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 7 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels for Node.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + } + }, + "x-order": 2 + }, + "address": { + "description": "Node and Exporter access address (DNS name or IP).\naddress always should be passed with add_node.", + "type": "string", + "x-order": 3 + }, + "service_name": { + "description": "Unique across all Services user-defined name. Required.", + "type": "string", + "x-order": 4 + }, + "username": { + "description": "HTTP basic auth username for collecting metrics.", + "type": "string", + "x-order": 5 + }, + "password": { + "description": "HTTP basic auth password for collecting metrics.", + "type": "string", + "x-order": 6 + }, + "scheme": { + "description": "Scheme to generate URI to exporter metrics endpoints.", + "type": "string", + "x-order": 7 + }, + "metrics_path": { + "description": "Path under which metrics are exposed, used to generate URI.", + "type": "string", + "x-order": 8 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 9 + }, + "node_id": { + "description": "Node identifier on which an external service is been running.\nnode_id always should be passed with runs_on_node_id.", + "type": "string", + "x-order": 10 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 11 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 12 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 13 + }, + "custom_labels": { + "description": "Custom user-assigned labels for Service.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 14 + }, + "group": { + "description": "Group name of external service.", + "type": "string", + "x-order": 15 + }, + "metrics_mode": { + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", + "type": "string", + "default": "METRICS_MODE_UNSPECIFIED", + "enum": [ + "METRICS_MODE_UNSPECIFIED", + "METRICS_MODE_PULL", + "METRICS_MODE_PUSH" + ], + "x-order": 16 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 17 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "service": { + "description": "ExternalService represents a generic External service instance.", + "type": "object", + "properties": { + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + }, + "node_id": { + "description": "Node identifier where this service instance runs.", + "type": "string", + "x-order": 2 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 3 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 4 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 5 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 6 + }, + "group": { + "description": "Group name of external service.", + "type": "string", + "x-order": 7 + } + }, + "x-order": 0 + }, + "external_exporter": { + "description": "ExternalExporter runs on any Node type, including Remote Node.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "runs_on_node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "If disabled, metrics from this exporter will not be collected.", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "HTTP basic auth username for collecting metrics.", + "type": "string", + "x-order": 4 + }, + "scheme": { + "description": "Scheme to generate URI to exporter metrics endpoints.", + "type": "string", + "x-order": 5 + }, + "metrics_path": { + "description": "Path under which metrics are exposed, used to generate URI.", + "type": "string", + "x-order": 6 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 7 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 8 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 9 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + } + }, + "x-order": 1 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + } } } } @@ -21169,268 +21744,29 @@ "x-order": 0 }, "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "address": { - "description": "DB instance identifier.", - "type": "string", - "x-order": 2 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 3 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 4 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 6 - } - }, - "x-order": 0 - }, - "rds_exporter": { - "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "node_id": { - "description": "Node identifier.", - "type": "string", - "x-order": 3 - }, - "aws_access_key": { - "description": "AWS Access Key.", - "type": "string", - "x-order": 4 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 5 - }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 6 - }, - "listen_port": { - "description": "Listen port for scraping metrics (the same for several configurations).", - "type": "integer", - "format": "int64", - "x-order": 7 - }, - "basic_metrics_disabled": { - "description": "Basic metrics are disabled.", - "type": "boolean", - "x-order": 8 - }, - "enhanced_metrics_disabled": { - "description": "Enhanced metrics are disabled.", - "type": "boolean", - "x-order": 9 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 10 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 11 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 12 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 13 - } - }, - "x-order": 1 - }, - "mysql": { - "description": "MySQLService represents a generic MySQL instance.", - "type": "object", - "properties": { - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", - "x-order": 1 - }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 2 - }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 3 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 4 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 5 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 7 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - }, - "version": { - "description": "MySQL version.", - "type": "string", - "x-order": 10 - } - }, - "x-order": 2 - }, - "mysqld_exporter": { - "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "description": "Unique across all Nodes user-defined name.", "type": "string", "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", + "address": { + "description": "DB instance identifier.", + "type": "string", "x-order": 2 }, - "service_id": { - "description": "Service identifier.", + "node_model": { + "description": "Node model.", "type": "string", "x-order": 3 }, - "username": { - "description": "MySQL username for scraping metrics.", + "region": { + "description": "Node region.", "type": "string", "x-order": 4 }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 - }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", - "x-order": 7 - }, - "tls_cert": { - "description": "Client certificate.", - "type": "string", - "x-order": 8 - }, - "tls_key": { - "description": "Password for decrypting tls_cert.", + "az": { + "description": "Node availability zone.", "type": "string", - "x-order": 9 - }, - "tablestats_group_table_limit": { - "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled.", - "type": "integer", - "format": "int32", - "x-order": 10 + "x-order": 5 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -21438,83 +21774,13 @@ "additionalProperties": { "type": "string" }, - "x-order": 11 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 12 - }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 13 - }, - "table_count": { - "description": "Actual table count at the moment of adding.", - "type": "integer", - "format": "int32", - "x-order": 14 - }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 15 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 16 - }, - "tablestats_group_disabled": { - "description": "True if tablestats group collectors are currently disabled.", - "type": "boolean", - "x-order": 17 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 18 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 19 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 20 + "x-order": 6 } }, - "x-order": 3 + "x-order": 0 }, - "qan_mysql_perfschema": { - "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", + "rds_exporter": { + "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", "type": "object", "properties": { "agent_id": { @@ -21532,64 +21798,23 @@ "type": "boolean", "x-order": 2 }, - "service_id": { - "description": "Service identifier.", + "node_id": { + "description": "Node identifier.", "type": "string", "x-order": 3 }, - "username": { - "description": "MySQL username for getting performance data.", + "aws_access_key": { + "description": "AWS Access Key.", "type": "string", "x-order": 4 }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 - }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", - "x-order": 7 - }, - "tls_cert": { - "description": "Client certificate.", - "type": "string", - "x-order": 8 - }, - "tls_key": { - "description": "Password for decrypting tls_cert.", - "type": "string", - "x-order": 9 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 10 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 11 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 12 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 13 + "x-order": 5 }, "status": { "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", @@ -21604,12 +21829,33 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 14 + "x-order": 6 + }, + "listen_port": { + "description": "Listen port for scraping metrics (the same for several configurations).", + "type": "integer", + "format": "int64", + "x-order": 7 + }, + "basic_metrics_disabled": { + "description": "Basic metrics are disabled.", + "type": "boolean", + "x-order": 8 + }, + "enhanced_metrics_disabled": { + "description": "Enhanced metrics are disabled.", + "type": "boolean", + "x-order": 9 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 10 }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 15 + "x-order": 11 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -21624,19 +21870,19 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 16 + "x-order": 12 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 13 } }, - "x-order": 4 - }, - "table_count": { - "description": "Actual table count at the moment of adding.", - "type": "integer", - "format": "int32", - "x-order": 5 + "x-order": 1 }, - "postgresql": { - "description": "PostgreSQLService represents a generic PostgreSQL instance.", + "mysql": { + "description": "MySQLService represents a generic MySQL instance.", "type": "object", "properties": { "service_id": { @@ -21649,46 +21895,41 @@ "type": "string", "x-order": 1 }, - "database_name": { - "description": "Database name.", - "type": "string", - "x-order": 2 - }, "node_id": { "description": "Node identifier where this instance runs.", "type": "string", - "x-order": 3 + "x-order": 2 }, "address": { "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", - "x-order": 4 + "x-order": 3 }, "port": { "description": "Access port.\nPort is required when the address present.", "type": "integer", "format": "int64", - "x-order": 5 + "x-order": 4 }, "socket": { "description": "Access unix socket.\nAddress (and port) or socket is required.", "type": "string", - "x-order": 6 + "x-order": 5 }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 7 + "x-order": 6 }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 8 + "x-order": 7 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 9 + "x-order": 8 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -21696,24 +21937,18 @@ "additionalProperties": { "type": "string" }, - "x-order": 10 + "x-order": 9 }, "version": { - "description": "PostgreSQL version.", + "description": "MySQL version.", "type": "string", - "x-order": 11 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 12 + "x-order": 10 } }, - "x-order": 6 + "x-order": 2 }, - "postgresql_exporter": { - "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", + "mysqld_exporter": { + "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", "type": "object", "properties": { "agent_id": { @@ -21737,7 +21972,7 @@ "x-order": 3 }, "username": { - "description": "PostgreSQL username for scraping metrics.", + "description": "MySQL username for scraping metrics.", "type": "string", "x-order": 4 }, @@ -21747,22 +21982,43 @@ "x-order": 5 }, "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", + "description": "Skip TLS certificate and hostname validation.", "type": "boolean", "x-order": 6 }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 7 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 8 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 9 + }, + "tablestats_group_table_limit": { + "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled.", + "type": "integer", + "format": "int32", + "x-order": 10 + }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 7 + "x-order": 11 }, "push_metrics_enabled": { "description": "True if exporter uses push metrics mode.", "type": "boolean", - "x-order": 8 + "x-order": 12 }, "disabled_collectors": { "description": "List of disabled collector names.", @@ -21770,7 +22026,13 @@ "items": { "type": "string" }, - "x-order": 9 + "x-order": 13 + }, + "table_count": { + "description": "Actual table count at the moment of adding.", + "type": "integer", + "format": "int32", + "x-order": 14 }, "status": { "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", @@ -21785,18 +22047,23 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 10 + "x-order": 15 }, "listen_port": { "description": "Listen port for scraping metrics.", "type": "integer", "format": "int64", - "x-order": 11 + "x-order": 16 + }, + "tablestats_group_disabled": { + "description": "True if tablestats group collectors are currently disabled.", + "type": "boolean", + "x-order": 17 }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 12 + "x-order": 18 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -21811,24 +22078,18 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 13 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 14 + "x-order": 19 }, "expose_exporter": { "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 15 + "x-order": 20 } }, - "x-order": 7 + "x-order": 3 }, - "qan_postgresql_pgstatements": { - "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "qan_mysql_perfschema": { + "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -21852,30 +22113,50 @@ "x-order": 3 }, "username": { - "description": "PostgreSQL username for getting pg stat statements data.", + "description": "MySQL username for getting performance data.", "type": "string", "x-order": 4 }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 7 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 8 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 9 + }, "disable_comments_parsing": { "description": "Disable parsing comments from queries and showing them in QAN.", "type": "boolean", - "x-order": 5 + "x-order": 10 }, "max_query_length": { "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 6 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 7 + "x-order": 11 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", + "query_examples_disabled": { + "description": "True if query examples are disabled.", "type": "boolean", - "x-order": 8 + "x-order": 12 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -21883,7 +22164,7 @@ "additionalProperties": { "type": "string" }, - "x-order": 9 + "x-order": 13 }, "status": { "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", @@ -21898,389 +22179,327 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 10 + "x-order": 14 }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 11 + "x-order": 15 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 12 - } - }, - "x-order": 8 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/RDS/Discover": { - "post": { - "description": "Discovers RDS instances.", - "tags": [ - "RDSService" - ], - "summary": "Discover RDS", - "operationId": "DiscoverRDS", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "aws_access_key": { - "description": "AWS Access key. Optional.", - "type": "string", - "x-order": 0 - }, - "aws_secret_key": { - "description": "AWS Secret key. Optional.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "rds_instances": { - "type": "array", - "items": { - "description": "DiscoverRDSInstance models an unique RDS instance for the list of instances returned by Discovery.", - "type": "object", - "properties": { - "region": { - "description": "AWS region.", - "type": "string", - "x-order": 0 - }, - "az": { - "description": "AWS availability zone.", - "type": "string", - "x-order": 1 - }, - "instance_id": { - "description": "AWS instance ID.", - "type": "string", - "x-order": 2 - }, - "node_model": { - "description": "AWS instance class.", - "type": "string", - "x-order": 3 - }, - "address": { - "description": "Address used to connect to it.", - "type": "string", - "x-order": 4 - }, - "port": { - "description": "Access port.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "engine": { - "description": "DiscoverRDSEngine describes supported RDS instance engines.", - "type": "string", - "default": "DISCOVER_RDS_ENGINE_UNSPECIFIED", - "enum": [ - "DISCOVER_RDS_ENGINE_UNSPECIFIED", - "DISCOVER_RDS_ENGINE_MYSQL", - "DISCOVER_RDS_ENGINE_POSTGRESQL" - ], - "x-order": 6 - }, - "engine_version": { - "description": "Engine version.", - "type": "string", - "x-order": 7 - } + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 16 } }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { + "x-order": 4 + }, + "table_count": { + "description": "Actual table count at the moment of adding.", "type": "integer", "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 + "x-order": 5 }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } + "postgresql": { + "description": "PostgreSQLService represents a generic PostgreSQL instance.", + "type": "object", + "properties": { + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/Role/Assign": { - "post": { - "description": "Assigns Roles replaces all existing Roles for a User.", - "tags": [ - "RoleService" - ], - "summary": "Assign Roles", - "operationId": "AssignRoles", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "role_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + }, + "database_name": { + "description": "Database name.", + "type": "string", + "x-order": 2 + }, + "node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 3 + }, + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 4 + }, + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 5 + }, + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 6 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 7 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 8 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 9 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 10 + }, + "version": { + "description": "PostgreSQL version.", + "type": "string", + "x-order": 11 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 12 + } }, - "x-order": 0 - }, - "user_id": { - "type": "integer", - "format": "int64", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 + "x-order": 6 }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } + "postgresql_exporter": { + "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "PostgreSQL username for scraping metrics.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", + "type": "boolean", + "x-order": 6 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 7 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 8 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 9 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 10 }, - "additionalProperties": false + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 11 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 12 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 13 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 14 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 15 + } }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/Role/Create": { - "post": { - "description": "Creates a new Role.", - "tags": [ - "RoleService" - ], - "summary": "Create Role", - "operationId": "CreateRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "title": { - "type": "string", - "x-order": 0 - }, - "filter": { - "type": "string", - "x-order": 1 - }, - "description": { - "type": "string", - "x-order": 2 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "role_id": { - "type": "integer", - "format": "int64", - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 + "x-order": 7 }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } + "qan_postgresql_pgstatements": { + "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 }, - "additionalProperties": false + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "PostgreSQL username for getting pg stat statements data.", + "type": "string", + "x-order": 4 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 5 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 6 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 7 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 10 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 11 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 12 + } }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/Role/Delete": { - "post": { - "description": "Deletes a Role.", - "tags": [ - "RoleService" - ], - "summary": "Delete Role", - "operationId": "DeleteRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "role_id": { - "type": "integer", - "format": "int64", - "x-order": 0 - }, - "replacement_role_id": { - "description": "Role ID to be used as a replacement for the role. Additional logic applies.", - "type": "integer", - "format": "int64", - "x-order": 1 + "x-order": 8 } } } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } }, "default": { "description": "An unexpected error response.", @@ -22316,14 +22535,14 @@ } } }, - "/v1/management/Role/Get": { + "/v1/management/RDS/Discover": { "post": { - "description": "Retrieves a Role by ID.", + "description": "Discovers RDS instances.", "tags": [ - "RoleService" + "RDSService" ], - "summary": "Get Role", - "operationId": "GetRole", + "summary": "Discover RDS", + "operationId": "DiscoverRDS", "parameters": [ { "name": "body", @@ -22332,92 +22551,19 @@ "schema": { "type": "object", "properties": { - "role_id": { - "type": "integer", - "format": "int64", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "role_id": { - "type": "integer", - "format": "int64", - "x-order": 0 - }, - "title": { - "type": "string", - "x-order": 1 - }, - "filter": { - "type": "string", - "x-order": 2 - }, - "description": { + "aws_access_key": { + "description": "AWS Access key. Optional.", "type": "string", - "x-order": 3 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", "x-order": 0 }, - "message": { + "aws_secret_key": { + "description": "AWS Secret key. Optional.", "type": "string", "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 } } } } - } - } - }, - "/v1/management/Role/List": { - "post": { - "description": "Lists Roles.", - "tags": [ - "RoleService" - ], - "summary": "List Roles", - "operationId": "ListRoles", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } ], "responses": { "200": { @@ -22425,27 +22571,58 @@ "schema": { "type": "object", "properties": { - "roles": { + "rds_instances": { "type": "array", "items": { + "description": "DiscoverRDSInstance models an unique RDS instance for the list of instances returned by Discovery.", "type": "object", "properties": { - "role_id": { - "type": "integer", - "format": "int64", + "region": { + "description": "AWS region.", + "type": "string", "x-order": 0 }, - "title": { + "az": { + "description": "AWS availability zone.", "type": "string", "x-order": 1 }, - "filter": { + "instance_id": { + "description": "AWS instance ID.", "type": "string", "x-order": 2 }, - "description": { + "node_model": { + "description": "AWS instance class.", "type": "string", "x-order": 3 + }, + "address": { + "description": "Address used to connect to it.", + "type": "string", + "x-order": 4 + }, + "port": { + "description": "Access port.", + "type": "integer", + "format": "int64", + "x-order": 5 + }, + "engine": { + "description": "DiscoverRDSEngine describes supported RDS instance engines.", + "type": "string", + "default": "DISCOVER_RDS_ENGINE_UNSPECIFIED", + "enum": [ + "DISCOVER_RDS_ENGINE_UNSPECIFIED", + "DISCOVER_RDS_ENGINE_MYSQL", + "DISCOVER_RDS_ENGINE_POSTGRESQL" + ], + "x-order": 6 + }, + "engine_version": { + "description": "Engine version.", + "type": "string", + "x-order": 7 } } }, @@ -22488,14 +22665,14 @@ } } }, - "/v1/management/Role/SetDefault": { + "/v1/management/Role/Assign": { "post": { - "description": "Configures default Role assigned to Users.", + "description": "Assigns Roles replaces all existing Roles for a User.", "tags": [ "RoleService" ], - "summary": "Set default Role", - "operationId": "SetDefaultRole", + "summary": "Assign Roles", + "operationId": "AssignRoles", "parameters": [ { "name": "body", @@ -22504,10 +22681,18 @@ "schema": { "type": "object", "properties": { - "role_id": { + "role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-order": 0 + }, + "user_id": { "type": "integer", "format": "int64", - "x-order": 0 + "x-order": 1 } } } @@ -22554,14 +22739,14 @@ } } }, - "/v1/management/Role/Update": { + "/v1/management/Role/Create": { "post": { - "description": "Updates an existing Role.", + "description": "Creates a new Role.", "tags": [ "RoleService" ], - "summary": "Update Role", - "operationId": "UpdateRole", + "summary": "Create Role", + "operationId": "CreateRole", "parameters": [ { "name": "body", @@ -22570,25 +22755,17 @@ "schema": { "type": "object", "properties": { - "role_id": { - "type": "integer", - "format": "int64", - "x-order": 0 - }, "title": { "type": "string", - "x-nullable": true, - "x-order": 1 + "x-order": 0 }, "filter": { "type": "string", - "x-nullable": true, - "x-order": 2 + "x-order": 1 }, "description": { "type": "string", - "x-nullable": true, - "x-order": 3 + "x-order": 2 } } } @@ -22598,7 +22775,14 @@ "200": { "description": "A successful response.", "schema": { - "type": "object" + "type": "object", + "properties": { + "role_id": { + "type": "integer", + "format": "int64", + "x-order": 0 + } + } } }, "default": { @@ -22635,14 +22819,14 @@ } } }, - "/v1/management/SecurityChecks/Change": { + "/v1/management/Role/Delete": { "post": { - "description": "Enables/disables Security Thread Tool checks or changes their interval by names.", + "description": "Deletes a Role.", "tags": [ - "SecurityChecksService" + "RoleService" ], - "summary": "Change Security Checks", - "operationId": "ChangeSecurityChecks", + "summary": "Delete Role", + "operationId": "DeleteRole", "parameters": [ { "name": "body", @@ -22651,37 +22835,16 @@ "schema": { "type": "object", "properties": { - "params": { - "type": "array", - "items": { - "description": "ChangeSecurityCheckParams specifies a single check parameters.", - "type": "object", - "properties": { - "name": { - "description": "The name of the check to change.", - "type": "string", - "x-order": 0 - }, - "enable": { - "type": "boolean", - "x-nullable": true, - "x-order": 1 - }, - "interval": { - "description": "SecurityCheckInterval represents possible execution interval values for checks.", - "type": "string", - "default": "SECURITY_CHECK_INTERVAL_UNSPECIFIED", - "enum": [ - "SECURITY_CHECK_INTERVAL_UNSPECIFIED", - "SECURITY_CHECK_INTERVAL_STANDARD", - "SECURITY_CHECK_INTERVAL_FREQUENT", - "SECURITY_CHECK_INTERVAL_RARE" - ], - "x-order": 2 - } - } - }, + "role_id": { + "type": "integer", + "format": "int64", "x-order": 0 + }, + "replacement_role_id": { + "description": "Role ID to be used as a replacement for the role. Additional logic applies.", + "type": "integer", + "format": "int64", + "x-order": 1 } } } @@ -22728,14 +22891,14 @@ } } }, - "/v1/management/SecurityChecks/FailedChecks": { + "/v1/management/Role/Get": { "post": { - "description": "Returns the latest check results for a given service.", + "description": "Retrieves a Role by ID.", "tags": [ - "SecurityChecksService" + "RoleService" ], - "summary": "Get Failed Checks", - "operationId": "GetFailedChecks", + "summary": "Get Role", + "operationId": "GetRole", "parameters": [ { "name": "body", @@ -22744,28 +22907,10 @@ "schema": { "type": "object", "properties": { - "service_id": { - "type": "string", - "x-order": 0 - }, - "page_params": { - "description": "PageParams represents page request parameters for pagination.", - "type": "object", - "properties": { - "page_size": { - "description": "Maximum number of results per page.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "index": { - "description": "Index of the requested page, starts from 0.", - "type": "integer", - "format": "int32", - "x-order": 1 - } - }, - "x-order": 1 + "role_id": { + "type": "integer", + "format": "int64", + "x-order": 0 } } } @@ -22777,91 +22922,22 @@ "schema": { "type": "object", "properties": { - "results": { - "type": "array", - "items": { - "description": "CheckResult represents the check results for a given service.", - "type": "object", - "properties": { - "summary": { - "type": "string", - "x-order": 0 - }, - "description": { - "type": "string", - "x-order": 1 - }, - "severity": { - "description": "Severity represents severity level of the check result or alert.", - "type": "string", - "default": "SEVERITY_UNSPECIFIED", - "enum": [ - "SEVERITY_UNSPECIFIED", - "SEVERITY_EMERGENCY", - "SEVERITY_ALERT", - "SEVERITY_CRITICAL", - "SEVERITY_ERROR", - "SEVERITY_WARNING", - "SEVERITY_NOTICE", - "SEVERITY_INFO", - "SEVERITY_DEBUG" - ], - "x-order": 2 - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 3 - }, - "read_more_url": { - "description": "URL containing information on how to resolve an issue detected by an Advisor check.", - "type": "string", - "x-order": 4 - }, - "service_name": { - "description": "Name of the monitored service on which the check ran.", - "type": "string", - "x-order": 5 - }, - "service_id": { - "description": "ID of the monitored service on which the check ran.", - "type": "string", - "x-order": 6 - }, - "check_name": { - "type": "string", - "title": "Name of the check that failed", - "x-order": 7 - }, - "silenced": { - "type": "boolean", - "title": "Silence status of the check result", - "x-order": 8 - } - } - }, + "role_id": { + "type": "integer", + "format": "int64", "x-order": 0 }, - "page_totals": { - "description": "PageTotals represents total values for pagination.", - "type": "object", - "properties": { - "total_items": { - "description": "Total number of results.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "total_pages": { - "description": "Total number of pages.", - "type": "integer", - "format": "int32", - "x-order": 1 - } - }, + "title": { + "type": "string", "x-order": 1 + }, + "filter": { + "type": "string", + "x-order": 2 + }, + "description": { + "type": "string", + "x-order": 3 } } } @@ -22900,14 +22976,14 @@ } } }, - "/v1/management/SecurityChecks/List": { + "/v1/management/Role/List": { "post": { - "description": "Returns a list of checks available to the user.", + "description": "Lists Roles.", "tags": [ - "SecurityChecksService" + "RoleService" ], - "summary": "List advisor checks", - "operationId": "ListSecurityChecks", + "summary": "List Roles", + "operationId": "ListRoles", "parameters": [ { "name": "body", @@ -22924,54 +23000,27 @@ "schema": { "type": "object", "properties": { - "checks": { + "roles": { "type": "array", "items": { - "description": "SecurityCheck contains check name and status.", "type": "object", "properties": { - "name": { - "description": "Machine-readable name (ID) that is used in expression.", - "type": "string", + "role_id": { + "type": "integer", + "format": "int64", "x-order": 0 }, - "enabled": { - "description": "True if that check is enabled.", - "type": "boolean", + "title": { + "type": "string", "x-order": 1 }, - "description": { - "description": "Long human-readable description.", + "filter": { "type": "string", "x-order": 2 }, - "summary": { - "description": "Short human-readable summary.", + "description": { "type": "string", "x-order": 3 - }, - "interval": { - "description": "SecurityCheckInterval represents possible execution interval values for checks.", - "type": "string", - "default": "SECURITY_CHECK_INTERVAL_UNSPECIFIED", - "enum": [ - "SECURITY_CHECK_INTERVAL_UNSPECIFIED", - "SECURITY_CHECK_INTERVAL_STANDARD", - "SECURITY_CHECK_INTERVAL_FREQUENT", - "SECURITY_CHECK_INTERVAL_RARE" - ], - "x-order": 4 - }, - "family": { - "type": "string", - "default": "ADVISOR_CHECK_FAMILY_UNSPECIFIED", - "enum": [ - "ADVISOR_CHECK_FAMILY_UNSPECIFIED", - "ADVISOR_CHECK_FAMILY_MYSQL", - "ADVISOR_CHECK_FAMILY_POSTGRESQL", - "ADVISOR_CHECK_FAMILY_MONGODB" - ], - "x-order": 5 } } }, @@ -23014,21 +23063,28 @@ } } }, - "/v1/management/SecurityChecks/ListFailedServices": { + "/v1/management/Role/SetDefault": { "post": { - "description": "Returns a list of services with failed checks and a summary of check results.", + "description": "Configures default Role assigned to Users.", "tags": [ - "SecurityChecksService" + "RoleService" ], - "summary": "List Failed Services", - "operationId": "ListFailedServices", + "summary": "Set default Role", + "operationId": "SetDefaultRole", "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { - "type": "object" + "type": "object", + "properties": { + "role_id": { + "type": "integer", + "format": "int64", + "x-order": 0 + } + } } } ], @@ -23036,75 +23092,7 @@ "200": { "description": "A successful response.", "schema": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": { - "description": "CheckResultSummary is a summary of check results.", - "type": "object", - "properties": { - "service_name": { - "type": "string", - "x-order": 0 - }, - "service_id": { - "type": "string", - "x-order": 1 - }, - "emergency_count": { - "description": "Number of failed checks for this service with severity level \"EMERGENCY\".", - "type": "integer", - "format": "int64", - "x-order": 2 - }, - "alert_count": { - "description": "Number of failed checks for this service with severity level \"ALERT\".", - "type": "integer", - "format": "int64", - "x-order": 3 - }, - "critical_count": { - "description": "Number of failed checks for this service with severity level \"CRITICAL\".", - "type": "integer", - "format": "int64", - "x-order": 4 - }, - "error_count": { - "description": "Number of failed checks for this service with severity level \"ERROR\".", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "warning_count": { - "description": "Number of failed checks for this service with severity level \"WARNING\".", - "type": "integer", - "format": "int64", - "x-order": 6 - }, - "notice_count": { - "description": "Number of failed checks for this service with severity level \"NOTICE\".", - "type": "integer", - "format": "int64", - "x-order": 7 - }, - "info_count": { - "description": "Number of failed checks for this service with severity level \"INFO\".", - "type": "integer", - "format": "int64", - "x-order": 8 - }, - "debug_count": { - "description": "Number of failed checks for this service with severity level \"DEBUG\".", - "type": "integer", - "format": "int64", - "x-order": 9 - } - } - }, - "x-order": 0 - } - } + "type": "object" } }, "default": { @@ -23141,14 +23129,14 @@ } } }, - "/v1/management/SecurityChecks/Start": { + "/v1/management/Role/Update": { "post": { - "description": "Executes Security Thread Tool checks and returns when all checks are executed. All available checks will be started if check names aren't specified.", + "description": "Updates an existing Role.", "tags": [ - "SecurityChecksService" + "RoleService" ], - "summary": "Start Security Checks", - "operationId": "StartSecurityChecks", + "summary": "Update Role", + "operationId": "UpdateRole", "parameters": [ { "name": "body", @@ -23157,13 +23145,25 @@ "schema": { "type": "object", "properties": { - "names": { - "description": "Names of the checks that should be started.", - "type": "array", - "items": { - "type": "string" - }, + "role_id": { + "type": "integer", + "format": "int64", "x-order": 0 + }, + "title": { + "type": "string", + "x-nullable": true, + "x-order": 1 + }, + "filter": { + "type": "string", + "x-nullable": true, + "x-order": 2 + }, + "description": { + "type": "string", + "x-nullable": true, + "x-order": 3 } } } @@ -27770,7 +27770,7 @@ "name": "AnnotationService" }, { - "name": "SecurityChecksService" + "name": "AdvisorService" }, { "name": "ExternalService" diff --git a/api/swagger/swagger.json b/api/swagger/swagger.json index d2e5df609e..cfd43535c1 100644 --- a/api/swagger/swagger.json +++ b/api/swagger/swagger.json @@ -2355,11 +2355,276 @@ } } }, + "/v1/management/Advisors/Change": { + "post": { + "description": "Enables/disables Advisor checks or changes their interval by names.", + "tags": [ + "AdvisorService" + ], + "summary": "Change Advisor Checks", + "operationId": "ChangeAdvisorChecks", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "params": { + "type": "array", + "items": { + "description": "ChangeAdvisorCheckParams specifies a single check parameters.", + "type": "object", + "properties": { + "name": { + "description": "The name of the check to change.", + "type": "string", + "x-order": 0 + }, + "enable": { + "type": "boolean", + "x-nullable": true, + "x-order": 1 + }, + "interval": { + "description": "AdvisorCheckInterval represents possible execution interval values for checks.", + "type": "string", + "default": "ADVISOR_CHECK_INTERVAL_UNSPECIFIED", + "enum": [ + "ADVISOR_CHECK_INTERVAL_UNSPECIFIED", + "ADVISOR_CHECK_INTERVAL_STANDARD", + "ADVISOR_CHECK_INTERVAL_FREQUENT", + "ADVISOR_CHECK_INTERVAL_RARE" + ], + "x-order": 2 + } + } + }, + "x-order": 0 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + } + } + } + } + } + } + }, + "/v1/management/Advisors/FailedChecks": { + "post": { + "description": "Returns the latest check results for a given service.", + "tags": [ + "AdvisorService" + ], + "summary": "Get Failed Checks", + "operationId": "GetFailedChecks", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "x-order": 0 + }, + "page_params": { + "description": "PageParams represents page request parameters for pagination.", + "type": "object", + "properties": { + "page_size": { + "description": "Maximum number of results per page.", + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "index": { + "description": "Index of the requested page, starts from 0.", + "type": "integer", + "format": "int32", + "x-order": 1 + } + }, + "x-order": 1 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "description": "CheckResult represents the check results for a given service.", + "type": "object", + "properties": { + "summary": { + "type": "string", + "x-order": 0 + }, + "description": { + "type": "string", + "x-order": 1 + }, + "severity": { + "description": "Severity represents severity level of the check result or alert.", + "type": "string", + "default": "SEVERITY_UNSPECIFIED", + "enum": [ + "SEVERITY_UNSPECIFIED", + "SEVERITY_EMERGENCY", + "SEVERITY_ALERT", + "SEVERITY_CRITICAL", + "SEVERITY_ERROR", + "SEVERITY_WARNING", + "SEVERITY_NOTICE", + "SEVERITY_INFO", + "SEVERITY_DEBUG" + ], + "x-order": 2 + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 3 + }, + "read_more_url": { + "description": "URL containing information on how to resolve an issue detected by an Advisor check.", + "type": "string", + "x-order": 4 + }, + "service_name": { + "description": "Name of the monitored service on which the check ran.", + "type": "string", + "x-order": 5 + }, + "service_id": { + "description": "ID of the monitored service on which the check ran.", + "type": "string", + "x-order": 6 + }, + "check_name": { + "type": "string", + "title": "Name of the check that failed", + "x-order": 7 + }, + "silenced": { + "type": "boolean", + "title": "Silence status of the check result", + "x-order": 8 + } + } + }, + "x-order": 0 + }, + "page_totals": { + "description": "PageTotals represents total values for pagination.", + "type": "object", + "properties": { + "total_items": { + "description": "Total number of results.", + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "total_pages": { + "description": "Total number of pages.", + "type": "integer", + "format": "int32", + "x-order": 1 + } + }, + "x-order": 1 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + } + } + } + } + } + } + }, "/v1/management/Advisors/List": { "post": { "description": "Returns a list of advisors available to the user.", "tags": [ - "SecurityChecksService" + "AdvisorService" ], "summary": "List advisors", "operationId": "ListAdvisors", @@ -2413,7 +2678,7 @@ "description": "Advisor checks.", "type": "array", "items": { - "description": "SecurityCheck contains check name and status.", + "description": "AdvisorCheck contains check name and status.", "type": "object", "properties": { "name": { @@ -2437,14 +2702,14 @@ "x-order": 3 }, "interval": { - "description": "SecurityCheckInterval represents possible execution interval values for checks.", + "description": "AdvisorCheckInterval represents possible execution interval values for checks.", "type": "string", - "default": "SECURITY_CHECK_INTERVAL_UNSPECIFIED", + "default": "ADVISOR_CHECK_INTERVAL_UNSPECIFIED", "enum": [ - "SECURITY_CHECK_INTERVAL_UNSPECIFIED", - "SECURITY_CHECK_INTERVAL_STANDARD", - "SECURITY_CHECK_INTERVAL_FREQUENT", - "SECURITY_CHECK_INTERVAL_RARE" + "ADVISOR_CHECK_INTERVAL_UNSPECIFIED", + "ADVISOR_CHECK_INTERVAL_STANDARD", + "ADVISOR_CHECK_INTERVAL_FREQUENT", + "ADVISOR_CHECK_INTERVAL_RARE" ], "x-order": 4 }, @@ -2504,49 +2769,270 @@ } } }, - "/v1/management/Annotations/Add": { + "/v1/management/Advisors/ListChecks": { "post": { - "description": "Adds annotation.", + "description": "Returns a list of checks available to the user.", "tags": [ - "AnnotationService" + "AdvisorService" ], - "summary": "Add Annotation", - "operationId": "AddAnnotation", + "summary": "List advisor checks", + "operationId": "ListAdvisorChecks", "parameters": [ { - "description": "AddAnnotationRequest is a params to add new annotation.", "name": "body", "in": "body", "required": true, "schema": { - "description": "AddAnnotationRequest is a params to add new annotation.", + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { "type": "object", "properties": { - "text": { - "description": "An annotation description. Required.", - "type": "string", + "checks": { + "type": "array", + "items": { + "description": "AdvisorCheck contains check name and status.", + "type": "object", + "properties": { + "name": { + "description": "Machine-readable name (ID) that is used in expression.", + "type": "string", + "x-order": 0 + }, + "enabled": { + "description": "True if that check is enabled.", + "type": "boolean", + "x-order": 1 + }, + "description": { + "description": "Long human-readable description.", + "type": "string", + "x-order": 2 + }, + "summary": { + "description": "Short human-readable summary.", + "type": "string", + "x-order": 3 + }, + "interval": { + "description": "AdvisorCheckInterval represents possible execution interval values for checks.", + "type": "string", + "default": "ADVISOR_CHECK_INTERVAL_UNSPECIFIED", + "enum": [ + "ADVISOR_CHECK_INTERVAL_UNSPECIFIED", + "ADVISOR_CHECK_INTERVAL_STANDARD", + "ADVISOR_CHECK_INTERVAL_FREQUENT", + "ADVISOR_CHECK_INTERVAL_RARE" + ], + "x-order": 4 + }, + "family": { + "type": "string", + "default": "ADVISOR_CHECK_FAMILY_UNSPECIFIED", + "enum": [ + "ADVISOR_CHECK_FAMILY_UNSPECIFIED", + "ADVISOR_CHECK_FAMILY_MYSQL", + "ADVISOR_CHECK_FAMILY_POSTGRESQL", + "ADVISOR_CHECK_FAMILY_MONGODB" + ], + "x-order": 5 + } + } + }, + "x-order": 0 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", "x-order": 0 }, - "tags": { - "description": "Tags are used to filter annotations.", + "message": { + "type": "string", + "x-order": 1 + }, + "details": { "type": "array", "items": { - "type": "string" + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false }, - "x-order": 1 + "x-order": 2 + } + } + } + } + } + } + }, + "/v1/management/Advisors/ListFailedServices": { + "post": { + "description": "Returns a list of services with failed checks and a summary of check results.", + "tags": [ + "AdvisorService" + ], + "summary": "List Failed Services", + "operationId": "ListFailedServices", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "result": { + "type": "array", + "items": { + "description": "CheckResultSummary is a summary of check results.", + "type": "object", + "properties": { + "service_name": { + "type": "string", + "x-order": 0 + }, + "service_id": { + "type": "string", + "x-order": 1 + }, + "emergency_count": { + "description": "Number of failed checks for this service with severity level \"EMERGENCY\".", + "type": "integer", + "format": "int64", + "x-order": 2 + }, + "alert_count": { + "description": "Number of failed checks for this service with severity level \"ALERT\".", + "type": "integer", + "format": "int64", + "x-order": 3 + }, + "critical_count": { + "description": "Number of failed checks for this service with severity level \"CRITICAL\".", + "type": "integer", + "format": "int64", + "x-order": 4 + }, + "error_count": { + "description": "Number of failed checks for this service with severity level \"ERROR\".", + "type": "integer", + "format": "int64", + "x-order": 5 + }, + "warning_count": { + "description": "Number of failed checks for this service with severity level \"WARNING\".", + "type": "integer", + "format": "int64", + "x-order": 6 + }, + "notice_count": { + "description": "Number of failed checks for this service with severity level \"NOTICE\".", + "type": "integer", + "format": "int64", + "x-order": 7 + }, + "info_count": { + "description": "Number of failed checks for this service with severity level \"INFO\".", + "type": "integer", + "format": "int64", + "x-order": 8 + }, + "debug_count": { + "description": "Number of failed checks for this service with severity level \"DEBUG\".", + "type": "integer", + "format": "int64", + "x-order": 9 + } + } + }, + "x-order": 0 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 }, - "node_name": { - "description": "Used for annotate node.", + "message": { "type": "string", - "x-order": 2 + "x-order": 1 }, - "service_names": { - "description": "Used for annotate services.", + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + } + } + } + } + } + } + }, + "/v1/management/Advisors/StartChecks": { + "post": { + "description": "Executes Advisor checks and returns when all checks are executed. All available checks will be started if check names aren't specified.", + "tags": [ + "AdvisorService" + ], + "summary": "Start Advisor Checks", + "operationId": "StartAdvisorChecks", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "names": { + "description": "Names of the checks that should be started.", "type": "array", "items": { "type": "string" }, - "x-order": 3 + "x-order": 0 } } } @@ -2593,28 +3079,117 @@ } } }, - "/v1/management/External/Add": { + "/v1/management/Annotations/Add": { "post": { - "description": "Adds external service and adds external exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds an \"external exporter\" agent to inventory, which is running on provided \"runs_on_node_id\".", + "description": "Adds annotation.", "tags": [ - "ExternalService" + "AnnotationService" ], - "summary": "Add External Service", - "operationId": "AddExternal", + "summary": "Add Annotation", + "operationId": "AddAnnotation", "parameters": [ { + "description": "AddAnnotationRequest is a params to add new annotation.", "name": "body", "in": "body", "required": true, "schema": { + "description": "AddAnnotationRequest is a params to add new annotation.", "type": "object", "properties": { - "runs_on_node_id": { - "description": "Node identifier on which an external exporter is been running.\nruns_on_node_id always should be passed with node_id.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "text": { + "description": "An annotation description. Required.", "type": "string", "x-order": 0 }, - "node_name": { + "tags": { + "description": "Tags are used to filter annotations.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 1 + }, + "node_name": { + "description": "Used for annotate node.", + "type": "string", + "x-order": 2 + }, + "service_names": { + "description": "Used for annotate services.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 3 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + } + } + } + } + } + } + }, + "/v1/management/External/Add": { + "post": { + "description": "Adds external service and adds external exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds an \"external exporter\" agent to inventory, which is running on provided \"runs_on_node_id\".", + "tags": [ + "ExternalService" + ], + "summary": "Add External Service", + "operationId": "AddExternal", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "runs_on_node_id": { + "description": "Node identifier on which an external exporter is been running.\nruns_on_node_id always should be passed with node_id.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "type": "string", + "x-order": 0 + }, + "node_name": { "description": "Node name on which a service and node is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 1 @@ -7034,417 +7609,22 @@ "x-order": 11 }, "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 12 - } - }, - "x-order": 8 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/RDS/Discover": { - "post": { - "description": "Discovers RDS instances.", - "tags": [ - "RDSService" - ], - "summary": "Discover RDS", - "operationId": "DiscoverRDS", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "aws_access_key": { - "description": "AWS Access key. Optional.", - "type": "string", - "x-order": 0 - }, - "aws_secret_key": { - "description": "AWS Secret key. Optional.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "rds_instances": { - "type": "array", - "items": { - "description": "DiscoverRDSInstance models an unique RDS instance for the list of instances returned by Discovery.", - "type": "object", - "properties": { - "region": { - "description": "AWS region.", - "type": "string", - "x-order": 0 - }, - "az": { - "description": "AWS availability zone.", - "type": "string", - "x-order": 1 - }, - "instance_id": { - "description": "AWS instance ID.", - "type": "string", - "x-order": 2 - }, - "node_model": { - "description": "AWS instance class.", - "type": "string", - "x-order": 3 - }, - "address": { - "description": "Address used to connect to it.", - "type": "string", - "x-order": 4 - }, - "port": { - "description": "Access port.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "engine": { - "description": "DiscoverRDSEngine describes supported RDS instance engines.", - "type": "string", - "default": "DISCOVER_RDS_ENGINE_UNSPECIFIED", - "enum": [ - "DISCOVER_RDS_ENGINE_UNSPECIFIED", - "DISCOVER_RDS_ENGINE_MYSQL", - "DISCOVER_RDS_ENGINE_POSTGRESQL" - ], - "x-order": 6 - }, - "engine_version": { - "description": "Engine version.", - "type": "string", - "x-order": 7 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/SecurityChecks/Change": { - "post": { - "description": "Enables/disables Security Thread Tool checks or changes their interval by names.", - "tags": [ - "SecurityChecksService" - ], - "summary": "Change Security Checks", - "operationId": "ChangeSecurityChecks", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "params": { - "type": "array", - "items": { - "description": "ChangeSecurityCheckParams specifies a single check parameters.", - "type": "object", - "properties": { - "name": { - "description": "The name of the check to change.", - "type": "string", - "x-order": 0 - }, - "enable": { - "type": "boolean", - "x-nullable": true, - "x-order": 1 - }, - "interval": { - "description": "SecurityCheckInterval represents possible execution interval values for checks.", - "type": "string", - "default": "SECURITY_CHECK_INTERVAL_UNSPECIFIED", - "enum": [ - "SECURITY_CHECK_INTERVAL_UNSPECIFIED", - "SECURITY_CHECK_INTERVAL_STANDARD", - "SECURITY_CHECK_INTERVAL_FREQUENT", - "SECURITY_CHECK_INTERVAL_RARE" - ], - "x-order": 2 - } - } - }, - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/SecurityChecks/FailedChecks": { - "post": { - "description": "Returns the latest check results for a given service.", - "tags": [ - "SecurityChecksService" - ], - "summary": "Get Failed Checks", - "operationId": "GetFailedChecks", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "service_id": { - "type": "string", - "x-order": 0 - }, - "page_params": { - "description": "PageParams represents page request parameters for pagination.", - "type": "object", - "properties": { - "page_size": { - "description": "Maximum number of results per page.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "index": { - "description": "Index of the requested page, starts from 0.", - "type": "integer", - "format": "int32", - "x-order": 1 - } - }, - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "description": "CheckResult represents the check results for a given service.", - "type": "object", - "properties": { - "summary": { - "type": "string", - "x-order": 0 - }, - "description": { - "type": "string", - "x-order": 1 - }, - "severity": { - "description": "Severity represents severity level of the check result or alert.", - "type": "string", - "default": "SEVERITY_UNSPECIFIED", - "enum": [ - "SEVERITY_UNSPECIFIED", - "SEVERITY_EMERGENCY", - "SEVERITY_ALERT", - "SEVERITY_CRITICAL", - "SEVERITY_ERROR", - "SEVERITY_WARNING", - "SEVERITY_NOTICE", - "SEVERITY_INFO", - "SEVERITY_DEBUG" - ], - "x-order": 2 - }, - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 3 - }, - "read_more_url": { - "description": "URL containing information on how to resolve an issue detected by an Advisor check.", - "type": "string", - "x-order": 4 - }, - "service_name": { - "description": "Name of the monitored service on which the check ran.", - "type": "string", - "x-order": 5 - }, - "service_id": { - "description": "ID of the monitored service on which the check ran.", - "type": "string", - "x-order": 6 - }, - "check_name": { - "type": "string", - "title": "Name of the check that failed", - "x-order": 7 - }, - "silenced": { - "type": "boolean", - "title": "Silence status of the check result", - "x-order": 8 - } - } - }, - "x-order": 0 - }, - "page_totals": { - "description": "PageTotals represents total values for pagination.", - "type": "object", - "properties": { - "total_items": { - "description": "Total number of results.", - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "total_pages": { - "description": "Total number of pages.", - "type": "integer", - "format": "int32", - "x-order": 1 + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 12 } }, - "x-order": 1 + "x-order": 8 } } } @@ -7483,137 +7663,35 @@ } } }, - "/v1/management/SecurityChecks/List": { + "/v1/management/RDS/Discover": { "post": { - "description": "Returns a list of checks available to the user.", + "description": "Discovers RDS instances.", "tags": [ - "SecurityChecksService" + "RDSService" ], - "summary": "List advisor checks", - "operationId": "ListSecurityChecks", + "summary": "Discover RDS", + "operationId": "DiscoverRDS", "parameters": [ { "name": "body", "in": "body", "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "checks": { - "type": "array", - "items": { - "description": "SecurityCheck contains check name and status.", - "type": "object", - "properties": { - "name": { - "description": "Machine-readable name (ID) that is used in expression.", - "type": "string", - "x-order": 0 - }, - "enabled": { - "description": "True if that check is enabled.", - "type": "boolean", - "x-order": 1 - }, - "description": { - "description": "Long human-readable description.", - "type": "string", - "x-order": 2 - }, - "summary": { - "description": "Short human-readable summary.", - "type": "string", - "x-order": 3 - }, - "interval": { - "description": "SecurityCheckInterval represents possible execution interval values for checks.", - "type": "string", - "default": "SECURITY_CHECK_INTERVAL_UNSPECIFIED", - "enum": [ - "SECURITY_CHECK_INTERVAL_UNSPECIFIED", - "SECURITY_CHECK_INTERVAL_STANDARD", - "SECURITY_CHECK_INTERVAL_FREQUENT", - "SECURITY_CHECK_INTERVAL_RARE" - ], - "x-order": 4 - }, - "family": { - "type": "string", - "default": "ADVISOR_CHECK_FAMILY_UNSPECIFIED", - "enum": [ - "ADVISOR_CHECK_FAMILY_UNSPECIFIED", - "ADVISOR_CHECK_FAMILY_MYSQL", - "ADVISOR_CHECK_FAMILY_POSTGRESQL", - "ADVISOR_CHECK_FAMILY_MONGODB" - ], - "x-order": 5 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", "schema": { "type": "object", "properties": { - "code": { - "type": "integer", - "format": "int32", + "aws_access_key": { + "description": "AWS Access key. Optional.", + "type": "string", "x-order": 0 }, - "message": { + "aws_secret_key": { + "description": "AWS Secret key. Optional.", "type": "string", "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 } } } } - } - } - }, - "/v1/management/SecurityChecks/ListFailedServices": { - "post": { - "description": "Returns a list of services with failed checks and a summary of check results.", - "tags": [ - "SecurityChecksService" - ], - "summary": "List Failed Services", - "operationId": "ListFailedServices", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } ], "responses": { "200": { @@ -7621,67 +7699,58 @@ "schema": { "type": "object", "properties": { - "result": { + "rds_instances": { "type": "array", "items": { - "description": "CheckResultSummary is a summary of check results.", + "description": "DiscoverRDSInstance models an unique RDS instance for the list of instances returned by Discovery.", "type": "object", "properties": { - "service_name": { + "region": { + "description": "AWS region.", "type": "string", "x-order": 0 }, - "service_id": { + "az": { + "description": "AWS availability zone.", "type": "string", "x-order": 1 }, - "emergency_count": { - "description": "Number of failed checks for this service with severity level \"EMERGENCY\".", - "type": "integer", - "format": "int64", + "instance_id": { + "description": "AWS instance ID.", + "type": "string", "x-order": 2 }, - "alert_count": { - "description": "Number of failed checks for this service with severity level \"ALERT\".", - "type": "integer", - "format": "int64", + "node_model": { + "description": "AWS instance class.", + "type": "string", "x-order": 3 }, - "critical_count": { - "description": "Number of failed checks for this service with severity level \"CRITICAL\".", - "type": "integer", - "format": "int64", + "address": { + "description": "Address used to connect to it.", + "type": "string", "x-order": 4 }, - "error_count": { - "description": "Number of failed checks for this service with severity level \"ERROR\".", + "port": { + "description": "Access port.", "type": "integer", "format": "int64", "x-order": 5 }, - "warning_count": { - "description": "Number of failed checks for this service with severity level \"WARNING\".", - "type": "integer", - "format": "int64", + "engine": { + "description": "DiscoverRDSEngine describes supported RDS instance engines.", + "type": "string", + "default": "DISCOVER_RDS_ENGINE_UNSPECIFIED", + "enum": [ + "DISCOVER_RDS_ENGINE_UNSPECIFIED", + "DISCOVER_RDS_ENGINE_MYSQL", + "DISCOVER_RDS_ENGINE_POSTGRESQL" + ], "x-order": 6 }, - "notice_count": { - "description": "Number of failed checks for this service with severity level \"NOTICE\".", - "type": "integer", - "format": "int64", + "engine_version": { + "description": "Engine version.", + "type": "string", "x-order": 7 - }, - "info_count": { - "description": "Number of failed checks for this service with severity level \"INFO\".", - "type": "integer", - "format": "int64", - "x-order": 8 - }, - "debug_count": { - "description": "Number of failed checks for this service with severity level \"DEBUG\".", - "type": "integer", - "format": "int64", - "x-order": 9 } } }, @@ -7724,75 +7793,6 @@ } } }, - "/v1/management/SecurityChecks/Start": { - "post": { - "description": "Executes Security Thread Tool checks and returns when all checks are executed. All available checks will be started if check names aren't specified.", - "tags": [ - "SecurityChecksService" - ], - "summary": "Start Security Checks", - "operationId": "StartSecurityChecks", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "names": { - "description": "Names of the checks that should be started.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, "/v1/management/Service/Remove": { "post": { "description": "Removes a Service along with Agents.", @@ -11037,7 +11037,7 @@ "name": "AnnotationService" }, { - "name": "SecurityChecksService" + "name": "AdvisorService" }, { "name": "ExternalService" diff --git a/descriptor.bin b/descriptor.bin index 709d83ede2ed68a67b318291550c8886ed216b14..6e1335f4a3458feca795226ede859f1cdbcc5f5f 100644 GIT binary patch delta 2405 zcmb7FYfKbZ6yAI1ad$7fi%wZs27%dK$`YSWief@|dAqYJudGtFz}oiLx~oJ)m^PR4{iHN7X(xs&qwqA{}a6 z?NPMW&faLV(x`$>)6`~mJj^XeciDw7S1+7^2p!DTz~!RNthj;8`M+Y$ot$r=y@7+p z!xCVLiS`EaVh#R&7yI~2GLbTasZ`P2*QRy$usvUqLj^%9Mk9@CRP*u*SD3Q8xTGTz zi?pa6P)|u;S&2oS_=fCDw0=!$xs(TpIxX|h-;%DPa%yjjL3w?Vs8>)>p?h`U87lWq zkqp*7Ox{3KY-E@WZG4G}O|5EEyXF;*@L7vHR_dIPN%b>Cy_KzzSc__s2kTaX6- zUugtV%V=g@Jkk@lG<>H?-r;3bo^LebY9UqY>WpcsU#8yLHqG*|HoJROE$-h&GZ)!Q zI!cerM9(dgT{%sw;QOrAfRW-ZW5 zoH|1WQD7L+wE13DW)G!&>aW_5Z4Yj#UxKAvnq@g%8zDcW-ASQtGg=*tN?VgE9c5p9N7~V+%sonC>|vjn z&fXs*&LtZoZBez^WNFeZHa1Ec(YwrhmW0^oTH;~H#)u<3NlPA%bP)!7e&^Vub1-W6 zJ4At44OY&R9K#ZvU-jee{s#B&b0no1GK$GjlKS!h3hq~%dgH2Q?J)NYDP#N3k++R> z_8D$wHn$L6`qVT?1y2n3Q;d*m%#vLAY$B^ZPc%KCOH9UMv**cl=HH0Eu%O3gB1Oh< z%pJk(SvZ1wV??Z7{0Ii&2zE=Jq>@#rbp(~cSfnwkYNgF>n(<)~*wzbV72EK;*%(LC zz51`0*_jKZ+OwNt!6xz4mWt$Ub3V>-Qg=9$rchq6VVlII;3Ddzf)0?5@+^b_6%?98 z*mB~0a|;>BXCWXu^Ol=L0IoSA2BHgFM6B-_#C$zACvk4A}g}f^)Nh#c?cTL$h8n86!r%awNoSwqX3IsCMB5%rQlB)(IGk64#BBIRFCTZZii!Al&T_ zPzu7L#K&##Ao%8Z5m<4%k4aZZf7NosM8I^w?xzl*+9mFwP50t>JD3mJ6+^)x@rP`O zlL`*7AF})OF7Xb%@BKKyZeAf-*~t>Y28@2QL_m;9zt7K>PLq#P^)B(e6WsVggiG1P zG|7G?KwWT(U_`n#Z-oV+2ZN}%#K^!U@yC!YAEI)+3wXznJ&#kz&y%iJu|c z9faiixrU)X?F#ESDJ~PuzssC!BpszE)?Ong(As^J7i};|;yA)TAx_?*%zu26mrqd_ zc`@G1_38=g&RF8dQRZq3LcZf@U6^&ukQ)DPL!XnxNrbP0ey#H4W5FitMGw0_L)PSG zm=YW)P9pCr3xeV#dc8hTd7XIB`ZhySki;7Z{{fOa7Y>S*^KOt`T~Tz af#fw7gm5=d`L2OSvjmns@o3g@a_C>gD4Ku( delta 2419 zcma)6ZA?>F816au^qz7kVD4;bZ=sa7e25zrg3h?9G^9)fjkd+2PO-ubprr!0%8VJB zWs58(TO^BT%gkKjw#<(pen4H+8I0c=B+C;2ZL-Ad?~*x_Wq)?=SFt#@{kX|}-t)ZA zbKdv7=N!7V==iNghu#O5;BP;n^WT~Y^$c3XbpFrq*j&0-p09U?`F<(_(2=TKEysV z`}p*OHvDQcoY+eLJc%z`ry+SIB6aK?=t=FTSHHsVRyGno5#K2#WC!wamASRm)xGg# zyi4kplBw!_HPr??z2j?qfwMjbB+m%Z;#0V0(|BdpCeXic;;l2- zx1g4YkyLyjl~LJ$2Kx^d6IWJL^_Ihu+_xtwOI{aow)DuE9AmYAuOz3uVIuz1qLwPm zRtx5@mQxPJbr$z8X(z7iDzm(Vdcya`2jac5LsP4yU>w_CGm25k8&pDACwkqaC|fc8 z*I7Ia%0>aPW#u*LXDL(=UnJDf8g7birr(TWcdnm!GJ&a4?5cSo(B7~n)X?1Cv_2XN zZwj`wH-&VTL<|$osa`shSo#jk#YsH&VK3=E~Fch zyty#jEi9==D^}59l3y5|yQoja6EG4S1%gf0^cWyolw@z1Izt9Qy1c zzUTZ1l7-pBp||STIJVEzlf~-DZ8aRUgv?Dj&U&&-uxp~Tg=;KvLns;FnULf_XOFD@ z%rahV&G0l{OmmlE(UI*E&}7$s{yP0`9Iv%+BhYLT5HS@1abre`Iwo-Bph$8FGMk`D z;BsLVu@bWafP%^l1R1Jaq!Zba6;|j=Kt)~yF`~7sTqiP+mmxw%%!39IDr+jST=C`v zE+6`I5soqQq1!-=nP2Lq3)1+Sy^lb|>TsI8Kf*S zZCt&=p)Mk5X4GzHiGdik+v_7O%+oBOglPbX^=!Dap5PyD<2OMmEx3cvGUKavaMe=H z*bJ4<^y|h9F|~f5pAe?T3n*n81ni$fJY%ISUh2Awhy3Mg2(!?Bi;v_mszu-qn3OCI zSy=dhrIcQ~iwhgQ%2}Ws<#dOjU)?bSNI}FvJVUu!ZETHY59zfr#C9{}^-=L2{&O$(5n!rdTj5Y1;~fDOf7*T@ zj{)~C0(q0be*sK00ElmAj!L@+G>$BF1;%Xa4+brHi0z;_z3d@A1{zWX@g_D-`~-m4 z0jG?`i!Ya^pU;N zE2XWxjs7x)>q;ED2FD~PfwR_tOmY&ejHQ=8!Zy${sA`%8{xN`0m}b|U*)dA^zc0dy h5>YoYGvCL+wakFb_b~`=J3KRu*=I@5Oy`_9`ZsJ;qe1`x diff --git a/managed/cmd/pmm-managed/main.go b/managed/cmd/pmm-managed/main.go index 50427177cc..00b2299dd2 100644 --- a/managed/cmd/pmm-managed/main.go +++ b/managed/cmd/pmm-managed/main.go @@ -286,7 +286,7 @@ func runGRPCServer(ctx context.Context, deps *gRPCServerDeps) { managementv1.RegisterHAProxyServiceServer(gRPCServer, management.NewHAProxyService(deps.db, deps.vmdb, deps.agentsStateUpdater, deps.connectionCheck)) managementv1.RegisterExternalServiceServer(gRPCServer, management.NewExternalService(deps.db, deps.vmdb, deps.agentsStateUpdater, deps.connectionCheck)) managementv1.RegisterAnnotationServiceServer(gRPCServer, managementgrpc.NewAnnotationServer(deps.db, deps.grafanaClient)) - managementv1.RegisterSecurityChecksServiceServer(gRPCServer, management.NewChecksAPIService(deps.checksService)) + managementv1.RegisterAdvisorServiceServer(gRPCServer, management.NewChecksAPIService(deps.checksService)) rolev1beta1.RegisterRoleServiceServer(gRPCServer, management.NewRoleService(deps.db)) @@ -391,7 +391,7 @@ func runHTTP1Server(ctx context.Context, deps *http1ServerDeps) { managementv1.RegisterHAProxyServiceHandlerFromEndpoint, managementv1.RegisterExternalServiceHandlerFromEndpoint, managementv1.RegisterAnnotationServiceHandlerFromEndpoint, - managementv1.RegisterSecurityChecksServiceHandlerFromEndpoint, + managementv1.RegisterAdvisorServiceHandlerFromEndpoint, rolev1beta1.RegisterRoleServiceHandlerFromEndpoint, alertingpb.RegisterAlertingServiceHandlerFromEndpoint, diff --git a/managed/services/checks/checks.go b/managed/services/checks/checks.go index 1753193afa..80800f3d95 100644 --- a/managed/services/checks/checks.go +++ b/managed/services/checks/checks.go @@ -13,7 +13,7 @@ // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -// Package checks provides security checks functionality. +// Package checks provides advisor checks functionality. package checks import ( diff --git a/managed/services/management/checks.go b/managed/services/management/checks.go index 7a3b9552d3..79dcd00a7d 100644 --- a/managed/services/management/checks.go +++ b/managed/services/management/checks.go @@ -30,12 +30,12 @@ import ( "github.com/percona/pmm/managed/services" ) -// ChecksAPIService represents security checks service API. +// ChecksAPIService represents advisor service API. type ChecksAPIService struct { checksService checksService l *logrus.Entry - managementv1.UnimplementedSecurityChecksServiceServer + managementv1.UnimplementedAdvisorServiceServer } // NewChecksAPIService creates new Checks API Service. @@ -171,8 +171,8 @@ func (s *ChecksAPIService) GetFailedChecks(ctx context.Context, req *managementv return &managementv1.GetFailedChecksResponse{Results: failedChecks[from:to], PageTotals: pageTotals}, nil } -// StartSecurityChecks executes Security Thread Tool checks and returns when all checks are executed. -func (s *ChecksAPIService) StartSecurityChecks(_ context.Context, req *managementv1.StartSecurityChecksRequest) (*managementv1.StartSecurityChecksResponse, error) { +// StartAdvisorChecks executes advisor checks and returns when all checks are executed. +func (s *ChecksAPIService) StartAdvisorChecks(_ context.Context, req *managementv1.StartAdvisorChecksRequest) (*managementv1.StartAdvisorChecksResponse, error) { // Start only specified checks from any group. err := s.checksService.StartChecks(req.Names) if err != nil { @@ -180,14 +180,14 @@ func (s *ChecksAPIService) StartSecurityChecks(_ context.Context, req *managemen return nil, status.Errorf(codes.FailedPrecondition, "%v.", err) } - return nil, errors.Wrap(err, "failed to start security checks") + return nil, errors.Wrap(err, "failed to start advisor checks") } - return &managementv1.StartSecurityChecksResponse{}, nil + return &managementv1.StartAdvisorChecksResponse{}, nil } -// ListSecurityChecks returns a list of available advisor checks and their statuses. -func (s *ChecksAPIService) ListSecurityChecks(_ context.Context, _ *managementv1.ListSecurityChecksRequest) (*managementv1.ListSecurityChecksResponse, error) { +// ListAdvisorChecks returns a list of available advisor checks and their statuses. +func (s *ChecksAPIService) ListAdvisorChecks(_ context.Context, _ *managementv1.ListAdvisorChecksRequest) (*managementv1.ListAdvisorChecksResponse, error) { disChecks, err := s.checksService.GetDisabledChecks() if err != nil { return nil, errors.Wrap(err, "failed to get disabled checks list") @@ -203,10 +203,10 @@ func (s *ChecksAPIService) ListSecurityChecks(_ context.Context, _ *managementv1 return nil, errors.Wrap(err, "failed to get available checks list") } - res := make([]*managementv1.SecurityCheck, 0, len(checks)) + res := make([]*managementv1.AdvisorCheck, 0, len(checks)) for _, c := range checks { _, disabled := m[c.Name] - res = append(res, &managementv1.SecurityCheck{ + res = append(res, &managementv1.AdvisorCheck{ Name: c.Name, Enabled: !disabled, Summary: c.Summary, @@ -216,7 +216,7 @@ func (s *ChecksAPIService) ListSecurityChecks(_ context.Context, _ *managementv1 }) } - return &managementv1.ListSecurityChecksResponse{Checks: res}, nil + return &managementv1.ListAdvisorChecksResponse{Checks: res}, nil } func (s *ChecksAPIService) ListAdvisors(_ context.Context, _ *managementv1.ListAdvisorsRequest) (*managementv1.ListAdvisorsResponse, error) { @@ -237,10 +237,10 @@ func (s *ChecksAPIService) ListAdvisors(_ context.Context, _ *managementv1.ListA res := make([]*managementv1.Advisor, 0, len(advisors)) for _, a := range advisors { - checks := make([]*managementv1.SecurityCheck, 0, len(a.Checks)) + checks := make([]*managementv1.AdvisorCheck, 0, len(a.Checks)) for _, c := range a.Checks { _, disabled := m[c.Name] - checks = append(checks, &managementv1.SecurityCheck{ + checks = append(checks, &managementv1.AdvisorCheck{ Name: c.Name, Enabled: !disabled, Summary: c.Summary, @@ -294,15 +294,15 @@ func createComment(checks []check.Check) string { return "Partial support (" + strings.Join(b, ", ") + ")" } -// ChangeSecurityChecks enables/disables Security Thread Tool checks by names or changes its execution interval. -func (s *ChecksAPIService) ChangeSecurityChecks(_ context.Context, req *managementv1.ChangeSecurityChecksRequest) (*managementv1.ChangeSecurityChecksResponse, error) { +// ChangeAdvisorChecks enables/disables advisor checks by names or changes its execution interval. +func (s *ChecksAPIService) ChangeAdvisorChecks(_ context.Context, req *managementv1.ChangeAdvisorChecksRequest) (*managementv1.ChangeAdvisorChecksResponse, error) { var enableChecks, disableChecks []string changeIntervalParams := make(map[string]check.Interval) for _, check := range req.Params { - if check.Interval != managementv1.SecurityCheckInterval_SECURITY_CHECK_INTERVAL_UNSPECIFIED { + if check.Interval != managementv1.AdvisorCheckInterval_ADVISOR_CHECK_INTERVAL_UNSPECIFIED { interval, err := convertAPIInterval(check.Interval) if err != nil { - return nil, errors.Wrap(err, "failed to change security check interval") + return nil, errors.Wrap(err, "failed to change advisor check interval") } changeIntervalParams[check.Name] = interval } @@ -319,34 +319,34 @@ func (s *ChecksAPIService) ChangeSecurityChecks(_ context.Context, req *manageme if len(changeIntervalParams) != 0 { err := s.checksService.ChangeInterval(changeIntervalParams) if err != nil { - return nil, errors.Wrap(err, "failed to change security check interval") + return nil, errors.Wrap(err, "failed to change advisor check interval") } } err := s.checksService.EnableChecks(enableChecks) if err != nil { - return nil, errors.Wrap(err, "failed to enable disabled security checks") + return nil, errors.Wrap(err, "failed to enable disabled advisor checks") } err = s.checksService.DisableChecks(disableChecks) if err != nil { - return nil, errors.Wrap(err, "failed to disable security checks") + return nil, errors.Wrap(err, "failed to disable advisor checks") } - return &managementv1.ChangeSecurityChecksResponse{}, nil + return &managementv1.ChangeAdvisorChecksResponse{}, nil } -// convertInterval converts check.Interval type to managementv1.SecurityCheckInterval. -func convertInterval(interval check.Interval) managementv1.SecurityCheckInterval { +// convertInterval converts check.Interval type to managementv1.AdvisorCheckInterval. +func convertInterval(interval check.Interval) managementv1.AdvisorCheckInterval { switch interval { case check.Standard, "": // empty interval means standard - return managementv1.SecurityCheckInterval_SECURITY_CHECK_INTERVAL_STANDARD + return managementv1.AdvisorCheckInterval_ADVISOR_CHECK_INTERVAL_STANDARD case check.Frequent: - return managementv1.SecurityCheckInterval_SECURITY_CHECK_INTERVAL_FREQUENT + return managementv1.AdvisorCheckInterval_ADVISOR_CHECK_INTERVAL_FREQUENT case check.Rare: - return managementv1.SecurityCheckInterval_SECURITY_CHECK_INTERVAL_RARE + return managementv1.AdvisorCheckInterval_ADVISOR_CHECK_INTERVAL_RARE default: - return managementv1.SecurityCheckInterval_SECURITY_CHECK_INTERVAL_UNSPECIFIED + return managementv1.AdvisorCheckInterval_ADVISOR_CHECK_INTERVAL_UNSPECIFIED } } @@ -364,18 +364,18 @@ func convertFamily(family check.Family) managementv1.AdvisorCheckFamily { } } -// convertAPIInterval converts managementv1.SecurityCheckInterval type to check.Interval. -func convertAPIInterval(interval managementv1.SecurityCheckInterval) (check.Interval, error) { +// convertAPIInterval converts managementv1.AdvisorCheckInterval type to check.Interval. +func convertAPIInterval(interval managementv1.AdvisorCheckInterval) (check.Interval, error) { switch interval { - case managementv1.SecurityCheckInterval_SECURITY_CHECK_INTERVAL_STANDARD: + case managementv1.AdvisorCheckInterval_ADVISOR_CHECK_INTERVAL_STANDARD: return check.Standard, nil - case managementv1.SecurityCheckInterval_SECURITY_CHECK_INTERVAL_FREQUENT: + case managementv1.AdvisorCheckInterval_ADVISOR_CHECK_INTERVAL_FREQUENT: return check.Frequent, nil - case managementv1.SecurityCheckInterval_SECURITY_CHECK_INTERVAL_RARE: + case managementv1.AdvisorCheckInterval_ADVISOR_CHECK_INTERVAL_RARE: return check.Rare, nil - case managementv1.SecurityCheckInterval_SECURITY_CHECK_INTERVAL_UNSPECIFIED: - return check.Interval(""), errors.New("invalid security check interval") + case managementv1.AdvisorCheckInterval_ADVISOR_CHECK_INTERVAL_UNSPECIFIED: + return "", errors.New("invalid advisor check interval") default: - return check.Interval(""), errors.New("unknown security check interval") + return "", errors.New("unknown advisor check interval") } } diff --git a/managed/services/management/checks_test.go b/managed/services/management/checks_test.go index 05ead91fb4..7bebed3ecb 100644 --- a/managed/services/management/checks_test.go +++ b/managed/services/management/checks_test.go @@ -34,15 +34,15 @@ import ( "github.com/percona/pmm/managed/utils/tests" ) -func TestStartSecurityChecks(t *testing.T) { +func TestStartAdvisorChecks(t *testing.T) { t.Run("internal error", func(t *testing.T) { var checksService mockChecksService checksService.On("StartChecks", []string(nil)).Return(errors.New("random error")) s := NewChecksAPIService(&checksService) - resp, err := s.StartSecurityChecks(context.Background(), &managementv1.StartSecurityChecksRequest{}) - assert.EqualError(t, err, "failed to start security checks: random error") + resp, err := s.StartAdvisorChecks(context.Background(), &managementv1.StartAdvisorChecksRequest{}) + assert.EqualError(t, err, "failed to start advisor checks: random error") assert.Nil(t, resp) }) @@ -52,7 +52,7 @@ func TestStartSecurityChecks(t *testing.T) { s := NewChecksAPIService(&checksService) - resp, err := s.StartSecurityChecks(context.Background(), &managementv1.StartSecurityChecksRequest{}) + resp, err := s.StartAdvisorChecks(context.Background(), &managementv1.StartAdvisorChecksRequest{}) tests.AssertGRPCError(t, status.New(codes.FailedPrecondition, "Advisor checks are disabled."), err) assert.Nil(t, resp) }) @@ -303,7 +303,7 @@ func TestListFailedServices(t *testing.T) { }) } -func TestListSecurityChecks(t *testing.T) { +func TestListAdvisorChecks(t *testing.T) { t.Run("normal", func(t *testing.T) { var checksService mockChecksService checksService.On("GetDisabledChecks", mock.Anything).Return([]string{"two"}, nil) @@ -317,16 +317,16 @@ func TestListSecurityChecks(t *testing.T) { s := NewChecksAPIService(&checksService) - resp, err := s.ListSecurityChecks(context.Background(), nil) + resp, err := s.ListAdvisorChecks(context.Background(), nil) require.NoError(t, err) require.NotNil(t, resp) assert.ElementsMatch(t, resp.Checks, - []*managementv1.SecurityCheck{ - {Name: "one", Enabled: true, Interval: managementv1.SecurityCheckInterval_SECURITY_CHECK_INTERVAL_STANDARD}, - {Name: "two", Enabled: false, Interval: managementv1.SecurityCheckInterval_SECURITY_CHECK_INTERVAL_FREQUENT}, - {Name: "three", Enabled: true, Interval: managementv1.SecurityCheckInterval_SECURITY_CHECK_INTERVAL_RARE}, - {Name: "four", Enabled: true, Interval: managementv1.SecurityCheckInterval_SECURITY_CHECK_INTERVAL_STANDARD}, + []*managementv1.AdvisorCheck{ + {Name: "one", Enabled: true, Interval: managementv1.AdvisorCheckInterval_ADVISOR_CHECK_INTERVAL_STANDARD}, + {Name: "two", Enabled: false, Interval: managementv1.AdvisorCheckInterval_ADVISOR_CHECK_INTERVAL_FREQUENT}, + {Name: "three", Enabled: true, Interval: managementv1.AdvisorCheckInterval_ADVISOR_CHECK_INTERVAL_RARE}, + {Name: "four", Enabled: true, Interval: managementv1.AdvisorCheckInterval_ADVISOR_CHECK_INTERVAL_STANDARD}, }, ) }) @@ -337,33 +337,33 @@ func TestListSecurityChecks(t *testing.T) { s := NewChecksAPIService(&checksService) - resp, err := s.ListSecurityChecks(context.Background(), nil) + resp, err := s.ListAdvisorChecks(context.Background(), nil) assert.EqualError(t, err, "failed to get disabled checks list: random error") assert.Nil(t, resp) }) } -func TestUpdateSecurityChecks(t *testing.T) { - t.Run("enable security checks error", func(t *testing.T) { +func TestUpdateAdvisorChecks(t *testing.T) { + t.Run("enable advisor checks error", func(t *testing.T) { var checksService mockChecksService checksService.On("EnableChecks", mock.Anything).Return(errors.New("random error")) s := NewChecksAPIService(&checksService) - resp, err := s.ChangeSecurityChecks(context.Background(), &managementv1.ChangeSecurityChecksRequest{}) - assert.EqualError(t, err, "failed to enable disabled security checks: random error") + resp, err := s.ChangeAdvisorChecks(context.Background(), &managementv1.ChangeAdvisorChecksRequest{}) + assert.EqualError(t, err, "failed to enable disabled advisor checks: random error") assert.Nil(t, resp) }) - t.Run("disable security checks error", func(t *testing.T) { + t.Run("disable advisor checks error", func(t *testing.T) { var checksService mockChecksService checksService.On("EnableChecks", mock.Anything).Return(nil) checksService.On("DisableChecks", mock.Anything).Return(errors.New("random error")) s := NewChecksAPIService(&checksService) - resp, err := s.ChangeSecurityChecks(context.Background(), &managementv1.ChangeSecurityChecksRequest{}) - assert.EqualError(t, err, "failed to disable security checks: random error") + resp, err := s.ChangeAdvisorChecks(context.Background(), &managementv1.ChangeAdvisorChecksRequest{}) + assert.EqualError(t, err, "failed to disable advisor checks: random error") assert.Nil(t, resp) }) @@ -373,13 +373,13 @@ func TestUpdateSecurityChecks(t *testing.T) { s := NewChecksAPIService(&checksService) - resp, err := s.ChangeSecurityChecks(context.Background(), &managementv1.ChangeSecurityChecksRequest{ - Params: []*managementv1.ChangeSecurityCheckParams{{ + resp, err := s.ChangeAdvisorChecks(context.Background(), &managementv1.ChangeAdvisorChecksRequest{ + Params: []*managementv1.ChangeAdvisorCheckParams{{ Name: "check-name", - Interval: managementv1.SecurityCheckInterval_SECURITY_CHECK_INTERVAL_STANDARD, + Interval: managementv1.AdvisorCheckInterval_ADVISOR_CHECK_INTERVAL_STANDARD, }}, }) - assert.EqualError(t, err, "failed to change security check interval: random error") + assert.EqualError(t, err, "failed to change advisor check interval: random error") assert.Nil(t, resp) }) @@ -391,14 +391,14 @@ func TestUpdateSecurityChecks(t *testing.T) { s := NewChecksAPIService(&checksService) - resp, err := s.ChangeSecurityChecks(context.Background(), &managementv1.ChangeSecurityChecksRequest{ - Params: []*managementv1.ChangeSecurityCheckParams{{ + resp, err := s.ChangeAdvisorChecks(context.Background(), &managementv1.ChangeAdvisorChecksRequest{ + Params: []*managementv1.ChangeAdvisorCheckParams{{ Name: "check-name", - Interval: managementv1.SecurityCheckInterval_SECURITY_CHECK_INTERVAL_STANDARD, + Interval: managementv1.AdvisorCheckInterval_ADVISOR_CHECK_INTERVAL_UNSPECIFIED, }}, }) require.NoError(t, err) - assert.Equal(t, &managementv1.ChangeSecurityChecksResponse{}, resp) + assert.Equal(t, &managementv1.ChangeAdvisorChecksResponse{}, resp) }) }