diff --git a/cmd/ingestionapikey.go b/cmd/ingestionapikey.go deleted file mode 100644 index c2c531a3..00000000 --- a/cmd/ingestionapikey.go +++ /dev/null @@ -1,20 +0,0 @@ -package cmd - -import ( - "github.com/spf13/cobra" - "github.com/stackvista/stackstate-cli/cmd/ingestionapikey" - "github.com/stackvista/stackstate-cli/internal/di" -) - -func IngestionApiKeyCommand(deps *di.Deps) *cobra.Command { - cmd := &cobra.Command{ - Use: "ingestion-api-key", - Short: "Manage Ingestion API Keys", - Long: "Manage API Keys used by ingestion pipelines, means data (spans, metrics, logs an so on) send by STS Agent, OTel and so on.", - } - - cmd.AddCommand(ingestionapikey.CreateCommand(deps)) - cmd.AddCommand(ingestionapikey.ListCommand(deps)) - cmd.AddCommand(ingestionapikey.DeleteCommand(deps)) - return cmd -} diff --git a/cmd/ingestionapikey/ingestionapikey_create.go b/cmd/ingestionapikey/ingestionapikey_create.go deleted file mode 100644 index a37b5e99..00000000 --- a/cmd/ingestionapikey/ingestionapikey_create.go +++ /dev/null @@ -1,71 +0,0 @@ -package ingestionapikey - -import ( - "fmt" - "time" - - "github.com/gookit/color" - "github.com/spf13/cobra" - "github.com/stackvista/stackstate-cli/generated/stackstate_api" - "github.com/stackvista/stackstate-cli/internal/common" - "github.com/stackvista/stackstate-cli/internal/di" -) - -const ( - DateFormat = "2006-01-02" -) - -type CreateArgs struct { - Name string - Expiration time.Time - Description string -} - -func CreateCommand(deps *di.Deps) *cobra.Command { - args := &CreateArgs{} - cmd := &cobra.Command{ - Use: "create", - Short: "Create a new Ingestion Api Key", - Long: "Creates a token and then returns it in the response, the token can't be obtained any more after that so store it in the safe space.", - RunE: deps.CmdRunEWithApi(RunIngestionApiKeyGenerationCommand(args)), - } - - common.AddRequiredNameFlagVar(cmd, &args.Name, "Name of the API Key") - cmd.Flags().TimeVar(&args.Expiration, "expiration", time.Time{}, []string{DateFormat}, "Expiration date of the API Key") - cmd.Flags().StringVar(&args.Description, "description", "", "Optional description of the API Key") - return cmd -} - -func RunIngestionApiKeyGenerationCommand(args *CreateArgs) di.CmdWithApiFn { - return func(cmd *cobra.Command, cli *di.Deps, api *stackstate_api.APIClient, serverInfo *stackstate_api.ServerInfo) common.CLIError { - req := stackstate_api.GenerateIngestionApiKeyRequest{ - Name: args.Name, - } - - if len(args.Description) > 0 { - req.Description = &args.Description - } - - if !args.Expiration.IsZero() { - m := args.Expiration.UnixMilli() - req.Expiration = &m - } - - ingestionApiKeyAPI := api.IngestionApiKeyApi.GenerateIngestionApiKey(cli.Context) - - serviceToken, resp, err := ingestionApiKeyAPI.GenerateIngestionApiKeyRequest(req).Execute() - if err != nil { - return common.NewResponseError(err, resp) - } - - if cli.IsJson() { - cli.Printer.PrintJson(map[string]interface{}{ - "ingestion-api-key": serviceToken, - }) - } else { - cli.Printer.Success(fmt.Sprintf("Ingestion API Key generated: %s\n", color.White.Render(serviceToken.ApiKey))) - } - - return nil - } -} diff --git a/cmd/ingestionapikey/ingestionapikey_create_test.go b/cmd/ingestionapikey/ingestionapikey_create_test.go deleted file mode 100644 index 2768a15f..00000000 --- a/cmd/ingestionapikey/ingestionapikey_create_test.go +++ /dev/null @@ -1,93 +0,0 @@ -package ingestionapikey - -import ( - "testing" - - "github.com/stackvista/stackstate-cli/generated/stackstate_api" - "github.com/stackvista/stackstate-cli/internal/di" - "github.com/stretchr/testify/assert" -) - -func TestIngestApiKeyGenerate(t *testing.T) { - cli := di.NewMockDeps(t) - cmd := CreateCommand(&cli.Deps) - - cli.MockClient.ApiMocks.IngestionApiKeyApi.GenerateIngestionApiKeyResponse.Result = stackstate_api.GeneratedIngestionApiKeyResponse{ - Name: "test-token", - ApiKey: "test-token-key", - Expiration: int64p(1590105600000), - Description: stringp("test-token-description"), - } - - di.ExecuteCommandWithContextUnsafe(&cli.Deps, cmd, "--name", "test-token", "--description", "test-token-description", "--expiration", "2020-05-22") - - checkCreateCall(t, cli.MockClient.ApiMocks.IngestionApiKeyApi.GenerateIngestionApiKeyCalls, "test-token", stringp("test-token-description"), int64p(1590105600000)) - assert.Equal(t, []string{"Ingestion API Key generated: \x1b[37mtest-token-key\x1b[0m\n"}, *cli.MockPrinter.SuccessCalls) -} - -func TestIngestApiKeyGenerateOnlyRequriedFlags(t *testing.T) { - cli := di.NewMockDeps(t) - cmd := CreateCommand(&cli.Deps) - - cli.MockClient.ApiMocks.IngestionApiKeyApi.GenerateIngestionApiKeyResponse.Result = stackstate_api.GeneratedIngestionApiKeyResponse{ - Name: "test-token2", - ApiKey: "test-token2-key", - } - - di.ExecuteCommandWithContextUnsafe(&cli.Deps, cmd, "--name", "test-token2") - - checkCreateCall(t, cli.MockClient.ApiMocks.IngestionApiKeyApi.GenerateIngestionApiKeyCalls, "test-token2", nil, nil) - assert.Equal(t, []string{"Ingestion API Key generated: \x1b[37mtest-token2-key\x1b[0m\n"}, *cli.MockPrinter.SuccessCalls) -} - -func TestIngestApiKeyGenerateJSON(t *testing.T) { - cli := di.NewMockDeps(t) - cmd := CreateCommand(&cli.Deps) - - r := &stackstate_api.GeneratedIngestionApiKeyResponse{ - Name: "test-token", - ApiKey: "test-token-key", - Expiration: int64p(1590105600000), - Description: stringp("test-token-description"), - } - - cli.MockClient.ApiMocks.IngestionApiKeyApi.GenerateIngestionApiKeyResponse.Result = *r - - di.ExecuteCommandWithContextUnsafe(&cli.Deps, cmd, "--name", "test-token", "--description", "test-token-description", "--expiration", "2020-05-22", "-o", "json") - - checkCreateCall(t, cli.MockClient.ApiMocks.IngestionApiKeyApi.GenerateIngestionApiKeyCalls, "test-token", stringp("test-token-description"), int64p(1590105600000)) - assert.Equal(t, - []map[string]interface{}{{ - "ingestion-api-key": r, - }}, - *cli.MockPrinter.PrintJsonCalls, - ) - assert.False(t, cli.MockPrinter.HasNonJsonCalls) -} - -func int64p(i int64) *int64 { - return &i -} - -func stringp(i string) *string { - return &i -} - -func checkCreateCall(t *testing.T, calls *[]stackstate_api.GenerateIngestionApiKeyCall, name string, description *string, expiration *int64) { - assert.Len(t, *calls, 1) - - call := (*calls)[0] - assert.Equal(t, name, call.PgenerateIngestionApiKeyRequest.Name) - - if description != nil { - assert.Equal(t, *description, *call.PgenerateIngestionApiKeyRequest.Description) - } else { - assert.Nil(t, call.PgenerateIngestionApiKeyRequest.Description) - } - - if expiration != nil { - assert.Equal(t, *expiration, *call.PgenerateIngestionApiKeyRequest.Expiration) - } else { - assert.Nil(t, call.PgenerateIngestionApiKeyRequest.Expiration) - } -} diff --git a/cmd/ingestionapikey/ingestionapikey_delete.go b/cmd/ingestionapikey/ingestionapikey_delete.go deleted file mode 100644 index f80a16da..00000000 --- a/cmd/ingestionapikey/ingestionapikey_delete.go +++ /dev/null @@ -1,47 +0,0 @@ -package ingestionapikey - -import ( - "fmt" - - "github.com/spf13/cobra" - "github.com/stackvista/stackstate-cli/generated/stackstate_api" - "github.com/stackvista/stackstate-cli/internal/common" - "github.com/stackvista/stackstate-cli/internal/di" -) - -type DeleteArgs struct { - ID int64 -} - -func DeleteCommand(deps *di.Deps) *cobra.Command { - args := &DeleteArgs{} - cmd := &cobra.Command{ - Use: "delete", - Short: "Delete an Ingestion Api Key", - Long: "Deleted key can't be used by sources, so all ingestion pipelines for that key will fail.", - RunE: deps.CmdRunEWithApi(RunIngestionApiKeyDeleteCommand(args)), - } - - common.AddRequiredIDFlagVar(cmd, &args.ID, "ID of the Ingestion Api Key to delete") - - return cmd -} - -func RunIngestionApiKeyDeleteCommand(args *DeleteArgs) di.CmdWithApiFn { - return func(cmd *cobra.Command, cli *di.Deps, api *stackstate_api.APIClient, serverInfo *stackstate_api.ServerInfo) common.CLIError { - resp, err := api.IngestionApiKeyApi.DeleteIngestionApiKey(cli.Context, args.ID).Execute() - if err != nil { - return common.NewResponseError(err, resp) - } - - if cli.IsJson() { - cli.Printer.PrintJson(map[string]interface{}{ - "deleted-ingestion-api-key": args.ID, - }) - } else { - cli.Printer.Success(fmt.Sprintf("Ingestion Api Key deleted: %d", args.ID)) - } - - return nil - } -} diff --git a/cmd/ingestionapikey/ingestionapikey_delete_test.go b/cmd/ingestionapikey/ingestionapikey_delete_test.go deleted file mode 100644 index b6573688..00000000 --- a/cmd/ingestionapikey/ingestionapikey_delete_test.go +++ /dev/null @@ -1,30 +0,0 @@ -package ingestionapikey - -import ( - "testing" - - "github.com/stackvista/stackstate-cli/internal/di" - "github.com/stretchr/testify/assert" -) - -func TestDeleteShouldFailOnNonIntID(t *testing.T) { - cli := di.NewMockDeps(t) - cmd := DeleteCommand(&cli.Deps) - - _, err := di.ExecuteCommandWithContext(&cli.Deps, cmd, "--id", "foo") - - assert.NotNil(t, err) - assert.Contains(t, err.Error(), "invalid argument \"foo\" for \"-i, --id\"") -} - -func TestDelete(t *testing.T) { - cli := di.NewMockDeps(t) - cmd := DeleteCommand(&cli.Deps) - - di.ExecuteCommandWithContextUnsafe(&cli.Deps, cmd, "--id", "1") - - assert.Len(t, *cli.MockClient.ApiMocks.IngestionApiKeyApi.DeleteIngestionApiKeyCalls, 1) - assert.Equal(t, int64(1), (*cli.MockClient.ApiMocks.IngestionApiKeyApi.DeleteIngestionApiKeyCalls)[0].PingestionApiKeyId) - - assert.Equal(t, []string{"Ingestion Api Key deleted: 1"}, *cli.MockPrinter.SuccessCalls) -} diff --git a/cmd/ingestionapikey/ingestionapikey_list.go b/cmd/ingestionapikey/ingestionapikey_list.go deleted file mode 100644 index 11d9670f..00000000 --- a/cmd/ingestionapikey/ingestionapikey_list.go +++ /dev/null @@ -1,58 +0,0 @@ -package ingestionapikey - -import ( - "sort" - "time" - - "github.com/spf13/cobra" - "github.com/stackvista/stackstate-cli/generated/stackstate_api" - "github.com/stackvista/stackstate-cli/internal/common" - "github.com/stackvista/stackstate-cli/internal/di" - "github.com/stackvista/stackstate-cli/internal/printer" -) - -func ListCommand(deps *di.Deps) *cobra.Command { - cmd := &cobra.Command{ - Use: "list", - Short: "List Ingestion Api Keys", - Long: "Returns only metadata without a key itself.", - RunE: deps.CmdRunEWithApi(RunIngestionApiKeyListCommand), - } - - return cmd -} - -func RunIngestionApiKeyListCommand(cmd *cobra.Command, cli *di.Deps, api *stackstate_api.APIClient, serverInfo *stackstate_api.ServerInfo) common.CLIError { - ingestionApiKeys, resp, err := api.IngestionApiKeyApi.GetIngestionApiKeys(cli.Context).Execute() - if err != nil { - return common.NewResponseError(err, resp) - } - - sort.SliceStable(ingestionApiKeys, func(i, j int) bool { - return ingestionApiKeys[i].Name < ingestionApiKeys[j].Name - }) - - if cli.IsJson() { - cli.Printer.PrintJson(map[string]interface{}{ - "ingestion-api-keys": ingestionApiKeys, - }) - } else { - data := make([][]interface{}, 0) - for _, ingestionApiKey := range ingestionApiKeys { - sid := ingestionApiKey.Id - exp := "" - if ingestionApiKey.Expiration != nil { - exp = time.UnixMilli(*ingestionApiKey.Expiration).Format(DateFormat) - } - data = append(data, []interface{}{sid, ingestionApiKey.Name, exp, ingestionApiKey.Description}) - } - - cli.Printer.Table(printer.TableData{ - Header: []string{"id", "name", "expiration", "description"}, - Data: data, - MissingTableDataMsg: printer.NotFoundMsg{Types: "ingestion api keys"}, - }) - } - - return nil -} diff --git a/cmd/ingestionapikey/ingestionapikey_list_test.go b/cmd/ingestionapikey/ingestionapikey_list_test.go deleted file mode 100644 index 33982b7f..00000000 --- a/cmd/ingestionapikey/ingestionapikey_list_test.go +++ /dev/null @@ -1,46 +0,0 @@ -package ingestionapikey - -import ( - "testing" - - "github.com/stackvista/stackstate-cli/generated/stackstate_api" - "github.com/stackvista/stackstate-cli/internal/di" - "github.com/stackvista/stackstate-cli/internal/printer" - "github.com/stretchr/testify/assert" -) - -func TestIngestionApiKeyList(t *testing.T) { - cli := di.NewMockDeps(t) - cmd := ListCommand(&cli.Deps) - key1desc := "main key" - - cli.MockClient.ApiMocks.IngestionApiKeyApi.GetIngestionApiKeysResponse.Result = []stackstate_api.IngestionApiKey{ - { - Id: 1, - Name: "key1", - Description: &key1desc, - Expiration: int64p(1590105600000), - }, - { - Id: 2, - Name: "key2", - Description: nil, - Expiration: nil, - }, - } - - di.ExecuteCommandWithContextUnsafe(&cli.Deps, cmd) - - tableData := []printer.TableData{ - { - Header: []string{"id", "name", "expiration", "description"}, - Data: [][]interface{}{ - {int64(1), "key1", "2020-05-22", &key1desc}, - {int64(2), "key2", "", (*string)(nil)}, - }, - MissingTableDataMsg: printer.NotFoundMsg{Types: "ingestion api keys"}, - }, - } - - assert.Equal(t, tableData, *cli.MockPrinter.TableCalls) -} diff --git a/cmd/sts.go b/cmd/sts.go index adfcc003..76b9f800 100644 --- a/cmd/sts.go +++ b/cmd/sts.go @@ -28,7 +28,6 @@ func STSCommand(cli *di.Deps) *cobra.Command { cmd.AddCommand(RbacCommand(cli)) cmd.AddCommand(TopicCommand(cli)) cmd.AddCommand(TopologySyncCommand(cli)) - cmd.AddCommand(IngestionApiKeyCommand(cli)) cmd.AddCommand(AgentCommand(cli)) return cmd diff --git a/generated/stackstate_api/.openapi-generator/FILES b/generated/stackstate_api/.openapi-generator/FILES index b754aef2..69d42fac 100644 --- a/generated/stackstate_api/.openapi-generator/FILES +++ b/generated/stackstate_api/.openapi-generator/FILES @@ -6,7 +6,6 @@ api/openapi.yaml api_agent_leases.go api_agent_registrations.go api_api_token.go -api_authorize_ingestion_api_key.go api_component.go api_dashboards.go api_dummy.go @@ -14,7 +13,6 @@ api_event.go api_export.go api_health_synchronization.go api_import.go -api_ingestion_api_key.go api_kubernetes_logs.go api_layout.go api_metric.go @@ -67,8 +65,6 @@ docs/ArgumentStructTypeVal.md docs/ArgumentTimeWindowVal.md docs/ArgumentTopologyPromQLMetricVal.md docs/ArgumentTopologyQueryVal.md -docs/AuthorizeIngestionApiKeyApi.md -docs/AuthorizeIngestionApiKeyRequest.md docs/BaseLayoutHint.md docs/BaseMonitorError.md docs/BaseNotificationChannel.md @@ -148,8 +144,6 @@ docs/ExternalMonitorDefId.md docs/FAQ.md docs/FailingHealthStateValue.md docs/FullStackPack.md -docs/GenerateIngestionApiKeyRequest.md -docs/GeneratedIngestionApiKeyResponse.md docs/GenericApiError.md docs/GenericErrorsResponse.md docs/GetCausingEventsBadRequest.md @@ -185,10 +179,6 @@ docs/HealthSubStreamTransactionalIncrements.md docs/HealthSynchronizationApi.md docs/IdentifierType.md docs/ImportApi.md -docs/IngestionApiKey.md -docs/IngestionApiKeyApi.md -docs/IngestionApiKeyCreateError.md -docs/IngestionApiKeyInvalidExpiryError.md docs/InstantNanoPrecision.md docs/InvalidMonitorIdentifierError.md docs/InvalidNotificationConfigurationIdentifier.md @@ -495,7 +485,6 @@ model_argument_struct_type_val.go model_argument_time_window_val.go model_argument_topology_prom_ql_metric_val.go model_argument_topology_query_val.go -model_authorize_ingestion_api_key_request.go model_base_layout_hint.go model_base_monitor_error.go model_base_notification_channel.go @@ -570,8 +559,6 @@ model_external_monitor_def_id.go model_failing_health_state_value.go model_faq.go model_full_stack_pack.go -model_generate_ingestion_api_key_request.go -model_generated_ingestion_api_key_response.go model_generic_api_error.go model_generic_errors_response.go model_get_causing_events_bad_request.go @@ -605,9 +592,6 @@ model_health_sub_stream_snapshot.go model_health_sub_stream_status.go model_health_sub_stream_transactional_increments.go model_identifier_type.go -model_ingestion_api_key.go -model_ingestion_api_key_create_error.go -model_ingestion_api_key_invalid_expiry_error.go model_instant_nano_precision.go model_invalid_monitor_identifier_error.go model_invalid_notification_configuration_identifier.go diff --git a/generated/stackstate_api/README.md b/generated/stackstate_api/README.md index 9f104ca1..711d5db3 100644 --- a/generated/stackstate_api/README.md +++ b/generated/stackstate_api/README.md @@ -90,7 +90,6 @@ Class | Method | HTTP request | Description *AgentLeasesApi* | [**AgentCheckLease**](docs/AgentLeasesApi.md#agentchecklease) | **Post** /agents/{agentId}/checkLease | Check the lease of an agent. *AgentRegistrationsApi* | [**AllAgentRegistrations**](docs/AgentRegistrationsApi.md#allagentregistrations) | **Get** /agents | Overview of registered agents *ApiTokenApi* | [**GetCurrentUserApiTokens**](docs/ApiTokenApi.md#getcurrentuserapitokens) | **Get** /user/profile/tokens | Get current user's API tokens -*AuthorizeIngestionApiKeyApi* | [**AuthorizeIngestionApiKey**](docs/AuthorizeIngestionApiKeyApi.md#authorizeingestionapikey) | **Post** /security/ingestion/authorize | Check authorization for an Ingestion Api Key *ComponentApi* | [**GetComponentHealthHistory**](docs/ComponentApi.md#getcomponenthealthhistory) | **Get** /components/{componentIdOrUrn}/healthHistory | Get a component health history *DashboardsApi* | [**CloneDashboard**](docs/DashboardsApi.md#clonedashboard) | **Post** /dashboards/{dashboardIdOrUrn}/clone | Clone a dashboard *DashboardsApi* | [**CreateDashboard**](docs/DashboardsApi.md#createdashboard) | **Post** /dashboards | Create a new dashboard @@ -115,9 +114,6 @@ Class | Method | HTTP request | Description *HealthSynchronizationApi* | [**GetHealthSynchronizationSubStreamTopologyMatches**](docs/HealthSynchronizationApi.md#gethealthsynchronizationsubstreamtopologymatches) | **Get** /synchronization/health/streams/{healthStreamUrn}/substreams/{healthSyncSubStreamId}/topologyMatches | List health sync sub-stream check-states *HealthSynchronizationApi* | [**PostHealthSynchronizationStreamClearErrors**](docs/HealthSynchronizationApi.md#posthealthsynchronizationstreamclearerrors) | **Post** /synchronization/health/streams/{healthStreamUrn}/clearErrors | Clear health sync stream errors *ImportApi* | [**ImportSettings**](docs/ImportApi.md#importsettings) | **Post** /import | Import settings -*IngestionApiKeyApi* | [**DeleteIngestionApiKey**](docs/IngestionApiKeyApi.md#deleteingestionapikey) | **Delete** /security/ingestion/api_keys/{ingestionApiKeyId} | Delete Ingestion Api Key -*IngestionApiKeyApi* | [**GenerateIngestionApiKey**](docs/IngestionApiKeyApi.md#generateingestionapikey) | **Post** /security/ingestion/api_keys | Generate a new Ingestion Api Key -*IngestionApiKeyApi* | [**GetIngestionApiKeys**](docs/IngestionApiKeyApi.md#getingestionapikeys) | **Get** /security/ingestion/api_keys | List Ingestion Api Keys *KubernetesLogsApi* | [**GetKubernetesLogs**](docs/KubernetesLogsApi.md#getkuberneteslogs) | **Get** /k8s/logs | Get Kubernetes logs *KubernetesLogsApi* | [**GetKubernetesLogsAutocomplete**](docs/KubernetesLogsApi.md#getkuberneteslogsautocomplete) | **Get** /k8s/logs/autocomplete | Get Kubernetes logs autocomplete values *KubernetesLogsApi* | [**GetKubernetesLogsHistogram**](docs/KubernetesLogsApi.md#getkuberneteslogshistogram) | **Get** /k8s/logs/histogram | Get Kubernetes logs histogram @@ -265,7 +261,6 @@ Class | Method | HTTP request | Description - [ArgumentTimeWindowVal](docs/ArgumentTimeWindowVal.md) - [ArgumentTopologyPromQLMetricVal](docs/ArgumentTopologyPromQLMetricVal.md) - [ArgumentTopologyQueryVal](docs/ArgumentTopologyQueryVal.md) - - [AuthorizeIngestionApiKeyRequest](docs/AuthorizeIngestionApiKeyRequest.md) - [BaseLayoutHint](docs/BaseLayoutHint.md) - [BaseMonitorError](docs/BaseMonitorError.md) - [BaseNotificationChannel](docs/BaseNotificationChannel.md) @@ -340,8 +335,6 @@ Class | Method | HTTP request | Description - [FAQ](docs/FAQ.md) - [FailingHealthStateValue](docs/FailingHealthStateValue.md) - [FullStackPack](docs/FullStackPack.md) - - [GenerateIngestionApiKeyRequest](docs/GenerateIngestionApiKeyRequest.md) - - [GeneratedIngestionApiKeyResponse](docs/GeneratedIngestionApiKeyResponse.md) - [GenericApiError](docs/GenericApiError.md) - [GenericErrorsResponse](docs/GenericErrorsResponse.md) - [GetCausingEventsBadRequest](docs/GetCausingEventsBadRequest.md) @@ -375,9 +368,6 @@ Class | Method | HTTP request | Description - [HealthSubStreamStatus](docs/HealthSubStreamStatus.md) - [HealthSubStreamTransactionalIncrements](docs/HealthSubStreamTransactionalIncrements.md) - [IdentifierType](docs/IdentifierType.md) - - [IngestionApiKey](docs/IngestionApiKey.md) - - [IngestionApiKeyCreateError](docs/IngestionApiKeyCreateError.md) - - [IngestionApiKeyInvalidExpiryError](docs/IngestionApiKeyInvalidExpiryError.md) - [InstantNanoPrecision](docs/InstantNanoPrecision.md) - [InvalidMonitorIdentifierError](docs/InvalidMonitorIdentifierError.md) - [InvalidNotificationConfigurationIdentifier](docs/InvalidNotificationConfigurationIdentifier.md) diff --git a/generated/stackstate_api/api/openapi.yaml b/generated/stackstate_api/api/openapi.yaml index e691a8d3..7e8b8372 100644 --- a/generated/stackstate_api/api/openapi.yaml +++ b/generated/stackstate_api/api/openapi.yaml @@ -3626,117 +3626,6 @@ paths: summary: Delete service token tags: - serviceToken - /security/ingestion/api_keys: - get: - description: Returns only metadata without token itself - operationId: getIngestionApiKeys - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/IngestionApiKey' - type: array - description: All Ingestion Api Keys - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/GenericErrorsResponse' - description: Error when handling the request on the server side. - summary: List Ingestion Api Keys - tags: - - ingestionApiKey - post: - description: "Generates token and then returns it in the response, the token\ - \ can't be obtained any more after that" - operationId: generateIngestionApiKey - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/GenerateIngestionApiKeyRequest' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/GeneratedIngestionApiKeyResponse' - description: The newly generated Ingestion Api Key - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/IngestionApiKeyCreateError' - description: Invalid arguments - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/GenericErrorsResponse' - description: Error when handling the request on the server side. - summary: Generate a new Ingestion Api Key - tags: - - ingestionApiKey - /security/ingestion/authorize: - post: - description: Checks if an ingestion api key is valid - operationId: authorizeIngestionApiKey - parameters: - - description: "By default, the endpoint uses only Ingestion API Keys, true\ - \ value - to verify also Receiver API Key" - in: query - name: withReceiverKey - required: false - schema: - default: false - type: boolean - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/AuthorizeIngestionApiKeyRequest' - required: true - responses: - "204": - description: Ingestion Api Key is valid - "403": - description: Forbidden - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/GenericErrorsResponse' - description: Error when handling the request on the server side. - summary: Check authorization for an Ingestion Api Key - tags: - - authorizeIngestionApiKey - /security/ingestion/api_keys/{ingestionApiKeyId}: - delete: - description: "Deleted token can't be used by sources, so all ingestion pipelines\ - \ for that key will fail" - operationId: deleteIngestionApiKey - parameters: - - description: The identifier of a key - in: path - name: ingestionApiKeyId - required: true - schema: - $ref: '#/components/schemas/IngestionApiKeyId' - responses: - "204": - description: The key has been deleted - "500": - content: - application/json: - schema: - $ref: '#/components/schemas/GenericErrorsResponse' - description: Error when handling the request on the server side. - summary: Delete Ingestion Api Key - tags: - - ingestionApiKey /security/permissions/list: get: description: Get a list of available permissions @@ -8090,25 +7979,24 @@ components: type: object MonitorIdentifierLookup: example: - componentType: 0 metricQuery: metricQuery overrides: - timeSeries: 5 - components: 1 - topN: 6 + timeSeries: 1 + components: 6 + componentTypeName: componentTypeName + topN: 0 properties: metricQuery: type: string - componentType: - format: int64 - type: integer + componentTypeName: + type: string topN: format: int32 type: integer overrides: $ref: '#/components/schemas/MonitorIdentifierLookup_overrides' required: - - componentType + - componentTypeName - metricQuery type: object MonitorIdentifierSuggestions: @@ -8332,10 +8220,8 @@ components: message: message component: identifier: identifier - cluster: cluster iconbase64: iconbase64 name: name - namespace: namespace id: 1 type: type troubleshootingSteps: troubleshootingSteps @@ -8464,10 +8350,8 @@ components: MonitorCheckStatusComponent: example: identifier: identifier - cluster: cluster iconbase64: iconbase64 name: name - namespace: namespace id: 1 type: type properties: @@ -8482,10 +8366,6 @@ components: type: string iconbase64: type: string - namespace: - type: string - cluster: - type: string required: - id - identifier @@ -8518,10 +8398,8 @@ components: checkStatuses: - component: identifier: identifier - cluster: cluster iconbase64: iconbase64 name: name - namespace: namespace id: 1 type: type triggeredTimestamp: 5 @@ -8533,10 +8411,8 @@ components: id: 1 - component: identifier: identifier - cluster: cluster iconbase64: iconbase64 name: name - namespace: namespace id: 1 type: type triggeredTimestamp: 5 @@ -8565,10 +8441,8 @@ components: example: component: identifier: identifier - cluster: cluster iconbase64: iconbase64 name: name - namespace: namespace id: 1 type: type triggeredTimestamp: 5 @@ -8931,11 +8805,11 @@ components: monitorTags: - monitorTags - monitorTags + componentTypeNames: + - componentTypeNames + - componentTypeNames notifyHealthStates: null name: name - componentTypes: - - 0 - - 0 description: description notificationChannels: - null @@ -8961,10 +8835,9 @@ components: items: type: string type: array - componentTypes: + componentTypeNames: items: - format: int64 - type: integer + type: string type: array componentTags: items: @@ -8978,7 +8851,7 @@ components: type: array required: - componentTags - - componentTypes + - componentTypeNames - monitorTags - monitors - name @@ -9583,16 +9456,22 @@ components: id: format: int64 type: integer - componentTypeId: - format: int64 - type: integer + typeName: + type: string name: type: string + identifiers: + items: + type: string + type: array + iconbase64: + type: string required: - _type - - componentTypeId - id + - identifiers - name + - typeName type: object EventRelation: properties: @@ -9603,11 +9482,14 @@ components: id: format: int64 type: integer - relationTypeId: - format: int64 - type: integer + typeName: + type: string name: type: string + identifiers: + items: + type: string + type: array source: $ref: '#/components/schemas/EventComponent' target: @@ -9618,9 +9500,10 @@ components: - _type - dependencyDirection - id - - relationTypeId + - identifiers - source - target + - typeName type: object DependencyDirection: enum: @@ -10748,113 +10631,6 @@ components: ServiceTokenId: format: int64 type: integer - IngestionApiKey: - example: - lastUpdateTimestamp: 6 - name: name - description: description - expiration: 1 - id: 0 - properties: - id: - format: int64 - readOnly: true - type: integer - lastUpdateTimestamp: - format: int64 - readOnly: true - type: integer - name: - type: string - description: - type: string - expiration: - format: int64 - type: integer - required: - - id - - lastUpdateTimestamp - - name - type: object - GeneratedIngestionApiKeyResponse: - example: - lastUpdateTimestamp: 6 - apiKey: apiKey - name: name - description: description - expiration: 1 - id: 0 - properties: - id: - format: int64 - readOnly: true - type: integer - lastUpdateTimestamp: - format: int64 - readOnly: true - type: integer - name: - type: string - description: - type: string - expiration: - format: int64 - type: integer - apiKey: - type: string - required: - - apiKey - - id - - lastUpdateTimestamp - - name - type: object - IngestionApiKeyCreateError: - discriminator: - propertyName: _type - oneOf: - - $ref: '#/components/schemas/IngestionApiKeyInvalidExpiryError' - required: - - _type - IngestionApiKeyInvalidExpiryError: - properties: - _type: - enum: - - IngestionApiKeyInvalidExpiryError - type: string - message: - type: string - required: - - _type - - message - type: object - GenerateIngestionApiKeyRequest: - example: - name: name - description: description - expiration: 0 - properties: - name: - type: string - description: - type: string - expiration: - format: int64 - type: integer - required: - - name - type: object - AuthorizeIngestionApiKeyRequest: - example: - apiKey: apiKey - properties: - apiKey: - type: string - required: - - apiKey - type: object - IngestionApiKeyId: - format: int64 - type: integer Permissions: example: permissions: @@ -15417,8 +15193,8 @@ components: type: object MonitorIdentifierLookup_overrides: example: - timeSeries: 5 - components: 1 + timeSeries: 1 + components: 6 properties: components: format: int32 diff --git a/generated/stackstate_api/api_authorize_ingestion_api_key.go b/generated/stackstate_api/api_authorize_ingestion_api_key.go deleted file mode 100644 index 571b6909..00000000 --- a/generated/stackstate_api/api_authorize_ingestion_api_key.go +++ /dev/null @@ -1,241 +0,0 @@ -/* -StackState API - -This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). - -API version: 5.2.0 -Contact: info@stackstate.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackstate_api - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" -) - -type AuthorizeIngestionApiKeyApi interface { - - /* - AuthorizeIngestionApiKey Check authorization for an Ingestion Api Key - - Checks if an ingestion api key is valid - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthorizeIngestionApiKeyRequest - */ - AuthorizeIngestionApiKey(ctx context.Context) ApiAuthorizeIngestionApiKeyRequest - - // AuthorizeIngestionApiKeyExecute executes the request - AuthorizeIngestionApiKeyExecute(r ApiAuthorizeIngestionApiKeyRequest) (*http.Response, error) -} - -// AuthorizeIngestionApiKeyApiService AuthorizeIngestionApiKeyApi service -type AuthorizeIngestionApiKeyApiService service - -type ApiAuthorizeIngestionApiKeyRequest struct { - ctx context.Context - ApiService AuthorizeIngestionApiKeyApi - authorizeIngestionApiKeyRequest *AuthorizeIngestionApiKeyRequest - withReceiverKey *bool -} - -func (r ApiAuthorizeIngestionApiKeyRequest) AuthorizeIngestionApiKeyRequest(authorizeIngestionApiKeyRequest AuthorizeIngestionApiKeyRequest) ApiAuthorizeIngestionApiKeyRequest { - r.authorizeIngestionApiKeyRequest = &authorizeIngestionApiKeyRequest - return r -} - -// By default, the endpoint uses only Ingestion API Keys, true value - to verify also Receiver API Key -func (r ApiAuthorizeIngestionApiKeyRequest) WithReceiverKey(withReceiverKey bool) ApiAuthorizeIngestionApiKeyRequest { - r.withReceiverKey = &withReceiverKey - return r -} - -func (r ApiAuthorizeIngestionApiKeyRequest) Execute() (*http.Response, error) { - return r.ApiService.AuthorizeIngestionApiKeyExecute(r) -} - -/* -AuthorizeIngestionApiKey Check authorization for an Ingestion Api Key - -Checks if an ingestion api key is valid - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthorizeIngestionApiKeyRequest -*/ -func (a *AuthorizeIngestionApiKeyApiService) AuthorizeIngestionApiKey(ctx context.Context) ApiAuthorizeIngestionApiKeyRequest { - return ApiAuthorizeIngestionApiKeyRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *AuthorizeIngestionApiKeyApiService) AuthorizeIngestionApiKeyExecute(r ApiAuthorizeIngestionApiKeyRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthorizeIngestionApiKeyApiService.AuthorizeIngestionApiKey") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/security/ingestion/authorize" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorizeIngestionApiKeyRequest == nil { - return nil, reportError("authorizeIngestionApiKeyRequest is required and must be specified") - } - - if r.withReceiverKey != nil { - localVarQueryParams.Add("withReceiverKey", parameterToString(*r.withReceiverKey, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.authorizeIngestionApiKeyRequest - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ApiToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-API-Token"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ServiceBearer"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-API-ServiceBearer"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ServiceToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-API-Key"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v GenericErrorsResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -// --------------------------------------------- -// ------------------ MOCKS -------------------- -// --------------------------------------------- - -type AuthorizeIngestionApiKeyApiMock struct { - AuthorizeIngestionApiKeyCalls *[]AuthorizeIngestionApiKeyCall - AuthorizeIngestionApiKeyResponse AuthorizeIngestionApiKeyMockResponse -} - -func NewAuthorizeIngestionApiKeyApiMock() AuthorizeIngestionApiKeyApiMock { - xAuthorizeIngestionApiKeyCalls := make([]AuthorizeIngestionApiKeyCall, 0) - return AuthorizeIngestionApiKeyApiMock{ - AuthorizeIngestionApiKeyCalls: &xAuthorizeIngestionApiKeyCalls, - } -} - -type AuthorizeIngestionApiKeyMockResponse struct { - Response *http.Response - Error error -} - -type AuthorizeIngestionApiKeyCall struct { - PauthorizeIngestionApiKeyRequest *AuthorizeIngestionApiKeyRequest - PwithReceiverKey *bool -} - -func (mock AuthorizeIngestionApiKeyApiMock) AuthorizeIngestionApiKey(ctx context.Context) ApiAuthorizeIngestionApiKeyRequest { - return ApiAuthorizeIngestionApiKeyRequest{ - ApiService: mock, - ctx: ctx, - } -} - -func (mock AuthorizeIngestionApiKeyApiMock) AuthorizeIngestionApiKeyExecute(r ApiAuthorizeIngestionApiKeyRequest) (*http.Response, error) { - p := AuthorizeIngestionApiKeyCall{ - PauthorizeIngestionApiKeyRequest: r.authorizeIngestionApiKeyRequest, - PwithReceiverKey: r.withReceiverKey, - } - *mock.AuthorizeIngestionApiKeyCalls = append(*mock.AuthorizeIngestionApiKeyCalls, p) - return mock.AuthorizeIngestionApiKeyResponse.Response, mock.AuthorizeIngestionApiKeyResponse.Error -} diff --git a/generated/stackstate_api/api_ingestion_api_key.go b/generated/stackstate_api/api_ingestion_api_key.go deleted file mode 100644 index ae1e42b8..00000000 --- a/generated/stackstate_api/api_ingestion_api_key.go +++ /dev/null @@ -1,629 +0,0 @@ -/* -StackState API - -This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). - -API version: 5.2.0 -Contact: info@stackstate.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackstate_api - -import ( - "bytes" - "context" - "io/ioutil" - "net/http" - "net/url" - "strings" -) - -type IngestionApiKeyApi interface { - - /* - DeleteIngestionApiKey Delete Ingestion Api Key - - Deleted token can't be used by sources, so all ingestion pipelines for that key will fail - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param ingestionApiKeyId The identifier of a key - @return ApiDeleteIngestionApiKeyRequest - */ - DeleteIngestionApiKey(ctx context.Context, ingestionApiKeyId int64) ApiDeleteIngestionApiKeyRequest - - // DeleteIngestionApiKeyExecute executes the request - DeleteIngestionApiKeyExecute(r ApiDeleteIngestionApiKeyRequest) (*http.Response, error) - - /* - GenerateIngestionApiKey Generate a new Ingestion Api Key - - Generates token and then returns it in the response, the token can't be obtained any more after that - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGenerateIngestionApiKeyRequest - */ - GenerateIngestionApiKey(ctx context.Context) ApiGenerateIngestionApiKeyRequest - - // GenerateIngestionApiKeyExecute executes the request - // @return GeneratedIngestionApiKeyResponse - GenerateIngestionApiKeyExecute(r ApiGenerateIngestionApiKeyRequest) (*GeneratedIngestionApiKeyResponse, *http.Response, error) - - /* - GetIngestionApiKeys List Ingestion Api Keys - - Returns only metadata without token itself - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetIngestionApiKeysRequest - */ - GetIngestionApiKeys(ctx context.Context) ApiGetIngestionApiKeysRequest - - // GetIngestionApiKeysExecute executes the request - // @return []IngestionApiKey - GetIngestionApiKeysExecute(r ApiGetIngestionApiKeysRequest) ([]IngestionApiKey, *http.Response, error) -} - -// IngestionApiKeyApiService IngestionApiKeyApi service -type IngestionApiKeyApiService service - -type ApiDeleteIngestionApiKeyRequest struct { - ctx context.Context - ApiService IngestionApiKeyApi - ingestionApiKeyId int64 -} - -func (r ApiDeleteIngestionApiKeyRequest) Execute() (*http.Response, error) { - return r.ApiService.DeleteIngestionApiKeyExecute(r) -} - -/* -DeleteIngestionApiKey Delete Ingestion Api Key - -Deleted token can't be used by sources, so all ingestion pipelines for that key will fail - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param ingestionApiKeyId The identifier of a key - @return ApiDeleteIngestionApiKeyRequest -*/ -func (a *IngestionApiKeyApiService) DeleteIngestionApiKey(ctx context.Context, ingestionApiKeyId int64) ApiDeleteIngestionApiKeyRequest { - return ApiDeleteIngestionApiKeyRequest{ - ApiService: a, - ctx: ctx, - ingestionApiKeyId: ingestionApiKeyId, - } -} - -// Execute executes the request -func (a *IngestionApiKeyApiService) DeleteIngestionApiKeyExecute(r ApiDeleteIngestionApiKeyRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IngestionApiKeyApiService.DeleteIngestionApiKey") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/security/ingestion/api_keys/{ingestionApiKeyId}" - localVarPath = strings.Replace(localVarPath, "{"+"ingestionApiKeyId"+"}", url.PathEscape(parameterToString(r.ingestionApiKeyId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ApiToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-API-Token"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ServiceBearer"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-API-ServiceBearer"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ServiceToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-API-Key"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v GenericErrorsResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiGenerateIngestionApiKeyRequest struct { - ctx context.Context - ApiService IngestionApiKeyApi - generateIngestionApiKeyRequest *GenerateIngestionApiKeyRequest -} - -func (r ApiGenerateIngestionApiKeyRequest) GenerateIngestionApiKeyRequest(generateIngestionApiKeyRequest GenerateIngestionApiKeyRequest) ApiGenerateIngestionApiKeyRequest { - r.generateIngestionApiKeyRequest = &generateIngestionApiKeyRequest - return r -} - -func (r ApiGenerateIngestionApiKeyRequest) Execute() (*GeneratedIngestionApiKeyResponse, *http.Response, error) { - return r.ApiService.GenerateIngestionApiKeyExecute(r) -} - -/* -GenerateIngestionApiKey Generate a new Ingestion Api Key - -Generates token and then returns it in the response, the token can't be obtained any more after that - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGenerateIngestionApiKeyRequest -*/ -func (a *IngestionApiKeyApiService) GenerateIngestionApiKey(ctx context.Context) ApiGenerateIngestionApiKeyRequest { - return ApiGenerateIngestionApiKeyRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GeneratedIngestionApiKeyResponse -func (a *IngestionApiKeyApiService) GenerateIngestionApiKeyExecute(r ApiGenerateIngestionApiKeyRequest) (*GeneratedIngestionApiKeyResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GeneratedIngestionApiKeyResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IngestionApiKeyApiService.GenerateIngestionApiKey") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/security/ingestion/api_keys" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.generateIngestionApiKeyRequest == nil { - return localVarReturnValue, nil, reportError("generateIngestionApiKeyRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.generateIngestionApiKeyRequest - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ApiToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-API-Token"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ServiceBearer"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-API-ServiceBearer"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ServiceToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-API-Key"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v IngestionApiKeyCreateError - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 500 { - var v GenericErrorsResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetIngestionApiKeysRequest struct { - ctx context.Context - ApiService IngestionApiKeyApi -} - -func (r ApiGetIngestionApiKeysRequest) Execute() ([]IngestionApiKey, *http.Response, error) { - return r.ApiService.GetIngestionApiKeysExecute(r) -} - -/* -GetIngestionApiKeys List Ingestion Api Keys - -Returns only metadata without token itself - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiGetIngestionApiKeysRequest -*/ -func (a *IngestionApiKeyApiService) GetIngestionApiKeys(ctx context.Context) ApiGetIngestionApiKeysRequest { - return ApiGetIngestionApiKeysRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return []IngestionApiKey -func (a *IngestionApiKeyApiService) GetIngestionApiKeysExecute(r ApiGetIngestionApiKeysRequest) ([]IngestionApiKey, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue []IngestionApiKey - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IngestionApiKeyApiService.GetIngestionApiKeys") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/security/ingestion/api_keys" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ApiToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-API-Token"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ServiceBearer"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-API-ServiceBearer"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ServiceToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-API-Key"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v GenericErrorsResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -// --------------------------------------------- -// ------------------ MOCKS -------------------- -// --------------------------------------------- - -type IngestionApiKeyApiMock struct { - DeleteIngestionApiKeyCalls *[]DeleteIngestionApiKeyCall - DeleteIngestionApiKeyResponse DeleteIngestionApiKeyMockResponse - GenerateIngestionApiKeyCalls *[]GenerateIngestionApiKeyCall - GenerateIngestionApiKeyResponse GenerateIngestionApiKeyMockResponse - GetIngestionApiKeysCalls *[]GetIngestionApiKeysCall - GetIngestionApiKeysResponse GetIngestionApiKeysMockResponse -} - -func NewIngestionApiKeyApiMock() IngestionApiKeyApiMock { - xDeleteIngestionApiKeyCalls := make([]DeleteIngestionApiKeyCall, 0) - xGenerateIngestionApiKeyCalls := make([]GenerateIngestionApiKeyCall, 0) - xGetIngestionApiKeysCalls := make([]GetIngestionApiKeysCall, 0) - return IngestionApiKeyApiMock{ - DeleteIngestionApiKeyCalls: &xDeleteIngestionApiKeyCalls, - GenerateIngestionApiKeyCalls: &xGenerateIngestionApiKeyCalls, - GetIngestionApiKeysCalls: &xGetIngestionApiKeysCalls, - } -} - -type DeleteIngestionApiKeyMockResponse struct { - Response *http.Response - Error error -} - -type DeleteIngestionApiKeyCall struct { - PingestionApiKeyId int64 -} - -func (mock IngestionApiKeyApiMock) DeleteIngestionApiKey(ctx context.Context, ingestionApiKeyId int64) ApiDeleteIngestionApiKeyRequest { - return ApiDeleteIngestionApiKeyRequest{ - ApiService: mock, - ctx: ctx, - ingestionApiKeyId: ingestionApiKeyId, - } -} - -func (mock IngestionApiKeyApiMock) DeleteIngestionApiKeyExecute(r ApiDeleteIngestionApiKeyRequest) (*http.Response, error) { - p := DeleteIngestionApiKeyCall{ - PingestionApiKeyId: r.ingestionApiKeyId, - } - *mock.DeleteIngestionApiKeyCalls = append(*mock.DeleteIngestionApiKeyCalls, p) - return mock.DeleteIngestionApiKeyResponse.Response, mock.DeleteIngestionApiKeyResponse.Error -} - -type GenerateIngestionApiKeyMockResponse struct { - Result GeneratedIngestionApiKeyResponse - Response *http.Response - Error error -} - -type GenerateIngestionApiKeyCall struct { - PgenerateIngestionApiKeyRequest *GenerateIngestionApiKeyRequest -} - -func (mock IngestionApiKeyApiMock) GenerateIngestionApiKey(ctx context.Context) ApiGenerateIngestionApiKeyRequest { - return ApiGenerateIngestionApiKeyRequest{ - ApiService: mock, - ctx: ctx, - } -} - -func (mock IngestionApiKeyApiMock) GenerateIngestionApiKeyExecute(r ApiGenerateIngestionApiKeyRequest) (*GeneratedIngestionApiKeyResponse, *http.Response, error) { - p := GenerateIngestionApiKeyCall{ - PgenerateIngestionApiKeyRequest: r.generateIngestionApiKeyRequest, - } - *mock.GenerateIngestionApiKeyCalls = append(*mock.GenerateIngestionApiKeyCalls, p) - return &mock.GenerateIngestionApiKeyResponse.Result, mock.GenerateIngestionApiKeyResponse.Response, mock.GenerateIngestionApiKeyResponse.Error -} - -type GetIngestionApiKeysMockResponse struct { - Result []IngestionApiKey - Response *http.Response - Error error -} - -type GetIngestionApiKeysCall struct { -} - -func (mock IngestionApiKeyApiMock) GetIngestionApiKeys(ctx context.Context) ApiGetIngestionApiKeysRequest { - return ApiGetIngestionApiKeysRequest{ - ApiService: mock, - ctx: ctx, - } -} - -func (mock IngestionApiKeyApiMock) GetIngestionApiKeysExecute(r ApiGetIngestionApiKeysRequest) ([]IngestionApiKey, *http.Response, error) { - p := GetIngestionApiKeysCall{} - *mock.GetIngestionApiKeysCalls = append(*mock.GetIngestionApiKeysCalls, p) - return mock.GetIngestionApiKeysResponse.Result, mock.GetIngestionApiKeysResponse.Response, mock.GetIngestionApiKeysResponse.Error -} diff --git a/generated/stackstate_api/client.go b/generated/stackstate_api/client.go index 370e85a6..02b8c83f 100644 --- a/generated/stackstate_api/client.go +++ b/generated/stackstate_api/client.go @@ -56,8 +56,6 @@ type APIClient struct { ApiTokenApi ApiTokenApi - AuthorizeIngestionApiKeyApi AuthorizeIngestionApiKeyApi - ComponentApi ComponentApi DashboardsApi DashboardsApi @@ -72,8 +70,6 @@ type APIClient struct { ImportApi ImportApi - IngestionApiKeyApi IngestionApiKeyApi - KubernetesLogsApi KubernetesLogsApi LayoutApi LayoutApi @@ -142,7 +138,6 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.AgentLeasesApi = (*AgentLeasesApiService)(&c.common) c.AgentRegistrationsApi = (*AgentRegistrationsApiService)(&c.common) c.ApiTokenApi = (*ApiTokenApiService)(&c.common) - c.AuthorizeIngestionApiKeyApi = (*AuthorizeIngestionApiKeyApiService)(&c.common) c.ComponentApi = (*ComponentApiService)(&c.common) c.DashboardsApi = (*DashboardsApiService)(&c.common) c.DummyApi = (*DummyApiService)(&c.common) @@ -150,7 +145,6 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.ExportApi = (*ExportApiService)(&c.common) c.HealthSynchronizationApi = (*HealthSynchronizationApiService)(&c.common) c.ImportApi = (*ImportApiService)(&c.common) - c.IngestionApiKeyApi = (*IngestionApiKeyApiService)(&c.common) c.KubernetesLogsApi = (*KubernetesLogsApiService)(&c.common) c.LayoutApi = (*LayoutApiService)(&c.common) c.MetricApi = (*MetricApiService)(&c.common) diff --git a/generated/stackstate_api/docs/AuthorizeIngestionApiKeyApi.md b/generated/stackstate_api/docs/AuthorizeIngestionApiKeyApi.md deleted file mode 100644 index a69fe5df..00000000 --- a/generated/stackstate_api/docs/AuthorizeIngestionApiKeyApi.md +++ /dev/null @@ -1,75 +0,0 @@ -# \AuthorizeIngestionApiKeyApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AuthorizeIngestionApiKey**](AuthorizeIngestionApiKeyApi.md#AuthorizeIngestionApiKey) | **Post** /security/ingestion/authorize | Check authorization for an Ingestion Api Key - - - -## AuthorizeIngestionApiKey - -> AuthorizeIngestionApiKey(ctx).AuthorizeIngestionApiKeyRequest(authorizeIngestionApiKeyRequest).WithReceiverKey(withReceiverKey).Execute() - -Check authorization for an Ingestion Api Key - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorizeIngestionApiKeyRequest := *openapiclient.NewAuthorizeIngestionApiKeyRequest("ApiKey_example") // AuthorizeIngestionApiKeyRequest | - withReceiverKey := true // bool | By default, the endpoint uses only Ingestion API Keys, true value - to verify also Receiver API Key (optional) (default to false) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AuthorizeIngestionApiKeyApi.AuthorizeIngestionApiKey(context.Background()).AuthorizeIngestionApiKeyRequest(authorizeIngestionApiKeyRequest).WithReceiverKey(withReceiverKey).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AuthorizeIngestionApiKeyApi.AuthorizeIngestionApiKey``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiAuthorizeIngestionApiKeyRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorizeIngestionApiKeyRequest** | [**AuthorizeIngestionApiKeyRequest**](AuthorizeIngestionApiKeyRequest.md) | | - **withReceiverKey** | **bool** | By default, the endpoint uses only Ingestion API Keys, true value - to verify also Receiver API Key | [default to false] - -### Return type - - (empty response body) - -### Authorization - -[ApiToken](../README.md#ApiToken), [ServiceBearer](../README.md#ServiceBearer), [ServiceToken](../README.md#ServiceToken) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/generated/stackstate_api/docs/AuthorizeIngestionApiKeyRequest.md b/generated/stackstate_api/docs/AuthorizeIngestionApiKeyRequest.md deleted file mode 100644 index 6855b2a5..00000000 --- a/generated/stackstate_api/docs/AuthorizeIngestionApiKeyRequest.md +++ /dev/null @@ -1,51 +0,0 @@ -# AuthorizeIngestionApiKeyRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ApiKey** | **string** | | - -## Methods - -### NewAuthorizeIngestionApiKeyRequest - -`func NewAuthorizeIngestionApiKeyRequest(apiKey string, ) *AuthorizeIngestionApiKeyRequest` - -NewAuthorizeIngestionApiKeyRequest instantiates a new AuthorizeIngestionApiKeyRequest object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewAuthorizeIngestionApiKeyRequestWithDefaults - -`func NewAuthorizeIngestionApiKeyRequestWithDefaults() *AuthorizeIngestionApiKeyRequest` - -NewAuthorizeIngestionApiKeyRequestWithDefaults instantiates a new AuthorizeIngestionApiKeyRequest object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetApiKey - -`func (o *AuthorizeIngestionApiKeyRequest) GetApiKey() string` - -GetApiKey returns the ApiKey field if non-nil, zero value otherwise. - -### GetApiKeyOk - -`func (o *AuthorizeIngestionApiKeyRequest) GetApiKeyOk() (*string, bool)` - -GetApiKeyOk returns a tuple with the ApiKey field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetApiKey - -`func (o *AuthorizeIngestionApiKeyRequest) SetApiKey(v string)` - -SetApiKey sets ApiKey field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/stackstate_api/docs/EventComponent.md b/generated/stackstate_api/docs/EventComponent.md index 5624266a..39f16d41 100644 --- a/generated/stackstate_api/docs/EventComponent.md +++ b/generated/stackstate_api/docs/EventComponent.md @@ -6,14 +6,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | **string** | | **Id** | **int64** | | -**ComponentTypeId** | **int64** | | +**TypeName** | **string** | | **Name** | **string** | | +**Identifiers** | **[]string** | | +**Iconbase64** | Pointer to **string** | | [optional] ## Methods ### NewEventComponent -`func NewEventComponent(type_ string, id int64, componentTypeId int64, name string, ) *EventComponent` +`func NewEventComponent(type_ string, id int64, typeName string, name string, identifiers []string, ) *EventComponent` NewEventComponent instantiates a new EventComponent object This constructor will assign default values to properties that have it defined, @@ -68,24 +70,24 @@ and a boolean to check if the value has been set. SetId sets Id field to given value. -### GetComponentTypeId +### GetTypeName -`func (o *EventComponent) GetComponentTypeId() int64` +`func (o *EventComponent) GetTypeName() string` -GetComponentTypeId returns the ComponentTypeId field if non-nil, zero value otherwise. +GetTypeName returns the TypeName field if non-nil, zero value otherwise. -### GetComponentTypeIdOk +### GetTypeNameOk -`func (o *EventComponent) GetComponentTypeIdOk() (*int64, bool)` +`func (o *EventComponent) GetTypeNameOk() (*string, bool)` -GetComponentTypeIdOk returns a tuple with the ComponentTypeId field if it's non-nil, zero value otherwise +GetTypeNameOk returns a tuple with the TypeName field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetComponentTypeId +### SetTypeName -`func (o *EventComponent) SetComponentTypeId(v int64)` +`func (o *EventComponent) SetTypeName(v string)` -SetComponentTypeId sets ComponentTypeId field to given value. +SetTypeName sets TypeName field to given value. ### GetName @@ -108,6 +110,51 @@ and a boolean to check if the value has been set. SetName sets Name field to given value. +### GetIdentifiers + +`func (o *EventComponent) GetIdentifiers() []string` + +GetIdentifiers returns the Identifiers field if non-nil, zero value otherwise. + +### GetIdentifiersOk + +`func (o *EventComponent) GetIdentifiersOk() (*[]string, bool)` + +GetIdentifiersOk returns a tuple with the Identifiers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentifiers + +`func (o *EventComponent) SetIdentifiers(v []string)` + +SetIdentifiers sets Identifiers field to given value. + + +### GetIconbase64 + +`func (o *EventComponent) GetIconbase64() string` + +GetIconbase64 returns the Iconbase64 field if non-nil, zero value otherwise. + +### GetIconbase64Ok + +`func (o *EventComponent) GetIconbase64Ok() (*string, bool)` + +GetIconbase64Ok returns a tuple with the Iconbase64 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIconbase64 + +`func (o *EventComponent) SetIconbase64(v string)` + +SetIconbase64 sets Iconbase64 field to given value. + +### HasIconbase64 + +`func (o *EventComponent) HasIconbase64() bool` + +HasIconbase64 returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/generated/stackstate_api/docs/EventElement.md b/generated/stackstate_api/docs/EventElement.md index 53d7d7c3..5324aa95 100644 --- a/generated/stackstate_api/docs/EventElement.md +++ b/generated/stackstate_api/docs/EventElement.md @@ -6,9 +6,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | **string** | | **Id** | **int64** | | -**ComponentTypeId** | **int64** | | +**TypeName** | **string** | | **Name** | **string** | | -**RelationTypeId** | **int64** | | +**Identifiers** | **[]string** | | +**Iconbase64** | Pointer to **string** | | [optional] **Source** | [**EventComponent**](EventComponent.md) | | **Target** | [**EventComponent**](EventComponent.md) | | **DependencyDirection** | [**DependencyDirection**](DependencyDirection.md) | | @@ -17,7 +18,7 @@ Name | Type | Description | Notes ### NewEventElement -`func NewEventElement(type_ string, id int64, componentTypeId int64, name string, relationTypeId int64, source EventComponent, target EventComponent, dependencyDirection DependencyDirection, ) *EventElement` +`func NewEventElement(type_ string, id int64, typeName string, name string, identifiers []string, source EventComponent, target EventComponent, dependencyDirection DependencyDirection, ) *EventElement` NewEventElement instantiates a new EventElement object This constructor will assign default values to properties that have it defined, @@ -72,24 +73,24 @@ and a boolean to check if the value has been set. SetId sets Id field to given value. -### GetComponentTypeId +### GetTypeName -`func (o *EventElement) GetComponentTypeId() int64` +`func (o *EventElement) GetTypeName() string` -GetComponentTypeId returns the ComponentTypeId field if non-nil, zero value otherwise. +GetTypeName returns the TypeName field if non-nil, zero value otherwise. -### GetComponentTypeIdOk +### GetTypeNameOk -`func (o *EventElement) GetComponentTypeIdOk() (*int64, bool)` +`func (o *EventElement) GetTypeNameOk() (*string, bool)` -GetComponentTypeIdOk returns a tuple with the ComponentTypeId field if it's non-nil, zero value otherwise +GetTypeNameOk returns a tuple with the TypeName field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetComponentTypeId +### SetTypeName -`func (o *EventElement) SetComponentTypeId(v int64)` +`func (o *EventElement) SetTypeName(v string)` -SetComponentTypeId sets ComponentTypeId field to given value. +SetTypeName sets TypeName field to given value. ### GetName @@ -112,26 +113,51 @@ and a boolean to check if the value has been set. SetName sets Name field to given value. -### GetRelationTypeId +### GetIdentifiers -`func (o *EventElement) GetRelationTypeId() int64` +`func (o *EventElement) GetIdentifiers() []string` -GetRelationTypeId returns the RelationTypeId field if non-nil, zero value otherwise. +GetIdentifiers returns the Identifiers field if non-nil, zero value otherwise. -### GetRelationTypeIdOk +### GetIdentifiersOk -`func (o *EventElement) GetRelationTypeIdOk() (*int64, bool)` +`func (o *EventElement) GetIdentifiersOk() (*[]string, bool)` -GetRelationTypeIdOk returns a tuple with the RelationTypeId field if it's non-nil, zero value otherwise +GetIdentifiersOk returns a tuple with the Identifiers field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetRelationTypeId +### SetIdentifiers -`func (o *EventElement) SetRelationTypeId(v int64)` +`func (o *EventElement) SetIdentifiers(v []string)` -SetRelationTypeId sets RelationTypeId field to given value. +SetIdentifiers sets Identifiers field to given value. +### GetIconbase64 + +`func (o *EventElement) GetIconbase64() string` + +GetIconbase64 returns the Iconbase64 field if non-nil, zero value otherwise. + +### GetIconbase64Ok + +`func (o *EventElement) GetIconbase64Ok() (*string, bool)` + +GetIconbase64Ok returns a tuple with the Iconbase64 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIconbase64 + +`func (o *EventElement) SetIconbase64(v string)` + +SetIconbase64 sets Iconbase64 field to given value. + +### HasIconbase64 + +`func (o *EventElement) HasIconbase64() bool` + +HasIconbase64 returns a boolean if a field has been set. + ### GetSource `func (o *EventElement) GetSource() EventComponent` diff --git a/generated/stackstate_api/docs/EventRelation.md b/generated/stackstate_api/docs/EventRelation.md index 3be4b396..33906856 100644 --- a/generated/stackstate_api/docs/EventRelation.md +++ b/generated/stackstate_api/docs/EventRelation.md @@ -6,8 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | **string** | | **Id** | **int64** | | -**RelationTypeId** | **int64** | | +**TypeName** | **string** | | **Name** | Pointer to **string** | | [optional] +**Identifiers** | **[]string** | | **Source** | [**EventComponent**](EventComponent.md) | | **Target** | [**EventComponent**](EventComponent.md) | | **DependencyDirection** | [**DependencyDirection**](DependencyDirection.md) | | @@ -16,7 +17,7 @@ Name | Type | Description | Notes ### NewEventRelation -`func NewEventRelation(type_ string, id int64, relationTypeId int64, source EventComponent, target EventComponent, dependencyDirection DependencyDirection, ) *EventRelation` +`func NewEventRelation(type_ string, id int64, typeName string, identifiers []string, source EventComponent, target EventComponent, dependencyDirection DependencyDirection, ) *EventRelation` NewEventRelation instantiates a new EventRelation object This constructor will assign default values to properties that have it defined, @@ -71,24 +72,24 @@ and a boolean to check if the value has been set. SetId sets Id field to given value. -### GetRelationTypeId +### GetTypeName -`func (o *EventRelation) GetRelationTypeId() int64` +`func (o *EventRelation) GetTypeName() string` -GetRelationTypeId returns the RelationTypeId field if non-nil, zero value otherwise. +GetTypeName returns the TypeName field if non-nil, zero value otherwise. -### GetRelationTypeIdOk +### GetTypeNameOk -`func (o *EventRelation) GetRelationTypeIdOk() (*int64, bool)` +`func (o *EventRelation) GetTypeNameOk() (*string, bool)` -GetRelationTypeIdOk returns a tuple with the RelationTypeId field if it's non-nil, zero value otherwise +GetTypeNameOk returns a tuple with the TypeName field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetRelationTypeId +### SetTypeName -`func (o *EventRelation) SetRelationTypeId(v int64)` +`func (o *EventRelation) SetTypeName(v string)` -SetRelationTypeId sets RelationTypeId field to given value. +SetTypeName sets TypeName field to given value. ### GetName @@ -116,6 +117,26 @@ SetName sets Name field to given value. HasName returns a boolean if a field has been set. +### GetIdentifiers + +`func (o *EventRelation) GetIdentifiers() []string` + +GetIdentifiers returns the Identifiers field if non-nil, zero value otherwise. + +### GetIdentifiersOk + +`func (o *EventRelation) GetIdentifiersOk() (*[]string, bool)` + +GetIdentifiersOk returns a tuple with the Identifiers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentifiers + +`func (o *EventRelation) SetIdentifiers(v []string)` + +SetIdentifiers sets Identifiers field to given value. + + ### GetSource `func (o *EventRelation) GetSource() EventComponent` diff --git a/generated/stackstate_api/docs/GenerateIngestionApiKeyRequest.md b/generated/stackstate_api/docs/GenerateIngestionApiKeyRequest.md deleted file mode 100644 index bd9ff58e..00000000 --- a/generated/stackstate_api/docs/GenerateIngestionApiKeyRequest.md +++ /dev/null @@ -1,103 +0,0 @@ -# GenerateIngestionApiKeyRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | -**Description** | Pointer to **string** | | [optional] -**Expiration** | Pointer to **int64** | | [optional] - -## Methods - -### NewGenerateIngestionApiKeyRequest - -`func NewGenerateIngestionApiKeyRequest(name string, ) *GenerateIngestionApiKeyRequest` - -NewGenerateIngestionApiKeyRequest instantiates a new GenerateIngestionApiKeyRequest object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGenerateIngestionApiKeyRequestWithDefaults - -`func NewGenerateIngestionApiKeyRequestWithDefaults() *GenerateIngestionApiKeyRequest` - -NewGenerateIngestionApiKeyRequestWithDefaults instantiates a new GenerateIngestionApiKeyRequest object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetName - -`func (o *GenerateIngestionApiKeyRequest) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *GenerateIngestionApiKeyRequest) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *GenerateIngestionApiKeyRequest) SetName(v string)` - -SetName sets Name field to given value. - - -### GetDescription - -`func (o *GenerateIngestionApiKeyRequest) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *GenerateIngestionApiKeyRequest) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *GenerateIngestionApiKeyRequest) SetDescription(v string)` - -SetDescription sets Description field to given value. - -### HasDescription - -`func (o *GenerateIngestionApiKeyRequest) HasDescription() bool` - -HasDescription returns a boolean if a field has been set. - -### GetExpiration - -`func (o *GenerateIngestionApiKeyRequest) GetExpiration() int64` - -GetExpiration returns the Expiration field if non-nil, zero value otherwise. - -### GetExpirationOk - -`func (o *GenerateIngestionApiKeyRequest) GetExpirationOk() (*int64, bool)` - -GetExpirationOk returns a tuple with the Expiration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiration - -`func (o *GenerateIngestionApiKeyRequest) SetExpiration(v int64)` - -SetExpiration sets Expiration field to given value. - -### HasExpiration - -`func (o *GenerateIngestionApiKeyRequest) HasExpiration() bool` - -HasExpiration returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/stackstate_api/docs/GeneratedIngestionApiKeyResponse.md b/generated/stackstate_api/docs/GeneratedIngestionApiKeyResponse.md deleted file mode 100644 index ea1e047c..00000000 --- a/generated/stackstate_api/docs/GeneratedIngestionApiKeyResponse.md +++ /dev/null @@ -1,166 +0,0 @@ -# GeneratedIngestionApiKeyResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int64** | | [readonly] -**LastUpdateTimestamp** | **int64** | | [readonly] -**Name** | **string** | | -**Description** | Pointer to **string** | | [optional] -**Expiration** | Pointer to **int64** | | [optional] -**ApiKey** | **string** | | - -## Methods - -### NewGeneratedIngestionApiKeyResponse - -`func NewGeneratedIngestionApiKeyResponse(id int64, lastUpdateTimestamp int64, name string, apiKey string, ) *GeneratedIngestionApiKeyResponse` - -NewGeneratedIngestionApiKeyResponse instantiates a new GeneratedIngestionApiKeyResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGeneratedIngestionApiKeyResponseWithDefaults - -`func NewGeneratedIngestionApiKeyResponseWithDefaults() *GeneratedIngestionApiKeyResponse` - -NewGeneratedIngestionApiKeyResponseWithDefaults instantiates a new GeneratedIngestionApiKeyResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetId - -`func (o *GeneratedIngestionApiKeyResponse) GetId() int64` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *GeneratedIngestionApiKeyResponse) GetIdOk() (*int64, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *GeneratedIngestionApiKeyResponse) SetId(v int64)` - -SetId sets Id field to given value. - - -### GetLastUpdateTimestamp - -`func (o *GeneratedIngestionApiKeyResponse) GetLastUpdateTimestamp() int64` - -GetLastUpdateTimestamp returns the LastUpdateTimestamp field if non-nil, zero value otherwise. - -### GetLastUpdateTimestampOk - -`func (o *GeneratedIngestionApiKeyResponse) GetLastUpdateTimestampOk() (*int64, bool)` - -GetLastUpdateTimestampOk returns a tuple with the LastUpdateTimestamp field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLastUpdateTimestamp - -`func (o *GeneratedIngestionApiKeyResponse) SetLastUpdateTimestamp(v int64)` - -SetLastUpdateTimestamp sets LastUpdateTimestamp field to given value. - - -### GetName - -`func (o *GeneratedIngestionApiKeyResponse) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *GeneratedIngestionApiKeyResponse) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *GeneratedIngestionApiKeyResponse) SetName(v string)` - -SetName sets Name field to given value. - - -### GetDescription - -`func (o *GeneratedIngestionApiKeyResponse) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *GeneratedIngestionApiKeyResponse) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *GeneratedIngestionApiKeyResponse) SetDescription(v string)` - -SetDescription sets Description field to given value. - -### HasDescription - -`func (o *GeneratedIngestionApiKeyResponse) HasDescription() bool` - -HasDescription returns a boolean if a field has been set. - -### GetExpiration - -`func (o *GeneratedIngestionApiKeyResponse) GetExpiration() int64` - -GetExpiration returns the Expiration field if non-nil, zero value otherwise. - -### GetExpirationOk - -`func (o *GeneratedIngestionApiKeyResponse) GetExpirationOk() (*int64, bool)` - -GetExpirationOk returns a tuple with the Expiration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiration - -`func (o *GeneratedIngestionApiKeyResponse) SetExpiration(v int64)` - -SetExpiration sets Expiration field to given value. - -### HasExpiration - -`func (o *GeneratedIngestionApiKeyResponse) HasExpiration() bool` - -HasExpiration returns a boolean if a field has been set. - -### GetApiKey - -`func (o *GeneratedIngestionApiKeyResponse) GetApiKey() string` - -GetApiKey returns the ApiKey field if non-nil, zero value otherwise. - -### GetApiKeyOk - -`func (o *GeneratedIngestionApiKeyResponse) GetApiKeyOk() (*string, bool)` - -GetApiKeyOk returns a tuple with the ApiKey field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetApiKey - -`func (o *GeneratedIngestionApiKeyResponse) SetApiKey(v string)` - -SetApiKey sets ApiKey field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/stackstate_api/docs/IngestionApiKey.md b/generated/stackstate_api/docs/IngestionApiKey.md deleted file mode 100644 index f4becba4..00000000 --- a/generated/stackstate_api/docs/IngestionApiKey.md +++ /dev/null @@ -1,145 +0,0 @@ -# IngestionApiKey - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int64** | | [readonly] -**LastUpdateTimestamp** | **int64** | | [readonly] -**Name** | **string** | | -**Description** | Pointer to **string** | | [optional] -**Expiration** | Pointer to **int64** | | [optional] - -## Methods - -### NewIngestionApiKey - -`func NewIngestionApiKey(id int64, lastUpdateTimestamp int64, name string, ) *IngestionApiKey` - -NewIngestionApiKey instantiates a new IngestionApiKey object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewIngestionApiKeyWithDefaults - -`func NewIngestionApiKeyWithDefaults() *IngestionApiKey` - -NewIngestionApiKeyWithDefaults instantiates a new IngestionApiKey object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetId - -`func (o *IngestionApiKey) GetId() int64` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *IngestionApiKey) GetIdOk() (*int64, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *IngestionApiKey) SetId(v int64)` - -SetId sets Id field to given value. - - -### GetLastUpdateTimestamp - -`func (o *IngestionApiKey) GetLastUpdateTimestamp() int64` - -GetLastUpdateTimestamp returns the LastUpdateTimestamp field if non-nil, zero value otherwise. - -### GetLastUpdateTimestampOk - -`func (o *IngestionApiKey) GetLastUpdateTimestampOk() (*int64, bool)` - -GetLastUpdateTimestampOk returns a tuple with the LastUpdateTimestamp field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLastUpdateTimestamp - -`func (o *IngestionApiKey) SetLastUpdateTimestamp(v int64)` - -SetLastUpdateTimestamp sets LastUpdateTimestamp field to given value. - - -### GetName - -`func (o *IngestionApiKey) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *IngestionApiKey) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *IngestionApiKey) SetName(v string)` - -SetName sets Name field to given value. - - -### GetDescription - -`func (o *IngestionApiKey) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *IngestionApiKey) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *IngestionApiKey) SetDescription(v string)` - -SetDescription sets Description field to given value. - -### HasDescription - -`func (o *IngestionApiKey) HasDescription() bool` - -HasDescription returns a boolean if a field has been set. - -### GetExpiration - -`func (o *IngestionApiKey) GetExpiration() int64` - -GetExpiration returns the Expiration field if non-nil, zero value otherwise. - -### GetExpirationOk - -`func (o *IngestionApiKey) GetExpirationOk() (*int64, bool)` - -GetExpirationOk returns a tuple with the Expiration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiration - -`func (o *IngestionApiKey) SetExpiration(v int64)` - -SetExpiration sets Expiration field to given value. - -### HasExpiration - -`func (o *IngestionApiKey) HasExpiration() bool` - -HasExpiration returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/stackstate_api/docs/IngestionApiKeyApi.md b/generated/stackstate_api/docs/IngestionApiKeyApi.md deleted file mode 100644 index 9a5ccb89..00000000 --- a/generated/stackstate_api/docs/IngestionApiKeyApi.md +++ /dev/null @@ -1,206 +0,0 @@ -# \IngestionApiKeyApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteIngestionApiKey**](IngestionApiKeyApi.md#DeleteIngestionApiKey) | **Delete** /security/ingestion/api_keys/{ingestionApiKeyId} | Delete Ingestion Api Key -[**GenerateIngestionApiKey**](IngestionApiKeyApi.md#GenerateIngestionApiKey) | **Post** /security/ingestion/api_keys | Generate a new Ingestion Api Key -[**GetIngestionApiKeys**](IngestionApiKeyApi.md#GetIngestionApiKeys) | **Get** /security/ingestion/api_keys | List Ingestion Api Keys - - - -## DeleteIngestionApiKey - -> DeleteIngestionApiKey(ctx, ingestionApiKeyId).Execute() - -Delete Ingestion Api Key - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - ingestionApiKeyId := int64(789) // int64 | The identifier of a key - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IngestionApiKeyApi.DeleteIngestionApiKey(context.Background(), ingestionApiKeyId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IngestionApiKeyApi.DeleteIngestionApiKey``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ingestionApiKeyId** | **int64** | The identifier of a key | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteIngestionApiKeyRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -[ApiToken](../README.md#ApiToken), [ServiceBearer](../README.md#ServiceBearer), [ServiceToken](../README.md#ServiceToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GenerateIngestionApiKey - -> GeneratedIngestionApiKeyResponse GenerateIngestionApiKey(ctx).GenerateIngestionApiKeyRequest(generateIngestionApiKeyRequest).Execute() - -Generate a new Ingestion Api Key - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - generateIngestionApiKeyRequest := *openapiclient.NewGenerateIngestionApiKeyRequest("Name_example") // GenerateIngestionApiKeyRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IngestionApiKeyApi.GenerateIngestionApiKey(context.Background()).GenerateIngestionApiKeyRequest(generateIngestionApiKeyRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IngestionApiKeyApi.GenerateIngestionApiKey``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GenerateIngestionApiKey`: GeneratedIngestionApiKeyResponse - fmt.Fprintf(os.Stdout, "Response from `IngestionApiKeyApi.GenerateIngestionApiKey`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiGenerateIngestionApiKeyRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **generateIngestionApiKeyRequest** | [**GenerateIngestionApiKeyRequest**](GenerateIngestionApiKeyRequest.md) | | - -### Return type - -[**GeneratedIngestionApiKeyResponse**](GeneratedIngestionApiKeyResponse.md) - -### Authorization - -[ApiToken](../README.md#ApiToken), [ServiceBearer](../README.md#ServiceBearer), [ServiceToken](../README.md#ServiceToken) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetIngestionApiKeys - -> []IngestionApiKey GetIngestionApiKeys(ctx).Execute() - -List Ingestion Api Keys - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IngestionApiKeyApi.GetIngestionApiKeys(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IngestionApiKeyApi.GetIngestionApiKeys``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetIngestionApiKeys`: []IngestionApiKey - fmt.Fprintf(os.Stdout, "Response from `IngestionApiKeyApi.GetIngestionApiKeys`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetIngestionApiKeysRequest struct via the builder pattern - - -### Return type - -[**[]IngestionApiKey**](IngestionApiKey.md) - -### Authorization - -[ApiToken](../README.md#ApiToken), [ServiceBearer](../README.md#ServiceBearer), [ServiceToken](../README.md#ServiceToken) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/generated/stackstate_api/docs/IngestionApiKeyCreateError.md b/generated/stackstate_api/docs/IngestionApiKeyCreateError.md deleted file mode 100644 index ae17a02a..00000000 --- a/generated/stackstate_api/docs/IngestionApiKeyCreateError.md +++ /dev/null @@ -1,72 +0,0 @@ -# IngestionApiKeyCreateError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | -**Message** | **string** | | - -## Methods - -### NewIngestionApiKeyCreateError - -`func NewIngestionApiKeyCreateError(type_ string, message string, ) *IngestionApiKeyCreateError` - -NewIngestionApiKeyCreateError instantiates a new IngestionApiKeyCreateError object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewIngestionApiKeyCreateErrorWithDefaults - -`func NewIngestionApiKeyCreateErrorWithDefaults() *IngestionApiKeyCreateError` - -NewIngestionApiKeyCreateErrorWithDefaults instantiates a new IngestionApiKeyCreateError object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetType - -`func (o *IngestionApiKeyCreateError) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *IngestionApiKeyCreateError) GetTypeOk() (*string, bool)` - -GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetType - -`func (o *IngestionApiKeyCreateError) SetType(v string)` - -SetType sets Type field to given value. - - -### GetMessage - -`func (o *IngestionApiKeyCreateError) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *IngestionApiKeyCreateError) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *IngestionApiKeyCreateError) SetMessage(v string)` - -SetMessage sets Message field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/stackstate_api/docs/IngestionApiKeyInvalidExpiryError.md b/generated/stackstate_api/docs/IngestionApiKeyInvalidExpiryError.md deleted file mode 100644 index 5ba51a6b..00000000 --- a/generated/stackstate_api/docs/IngestionApiKeyInvalidExpiryError.md +++ /dev/null @@ -1,72 +0,0 @@ -# IngestionApiKeyInvalidExpiryError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | | -**Message** | **string** | | - -## Methods - -### NewIngestionApiKeyInvalidExpiryError - -`func NewIngestionApiKeyInvalidExpiryError(type_ string, message string, ) *IngestionApiKeyInvalidExpiryError` - -NewIngestionApiKeyInvalidExpiryError instantiates a new IngestionApiKeyInvalidExpiryError object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewIngestionApiKeyInvalidExpiryErrorWithDefaults - -`func NewIngestionApiKeyInvalidExpiryErrorWithDefaults() *IngestionApiKeyInvalidExpiryError` - -NewIngestionApiKeyInvalidExpiryErrorWithDefaults instantiates a new IngestionApiKeyInvalidExpiryError object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetType - -`func (o *IngestionApiKeyInvalidExpiryError) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *IngestionApiKeyInvalidExpiryError) GetTypeOk() (*string, bool)` - -GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetType - -`func (o *IngestionApiKeyInvalidExpiryError) SetType(v string)` - -SetType sets Type field to given value. - - -### GetMessage - -`func (o *IngestionApiKeyInvalidExpiryError) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *IngestionApiKeyInvalidExpiryError) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *IngestionApiKeyInvalidExpiryError) SetMessage(v string)` - -SetMessage sets Message field to given value. - - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/stackstate_api/docs/MonitorApi.md b/generated/stackstate_api/docs/MonitorApi.md index 9b17c671..e14daf87 100644 --- a/generated/stackstate_api/docs/MonitorApi.md +++ b/generated/stackstate_api/docs/MonitorApi.md @@ -450,7 +450,7 @@ import ( ) func main() { - monitorIdentifierLookup := *openapiclient.NewMonitorIdentifierLookup("MetricQuery_example", int64(123)) // MonitorIdentifierLookup | Component type and metric query for identifier lookup + monitorIdentifierLookup := *openapiclient.NewMonitorIdentifierLookup("MetricQuery_example", "ComponentTypeName_example") // MonitorIdentifierLookup | Component type and metric query for identifier lookup configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) diff --git a/generated/stackstate_api/docs/MonitorCheckStatusComponent.md b/generated/stackstate_api/docs/MonitorCheckStatusComponent.md index 3008045a..eb6b842e 100644 --- a/generated/stackstate_api/docs/MonitorCheckStatusComponent.md +++ b/generated/stackstate_api/docs/MonitorCheckStatusComponent.md @@ -9,8 +9,6 @@ Name | Type | Description | Notes **Name** | **string** | | **Type** | **string** | | **Iconbase64** | Pointer to **string** | | [optional] -**Namespace** | Pointer to **string** | | [optional] -**Cluster** | Pointer to **string** | | [optional] ## Methods @@ -136,56 +134,6 @@ SetIconbase64 sets Iconbase64 field to given value. HasIconbase64 returns a boolean if a field has been set. -### GetNamespace - -`func (o *MonitorCheckStatusComponent) GetNamespace() string` - -GetNamespace returns the Namespace field if non-nil, zero value otherwise. - -### GetNamespaceOk - -`func (o *MonitorCheckStatusComponent) GetNamespaceOk() (*string, bool)` - -GetNamespaceOk returns a tuple with the Namespace field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNamespace - -`func (o *MonitorCheckStatusComponent) SetNamespace(v string)` - -SetNamespace sets Namespace field to given value. - -### HasNamespace - -`func (o *MonitorCheckStatusComponent) HasNamespace() bool` - -HasNamespace returns a boolean if a field has been set. - -### GetCluster - -`func (o *MonitorCheckStatusComponent) GetCluster() string` - -GetCluster returns the Cluster field if non-nil, zero value otherwise. - -### GetClusterOk - -`func (o *MonitorCheckStatusComponent) GetClusterOk() (*string, bool)` - -GetClusterOk returns a tuple with the Cluster field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCluster - -`func (o *MonitorCheckStatusComponent) SetCluster(v string)` - -SetCluster sets Cluster field to given value. - -### HasCluster - -`func (o *MonitorCheckStatusComponent) HasCluster() bool` - -HasCluster returns a boolean if a field has been set. - [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/generated/stackstate_api/docs/MonitorIdentifierLookup.md b/generated/stackstate_api/docs/MonitorIdentifierLookup.md index 71cf9301..b69ae6c7 100644 --- a/generated/stackstate_api/docs/MonitorIdentifierLookup.md +++ b/generated/stackstate_api/docs/MonitorIdentifierLookup.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **MetricQuery** | **string** | | -**ComponentType** | **int64** | | +**ComponentTypeName** | **string** | | **TopN** | Pointer to **int32** | | [optional] **Overrides** | Pointer to [**MonitorIdentifierLookupOverrides**](MonitorIdentifierLookupOverrides.md) | | [optional] @@ -13,7 +13,7 @@ Name | Type | Description | Notes ### NewMonitorIdentifierLookup -`func NewMonitorIdentifierLookup(metricQuery string, componentType int64, ) *MonitorIdentifierLookup` +`func NewMonitorIdentifierLookup(metricQuery string, componentTypeName string, ) *MonitorIdentifierLookup` NewMonitorIdentifierLookup instantiates a new MonitorIdentifierLookup object This constructor will assign default values to properties that have it defined, @@ -48,24 +48,24 @@ and a boolean to check if the value has been set. SetMetricQuery sets MetricQuery field to given value. -### GetComponentType +### GetComponentTypeName -`func (o *MonitorIdentifierLookup) GetComponentType() int64` +`func (o *MonitorIdentifierLookup) GetComponentTypeName() string` -GetComponentType returns the ComponentType field if non-nil, zero value otherwise. +GetComponentTypeName returns the ComponentTypeName field if non-nil, zero value otherwise. -### GetComponentTypeOk +### GetComponentTypeNameOk -`func (o *MonitorIdentifierLookup) GetComponentTypeOk() (*int64, bool)` +`func (o *MonitorIdentifierLookup) GetComponentTypeNameOk() (*string, bool)` -GetComponentTypeOk returns a tuple with the ComponentType field if it's non-nil, zero value otherwise +GetComponentTypeNameOk returns a tuple with the ComponentTypeName field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetComponentType +### SetComponentTypeName -`func (o *MonitorIdentifierLookup) SetComponentType(v int64)` +`func (o *MonitorIdentifierLookup) SetComponentTypeName(v string)` -SetComponentType sets ComponentType field to given value. +SetComponentTypeName sets ComponentTypeName field to given value. ### GetTopN diff --git a/generated/stackstate_api/docs/NotificationConfigurationReadSchema.md b/generated/stackstate_api/docs/NotificationConfigurationReadSchema.md index a1565d26..4a2d48d4 100644 --- a/generated/stackstate_api/docs/NotificationConfigurationReadSchema.md +++ b/generated/stackstate_api/docs/NotificationConfigurationReadSchema.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **NotifyHealthStates** | [**NotifyOnOptions**](NotifyOnOptions.md) | | **Monitors** | [**[]MonitorReferenceId**](MonitorReferenceId.md) | | **MonitorTags** | **[]string** | | -**ComponentTypes** | **[]int64** | | +**ComponentTypeNames** | **[]string** | | **ComponentTags** | **[]string** | | **Status** | [**NotificationConfigurationStatusValue**](NotificationConfigurationStatusValue.md) | | **NotificationChannels** | [**[]ChannelReferenceId**](ChannelReferenceId.md) | | @@ -22,7 +22,7 @@ Name | Type | Description | Notes ### NewNotificationConfigurationReadSchema -`func NewNotificationConfigurationReadSchema(name string, notifyHealthStates NotifyOnOptions, monitors []MonitorReferenceId, monitorTags []string, componentTypes []int64, componentTags []string, status NotificationConfigurationStatusValue, notificationChannels []ChannelReferenceId, id int64, lastUpdateTimestamp int64, runtimeStatus NotificationConfigurationRuntimeStatusValue, ) *NotificationConfigurationReadSchema` +`func NewNotificationConfigurationReadSchema(name string, notifyHealthStates NotifyOnOptions, monitors []MonitorReferenceId, monitorTags []string, componentTypeNames []string, componentTags []string, status NotificationConfigurationStatusValue, notificationChannels []ChannelReferenceId, id int64, lastUpdateTimestamp int64, runtimeStatus NotificationConfigurationRuntimeStatusValue, ) *NotificationConfigurationReadSchema` NewNotificationConfigurationReadSchema instantiates a new NotificationConfigurationReadSchema object This constructor will assign default values to properties that have it defined, @@ -167,24 +167,24 @@ and a boolean to check if the value has been set. SetMonitorTags sets MonitorTags field to given value. -### GetComponentTypes +### GetComponentTypeNames -`func (o *NotificationConfigurationReadSchema) GetComponentTypes() []int64` +`func (o *NotificationConfigurationReadSchema) GetComponentTypeNames() []string` -GetComponentTypes returns the ComponentTypes field if non-nil, zero value otherwise. +GetComponentTypeNames returns the ComponentTypeNames field if non-nil, zero value otherwise. -### GetComponentTypesOk +### GetComponentTypeNamesOk -`func (o *NotificationConfigurationReadSchema) GetComponentTypesOk() (*[]int64, bool)` +`func (o *NotificationConfigurationReadSchema) GetComponentTypeNamesOk() (*[]string, bool)` -GetComponentTypesOk returns a tuple with the ComponentTypes field if it's non-nil, zero value otherwise +GetComponentTypeNamesOk returns a tuple with the ComponentTypeNames field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetComponentTypes +### SetComponentTypeNames -`func (o *NotificationConfigurationReadSchema) SetComponentTypes(v []int64)` +`func (o *NotificationConfigurationReadSchema) SetComponentTypeNames(v []string)` -SetComponentTypes sets ComponentTypes field to given value. +SetComponentTypeNames sets ComponentTypeNames field to given value. ### GetComponentTags diff --git a/generated/stackstate_api/docs/NotificationConfigurationWriteSchema.md b/generated/stackstate_api/docs/NotificationConfigurationWriteSchema.md index 753e309c..bf905dce 100644 --- a/generated/stackstate_api/docs/NotificationConfigurationWriteSchema.md +++ b/generated/stackstate_api/docs/NotificationConfigurationWriteSchema.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **NotifyHealthStates** | [**NotifyOnOptions**](NotifyOnOptions.md) | | **Monitors** | [**[]MonitorReferenceId**](MonitorReferenceId.md) | | **MonitorTags** | **[]string** | | -**ComponentTypes** | **[]int64** | | +**ComponentTypeNames** | **[]string** | | **ComponentTags** | **[]string** | | **Status** | [**NotificationConfigurationStatusValue**](NotificationConfigurationStatusValue.md) | | **NotificationChannels** | [**[]ChannelReferenceId**](ChannelReferenceId.md) | | @@ -19,7 +19,7 @@ Name | Type | Description | Notes ### NewNotificationConfigurationWriteSchema -`func NewNotificationConfigurationWriteSchema(name string, notifyHealthStates NotifyOnOptions, monitors []MonitorReferenceId, monitorTags []string, componentTypes []int64, componentTags []string, status NotificationConfigurationStatusValue, notificationChannels []ChannelReferenceId, ) *NotificationConfigurationWriteSchema` +`func NewNotificationConfigurationWriteSchema(name string, notifyHealthStates NotifyOnOptions, monitors []MonitorReferenceId, monitorTags []string, componentTypeNames []string, componentTags []string, status NotificationConfigurationStatusValue, notificationChannels []ChannelReferenceId, ) *NotificationConfigurationWriteSchema` NewNotificationConfigurationWriteSchema instantiates a new NotificationConfigurationWriteSchema object This constructor will assign default values to properties that have it defined, @@ -164,24 +164,24 @@ and a boolean to check if the value has been set. SetMonitorTags sets MonitorTags field to given value. -### GetComponentTypes +### GetComponentTypeNames -`func (o *NotificationConfigurationWriteSchema) GetComponentTypes() []int64` +`func (o *NotificationConfigurationWriteSchema) GetComponentTypeNames() []string` -GetComponentTypes returns the ComponentTypes field if non-nil, zero value otherwise. +GetComponentTypeNames returns the ComponentTypeNames field if non-nil, zero value otherwise. -### GetComponentTypesOk +### GetComponentTypeNamesOk -`func (o *NotificationConfigurationWriteSchema) GetComponentTypesOk() (*[]int64, bool)` +`func (o *NotificationConfigurationWriteSchema) GetComponentTypeNamesOk() (*[]string, bool)` -GetComponentTypesOk returns a tuple with the ComponentTypes field if it's non-nil, zero value otherwise +GetComponentTypeNamesOk returns a tuple with the ComponentTypeNames field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetComponentTypes +### SetComponentTypeNames -`func (o *NotificationConfigurationWriteSchema) SetComponentTypes(v []int64)` +`func (o *NotificationConfigurationWriteSchema) SetComponentTypeNames(v []string)` -SetComponentTypes sets ComponentTypes field to given value. +SetComponentTypeNames sets ComponentTypeNames field to given value. ### GetComponentTags diff --git a/generated/stackstate_api/docs/NotificationConfigurationsApi.md b/generated/stackstate_api/docs/NotificationConfigurationsApi.md index ea78af79..eeda4ef7 100644 --- a/generated/stackstate_api/docs/NotificationConfigurationsApi.md +++ b/generated/stackstate_api/docs/NotificationConfigurationsApi.md @@ -34,7 +34,7 @@ import ( ) func main() { - notificationConfigurationWriteSchema := *openapiclient.NewNotificationConfigurationWriteSchema("Name_example", openapiclient.NotifyOnOptions("CRITICAL"), []openapiclient.MonitorReferenceId{openapiclient.MonitorReferenceId{ExternalMonitorDefId: openapiclient.NewExternalMonitorDefId("Type_example", int64(123))}}, []string{"MonitorTags_example"}, []int64{int64(123)}, []string{"ComponentTags_example"}, openapiclient.NotificationConfigurationStatusValue("ENABLED"), []openapiclient.ChannelReferenceId{openapiclient.ChannelReferenceId{EmailChannelRefId: openapiclient.NewEmailChannelRefId("Type_example", int64(123))}}) // NotificationConfigurationWriteSchema | Create or update a notification configuration + notificationConfigurationWriteSchema := *openapiclient.NewNotificationConfigurationWriteSchema("Name_example", openapiclient.NotifyOnOptions("CRITICAL"), []openapiclient.MonitorReferenceId{openapiclient.MonitorReferenceId{ExternalMonitorDefId: openapiclient.NewExternalMonitorDefId("Type_example", int64(123))}}, []string{"MonitorTags_example"}, []string{"ComponentTypeNames_example"}, []string{"ComponentTags_example"}, openapiclient.NotificationConfigurationStatusValue("ENABLED"), []openapiclient.ChannelReferenceId{openapiclient.ChannelReferenceId{EmailChannelRefId: openapiclient.NewEmailChannelRefId("Type_example", int64(123))}}) // NotificationConfigurationWriteSchema | Create or update a notification configuration configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -370,7 +370,7 @@ import ( func main() { notificationConfigurationIdOrUrn := "notificationConfigurationIdOrUrn_example" // string | Notification identifier - notificationConfigurationWriteSchema := *openapiclient.NewNotificationConfigurationWriteSchema("Name_example", openapiclient.NotifyOnOptions("CRITICAL"), []openapiclient.MonitorReferenceId{openapiclient.MonitorReferenceId{ExternalMonitorDefId: openapiclient.NewExternalMonitorDefId("Type_example", int64(123))}}, []string{"MonitorTags_example"}, []int64{int64(123)}, []string{"ComponentTags_example"}, openapiclient.NotificationConfigurationStatusValue("ENABLED"), []openapiclient.ChannelReferenceId{openapiclient.ChannelReferenceId{EmailChannelRefId: openapiclient.NewEmailChannelRefId("Type_example", int64(123))}}) // NotificationConfigurationWriteSchema | Create or update a notification configuration + notificationConfigurationWriteSchema := *openapiclient.NewNotificationConfigurationWriteSchema("Name_example", openapiclient.NotifyOnOptions("CRITICAL"), []openapiclient.MonitorReferenceId{openapiclient.MonitorReferenceId{ExternalMonitorDefId: openapiclient.NewExternalMonitorDefId("Type_example", int64(123))}}, []string{"MonitorTags_example"}, []string{"ComponentTypeNames_example"}, []string{"ComponentTags_example"}, openapiclient.NotificationConfigurationStatusValue("ENABLED"), []openapiclient.ChannelReferenceId{openapiclient.ChannelReferenceId{EmailChannelRefId: openapiclient.NewEmailChannelRefId("Type_example", int64(123))}}) // NotificationConfigurationWriteSchema | Create or update a notification configuration configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) diff --git a/generated/stackstate_api/model_authorize_ingestion_api_key_request.go b/generated/stackstate_api/model_authorize_ingestion_api_key_request.go deleted file mode 100644 index 72565d7f..00000000 --- a/generated/stackstate_api/model_authorize_ingestion_api_key_request.go +++ /dev/null @@ -1,107 +0,0 @@ -/* -StackState API - -This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). - -API version: 5.2.0 -Contact: info@stackstate.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackstate_api - -import ( - "encoding/json" -) - -// AuthorizeIngestionApiKeyRequest struct for AuthorizeIngestionApiKeyRequest -type AuthorizeIngestionApiKeyRequest struct { - ApiKey string `json:"apiKey"` -} - -// NewAuthorizeIngestionApiKeyRequest instantiates a new AuthorizeIngestionApiKeyRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAuthorizeIngestionApiKeyRequest(apiKey string) *AuthorizeIngestionApiKeyRequest { - this := AuthorizeIngestionApiKeyRequest{} - this.ApiKey = apiKey - return &this -} - -// NewAuthorizeIngestionApiKeyRequestWithDefaults instantiates a new AuthorizeIngestionApiKeyRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAuthorizeIngestionApiKeyRequestWithDefaults() *AuthorizeIngestionApiKeyRequest { - this := AuthorizeIngestionApiKeyRequest{} - return &this -} - -// GetApiKey returns the ApiKey field value -func (o *AuthorizeIngestionApiKeyRequest) GetApiKey() string { - if o == nil { - var ret string - return ret - } - - return o.ApiKey -} - -// GetApiKeyOk returns a tuple with the ApiKey field value -// and a boolean to check if the value has been set. -func (o *AuthorizeIngestionApiKeyRequest) GetApiKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ApiKey, true -} - -// SetApiKey sets field value -func (o *AuthorizeIngestionApiKeyRequest) SetApiKey(v string) { - o.ApiKey = v -} - -func (o AuthorizeIngestionApiKeyRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["apiKey"] = o.ApiKey - } - return json.Marshal(toSerialize) -} - -type NullableAuthorizeIngestionApiKeyRequest struct { - value *AuthorizeIngestionApiKeyRequest - isSet bool -} - -func (v NullableAuthorizeIngestionApiKeyRequest) Get() *AuthorizeIngestionApiKeyRequest { - return v.value -} - -func (v *NullableAuthorizeIngestionApiKeyRequest) Set(val *AuthorizeIngestionApiKeyRequest) { - v.value = val - v.isSet = true -} - -func (v NullableAuthorizeIngestionApiKeyRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableAuthorizeIngestionApiKeyRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuthorizeIngestionApiKeyRequest(val *AuthorizeIngestionApiKeyRequest) *NullableAuthorizeIngestionApiKeyRequest { - return &NullableAuthorizeIngestionApiKeyRequest{value: val, isSet: true} -} - -func (v NullableAuthorizeIngestionApiKeyRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuthorizeIngestionApiKeyRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/stackstate_api/model_event_component.go b/generated/stackstate_api/model_event_component.go index fbc4572a..311cbc88 100644 --- a/generated/stackstate_api/model_event_component.go +++ b/generated/stackstate_api/model_event_component.go @@ -17,22 +17,25 @@ import ( // EventComponent struct for EventComponent type EventComponent struct { - Type string `json:"_type"` - Id int64 `json:"id"` - ComponentTypeId int64 `json:"componentTypeId"` - Name string `json:"name"` + Type string `json:"_type"` + Id int64 `json:"id"` + TypeName string `json:"typeName"` + Name string `json:"name"` + Identifiers []string `json:"identifiers"` + Iconbase64 *string `json:"iconbase64,omitempty"` } // NewEventComponent instantiates a new EventComponent object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewEventComponent(type_ string, id int64, componentTypeId int64, name string) *EventComponent { +func NewEventComponent(type_ string, id int64, typeName string, name string, identifiers []string) *EventComponent { this := EventComponent{} this.Type = type_ this.Id = id - this.ComponentTypeId = componentTypeId + this.TypeName = typeName this.Name = name + this.Identifiers = identifiers return &this } @@ -92,28 +95,28 @@ func (o *EventComponent) SetId(v int64) { o.Id = v } -// GetComponentTypeId returns the ComponentTypeId field value -func (o *EventComponent) GetComponentTypeId() int64 { +// GetTypeName returns the TypeName field value +func (o *EventComponent) GetTypeName() string { if o == nil { - var ret int64 + var ret string return ret } - return o.ComponentTypeId + return o.TypeName } -// GetComponentTypeIdOk returns a tuple with the ComponentTypeId field value +// GetTypeNameOk returns a tuple with the TypeName field value // and a boolean to check if the value has been set. -func (o *EventComponent) GetComponentTypeIdOk() (*int64, bool) { +func (o *EventComponent) GetTypeNameOk() (*string, bool) { if o == nil { return nil, false } - return &o.ComponentTypeId, true + return &o.TypeName, true } -// SetComponentTypeId sets field value -func (o *EventComponent) SetComponentTypeId(v int64) { - o.ComponentTypeId = v +// SetTypeName sets field value +func (o *EventComponent) SetTypeName(v string) { + o.TypeName = v } // GetName returns the Name field value @@ -140,6 +143,62 @@ func (o *EventComponent) SetName(v string) { o.Name = v } +// GetIdentifiers returns the Identifiers field value +func (o *EventComponent) GetIdentifiers() []string { + if o == nil { + var ret []string + return ret + } + + return o.Identifiers +} + +// GetIdentifiersOk returns a tuple with the Identifiers field value +// and a boolean to check if the value has been set. +func (o *EventComponent) GetIdentifiersOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Identifiers, true +} + +// SetIdentifiers sets field value +func (o *EventComponent) SetIdentifiers(v []string) { + o.Identifiers = v +} + +// GetIconbase64 returns the Iconbase64 field value if set, zero value otherwise. +func (o *EventComponent) GetIconbase64() string { + if o == nil || o.Iconbase64 == nil { + var ret string + return ret + } + return *o.Iconbase64 +} + +// GetIconbase64Ok returns a tuple with the Iconbase64 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EventComponent) GetIconbase64Ok() (*string, bool) { + if o == nil || o.Iconbase64 == nil { + return nil, false + } + return o.Iconbase64, true +} + +// HasIconbase64 returns a boolean if a field has been set. +func (o *EventComponent) HasIconbase64() bool { + if o != nil && o.Iconbase64 != nil { + return true + } + + return false +} + +// SetIconbase64 gets a reference to the given string and assigns it to the Iconbase64 field. +func (o *EventComponent) SetIconbase64(v string) { + o.Iconbase64 = &v +} + func (o EventComponent) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { @@ -149,11 +208,17 @@ func (o EventComponent) MarshalJSON() ([]byte, error) { toSerialize["id"] = o.Id } if true { - toSerialize["componentTypeId"] = o.ComponentTypeId + toSerialize["typeName"] = o.TypeName } if true { toSerialize["name"] = o.Name } + if true { + toSerialize["identifiers"] = o.Identifiers + } + if o.Iconbase64 != nil { + toSerialize["iconbase64"] = o.Iconbase64 + } return json.Marshal(toSerialize) } diff --git a/generated/stackstate_api/model_event_relation.go b/generated/stackstate_api/model_event_relation.go index bbd4af5c..bd73899b 100644 --- a/generated/stackstate_api/model_event_relation.go +++ b/generated/stackstate_api/model_event_relation.go @@ -19,8 +19,9 @@ import ( type EventRelation struct { Type string `json:"_type"` Id int64 `json:"id"` - RelationTypeId int64 `json:"relationTypeId"` + TypeName string `json:"typeName"` Name *string `json:"name,omitempty"` + Identifiers []string `json:"identifiers"` Source EventComponent `json:"source"` Target EventComponent `json:"target"` DependencyDirection DependencyDirection `json:"dependencyDirection"` @@ -30,11 +31,12 @@ type EventRelation struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewEventRelation(type_ string, id int64, relationTypeId int64, source EventComponent, target EventComponent, dependencyDirection DependencyDirection) *EventRelation { +func NewEventRelation(type_ string, id int64, typeName string, identifiers []string, source EventComponent, target EventComponent, dependencyDirection DependencyDirection) *EventRelation { this := EventRelation{} this.Type = type_ this.Id = id - this.RelationTypeId = relationTypeId + this.TypeName = typeName + this.Identifiers = identifiers this.Source = source this.Target = target this.DependencyDirection = dependencyDirection @@ -97,28 +99,28 @@ func (o *EventRelation) SetId(v int64) { o.Id = v } -// GetRelationTypeId returns the RelationTypeId field value -func (o *EventRelation) GetRelationTypeId() int64 { +// GetTypeName returns the TypeName field value +func (o *EventRelation) GetTypeName() string { if o == nil { - var ret int64 + var ret string return ret } - return o.RelationTypeId + return o.TypeName } -// GetRelationTypeIdOk returns a tuple with the RelationTypeId field value +// GetTypeNameOk returns a tuple with the TypeName field value // and a boolean to check if the value has been set. -func (o *EventRelation) GetRelationTypeIdOk() (*int64, bool) { +func (o *EventRelation) GetTypeNameOk() (*string, bool) { if o == nil { return nil, false } - return &o.RelationTypeId, true + return &o.TypeName, true } -// SetRelationTypeId sets field value -func (o *EventRelation) SetRelationTypeId(v int64) { - o.RelationTypeId = v +// SetTypeName sets field value +func (o *EventRelation) SetTypeName(v string) { + o.TypeName = v } // GetName returns the Name field value if set, zero value otherwise. @@ -153,6 +155,30 @@ func (o *EventRelation) SetName(v string) { o.Name = &v } +// GetIdentifiers returns the Identifiers field value +func (o *EventRelation) GetIdentifiers() []string { + if o == nil { + var ret []string + return ret + } + + return o.Identifiers +} + +// GetIdentifiersOk returns a tuple with the Identifiers field value +// and a boolean to check if the value has been set. +func (o *EventRelation) GetIdentifiersOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Identifiers, true +} + +// SetIdentifiers sets field value +func (o *EventRelation) SetIdentifiers(v []string) { + o.Identifiers = v +} + // GetSource returns the Source field value func (o *EventRelation) GetSource() EventComponent { if o == nil { @@ -234,11 +260,14 @@ func (o EventRelation) MarshalJSON() ([]byte, error) { toSerialize["id"] = o.Id } if true { - toSerialize["relationTypeId"] = o.RelationTypeId + toSerialize["typeName"] = o.TypeName } if o.Name != nil { toSerialize["name"] = o.Name } + if true { + toSerialize["identifiers"] = o.Identifiers + } if true { toSerialize["source"] = o.Source } diff --git a/generated/stackstate_api/model_generate_ingestion_api_key_request.go b/generated/stackstate_api/model_generate_ingestion_api_key_request.go deleted file mode 100644 index 4ca2386e..00000000 --- a/generated/stackstate_api/model_generate_ingestion_api_key_request.go +++ /dev/null @@ -1,179 +0,0 @@ -/* -StackState API - -This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). - -API version: 5.2.0 -Contact: info@stackstate.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackstate_api - -import ( - "encoding/json" -) - -// GenerateIngestionApiKeyRequest struct for GenerateIngestionApiKeyRequest -type GenerateIngestionApiKeyRequest struct { - Name string `json:"name"` - Description *string `json:"description,omitempty"` - Expiration *int64 `json:"expiration,omitempty"` -} - -// NewGenerateIngestionApiKeyRequest instantiates a new GenerateIngestionApiKeyRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGenerateIngestionApiKeyRequest(name string) *GenerateIngestionApiKeyRequest { - this := GenerateIngestionApiKeyRequest{} - this.Name = name - return &this -} - -// NewGenerateIngestionApiKeyRequestWithDefaults instantiates a new GenerateIngestionApiKeyRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGenerateIngestionApiKeyRequestWithDefaults() *GenerateIngestionApiKeyRequest { - this := GenerateIngestionApiKeyRequest{} - return &this -} - -// GetName returns the Name field value -func (o *GenerateIngestionApiKeyRequest) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *GenerateIngestionApiKeyRequest) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *GenerateIngestionApiKeyRequest) SetName(v string) { - o.Name = v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *GenerateIngestionApiKeyRequest) GetDescription() string { - if o == nil || o.Description == nil { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateIngestionApiKeyRequest) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *GenerateIngestionApiKeyRequest) HasDescription() bool { - if o != nil && o.Description != nil { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *GenerateIngestionApiKeyRequest) SetDescription(v string) { - o.Description = &v -} - -// GetExpiration returns the Expiration field value if set, zero value otherwise. -func (o *GenerateIngestionApiKeyRequest) GetExpiration() int64 { - if o == nil || o.Expiration == nil { - var ret int64 - return ret - } - return *o.Expiration -} - -// GetExpirationOk returns a tuple with the Expiration field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GenerateIngestionApiKeyRequest) GetExpirationOk() (*int64, bool) { - if o == nil || o.Expiration == nil { - return nil, false - } - return o.Expiration, true -} - -// HasExpiration returns a boolean if a field has been set. -func (o *GenerateIngestionApiKeyRequest) HasExpiration() bool { - if o != nil && o.Expiration != nil { - return true - } - - return false -} - -// SetExpiration gets a reference to the given int64 and assigns it to the Expiration field. -func (o *GenerateIngestionApiKeyRequest) SetExpiration(v int64) { - o.Expiration = &v -} - -func (o GenerateIngestionApiKeyRequest) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name - } - if o.Description != nil { - toSerialize["description"] = o.Description - } - if o.Expiration != nil { - toSerialize["expiration"] = o.Expiration - } - return json.Marshal(toSerialize) -} - -type NullableGenerateIngestionApiKeyRequest struct { - value *GenerateIngestionApiKeyRequest - isSet bool -} - -func (v NullableGenerateIngestionApiKeyRequest) Get() *GenerateIngestionApiKeyRequest { - return v.value -} - -func (v *NullableGenerateIngestionApiKeyRequest) Set(val *GenerateIngestionApiKeyRequest) { - v.value = val - v.isSet = true -} - -func (v NullableGenerateIngestionApiKeyRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableGenerateIngestionApiKeyRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGenerateIngestionApiKeyRequest(val *GenerateIngestionApiKeyRequest) *NullableGenerateIngestionApiKeyRequest { - return &NullableGenerateIngestionApiKeyRequest{value: val, isSet: true} -} - -func (v NullableGenerateIngestionApiKeyRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGenerateIngestionApiKeyRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/stackstate_api/model_generated_ingestion_api_key_response.go b/generated/stackstate_api/model_generated_ingestion_api_key_response.go deleted file mode 100644 index f95eb8d8..00000000 --- a/generated/stackstate_api/model_generated_ingestion_api_key_response.go +++ /dev/null @@ -1,266 +0,0 @@ -/* -StackState API - -This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). - -API version: 5.2.0 -Contact: info@stackstate.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackstate_api - -import ( - "encoding/json" -) - -// GeneratedIngestionApiKeyResponse struct for GeneratedIngestionApiKeyResponse -type GeneratedIngestionApiKeyResponse struct { - Id int64 `json:"id"` - LastUpdateTimestamp int64 `json:"lastUpdateTimestamp"` - Name string `json:"name"` - Description *string `json:"description,omitempty"` - Expiration *int64 `json:"expiration,omitempty"` - ApiKey string `json:"apiKey"` -} - -// NewGeneratedIngestionApiKeyResponse instantiates a new GeneratedIngestionApiKeyResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGeneratedIngestionApiKeyResponse(id int64, lastUpdateTimestamp int64, name string, apiKey string) *GeneratedIngestionApiKeyResponse { - this := GeneratedIngestionApiKeyResponse{} - this.Id = id - this.LastUpdateTimestamp = lastUpdateTimestamp - this.Name = name - this.ApiKey = apiKey - return &this -} - -// NewGeneratedIngestionApiKeyResponseWithDefaults instantiates a new GeneratedIngestionApiKeyResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGeneratedIngestionApiKeyResponseWithDefaults() *GeneratedIngestionApiKeyResponse { - this := GeneratedIngestionApiKeyResponse{} - return &this -} - -// GetId returns the Id field value -func (o *GeneratedIngestionApiKeyResponse) GetId() int64 { - if o == nil { - var ret int64 - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *GeneratedIngestionApiKeyResponse) GetIdOk() (*int64, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *GeneratedIngestionApiKeyResponse) SetId(v int64) { - o.Id = v -} - -// GetLastUpdateTimestamp returns the LastUpdateTimestamp field value -func (o *GeneratedIngestionApiKeyResponse) GetLastUpdateTimestamp() int64 { - if o == nil { - var ret int64 - return ret - } - - return o.LastUpdateTimestamp -} - -// GetLastUpdateTimestampOk returns a tuple with the LastUpdateTimestamp field value -// and a boolean to check if the value has been set. -func (o *GeneratedIngestionApiKeyResponse) GetLastUpdateTimestampOk() (*int64, bool) { - if o == nil { - return nil, false - } - return &o.LastUpdateTimestamp, true -} - -// SetLastUpdateTimestamp sets field value -func (o *GeneratedIngestionApiKeyResponse) SetLastUpdateTimestamp(v int64) { - o.LastUpdateTimestamp = v -} - -// GetName returns the Name field value -func (o *GeneratedIngestionApiKeyResponse) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *GeneratedIngestionApiKeyResponse) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *GeneratedIngestionApiKeyResponse) SetName(v string) { - o.Name = v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *GeneratedIngestionApiKeyResponse) GetDescription() string { - if o == nil || o.Description == nil { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GeneratedIngestionApiKeyResponse) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *GeneratedIngestionApiKeyResponse) HasDescription() bool { - if o != nil && o.Description != nil { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *GeneratedIngestionApiKeyResponse) SetDescription(v string) { - o.Description = &v -} - -// GetExpiration returns the Expiration field value if set, zero value otherwise. -func (o *GeneratedIngestionApiKeyResponse) GetExpiration() int64 { - if o == nil || o.Expiration == nil { - var ret int64 - return ret - } - return *o.Expiration -} - -// GetExpirationOk returns a tuple with the Expiration field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *GeneratedIngestionApiKeyResponse) GetExpirationOk() (*int64, bool) { - if o == nil || o.Expiration == nil { - return nil, false - } - return o.Expiration, true -} - -// HasExpiration returns a boolean if a field has been set. -func (o *GeneratedIngestionApiKeyResponse) HasExpiration() bool { - if o != nil && o.Expiration != nil { - return true - } - - return false -} - -// SetExpiration gets a reference to the given int64 and assigns it to the Expiration field. -func (o *GeneratedIngestionApiKeyResponse) SetExpiration(v int64) { - o.Expiration = &v -} - -// GetApiKey returns the ApiKey field value -func (o *GeneratedIngestionApiKeyResponse) GetApiKey() string { - if o == nil { - var ret string - return ret - } - - return o.ApiKey -} - -// GetApiKeyOk returns a tuple with the ApiKey field value -// and a boolean to check if the value has been set. -func (o *GeneratedIngestionApiKeyResponse) GetApiKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ApiKey, true -} - -// SetApiKey sets field value -func (o *GeneratedIngestionApiKeyResponse) SetApiKey(v string) { - o.ApiKey = v -} - -func (o GeneratedIngestionApiKeyResponse) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["id"] = o.Id - } - if true { - toSerialize["lastUpdateTimestamp"] = o.LastUpdateTimestamp - } - if true { - toSerialize["name"] = o.Name - } - if o.Description != nil { - toSerialize["description"] = o.Description - } - if o.Expiration != nil { - toSerialize["expiration"] = o.Expiration - } - if true { - toSerialize["apiKey"] = o.ApiKey - } - return json.Marshal(toSerialize) -} - -type NullableGeneratedIngestionApiKeyResponse struct { - value *GeneratedIngestionApiKeyResponse - isSet bool -} - -func (v NullableGeneratedIngestionApiKeyResponse) Get() *GeneratedIngestionApiKeyResponse { - return v.value -} - -func (v *NullableGeneratedIngestionApiKeyResponse) Set(val *GeneratedIngestionApiKeyResponse) { - v.value = val - v.isSet = true -} - -func (v NullableGeneratedIngestionApiKeyResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableGeneratedIngestionApiKeyResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGeneratedIngestionApiKeyResponse(val *GeneratedIngestionApiKeyResponse) *NullableGeneratedIngestionApiKeyResponse { - return &NullableGeneratedIngestionApiKeyResponse{value: val, isSet: true} -} - -func (v NullableGeneratedIngestionApiKeyResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGeneratedIngestionApiKeyResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/stackstate_api/model_ingestion_api_key.go b/generated/stackstate_api/model_ingestion_api_key.go deleted file mode 100644 index b8bc03a5..00000000 --- a/generated/stackstate_api/model_ingestion_api_key.go +++ /dev/null @@ -1,237 +0,0 @@ -/* -StackState API - -This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). - -API version: 5.2.0 -Contact: info@stackstate.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackstate_api - -import ( - "encoding/json" -) - -// IngestionApiKey struct for IngestionApiKey -type IngestionApiKey struct { - Id int64 `json:"id"` - LastUpdateTimestamp int64 `json:"lastUpdateTimestamp"` - Name string `json:"name"` - Description *string `json:"description,omitempty"` - Expiration *int64 `json:"expiration,omitempty"` -} - -// NewIngestionApiKey instantiates a new IngestionApiKey object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewIngestionApiKey(id int64, lastUpdateTimestamp int64, name string) *IngestionApiKey { - this := IngestionApiKey{} - this.Id = id - this.LastUpdateTimestamp = lastUpdateTimestamp - this.Name = name - return &this -} - -// NewIngestionApiKeyWithDefaults instantiates a new IngestionApiKey object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewIngestionApiKeyWithDefaults() *IngestionApiKey { - this := IngestionApiKey{} - return &this -} - -// GetId returns the Id field value -func (o *IngestionApiKey) GetId() int64 { - if o == nil { - var ret int64 - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *IngestionApiKey) GetIdOk() (*int64, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *IngestionApiKey) SetId(v int64) { - o.Id = v -} - -// GetLastUpdateTimestamp returns the LastUpdateTimestamp field value -func (o *IngestionApiKey) GetLastUpdateTimestamp() int64 { - if o == nil { - var ret int64 - return ret - } - - return o.LastUpdateTimestamp -} - -// GetLastUpdateTimestampOk returns a tuple with the LastUpdateTimestamp field value -// and a boolean to check if the value has been set. -func (o *IngestionApiKey) GetLastUpdateTimestampOk() (*int64, bool) { - if o == nil { - return nil, false - } - return &o.LastUpdateTimestamp, true -} - -// SetLastUpdateTimestamp sets field value -func (o *IngestionApiKey) SetLastUpdateTimestamp(v int64) { - o.LastUpdateTimestamp = v -} - -// GetName returns the Name field value -func (o *IngestionApiKey) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *IngestionApiKey) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *IngestionApiKey) SetName(v string) { - o.Name = v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *IngestionApiKey) GetDescription() string { - if o == nil || o.Description == nil { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IngestionApiKey) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *IngestionApiKey) HasDescription() bool { - if o != nil && o.Description != nil { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *IngestionApiKey) SetDescription(v string) { - o.Description = &v -} - -// GetExpiration returns the Expiration field value if set, zero value otherwise. -func (o *IngestionApiKey) GetExpiration() int64 { - if o == nil || o.Expiration == nil { - var ret int64 - return ret - } - return *o.Expiration -} - -// GetExpirationOk returns a tuple with the Expiration field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IngestionApiKey) GetExpirationOk() (*int64, bool) { - if o == nil || o.Expiration == nil { - return nil, false - } - return o.Expiration, true -} - -// HasExpiration returns a boolean if a field has been set. -func (o *IngestionApiKey) HasExpiration() bool { - if o != nil && o.Expiration != nil { - return true - } - - return false -} - -// SetExpiration gets a reference to the given int64 and assigns it to the Expiration field. -func (o *IngestionApiKey) SetExpiration(v int64) { - o.Expiration = &v -} - -func (o IngestionApiKey) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["id"] = o.Id - } - if true { - toSerialize["lastUpdateTimestamp"] = o.LastUpdateTimestamp - } - if true { - toSerialize["name"] = o.Name - } - if o.Description != nil { - toSerialize["description"] = o.Description - } - if o.Expiration != nil { - toSerialize["expiration"] = o.Expiration - } - return json.Marshal(toSerialize) -} - -type NullableIngestionApiKey struct { - value *IngestionApiKey - isSet bool -} - -func (v NullableIngestionApiKey) Get() *IngestionApiKey { - return v.value -} - -func (v *NullableIngestionApiKey) Set(val *IngestionApiKey) { - v.value = val - v.isSet = true -} - -func (v NullableIngestionApiKey) IsSet() bool { - return v.isSet -} - -func (v *NullableIngestionApiKey) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableIngestionApiKey(val *IngestionApiKey) *NullableIngestionApiKey { - return &NullableIngestionApiKey{value: val, isSet: true} -} - -func (v NullableIngestionApiKey) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableIngestionApiKey) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/stackstate_api/model_ingestion_api_key_create_error.go b/generated/stackstate_api/model_ingestion_api_key_create_error.go deleted file mode 100644 index f5391b7f..00000000 --- a/generated/stackstate_api/model_ingestion_api_key_create_error.go +++ /dev/null @@ -1,112 +0,0 @@ -/* -StackState API - -This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). - -API version: 5.2.0 -Contact: info@stackstate.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackstate_api - -import ( - "encoding/json" - "fmt" -) - -// IngestionApiKeyCreateError - struct for IngestionApiKeyCreateError -type IngestionApiKeyCreateError struct { - IngestionApiKeyInvalidExpiryError *IngestionApiKeyInvalidExpiryError -} - -// IngestionApiKeyInvalidExpiryErrorAsIngestionApiKeyCreateError is a convenience function that returns IngestionApiKeyInvalidExpiryError wrapped in IngestionApiKeyCreateError -func IngestionApiKeyInvalidExpiryErrorAsIngestionApiKeyCreateError(v *IngestionApiKeyInvalidExpiryError) IngestionApiKeyCreateError { - return IngestionApiKeyCreateError{ - IngestionApiKeyInvalidExpiryError: v, - } -} - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *IngestionApiKeyCreateError) UnmarshalJSON(data []byte) error { - var err error - // use discriminator value to speed up the lookup - var jsonDict map[string]interface{} - err = newStrictDecoder(data).Decode(&jsonDict) - if err != nil { - return fmt.Errorf("Failed to unmarshal JSON into map for the discriminator lookup.") - } - - // check if the discriminator value is 'IngestionApiKeyInvalidExpiryError' - if jsonDict["_type"] == "IngestionApiKeyInvalidExpiryError" { - // try to unmarshal JSON data into IngestionApiKeyInvalidExpiryError - err = json.Unmarshal(data, &dst.IngestionApiKeyInvalidExpiryError) - if err == nil { - return nil // data stored in dst.IngestionApiKeyInvalidExpiryError, return on the first match - } else { - dst.IngestionApiKeyInvalidExpiryError = nil - return fmt.Errorf("Failed to unmarshal IngestionApiKeyCreateError as IngestionApiKeyInvalidExpiryError: %s", err.Error()) - } - } - - return nil -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src IngestionApiKeyCreateError) MarshalJSON() ([]byte, error) { - if src.IngestionApiKeyInvalidExpiryError != nil { - return json.Marshal(&src.IngestionApiKeyInvalidExpiryError) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *IngestionApiKeyCreateError) GetActualInstance() interface{} { - if obj == nil { - return nil - } - if obj.IngestionApiKeyInvalidExpiryError != nil { - return obj.IngestionApiKeyInvalidExpiryError - } - - // all schemas are nil - return nil -} - -type NullableIngestionApiKeyCreateError struct { - value *IngestionApiKeyCreateError - isSet bool -} - -func (v NullableIngestionApiKeyCreateError) Get() *IngestionApiKeyCreateError { - return v.value -} - -func (v *NullableIngestionApiKeyCreateError) Set(val *IngestionApiKeyCreateError) { - v.value = val - v.isSet = true -} - -func (v NullableIngestionApiKeyCreateError) IsSet() bool { - return v.isSet -} - -func (v *NullableIngestionApiKeyCreateError) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableIngestionApiKeyCreateError(val *IngestionApiKeyCreateError) *NullableIngestionApiKeyCreateError { - return &NullableIngestionApiKeyCreateError{value: val, isSet: true} -} - -func (v NullableIngestionApiKeyCreateError) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableIngestionApiKeyCreateError) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/stackstate_api/model_ingestion_api_key_invalid_expiry_error.go b/generated/stackstate_api/model_ingestion_api_key_invalid_expiry_error.go deleted file mode 100644 index 44d13a48..00000000 --- a/generated/stackstate_api/model_ingestion_api_key_invalid_expiry_error.go +++ /dev/null @@ -1,136 +0,0 @@ -/* -StackState API - -This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). - -API version: 5.2.0 -Contact: info@stackstate.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackstate_api - -import ( - "encoding/json" -) - -// IngestionApiKeyInvalidExpiryError struct for IngestionApiKeyInvalidExpiryError -type IngestionApiKeyInvalidExpiryError struct { - Type string `json:"_type"` - Message string `json:"message"` -} - -// NewIngestionApiKeyInvalidExpiryError instantiates a new IngestionApiKeyInvalidExpiryError object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewIngestionApiKeyInvalidExpiryError(type_ string, message string) *IngestionApiKeyInvalidExpiryError { - this := IngestionApiKeyInvalidExpiryError{} - this.Type = type_ - this.Message = message - return &this -} - -// NewIngestionApiKeyInvalidExpiryErrorWithDefaults instantiates a new IngestionApiKeyInvalidExpiryError object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewIngestionApiKeyInvalidExpiryErrorWithDefaults() *IngestionApiKeyInvalidExpiryError { - this := IngestionApiKeyInvalidExpiryError{} - return &this -} - -// GetType returns the Type field value -func (o *IngestionApiKeyInvalidExpiryError) GetType() string { - if o == nil { - var ret string - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *IngestionApiKeyInvalidExpiryError) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *IngestionApiKeyInvalidExpiryError) SetType(v string) { - o.Type = v -} - -// GetMessage returns the Message field value -func (o *IngestionApiKeyInvalidExpiryError) GetMessage() string { - if o == nil { - var ret string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *IngestionApiKeyInvalidExpiryError) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Message, true -} - -// SetMessage sets field value -func (o *IngestionApiKeyInvalidExpiryError) SetMessage(v string) { - o.Message = v -} - -func (o IngestionApiKeyInvalidExpiryError) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["_type"] = o.Type - } - if true { - toSerialize["message"] = o.Message - } - return json.Marshal(toSerialize) -} - -type NullableIngestionApiKeyInvalidExpiryError struct { - value *IngestionApiKeyInvalidExpiryError - isSet bool -} - -func (v NullableIngestionApiKeyInvalidExpiryError) Get() *IngestionApiKeyInvalidExpiryError { - return v.value -} - -func (v *NullableIngestionApiKeyInvalidExpiryError) Set(val *IngestionApiKeyInvalidExpiryError) { - v.value = val - v.isSet = true -} - -func (v NullableIngestionApiKeyInvalidExpiryError) IsSet() bool { - return v.isSet -} - -func (v *NullableIngestionApiKeyInvalidExpiryError) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableIngestionApiKeyInvalidExpiryError(val *IngestionApiKeyInvalidExpiryError) *NullableIngestionApiKeyInvalidExpiryError { - return &NullableIngestionApiKeyInvalidExpiryError{value: val, isSet: true} -} - -func (v NullableIngestionApiKeyInvalidExpiryError) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableIngestionApiKeyInvalidExpiryError) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/stackstate_api/model_monitor_check_status_component.go b/generated/stackstate_api/model_monitor_check_status_component.go index 82622ed3..2237d3a1 100644 --- a/generated/stackstate_api/model_monitor_check_status_component.go +++ b/generated/stackstate_api/model_monitor_check_status_component.go @@ -22,8 +22,6 @@ type MonitorCheckStatusComponent struct { Name string `json:"name"` Type string `json:"type"` Iconbase64 *string `json:"iconbase64,omitempty"` - Namespace *string `json:"namespace,omitempty"` - Cluster *string `json:"cluster,omitempty"` } // NewMonitorCheckStatusComponent instantiates a new MonitorCheckStatusComponent object @@ -175,70 +173,6 @@ func (o *MonitorCheckStatusComponent) SetIconbase64(v string) { o.Iconbase64 = &v } -// GetNamespace returns the Namespace field value if set, zero value otherwise. -func (o *MonitorCheckStatusComponent) GetNamespace() string { - if o == nil || o.Namespace == nil { - var ret string - return ret - } - return *o.Namespace -} - -// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *MonitorCheckStatusComponent) GetNamespaceOk() (*string, bool) { - if o == nil || o.Namespace == nil { - return nil, false - } - return o.Namespace, true -} - -// HasNamespace returns a boolean if a field has been set. -func (o *MonitorCheckStatusComponent) HasNamespace() bool { - if o != nil && o.Namespace != nil { - return true - } - - return false -} - -// SetNamespace gets a reference to the given string and assigns it to the Namespace field. -func (o *MonitorCheckStatusComponent) SetNamespace(v string) { - o.Namespace = &v -} - -// GetCluster returns the Cluster field value if set, zero value otherwise. -func (o *MonitorCheckStatusComponent) GetCluster() string { - if o == nil || o.Cluster == nil { - var ret string - return ret - } - return *o.Cluster -} - -// GetClusterOk returns a tuple with the Cluster field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *MonitorCheckStatusComponent) GetClusterOk() (*string, bool) { - if o == nil || o.Cluster == nil { - return nil, false - } - return o.Cluster, true -} - -// HasCluster returns a boolean if a field has been set. -func (o *MonitorCheckStatusComponent) HasCluster() bool { - if o != nil && o.Cluster != nil { - return true - } - - return false -} - -// SetCluster gets a reference to the given string and assigns it to the Cluster field. -func (o *MonitorCheckStatusComponent) SetCluster(v string) { - o.Cluster = &v -} - func (o MonitorCheckStatusComponent) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { @@ -256,12 +190,6 @@ func (o MonitorCheckStatusComponent) MarshalJSON() ([]byte, error) { if o.Iconbase64 != nil { toSerialize["iconbase64"] = o.Iconbase64 } - if o.Namespace != nil { - toSerialize["namespace"] = o.Namespace - } - if o.Cluster != nil { - toSerialize["cluster"] = o.Cluster - } return json.Marshal(toSerialize) } diff --git a/generated/stackstate_api/model_monitor_identifier_lookup.go b/generated/stackstate_api/model_monitor_identifier_lookup.go index f49a4d10..36183c7a 100644 --- a/generated/stackstate_api/model_monitor_identifier_lookup.go +++ b/generated/stackstate_api/model_monitor_identifier_lookup.go @@ -17,20 +17,20 @@ import ( // MonitorIdentifierLookup struct for MonitorIdentifierLookup type MonitorIdentifierLookup struct { - MetricQuery string `json:"metricQuery"` - ComponentType int64 `json:"componentType"` - TopN *int32 `json:"topN,omitempty"` - Overrides *MonitorIdentifierLookupOverrides `json:"overrides,omitempty"` + MetricQuery string `json:"metricQuery"` + ComponentTypeName string `json:"componentTypeName"` + TopN *int32 `json:"topN,omitempty"` + Overrides *MonitorIdentifierLookupOverrides `json:"overrides,omitempty"` } // NewMonitorIdentifierLookup instantiates a new MonitorIdentifierLookup object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewMonitorIdentifierLookup(metricQuery string, componentType int64) *MonitorIdentifierLookup { +func NewMonitorIdentifierLookup(metricQuery string, componentTypeName string) *MonitorIdentifierLookup { this := MonitorIdentifierLookup{} this.MetricQuery = metricQuery - this.ComponentType = componentType + this.ComponentTypeName = componentTypeName return &this } @@ -66,28 +66,28 @@ func (o *MonitorIdentifierLookup) SetMetricQuery(v string) { o.MetricQuery = v } -// GetComponentType returns the ComponentType field value -func (o *MonitorIdentifierLookup) GetComponentType() int64 { +// GetComponentTypeName returns the ComponentTypeName field value +func (o *MonitorIdentifierLookup) GetComponentTypeName() string { if o == nil { - var ret int64 + var ret string return ret } - return o.ComponentType + return o.ComponentTypeName } -// GetComponentTypeOk returns a tuple with the ComponentType field value +// GetComponentTypeNameOk returns a tuple with the ComponentTypeName field value // and a boolean to check if the value has been set. -func (o *MonitorIdentifierLookup) GetComponentTypeOk() (*int64, bool) { +func (o *MonitorIdentifierLookup) GetComponentTypeNameOk() (*string, bool) { if o == nil { return nil, false } - return &o.ComponentType, true + return &o.ComponentTypeName, true } -// SetComponentType sets field value -func (o *MonitorIdentifierLookup) SetComponentType(v int64) { - o.ComponentType = v +// SetComponentTypeName sets field value +func (o *MonitorIdentifierLookup) SetComponentTypeName(v string) { + o.ComponentTypeName = v } // GetTopN returns the TopN field value if set, zero value otherwise. @@ -160,7 +160,7 @@ func (o MonitorIdentifierLookup) MarshalJSON() ([]byte, error) { toSerialize["metricQuery"] = o.MetricQuery } if true { - toSerialize["componentType"] = o.ComponentType + toSerialize["componentTypeName"] = o.ComponentTypeName } if o.TopN != nil { toSerialize["topN"] = o.TopN diff --git a/generated/stackstate_api/model_notification_configuration_read_schema.go b/generated/stackstate_api/model_notification_configuration_read_schema.go index f31f29ae..d4bc43e8 100644 --- a/generated/stackstate_api/model_notification_configuration_read_schema.go +++ b/generated/stackstate_api/model_notification_configuration_read_schema.go @@ -23,7 +23,7 @@ type NotificationConfigurationReadSchema struct { NotifyHealthStates NotifyOnOptions `json:"notifyHealthStates"` Monitors []MonitorReferenceId `json:"monitors"` MonitorTags []string `json:"monitorTags"` - ComponentTypes []int64 `json:"componentTypes"` + ComponentTypeNames []string `json:"componentTypeNames"` ComponentTags []string `json:"componentTags"` Status NotificationConfigurationStatusValue `json:"status"` NotificationChannels []ChannelReferenceId `json:"notificationChannels"` @@ -36,13 +36,13 @@ type NotificationConfigurationReadSchema struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewNotificationConfigurationReadSchema(name string, notifyHealthStates NotifyOnOptions, monitors []MonitorReferenceId, monitorTags []string, componentTypes []int64, componentTags []string, status NotificationConfigurationStatusValue, notificationChannels []ChannelReferenceId, id int64, lastUpdateTimestamp int64, runtimeStatus NotificationConfigurationRuntimeStatusValue) *NotificationConfigurationReadSchema { +func NewNotificationConfigurationReadSchema(name string, notifyHealthStates NotifyOnOptions, monitors []MonitorReferenceId, monitorTags []string, componentTypeNames []string, componentTags []string, status NotificationConfigurationStatusValue, notificationChannels []ChannelReferenceId, id int64, lastUpdateTimestamp int64, runtimeStatus NotificationConfigurationRuntimeStatusValue) *NotificationConfigurationReadSchema { this := NotificationConfigurationReadSchema{} this.Name = name this.NotifyHealthStates = notifyHealthStates this.Monitors = monitors this.MonitorTags = monitorTags - this.ComponentTypes = componentTypes + this.ComponentTypeNames = componentTypeNames this.ComponentTags = componentTags this.Status = status this.NotificationChannels = notificationChannels @@ -220,28 +220,28 @@ func (o *NotificationConfigurationReadSchema) SetMonitorTags(v []string) { o.MonitorTags = v } -// GetComponentTypes returns the ComponentTypes field value -func (o *NotificationConfigurationReadSchema) GetComponentTypes() []int64 { +// GetComponentTypeNames returns the ComponentTypeNames field value +func (o *NotificationConfigurationReadSchema) GetComponentTypeNames() []string { if o == nil { - var ret []int64 + var ret []string return ret } - return o.ComponentTypes + return o.ComponentTypeNames } -// GetComponentTypesOk returns a tuple with the ComponentTypes field value +// GetComponentTypeNamesOk returns a tuple with the ComponentTypeNames field value // and a boolean to check if the value has been set. -func (o *NotificationConfigurationReadSchema) GetComponentTypesOk() ([]int64, bool) { +func (o *NotificationConfigurationReadSchema) GetComponentTypeNamesOk() ([]string, bool) { if o == nil { return nil, false } - return o.ComponentTypes, true + return o.ComponentTypeNames, true } -// SetComponentTypes sets field value -func (o *NotificationConfigurationReadSchema) SetComponentTypes(v []int64) { - o.ComponentTypes = v +// SetComponentTypeNames sets field value +func (o *NotificationConfigurationReadSchema) SetComponentTypeNames(v []string) { + o.ComponentTypeNames = v } // GetComponentTags returns the ComponentTags field value @@ -409,7 +409,7 @@ func (o NotificationConfigurationReadSchema) MarshalJSON() ([]byte, error) { toSerialize["monitorTags"] = o.MonitorTags } if true { - toSerialize["componentTypes"] = o.ComponentTypes + toSerialize["componentTypeNames"] = o.ComponentTypeNames } if true { toSerialize["componentTags"] = o.ComponentTags diff --git a/generated/stackstate_api/model_notification_configuration_write_schema.go b/generated/stackstate_api/model_notification_configuration_write_schema.go index f1d04125..3632c89f 100644 --- a/generated/stackstate_api/model_notification_configuration_write_schema.go +++ b/generated/stackstate_api/model_notification_configuration_write_schema.go @@ -23,7 +23,7 @@ type NotificationConfigurationWriteSchema struct { NotifyHealthStates NotifyOnOptions `json:"notifyHealthStates"` Monitors []MonitorReferenceId `json:"monitors"` MonitorTags []string `json:"monitorTags"` - ComponentTypes []int64 `json:"componentTypes"` + ComponentTypeNames []string `json:"componentTypeNames"` ComponentTags []string `json:"componentTags"` Status NotificationConfigurationStatusValue `json:"status"` NotificationChannels []ChannelReferenceId `json:"notificationChannels"` @@ -33,13 +33,13 @@ type NotificationConfigurationWriteSchema struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewNotificationConfigurationWriteSchema(name string, notifyHealthStates NotifyOnOptions, monitors []MonitorReferenceId, monitorTags []string, componentTypes []int64, componentTags []string, status NotificationConfigurationStatusValue, notificationChannels []ChannelReferenceId) *NotificationConfigurationWriteSchema { +func NewNotificationConfigurationWriteSchema(name string, notifyHealthStates NotifyOnOptions, monitors []MonitorReferenceId, monitorTags []string, componentTypeNames []string, componentTags []string, status NotificationConfigurationStatusValue, notificationChannels []ChannelReferenceId) *NotificationConfigurationWriteSchema { this := NotificationConfigurationWriteSchema{} this.Name = name this.NotifyHealthStates = notifyHealthStates this.Monitors = monitors this.MonitorTags = monitorTags - this.ComponentTypes = componentTypes + this.ComponentTypeNames = componentTypeNames this.ComponentTags = componentTags this.Status = status this.NotificationChannels = notificationChannels @@ -214,28 +214,28 @@ func (o *NotificationConfigurationWriteSchema) SetMonitorTags(v []string) { o.MonitorTags = v } -// GetComponentTypes returns the ComponentTypes field value -func (o *NotificationConfigurationWriteSchema) GetComponentTypes() []int64 { +// GetComponentTypeNames returns the ComponentTypeNames field value +func (o *NotificationConfigurationWriteSchema) GetComponentTypeNames() []string { if o == nil { - var ret []int64 + var ret []string return ret } - return o.ComponentTypes + return o.ComponentTypeNames } -// GetComponentTypesOk returns a tuple with the ComponentTypes field value +// GetComponentTypeNamesOk returns a tuple with the ComponentTypeNames field value // and a boolean to check if the value has been set. -func (o *NotificationConfigurationWriteSchema) GetComponentTypesOk() ([]int64, bool) { +func (o *NotificationConfigurationWriteSchema) GetComponentTypeNamesOk() ([]string, bool) { if o == nil { return nil, false } - return o.ComponentTypes, true + return o.ComponentTypeNames, true } -// SetComponentTypes sets field value -func (o *NotificationConfigurationWriteSchema) SetComponentTypes(v []int64) { - o.ComponentTypes = v +// SetComponentTypeNames sets field value +func (o *NotificationConfigurationWriteSchema) SetComponentTypeNames(v []string) { + o.ComponentTypeNames = v } // GetComponentTags returns the ComponentTags field value @@ -331,7 +331,7 @@ func (o NotificationConfigurationWriteSchema) MarshalJSON() ([]byte, error) { toSerialize["monitorTags"] = o.MonitorTags } if true { - toSerialize["componentTypes"] = o.ComponentTypes + toSerialize["componentTypeNames"] = o.ComponentTypeNames } if true { toSerialize["componentTags"] = o.ComponentTags diff --git a/internal/di/mock_stackstate_client.go b/internal/di/mock_stackstate_client.go index 2abf81a2..e6460766 100644 --- a/internal/di/mock_stackstate_client.go +++ b/internal/di/mock_stackstate_client.go @@ -34,7 +34,6 @@ type ApiMocks struct { SubjectApi *stackstate_api.SubjectApiMock TopicApi *stackstate_api.TopicApiMock AgentRegistrationsApi *stackstate_api.AgentRegistrationsApiMock - IngestionApiKeyApi *stackstate_api.IngestionApiKeyApiMock // Admin API: RetentionApi *stackstate_admin_api.RetentionApiMock // MISSING MOCK? You have to manually add new mocks here after generating a new API! @@ -58,7 +57,6 @@ func NewMockStackStateClient() MockStackStateClient { permissionsApi := stackstate_api.NewPermissionsApiMock() subjectApi := stackstate_api.NewSubjectApiMock() topicApi := stackstate_api.NewTopicApiMock() - ingestionApiKeyApi := stackstate_api.NewIngestionApiKeyApiMock() retentionApi := stackstate_admin_api.NewRetentionApiMock() agentRegistrationsApi := stackstate_api.NewAgentRegistrationsApiMock() @@ -80,7 +78,6 @@ func NewMockStackStateClient() MockStackStateClient { PermissionsApi: &permissionsApi, SubjectApi: &subjectApi, TopicApi: &topicApi, - IngestionApiKeyApi: &ingestionApiKeyApi, RetentionApi: &retentionApi, AgentRegistrationsApi: &agentRegistrationsApi, } @@ -102,7 +99,6 @@ func NewMockStackStateClient() MockStackStateClient { SubscriptionApi: apiMocks.SubscriptionApi, PermissionsApi: apiMocks.PermissionsApi, SubjectApi: apiMocks.SubjectApi, - IngestionApiKeyApi: apiMocks.IngestionApiKeyApi, TopicApi: apiMocks.TopicApi, AgentRegistrationsApi: apiMocks.AgentRegistrationsApi, } diff --git a/stackstate_openapi/openapi_version b/stackstate_openapi/openapi_version index 0f9debce..afc78e84 100644 --- a/stackstate_openapi/openapi_version +++ b/stackstate_openapi/openapi_version @@ -1 +1 @@ -c2781061affeff4c6e18f69904fa15bce9a09e05 +2b2b1e8d257a43a927e8f84591f5631bbb5b4a8f