diff --git a/cmd/stackpack.go b/cmd/stackpack.go index 4dd582f5..ba849bb3 100644 --- a/cmd/stackpack.go +++ b/cmd/stackpack.go @@ -27,6 +27,9 @@ func StackPackCommand(cli *di.Deps) *cobra.Command { cmd.AddCommand(stackpack.StackpackUpgradeCommand(cli)) cmd.AddCommand(stackpack.StackpackConfirmManualStepsCommand(cli)) cmd.AddCommand(stackpack.StackpackDescribeCommand(cli)) + cmd.AddCommand(stackpack.StackpackListVersionsCommand(cli)) + cmd.AddCommand(stackpack.StackpackDeleteVersionCommand(cli)) + cmd.AddCommand(stackpack.StackpackDeleteVersionsCommand(cli)) // The not-production-ready commands if os.Getenv(experimentalStackpackEnvVar) != "" { diff --git a/cmd/stackpack/flags.go b/cmd/stackpack/flags.go index 647d09eb..e405ca6a 100644 --- a/cmd/stackpack/flags.go +++ b/cmd/stackpack/flags.go @@ -6,4 +6,7 @@ const ( IdFlag = "id" NameFlag = "name" UnlockedStrategyFlag = "unlocked-strategy" + VersionFlag = "version" + AllFlag = "all" + DevOnlyFlag = "dev-only" ) diff --git a/cmd/stackpack/stackpack_delete_version.go b/cmd/stackpack/stackpack_delete_version.go new file mode 100644 index 00000000..17c180df --- /dev/null +++ b/cmd/stackpack/stackpack_delete_version.go @@ -0,0 +1,55 @@ +package stackpack + +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 DeleteVersionArgs struct { + Name string + Version string +} + +func StackpackDeleteVersionCommand(cli *di.Deps) *cobra.Command { + args := &DeleteVersionArgs{} + cmd := &cobra.Command{ + Use: "delete-version", + Short: "Delete a specific version of a StackPack", + Long: "Delete a specific version of a StackPack from the server. The version cannot be deleted if it is currently in use by an installed instance.", + Example: `# delete version 1.0.0 of the kubernetes StackPack +sts stackpack delete-version --name kubernetes --version 1.0.0`, + RunE: cli.CmdRunEWithApi(RunStackpackDeleteVersionCommand(args)), + } + common.AddRequiredNameFlagVar(cmd, &args.Name, "Name of the StackPack") + cmd.Flags().StringVar(&args.Version, VersionFlag, "", "Version to delete") + cmd.MarkFlagRequired(VersionFlag) //nolint:errcheck + return cmd +} + +func RunStackpackDeleteVersionCommand(args *DeleteVersionArgs) di.CmdWithApiFn { + return func( + cmd *cobra.Command, + cli *di.Deps, + api *stackstate_api.APIClient, + serverInfo *stackstate_api.ServerInfo, + ) common.CLIError { + resp, err := api.StackpackApi.StackPackDeleteVersion(cli.Context, args.Name, args.Version).Execute() + if err != nil { + return common.NewResponseError(err, resp) + } + + if cli.IsJson() { + cli.Printer.PrintJson(map[string]interface{}{ + "deleted": args.Version, + }) + } else { + cli.Printer.Success(fmt.Sprintf("Successfully deleted version %s of StackPack %s", args.Version, args.Name)) + } + + return nil + } +} diff --git a/cmd/stackpack/stackpack_delete_version_test.go b/cmd/stackpack/stackpack_delete_version_test.go new file mode 100644 index 00000000..10029d54 --- /dev/null +++ b/cmd/stackpack/stackpack_delete_version_test.go @@ -0,0 +1,40 @@ +package stackpack + +import ( + "testing" + + "github.com/spf13/cobra" + "github.com/stackvista/stackstate-cli/internal/di" + "github.com/stretchr/testify/assert" +) + +func setupStackPackDeleteVersionCmd(t *testing.T) (*di.MockDeps, *cobra.Command) { + cli := di.NewMockDeps(t) + cmd := StackpackDeleteVersionCommand(&cli.Deps) + return &cli, cmd +} + +func TestStackpackDeleteVersionPrintToConsole(t *testing.T) { + cli, cmd := setupStackPackDeleteVersionCmd(t) + di.ExecuteCommandWithContextUnsafe(&cli.Deps, cmd, "delete-version", "--name", "kubernetes", "--version", "1.0.0") + + expectedSuccessMessage := []string{"Successfully deleted version 1.0.0 of StackPack kubernetes"} + assert.True(t, cli.MockPrinter.HasNonJsonCalls) + assert.Equal(t, expectedSuccessMessage, *cli.MockPrinter.SuccessCalls) + + assert.Equal(t, 1, len(*cli.MockClient.ApiMocks.StackpackApi.StackPackDeleteVersionCalls)) + call := (*cli.MockClient.ApiMocks.StackpackApi.StackPackDeleteVersionCalls)[0] + assert.Equal(t, "kubernetes", call.PstackPackName) + assert.Equal(t, "1.0.0", call.Pversion) +} + +func TestStackpackDeleteVersionPrintToJson(t *testing.T) { + cli, cmd := setupStackPackDeleteVersionCmd(t) + di.ExecuteCommandWithContextUnsafe(&cli.Deps, cmd, "delete-version", "--name", "kubernetes", "--version", "1.0.0", "-o", "json") + + expectedJsonCalls := []map[string]interface{}{{ + "deleted": "1.0.0", + }} + assert.False(t, cli.MockPrinter.HasNonJsonCalls) + assert.Equal(t, expectedJsonCalls, *cli.MockPrinter.PrintJsonCalls) +} diff --git a/cmd/stackpack/stackpack_delete_versions.go b/cmd/stackpack/stackpack_delete_versions.go new file mode 100644 index 00000000..dbc0b042 --- /dev/null +++ b/cmd/stackpack/stackpack_delete_versions.go @@ -0,0 +1,112 @@ +package stackpack + +import ( + "fmt" + "strings" + + "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" +) + +const ( + FromFlag = "from" + ToFlag = "to" +) + +type DeleteVersionsArgs struct { + Name string + From string + To string + All bool + DevOnly bool +} + +func StackpackDeleteVersionsCommand(cli *di.Deps) *cobra.Command { + args := &DeleteVersionsArgs{} + cmd := &cobra.Command{ + Use: "delete-versions", + Short: "Delete multiple versions of a StackPack", + Long: "Delete multiple versions of a StackPack by specifying a version range or by deleting all versions. Versions currently in use by installed instances are skipped automatically.", + Example: `# delete all versions up to and including 1.5.0 +sts stackpack delete-versions --name kubernetes --to 1.5.0 + +# delete versions in a specific range +sts stackpack delete-versions --name kubernetes --from 1.0.0 --to 1.5.0 + +# delete all development (SNAPSHOT) versions only +sts stackpack delete-versions --name kubernetes --all --dev-only`, + RunE: cli.CmdRunEWithApi(RunStackpackDeleteVersionsCommand(args)), + } + common.AddRequiredNameFlagVar(cmd, &args.Name, "Name of the StackPack") + cmd.Flags().StringVar(&args.From, FromFlag, "", "Inclusive lower bound: delete versions >= this version") + cmd.Flags().StringVar(&args.To, ToFlag, "", "Inclusive upper bound: delete versions <= this version") + cmd.Flags().BoolVar(&args.All, AllFlag, false, "Delete all versions (cannot be combined with --from or --to)") + cmd.Flags().BoolVar(&args.DevOnly, DevOnlyFlag, false, "Restrict to development versions only (e.g. SNAPSHOT)") + return cmd +} + +func RunStackpackDeleteVersionsCommand(args *DeleteVersionsArgs) di.CmdWithApiFn { + return func( + cmd *cobra.Command, + cli *di.Deps, + api *stackstate_api.APIClient, + serverInfo *stackstate_api.ServerInfo, + ) common.CLIError { + if !args.All && args.From == "" && args.To == "" { + return common.NewCLIArgParseError(fmt.Errorf("at least one of --all, --from, or --to must be specified")) + } + if args.All && (args.From != "" || args.To != "") { + return common.NewCLIArgParseError(fmt.Errorf("--all cannot be combined with --from or --to")) + } + + req := api.StackpackApi.StackPackDeleteVersions(cli.Context, args.Name) + if args.From != "" { + req = req.From(args.From) + } + if args.To != "" { + req = req.To(args.To) + } + if args.All { + req = req.All(true) + } + if args.DevOnly { + req = req.Dev(true) + } + + result, resp, err := req.Execute() + if err != nil { + return common.NewResponseError(err, resp) + } + + if cli.IsJson() { + cli.Printer.PrintJson(map[string]interface{}{ + "deleted": result.Deleted, + "skippedInUse": result.SkippedInUse, + }) + } else { + if len(result.Deleted) > 0 { + cli.Printer.Success(fmt.Sprintf("Deleted versions: %s", strings.Join(result.Deleted, ", "))) + } + if len(result.SkippedInUse) > 0 { + cli.Printer.Table(printer.TableData{ + Header: []string{"skipped (in use)"}, + Data: func() [][]interface{} { + rows := make([][]interface{}, 0, len(result.SkippedInUse)) + for _, v := range result.SkippedInUse { + rows = append(rows, []interface{}{v}) + } + return rows + }(), + }) + } + if len(result.Deleted) == 0 && len(result.SkippedInUse) == 0 { + cli.Printer.Success("No versions matched the specified criteria") + } + } + + return nil + } +} diff --git a/cmd/stackpack/stackpack_delete_versions_test.go b/cmd/stackpack/stackpack_delete_versions_test.go new file mode 100644 index 00000000..e359682f --- /dev/null +++ b/cmd/stackpack/stackpack_delete_versions_test.go @@ -0,0 +1,108 @@ +package stackpack + +import ( + "testing" + + "github.com/spf13/cobra" + "github.com/stackvista/stackstate-cli/generated/stackstate_api" + "github.com/stackvista/stackstate-cli/internal/di" + "github.com/stretchr/testify/assert" +) + +func setupStackPackDeleteVersionsCmd(t *testing.T) (*di.MockDeps, *cobra.Command) { + cli := di.NewMockDeps(t) + cmd := StackpackDeleteVersionsCommand(&cli.Deps) + cli.MockClient.ApiMocks.StackpackApi.StackPackDeleteVersionsResponse.Result = stackstate_api.DeleteVersionsResult{ + Deleted: []string{"1.0.0", "1.1.0"}, + SkippedInUse: []string{"1.2.0"}, + } + return &cli, cmd +} + +func TestStackpackDeleteVersionsWithTo(t *testing.T) { + cli, cmd := setupStackPackDeleteVersionsCmd(t) + di.ExecuteCommandWithContextUnsafe(&cli.Deps, cmd, "delete-versions", "--name", "kubernetes", "--to", "1.5.0") + + assert.True(t, cli.MockPrinter.HasNonJsonCalls) + assert.Equal(t, []string{"Deleted versions: 1.0.0, 1.1.0"}, *cli.MockPrinter.SuccessCalls) + + assert.Equal(t, 1, len(*cli.MockClient.ApiMocks.StackpackApi.StackPackDeleteVersionsCalls)) + call := (*cli.MockClient.ApiMocks.StackpackApi.StackPackDeleteVersionsCalls)[0] + assert.Equal(t, "kubernetes", call.PstackPackName) + assert.Nil(t, call.Pfrom) + assert.Equal(t, "1.5.0", *call.Pto) + assert.Nil(t, call.Pall) + assert.Nil(t, call.Pdev) +} + +func TestStackpackDeleteVersionsWithRange(t *testing.T) { + cli, cmd := setupStackPackDeleteVersionsCmd(t) + di.ExecuteCommandWithContextUnsafe(&cli.Deps, cmd, "delete-versions", "--name", "kubernetes", "--from", "1.0.0", "--to", "1.5.0") + + assert.Equal(t, 1, len(*cli.MockClient.ApiMocks.StackpackApi.StackPackDeleteVersionsCalls)) + call := (*cli.MockClient.ApiMocks.StackpackApi.StackPackDeleteVersionsCalls)[0] + assert.Equal(t, "kubernetes", call.PstackPackName) + assert.Equal(t, "1.0.0", *call.Pfrom) + assert.Equal(t, "1.5.0", *call.Pto) + assert.Nil(t, call.Pall) + assert.Nil(t, call.Pdev) +} + +func TestStackpackDeleteVersionsWithAll(t *testing.T) { + cli, cmd := setupStackPackDeleteVersionsCmd(t) + di.ExecuteCommandWithContextUnsafe(&cli.Deps, cmd, "delete-versions", "--name", "kubernetes", "--all") + + assert.Equal(t, 1, len(*cli.MockClient.ApiMocks.StackpackApi.StackPackDeleteVersionsCalls)) + call := (*cli.MockClient.ApiMocks.StackpackApi.StackPackDeleteVersionsCalls)[0] + assert.Equal(t, "kubernetes", call.PstackPackName) + assert.Nil(t, call.Pfrom) + assert.Nil(t, call.Pto) + assert.Equal(t, true, *call.Pall) + assert.Nil(t, call.Pdev) +} + +func TestStackpackDeleteVersionsWithAllAndDevOnly(t *testing.T) { + cli, cmd := setupStackPackDeleteVersionsCmd(t) + di.ExecuteCommandWithContextUnsafe(&cli.Deps, cmd, "delete-versions", "--name", "kubernetes", "--all", "--dev-only") + + assert.Equal(t, 1, len(*cli.MockClient.ApiMocks.StackpackApi.StackPackDeleteVersionsCalls)) + call := (*cli.MockClient.ApiMocks.StackpackApi.StackPackDeleteVersionsCalls)[0] + assert.Equal(t, "kubernetes", call.PstackPackName) + assert.Nil(t, call.Pfrom) + assert.Nil(t, call.Pto) + assert.Equal(t, true, *call.Pall) + assert.Equal(t, true, *call.Pdev) +} + +func TestStackpackDeleteVersionsPrintToJson(t *testing.T) { + cli, cmd := setupStackPackDeleteVersionsCmd(t) + di.ExecuteCommandWithContextUnsafe(&cli.Deps, cmd, "delete-versions", "--name", "kubernetes", "--to", "2.0.0", "-o", "json") + + expectedJsonCalls := []map[string]interface{}{{ + "deleted": []string{"1.0.0", "1.1.0"}, + "skippedInUse": []string{"1.2.0"}, + }} + assert.False(t, cli.MockPrinter.HasNonJsonCalls) + assert.Equal(t, expectedJsonCalls, *cli.MockPrinter.PrintJsonCalls) +} + +func TestStackpackDeleteVersionsNoFlags(t *testing.T) { + cli := di.NewMockDeps(t) + cmd := StackpackDeleteVersionsCommand(&cli.Deps) + _, err := di.ExecuteCommandWithContext(&cli.Deps, cmd, "delete-versions", "--name", "kubernetes") + assert.Error(t, err) +} + +func TestStackpackDeleteVersionsAllWithFrom(t *testing.T) { + cli := di.NewMockDeps(t) + cmd := StackpackDeleteVersionsCommand(&cli.Deps) + _, err := di.ExecuteCommandWithContext(&cli.Deps, cmd, "delete-versions", "--name", "kubernetes", "--all", "--from", "1.0.0") + assert.Error(t, err) +} + +func TestStackpackDeleteVersionsAllWithTo(t *testing.T) { + cli := di.NewMockDeps(t) + cmd := StackpackDeleteVersionsCommand(&cli.Deps) + _, err := di.ExecuteCommandWithContext(&cli.Deps, cmd, "delete-versions", "--name", "kubernetes", "--all", "--to", "1.5.0") + assert.Error(t, err) +} diff --git a/cmd/stackpack/stackpack_list_versions.go b/cmd/stackpack/stackpack_list_versions.go new file mode 100644 index 00000000..ff99c336 --- /dev/null +++ b/cmd/stackpack/stackpack_list_versions.go @@ -0,0 +1,72 @@ +package stackpack + +import ( + "sort" + + "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" +) + +type ListVersionsArgs struct { + Name string +} + +func StackpackListVersionsCommand(cli *di.Deps) *cobra.Command { + args := &ListVersionsArgs{} + cmd := &cobra.Command{ + Use: "list-versions", + Short: "List all available versions of a StackPack", + Long: "List all available versions of a StackPack. Shows version string, whether it is a development version, and whether it is currently in use by an installed instance.", + Example: `# list all versions of the kubernetes StackPack +sts stackpack list-versions --name kubernetes + +# list versions as JSON +sts stackpack list-versions --name kubernetes -o json`, + RunE: cli.CmdRunEWithApi(RunStackpackListVersionsCommand(args)), + } + common.AddRequiredNameFlagVar(cmd, &args.Name, "Name of the StackPack") + return cmd +} + +func RunStackpackListVersionsCommand(args *ListVersionsArgs) di.CmdWithApiFn { + return func( + cmd *cobra.Command, + cli *di.Deps, + api *stackstate_api.APIClient, + serverInfo *stackstate_api.ServerInfo, + ) common.CLIError { + versions, resp, err := api.StackpackApi.StackPackListVersions(cli.Context, args.Name).Execute() + if err != nil { + return common.NewResponseError(err, resp) + } + + sort.SliceStable(versions, func(i, j int) bool { + return versions[i].Version < versions[j].Version + }) + + if cli.IsJson() { + cli.Printer.PrintJson(map[string]interface{}{ + "versions": versions, + }) + } else { + data := make([][]interface{}, 0, len(versions)) + for _, v := range versions { + data = append(data, []interface{}{ + v.Version, + v.IsDev, + v.IsInUse, + }) + } + cli.Printer.Table(printer.TableData{ + Header: []string{"version", "dev", "in use"}, + Data: data, + MissingTableDataMsg: printer.NotFoundMsg{Types: "versions"}, + }) + } + + return nil + } +} diff --git a/cmd/stackpack/stackpack_list_versions_test.go b/cmd/stackpack/stackpack_list_versions_test.go new file mode 100644 index 00000000..40cfebfe --- /dev/null +++ b/cmd/stackpack/stackpack_list_versions_test.go @@ -0,0 +1,70 @@ +package stackpack + +import ( + "testing" + + "github.com/spf13/cobra" + "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" +) + +var listVersionsMockResponse = []stackstate_api.StackPackVersionInfo{ + {Version: "1.0.0", IsDev: false, IsInUse: true}, + {Version: "1.1.0", IsDev: false, IsInUse: false}, + {Version: "2.0.0-SNAPSHOT.1", IsDev: true, IsInUse: false}, +} + +func setupStackPackListVersionsCmd(t *testing.T) (*di.MockDeps, *cobra.Command) { + cli := di.NewMockDeps(t) + cmd := StackpackListVersionsCommand(&cli.Deps) + cli.MockClient.ApiMocks.StackpackApi.StackPackListVersionsResponse.Result = listVersionsMockResponse + return &cli, cmd +} + +func TestStackpackListVersionsPrintToTable(t *testing.T) { + cli, cmd := setupStackPackListVersionsCmd(t) + di.ExecuteCommandWithContextUnsafe(&cli.Deps, cmd, "list-versions", "--name", "kubernetes") + + assert.Equal(t, []printer.TableData{ + { + Header: []string{"version", "dev", "in use"}, + Data: [][]interface{}{ + {"1.0.0", false, true}, + {"1.1.0", false, false}, + {"2.0.0-SNAPSHOT.1", true, false}, + }, + MissingTableDataMsg: printer.NotFoundMsg{Types: "versions"}, + }, + }, *cli.MockPrinter.TableCalls) + + assert.Equal(t, 1, len(*cli.MockClient.ApiMocks.StackpackApi.StackPackListVersionsCalls)) + assert.Equal(t, "kubernetes", (*cli.MockClient.ApiMocks.StackpackApi.StackPackListVersionsCalls)[0].PstackPackName) +} + +func TestStackpackListVersionsPrintToJson(t *testing.T) { + cli, cmd := setupStackPackListVersionsCmd(t) + di.ExecuteCommandWithContextUnsafe(&cli.Deps, cmd, "list-versions", "--name", "kubernetes", "-o", "json") + + expectedJsonCalls := []map[string]interface{}{{ + "versions": listVersionsMockResponse, + }} + assert.Equal(t, expectedJsonCalls, *cli.MockPrinter.PrintJsonCalls) + assert.False(t, cli.MockPrinter.HasNonJsonCalls) +} + +func TestStackpackListVersionsEmpty(t *testing.T) { + cli := di.NewMockDeps(t) + cmd := StackpackListVersionsCommand(&cli.Deps) + cli.MockClient.ApiMocks.StackpackApi.StackPackListVersionsResponse.Result = []stackstate_api.StackPackVersionInfo{} + di.ExecuteCommandWithContextUnsafe(&cli.Deps, cmd, "list-versions", "--name", "kubernetes") + + assert.Equal(t, []printer.TableData{ + { + Header: []string{"version", "dev", "in use"}, + Data: [][]interface{}{}, + MissingTableDataMsg: printer.NotFoundMsg{Types: "versions"}, + }, + }, *cli.MockPrinter.TableCalls) +} diff --git a/generated/stackstate_api/.openapi-generator/FILES b/generated/stackstate_api/.openapi-generator/FILES index 0864c91b..f31eab46 100644 --- a/generated/stackstate_api/.openapi-generator/FILES +++ b/generated/stackstate_api/.openapi-generator/FILES @@ -100,6 +100,7 @@ docs/ComponentHighlightMetricSection.md docs/ComponentHighlightMetricSectionAllOf.md docs/ComponentHighlightMetrics.md docs/ComponentHighlightProjection.md +docs/ComponentLink.md docs/ComponentLinkCell.md docs/ComponentLinkField.md docs/ComponentLinkFieldAllOf.md @@ -113,11 +114,10 @@ docs/ComponentPresentationFilter.md docs/ComponentPresentationFilterDefinition.md docs/ComponentPresentationQueryBinding.md docs/ComponentPresentationRank.md +docs/ComponentProvisioning.md docs/ComponentQuery.md docs/ComponentSummaryLocation.md docs/ComponentTypeEvents.md -docs/ComponentTypeExternalComponent.md -docs/ComponentTypeRelatedResources.md docs/ComponentViewArguments.md docs/ContainerImageProjection.md docs/CreateSubject.md @@ -139,6 +139,7 @@ docs/DashboardValidationError.md docs/DashboardWriteSchema.md docs/DashboardsApi.md docs/DataUnavailable.md +docs/DeleteVersionsResult.md docs/DependencyDirection.md docs/DummyApi.md docs/DurationCell.md @@ -454,9 +455,11 @@ docs/PresentationFilterName.md docs/PresentationFiltersResponse.md docs/PresentationHighlight.md docs/PresentationHighlightField.md +docs/PresentationHighlightProvisioning.md docs/PresentationMainMenu.md docs/PresentationName.md docs/PresentationOverview.md +docs/PresentationRelatedResource.md docs/PresentationTagFilter.md docs/ProblemApi.md docs/ProblemNotFound.md @@ -494,6 +497,7 @@ docs/RatioFieldAllOf.md docs/RatioProjection.md docs/ReadyStatusCell.md docs/ReadyStatusMetaDisplay.md +docs/RelatedResource.md docs/RelationApi.md docs/RelationData.md docs/ReleaseStatus.md @@ -541,6 +545,7 @@ docs/StackPackError.md docs/StackPackIntegration.md docs/StackPackStep.md docs/StackPackStepValue.md +docs/StackPackVersionInfo.md docs/StackpackApi.md docs/StreamList.md docs/StreamListItem.md @@ -679,6 +684,7 @@ model_component_highlight_metric_section.go model_component_highlight_metric_section_all_of.go model_component_highlight_metrics.go model_component_highlight_projection.go +model_component_link.go model_component_link_cell.go model_component_link_field.go model_component_link_field_all_of.go @@ -691,11 +697,10 @@ model_component_presentation_filter.go model_component_presentation_filter_definition.go model_component_presentation_query_binding.go model_component_presentation_rank.go +model_component_provisioning.go model_component_query.go model_component_summary_location.go model_component_type_events.go -model_component_type_external_component.go -model_component_type_related_resources.go model_component_view_arguments.go model_container_image_projection.go model_create_subject.go @@ -716,6 +721,7 @@ model_dashboard_scope.go model_dashboard_validation_error.go model_dashboard_write_schema.go model_data_unavailable.go +model_delete_versions_result.go model_dependency_direction.go model_duration_cell.go model_duration_field.go @@ -1014,9 +1020,11 @@ model_presentation_filter_name.go model_presentation_filters_response.go model_presentation_highlight.go model_presentation_highlight_field.go +model_presentation_highlight_provisioning.go model_presentation_main_menu.go model_presentation_name.go model_presentation_overview.go +model_presentation_related_resource.go model_presentation_tag_filter.go model_problem_not_found.go model_prom_batch_envelope.go @@ -1053,6 +1061,7 @@ model_ratio_field_all_of.go model_ratio_projection.go model_ready_status_cell.go model_ready_status_meta_display.go +model_related_resource.go model_relation_data.go model_release_status.go model_request_error.go @@ -1095,6 +1104,7 @@ model_stack_pack_error.go model_stack_pack_integration.go model_stack_pack_step.go model_stack_pack_step_value.go +model_stack_pack_version_info.go model_stream_list.go model_stream_list_item.go model_string_items_with_total.go diff --git a/generated/stackstate_api/README.md b/generated/stackstate_api/README.md index 8a92c9b9..d0697618 100644 --- a/generated/stackstate_api/README.md +++ b/generated/stackstate_api/README.md @@ -90,11 +90,11 @@ 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 -*ComponentApi* | [**GetComponentCheckStates**](docs/ComponentApi.md#getcomponentcheckstates) | **Get** /components/{componentIdOrUrn}/checkStates | Get a component checkstates -*ComponentApi* | [**GetComponentHealthHistory**](docs/ComponentApi.md#getcomponenthealthhistory) | **Get** /components/{componentIdOrUrn}/healthHistory | Get a component health history -*ComponentApi* | [**GetComponentMetricBinding**](docs/ComponentApi.md#getcomponentmetricbinding) | **Get** /components/{componentIdOrUrn}/bindmetric | Get a bound metric binding to a component -*ComponentApi* | [**GetComponentMetricsWithData**](docs/ComponentApi.md#getcomponentmetricswithdata) | **Get** /components/{componentIdOrUrn}/boundMetricsWithData | Bound metric bindings that have data for a component -*ComponentApi* | [**GetFullComponent**](docs/ComponentApi.md#getfullcomponent) | **Get** /components/{componentIdOrUrn} | Get full component +*ComponentApi* | [**GetComponentCheckStates**](docs/ComponentApi.md#getcomponentcheckstates) | **Get** /components/{componentIdOrIdentifier}/checkStates | Get a component checkstates +*ComponentApi* | [**GetComponentHealthHistory**](docs/ComponentApi.md#getcomponenthealthhistory) | **Get** /components/{componentIdOrIdentifier}/healthHistory | Get a component health history +*ComponentApi* | [**GetComponentMetricBinding**](docs/ComponentApi.md#getcomponentmetricbinding) | **Get** /components/{componentIdOrIdentifier}/bindmetric | Get a bound metric binding to a component +*ComponentApi* | [**GetComponentMetricsWithData**](docs/ComponentApi.md#getcomponentmetricswithdata) | **Get** /components/{componentIdOrIdentifier}/boundMetricsWithData | Bound metric bindings that have data for a component +*ComponentApi* | [**GetFullComponent**](docs/ComponentApi.md#getfullcomponent) | **Get** /components/{componentIdOrIdentifier} | Get full component *ComponentPresentationApi* | [**DeleteComponentPresentationByIdentifier**](docs/ComponentPresentationApi.md#deletecomponentpresentationbyidentifier) | **Delete** /presentations/{identifier} | Delete a component presentation by Identifier *ComponentPresentationApi* | [**GetComponentPresentationByIdentifier**](docs/ComponentPresentationApi.md#getcomponentpresentationbyidentifier) | **Get** /presentations/{identifier} | Get a component presentation by Identifier *ComponentPresentationApi* | [**GetComponentPresentations**](docs/ComponentPresentationApi.md#getcomponentpresentations) | **Get** /presentations | List all component presentations @@ -228,7 +228,10 @@ Class | Method | HTTP request | Description *StackpackApi* | [**ConfirmManualSteps**](docs/StackpackApi.md#confirmmanualsteps) | **Post** /stackpack/{stackPackName}/confirm-manual-steps/{stackPackInstanceId} | Confirm manual steps *StackpackApi* | [**ProvisionDetails**](docs/StackpackApi.md#provisiondetails) | **Post** /stackpack/{stackPackName}/provision | Provision API *StackpackApi* | [**ProvisionUninstall**](docs/StackpackApi.md#provisionuninstall) | **Post** /stackpack/{stackPackName}/deprovision/{stackPackInstanceId} | Provision API +*StackpackApi* | [**StackPackDeleteVersion**](docs/StackpackApi.md#stackpackdeleteversion) | **Delete** /stackpack/{stackPackName}/versions/{version} | Delete a StackPack version +*StackpackApi* | [**StackPackDeleteVersions**](docs/StackpackApi.md#stackpackdeleteversions) | **Delete** /stackpack/{stackPackName}/versions | Delete StackPack versions *StackpackApi* | [**StackPackList**](docs/StackpackApi.md#stackpacklist) | **Get** /stackpack | StackPack API +*StackpackApi* | [**StackPackListVersions**](docs/StackpackApi.md#stackpacklistversions) | **Get** /stackpack/{stackPackName}/versions | List StackPack versions *StackpackApi* | [**StackPackUpload**](docs/StackpackApi.md#stackpackupload) | **Post** /stackpack | StackPack API *StackpackApi* | [**StackPackValidate**](docs/StackpackApi.md#stackpackvalidate) | **Post** /stackpack/validate | Validate API *StackpackApi* | [**UpgradeStackPack**](docs/StackpackApi.md#upgradestackpack) | **Post** /stackpack/{stackPackName}/upgrade | Upgrade API @@ -314,6 +317,7 @@ Class | Method | HTTP request | Description - [ComponentHighlightMetricSectionAllOf](docs/ComponentHighlightMetricSectionAllOf.md) - [ComponentHighlightMetrics](docs/ComponentHighlightMetrics.md) - [ComponentHighlightProjection](docs/ComponentHighlightProjection.md) + - [ComponentLink](docs/ComponentLink.md) - [ComponentLinkCell](docs/ComponentLinkCell.md) - [ComponentLinkField](docs/ComponentLinkField.md) - [ComponentLinkFieldAllOf](docs/ComponentLinkFieldAllOf.md) @@ -326,11 +330,10 @@ Class | Method | HTTP request | Description - [ComponentPresentationFilterDefinition](docs/ComponentPresentationFilterDefinition.md) - [ComponentPresentationQueryBinding](docs/ComponentPresentationQueryBinding.md) - [ComponentPresentationRank](docs/ComponentPresentationRank.md) + - [ComponentProvisioning](docs/ComponentProvisioning.md) - [ComponentQuery](docs/ComponentQuery.md) - [ComponentSummaryLocation](docs/ComponentSummaryLocation.md) - [ComponentTypeEvents](docs/ComponentTypeEvents.md) - - [ComponentTypeExternalComponent](docs/ComponentTypeExternalComponent.md) - - [ComponentTypeRelatedResources](docs/ComponentTypeRelatedResources.md) - [ComponentViewArguments](docs/ComponentViewArguments.md) - [ContainerImageProjection](docs/ContainerImageProjection.md) - [CreateSubject](docs/CreateSubject.md) @@ -351,6 +354,7 @@ Class | Method | HTTP request | Description - [DashboardValidationError](docs/DashboardValidationError.md) - [DashboardWriteSchema](docs/DashboardWriteSchema.md) - [DataUnavailable](docs/DataUnavailable.md) + - [DeleteVersionsResult](docs/DeleteVersionsResult.md) - [DependencyDirection](docs/DependencyDirection.md) - [DurationCell](docs/DurationCell.md) - [DurationField](docs/DurationField.md) @@ -649,9 +653,11 @@ Class | Method | HTTP request | Description - [PresentationFiltersResponse](docs/PresentationFiltersResponse.md) - [PresentationHighlight](docs/PresentationHighlight.md) - [PresentationHighlightField](docs/PresentationHighlightField.md) + - [PresentationHighlightProvisioning](docs/PresentationHighlightProvisioning.md) - [PresentationMainMenu](docs/PresentationMainMenu.md) - [PresentationName](docs/PresentationName.md) - [PresentationOverview](docs/PresentationOverview.md) + - [PresentationRelatedResource](docs/PresentationRelatedResource.md) - [PresentationTagFilter](docs/PresentationTagFilter.md) - [ProblemNotFound](docs/ProblemNotFound.md) - [PromBatchEnvelope](docs/PromBatchEnvelope.md) @@ -688,6 +694,7 @@ Class | Method | HTTP request | Description - [RatioProjection](docs/RatioProjection.md) - [ReadyStatusCell](docs/ReadyStatusCell.md) - [ReadyStatusMetaDisplay](docs/ReadyStatusMetaDisplay.md) + - [RelatedResource](docs/RelatedResource.md) - [RelationData](docs/RelationData.md) - [ReleaseStatus](docs/ReleaseStatus.md) - [RequestError](docs/RequestError.md) @@ -730,6 +737,7 @@ Class | Method | HTTP request | Description - [StackPackIntegration](docs/StackPackIntegration.md) - [StackPackStep](docs/StackPackStep.md) - [StackPackStepValue](docs/StackPackStepValue.md) + - [StackPackVersionInfo](docs/StackPackVersionInfo.md) - [StreamList](docs/StreamList.md) - [StreamListItem](docs/StreamListItem.md) - [StringItemsWithTotal](docs/StringItemsWithTotal.md) diff --git a/generated/stackstate_api/api/openapi.yaml b/generated/stackstate_api/api/openapi.yaml index 597d0613..f51bd96f 100644 --- a/generated/stackstate_api/api/openapi.yaml +++ b/generated/stackstate_api/api/openapi.yaml @@ -508,6 +508,139 @@ paths: summary: Upgrade API tags: - stackpack + /stackpack/{stackPackName}/versions: + delete: + description: Delete versions of a StackPack by range or threshold. Versions + currently in use are skipped. + operationId: stackPackDeleteVersions + parameters: + - in: path + name: stackPackName + required: true + schema: + type: string + - description: Delete all versions strictly less than this version + in: query + name: before + required: false + schema: + type: string + - description: Inclusive start of version range to delete + in: query + name: from + required: false + schema: + type: string + - description: Inclusive end of version range to delete + in: query + name: to + required: false + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteVersionsResult' + description: Batch delete result + "400": + content: + application/json: + schema: + items: + type: string + type: array + description: bad request + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericErrorsResponse' + description: Error when handling the request on the server side. + summary: Delete StackPack versions + tags: + - stackpack + get: + description: List all available versions of a StackPack + operationId: stackPackListVersions + parameters: + - in: path + name: stackPackName + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/StackPackVersionInfo' + type: array + description: List of versions + "404": + content: + application/json: + schema: + items: + type: string + type: array + description: StackPack not found + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericErrorsResponse' + description: Error when handling the request on the server side. + summary: List StackPack versions + tags: + - stackpack + /stackpack/{stackPackName}/versions/{version}: + delete: + description: Delete a specific version of a StackPack. Fails if the version + is currently in use. + operationId: stackPackDeleteVersion + parameters: + - in: path + name: stackPackName + required: true + schema: + type: string + - description: Version string (e.g. '1.2.3') + in: path + name: version + required: true + schema: + type: string + responses: + "204": + description: Version deleted successfully + "400": + content: + application/json: + schema: + items: + type: string + type: array + description: bad request + "404": + content: + application/json: + schema: + items: + type: string + type: array + description: Version not found + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericErrorsResponse' + description: Error when handling the request on the server side. + summary: Delete a StackPack version + tags: + - stackpack /stackpack/{stackPackName}/confirm-manual-steps/{stackPackInstanceId}: post: description: Confirm manual steps of the stackpack @@ -5541,17 +5674,17 @@ paths: summary: List layout hints tags: - layout - /components/{componentIdOrUrn}: + /components/{componentIdOrIdentifier}: get: description: Get full component details operationId: getFullComponent parameters: - description: The id or identifier (urn) of a component in: path - name: componentIdOrUrn + name: componentIdOrIdentifier required: true schema: - $ref: '#/components/schemas/ComponentIdOrUrn' + $ref: '#/components/schemas/ComponentIdOrIdentifier' - description: A timestamp at which resources will be queried. If not given the resources are queried at current time. in: query @@ -5576,7 +5709,7 @@ paths: summary: Get full component tags: - component - /components/{componentIdOrUrn}/healthHistory: + /components/{componentIdOrIdentifier}/healthHistory: get: description: Get a component health history for a defined period of time by id or identifier @@ -5584,10 +5717,10 @@ paths: parameters: - description: The id or identifier (urn) of a component in: path - name: componentIdOrUrn + name: componentIdOrIdentifier required: true schema: - $ref: '#/components/schemas/ComponentIdOrUrn' + $ref: '#/components/schemas/ComponentIdOrIdentifier' - description: The start time of a time range to query resources. in: query name: startTime @@ -5619,7 +5752,7 @@ paths: summary: Get a component health history tags: - component - /components/{componentIdOrUrn}/checkStates: + /components/{componentIdOrIdentifier}/checkStates: get: description: Get a component checkstates for a defined period of time by id or identifier @@ -5627,10 +5760,10 @@ paths: parameters: - description: The id or identifier (urn) of a component in: path - name: componentIdOrUrn + name: componentIdOrIdentifier required: true schema: - $ref: '#/components/schemas/ComponentIdOrUrn' + $ref: '#/components/schemas/ComponentIdOrIdentifier' - description: The start time of a time range to query resources. in: query name: startTime @@ -5662,7 +5795,7 @@ paths: summary: Get a component checkstates tags: - component - /components/{componentIdOrUrn}/bindmetric: + /components/{componentIdOrIdentifier}/bindmetric: get: description: Bind the variables in a metric binding to a component to get valid queries for fetching metric data @@ -5670,16 +5803,16 @@ paths: parameters: - description: The id or identifier (urn) of a component in: path - name: componentIdOrUrn + name: componentIdOrIdentifier required: true schema: - $ref: '#/components/schemas/ComponentIdOrUrn' + $ref: '#/components/schemas/ComponentIdOrIdentifier' - description: The identifier (urn) of a metric binding in: query name: metricBindingIdentifier required: true schema: - $ref: '#/components/schemas/ComponentIdOrUrn' + $ref: '#/components/schemas/ComponentIdOrIdentifier' - description: A timestamp at which resources will be queried. If not given the resources are queried at current time. in: query @@ -5704,17 +5837,17 @@ paths: summary: Get a bound metric binding to a component tags: - component - /components/{componentIdOrUrn}/boundMetricsWithData: + /components/{componentIdOrIdentifier}/boundMetricsWithData: get: description: Bound metric bindings for metrics that have data for a component operationId: getComponentMetricsWithData parameters: - description: The id or identifier (urn) of a component in: path - name: componentIdOrUrn + name: componentIdOrIdentifier required: true schema: - $ref: '#/components/schemas/ComponentIdOrUrn' + $ref: '#/components/schemas/ComponentIdOrIdentifier' - description: A timestamp at which resources will be queried. If not given the resources are queried at current time. in: query @@ -8196,6 +8329,44 @@ components: format: int64 type: integer type: object + StackPackVersionInfo: + example: + isDev: true + isInUse: true + version: version + properties: + version: + type: string + isDev: + type: boolean + isInUse: + type: boolean + required: + - isDev + - isInUse + - version + type: object + DeleteVersionsResult: + example: + deleted: + - deleted + - deleted + skippedInUse: + - skippedInUse + - skippedInUse + properties: + deleted: + items: + type: string + type: array + skippedInUse: + items: + type: string + type: array + required: + - deleted + - skippedInUse + type: object MonitorList: example: monitors: @@ -14143,18 +14314,41 @@ components: - message - statusCode type: object - ComponentIdOrUrn: - pattern: "^urn:.+|[0-9]+$" + ComponentIdOrIdentifier: type: string FullComponent: example: + synced: + - syncName: syncName + lastUpdateTimestamp: 6 + elementTypeTag: elementTypeTag + sourceProperties: "{}" + data: "{}" + identifiers: + - identifiers + - identifiers + externalId: externalId + id: 0 + status: "{}" + tags: + - tags + - tags + - syncName: syncName + lastUpdateTimestamp: 6 + elementTypeTag: elementTypeTag + sourceProperties: "{}" + data: "{}" + identifiers: + - identifiers + - identifiers + externalId: externalId + id: 0 + status: "{}" + tags: + - tags + - tags highlights: - showLastChange: true namePlural: namePlural - externalComponent: - externalIdSelector: externalIdSelector - showConfiguration: true - showStatus: true showLogs: true metrics: - bindings: @@ -14172,42 +14366,8 @@ components: events: showEvents: true relatedResourcesTemplate: relatedResourcesTemplate - relatedResources: - - hint: hint - stql: stql - title: title - viewTypeIdentifier: viewTypeIdentifier - resourceType: resourceType - - hint: hint - stql: stql - title: title - viewTypeIdentifier: viewTypeIdentifier - resourceType: resourceType data: - lastUpdateTimestamp: 6 - synced: - - syncName: syncName - lastUpdateTimestamp: 5 - elementTypeTag: elementTypeTag - sourceProperties: "{}" - data: "{}" - identifiers: - - identifiers - - identifiers - externalId: externalId - id: 1 - status: "{}" - - syncName: syncName - lastUpdateTimestamp: 5 - elementTypeTag: elementTypeTag - sourceProperties: "{}" - data: "{}" - identifiers: - - identifiers - - identifiers - externalId: externalId - id: 1 - status: "{}" + lastUpdateTimestamp: 5 identifiers: - identifiers - identifiers @@ -14215,7 +14375,7 @@ components: name: name description: description health: null - id: 0 + id: 1 layerName: layerName version: version properties: @@ -14225,6 +14385,10 @@ components: - tags typeName: typeName icon: icon + provisioning: + showConfiguration: true + externalId: externalId + showStatus: true boundTraces: filter: traceId: @@ -14262,6 +14426,15 @@ components: - name: name description: description id: 5 + relatedResources: + - resourceId: resourceId + stql: stql + title: title + presentationIdentifier: presentationIdentifier + - resourceId: resourceId + stql: stql + title: title + presentationIdentifier: presentationIdentifier boundMetrics: - layout: metricPerspective: @@ -14330,6 +14503,18 @@ components: items: $ref: '#/components/schemas/ComponentField' type: array + synced: + items: + $ref: '#/components/schemas/ExternalComponent' + type: array + provisioning: + $ref: '#/components/schemas/ComponentProvisioning' + relatedResources: + description: Resolved related resource definitions in display order. Backend + populates from both legacy and new presentation definitions. + items: + $ref: '#/components/schemas/RelatedResource' + type: array data: $ref: '#/components/schemas/ComponentData' highlights: @@ -14349,6 +14534,8 @@ components: - boundMetrics - data - fields + - relatedResources + - synced - typeName ComponentField: description: Display type and value for the field. @@ -14417,57 +14604,130 @@ components: allOf: - $ref: '#/components/schemas/BaseComponentField' - $ref: '#/components/schemas/MapField_allOf' - ComponentData: + ExternalComponent: example: + syncName: syncName lastUpdateTimestamp: 6 - synced: - - syncName: syncName - lastUpdateTimestamp: 5 - elementTypeTag: elementTypeTag - sourceProperties: "{}" - data: "{}" - identifiers: - - identifiers - - identifiers - externalId: externalId - id: 1 - status: "{}" - - syncName: syncName - lastUpdateTimestamp: 5 - elementTypeTag: elementTypeTag - sourceProperties: "{}" - data: "{}" - identifiers: - - identifiers - - identifiers - externalId: externalId - id: 1 - status: "{}" + elementTypeTag: elementTypeTag + sourceProperties: "{}" + data: "{}" identifiers: - identifiers - identifiers - domainName: domainName - name: name - description: description - health: null + externalId: externalId id: 0 - layerName: layerName - version: version - properties: - key: properties + status: "{}" tags: - tags - tags properties: - id: - format: int64 - type: integer + externalId: + type: string identifiers: items: type: string type: array - name: - type: string + data: + type: object + id: + format: int64 + type: integer + lastUpdateTimestamp: + format: int64 + type: integer + elementTypeTag: + type: string + syncName: + type: string + sourceProperties: + type: object + status: + type: object + tags: + items: + type: string + type: array + required: + - data + - identifiers + - sourceProperties + - syncName + - tags + ComponentProvisioning: + example: + showConfiguration: true + externalId: externalId + showStatus: true + properties: + showConfiguration: + type: boolean + showStatus: + type: boolean + externalId: + type: string + required: + - externalId + - showConfiguration + - showStatus + RelatedResource: + description: "A resolved related resource definition returned in the FullComponent\ + \ response.\nThe backend merges related resources from all matching presentations,\ + \ resolves template variables\nin the stql field, and derives the name from\ + \ the referenced presentation's PresentationName.\nArray order in the response\ + \ determines display order.\n" + example: + resourceId: resourceId + stql: stql + title: title + presentationIdentifier: presentationIdentifier + properties: + resourceId: + description: Identity key for this related resource. + type: string + title: + description: Section heading displayed in the UI. + type: string + stql: + description: Resolved STQL query with template variables substituted. + type: string + presentationIdentifier: + description: ComponentPresentation identifier whose overview spec is used + for rendering. + type: string + required: + - presentationIdentifier + - resourceId + - stql + - title + type: object + ComponentData: + example: + lastUpdateTimestamp: 5 + identifiers: + - identifiers + - identifiers + domainName: domainName + name: name + description: description + health: null + id: 1 + layerName: layerName + version: version + properties: + key: properties + tags: + - tags + - tags + properties: + id: + format: int64 + type: integer + identifiers: + items: + type: string + type: array + name: + type: string description: type: string version: @@ -14489,64 +14749,14 @@ components: lastUpdateTimestamp: format: int64 type: integer - synced: - items: - $ref: '#/components/schemas/ExternalComponent' - type: array required: - name - properties - synced - tags - ExternalComponent: - example: - syncName: syncName - lastUpdateTimestamp: 5 - elementTypeTag: elementTypeTag - sourceProperties: "{}" - data: "{}" - identifiers: - - identifiers - - identifiers - externalId: externalId - id: 1 - status: "{}" - properties: - externalId: - type: string - identifiers: - items: - type: string - type: array - data: - type: object - id: - format: int64 - type: integer - lastUpdateTimestamp: - format: int64 - type: integer - elementTypeTag: - type: string - syncName: - type: string - sourceProperties: - type: object - status: - type: object - required: - - data - - identifiers - - sourceProperties - - syncName LegacyComponentHighlights: example: - showLastChange: true namePlural: namePlural - externalComponent: - externalIdSelector: externalIdSelector - showConfiguration: true - showStatus: true showLogs: true metrics: - bindings: @@ -14564,17 +14774,6 @@ components: events: showEvents: true relatedResourcesTemplate: relatedResourcesTemplate - relatedResources: - - hint: hint - stql: stql - title: title - viewTypeIdentifier: viewTypeIdentifier - resourceType: resourceType - - hint: hint - stql: stql - title: title - viewTypeIdentifier: viewTypeIdentifier - resourceType: resourceType properties: namePlural: type: string @@ -14582,14 +14781,6 @@ components: $ref: '#/components/schemas/ComponentTypeEvents' showLogs: type: boolean - showLastChange: - type: boolean - externalComponent: - $ref: '#/components/schemas/ComponentTypeExternalComponent' - relatedResources: - items: - $ref: '#/components/schemas/ComponentTypeRelatedResources' - type: array metrics: items: $ref: '#/components/schemas/ComponentHighlightMetrics' @@ -14939,47 +15130,77 @@ components: - boundMetrics FullRelation: example: + synced: + - syncName: syncName + lastUpdateTimestamp: 5 + elementTypeTag: elementTypeTag + data: "{}" + identifiers: + - identifiers + - identifiers + externalId: externalId + id: 1 + tags: + - tags + - tags + - syncName: syncName + lastUpdateTimestamp: 5 + elementTypeTag: elementTypeTag + data: "{}" + identifiers: + - identifiers + - identifiers + externalId: externalId + id: 1 + tags: + - tags + - tags data: dependencyDirection: null - lastUpdateTimestamp: 5 + lastUpdateTimestamp: 6 + identifiers: + - identifiers + - identifiers + name: name + health: null + description: description + id: 0 + tags: + - tags + - tags + typeName: typeName + source: synced: - syncName: syncName lastUpdateTimestamp: 6 elementTypeTag: elementTypeTag + sourceProperties: "{}" data: "{}" identifiers: - identifiers - identifiers externalId: externalId id: 0 + status: "{}" + tags: + - tags + - tags - syncName: syncName lastUpdateTimestamp: 6 elementTypeTag: elementTypeTag + sourceProperties: "{}" data: "{}" identifiers: - identifiers - identifiers externalId: externalId id: 0 - identifiers: - - identifiers - - identifiers - name: name - health: null - description: description - id: 1 - tags: - - tags - - tags - typeName: typeName - source: + status: "{}" + tags: + - tags + - tags highlights: - showLastChange: true namePlural: namePlural - externalComponent: - externalIdSelector: externalIdSelector - showConfiguration: true - showStatus: true showLogs: true metrics: - bindings: @@ -14997,42 +15218,8 @@ components: events: showEvents: true relatedResourcesTemplate: relatedResourcesTemplate - relatedResources: - - hint: hint - stql: stql - title: title - viewTypeIdentifier: viewTypeIdentifier - resourceType: resourceType - - hint: hint - stql: stql - title: title - viewTypeIdentifier: viewTypeIdentifier - resourceType: resourceType data: - lastUpdateTimestamp: 6 - synced: - - syncName: syncName - lastUpdateTimestamp: 5 - elementTypeTag: elementTypeTag - sourceProperties: "{}" - data: "{}" - identifiers: - - identifiers - - identifiers - externalId: externalId - id: 1 - status: "{}" - - syncName: syncName - lastUpdateTimestamp: 5 - elementTypeTag: elementTypeTag - sourceProperties: "{}" - data: "{}" - identifiers: - - identifiers - - identifiers - externalId: externalId - id: 1 - status: "{}" + lastUpdateTimestamp: 5 identifiers: - identifiers - identifiers @@ -15040,7 +15227,7 @@ components: name: name description: description health: null - id: 0 + id: 1 layerName: layerName version: version properties: @@ -15050,6 +15237,10 @@ components: - tags typeName: typeName icon: icon + provisioning: + showConfiguration: true + externalId: externalId + showStatus: true boundTraces: filter: traceId: @@ -15087,6 +15278,15 @@ components: - name: name description: description id: 5 + relatedResources: + - resourceId: resourceId + stql: stql + title: title + presentationIdentifier: presentationIdentifier + - resourceId: resourceId + stql: stql + title: title + presentationIdentifier: presentationIdentifier boundMetrics: - layout: metricPerspective: @@ -15147,13 +15347,37 @@ components: tags: key: tags target: + synced: + - syncName: syncName + lastUpdateTimestamp: 6 + elementTypeTag: elementTypeTag + sourceProperties: "{}" + data: "{}" + identifiers: + - identifiers + - identifiers + externalId: externalId + id: 0 + status: "{}" + tags: + - tags + - tags + - syncName: syncName + lastUpdateTimestamp: 6 + elementTypeTag: elementTypeTag + sourceProperties: "{}" + data: "{}" + identifiers: + - identifiers + - identifiers + externalId: externalId + id: 0 + status: "{}" + tags: + - tags + - tags highlights: - showLastChange: true namePlural: namePlural - externalComponent: - externalIdSelector: externalIdSelector - showConfiguration: true - showStatus: true showLogs: true metrics: - bindings: @@ -15171,42 +15395,8 @@ components: events: showEvents: true relatedResourcesTemplate: relatedResourcesTemplate - relatedResources: - - hint: hint - stql: stql - title: title - viewTypeIdentifier: viewTypeIdentifier - resourceType: resourceType - - hint: hint - stql: stql - title: title - viewTypeIdentifier: viewTypeIdentifier - resourceType: resourceType data: - lastUpdateTimestamp: 6 - synced: - - syncName: syncName - lastUpdateTimestamp: 5 - elementTypeTag: elementTypeTag - sourceProperties: "{}" - data: "{}" - identifiers: - - identifiers - - identifiers - externalId: externalId - id: 1 - status: "{}" - - syncName: syncName - lastUpdateTimestamp: 5 - elementTypeTag: elementTypeTag - sourceProperties: "{}" - data: "{}" - identifiers: - - identifiers - - identifiers - externalId: externalId - id: 1 - status: "{}" + lastUpdateTimestamp: 5 identifiers: - identifiers - identifiers @@ -15214,7 +15404,7 @@ components: name: name description: description health: null - id: 0 + id: 1 layerName: layerName version: version properties: @@ -15224,6 +15414,10 @@ components: - tags typeName: typeName icon: icon + provisioning: + showConfiguration: true + externalId: externalId + showStatus: true boundTraces: filter: traceId: @@ -15261,6 +15455,15 @@ components: - name: name description: description id: 5 + relatedResources: + - resourceId: resourceId + stql: stql + title: title + presentationIdentifier: presentationIdentifier + - resourceId: resourceId + stql: stql + title: title + presentationIdentifier: presentationIdentifier boundMetrics: - layout: metricPerspective: @@ -15329,41 +15532,27 @@ components: $ref: '#/components/schemas/FullComponent' typeName: type: string + synced: + items: + $ref: '#/components/schemas/ExternalRelation' + type: array required: - data - source + - synced - target - typeName RelationData: example: dependencyDirection: null - lastUpdateTimestamp: 5 - synced: - - syncName: syncName - lastUpdateTimestamp: 6 - elementTypeTag: elementTypeTag - data: "{}" - identifiers: - - identifiers - - identifiers - externalId: externalId - id: 0 - - syncName: syncName - lastUpdateTimestamp: 6 - elementTypeTag: elementTypeTag - data: "{}" - identifiers: - - identifiers - - identifiers - externalId: externalId - id: 0 + lastUpdateTimestamp: 6 identifiers: - identifiers - identifiers name: name health: null description: description - id: 1 + id: 0 tags: - tags - tags @@ -15374,10 +15563,6 @@ components: type: array health: $ref: '#/components/schemas/HealthStateValue' - synced: - items: - $ref: '#/components/schemas/ExternalRelation' - type: array identifiers: items: type: string @@ -15397,19 +15582,27 @@ components: required: - dependencyDirection - identifiers - - synced - tags + DependencyDirection: + enum: + - one-way + - none + - both + type: string ExternalRelation: example: syncName: syncName - lastUpdateTimestamp: 6 + lastUpdateTimestamp: 5 elementTypeTag: elementTypeTag data: "{}" identifiers: - identifiers - identifiers externalId: externalId - id: 0 + id: 1 + tags: + - tags + - tags properties: externalId: type: string @@ -15429,16 +15622,15 @@ components: type: string syncName: type: string + tags: + items: + type: string + type: array required: - data - identifiers - syncName - DependencyDirection: - enum: - - one-way - - none - - both - type: string + - tags StackElementNotFound: discriminator: propertyName: _type @@ -17052,6 +17244,10 @@ components: singular: singular title: title highlight: + provisioning: + externalComponentSelector: externalComponentSelector + showConfiguration: true + showStatus: true title: title fields: - description: description @@ -17064,6 +17260,17 @@ components: title: title fieldId: fieldId order: 5.962133916683182 + relatedResources: + - resourceId: resourceId + title: title + topologyQuery: topologyQuery + order: 5.637376656633329 + presentationIdentifier: presentationIdentifier + - resourceId: resourceId + title: title + topologyQuery: topologyQuery + order: 5.637376656633329 + presentationIdentifier: presentationIdentifier icon: icon filters: - filterId: filterId @@ -17562,12 +17769,18 @@ components: enum: - ComponentLinkCell type: string + component: + $ref: '#/components/schemas/ComponentLink' + required: + - _type + type: object + ComponentLink: + properties: name: type: string componentId: type: string required: - - _type - componentId - name type: object @@ -17605,7 +17818,6 @@ components: type: number required: - _type - - value type: object DurationCell: properties: @@ -17638,8 +17850,6 @@ components: $ref: '#/components/schemas/HealthStateValue' required: - _type - - ready - - total type: object PaginationResponse: properties: @@ -18489,44 +18699,6 @@ components: type: string required: - showEvents - ComponentTypeExternalComponent: - example: - externalIdSelector: externalIdSelector - showConfiguration: true - showStatus: true - properties: - showConfiguration: - type: boolean - showStatus: - type: boolean - externalIdSelector: - type: string - required: - - externalIdSelector - - showConfiguration - - showStatus - ComponentTypeRelatedResources: - example: - hint: hint - stql: stql - title: title - viewTypeIdentifier: viewTypeIdentifier - resourceType: resourceType - properties: - resourceType: - type: string - title: - type: string - stql: - type: string - hint: - type: string - viewTypeIdentifier: - type: string - required: - - resourceType - - stql - - title ComponentHighlightMetrics: example: bindings: @@ -19279,6 +19451,10 @@ components: singular: singular title: title highlight: + provisioning: + externalComponentSelector: externalComponentSelector + showConfiguration: true + showStatus: true title: title fields: - description: description @@ -19291,6 +19467,17 @@ components: title: title fieldId: fieldId order: 5.962133916683182 + relatedResources: + - resourceId: resourceId + title: title + topologyQuery: topologyQuery + order: 5.637376656633329 + presentationIdentifier: presentationIdentifier + - resourceId: resourceId + title: title + topologyQuery: topologyQuery + order: 5.637376656633329 + presentationIdentifier: presentationIdentifier icon: icon filters: - filterId: filterId @@ -19567,10 +19754,14 @@ components: type: object PresentationHighlight: description: "Highlight presentation definition. The `fields` define the fields\ - \ to show in the ab. The `flags` field can be used to enable/disable functionalities.\n\ - If multiple ComponentPresentations match, columns are merged by `columnId`\ - \ according to binding rank. Absence of the field means no overview is shown.\n" + \ to show in the highlight page.\nIf multiple ComponentPresentations match,\ + \ fields are merged by `fieldId` according to binding rank.\nRelated resources\ + \ follow the same merge semantics using `resourceId` as the identity key.\n" example: + provisioning: + externalComponentSelector: externalComponentSelector + showConfiguration: true + showStatus: true title: title fields: - description: description @@ -19583,6 +19774,17 @@ components: title: title fieldId: fieldId order: 5.962133916683182 + relatedResources: + - resourceId: resourceId + title: title + topologyQuery: topologyQuery + order: 5.637376656633329 + presentationIdentifier: presentationIdentifier + - resourceId: resourceId + title: title + topologyQuery: topologyQuery + order: 5.637376656633329 + presentationIdentifier: presentationIdentifier properties: title: type: string @@ -19590,6 +19792,12 @@ components: items: $ref: '#/components/schemas/PresentationHighlightField' type: array + provisioning: + $ref: '#/components/schemas/PresentationHighlightProvisioning' + relatedResources: + items: + $ref: '#/components/schemas/PresentationRelatedResource' + type: array required: - fields - title @@ -19650,6 +19858,66 @@ components: - _type - value type: object + PresentationHighlightProvisioning: + description: Provisioning section of a component in the highlight presentation. + The `externalComponentSelector` field is used to identify the external component + with provisioning details for this component. + example: + externalComponentSelector: externalComponentSelector + showConfiguration: true + showStatus: true + properties: + externalComponentSelector: + description: Cel expression that selects the external component with provisioning + details + type: string + showConfiguration: + type: boolean + showStatus: + type: boolean + type: object + PresentationRelatedResource: + description: "Related resource definition for the highlight page. Each entry\ + \ defines a section showing components\nrelated to the one being viewed, rendered\ + \ using the referenced presentation's overview spec.\nMerge semantics follow\ + \ highlight field rules:\n- All presentations whose binding matches the component\ + \ contribute related resources.\n- Same resourceId with higher specificity\ + \ wins (override).\n- Different resourceId entries are appended.\n- Display\ + \ order is determined by the order field.\n" + example: + resourceId: resourceId + title: title + topologyQuery: topologyQuery + order: 5.637376656633329 + presentationIdentifier: presentationIdentifier + properties: + resourceId: + description: "Stable identity key for merging across presentations, analogous\ + \ to fieldId and filterId." + type: string + title: + description: Section heading displayed in the UI for this related resource. + type: string + order: + description: Display order. Higher value means it shows first in UI. + format: double + type: number + topologyQuery: + description: "STQL query scoping the related components. Supports template\ + \ interpolation with ${*} placeholders\n(e.g. ${identifiers[0]}, ${tags['namespace']}).\n\ + The backend intersects this query with the referenced presentation's binding\ + \ query.\n" + type: string + presentationIdentifier: + description: "References a ComponentPresentation by identifier to reuse\ + \ its overview spec (columns, name, filters)\nfor rendering this related\ + \ resource section. Must be within the same stackpack.\n" + type: string + required: + - order + - resourceId + - title + type: object ComponentPresentationFilter: description: "Filter definition for ComponentPresentation.\nWhen only `filterId`\ \ is provided, the filter references a definition from a less specific presentation.\n\ diff --git a/generated/stackstate_api/api_component.go b/generated/stackstate_api/api_component.go index 01de798d..01b1e518 100644 --- a/generated/stackstate_api/api_component.go +++ b/generated/stackstate_api/api_component.go @@ -28,10 +28,10 @@ type ComponentApi interface { Get a component checkstates for a defined period of time by id or identifier @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param componentIdOrUrn The id or identifier (urn) of a component + @param componentIdOrIdentifier The id or identifier (urn) of a component @return ApiGetComponentCheckStatesRequest */ - GetComponentCheckStates(ctx context.Context, componentIdOrUrn string) ApiGetComponentCheckStatesRequest + GetComponentCheckStates(ctx context.Context, componentIdOrIdentifier string) ApiGetComponentCheckStatesRequest // GetComponentCheckStatesExecute executes the request // @return ComponentCheckStates @@ -43,10 +43,10 @@ type ComponentApi interface { Get a component health history for a defined period of time by id or identifier @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param componentIdOrUrn The id or identifier (urn) of a component + @param componentIdOrIdentifier The id or identifier (urn) of a component @return ApiGetComponentHealthHistoryRequest */ - GetComponentHealthHistory(ctx context.Context, componentIdOrUrn string) ApiGetComponentHealthHistoryRequest + GetComponentHealthHistory(ctx context.Context, componentIdOrIdentifier string) ApiGetComponentHealthHistoryRequest // GetComponentHealthHistoryExecute executes the request // @return ComponentHealthHistory @@ -58,10 +58,10 @@ type ComponentApi interface { Bind the variables in a metric binding to a component to get valid queries for fetching metric data @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param componentIdOrUrn The id or identifier (urn) of a component + @param componentIdOrIdentifier The id or identifier (urn) of a component @return ApiGetComponentMetricBindingRequest */ - GetComponentMetricBinding(ctx context.Context, componentIdOrUrn string) ApiGetComponentMetricBindingRequest + GetComponentMetricBinding(ctx context.Context, componentIdOrIdentifier string) ApiGetComponentMetricBindingRequest // GetComponentMetricBindingExecute executes the request // @return BoundMetric @@ -73,10 +73,10 @@ type ComponentApi interface { Bound metric bindings for metrics that have data for a component @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param componentIdOrUrn The id or identifier (urn) of a component + @param componentIdOrIdentifier The id or identifier (urn) of a component @return ApiGetComponentMetricsWithDataRequest */ - GetComponentMetricsWithData(ctx context.Context, componentIdOrUrn string) ApiGetComponentMetricsWithDataRequest + GetComponentMetricsWithData(ctx context.Context, componentIdOrIdentifier string) ApiGetComponentMetricsWithDataRequest // GetComponentMetricsWithDataExecute executes the request // @return BoundMetrics @@ -88,10 +88,10 @@ type ComponentApi interface { Get full component details @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param componentIdOrUrn The id or identifier (urn) of a component + @param componentIdOrIdentifier The id or identifier (urn) of a component @return ApiGetFullComponentRequest */ - GetFullComponent(ctx context.Context, componentIdOrUrn string) ApiGetFullComponentRequest + GetFullComponent(ctx context.Context, componentIdOrIdentifier string) ApiGetFullComponentRequest // GetFullComponentExecute executes the request // @return FullComponent @@ -102,11 +102,11 @@ type ComponentApi interface { type ComponentApiService service type ApiGetComponentCheckStatesRequest struct { - ctx context.Context - ApiService ComponentApi - componentIdOrUrn string - startTime *int32 - endTime *int32 + ctx context.Context + ApiService ComponentApi + componentIdOrIdentifier string + startTime *int32 + endTime *int32 } // The start time of a time range to query resources. @@ -131,14 +131,14 @@ GetComponentCheckStates Get a component checkstates Get a component checkstates for a defined period of time by id or identifier @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param componentIdOrUrn The id or identifier (urn) of a component + @param componentIdOrIdentifier The id or identifier (urn) of a component @return ApiGetComponentCheckStatesRequest */ -func (a *ComponentApiService) GetComponentCheckStates(ctx context.Context, componentIdOrUrn string) ApiGetComponentCheckStatesRequest { +func (a *ComponentApiService) GetComponentCheckStates(ctx context.Context, componentIdOrIdentifier string) ApiGetComponentCheckStatesRequest { return ApiGetComponentCheckStatesRequest{ - ApiService: a, - ctx: ctx, - componentIdOrUrn: componentIdOrUrn, + ApiService: a, + ctx: ctx, + componentIdOrIdentifier: componentIdOrIdentifier, } } @@ -158,8 +158,8 @@ func (a *ComponentApiService) GetComponentCheckStatesExecute(r ApiGetComponentCh return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/components/{componentIdOrUrn}/checkStates" - localVarPath = strings.Replace(localVarPath, "{"+"componentIdOrUrn"+"}", url.PathEscape(parameterToString(r.componentIdOrUrn, "")), -1) + localVarPath := localBasePath + "/components/{componentIdOrIdentifier}/checkStates" + localVarPath = strings.Replace(localVarPath, "{"+"componentIdOrIdentifier"+"}", url.PathEscape(parameterToString(r.componentIdOrIdentifier, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -278,11 +278,11 @@ func (a *ComponentApiService) GetComponentCheckStatesExecute(r ApiGetComponentCh } type ApiGetComponentHealthHistoryRequest struct { - ctx context.Context - ApiService ComponentApi - componentIdOrUrn string - startTime *int32 - endTime *int32 + ctx context.Context + ApiService ComponentApi + componentIdOrIdentifier string + startTime *int32 + endTime *int32 } // The start time of a time range to query resources. @@ -307,14 +307,14 @@ GetComponentHealthHistory Get a component health history Get a component health history for a defined period of time by id or identifier @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param componentIdOrUrn The id or identifier (urn) of a component + @param componentIdOrIdentifier The id or identifier (urn) of a component @return ApiGetComponentHealthHistoryRequest */ -func (a *ComponentApiService) GetComponentHealthHistory(ctx context.Context, componentIdOrUrn string) ApiGetComponentHealthHistoryRequest { +func (a *ComponentApiService) GetComponentHealthHistory(ctx context.Context, componentIdOrIdentifier string) ApiGetComponentHealthHistoryRequest { return ApiGetComponentHealthHistoryRequest{ - ApiService: a, - ctx: ctx, - componentIdOrUrn: componentIdOrUrn, + ApiService: a, + ctx: ctx, + componentIdOrIdentifier: componentIdOrIdentifier, } } @@ -334,8 +334,8 @@ func (a *ComponentApiService) GetComponentHealthHistoryExecute(r ApiGetComponent return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/components/{componentIdOrUrn}/healthHistory" - localVarPath = strings.Replace(localVarPath, "{"+"componentIdOrUrn"+"}", url.PathEscape(parameterToString(r.componentIdOrUrn, "")), -1) + localVarPath := localBasePath + "/components/{componentIdOrIdentifier}/healthHistory" + localVarPath = strings.Replace(localVarPath, "{"+"componentIdOrIdentifier"+"}", url.PathEscape(parameterToString(r.componentIdOrIdentifier, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -456,7 +456,7 @@ func (a *ComponentApiService) GetComponentHealthHistoryExecute(r ApiGetComponent type ApiGetComponentMetricBindingRequest struct { ctx context.Context ApiService ComponentApi - componentIdOrUrn string + componentIdOrIdentifier string metricBindingIdentifier *string topologyTime *int32 } @@ -483,14 +483,14 @@ GetComponentMetricBinding Get a bound metric binding to a component Bind the variables in a metric binding to a component to get valid queries for fetching metric data @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param componentIdOrUrn The id or identifier (urn) of a component + @param componentIdOrIdentifier The id or identifier (urn) of a component @return ApiGetComponentMetricBindingRequest */ -func (a *ComponentApiService) GetComponentMetricBinding(ctx context.Context, componentIdOrUrn string) ApiGetComponentMetricBindingRequest { +func (a *ComponentApiService) GetComponentMetricBinding(ctx context.Context, componentIdOrIdentifier string) ApiGetComponentMetricBindingRequest { return ApiGetComponentMetricBindingRequest{ - ApiService: a, - ctx: ctx, - componentIdOrUrn: componentIdOrUrn, + ApiService: a, + ctx: ctx, + componentIdOrIdentifier: componentIdOrIdentifier, } } @@ -510,8 +510,8 @@ func (a *ComponentApiService) GetComponentMetricBindingExecute(r ApiGetComponent return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/components/{componentIdOrUrn}/bindmetric" - localVarPath = strings.Replace(localVarPath, "{"+"componentIdOrUrn"+"}", url.PathEscape(parameterToString(r.componentIdOrUrn, "")), -1) + localVarPath := localBasePath + "/components/{componentIdOrIdentifier}/bindmetric" + localVarPath = strings.Replace(localVarPath, "{"+"componentIdOrIdentifier"+"}", url.PathEscape(parameterToString(r.componentIdOrIdentifier, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -630,12 +630,12 @@ func (a *ComponentApiService) GetComponentMetricBindingExecute(r ApiGetComponent } type ApiGetComponentMetricsWithDataRequest struct { - ctx context.Context - ApiService ComponentApi - componentIdOrUrn string - startTime *int32 - endTime *int32 - topologyTime *int32 + ctx context.Context + ApiService ComponentApi + componentIdOrIdentifier string + startTime *int32 + endTime *int32 + topologyTime *int32 } // The start time of a time range to query resources. @@ -666,14 +666,14 @@ GetComponentMetricsWithData Bound metric bindings that have data for a component Bound metric bindings for metrics that have data for a component @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param componentIdOrUrn The id or identifier (urn) of a component + @param componentIdOrIdentifier The id or identifier (urn) of a component @return ApiGetComponentMetricsWithDataRequest */ -func (a *ComponentApiService) GetComponentMetricsWithData(ctx context.Context, componentIdOrUrn string) ApiGetComponentMetricsWithDataRequest { +func (a *ComponentApiService) GetComponentMetricsWithData(ctx context.Context, componentIdOrIdentifier string) ApiGetComponentMetricsWithDataRequest { return ApiGetComponentMetricsWithDataRequest{ - ApiService: a, - ctx: ctx, - componentIdOrUrn: componentIdOrUrn, + ApiService: a, + ctx: ctx, + componentIdOrIdentifier: componentIdOrIdentifier, } } @@ -693,8 +693,8 @@ func (a *ComponentApiService) GetComponentMetricsWithDataExecute(r ApiGetCompone return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/components/{componentIdOrUrn}/boundMetricsWithData" - localVarPath = strings.Replace(localVarPath, "{"+"componentIdOrUrn"+"}", url.PathEscape(parameterToString(r.componentIdOrUrn, "")), -1) + localVarPath := localBasePath + "/components/{componentIdOrIdentifier}/boundMetricsWithData" + localVarPath = strings.Replace(localVarPath, "{"+"componentIdOrIdentifier"+"}", url.PathEscape(parameterToString(r.componentIdOrIdentifier, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -817,10 +817,10 @@ func (a *ComponentApiService) GetComponentMetricsWithDataExecute(r ApiGetCompone } type ApiGetFullComponentRequest struct { - ctx context.Context - ApiService ComponentApi - componentIdOrUrn string - topologyTime *int32 + ctx context.Context + ApiService ComponentApi + componentIdOrIdentifier string + topologyTime *int32 } // A timestamp at which resources will be queried. If not given the resources are queried at current time. @@ -839,14 +839,14 @@ GetFullComponent Get full component Get full component details @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param componentIdOrUrn The id or identifier (urn) of a component + @param componentIdOrIdentifier The id or identifier (urn) of a component @return ApiGetFullComponentRequest */ -func (a *ComponentApiService) GetFullComponent(ctx context.Context, componentIdOrUrn string) ApiGetFullComponentRequest { +func (a *ComponentApiService) GetFullComponent(ctx context.Context, componentIdOrIdentifier string) ApiGetFullComponentRequest { return ApiGetFullComponentRequest{ - ApiService: a, - ctx: ctx, - componentIdOrUrn: componentIdOrUrn, + ApiService: a, + ctx: ctx, + componentIdOrIdentifier: componentIdOrIdentifier, } } @@ -866,8 +866,8 @@ func (a *ComponentApiService) GetFullComponentExecute(r ApiGetFullComponentReque return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/components/{componentIdOrUrn}" - localVarPath = strings.Replace(localVarPath, "{"+"componentIdOrUrn"+"}", url.PathEscape(parameterToString(r.componentIdOrUrn, "")), -1) + localVarPath := localBasePath + "/components/{componentIdOrIdentifier}" + localVarPath = strings.Replace(localVarPath, "{"+"componentIdOrIdentifier"+"}", url.PathEscape(parameterToString(r.componentIdOrIdentifier, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1020,24 +1020,24 @@ type GetComponentCheckStatesMockResponse struct { } type GetComponentCheckStatesCall struct { - PcomponentIdOrUrn string - PstartTime *int32 - PendTime *int32 + PcomponentIdOrIdentifier string + PstartTime *int32 + PendTime *int32 } -func (mock ComponentApiMock) GetComponentCheckStates(ctx context.Context, componentIdOrUrn string) ApiGetComponentCheckStatesRequest { +func (mock ComponentApiMock) GetComponentCheckStates(ctx context.Context, componentIdOrIdentifier string) ApiGetComponentCheckStatesRequest { return ApiGetComponentCheckStatesRequest{ - ApiService: mock, - ctx: ctx, - componentIdOrUrn: componentIdOrUrn, + ApiService: mock, + ctx: ctx, + componentIdOrIdentifier: componentIdOrIdentifier, } } func (mock ComponentApiMock) GetComponentCheckStatesExecute(r ApiGetComponentCheckStatesRequest) (*ComponentCheckStates, *http.Response, error) { p := GetComponentCheckStatesCall{ - PcomponentIdOrUrn: r.componentIdOrUrn, - PstartTime: r.startTime, - PendTime: r.endTime, + PcomponentIdOrIdentifier: r.componentIdOrIdentifier, + PstartTime: r.startTime, + PendTime: r.endTime, } *mock.GetComponentCheckStatesCalls = append(*mock.GetComponentCheckStatesCalls, p) return &mock.GetComponentCheckStatesResponse.Result, mock.GetComponentCheckStatesResponse.Response, mock.GetComponentCheckStatesResponse.Error @@ -1050,24 +1050,24 @@ type GetComponentHealthHistoryMockResponse struct { } type GetComponentHealthHistoryCall struct { - PcomponentIdOrUrn string - PstartTime *int32 - PendTime *int32 + PcomponentIdOrIdentifier string + PstartTime *int32 + PendTime *int32 } -func (mock ComponentApiMock) GetComponentHealthHistory(ctx context.Context, componentIdOrUrn string) ApiGetComponentHealthHistoryRequest { +func (mock ComponentApiMock) GetComponentHealthHistory(ctx context.Context, componentIdOrIdentifier string) ApiGetComponentHealthHistoryRequest { return ApiGetComponentHealthHistoryRequest{ - ApiService: mock, - ctx: ctx, - componentIdOrUrn: componentIdOrUrn, + ApiService: mock, + ctx: ctx, + componentIdOrIdentifier: componentIdOrIdentifier, } } func (mock ComponentApiMock) GetComponentHealthHistoryExecute(r ApiGetComponentHealthHistoryRequest) (*ComponentHealthHistory, *http.Response, error) { p := GetComponentHealthHistoryCall{ - PcomponentIdOrUrn: r.componentIdOrUrn, - PstartTime: r.startTime, - PendTime: r.endTime, + PcomponentIdOrIdentifier: r.componentIdOrIdentifier, + PstartTime: r.startTime, + PendTime: r.endTime, } *mock.GetComponentHealthHistoryCalls = append(*mock.GetComponentHealthHistoryCalls, p) return &mock.GetComponentHealthHistoryResponse.Result, mock.GetComponentHealthHistoryResponse.Response, mock.GetComponentHealthHistoryResponse.Error @@ -1080,22 +1080,22 @@ type GetComponentMetricBindingMockResponse struct { } type GetComponentMetricBindingCall struct { - PcomponentIdOrUrn string + PcomponentIdOrIdentifier string PmetricBindingIdentifier *string PtopologyTime *int32 } -func (mock ComponentApiMock) GetComponentMetricBinding(ctx context.Context, componentIdOrUrn string) ApiGetComponentMetricBindingRequest { +func (mock ComponentApiMock) GetComponentMetricBinding(ctx context.Context, componentIdOrIdentifier string) ApiGetComponentMetricBindingRequest { return ApiGetComponentMetricBindingRequest{ - ApiService: mock, - ctx: ctx, - componentIdOrUrn: componentIdOrUrn, + ApiService: mock, + ctx: ctx, + componentIdOrIdentifier: componentIdOrIdentifier, } } func (mock ComponentApiMock) GetComponentMetricBindingExecute(r ApiGetComponentMetricBindingRequest) (*BoundMetric, *http.Response, error) { p := GetComponentMetricBindingCall{ - PcomponentIdOrUrn: r.componentIdOrUrn, + PcomponentIdOrIdentifier: r.componentIdOrIdentifier, PmetricBindingIdentifier: r.metricBindingIdentifier, PtopologyTime: r.topologyTime, } @@ -1110,26 +1110,26 @@ type GetComponentMetricsWithDataMockResponse struct { } type GetComponentMetricsWithDataCall struct { - PcomponentIdOrUrn string - PstartTime *int32 - PendTime *int32 - PtopologyTime *int32 + PcomponentIdOrIdentifier string + PstartTime *int32 + PendTime *int32 + PtopologyTime *int32 } -func (mock ComponentApiMock) GetComponentMetricsWithData(ctx context.Context, componentIdOrUrn string) ApiGetComponentMetricsWithDataRequest { +func (mock ComponentApiMock) GetComponentMetricsWithData(ctx context.Context, componentIdOrIdentifier string) ApiGetComponentMetricsWithDataRequest { return ApiGetComponentMetricsWithDataRequest{ - ApiService: mock, - ctx: ctx, - componentIdOrUrn: componentIdOrUrn, + ApiService: mock, + ctx: ctx, + componentIdOrIdentifier: componentIdOrIdentifier, } } func (mock ComponentApiMock) GetComponentMetricsWithDataExecute(r ApiGetComponentMetricsWithDataRequest) (*BoundMetrics, *http.Response, error) { p := GetComponentMetricsWithDataCall{ - PcomponentIdOrUrn: r.componentIdOrUrn, - PstartTime: r.startTime, - PendTime: r.endTime, - PtopologyTime: r.topologyTime, + PcomponentIdOrIdentifier: r.componentIdOrIdentifier, + PstartTime: r.startTime, + PendTime: r.endTime, + PtopologyTime: r.topologyTime, } *mock.GetComponentMetricsWithDataCalls = append(*mock.GetComponentMetricsWithDataCalls, p) return &mock.GetComponentMetricsWithDataResponse.Result, mock.GetComponentMetricsWithDataResponse.Response, mock.GetComponentMetricsWithDataResponse.Error @@ -1142,22 +1142,22 @@ type GetFullComponentMockResponse struct { } type GetFullComponentCall struct { - PcomponentIdOrUrn string - PtopologyTime *int32 + PcomponentIdOrIdentifier string + PtopologyTime *int32 } -func (mock ComponentApiMock) GetFullComponent(ctx context.Context, componentIdOrUrn string) ApiGetFullComponentRequest { +func (mock ComponentApiMock) GetFullComponent(ctx context.Context, componentIdOrIdentifier string) ApiGetFullComponentRequest { return ApiGetFullComponentRequest{ - ApiService: mock, - ctx: ctx, - componentIdOrUrn: componentIdOrUrn, + ApiService: mock, + ctx: ctx, + componentIdOrIdentifier: componentIdOrIdentifier, } } func (mock ComponentApiMock) GetFullComponentExecute(r ApiGetFullComponentRequest) (*FullComponent, *http.Response, error) { p := GetFullComponentCall{ - PcomponentIdOrUrn: r.componentIdOrUrn, - PtopologyTime: r.topologyTime, + PcomponentIdOrIdentifier: r.componentIdOrIdentifier, + PtopologyTime: r.topologyTime, } *mock.GetFullComponentCalls = append(*mock.GetFullComponentCalls, p) return &mock.GetFullComponentResponse.Result, mock.GetFullComponentResponse.Response, mock.GetFullComponentResponse.Error diff --git a/generated/stackstate_api/api_stackpack.go b/generated/stackstate_api/api_stackpack.go index 1f51f4f0..4ebc3df6 100644 --- a/generated/stackstate_api/api_stackpack.go +++ b/generated/stackstate_api/api_stackpack.go @@ -70,6 +70,36 @@ type StackpackApi interface { // @return string ProvisionUninstallExecute(r ApiProvisionUninstallRequest) (string, *http.Response, error) + /* + StackPackDeleteVersion Delete a StackPack version + + Delete a specific version of a StackPack. Fails if the version is currently in use. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param stackPackName + @param version Version string (e.g. '1.2.3') + @return ApiStackPackDeleteVersionRequest + */ + StackPackDeleteVersion(ctx context.Context, stackPackName string, version string) ApiStackPackDeleteVersionRequest + + // StackPackDeleteVersionExecute executes the request + StackPackDeleteVersionExecute(r ApiStackPackDeleteVersionRequest) (*http.Response, error) + + /* + StackPackDeleteVersions Delete StackPack versions + + Delete versions of a StackPack by range or threshold. Versions currently in use are skipped. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param stackPackName + @return ApiStackPackDeleteVersionsRequest + */ + StackPackDeleteVersions(ctx context.Context, stackPackName string) ApiStackPackDeleteVersionsRequest + + // StackPackDeleteVersionsExecute executes the request + // @return DeleteVersionsResult + StackPackDeleteVersionsExecute(r ApiStackPackDeleteVersionsRequest) (*DeleteVersionsResult, *http.Response, error) + /* StackPackList StackPack API @@ -84,6 +114,21 @@ type StackpackApi interface { // @return []FullStackPack StackPackListExecute(r ApiStackPackListRequest) ([]FullStackPack, *http.Response, error) + /* + StackPackListVersions List StackPack versions + + List all available versions of a StackPack + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param stackPackName + @return ApiStackPackListVersionsRequest + */ + StackPackListVersions(ctx context.Context, stackPackName string) ApiStackPackListVersionsRequest + + // StackPackListVersionsExecute executes the request + // @return []StackPackVersionInfo + StackPackListVersionsExecute(r ApiStackPackListVersionsRequest) ([]StackPackVersionInfo, *http.Response, error) + /* StackPackUpload StackPack API @@ -117,69 +162,567 @@ type StackpackApi interface { Upgrade stackpack - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param stackPackName - @return ApiUpgradeStackPackRequest - */ - UpgradeStackPack(ctx context.Context, stackPackName string) ApiUpgradeStackPackRequest + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param stackPackName + @return ApiUpgradeStackPackRequest + */ + UpgradeStackPack(ctx context.Context, stackPackName string) ApiUpgradeStackPackRequest + + // UpgradeStackPackExecute executes the request + // @return string + UpgradeStackPackExecute(r ApiUpgradeStackPackRequest) (string, *http.Response, error) +} + +// StackpackApiService StackpackApi service +type StackpackApiService service + +type ApiConfirmManualStepsRequest struct { + ctx context.Context + ApiService StackpackApi + stackPackName string + stackPackInstanceId int64 +} + +func (r ApiConfirmManualStepsRequest) Execute() (string, *http.Response, error) { + return r.ApiService.ConfirmManualStepsExecute(r) +} + +/* +ConfirmManualSteps Confirm manual steps + +Confirm manual steps of the stackpack + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param stackPackName + @param stackPackInstanceId + @return ApiConfirmManualStepsRequest +*/ +func (a *StackpackApiService) ConfirmManualSteps(ctx context.Context, stackPackName string, stackPackInstanceId int64) ApiConfirmManualStepsRequest { + return ApiConfirmManualStepsRequest{ + ApiService: a, + ctx: ctx, + stackPackName: stackPackName, + stackPackInstanceId: stackPackInstanceId, + } +} + +// Execute executes the request +// +// @return string +func (a *StackpackApiService) ConfirmManualStepsExecute(r ApiConfirmManualStepsRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StackpackApiService.ConfirmManualSteps") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/stackpack/{stackPackName}/confirm-manual-steps/{stackPackInstanceId}" + localVarPath = strings.Replace(localVarPath, "{"+"stackPackName"+"}", url.PathEscape(parameterToString(r.stackPackName, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stackPackInstanceId"+"}", url.PathEscape(parameterToString(r.stackPackInstanceId, "")), -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 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 +} + +type ApiProvisionDetailsRequest struct { + ctx context.Context + ApiService StackpackApi + stackPackName string + unlocked *string + requestBody *map[string]string +} + +func (r ApiProvisionDetailsRequest) Unlocked(unlocked string) ApiProvisionDetailsRequest { + r.unlocked = &unlocked + return r +} + +func (r ApiProvisionDetailsRequest) RequestBody(requestBody map[string]string) ApiProvisionDetailsRequest { + r.requestBody = &requestBody + return r +} + +func (r ApiProvisionDetailsRequest) Execute() (*ProvisionResponse, *http.Response, error) { + return r.ApiService.ProvisionDetailsExecute(r) +} + +/* +ProvisionDetails Provision API + +Provision details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param stackPackName + @return ApiProvisionDetailsRequest +*/ +func (a *StackpackApiService) ProvisionDetails(ctx context.Context, stackPackName string) ApiProvisionDetailsRequest { + return ApiProvisionDetailsRequest{ + ApiService: a, + ctx: ctx, + stackPackName: stackPackName, + } +} + +// Execute executes the request +// +// @return ProvisionResponse +func (a *StackpackApiService) ProvisionDetailsExecute(r ApiProvisionDetailsRequest) (*ProvisionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ProvisionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StackpackApiService.ProvisionDetails") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/stackpack/{stackPackName}/provision" + localVarPath = strings.Replace(localVarPath, "{"+"stackPackName"+"}", url.PathEscape(parameterToString(r.stackPackName, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.unlocked == nil { + return localVarReturnValue, nil, reportError("unlocked is required and must be specified") + } + + localVarQueryParams.Add("unlocked", parameterToString(*r.unlocked, "")) + // 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.requestBody + 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 +} + +type ApiProvisionUninstallRequest struct { + ctx context.Context + ApiService StackpackApi + stackPackName string + stackPackInstanceId int64 +} + +func (r ApiProvisionUninstallRequest) Execute() (string, *http.Response, error) { + return r.ApiService.ProvisionUninstallExecute(r) +} + +/* +ProvisionUninstall Provision API + +Provision details + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param stackPackName + @param stackPackInstanceId + @return ApiProvisionUninstallRequest +*/ +func (a *StackpackApiService) ProvisionUninstall(ctx context.Context, stackPackName string, stackPackInstanceId int64) ApiProvisionUninstallRequest { + return ApiProvisionUninstallRequest{ + ApiService: a, + ctx: ctx, + stackPackName: stackPackName, + stackPackInstanceId: stackPackInstanceId, + } +} + +// Execute executes the request +// +// @return string +func (a *StackpackApiService) ProvisionUninstallExecute(r ApiProvisionUninstallRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StackpackApiService.ProvisionUninstall") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/stackpack/{stackPackName}/deprovision/{stackPackInstanceId}" + localVarPath = strings.Replace(localVarPath, "{"+"stackPackName"+"}", url.PathEscape(parameterToString(r.stackPackName, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"stackPackInstanceId"+"}", url.PathEscape(parameterToString(r.stackPackInstanceId, "")), -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 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 []string + 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 + } - // UpgradeStackPackExecute executes the request - // @return string - UpgradeStackPackExecute(r ApiUpgradeStackPackRequest) (string, *http.Response, error) + return localVarReturnValue, localVarHTTPResponse, nil } -// StackpackApiService StackpackApi service -type StackpackApiService service - -type ApiConfirmManualStepsRequest struct { - ctx context.Context - ApiService StackpackApi - stackPackName string - stackPackInstanceId int64 +type ApiStackPackDeleteVersionRequest struct { + ctx context.Context + ApiService StackpackApi + stackPackName string + version string } -func (r ApiConfirmManualStepsRequest) Execute() (string, *http.Response, error) { - return r.ApiService.ConfirmManualStepsExecute(r) +func (r ApiStackPackDeleteVersionRequest) Execute() (*http.Response, error) { + return r.ApiService.StackPackDeleteVersionExecute(r) } /* -ConfirmManualSteps Confirm manual steps +StackPackDeleteVersion Delete a StackPack version -Confirm manual steps of the stackpack +Delete a specific version of a StackPack. Fails if the version is currently in use. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param stackPackName - @param stackPackInstanceId - @return ApiConfirmManualStepsRequest + @param version Version string (e.g. '1.2.3') + @return ApiStackPackDeleteVersionRequest */ -func (a *StackpackApiService) ConfirmManualSteps(ctx context.Context, stackPackName string, stackPackInstanceId int64) ApiConfirmManualStepsRequest { - return ApiConfirmManualStepsRequest{ - ApiService: a, - ctx: ctx, - stackPackName: stackPackName, - stackPackInstanceId: stackPackInstanceId, +func (a *StackpackApiService) StackPackDeleteVersion(ctx context.Context, stackPackName string, version string) ApiStackPackDeleteVersionRequest { + return ApiStackPackDeleteVersionRequest{ + ApiService: a, + ctx: ctx, + stackPackName: stackPackName, + version: version, } } // Execute executes the request -// -// @return string -func (a *StackpackApiService) ConfirmManualStepsExecute(r ApiConfirmManualStepsRequest) (string, *http.Response, error) { +func (a *StackpackApiService) StackPackDeleteVersionExecute(r ApiStackPackDeleteVersionRequest) (*http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue string + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StackpackApiService.ConfirmManualSteps") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StackpackApiService.StackPackDeleteVersion") if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + return nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/stackpack/{stackPackName}/confirm-manual-steps/{stackPackInstanceId}" + localVarPath := localBasePath + "/stackpack/{stackPackName}/versions/{version}" localVarPath = strings.Replace(localVarPath, "{"+"stackPackName"+"}", url.PathEscape(parameterToString(r.stackPackName, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"stackPackInstanceId"+"}", url.PathEscape(parameterToString(r.stackPackInstanceId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", url.PathEscape(parameterToString(r.version, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -246,19 +789,19 @@ func (a *StackpackApiService) ConfirmManualStepsExecute(r ApiConfirmManualStepsR } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { - return localVarReturnValue, nil, err + return nil, err } localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err + return 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 + return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { @@ -266,63 +809,90 @@ func (a *StackpackApiService) ConfirmManualStepsExecute(r ApiConfirmManualStepsR body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v []string + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + var v []string + 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 + } 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 + return 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 localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil + return localVarHTTPResponse, nil } -type ApiProvisionDetailsRequest struct { +type ApiStackPackDeleteVersionsRequest struct { ctx context.Context ApiService StackpackApi stackPackName string - unlocked *string - requestBody *map[string]string + from *string + to *string + all *bool + dev *bool } -func (r ApiProvisionDetailsRequest) Unlocked(unlocked string) ApiProvisionDetailsRequest { - r.unlocked = &unlocked +// Inclusive lower bound. Deletes versions >= this version. Can be used alone or combined with 'to' for a range. +func (r ApiStackPackDeleteVersionsRequest) From(from string) ApiStackPackDeleteVersionsRequest { + r.from = &from return r } -func (r ApiProvisionDetailsRequest) RequestBody(requestBody map[string]string) ApiProvisionDetailsRequest { - r.requestBody = &requestBody +// Inclusive upper bound. Deletes versions <= this version. Can be used alone or combined with 'from' for a range. +func (r ApiStackPackDeleteVersionsRequest) To(to string) ApiStackPackDeleteVersionsRequest { + r.to = &to return r } -func (r ApiProvisionDetailsRequest) Execute() (*ProvisionResponse, *http.Response, error) { - return r.ApiService.ProvisionDetailsExecute(r) +// Delete all versions. Cannot be combined with 'from' or 'to'. +func (r ApiStackPackDeleteVersionsRequest) All(all bool) ApiStackPackDeleteVersionsRequest { + r.all = &all + return r +} + +// Filter to development versions only (versions with metadata, e.g. SNAPSHOT). Can be combined with any scope selector. +func (r ApiStackPackDeleteVersionsRequest) Dev(dev bool) ApiStackPackDeleteVersionsRequest { + r.dev = &dev + return r +} + +func (r ApiStackPackDeleteVersionsRequest) Execute() (*DeleteVersionsResult, *http.Response, error) { + return r.ApiService.StackPackDeleteVersionsExecute(r) } /* -ProvisionDetails Provision API +StackPackDeleteVersions Delete StackPack versions -Provision details +Delete versions of a StackPack by range or threshold. Versions currently in use are skipped. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param stackPackName - @return ApiProvisionDetailsRequest + @return ApiStackPackDeleteVersionsRequest */ -func (a *StackpackApiService) ProvisionDetails(ctx context.Context, stackPackName string) ApiProvisionDetailsRequest { - return ApiProvisionDetailsRequest{ +func (a *StackpackApiService) StackPackDeleteVersions(ctx context.Context, stackPackName string) ApiStackPackDeleteVersionsRequest { + return ApiStackPackDeleteVersionsRequest{ ApiService: a, ctx: ctx, stackPackName: stackPackName, @@ -331,33 +901,41 @@ func (a *StackpackApiService) ProvisionDetails(ctx context.Context, stackPackNam // Execute executes the request // -// @return ProvisionResponse -func (a *StackpackApiService) ProvisionDetailsExecute(r ApiProvisionDetailsRequest) (*ProvisionResponse, *http.Response, error) { +// @return DeleteVersionsResult +func (a *StackpackApiService) StackPackDeleteVersionsExecute(r ApiStackPackDeleteVersionsRequest) (*DeleteVersionsResult, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost + localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile - localVarReturnValue *ProvisionResponse + localVarReturnValue *DeleteVersionsResult ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StackpackApiService.ProvisionDetails") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StackpackApiService.StackPackDeleteVersions") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/stackpack/{stackPackName}/provision" + localVarPath := localBasePath + "/stackpack/{stackPackName}/versions" localVarPath = strings.Replace(localVarPath, "{"+"stackPackName"+"}", url.PathEscape(parameterToString(r.stackPackName, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.unlocked == nil { - return localVarReturnValue, nil, reportError("unlocked is required and must be specified") - } - localVarQueryParams.Add("unlocked", parameterToString(*r.unlocked, "")) + if r.from != nil { + localVarQueryParams.Add("from", parameterToString(*r.from, "")) + } + if r.to != nil { + localVarQueryParams.Add("to", parameterToString(*r.to, "")) + } + if r.all != nil { + localVarQueryParams.Add("all", parameterToString(*r.all, "")) + } + if r.dev != nil { + localVarQueryParams.Add("dev", parameterToString(*r.dev, "")) + } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -373,8 +951,6 @@ func (a *StackpackApiService) ProvisionDetailsExecute(r ApiProvisionDetailsReque if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.requestBody if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -439,6 +1015,16 @@ func (a *StackpackApiService) ProvisionDetailsExecute(r ApiProvisionDetailsReque body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v []string + 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")) @@ -463,55 +1049,47 @@ func (a *StackpackApiService) ProvisionDetailsExecute(r ApiProvisionDetailsReque return localVarReturnValue, localVarHTTPResponse, nil } -type ApiProvisionUninstallRequest struct { - ctx context.Context - ApiService StackpackApi - stackPackName string - stackPackInstanceId int64 +type ApiStackPackListRequest struct { + ctx context.Context + ApiService StackpackApi } -func (r ApiProvisionUninstallRequest) Execute() (string, *http.Response, error) { - return r.ApiService.ProvisionUninstallExecute(r) +func (r ApiStackPackListRequest) Execute() ([]FullStackPack, *http.Response, error) { + return r.ApiService.StackPackListExecute(r) } /* -ProvisionUninstall Provision API +StackPackList StackPack API -Provision details +list of stackpack @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param stackPackName - @param stackPackInstanceId - @return ApiProvisionUninstallRequest + @return ApiStackPackListRequest */ -func (a *StackpackApiService) ProvisionUninstall(ctx context.Context, stackPackName string, stackPackInstanceId int64) ApiProvisionUninstallRequest { - return ApiProvisionUninstallRequest{ - ApiService: a, - ctx: ctx, - stackPackName: stackPackName, - stackPackInstanceId: stackPackInstanceId, +func (a *StackpackApiService) StackPackList(ctx context.Context) ApiStackPackListRequest { + return ApiStackPackListRequest{ + ApiService: a, + ctx: ctx, } } // Execute executes the request // -// @return string -func (a *StackpackApiService) ProvisionUninstallExecute(r ApiProvisionUninstallRequest) (string, *http.Response, error) { +// @return []FullStackPack +func (a *StackpackApiService) StackPackListExecute(r ApiStackPackListRequest) ([]FullStackPack, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue string + localVarReturnValue []FullStackPack ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StackpackApiService.ProvisionUninstall") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StackpackApiService.StackPackList") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/stackpack/{stackPackName}/deprovision/{stackPackInstanceId}" - localVarPath = strings.Replace(localVarPath, "{"+"stackPackName"+"}", url.PathEscape(parameterToString(r.stackPackName, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"stackPackInstanceId"+"}", url.PathEscape(parameterToString(r.stackPackInstanceId, "")), -1) + localVarPath := localBasePath + "/stackpack" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -632,47 +1210,51 @@ func (a *StackpackApiService) ProvisionUninstallExecute(r ApiProvisionUninstallR return localVarReturnValue, localVarHTTPResponse, nil } -type ApiStackPackListRequest struct { - ctx context.Context - ApiService StackpackApi +type ApiStackPackListVersionsRequest struct { + ctx context.Context + ApiService StackpackApi + stackPackName string } -func (r ApiStackPackListRequest) Execute() ([]FullStackPack, *http.Response, error) { - return r.ApiService.StackPackListExecute(r) +func (r ApiStackPackListVersionsRequest) Execute() ([]StackPackVersionInfo, *http.Response, error) { + return r.ApiService.StackPackListVersionsExecute(r) } /* -StackPackList StackPack API +StackPackListVersions List StackPack versions -list of stackpack +List all available versions of a StackPack @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiStackPackListRequest + @param stackPackName + @return ApiStackPackListVersionsRequest */ -func (a *StackpackApiService) StackPackList(ctx context.Context) ApiStackPackListRequest { - return ApiStackPackListRequest{ - ApiService: a, - ctx: ctx, +func (a *StackpackApiService) StackPackListVersions(ctx context.Context, stackPackName string) ApiStackPackListVersionsRequest { + return ApiStackPackListVersionsRequest{ + ApiService: a, + ctx: ctx, + stackPackName: stackPackName, } } // Execute executes the request // -// @return []FullStackPack -func (a *StackpackApiService) StackPackListExecute(r ApiStackPackListRequest) ([]FullStackPack, *http.Response, error) { +// @return []StackPackVersionInfo +func (a *StackpackApiService) StackPackListVersionsExecute(r ApiStackPackListVersionsRequest) ([]StackPackVersionInfo, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue []FullStackPack + localVarReturnValue []StackPackVersionInfo ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StackpackApiService.StackPackList") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StackpackApiService.StackPackListVersions") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/stackpack" + localVarPath := localBasePath + "/stackpack/{stackPackName}/versions" + localVarPath = strings.Replace(localVarPath, "{"+"stackPackName"+"}", url.PathEscape(parameterToString(r.stackPackName, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -759,7 +1341,7 @@ func (a *StackpackApiService) StackPackListExecute(r ApiStackPackListRequest) ([ body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 400 { + if localVarHTTPResponse.StatusCode == 404 { var v []string err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -1331,38 +1913,50 @@ func (a *StackpackApiService) UpgradeStackPackExecute(r ApiUpgradeStackPackReque // --------------------------------------------- type StackpackApiMock struct { - ConfirmManualStepsCalls *[]ConfirmManualStepsCall - ConfirmManualStepsResponse ConfirmManualStepsMockResponse - ProvisionDetailsCalls *[]ProvisionDetailsCall - ProvisionDetailsResponse ProvisionDetailsMockResponse - ProvisionUninstallCalls *[]ProvisionUninstallCall - ProvisionUninstallResponse ProvisionUninstallMockResponse - StackPackListCalls *[]StackPackListCall - StackPackListResponse StackPackListMockResponse - StackPackUploadCalls *[]StackPackUploadCall - StackPackUploadResponse StackPackUploadMockResponse - StackPackValidateCalls *[]StackPackValidateCall - StackPackValidateResponse StackPackValidateMockResponse - UpgradeStackPackCalls *[]UpgradeStackPackCall - UpgradeStackPackResponse UpgradeStackPackMockResponse + ConfirmManualStepsCalls *[]ConfirmManualStepsCall + ConfirmManualStepsResponse ConfirmManualStepsMockResponse + ProvisionDetailsCalls *[]ProvisionDetailsCall + ProvisionDetailsResponse ProvisionDetailsMockResponse + ProvisionUninstallCalls *[]ProvisionUninstallCall + ProvisionUninstallResponse ProvisionUninstallMockResponse + StackPackDeleteVersionCalls *[]StackPackDeleteVersionCall + StackPackDeleteVersionResponse StackPackDeleteVersionMockResponse + StackPackDeleteVersionsCalls *[]StackPackDeleteVersionsCall + StackPackDeleteVersionsResponse StackPackDeleteVersionsMockResponse + StackPackListCalls *[]StackPackListCall + StackPackListResponse StackPackListMockResponse + StackPackListVersionsCalls *[]StackPackListVersionsCall + StackPackListVersionsResponse StackPackListVersionsMockResponse + StackPackUploadCalls *[]StackPackUploadCall + StackPackUploadResponse StackPackUploadMockResponse + StackPackValidateCalls *[]StackPackValidateCall + StackPackValidateResponse StackPackValidateMockResponse + UpgradeStackPackCalls *[]UpgradeStackPackCall + UpgradeStackPackResponse UpgradeStackPackMockResponse } func NewStackpackApiMock() StackpackApiMock { xConfirmManualStepsCalls := make([]ConfirmManualStepsCall, 0) xProvisionDetailsCalls := make([]ProvisionDetailsCall, 0) xProvisionUninstallCalls := make([]ProvisionUninstallCall, 0) + xStackPackDeleteVersionCalls := make([]StackPackDeleteVersionCall, 0) + xStackPackDeleteVersionsCalls := make([]StackPackDeleteVersionsCall, 0) xStackPackListCalls := make([]StackPackListCall, 0) + xStackPackListVersionsCalls := make([]StackPackListVersionsCall, 0) xStackPackUploadCalls := make([]StackPackUploadCall, 0) xStackPackValidateCalls := make([]StackPackValidateCall, 0) xUpgradeStackPackCalls := make([]UpgradeStackPackCall, 0) return StackpackApiMock{ - ConfirmManualStepsCalls: &xConfirmManualStepsCalls, - ProvisionDetailsCalls: &xProvisionDetailsCalls, - ProvisionUninstallCalls: &xProvisionUninstallCalls, - StackPackListCalls: &xStackPackListCalls, - StackPackUploadCalls: &xStackPackUploadCalls, - StackPackValidateCalls: &xStackPackValidateCalls, - UpgradeStackPackCalls: &xUpgradeStackPackCalls, + ConfirmManualStepsCalls: &xConfirmManualStepsCalls, + ProvisionDetailsCalls: &xProvisionDetailsCalls, + ProvisionUninstallCalls: &xProvisionUninstallCalls, + StackPackDeleteVersionCalls: &xStackPackDeleteVersionCalls, + StackPackDeleteVersionsCalls: &xStackPackDeleteVersionsCalls, + StackPackListCalls: &xStackPackListCalls, + StackPackListVersionsCalls: &xStackPackListVersionsCalls, + StackPackUploadCalls: &xStackPackUploadCalls, + StackPackValidateCalls: &xStackPackValidateCalls, + UpgradeStackPackCalls: &xUpgradeStackPackCalls, } } @@ -1454,6 +2048,68 @@ func (mock StackpackApiMock) ProvisionUninstallExecute(r ApiProvisionUninstallRe return mock.ProvisionUninstallResponse.Result, mock.ProvisionUninstallResponse.Response, mock.ProvisionUninstallResponse.Error } +type StackPackDeleteVersionMockResponse struct { + Response *http.Response + Error error +} + +type StackPackDeleteVersionCall struct { + PstackPackName string + Pversion string +} + +func (mock StackpackApiMock) StackPackDeleteVersion(ctx context.Context, stackPackName string, version string) ApiStackPackDeleteVersionRequest { + return ApiStackPackDeleteVersionRequest{ + ApiService: mock, + ctx: ctx, + stackPackName: stackPackName, + version: version, + } +} + +func (mock StackpackApiMock) StackPackDeleteVersionExecute(r ApiStackPackDeleteVersionRequest) (*http.Response, error) { + p := StackPackDeleteVersionCall{ + PstackPackName: r.stackPackName, + Pversion: r.version, + } + *mock.StackPackDeleteVersionCalls = append(*mock.StackPackDeleteVersionCalls, p) + return mock.StackPackDeleteVersionResponse.Response, mock.StackPackDeleteVersionResponse.Error +} + +type StackPackDeleteVersionsMockResponse struct { + Result DeleteVersionsResult + Response *http.Response + Error error +} + +type StackPackDeleteVersionsCall struct { + PstackPackName string + Pfrom *string + Pto *string + Pall *bool + Pdev *bool +} + +func (mock StackpackApiMock) StackPackDeleteVersions(ctx context.Context, stackPackName string) ApiStackPackDeleteVersionsRequest { + return ApiStackPackDeleteVersionsRequest{ + ApiService: mock, + ctx: ctx, + stackPackName: stackPackName, + } +} + +func (mock StackpackApiMock) StackPackDeleteVersionsExecute(r ApiStackPackDeleteVersionsRequest) (*DeleteVersionsResult, *http.Response, error) { + p := StackPackDeleteVersionsCall{ + PstackPackName: r.stackPackName, + Pfrom: r.from, + Pto: r.to, + Pall: r.all, + Pdev: r.dev, + } + *mock.StackPackDeleteVersionsCalls = append(*mock.StackPackDeleteVersionsCalls, p) + return &mock.StackPackDeleteVersionsResponse.Result, mock.StackPackDeleteVersionsResponse.Response, mock.StackPackDeleteVersionsResponse.Error +} + type StackPackListMockResponse struct { Result []FullStackPack Response *http.Response @@ -1476,6 +2132,32 @@ func (mock StackpackApiMock) StackPackListExecute(r ApiStackPackListRequest) ([] return mock.StackPackListResponse.Result, mock.StackPackListResponse.Response, mock.StackPackListResponse.Error } +type StackPackListVersionsMockResponse struct { + Result []StackPackVersionInfo + Response *http.Response + Error error +} + +type StackPackListVersionsCall struct { + PstackPackName string +} + +func (mock StackpackApiMock) StackPackListVersions(ctx context.Context, stackPackName string) ApiStackPackListVersionsRequest { + return ApiStackPackListVersionsRequest{ + ApiService: mock, + ctx: ctx, + stackPackName: stackPackName, + } +} + +func (mock StackpackApiMock) StackPackListVersionsExecute(r ApiStackPackListVersionsRequest) ([]StackPackVersionInfo, *http.Response, error) { + p := StackPackListVersionsCall{ + PstackPackName: r.stackPackName, + } + *mock.StackPackListVersionsCalls = append(*mock.StackPackListVersionsCalls, p) + return mock.StackPackListVersionsResponse.Result, mock.StackPackListVersionsResponse.Response, mock.StackPackListVersionsResponse.Error +} + type StackPackUploadMockResponse struct { Result StackPack Response *http.Response diff --git a/generated/stackstate_api/docs/CellValue.md b/generated/stackstate_api/docs/CellValue.md index 569e0935..902a17c0 100644 --- a/generated/stackstate_api/docs/CellValue.md +++ b/generated/stackstate_api/docs/CellValue.md @@ -8,20 +8,20 @@ Name | Type | Description | Notes **IndividualQuery** | **string** | The frontend can use the individual query to refresh the metrics (at interval). Allows to keep the current behaviour of making individual calls for each row. | **Name** | **string** | | **Url** | **string** | | -**ComponentId** | **string** | | +**Component** | Pointer to [**ComponentLink**](ComponentLink.md) | | [optional] **State** | [**HealthStateValue**](HealthStateValue.md) | | **Value** | **float32** | | **StartDate** | **int32** | | **EndDate** | Pointer to **NullableInt32** | | [optional] -**Ready** | **int32** | | -**Total** | **int32** | | +**Ready** | Pointer to **int32** | | [optional] +**Total** | Pointer to **int32** | | [optional] **Status** | Pointer to [**HealthStateValue**](HealthStateValue.md) | | [optional] ## Methods ### NewCellValue -`func NewCellValue(type_ string, individualQuery string, name string, url string, componentId string, state HealthStateValue, value float32, startDate int32, ready int32, total int32, ) *CellValue` +`func NewCellValue(type_ string, individualQuery string, name string, url string, state HealthStateValue, value float32, startDate int32, ) *CellValue` NewCellValue instantiates a new CellValue object This constructor will assign default values to properties that have it defined, @@ -116,25 +116,30 @@ and a boolean to check if the value has been set. SetUrl sets Url field to given value. -### GetComponentId +### GetComponent -`func (o *CellValue) GetComponentId() string` +`func (o *CellValue) GetComponent() ComponentLink` -GetComponentId returns the ComponentId field if non-nil, zero value otherwise. +GetComponent returns the Component field if non-nil, zero value otherwise. -### GetComponentIdOk +### GetComponentOk -`func (o *CellValue) GetComponentIdOk() (*string, bool)` +`func (o *CellValue) GetComponentOk() (*ComponentLink, bool)` -GetComponentIdOk returns a tuple with the ComponentId field if it's non-nil, zero value otherwise +GetComponentOk returns a tuple with the Component field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetComponentId +### SetComponent -`func (o *CellValue) SetComponentId(v string)` +`func (o *CellValue) SetComponent(v ComponentLink)` -SetComponentId sets ComponentId field to given value. +SetComponent sets Component field to given value. +### HasComponent + +`func (o *CellValue) HasComponent() bool` + +HasComponent returns a boolean if a field has been set. ### GetState @@ -250,6 +255,11 @@ and a boolean to check if the value has been set. SetReady sets Ready field to given value. +### HasReady + +`func (o *CellValue) HasReady() bool` + +HasReady returns a boolean if a field has been set. ### GetTotal @@ -270,6 +280,11 @@ and a boolean to check if the value has been set. SetTotal sets Total field to given value. +### HasTotal + +`func (o *CellValue) HasTotal() bool` + +HasTotal returns a boolean if a field has been set. ### GetStatus diff --git a/generated/stackstate_api/docs/ComponentApi.md b/generated/stackstate_api/docs/ComponentApi.md index 1cafc97b..0995c58a 100644 --- a/generated/stackstate_api/docs/ComponentApi.md +++ b/generated/stackstate_api/docs/ComponentApi.md @@ -4,17 +4,17 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**GetComponentCheckStates**](ComponentApi.md#GetComponentCheckStates) | **Get** /components/{componentIdOrUrn}/checkStates | Get a component checkstates -[**GetComponentHealthHistory**](ComponentApi.md#GetComponentHealthHistory) | **Get** /components/{componentIdOrUrn}/healthHistory | Get a component health history -[**GetComponentMetricBinding**](ComponentApi.md#GetComponentMetricBinding) | **Get** /components/{componentIdOrUrn}/bindmetric | Get a bound metric binding to a component -[**GetComponentMetricsWithData**](ComponentApi.md#GetComponentMetricsWithData) | **Get** /components/{componentIdOrUrn}/boundMetricsWithData | Bound metric bindings that have data for a component -[**GetFullComponent**](ComponentApi.md#GetFullComponent) | **Get** /components/{componentIdOrUrn} | Get full component +[**GetComponentCheckStates**](ComponentApi.md#GetComponentCheckStates) | **Get** /components/{componentIdOrIdentifier}/checkStates | Get a component checkstates +[**GetComponentHealthHistory**](ComponentApi.md#GetComponentHealthHistory) | **Get** /components/{componentIdOrIdentifier}/healthHistory | Get a component health history +[**GetComponentMetricBinding**](ComponentApi.md#GetComponentMetricBinding) | **Get** /components/{componentIdOrIdentifier}/bindmetric | Get a bound metric binding to a component +[**GetComponentMetricsWithData**](ComponentApi.md#GetComponentMetricsWithData) | **Get** /components/{componentIdOrIdentifier}/boundMetricsWithData | Bound metric bindings that have data for a component +[**GetFullComponent**](ComponentApi.md#GetFullComponent) | **Get** /components/{componentIdOrIdentifier} | Get full component ## GetComponentCheckStates -> ComponentCheckStates GetComponentCheckStates(ctx, componentIdOrUrn).StartTime(startTime).EndTime(endTime).Execute() +> ComponentCheckStates GetComponentCheckStates(ctx, componentIdOrIdentifier).StartTime(startTime).EndTime(endTime).Execute() Get a component checkstates @@ -33,13 +33,13 @@ import ( ) func main() { - componentIdOrUrn := "componentIdOrUrn_example" // string | The id or identifier (urn) of a component + componentIdOrIdentifier := "componentIdOrIdentifier_example" // string | The id or identifier (urn) of a component startTime := int32(56) // int32 | The start time of a time range to query resources. endTime := int32(56) // int32 | The end time of a time range to query resources. If not given the endTime is set to current time. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ComponentApi.GetComponentCheckStates(context.Background(), componentIdOrUrn).StartTime(startTime).EndTime(endTime).Execute() + resp, r, err := apiClient.ComponentApi.GetComponentCheckStates(context.Background(), componentIdOrIdentifier).StartTime(startTime).EndTime(endTime).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ComponentApi.GetComponentCheckStates``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -55,7 +55,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**componentIdOrUrn** | **string** | The id or identifier (urn) of a component | +**componentIdOrIdentifier** | **string** | The id or identifier (urn) of a component | ### Other Parameters @@ -88,7 +88,7 @@ Name | Type | Description | Notes ## GetComponentHealthHistory -> ComponentHealthHistory GetComponentHealthHistory(ctx, componentIdOrUrn).StartTime(startTime).EndTime(endTime).Execute() +> ComponentHealthHistory GetComponentHealthHistory(ctx, componentIdOrIdentifier).StartTime(startTime).EndTime(endTime).Execute() Get a component health history @@ -107,13 +107,13 @@ import ( ) func main() { - componentIdOrUrn := "componentIdOrUrn_example" // string | The id or identifier (urn) of a component + componentIdOrIdentifier := "componentIdOrIdentifier_example" // string | The id or identifier (urn) of a component startTime := int32(56) // int32 | The start time of a time range to query resources. endTime := int32(56) // int32 | The end time of a time range to query resources. If not given the endTime is set to current time. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ComponentApi.GetComponentHealthHistory(context.Background(), componentIdOrUrn).StartTime(startTime).EndTime(endTime).Execute() + resp, r, err := apiClient.ComponentApi.GetComponentHealthHistory(context.Background(), componentIdOrIdentifier).StartTime(startTime).EndTime(endTime).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ComponentApi.GetComponentHealthHistory``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -129,7 +129,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**componentIdOrUrn** | **string** | The id or identifier (urn) of a component | +**componentIdOrIdentifier** | **string** | The id or identifier (urn) of a component | ### Other Parameters @@ -162,7 +162,7 @@ Name | Type | Description | Notes ## GetComponentMetricBinding -> BoundMetric GetComponentMetricBinding(ctx, componentIdOrUrn).MetricBindingIdentifier(metricBindingIdentifier).TopologyTime(topologyTime).Execute() +> BoundMetric GetComponentMetricBinding(ctx, componentIdOrIdentifier).MetricBindingIdentifier(metricBindingIdentifier).TopologyTime(topologyTime).Execute() Get a bound metric binding to a component @@ -181,13 +181,13 @@ import ( ) func main() { - componentIdOrUrn := "componentIdOrUrn_example" // string | The id or identifier (urn) of a component + componentIdOrIdentifier := "componentIdOrIdentifier_example" // string | The id or identifier (urn) of a component metricBindingIdentifier := "metricBindingIdentifier_example" // string | The identifier (urn) of a metric binding topologyTime := int32(56) // int32 | A timestamp at which resources will be queried. If not given the resources are queried at current time. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ComponentApi.GetComponentMetricBinding(context.Background(), componentIdOrUrn).MetricBindingIdentifier(metricBindingIdentifier).TopologyTime(topologyTime).Execute() + resp, r, err := apiClient.ComponentApi.GetComponentMetricBinding(context.Background(), componentIdOrIdentifier).MetricBindingIdentifier(metricBindingIdentifier).TopologyTime(topologyTime).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ComponentApi.GetComponentMetricBinding``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -203,7 +203,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**componentIdOrUrn** | **string** | The id or identifier (urn) of a component | +**componentIdOrIdentifier** | **string** | The id or identifier (urn) of a component | ### Other Parameters @@ -236,7 +236,7 @@ Name | Type | Description | Notes ## GetComponentMetricsWithData -> BoundMetrics GetComponentMetricsWithData(ctx, componentIdOrUrn).StartTime(startTime).EndTime(endTime).TopologyTime(topologyTime).Execute() +> BoundMetrics GetComponentMetricsWithData(ctx, componentIdOrIdentifier).StartTime(startTime).EndTime(endTime).TopologyTime(topologyTime).Execute() Bound metric bindings that have data for a component @@ -255,14 +255,14 @@ import ( ) func main() { - componentIdOrUrn := "componentIdOrUrn_example" // string | The id or identifier (urn) of a component + componentIdOrIdentifier := "componentIdOrIdentifier_example" // string | The id or identifier (urn) of a component startTime := int32(56) // int32 | The start time of a time range to query resources. endTime := int32(56) // int32 | The end time of a time range to query resources. topologyTime := int32(56) // int32 | A timestamp at which resources will be queried. If not given the resources are queried at current time. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ComponentApi.GetComponentMetricsWithData(context.Background(), componentIdOrUrn).StartTime(startTime).EndTime(endTime).TopologyTime(topologyTime).Execute() + resp, r, err := apiClient.ComponentApi.GetComponentMetricsWithData(context.Background(), componentIdOrIdentifier).StartTime(startTime).EndTime(endTime).TopologyTime(topologyTime).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ComponentApi.GetComponentMetricsWithData``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -278,7 +278,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**componentIdOrUrn** | **string** | The id or identifier (urn) of a component | +**componentIdOrIdentifier** | **string** | The id or identifier (urn) of a component | ### Other Parameters @@ -312,7 +312,7 @@ Name | Type | Description | Notes ## GetFullComponent -> FullComponent GetFullComponent(ctx, componentIdOrUrn).TopologyTime(topologyTime).Execute() +> FullComponent GetFullComponent(ctx, componentIdOrIdentifier).TopologyTime(topologyTime).Execute() Get full component @@ -331,12 +331,12 @@ import ( ) func main() { - componentIdOrUrn := "componentIdOrUrn_example" // string | The id or identifier (urn) of a component + componentIdOrIdentifier := "componentIdOrIdentifier_example" // string | The id or identifier (urn) of a component topologyTime := int32(56) // int32 | A timestamp at which resources will be queried. If not given the resources are queried at current time. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ComponentApi.GetFullComponent(context.Background(), componentIdOrUrn).TopologyTime(topologyTime).Execute() + resp, r, err := apiClient.ComponentApi.GetFullComponent(context.Background(), componentIdOrIdentifier).TopologyTime(topologyTime).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ComponentApi.GetFullComponent``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -352,7 +352,7 @@ func main() { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**componentIdOrUrn** | **string** | The id or identifier (urn) of a component | +**componentIdOrIdentifier** | **string** | The id or identifier (urn) of a component | ### Other Parameters diff --git a/generated/stackstate_api/docs/ComponentData.md b/generated/stackstate_api/docs/ComponentData.md index b10433be..54637c6d 100644 --- a/generated/stackstate_api/docs/ComponentData.md +++ b/generated/stackstate_api/docs/ComponentData.md @@ -15,13 +15,12 @@ Name | Type | Description | Notes **DomainName** | Pointer to **string** | | [optional] **Health** | Pointer to [**HealthStateValue**](HealthStateValue.md) | | [optional] **LastUpdateTimestamp** | Pointer to **int64** | | [optional] -**Synced** | [**[]ExternalComponent**](ExternalComponent.md) | | ## Methods ### NewComponentData -`func NewComponentData(name string, tags []string, properties map[string]string, synced []ExternalComponent, ) *ComponentData` +`func NewComponentData(name string, tags []string, properties map[string]string, ) *ComponentData` NewComponentData instantiates a new ComponentData object This constructor will assign default values to properties that have it defined, @@ -296,26 +295,6 @@ SetLastUpdateTimestamp sets LastUpdateTimestamp field to given value. HasLastUpdateTimestamp returns a boolean if a field has been set. -### GetSynced - -`func (o *ComponentData) GetSynced() []ExternalComponent` - -GetSynced returns the Synced field if non-nil, zero value otherwise. - -### GetSyncedOk - -`func (o *ComponentData) GetSyncedOk() (*[]ExternalComponent, bool)` - -GetSyncedOk returns a tuple with the Synced field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSynced - -`func (o *ComponentData) SetSynced(v []ExternalComponent)` - -SetSynced sets Synced 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/ComponentLink.md b/generated/stackstate_api/docs/ComponentLink.md new file mode 100644 index 00000000..8e8086de --- /dev/null +++ b/generated/stackstate_api/docs/ComponentLink.md @@ -0,0 +1,72 @@ +# ComponentLink + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**ComponentId** | **string** | | + +## Methods + +### NewComponentLink + +`func NewComponentLink(name string, componentId string, ) *ComponentLink` + +NewComponentLink instantiates a new ComponentLink 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 + +### NewComponentLinkWithDefaults + +`func NewComponentLinkWithDefaults() *ComponentLink` + +NewComponentLinkWithDefaults instantiates a new ComponentLink 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 *ComponentLink) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ComponentLink) 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 *ComponentLink) SetName(v string)` + +SetName sets Name field to given value. + + +### GetComponentId + +`func (o *ComponentLink) GetComponentId() string` + +GetComponentId returns the ComponentId field if non-nil, zero value otherwise. + +### GetComponentIdOk + +`func (o *ComponentLink) GetComponentIdOk() (*string, bool)` + +GetComponentIdOk returns a tuple with the ComponentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComponentId + +`func (o *ComponentLink) SetComponentId(v string)` + +SetComponentId sets ComponentId 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/ComponentLinkCell.md b/generated/stackstate_api/docs/ComponentLinkCell.md index 073cba69..1ccb2e69 100644 --- a/generated/stackstate_api/docs/ComponentLinkCell.md +++ b/generated/stackstate_api/docs/ComponentLinkCell.md @@ -5,14 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | **string** | | -**Name** | **string** | | -**ComponentId** | **string** | | +**Component** | Pointer to [**ComponentLink**](ComponentLink.md) | | [optional] ## Methods ### NewComponentLinkCell -`func NewComponentLinkCell(type_ string, name string, componentId string, ) *ComponentLinkCell` +`func NewComponentLinkCell(type_ string, ) *ComponentLinkCell` NewComponentLinkCell instantiates a new ComponentLinkCell object This constructor will assign default values to properties that have it defined, @@ -47,45 +46,30 @@ and a boolean to check if the value has been set. SetType sets Type field to given value. -### GetName +### GetComponent -`func (o *ComponentLinkCell) GetName() string` +`func (o *ComponentLinkCell) GetComponent() ComponentLink` -GetName returns the Name field if non-nil, zero value otherwise. +GetComponent returns the Component field if non-nil, zero value otherwise. -### GetNameOk +### GetComponentOk -`func (o *ComponentLinkCell) GetNameOk() (*string, bool)` +`func (o *ComponentLinkCell) GetComponentOk() (*ComponentLink, bool)` -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +GetComponentOk returns a tuple with the Component field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetName +### SetComponent -`func (o *ComponentLinkCell) SetName(v string)` +`func (o *ComponentLinkCell) SetComponent(v ComponentLink)` -SetName sets Name field to given value. +SetComponent sets Component field to given value. +### HasComponent -### GetComponentId - -`func (o *ComponentLinkCell) GetComponentId() string` - -GetComponentId returns the ComponentId field if non-nil, zero value otherwise. - -### GetComponentIdOk - -`func (o *ComponentLinkCell) GetComponentIdOk() (*string, bool)` - -GetComponentIdOk returns a tuple with the ComponentId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetComponentId - -`func (o *ComponentLinkCell) SetComponentId(v string)` - -SetComponentId sets ComponentId field to given value. +`func (o *ComponentLinkCell) HasComponent() bool` +HasComponent 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/ComponentProvisioning.md b/generated/stackstate_api/docs/ComponentProvisioning.md new file mode 100644 index 00000000..a2f27618 --- /dev/null +++ b/generated/stackstate_api/docs/ComponentProvisioning.md @@ -0,0 +1,93 @@ +# ComponentProvisioning + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ShowConfiguration** | **bool** | | +**ShowStatus** | **bool** | | +**ExternalId** | **string** | | + +## Methods + +### NewComponentProvisioning + +`func NewComponentProvisioning(showConfiguration bool, showStatus bool, externalId string, ) *ComponentProvisioning` + +NewComponentProvisioning instantiates a new ComponentProvisioning 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 + +### NewComponentProvisioningWithDefaults + +`func NewComponentProvisioningWithDefaults() *ComponentProvisioning` + +NewComponentProvisioningWithDefaults instantiates a new ComponentProvisioning 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 + +### GetShowConfiguration + +`func (o *ComponentProvisioning) GetShowConfiguration() bool` + +GetShowConfiguration returns the ShowConfiguration field if non-nil, zero value otherwise. + +### GetShowConfigurationOk + +`func (o *ComponentProvisioning) GetShowConfigurationOk() (*bool, bool)` + +GetShowConfigurationOk returns a tuple with the ShowConfiguration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetShowConfiguration + +`func (o *ComponentProvisioning) SetShowConfiguration(v bool)` + +SetShowConfiguration sets ShowConfiguration field to given value. + + +### GetShowStatus + +`func (o *ComponentProvisioning) GetShowStatus() bool` + +GetShowStatus returns the ShowStatus field if non-nil, zero value otherwise. + +### GetShowStatusOk + +`func (o *ComponentProvisioning) GetShowStatusOk() (*bool, bool)` + +GetShowStatusOk returns a tuple with the ShowStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetShowStatus + +`func (o *ComponentProvisioning) SetShowStatus(v bool)` + +SetShowStatus sets ShowStatus field to given value. + + +### GetExternalId + +`func (o *ComponentProvisioning) GetExternalId() string` + +GetExternalId returns the ExternalId field if non-nil, zero value otherwise. + +### GetExternalIdOk + +`func (o *ComponentProvisioning) GetExternalIdOk() (*string, bool)` + +GetExternalIdOk returns a tuple with the ExternalId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExternalId + +`func (o *ComponentProvisioning) SetExternalId(v string)` + +SetExternalId sets ExternalId 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/ComponentTypeExternalComponent.md b/generated/stackstate_api/docs/ComponentTypeExternalComponent.md deleted file mode 100644 index 09346490..00000000 --- a/generated/stackstate_api/docs/ComponentTypeExternalComponent.md +++ /dev/null @@ -1,93 +0,0 @@ -# ComponentTypeExternalComponent - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ShowConfiguration** | **bool** | | -**ShowStatus** | **bool** | | -**ExternalIdSelector** | **string** | | - -## Methods - -### NewComponentTypeExternalComponent - -`func NewComponentTypeExternalComponent(showConfiguration bool, showStatus bool, externalIdSelector string, ) *ComponentTypeExternalComponent` - -NewComponentTypeExternalComponent instantiates a new ComponentTypeExternalComponent 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 - -### NewComponentTypeExternalComponentWithDefaults - -`func NewComponentTypeExternalComponentWithDefaults() *ComponentTypeExternalComponent` - -NewComponentTypeExternalComponentWithDefaults instantiates a new ComponentTypeExternalComponent 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 - -### GetShowConfiguration - -`func (o *ComponentTypeExternalComponent) GetShowConfiguration() bool` - -GetShowConfiguration returns the ShowConfiguration field if non-nil, zero value otherwise. - -### GetShowConfigurationOk - -`func (o *ComponentTypeExternalComponent) GetShowConfigurationOk() (*bool, bool)` - -GetShowConfigurationOk returns a tuple with the ShowConfiguration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetShowConfiguration - -`func (o *ComponentTypeExternalComponent) SetShowConfiguration(v bool)` - -SetShowConfiguration sets ShowConfiguration field to given value. - - -### GetShowStatus - -`func (o *ComponentTypeExternalComponent) GetShowStatus() bool` - -GetShowStatus returns the ShowStatus field if non-nil, zero value otherwise. - -### GetShowStatusOk - -`func (o *ComponentTypeExternalComponent) GetShowStatusOk() (*bool, bool)` - -GetShowStatusOk returns a tuple with the ShowStatus field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetShowStatus - -`func (o *ComponentTypeExternalComponent) SetShowStatus(v bool)` - -SetShowStatus sets ShowStatus field to given value. - - -### GetExternalIdSelector - -`func (o *ComponentTypeExternalComponent) GetExternalIdSelector() string` - -GetExternalIdSelector returns the ExternalIdSelector field if non-nil, zero value otherwise. - -### GetExternalIdSelectorOk - -`func (o *ComponentTypeExternalComponent) GetExternalIdSelectorOk() (*string, bool)` - -GetExternalIdSelectorOk returns a tuple with the ExternalIdSelector field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExternalIdSelector - -`func (o *ComponentTypeExternalComponent) SetExternalIdSelector(v string)` - -SetExternalIdSelector sets ExternalIdSelector 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/ComponentTypeRelatedResources.md b/generated/stackstate_api/docs/ComponentTypeRelatedResources.md deleted file mode 100644 index 3a85325c..00000000 --- a/generated/stackstate_api/docs/ComponentTypeRelatedResources.md +++ /dev/null @@ -1,145 +0,0 @@ -# ComponentTypeRelatedResources - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ResourceType** | **string** | | -**Title** | **string** | | -**Stql** | **string** | | -**Hint** | Pointer to **string** | | [optional] -**ViewTypeIdentifier** | Pointer to **string** | | [optional] - -## Methods - -### NewComponentTypeRelatedResources - -`func NewComponentTypeRelatedResources(resourceType string, title string, stql string, ) *ComponentTypeRelatedResources` - -NewComponentTypeRelatedResources instantiates a new ComponentTypeRelatedResources 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 - -### NewComponentTypeRelatedResourcesWithDefaults - -`func NewComponentTypeRelatedResourcesWithDefaults() *ComponentTypeRelatedResources` - -NewComponentTypeRelatedResourcesWithDefaults instantiates a new ComponentTypeRelatedResources 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 - -### GetResourceType - -`func (o *ComponentTypeRelatedResources) GetResourceType() string` - -GetResourceType returns the ResourceType field if non-nil, zero value otherwise. - -### GetResourceTypeOk - -`func (o *ComponentTypeRelatedResources) GetResourceTypeOk() (*string, bool)` - -GetResourceTypeOk returns a tuple with the ResourceType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResourceType - -`func (o *ComponentTypeRelatedResources) SetResourceType(v string)` - -SetResourceType sets ResourceType field to given value. - - -### GetTitle - -`func (o *ComponentTypeRelatedResources) GetTitle() string` - -GetTitle returns the Title field if non-nil, zero value otherwise. - -### GetTitleOk - -`func (o *ComponentTypeRelatedResources) GetTitleOk() (*string, bool)` - -GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTitle - -`func (o *ComponentTypeRelatedResources) SetTitle(v string)` - -SetTitle sets Title field to given value. - - -### GetStql - -`func (o *ComponentTypeRelatedResources) GetStql() string` - -GetStql returns the Stql field if non-nil, zero value otherwise. - -### GetStqlOk - -`func (o *ComponentTypeRelatedResources) GetStqlOk() (*string, bool)` - -GetStqlOk returns a tuple with the Stql field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStql - -`func (o *ComponentTypeRelatedResources) SetStql(v string)` - -SetStql sets Stql field to given value. - - -### GetHint - -`func (o *ComponentTypeRelatedResources) GetHint() string` - -GetHint returns the Hint field if non-nil, zero value otherwise. - -### GetHintOk - -`func (o *ComponentTypeRelatedResources) GetHintOk() (*string, bool)` - -GetHintOk returns a tuple with the Hint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetHint - -`func (o *ComponentTypeRelatedResources) SetHint(v string)` - -SetHint sets Hint field to given value. - -### HasHint - -`func (o *ComponentTypeRelatedResources) HasHint() bool` - -HasHint returns a boolean if a field has been set. - -### GetViewTypeIdentifier - -`func (o *ComponentTypeRelatedResources) GetViewTypeIdentifier() string` - -GetViewTypeIdentifier returns the ViewTypeIdentifier field if non-nil, zero value otherwise. - -### GetViewTypeIdentifierOk - -`func (o *ComponentTypeRelatedResources) GetViewTypeIdentifierOk() (*string, bool)` - -GetViewTypeIdentifierOk returns a tuple with the ViewTypeIdentifier field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetViewTypeIdentifier - -`func (o *ComponentTypeRelatedResources) SetViewTypeIdentifier(v string)` - -SetViewTypeIdentifier sets ViewTypeIdentifier field to given value. - -### HasViewTypeIdentifier - -`func (o *ComponentTypeRelatedResources) HasViewTypeIdentifier() bool` - -HasViewTypeIdentifier 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/DeleteVersionsResult.md b/generated/stackstate_api/docs/DeleteVersionsResult.md new file mode 100644 index 00000000..34b3fcb3 --- /dev/null +++ b/generated/stackstate_api/docs/DeleteVersionsResult.md @@ -0,0 +1,72 @@ +# DeleteVersionsResult + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Deleted** | **[]string** | | +**SkippedInUse** | **[]string** | | + +## Methods + +### NewDeleteVersionsResult + +`func NewDeleteVersionsResult(deleted []string, skippedInUse []string, ) *DeleteVersionsResult` + +NewDeleteVersionsResult instantiates a new DeleteVersionsResult 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 + +### NewDeleteVersionsResultWithDefaults + +`func NewDeleteVersionsResultWithDefaults() *DeleteVersionsResult` + +NewDeleteVersionsResultWithDefaults instantiates a new DeleteVersionsResult 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 + +### GetDeleted + +`func (o *DeleteVersionsResult) GetDeleted() []string` + +GetDeleted returns the Deleted field if non-nil, zero value otherwise. + +### GetDeletedOk + +`func (o *DeleteVersionsResult) GetDeletedOk() (*[]string, bool)` + +GetDeletedOk returns a tuple with the Deleted field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeleted + +`func (o *DeleteVersionsResult) SetDeleted(v []string)` + +SetDeleted sets Deleted field to given value. + + +### GetSkippedInUse + +`func (o *DeleteVersionsResult) GetSkippedInUse() []string` + +GetSkippedInUse returns the SkippedInUse field if non-nil, zero value otherwise. + +### GetSkippedInUseOk + +`func (o *DeleteVersionsResult) GetSkippedInUseOk() (*[]string, bool)` + +GetSkippedInUseOk returns a tuple with the SkippedInUse field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSkippedInUse + +`func (o *DeleteVersionsResult) SetSkippedInUse(v []string)` + +SetSkippedInUse sets SkippedInUse 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/ExternalComponent.md b/generated/stackstate_api/docs/ExternalComponent.md index d1d23ecf..5bd9a9b1 100644 --- a/generated/stackstate_api/docs/ExternalComponent.md +++ b/generated/stackstate_api/docs/ExternalComponent.md @@ -13,12 +13,13 @@ Name | Type | Description | Notes **SyncName** | **string** | | **SourceProperties** | **map[string]interface{}** | | **Status** | Pointer to **map[string]interface{}** | | [optional] +**Tags** | **[]string** | | ## Methods ### NewExternalComponent -`func NewExternalComponent(identifiers []string, data map[string]interface{}, syncName string, sourceProperties map[string]interface{}, ) *ExternalComponent` +`func NewExternalComponent(identifiers []string, data map[string]interface{}, syncName string, sourceProperties map[string]interface{}, tags []string, ) *ExternalComponent` NewExternalComponent instantiates a new ExternalComponent object This constructor will assign default values to properties that have it defined, @@ -238,6 +239,26 @@ SetStatus sets Status field to given value. HasStatus returns a boolean if a field has been set. +### GetTags + +`func (o *ExternalComponent) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ExternalComponent) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ExternalComponent) SetTags(v []string)` + +SetTags sets Tags 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/ExternalRelation.md b/generated/stackstate_api/docs/ExternalRelation.md index ccca66dd..deebfdfe 100644 --- a/generated/stackstate_api/docs/ExternalRelation.md +++ b/generated/stackstate_api/docs/ExternalRelation.md @@ -11,12 +11,13 @@ Name | Type | Description | Notes **LastUpdateTimestamp** | Pointer to **int64** | | [optional] **ElementTypeTag** | Pointer to **string** | | [optional] **SyncName** | **string** | | +**Tags** | **[]string** | | ## Methods ### NewExternalRelation -`func NewExternalRelation(identifiers []string, data map[string]interface{}, syncName string, ) *ExternalRelation` +`func NewExternalRelation(identifiers []string, data map[string]interface{}, syncName string, tags []string, ) *ExternalRelation` NewExternalRelation instantiates a new ExternalRelation object This constructor will assign default values to properties that have it defined, @@ -191,6 +192,26 @@ and a boolean to check if the value has been set. SetSyncName sets SyncName field to given value. +### GetTags + +`func (o *ExternalRelation) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *ExternalRelation) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *ExternalRelation) SetTags(v []string)` + +SetTags sets Tags 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/FullComponent.md b/generated/stackstate_api/docs/FullComponent.md index 6ec98722..14e6c739 100644 --- a/generated/stackstate_api/docs/FullComponent.md +++ b/generated/stackstate_api/docs/FullComponent.md @@ -7,6 +7,9 @@ Name | Type | Description | Notes **TypeName** | **string** | | **Icon** | Pointer to **string** | | [optional] **Fields** | [**[]ComponentField**](ComponentField.md) | | +**Synced** | [**[]ExternalComponent**](ExternalComponent.md) | | +**Provisioning** | Pointer to [**ComponentProvisioning**](ComponentProvisioning.md) | | [optional] +**RelatedResources** | [**[]RelatedResource**](RelatedResource.md) | Resolved related resource definitions in display order. Backend populates from both legacy and new presentation definitions. | **Data** | [**ComponentData**](ComponentData.md) | | **Highlights** | Pointer to [**LegacyComponentHighlights**](LegacyComponentHighlights.md) | | [optional] **Actions** | [**[]ComponentAction**](ComponentAction.md) | | @@ -17,7 +20,7 @@ Name | Type | Description | Notes ### NewFullComponent -`func NewFullComponent(typeName string, fields []ComponentField, data ComponentData, actions []ComponentAction, boundMetrics []BoundMetric, ) *FullComponent` +`func NewFullComponent(typeName string, fields []ComponentField, synced []ExternalComponent, relatedResources []RelatedResource, data ComponentData, actions []ComponentAction, boundMetrics []BoundMetric, ) *FullComponent` NewFullComponent instantiates a new FullComponent object This constructor will assign default values to properties that have it defined, @@ -97,6 +100,71 @@ and a boolean to check if the value has been set. SetFields sets Fields field to given value. +### GetSynced + +`func (o *FullComponent) GetSynced() []ExternalComponent` + +GetSynced returns the Synced field if non-nil, zero value otherwise. + +### GetSyncedOk + +`func (o *FullComponent) GetSyncedOk() (*[]ExternalComponent, bool)` + +GetSyncedOk returns a tuple with the Synced field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSynced + +`func (o *FullComponent) SetSynced(v []ExternalComponent)` + +SetSynced sets Synced field to given value. + + +### GetProvisioning + +`func (o *FullComponent) GetProvisioning() ComponentProvisioning` + +GetProvisioning returns the Provisioning field if non-nil, zero value otherwise. + +### GetProvisioningOk + +`func (o *FullComponent) GetProvisioningOk() (*ComponentProvisioning, bool)` + +GetProvisioningOk returns a tuple with the Provisioning field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProvisioning + +`func (o *FullComponent) SetProvisioning(v ComponentProvisioning)` + +SetProvisioning sets Provisioning field to given value. + +### HasProvisioning + +`func (o *FullComponent) HasProvisioning() bool` + +HasProvisioning returns a boolean if a field has been set. + +### GetRelatedResources + +`func (o *FullComponent) GetRelatedResources() []RelatedResource` + +GetRelatedResources returns the RelatedResources field if non-nil, zero value otherwise. + +### GetRelatedResourcesOk + +`func (o *FullComponent) GetRelatedResourcesOk() (*[]RelatedResource, bool)` + +GetRelatedResourcesOk returns a tuple with the RelatedResources field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelatedResources + +`func (o *FullComponent) SetRelatedResources(v []RelatedResource)` + +SetRelatedResources sets RelatedResources field to given value. + + ### GetData `func (o *FullComponent) GetData() ComponentData` diff --git a/generated/stackstate_api/docs/FullRelation.md b/generated/stackstate_api/docs/FullRelation.md index a7be413b..a44b05d2 100644 --- a/generated/stackstate_api/docs/FullRelation.md +++ b/generated/stackstate_api/docs/FullRelation.md @@ -8,12 +8,13 @@ Name | Type | Description | Notes **Source** | [**FullComponent**](FullComponent.md) | | **Target** | [**FullComponent**](FullComponent.md) | | **TypeName** | **string** | | +**Synced** | [**[]ExternalRelation**](ExternalRelation.md) | | ## Methods ### NewFullRelation -`func NewFullRelation(data RelationData, source FullComponent, target FullComponent, typeName string, ) *FullRelation` +`func NewFullRelation(data RelationData, source FullComponent, target FullComponent, typeName string, synced []ExternalRelation, ) *FullRelation` NewFullRelation instantiates a new FullRelation object This constructor will assign default values to properties that have it defined, @@ -108,6 +109,26 @@ and a boolean to check if the value has been set. SetTypeName sets TypeName field to given value. +### GetSynced + +`func (o *FullRelation) GetSynced() []ExternalRelation` + +GetSynced returns the Synced field if non-nil, zero value otherwise. + +### GetSyncedOk + +`func (o *FullRelation) GetSyncedOk() (*[]ExternalRelation, bool)` + +GetSyncedOk returns a tuple with the Synced field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSynced + +`func (o *FullRelation) SetSynced(v []ExternalRelation)` + +SetSynced sets Synced 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/LegacyComponentHighlights.md b/generated/stackstate_api/docs/LegacyComponentHighlights.md index 589e6d8b..6acf7d79 100644 --- a/generated/stackstate_api/docs/LegacyComponentHighlights.md +++ b/generated/stackstate_api/docs/LegacyComponentHighlights.md @@ -7,16 +7,13 @@ Name | Type | Description | Notes **NamePlural** | **string** | | **Events** | [**ComponentTypeEvents**](ComponentTypeEvents.md) | | **ShowLogs** | **bool** | | -**ShowLastChange** | **bool** | | -**ExternalComponent** | [**ComponentTypeExternalComponent**](ComponentTypeExternalComponent.md) | | -**RelatedResources** | [**[]ComponentTypeRelatedResources**](ComponentTypeRelatedResources.md) | | **Metrics** | [**[]ComponentHighlightMetrics**](ComponentHighlightMetrics.md) | | ## Methods ### NewLegacyComponentHighlights -`func NewLegacyComponentHighlights(namePlural string, events ComponentTypeEvents, showLogs bool, showLastChange bool, externalComponent ComponentTypeExternalComponent, relatedResources []ComponentTypeRelatedResources, metrics []ComponentHighlightMetrics, ) *LegacyComponentHighlights` +`func NewLegacyComponentHighlights(namePlural string, events ComponentTypeEvents, showLogs bool, metrics []ComponentHighlightMetrics, ) *LegacyComponentHighlights` NewLegacyComponentHighlights instantiates a new LegacyComponentHighlights object This constructor will assign default values to properties that have it defined, @@ -91,66 +88,6 @@ and a boolean to check if the value has been set. SetShowLogs sets ShowLogs field to given value. -### GetShowLastChange - -`func (o *LegacyComponentHighlights) GetShowLastChange() bool` - -GetShowLastChange returns the ShowLastChange field if non-nil, zero value otherwise. - -### GetShowLastChangeOk - -`func (o *LegacyComponentHighlights) GetShowLastChangeOk() (*bool, bool)` - -GetShowLastChangeOk returns a tuple with the ShowLastChange field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetShowLastChange - -`func (o *LegacyComponentHighlights) SetShowLastChange(v bool)` - -SetShowLastChange sets ShowLastChange field to given value. - - -### GetExternalComponent - -`func (o *LegacyComponentHighlights) GetExternalComponent() ComponentTypeExternalComponent` - -GetExternalComponent returns the ExternalComponent field if non-nil, zero value otherwise. - -### GetExternalComponentOk - -`func (o *LegacyComponentHighlights) GetExternalComponentOk() (*ComponentTypeExternalComponent, bool)` - -GetExternalComponentOk returns a tuple with the ExternalComponent field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExternalComponent - -`func (o *LegacyComponentHighlights) SetExternalComponent(v ComponentTypeExternalComponent)` - -SetExternalComponent sets ExternalComponent field to given value. - - -### GetRelatedResources - -`func (o *LegacyComponentHighlights) GetRelatedResources() []ComponentTypeRelatedResources` - -GetRelatedResources returns the RelatedResources field if non-nil, zero value otherwise. - -### GetRelatedResourcesOk - -`func (o *LegacyComponentHighlights) GetRelatedResourcesOk() (*[]ComponentTypeRelatedResources, bool)` - -GetRelatedResourcesOk returns a tuple with the RelatedResources field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRelatedResources - -`func (o *LegacyComponentHighlights) SetRelatedResources(v []ComponentTypeRelatedResources)` - -SetRelatedResources sets RelatedResources field to given value. - - ### GetMetrics `func (o *LegacyComponentHighlights) GetMetrics() []ComponentHighlightMetrics` diff --git a/generated/stackstate_api/docs/NumericCell.md b/generated/stackstate_api/docs/NumericCell.md index 5c1a5fbf..65b8484e 100644 --- a/generated/stackstate_api/docs/NumericCell.md +++ b/generated/stackstate_api/docs/NumericCell.md @@ -5,13 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | **string** | | -**Value** | **float32** | | +**Value** | Pointer to **float32** | | [optional] ## Methods ### NewNumericCell -`func NewNumericCell(type_ string, value float32, ) *NumericCell` +`func NewNumericCell(type_ string, ) *NumericCell` NewNumericCell instantiates a new NumericCell object This constructor will assign default values to properties that have it defined, @@ -65,6 +65,11 @@ and a boolean to check if the value has been set. SetValue sets Value field to given value. +### HasValue + +`func (o *NumericCell) HasValue() bool` + +HasValue 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/PresentationHighlight.md b/generated/stackstate_api/docs/PresentationHighlight.md index c2a7b236..2bf78e5b 100644 --- a/generated/stackstate_api/docs/PresentationHighlight.md +++ b/generated/stackstate_api/docs/PresentationHighlight.md @@ -6,6 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Title** | **string** | | **Fields** | [**[]PresentationHighlightField**](PresentationHighlightField.md) | | +**Provisioning** | Pointer to [**PresentationHighlightProvisioning**](PresentationHighlightProvisioning.md) | | [optional] +**RelatedResources** | Pointer to [**[]PresentationRelatedResource**](PresentationRelatedResource.md) | | [optional] ## Methods @@ -66,6 +68,56 @@ and a boolean to check if the value has been set. SetFields sets Fields field to given value. +### GetProvisioning + +`func (o *PresentationHighlight) GetProvisioning() PresentationHighlightProvisioning` + +GetProvisioning returns the Provisioning field if non-nil, zero value otherwise. + +### GetProvisioningOk + +`func (o *PresentationHighlight) GetProvisioningOk() (*PresentationHighlightProvisioning, bool)` + +GetProvisioningOk returns a tuple with the Provisioning field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProvisioning + +`func (o *PresentationHighlight) SetProvisioning(v PresentationHighlightProvisioning)` + +SetProvisioning sets Provisioning field to given value. + +### HasProvisioning + +`func (o *PresentationHighlight) HasProvisioning() bool` + +HasProvisioning returns a boolean if a field has been set. + +### GetRelatedResources + +`func (o *PresentationHighlight) GetRelatedResources() []PresentationRelatedResource` + +GetRelatedResources returns the RelatedResources field if non-nil, zero value otherwise. + +### GetRelatedResourcesOk + +`func (o *PresentationHighlight) GetRelatedResourcesOk() (*[]PresentationRelatedResource, bool)` + +GetRelatedResourcesOk returns a tuple with the RelatedResources field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRelatedResources + +`func (o *PresentationHighlight) SetRelatedResources(v []PresentationRelatedResource)` + +SetRelatedResources sets RelatedResources field to given value. + +### HasRelatedResources + +`func (o *PresentationHighlight) HasRelatedResources() bool` + +HasRelatedResources 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/PresentationHighlightProvisioning.md b/generated/stackstate_api/docs/PresentationHighlightProvisioning.md new file mode 100644 index 00000000..af2d3cfb --- /dev/null +++ b/generated/stackstate_api/docs/PresentationHighlightProvisioning.md @@ -0,0 +1,108 @@ +# PresentationHighlightProvisioning + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ExternalComponentSelector** | Pointer to **string** | Cel expression that selects the external component with provisioning details | [optional] +**ShowConfiguration** | Pointer to **bool** | | [optional] +**ShowStatus** | Pointer to **bool** | | [optional] + +## Methods + +### NewPresentationHighlightProvisioning + +`func NewPresentationHighlightProvisioning() *PresentationHighlightProvisioning` + +NewPresentationHighlightProvisioning instantiates a new PresentationHighlightProvisioning 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 + +### NewPresentationHighlightProvisioningWithDefaults + +`func NewPresentationHighlightProvisioningWithDefaults() *PresentationHighlightProvisioning` + +NewPresentationHighlightProvisioningWithDefaults instantiates a new PresentationHighlightProvisioning 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 + +### GetExternalComponentSelector + +`func (o *PresentationHighlightProvisioning) GetExternalComponentSelector() string` + +GetExternalComponentSelector returns the ExternalComponentSelector field if non-nil, zero value otherwise. + +### GetExternalComponentSelectorOk + +`func (o *PresentationHighlightProvisioning) GetExternalComponentSelectorOk() (*string, bool)` + +GetExternalComponentSelectorOk returns a tuple with the ExternalComponentSelector field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExternalComponentSelector + +`func (o *PresentationHighlightProvisioning) SetExternalComponentSelector(v string)` + +SetExternalComponentSelector sets ExternalComponentSelector field to given value. + +### HasExternalComponentSelector + +`func (o *PresentationHighlightProvisioning) HasExternalComponentSelector() bool` + +HasExternalComponentSelector returns a boolean if a field has been set. + +### GetShowConfiguration + +`func (o *PresentationHighlightProvisioning) GetShowConfiguration() bool` + +GetShowConfiguration returns the ShowConfiguration field if non-nil, zero value otherwise. + +### GetShowConfigurationOk + +`func (o *PresentationHighlightProvisioning) GetShowConfigurationOk() (*bool, bool)` + +GetShowConfigurationOk returns a tuple with the ShowConfiguration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetShowConfiguration + +`func (o *PresentationHighlightProvisioning) SetShowConfiguration(v bool)` + +SetShowConfiguration sets ShowConfiguration field to given value. + +### HasShowConfiguration + +`func (o *PresentationHighlightProvisioning) HasShowConfiguration() bool` + +HasShowConfiguration returns a boolean if a field has been set. + +### GetShowStatus + +`func (o *PresentationHighlightProvisioning) GetShowStatus() bool` + +GetShowStatus returns the ShowStatus field if non-nil, zero value otherwise. + +### GetShowStatusOk + +`func (o *PresentationHighlightProvisioning) GetShowStatusOk() (*bool, bool)` + +GetShowStatusOk returns a tuple with the ShowStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetShowStatus + +`func (o *PresentationHighlightProvisioning) SetShowStatus(v bool)` + +SetShowStatus sets ShowStatus field to given value. + +### HasShowStatus + +`func (o *PresentationHighlightProvisioning) HasShowStatus() bool` + +HasShowStatus 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/PresentationRelatedResource.md b/generated/stackstate_api/docs/PresentationRelatedResource.md new file mode 100644 index 00000000..3eb54f85 --- /dev/null +++ b/generated/stackstate_api/docs/PresentationRelatedResource.md @@ -0,0 +1,145 @@ +# PresentationRelatedResource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ResourceId** | **string** | Stable identity key for merging across presentations, analogous to fieldId and filterId. | +**Title** | **string** | Section heading displayed in the UI for this related resource. | +**Order** | **float64** | Display order. Higher value means it shows first in UI. | +**TopologyQuery** | Pointer to **string** | STQL query scoping the related components. Supports template interpolation with ${*} placeholders (e.g. ${identifiers[0]}, ${tags['namespace']}). The backend intersects this query with the referenced presentation's binding query. | [optional] +**PresentationIdentifier** | Pointer to **string** | References a ComponentPresentation by identifier to reuse its overview spec (columns, name, filters) for rendering this related resource section. Must be within the same stackpack. | [optional] + +## Methods + +### NewPresentationRelatedResource + +`func NewPresentationRelatedResource(resourceId string, title string, order float64, ) *PresentationRelatedResource` + +NewPresentationRelatedResource instantiates a new PresentationRelatedResource 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 + +### NewPresentationRelatedResourceWithDefaults + +`func NewPresentationRelatedResourceWithDefaults() *PresentationRelatedResource` + +NewPresentationRelatedResourceWithDefaults instantiates a new PresentationRelatedResource 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 + +### GetResourceId + +`func (o *PresentationRelatedResource) GetResourceId() string` + +GetResourceId returns the ResourceId field if non-nil, zero value otherwise. + +### GetResourceIdOk + +`func (o *PresentationRelatedResource) GetResourceIdOk() (*string, bool)` + +GetResourceIdOk returns a tuple with the ResourceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResourceId + +`func (o *PresentationRelatedResource) SetResourceId(v string)` + +SetResourceId sets ResourceId field to given value. + + +### GetTitle + +`func (o *PresentationRelatedResource) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *PresentationRelatedResource) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *PresentationRelatedResource) SetTitle(v string)` + +SetTitle sets Title field to given value. + + +### GetOrder + +`func (o *PresentationRelatedResource) GetOrder() float64` + +GetOrder returns the Order field if non-nil, zero value otherwise. + +### GetOrderOk + +`func (o *PresentationRelatedResource) GetOrderOk() (*float64, bool)` + +GetOrderOk returns a tuple with the Order field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrder + +`func (o *PresentationRelatedResource) SetOrder(v float64)` + +SetOrder sets Order field to given value. + + +### GetTopologyQuery + +`func (o *PresentationRelatedResource) GetTopologyQuery() string` + +GetTopologyQuery returns the TopologyQuery field if non-nil, zero value otherwise. + +### GetTopologyQueryOk + +`func (o *PresentationRelatedResource) GetTopologyQueryOk() (*string, bool)` + +GetTopologyQueryOk returns a tuple with the TopologyQuery field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTopologyQuery + +`func (o *PresentationRelatedResource) SetTopologyQuery(v string)` + +SetTopologyQuery sets TopologyQuery field to given value. + +### HasTopologyQuery + +`func (o *PresentationRelatedResource) HasTopologyQuery() bool` + +HasTopologyQuery returns a boolean if a field has been set. + +### GetPresentationIdentifier + +`func (o *PresentationRelatedResource) GetPresentationIdentifier() string` + +GetPresentationIdentifier returns the PresentationIdentifier field if non-nil, zero value otherwise. + +### GetPresentationIdentifierOk + +`func (o *PresentationRelatedResource) GetPresentationIdentifierOk() (*string, bool)` + +GetPresentationIdentifierOk returns a tuple with the PresentationIdentifier field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPresentationIdentifier + +`func (o *PresentationRelatedResource) SetPresentationIdentifier(v string)` + +SetPresentationIdentifier sets PresentationIdentifier field to given value. + +### HasPresentationIdentifier + +`func (o *PresentationRelatedResource) HasPresentationIdentifier() bool` + +HasPresentationIdentifier 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/ReadyStatusCell.md b/generated/stackstate_api/docs/ReadyStatusCell.md index 66c6b86f..3c5eaad2 100644 --- a/generated/stackstate_api/docs/ReadyStatusCell.md +++ b/generated/stackstate_api/docs/ReadyStatusCell.md @@ -5,15 +5,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | **string** | | -**Ready** | **int32** | | -**Total** | **int32** | | +**Ready** | Pointer to **int32** | | [optional] +**Total** | Pointer to **int32** | | [optional] **Status** | Pointer to [**HealthStateValue**](HealthStateValue.md) | | [optional] ## Methods ### NewReadyStatusCell -`func NewReadyStatusCell(type_ string, ready int32, total int32, ) *ReadyStatusCell` +`func NewReadyStatusCell(type_ string, ) *ReadyStatusCell` NewReadyStatusCell instantiates a new ReadyStatusCell object This constructor will assign default values to properties that have it defined, @@ -67,6 +67,11 @@ and a boolean to check if the value has been set. SetReady sets Ready field to given value. +### HasReady + +`func (o *ReadyStatusCell) HasReady() bool` + +HasReady returns a boolean if a field has been set. ### GetTotal @@ -87,6 +92,11 @@ and a boolean to check if the value has been set. SetTotal sets Total field to given value. +### HasTotal + +`func (o *ReadyStatusCell) HasTotal() bool` + +HasTotal returns a boolean if a field has been set. ### GetStatus diff --git a/generated/stackstate_api/docs/RelatedResource.md b/generated/stackstate_api/docs/RelatedResource.md new file mode 100644 index 00000000..2af318db --- /dev/null +++ b/generated/stackstate_api/docs/RelatedResource.md @@ -0,0 +1,114 @@ +# RelatedResource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ResourceId** | **string** | Identity key for this related resource. | +**Title** | **string** | Section heading displayed in the UI. | +**Stql** | **string** | Resolved STQL query with template variables substituted. | +**PresentationIdentifier** | **string** | ComponentPresentation identifier whose overview spec is used for rendering. | + +## Methods + +### NewRelatedResource + +`func NewRelatedResource(resourceId string, title string, stql string, presentationIdentifier string, ) *RelatedResource` + +NewRelatedResource instantiates a new RelatedResource 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 + +### NewRelatedResourceWithDefaults + +`func NewRelatedResourceWithDefaults() *RelatedResource` + +NewRelatedResourceWithDefaults instantiates a new RelatedResource 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 + +### GetResourceId + +`func (o *RelatedResource) GetResourceId() string` + +GetResourceId returns the ResourceId field if non-nil, zero value otherwise. + +### GetResourceIdOk + +`func (o *RelatedResource) GetResourceIdOk() (*string, bool)` + +GetResourceIdOk returns a tuple with the ResourceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResourceId + +`func (o *RelatedResource) SetResourceId(v string)` + +SetResourceId sets ResourceId field to given value. + + +### GetTitle + +`func (o *RelatedResource) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *RelatedResource) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *RelatedResource) SetTitle(v string)` + +SetTitle sets Title field to given value. + + +### GetStql + +`func (o *RelatedResource) GetStql() string` + +GetStql returns the Stql field if non-nil, zero value otherwise. + +### GetStqlOk + +`func (o *RelatedResource) GetStqlOk() (*string, bool)` + +GetStqlOk returns a tuple with the Stql field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStql + +`func (o *RelatedResource) SetStql(v string)` + +SetStql sets Stql field to given value. + + +### GetPresentationIdentifier + +`func (o *RelatedResource) GetPresentationIdentifier() string` + +GetPresentationIdentifier returns the PresentationIdentifier field if non-nil, zero value otherwise. + +### GetPresentationIdentifierOk + +`func (o *RelatedResource) GetPresentationIdentifierOk() (*string, bool)` + +GetPresentationIdentifierOk returns a tuple with the PresentationIdentifier field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPresentationIdentifier + +`func (o *RelatedResource) SetPresentationIdentifier(v string)` + +SetPresentationIdentifier sets PresentationIdentifier 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/RelationData.md b/generated/stackstate_api/docs/RelationData.md index b8daa537..8feece60 100644 --- a/generated/stackstate_api/docs/RelationData.md +++ b/generated/stackstate_api/docs/RelationData.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Tags** | **[]string** | | **Health** | Pointer to [**HealthStateValue**](HealthStateValue.md) | | [optional] -**Synced** | [**[]ExternalRelation**](ExternalRelation.md) | | **Identifiers** | **[]string** | | **Description** | Pointer to **string** | | [optional] **Id** | Pointer to **int64** | | [optional] @@ -18,7 +17,7 @@ Name | Type | Description | Notes ### NewRelationData -`func NewRelationData(tags []string, synced []ExternalRelation, identifiers []string, dependencyDirection DependencyDirection, ) *RelationData` +`func NewRelationData(tags []string, identifiers []string, dependencyDirection DependencyDirection, ) *RelationData` NewRelationData instantiates a new RelationData object This constructor will assign default values to properties that have it defined, @@ -78,26 +77,6 @@ SetHealth sets Health field to given value. HasHealth returns a boolean if a field has been set. -### GetSynced - -`func (o *RelationData) GetSynced() []ExternalRelation` - -GetSynced returns the Synced field if non-nil, zero value otherwise. - -### GetSyncedOk - -`func (o *RelationData) GetSyncedOk() (*[]ExternalRelation, bool)` - -GetSyncedOk returns a tuple with the Synced field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSynced - -`func (o *RelationData) SetSynced(v []ExternalRelation)` - -SetSynced sets Synced field to given value. - - ### GetIdentifiers `func (o *RelationData) GetIdentifiers() []string` diff --git a/generated/stackstate_api/docs/StackPackVersionInfo.md b/generated/stackstate_api/docs/StackPackVersionInfo.md new file mode 100644 index 00000000..edb80bbc --- /dev/null +++ b/generated/stackstate_api/docs/StackPackVersionInfo.md @@ -0,0 +1,93 @@ +# StackPackVersionInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Version** | **string** | | +**IsDev** | **bool** | | +**IsInUse** | **bool** | | + +## Methods + +### NewStackPackVersionInfo + +`func NewStackPackVersionInfo(version string, isDev bool, isInUse bool, ) *StackPackVersionInfo` + +NewStackPackVersionInfo instantiates a new StackPackVersionInfo 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 + +### NewStackPackVersionInfoWithDefaults + +`func NewStackPackVersionInfoWithDefaults() *StackPackVersionInfo` + +NewStackPackVersionInfoWithDefaults instantiates a new StackPackVersionInfo 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 + +### GetVersion + +`func (o *StackPackVersionInfo) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *StackPackVersionInfo) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *StackPackVersionInfo) SetVersion(v string)` + +SetVersion sets Version field to given value. + + +### GetIsDev + +`func (o *StackPackVersionInfo) GetIsDev() bool` + +GetIsDev returns the IsDev field if non-nil, zero value otherwise. + +### GetIsDevOk + +`func (o *StackPackVersionInfo) GetIsDevOk() (*bool, bool)` + +GetIsDevOk returns a tuple with the IsDev field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDev + +`func (o *StackPackVersionInfo) SetIsDev(v bool)` + +SetIsDev sets IsDev field to given value. + + +### GetIsInUse + +`func (o *StackPackVersionInfo) GetIsInUse() bool` + +GetIsInUse returns the IsInUse field if non-nil, zero value otherwise. + +### GetIsInUseOk + +`func (o *StackPackVersionInfo) GetIsInUseOk() (*bool, bool)` + +GetIsInUseOk returns a tuple with the IsInUse field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsInUse + +`func (o *StackPackVersionInfo) SetIsInUse(v bool)` + +SetIsInUse sets IsInUse 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/StackpackApi.md b/generated/stackstate_api/docs/StackpackApi.md index 00613e7f..d6feac24 100644 --- a/generated/stackstate_api/docs/StackpackApi.md +++ b/generated/stackstate_api/docs/StackpackApi.md @@ -7,7 +7,10 @@ Method | HTTP request | Description [**ConfirmManualSteps**](StackpackApi.md#ConfirmManualSteps) | **Post** /stackpack/{stackPackName}/confirm-manual-steps/{stackPackInstanceId} | Confirm manual steps [**ProvisionDetails**](StackpackApi.md#ProvisionDetails) | **Post** /stackpack/{stackPackName}/provision | Provision API [**ProvisionUninstall**](StackpackApi.md#ProvisionUninstall) | **Post** /stackpack/{stackPackName}/deprovision/{stackPackInstanceId} | Provision API +[**StackPackDeleteVersion**](StackpackApi.md#StackPackDeleteVersion) | **Delete** /stackpack/{stackPackName}/versions/{version} | Delete a StackPack version +[**StackPackDeleteVersions**](StackpackApi.md#StackPackDeleteVersions) | **Delete** /stackpack/{stackPackName}/versions | Delete StackPack versions [**StackPackList**](StackpackApi.md#StackPackList) | **Get** /stackpack | StackPack API +[**StackPackListVersions**](StackpackApi.md#StackPackListVersions) | **Get** /stackpack/{stackPackName}/versions | List StackPack versions [**StackPackUpload**](StackpackApi.md#StackPackUpload) | **Post** /stackpack | StackPack API [**StackPackValidate**](StackpackApi.md#StackPackValidate) | **Post** /stackpack/validate | Validate API [**UpgradeStackPack**](StackpackApi.md#UpgradeStackPack) | **Post** /stackpack/{stackPackName}/upgrade | Upgrade API @@ -234,6 +237,153 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## StackPackDeleteVersion + +> StackPackDeleteVersion(ctx, stackPackName, version).Execute() + +Delete a StackPack version + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + stackPackName := "stackPackName_example" // string | + version := "version_example" // string | Version string (e.g. '1.2.3') + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StackpackApi.StackPackDeleteVersion(context.Background(), stackPackName, version).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StackpackApi.StackPackDeleteVersion``: %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. +**stackPackName** | **string** | | +**version** | **string** | Version string (e.g. '1.2.3') | + +### Other Parameters + +Other parameters are passed through a pointer to a apiStackPackDeleteVersionRequest 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) + + +## StackPackDeleteVersions + +> DeleteVersionsResult StackPackDeleteVersions(ctx, stackPackName).Before(before).From(from).To(to).Execute() + +Delete StackPack versions + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + stackPackName := "stackPackName_example" // string | + before := "before_example" // string | Delete all versions strictly less than this version (optional) + from := "from_example" // string | Inclusive start of version range to delete (optional) + to := "to_example" // string | Inclusive end of version range to delete (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StackpackApi.StackPackDeleteVersions(context.Background(), stackPackName).Before(before).From(from).To(to).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StackpackApi.StackPackDeleteVersions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `StackPackDeleteVersions`: DeleteVersionsResult + fmt.Fprintf(os.Stdout, "Response from `StackpackApi.StackPackDeleteVersions`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**stackPackName** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiStackPackDeleteVersionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **before** | **string** | Delete all versions strictly less than this version | + **from** | **string** | Inclusive start of version range to delete | + **to** | **string** | Inclusive end of version range to delete | + +### Return type + +[**DeleteVersionsResult**](DeleteVersionsResult.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) + + ## StackPackList > []FullStackPack StackPackList(ctx).Execute() @@ -295,6 +445,76 @@ Other parameters are passed through a pointer to a apiStackPackListRequest struc [[Back to README]](../README.md) +## StackPackListVersions + +> []StackPackVersionInfo StackPackListVersions(ctx, stackPackName).Execute() + +List StackPack versions + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + stackPackName := "stackPackName_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StackpackApi.StackPackListVersions(context.Background(), stackPackName).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StackpackApi.StackPackListVersions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `StackPackListVersions`: []StackPackVersionInfo + fmt.Fprintf(os.Stdout, "Response from `StackpackApi.StackPackListVersions`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**stackPackName** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiStackPackListVersionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**[]StackPackVersionInfo**](StackPackVersionInfo.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) + + ## StackPackUpload > StackPack StackPackUpload(ctx).StackPack(stackPack).Execute() diff --git a/generated/stackstate_api/model_component_data.go b/generated/stackstate_api/model_component_data.go index 5bfc4247..e81c85ba 100644 --- a/generated/stackstate_api/model_component_data.go +++ b/generated/stackstate_api/model_component_data.go @@ -17,30 +17,28 @@ import ( // ComponentData struct for ComponentData type ComponentData struct { - Id *int64 `json:"id,omitempty" yaml:"id,omitempty"` - Identifiers []string `json:"identifiers,omitempty" yaml:"identifiers,omitempty"` - Name string `json:"name" yaml:"name"` - Description *string `json:"description,omitempty" yaml:"description,omitempty"` - Version *string `json:"version,omitempty" yaml:"version,omitempty"` - Tags []string `json:"tags" yaml:"tags"` - Properties map[string]string `json:"properties" yaml:"properties"` - LayerName *string `json:"layerName,omitempty" yaml:"layerName,omitempty"` - DomainName *string `json:"domainName,omitempty" yaml:"domainName,omitempty"` - Health *HealthStateValue `json:"health,omitempty" yaml:"health,omitempty"` - LastUpdateTimestamp *int64 `json:"lastUpdateTimestamp,omitempty" yaml:"lastUpdateTimestamp,omitempty"` - Synced []ExternalComponent `json:"synced" yaml:"synced"` + Id *int64 `json:"id,omitempty" yaml:"id,omitempty"` + Identifiers []string `json:"identifiers,omitempty" yaml:"identifiers,omitempty"` + Name string `json:"name" yaml:"name"` + Description *string `json:"description,omitempty" yaml:"description,omitempty"` + Version *string `json:"version,omitempty" yaml:"version,omitempty"` + Tags []string `json:"tags" yaml:"tags"` + Properties map[string]string `json:"properties" yaml:"properties"` + LayerName *string `json:"layerName,omitempty" yaml:"layerName,omitempty"` + DomainName *string `json:"domainName,omitempty" yaml:"domainName,omitempty"` + Health *HealthStateValue `json:"health,omitempty" yaml:"health,omitempty"` + LastUpdateTimestamp *int64 `json:"lastUpdateTimestamp,omitempty" yaml:"lastUpdateTimestamp,omitempty"` } // NewComponentData instantiates a new ComponentData 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 NewComponentData(name string, tags []string, properties map[string]string, synced []ExternalComponent) *ComponentData { +func NewComponentData(name string, tags []string, properties map[string]string) *ComponentData { this := ComponentData{} this.Name = name this.Tags = tags this.Properties = properties - this.Synced = synced return &this } @@ -380,30 +378,6 @@ func (o *ComponentData) SetLastUpdateTimestamp(v int64) { o.LastUpdateTimestamp = &v } -// GetSynced returns the Synced field value -func (o *ComponentData) GetSynced() []ExternalComponent { - if o == nil { - var ret []ExternalComponent - return ret - } - - return o.Synced -} - -// GetSyncedOk returns a tuple with the Synced field value -// and a boolean to check if the value has been set. -func (o *ComponentData) GetSyncedOk() ([]ExternalComponent, bool) { - if o == nil { - return nil, false - } - return o.Synced, true -} - -// SetSynced sets field value -func (o *ComponentData) SetSynced(v []ExternalComponent) { - o.Synced = v -} - func (o ComponentData) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { @@ -439,9 +413,6 @@ func (o ComponentData) MarshalJSON() ([]byte, error) { if o.LastUpdateTimestamp != nil { toSerialize["lastUpdateTimestamp"] = o.LastUpdateTimestamp } - if true { - toSerialize["synced"] = o.Synced - } return json.Marshal(toSerialize) } diff --git a/generated/stackstate_api/model_component_link.go b/generated/stackstate_api/model_component_link.go new file mode 100644 index 00000000..7e74860d --- /dev/null +++ b/generated/stackstate_api/model_component_link.go @@ -0,0 +1,136 @@ +/* +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" +) + +// ComponentLink struct for ComponentLink +type ComponentLink struct { + Name string `json:"name" yaml:"name"` + ComponentId string `json:"componentId" yaml:"componentId"` +} + +// NewComponentLink instantiates a new ComponentLink 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 NewComponentLink(name string, componentId string) *ComponentLink { + this := ComponentLink{} + this.Name = name + this.ComponentId = componentId + return &this +} + +// NewComponentLinkWithDefaults instantiates a new ComponentLink 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 NewComponentLinkWithDefaults() *ComponentLink { + this := ComponentLink{} + return &this +} + +// GetName returns the Name field value +func (o *ComponentLink) 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 *ComponentLink) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ComponentLink) SetName(v string) { + o.Name = v +} + +// GetComponentId returns the ComponentId field value +func (o *ComponentLink) GetComponentId() string { + if o == nil { + var ret string + return ret + } + + return o.ComponentId +} + +// GetComponentIdOk returns a tuple with the ComponentId field value +// and a boolean to check if the value has been set. +func (o *ComponentLink) GetComponentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ComponentId, true +} + +// SetComponentId sets field value +func (o *ComponentLink) SetComponentId(v string) { + o.ComponentId = v +} + +func (o ComponentLink) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["name"] = o.Name + } + if true { + toSerialize["componentId"] = o.ComponentId + } + return json.Marshal(toSerialize) +} + +type NullableComponentLink struct { + value *ComponentLink + isSet bool +} + +func (v NullableComponentLink) Get() *ComponentLink { + return v.value +} + +func (v *NullableComponentLink) Set(val *ComponentLink) { + v.value = val + v.isSet = true +} + +func (v NullableComponentLink) IsSet() bool { + return v.isSet +} + +func (v *NullableComponentLink) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableComponentLink(val *ComponentLink) *NullableComponentLink { + return &NullableComponentLink{value: val, isSet: true} +} + +func (v NullableComponentLink) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableComponentLink) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_component_link_cell.go b/generated/stackstate_api/model_component_link_cell.go index 508d07a8..06fb642e 100644 --- a/generated/stackstate_api/model_component_link_cell.go +++ b/generated/stackstate_api/model_component_link_cell.go @@ -17,20 +17,17 @@ import ( // ComponentLinkCell struct for ComponentLinkCell type ComponentLinkCell struct { - Type string `json:"_type" yaml:"_type"` - Name string `json:"name" yaml:"name"` - ComponentId string `json:"componentId" yaml:"componentId"` + Type string `json:"_type" yaml:"_type"` + Component *ComponentLink `json:"component,omitempty" yaml:"component,omitempty"` } // NewComponentLinkCell instantiates a new ComponentLinkCell 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 NewComponentLinkCell(type_ string, name string, componentId string) *ComponentLinkCell { +func NewComponentLinkCell(type_ string) *ComponentLinkCell { this := ComponentLinkCell{} this.Type = type_ - this.Name = name - this.ComponentId = componentId return &this } @@ -66,52 +63,36 @@ func (o *ComponentLinkCell) SetType(v string) { o.Type = v } -// GetName returns the Name field value -func (o *ComponentLinkCell) GetName() string { - if o == nil { - var ret string +// GetComponent returns the Component field value if set, zero value otherwise. +func (o *ComponentLinkCell) GetComponent() ComponentLink { + if o == nil || o.Component == nil { + var ret ComponentLink return ret } - - return o.Name + return *o.Component } -// GetNameOk returns a tuple with the Name field value +// GetComponentOk returns a tuple with the Component field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ComponentLinkCell) GetNameOk() (*string, bool) { - if o == nil { +func (o *ComponentLinkCell) GetComponentOk() (*ComponentLink, bool) { + if o == nil || o.Component == nil { return nil, false } - return &o.Name, true + return o.Component, true } -// SetName sets field value -func (o *ComponentLinkCell) SetName(v string) { - o.Name = v -} - -// GetComponentId returns the ComponentId field value -func (o *ComponentLinkCell) GetComponentId() string { - if o == nil { - var ret string - return ret +// HasComponent returns a boolean if a field has been set. +func (o *ComponentLinkCell) HasComponent() bool { + if o != nil && o.Component != nil { + return true } - return o.ComponentId + return false } -// GetComponentIdOk returns a tuple with the ComponentId field value -// and a boolean to check if the value has been set. -func (o *ComponentLinkCell) GetComponentIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ComponentId, true -} - -// SetComponentId sets field value -func (o *ComponentLinkCell) SetComponentId(v string) { - o.ComponentId = v +// SetComponent gets a reference to the given ComponentLink and assigns it to the Component field. +func (o *ComponentLinkCell) SetComponent(v ComponentLink) { + o.Component = &v } func (o ComponentLinkCell) MarshalJSON() ([]byte, error) { @@ -119,11 +100,8 @@ func (o ComponentLinkCell) MarshalJSON() ([]byte, error) { if true { toSerialize["_type"] = o.Type } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["componentId"] = o.ComponentId + if o.Component != nil { + toSerialize["component"] = o.Component } return json.Marshal(toSerialize) } diff --git a/generated/stackstate_api/model_component_provisioning.go b/generated/stackstate_api/model_component_provisioning.go new file mode 100644 index 00000000..522a1a92 --- /dev/null +++ b/generated/stackstate_api/model_component_provisioning.go @@ -0,0 +1,165 @@ +/* +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" +) + +// ComponentProvisioning struct for ComponentProvisioning +type ComponentProvisioning struct { + ShowConfiguration bool `json:"showConfiguration" yaml:"showConfiguration"` + ShowStatus bool `json:"showStatus" yaml:"showStatus"` + ExternalId string `json:"externalId" yaml:"externalId"` +} + +// NewComponentProvisioning instantiates a new ComponentProvisioning 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 NewComponentProvisioning(showConfiguration bool, showStatus bool, externalId string) *ComponentProvisioning { + this := ComponentProvisioning{} + this.ShowConfiguration = showConfiguration + this.ShowStatus = showStatus + this.ExternalId = externalId + return &this +} + +// NewComponentProvisioningWithDefaults instantiates a new ComponentProvisioning 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 NewComponentProvisioningWithDefaults() *ComponentProvisioning { + this := ComponentProvisioning{} + return &this +} + +// GetShowConfiguration returns the ShowConfiguration field value +func (o *ComponentProvisioning) GetShowConfiguration() bool { + if o == nil { + var ret bool + return ret + } + + return o.ShowConfiguration +} + +// GetShowConfigurationOk returns a tuple with the ShowConfiguration field value +// and a boolean to check if the value has been set. +func (o *ComponentProvisioning) GetShowConfigurationOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.ShowConfiguration, true +} + +// SetShowConfiguration sets field value +func (o *ComponentProvisioning) SetShowConfiguration(v bool) { + o.ShowConfiguration = v +} + +// GetShowStatus returns the ShowStatus field value +func (o *ComponentProvisioning) GetShowStatus() bool { + if o == nil { + var ret bool + return ret + } + + return o.ShowStatus +} + +// GetShowStatusOk returns a tuple with the ShowStatus field value +// and a boolean to check if the value has been set. +func (o *ComponentProvisioning) GetShowStatusOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.ShowStatus, true +} + +// SetShowStatus sets field value +func (o *ComponentProvisioning) SetShowStatus(v bool) { + o.ShowStatus = v +} + +// GetExternalId returns the ExternalId field value +func (o *ComponentProvisioning) GetExternalId() string { + if o == nil { + var ret string + return ret + } + + return o.ExternalId +} + +// GetExternalIdOk returns a tuple with the ExternalId field value +// and a boolean to check if the value has been set. +func (o *ComponentProvisioning) GetExternalIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ExternalId, true +} + +// SetExternalId sets field value +func (o *ComponentProvisioning) SetExternalId(v string) { + o.ExternalId = v +} + +func (o ComponentProvisioning) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["showConfiguration"] = o.ShowConfiguration + } + if true { + toSerialize["showStatus"] = o.ShowStatus + } + if true { + toSerialize["externalId"] = o.ExternalId + } + return json.Marshal(toSerialize) +} + +type NullableComponentProvisioning struct { + value *ComponentProvisioning + isSet bool +} + +func (v NullableComponentProvisioning) Get() *ComponentProvisioning { + return v.value +} + +func (v *NullableComponentProvisioning) Set(val *ComponentProvisioning) { + v.value = val + v.isSet = true +} + +func (v NullableComponentProvisioning) IsSet() bool { + return v.isSet +} + +func (v *NullableComponentProvisioning) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableComponentProvisioning(val *ComponentProvisioning) *NullableComponentProvisioning { + return &NullableComponentProvisioning{value: val, isSet: true} +} + +func (v NullableComponentProvisioning) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableComponentProvisioning) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_component_type_external_component.go b/generated/stackstate_api/model_component_type_external_component.go deleted file mode 100644 index 891f49d5..00000000 --- a/generated/stackstate_api/model_component_type_external_component.go +++ /dev/null @@ -1,165 +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" -) - -// ComponentTypeExternalComponent struct for ComponentTypeExternalComponent -type ComponentTypeExternalComponent struct { - ShowConfiguration bool `json:"showConfiguration" yaml:"showConfiguration"` - ShowStatus bool `json:"showStatus" yaml:"showStatus"` - ExternalIdSelector string `json:"externalIdSelector" yaml:"externalIdSelector"` -} - -// NewComponentTypeExternalComponent instantiates a new ComponentTypeExternalComponent 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 NewComponentTypeExternalComponent(showConfiguration bool, showStatus bool, externalIdSelector string) *ComponentTypeExternalComponent { - this := ComponentTypeExternalComponent{} - this.ShowConfiguration = showConfiguration - this.ShowStatus = showStatus - this.ExternalIdSelector = externalIdSelector - return &this -} - -// NewComponentTypeExternalComponentWithDefaults instantiates a new ComponentTypeExternalComponent 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 NewComponentTypeExternalComponentWithDefaults() *ComponentTypeExternalComponent { - this := ComponentTypeExternalComponent{} - return &this -} - -// GetShowConfiguration returns the ShowConfiguration field value -func (o *ComponentTypeExternalComponent) GetShowConfiguration() bool { - if o == nil { - var ret bool - return ret - } - - return o.ShowConfiguration -} - -// GetShowConfigurationOk returns a tuple with the ShowConfiguration field value -// and a boolean to check if the value has been set. -func (o *ComponentTypeExternalComponent) GetShowConfigurationOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.ShowConfiguration, true -} - -// SetShowConfiguration sets field value -func (o *ComponentTypeExternalComponent) SetShowConfiguration(v bool) { - o.ShowConfiguration = v -} - -// GetShowStatus returns the ShowStatus field value -func (o *ComponentTypeExternalComponent) GetShowStatus() bool { - if o == nil { - var ret bool - return ret - } - - return o.ShowStatus -} - -// GetShowStatusOk returns a tuple with the ShowStatus field value -// and a boolean to check if the value has been set. -func (o *ComponentTypeExternalComponent) GetShowStatusOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.ShowStatus, true -} - -// SetShowStatus sets field value -func (o *ComponentTypeExternalComponent) SetShowStatus(v bool) { - o.ShowStatus = v -} - -// GetExternalIdSelector returns the ExternalIdSelector field value -func (o *ComponentTypeExternalComponent) GetExternalIdSelector() string { - if o == nil { - var ret string - return ret - } - - return o.ExternalIdSelector -} - -// GetExternalIdSelectorOk returns a tuple with the ExternalIdSelector field value -// and a boolean to check if the value has been set. -func (o *ComponentTypeExternalComponent) GetExternalIdSelectorOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ExternalIdSelector, true -} - -// SetExternalIdSelector sets field value -func (o *ComponentTypeExternalComponent) SetExternalIdSelector(v string) { - o.ExternalIdSelector = v -} - -func (o ComponentTypeExternalComponent) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["showConfiguration"] = o.ShowConfiguration - } - if true { - toSerialize["showStatus"] = o.ShowStatus - } - if true { - toSerialize["externalIdSelector"] = o.ExternalIdSelector - } - return json.Marshal(toSerialize) -} - -type NullableComponentTypeExternalComponent struct { - value *ComponentTypeExternalComponent - isSet bool -} - -func (v NullableComponentTypeExternalComponent) Get() *ComponentTypeExternalComponent { - return v.value -} - -func (v *NullableComponentTypeExternalComponent) Set(val *ComponentTypeExternalComponent) { - v.value = val - v.isSet = true -} - -func (v NullableComponentTypeExternalComponent) IsSet() bool { - return v.isSet -} - -func (v *NullableComponentTypeExternalComponent) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableComponentTypeExternalComponent(val *ComponentTypeExternalComponent) *NullableComponentTypeExternalComponent { - return &NullableComponentTypeExternalComponent{value: val, isSet: true} -} - -func (v NullableComponentTypeExternalComponent) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableComponentTypeExternalComponent) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/stackstate_api/model_component_type_related_resources.go b/generated/stackstate_api/model_component_type_related_resources.go deleted file mode 100644 index b9718c1c..00000000 --- a/generated/stackstate_api/model_component_type_related_resources.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" -) - -// ComponentTypeRelatedResources struct for ComponentTypeRelatedResources -type ComponentTypeRelatedResources struct { - ResourceType string `json:"resourceType" yaml:"resourceType"` - Title string `json:"title" yaml:"title"` - Stql string `json:"stql" yaml:"stql"` - Hint *string `json:"hint,omitempty" yaml:"hint,omitempty"` - ViewTypeIdentifier *string `json:"viewTypeIdentifier,omitempty" yaml:"viewTypeIdentifier,omitempty"` -} - -// NewComponentTypeRelatedResources instantiates a new ComponentTypeRelatedResources 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 NewComponentTypeRelatedResources(resourceType string, title string, stql string) *ComponentTypeRelatedResources { - this := ComponentTypeRelatedResources{} - this.ResourceType = resourceType - this.Title = title - this.Stql = stql - return &this -} - -// NewComponentTypeRelatedResourcesWithDefaults instantiates a new ComponentTypeRelatedResources 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 NewComponentTypeRelatedResourcesWithDefaults() *ComponentTypeRelatedResources { - this := ComponentTypeRelatedResources{} - return &this -} - -// GetResourceType returns the ResourceType field value -func (o *ComponentTypeRelatedResources) GetResourceType() string { - if o == nil { - var ret string - return ret - } - - return o.ResourceType -} - -// GetResourceTypeOk returns a tuple with the ResourceType field value -// and a boolean to check if the value has been set. -func (o *ComponentTypeRelatedResources) GetResourceTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ResourceType, true -} - -// SetResourceType sets field value -func (o *ComponentTypeRelatedResources) SetResourceType(v string) { - o.ResourceType = v -} - -// GetTitle returns the Title field value -func (o *ComponentTypeRelatedResources) GetTitle() string { - if o == nil { - var ret string - return ret - } - - return o.Title -} - -// GetTitleOk returns a tuple with the Title field value -// and a boolean to check if the value has been set. -func (o *ComponentTypeRelatedResources) GetTitleOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Title, true -} - -// SetTitle sets field value -func (o *ComponentTypeRelatedResources) SetTitle(v string) { - o.Title = v -} - -// GetStql returns the Stql field value -func (o *ComponentTypeRelatedResources) GetStql() string { - if o == nil { - var ret string - return ret - } - - return o.Stql -} - -// GetStqlOk returns a tuple with the Stql field value -// and a boolean to check if the value has been set. -func (o *ComponentTypeRelatedResources) GetStqlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Stql, true -} - -// SetStql sets field value -func (o *ComponentTypeRelatedResources) SetStql(v string) { - o.Stql = v -} - -// GetHint returns the Hint field value if set, zero value otherwise. -func (o *ComponentTypeRelatedResources) GetHint() string { - if o == nil || o.Hint == nil { - var ret string - return ret - } - return *o.Hint -} - -// GetHintOk returns a tuple with the Hint field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ComponentTypeRelatedResources) GetHintOk() (*string, bool) { - if o == nil || o.Hint == nil { - return nil, false - } - return o.Hint, true -} - -// HasHint returns a boolean if a field has been set. -func (o *ComponentTypeRelatedResources) HasHint() bool { - if o != nil && o.Hint != nil { - return true - } - - return false -} - -// SetHint gets a reference to the given string and assigns it to the Hint field. -func (o *ComponentTypeRelatedResources) SetHint(v string) { - o.Hint = &v -} - -// GetViewTypeIdentifier returns the ViewTypeIdentifier field value if set, zero value otherwise. -func (o *ComponentTypeRelatedResources) GetViewTypeIdentifier() string { - if o == nil || o.ViewTypeIdentifier == nil { - var ret string - return ret - } - return *o.ViewTypeIdentifier -} - -// GetViewTypeIdentifierOk returns a tuple with the ViewTypeIdentifier field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ComponentTypeRelatedResources) GetViewTypeIdentifierOk() (*string, bool) { - if o == nil || o.ViewTypeIdentifier == nil { - return nil, false - } - return o.ViewTypeIdentifier, true -} - -// HasViewTypeIdentifier returns a boolean if a field has been set. -func (o *ComponentTypeRelatedResources) HasViewTypeIdentifier() bool { - if o != nil && o.ViewTypeIdentifier != nil { - return true - } - - return false -} - -// SetViewTypeIdentifier gets a reference to the given string and assigns it to the ViewTypeIdentifier field. -func (o *ComponentTypeRelatedResources) SetViewTypeIdentifier(v string) { - o.ViewTypeIdentifier = &v -} - -func (o ComponentTypeRelatedResources) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["resourceType"] = o.ResourceType - } - if true { - toSerialize["title"] = o.Title - } - if true { - toSerialize["stql"] = o.Stql - } - if o.Hint != nil { - toSerialize["hint"] = o.Hint - } - if o.ViewTypeIdentifier != nil { - toSerialize["viewTypeIdentifier"] = o.ViewTypeIdentifier - } - return json.Marshal(toSerialize) -} - -type NullableComponentTypeRelatedResources struct { - value *ComponentTypeRelatedResources - isSet bool -} - -func (v NullableComponentTypeRelatedResources) Get() *ComponentTypeRelatedResources { - return v.value -} - -func (v *NullableComponentTypeRelatedResources) Set(val *ComponentTypeRelatedResources) { - v.value = val - v.isSet = true -} - -func (v NullableComponentTypeRelatedResources) IsSet() bool { - return v.isSet -} - -func (v *NullableComponentTypeRelatedResources) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableComponentTypeRelatedResources(val *ComponentTypeRelatedResources) *NullableComponentTypeRelatedResources { - return &NullableComponentTypeRelatedResources{value: val, isSet: true} -} - -func (v NullableComponentTypeRelatedResources) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableComponentTypeRelatedResources) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/stackstate_api/model_delete_versions_result.go b/generated/stackstate_api/model_delete_versions_result.go new file mode 100644 index 00000000..97862b09 --- /dev/null +++ b/generated/stackstate_api/model_delete_versions_result.go @@ -0,0 +1,136 @@ +/* +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" +) + +// DeleteVersionsResult struct for DeleteVersionsResult +type DeleteVersionsResult struct { + Deleted []string `json:"deleted" yaml:"deleted"` + SkippedInUse []string `json:"skippedInUse" yaml:"skippedInUse"` +} + +// NewDeleteVersionsResult instantiates a new DeleteVersionsResult 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 NewDeleteVersionsResult(deleted []string, skippedInUse []string) *DeleteVersionsResult { + this := DeleteVersionsResult{} + this.Deleted = deleted + this.SkippedInUse = skippedInUse + return &this +} + +// NewDeleteVersionsResultWithDefaults instantiates a new DeleteVersionsResult 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 NewDeleteVersionsResultWithDefaults() *DeleteVersionsResult { + this := DeleteVersionsResult{} + return &this +} + +// GetDeleted returns the Deleted field value +func (o *DeleteVersionsResult) GetDeleted() []string { + if o == nil { + var ret []string + return ret + } + + return o.Deleted +} + +// GetDeletedOk returns a tuple with the Deleted field value +// and a boolean to check if the value has been set. +func (o *DeleteVersionsResult) GetDeletedOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Deleted, true +} + +// SetDeleted sets field value +func (o *DeleteVersionsResult) SetDeleted(v []string) { + o.Deleted = v +} + +// GetSkippedInUse returns the SkippedInUse field value +func (o *DeleteVersionsResult) GetSkippedInUse() []string { + if o == nil { + var ret []string + return ret + } + + return o.SkippedInUse +} + +// GetSkippedInUseOk returns a tuple with the SkippedInUse field value +// and a boolean to check if the value has been set. +func (o *DeleteVersionsResult) GetSkippedInUseOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.SkippedInUse, true +} + +// SetSkippedInUse sets field value +func (o *DeleteVersionsResult) SetSkippedInUse(v []string) { + o.SkippedInUse = v +} + +func (o DeleteVersionsResult) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["deleted"] = o.Deleted + } + if true { + toSerialize["skippedInUse"] = o.SkippedInUse + } + return json.Marshal(toSerialize) +} + +type NullableDeleteVersionsResult struct { + value *DeleteVersionsResult + isSet bool +} + +func (v NullableDeleteVersionsResult) Get() *DeleteVersionsResult { + return v.value +} + +func (v *NullableDeleteVersionsResult) Set(val *DeleteVersionsResult) { + v.value = val + v.isSet = true +} + +func (v NullableDeleteVersionsResult) IsSet() bool { + return v.isSet +} + +func (v *NullableDeleteVersionsResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeleteVersionsResult(val *DeleteVersionsResult) *NullableDeleteVersionsResult { + return &NullableDeleteVersionsResult{value: val, isSet: true} +} + +func (v NullableDeleteVersionsResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeleteVersionsResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_external_component.go b/generated/stackstate_api/model_external_component.go index e86d68a0..f8c2aadf 100644 --- a/generated/stackstate_api/model_external_component.go +++ b/generated/stackstate_api/model_external_component.go @@ -26,18 +26,20 @@ type ExternalComponent struct { SyncName string `json:"syncName" yaml:"syncName"` SourceProperties map[string]interface{} `json:"sourceProperties" yaml:"sourceProperties"` Status map[string]interface{} `json:"status,omitempty" yaml:"status,omitempty"` + Tags []string `json:"tags" yaml:"tags"` } // NewExternalComponent instantiates a new ExternalComponent 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 NewExternalComponent(identifiers []string, data map[string]interface{}, syncName string, sourceProperties map[string]interface{}) *ExternalComponent { +func NewExternalComponent(identifiers []string, data map[string]interface{}, syncName string, sourceProperties map[string]interface{}, tags []string) *ExternalComponent { this := ExternalComponent{} this.Identifiers = identifiers this.Data = data this.SyncName = syncName this.SourceProperties = sourceProperties + this.Tags = tags return &this } @@ -305,6 +307,30 @@ func (o *ExternalComponent) SetStatus(v map[string]interface{}) { o.Status = v } +// GetTags returns the Tags field value +func (o *ExternalComponent) GetTags() []string { + if o == nil { + var ret []string + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *ExternalComponent) GetTagsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *ExternalComponent) SetTags(v []string) { + o.Tags = v +} + func (o ExternalComponent) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.ExternalId != nil { @@ -334,6 +360,9 @@ func (o ExternalComponent) MarshalJSON() ([]byte, error) { if o.Status != nil { toSerialize["status"] = o.Status } + if true { + toSerialize["tags"] = o.Tags + } return json.Marshal(toSerialize) } diff --git a/generated/stackstate_api/model_external_relation.go b/generated/stackstate_api/model_external_relation.go index c87d5e0a..d2cf51ef 100644 --- a/generated/stackstate_api/model_external_relation.go +++ b/generated/stackstate_api/model_external_relation.go @@ -24,17 +24,19 @@ type ExternalRelation struct { LastUpdateTimestamp *int64 `json:"lastUpdateTimestamp,omitempty" yaml:"lastUpdateTimestamp,omitempty"` ElementTypeTag *string `json:"elementTypeTag,omitempty" yaml:"elementTypeTag,omitempty"` SyncName string `json:"syncName" yaml:"syncName"` + Tags []string `json:"tags" yaml:"tags"` } // NewExternalRelation instantiates a new ExternalRelation 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 NewExternalRelation(identifiers []string, data map[string]interface{}, syncName string) *ExternalRelation { +func NewExternalRelation(identifiers []string, data map[string]interface{}, syncName string, tags []string) *ExternalRelation { this := ExternalRelation{} this.Identifiers = identifiers this.Data = data this.SyncName = syncName + this.Tags = tags return &this } @@ -246,6 +248,30 @@ func (o *ExternalRelation) SetSyncName(v string) { o.SyncName = v } +// GetTags returns the Tags field value +func (o *ExternalRelation) GetTags() []string { + if o == nil { + var ret []string + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *ExternalRelation) GetTagsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *ExternalRelation) SetTags(v []string) { + o.Tags = v +} + func (o ExternalRelation) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.ExternalId != nil { @@ -269,6 +295,9 @@ func (o ExternalRelation) MarshalJSON() ([]byte, error) { if true { toSerialize["syncName"] = o.SyncName } + if true { + toSerialize["tags"] = o.Tags + } return json.Marshal(toSerialize) } diff --git a/generated/stackstate_api/model_full_component.go b/generated/stackstate_api/model_full_component.go index 867277d3..ae7dc1c3 100644 --- a/generated/stackstate_api/model_full_component.go +++ b/generated/stackstate_api/model_full_component.go @@ -17,24 +17,30 @@ import ( // FullComponent struct for FullComponent type FullComponent struct { - TypeName string `json:"typeName" yaml:"typeName"` - Icon *string `json:"icon,omitempty" yaml:"icon,omitempty"` - Fields []ComponentField `json:"fields" yaml:"fields"` - Data ComponentData `json:"data" yaml:"data"` - Highlights *LegacyComponentHighlights `json:"highlights,omitempty" yaml:"highlights,omitempty"` - Actions []ComponentAction `json:"actions" yaml:"actions"` - BoundMetrics []BoundMetric `json:"boundMetrics" yaml:"boundMetrics"` - BoundTraces *BoundTraces `json:"boundTraces,omitempty" yaml:"boundTraces,omitempty"` + TypeName string `json:"typeName" yaml:"typeName"` + Icon *string `json:"icon,omitempty" yaml:"icon,omitempty"` + Fields []ComponentField `json:"fields" yaml:"fields"` + Synced []ExternalComponent `json:"synced" yaml:"synced"` + Provisioning *ComponentProvisioning `json:"provisioning,omitempty" yaml:"provisioning,omitempty"` + // Resolved related resource definitions in display order. Backend populates from both legacy and new presentation definitions. + RelatedResources []RelatedResource `json:"relatedResources" yaml:"relatedResources"` + Data ComponentData `json:"data" yaml:"data"` + Highlights *LegacyComponentHighlights `json:"highlights,omitempty" yaml:"highlights,omitempty"` + Actions []ComponentAction `json:"actions" yaml:"actions"` + BoundMetrics []BoundMetric `json:"boundMetrics" yaml:"boundMetrics"` + BoundTraces *BoundTraces `json:"boundTraces,omitempty" yaml:"boundTraces,omitempty"` } // NewFullComponent instantiates a new FullComponent 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 NewFullComponent(typeName string, fields []ComponentField, data ComponentData, actions []ComponentAction, boundMetrics []BoundMetric) *FullComponent { +func NewFullComponent(typeName string, fields []ComponentField, synced []ExternalComponent, relatedResources []RelatedResource, data ComponentData, actions []ComponentAction, boundMetrics []BoundMetric) *FullComponent { this := FullComponent{} this.TypeName = typeName this.Fields = fields + this.Synced = synced + this.RelatedResources = relatedResources this.Data = data this.Actions = actions this.BoundMetrics = boundMetrics @@ -129,6 +135,86 @@ func (o *FullComponent) SetFields(v []ComponentField) { o.Fields = v } +// GetSynced returns the Synced field value +func (o *FullComponent) GetSynced() []ExternalComponent { + if o == nil { + var ret []ExternalComponent + return ret + } + + return o.Synced +} + +// GetSyncedOk returns a tuple with the Synced field value +// and a boolean to check if the value has been set. +func (o *FullComponent) GetSyncedOk() ([]ExternalComponent, bool) { + if o == nil { + return nil, false + } + return o.Synced, true +} + +// SetSynced sets field value +func (o *FullComponent) SetSynced(v []ExternalComponent) { + o.Synced = v +} + +// GetProvisioning returns the Provisioning field value if set, zero value otherwise. +func (o *FullComponent) GetProvisioning() ComponentProvisioning { + if o == nil || o.Provisioning == nil { + var ret ComponentProvisioning + return ret + } + return *o.Provisioning +} + +// GetProvisioningOk returns a tuple with the Provisioning field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FullComponent) GetProvisioningOk() (*ComponentProvisioning, bool) { + if o == nil || o.Provisioning == nil { + return nil, false + } + return o.Provisioning, true +} + +// HasProvisioning returns a boolean if a field has been set. +func (o *FullComponent) HasProvisioning() bool { + if o != nil && o.Provisioning != nil { + return true + } + + return false +} + +// SetProvisioning gets a reference to the given ComponentProvisioning and assigns it to the Provisioning field. +func (o *FullComponent) SetProvisioning(v ComponentProvisioning) { + o.Provisioning = &v +} + +// GetRelatedResources returns the RelatedResources field value +func (o *FullComponent) GetRelatedResources() []RelatedResource { + if o == nil { + var ret []RelatedResource + return ret + } + + return o.RelatedResources +} + +// GetRelatedResourcesOk returns a tuple with the RelatedResources field value +// and a boolean to check if the value has been set. +func (o *FullComponent) GetRelatedResourcesOk() ([]RelatedResource, bool) { + if o == nil { + return nil, false + } + return o.RelatedResources, true +} + +// SetRelatedResources sets field value +func (o *FullComponent) SetRelatedResources(v []RelatedResource) { + o.RelatedResources = v +} + // GetData returns the Data field value func (o *FullComponent) GetData() ComponentData { if o == nil { @@ -276,6 +362,15 @@ func (o FullComponent) MarshalJSON() ([]byte, error) { if true { toSerialize["fields"] = o.Fields } + if true { + toSerialize["synced"] = o.Synced + } + if o.Provisioning != nil { + toSerialize["provisioning"] = o.Provisioning + } + if true { + toSerialize["relatedResources"] = o.RelatedResources + } if true { toSerialize["data"] = o.Data } diff --git a/generated/stackstate_api/model_full_relation.go b/generated/stackstate_api/model_full_relation.go index abf84ec5..97629b30 100644 --- a/generated/stackstate_api/model_full_relation.go +++ b/generated/stackstate_api/model_full_relation.go @@ -17,22 +17,24 @@ import ( // FullRelation struct for FullRelation type FullRelation struct { - Data RelationData `json:"data" yaml:"data"` - Source FullComponent `json:"source" yaml:"source"` - Target FullComponent `json:"target" yaml:"target"` - TypeName string `json:"typeName" yaml:"typeName"` + Data RelationData `json:"data" yaml:"data"` + Source FullComponent `json:"source" yaml:"source"` + Target FullComponent `json:"target" yaml:"target"` + TypeName string `json:"typeName" yaml:"typeName"` + Synced []ExternalRelation `json:"synced" yaml:"synced"` } // NewFullRelation instantiates a new FullRelation 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 NewFullRelation(data RelationData, source FullComponent, target FullComponent, typeName string) *FullRelation { +func NewFullRelation(data RelationData, source FullComponent, target FullComponent, typeName string, synced []ExternalRelation) *FullRelation { this := FullRelation{} this.Data = data this.Source = source this.Target = target this.TypeName = typeName + this.Synced = synced return &this } @@ -140,6 +142,30 @@ func (o *FullRelation) SetTypeName(v string) { o.TypeName = v } +// GetSynced returns the Synced field value +func (o *FullRelation) GetSynced() []ExternalRelation { + if o == nil { + var ret []ExternalRelation + return ret + } + + return o.Synced +} + +// GetSyncedOk returns a tuple with the Synced field value +// and a boolean to check if the value has been set. +func (o *FullRelation) GetSyncedOk() ([]ExternalRelation, bool) { + if o == nil { + return nil, false + } + return o.Synced, true +} + +// SetSynced sets field value +func (o *FullRelation) SetSynced(v []ExternalRelation) { + o.Synced = v +} + func (o FullRelation) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { @@ -154,6 +180,9 @@ func (o FullRelation) MarshalJSON() ([]byte, error) { if true { toSerialize["typeName"] = o.TypeName } + if true { + toSerialize["synced"] = o.Synced + } return json.Marshal(toSerialize) } diff --git a/generated/stackstate_api/model_legacy_component_highlights.go b/generated/stackstate_api/model_legacy_component_highlights.go index b378896e..9fce5fe3 100644 --- a/generated/stackstate_api/model_legacy_component_highlights.go +++ b/generated/stackstate_api/model_legacy_component_highlights.go @@ -17,27 +17,21 @@ import ( // LegacyComponentHighlights struct for LegacyComponentHighlights type LegacyComponentHighlights struct { - NamePlural string `json:"namePlural" yaml:"namePlural"` - Events ComponentTypeEvents `json:"events" yaml:"events"` - ShowLogs bool `json:"showLogs" yaml:"showLogs"` - ShowLastChange bool `json:"showLastChange" yaml:"showLastChange"` - ExternalComponent ComponentTypeExternalComponent `json:"externalComponent" yaml:"externalComponent"` - RelatedResources []ComponentTypeRelatedResources `json:"relatedResources" yaml:"relatedResources"` - Metrics []ComponentHighlightMetrics `json:"metrics" yaml:"metrics"` + NamePlural string `json:"namePlural" yaml:"namePlural"` + Events ComponentTypeEvents `json:"events" yaml:"events"` + ShowLogs bool `json:"showLogs" yaml:"showLogs"` + Metrics []ComponentHighlightMetrics `json:"metrics" yaml:"metrics"` } // NewLegacyComponentHighlights instantiates a new LegacyComponentHighlights 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 NewLegacyComponentHighlights(namePlural string, events ComponentTypeEvents, showLogs bool, showLastChange bool, externalComponent ComponentTypeExternalComponent, relatedResources []ComponentTypeRelatedResources, metrics []ComponentHighlightMetrics) *LegacyComponentHighlights { +func NewLegacyComponentHighlights(namePlural string, events ComponentTypeEvents, showLogs bool, metrics []ComponentHighlightMetrics) *LegacyComponentHighlights { this := LegacyComponentHighlights{} this.NamePlural = namePlural this.Events = events this.ShowLogs = showLogs - this.ShowLastChange = showLastChange - this.ExternalComponent = externalComponent - this.RelatedResources = relatedResources this.Metrics = metrics return &this } @@ -122,78 +116,6 @@ func (o *LegacyComponentHighlights) SetShowLogs(v bool) { o.ShowLogs = v } -// GetShowLastChange returns the ShowLastChange field value -func (o *LegacyComponentHighlights) GetShowLastChange() bool { - if o == nil { - var ret bool - return ret - } - - return o.ShowLastChange -} - -// GetShowLastChangeOk returns a tuple with the ShowLastChange field value -// and a boolean to check if the value has been set. -func (o *LegacyComponentHighlights) GetShowLastChangeOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.ShowLastChange, true -} - -// SetShowLastChange sets field value -func (o *LegacyComponentHighlights) SetShowLastChange(v bool) { - o.ShowLastChange = v -} - -// GetExternalComponent returns the ExternalComponent field value -func (o *LegacyComponentHighlights) GetExternalComponent() ComponentTypeExternalComponent { - if o == nil { - var ret ComponentTypeExternalComponent - return ret - } - - return o.ExternalComponent -} - -// GetExternalComponentOk returns a tuple with the ExternalComponent field value -// and a boolean to check if the value has been set. -func (o *LegacyComponentHighlights) GetExternalComponentOk() (*ComponentTypeExternalComponent, bool) { - if o == nil { - return nil, false - } - return &o.ExternalComponent, true -} - -// SetExternalComponent sets field value -func (o *LegacyComponentHighlights) SetExternalComponent(v ComponentTypeExternalComponent) { - o.ExternalComponent = v -} - -// GetRelatedResources returns the RelatedResources field value -func (o *LegacyComponentHighlights) GetRelatedResources() []ComponentTypeRelatedResources { - if o == nil { - var ret []ComponentTypeRelatedResources - return ret - } - - return o.RelatedResources -} - -// GetRelatedResourcesOk returns a tuple with the RelatedResources field value -// and a boolean to check if the value has been set. -func (o *LegacyComponentHighlights) GetRelatedResourcesOk() ([]ComponentTypeRelatedResources, bool) { - if o == nil { - return nil, false - } - return o.RelatedResources, true -} - -// SetRelatedResources sets field value -func (o *LegacyComponentHighlights) SetRelatedResources(v []ComponentTypeRelatedResources) { - o.RelatedResources = v -} - // GetMetrics returns the Metrics field value func (o *LegacyComponentHighlights) GetMetrics() []ComponentHighlightMetrics { if o == nil { @@ -229,15 +151,6 @@ func (o LegacyComponentHighlights) MarshalJSON() ([]byte, error) { if true { toSerialize["showLogs"] = o.ShowLogs } - if true { - toSerialize["showLastChange"] = o.ShowLastChange - } - if true { - toSerialize["externalComponent"] = o.ExternalComponent - } - if true { - toSerialize["relatedResources"] = o.RelatedResources - } if true { toSerialize["metrics"] = o.Metrics } diff --git a/generated/stackstate_api/model_numeric_cell.go b/generated/stackstate_api/model_numeric_cell.go index 564542a3..0feca635 100644 --- a/generated/stackstate_api/model_numeric_cell.go +++ b/generated/stackstate_api/model_numeric_cell.go @@ -17,18 +17,17 @@ import ( // NumericCell struct for NumericCell type NumericCell struct { - Type string `json:"_type" yaml:"_type"` - Value float32 `json:"value" yaml:"value"` + Type string `json:"_type" yaml:"_type"` + Value *float32 `json:"value,omitempty" yaml:"value,omitempty"` } // NewNumericCell instantiates a new NumericCell 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 NewNumericCell(type_ string, value float32) *NumericCell { +func NewNumericCell(type_ string) *NumericCell { this := NumericCell{} this.Type = type_ - this.Value = value return &this } @@ -64,28 +63,36 @@ func (o *NumericCell) SetType(v string) { o.Type = v } -// GetValue returns the Value field value +// GetValue returns the Value field value if set, zero value otherwise. func (o *NumericCell) GetValue() float32 { - if o == nil { + if o == nil || o.Value == nil { var ret float32 return ret } - - return o.Value + return *o.Value } -// GetValueOk returns a tuple with the Value field value +// GetValueOk returns a tuple with the Value field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *NumericCell) GetValueOk() (*float32, bool) { - if o == nil { + if o == nil || o.Value == nil { return nil, false } - return &o.Value, true + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *NumericCell) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false } -// SetValue sets field value +// SetValue gets a reference to the given float32 and assigns it to the Value field. func (o *NumericCell) SetValue(v float32) { - o.Value = v + o.Value = &v } func (o NumericCell) MarshalJSON() ([]byte, error) { @@ -93,7 +100,7 @@ func (o NumericCell) MarshalJSON() ([]byte, error) { if true { toSerialize["_type"] = o.Type } - if true { + if o.Value != nil { toSerialize["value"] = o.Value } return json.Marshal(toSerialize) diff --git a/generated/stackstate_api/model_presentation_highlight.go b/generated/stackstate_api/model_presentation_highlight.go index 95d91ced..10b3add7 100644 --- a/generated/stackstate_api/model_presentation_highlight.go +++ b/generated/stackstate_api/model_presentation_highlight.go @@ -15,10 +15,12 @@ import ( "encoding/json" ) -// PresentationHighlight Highlight presentation definition. The `fields` define the fields to show in the ab. The `flags` field can be used to enable/disable functionalities. If multiple ComponentPresentations match, columns are merged by `columnId` according to binding rank. Absence of the field means no overview is shown. +// PresentationHighlight Highlight presentation definition. The `fields` define the fields to show in the highlight page. If multiple ComponentPresentations match, fields are merged by `fieldId` according to binding rank. Related resources follow the same merge semantics using `resourceId` as the identity key. type PresentationHighlight struct { - Title string `json:"title" yaml:"title"` - Fields []PresentationHighlightField `json:"fields" yaml:"fields"` + Title string `json:"title" yaml:"title"` + Fields []PresentationHighlightField `json:"fields" yaml:"fields"` + Provisioning *PresentationHighlightProvisioning `json:"provisioning,omitempty" yaml:"provisioning,omitempty"` + RelatedResources []PresentationRelatedResource `json:"relatedResources,omitempty" yaml:"relatedResources,omitempty"` } // NewPresentationHighlight instantiates a new PresentationHighlight object @@ -88,6 +90,70 @@ func (o *PresentationHighlight) SetFields(v []PresentationHighlightField) { o.Fields = v } +// GetProvisioning returns the Provisioning field value if set, zero value otherwise. +func (o *PresentationHighlight) GetProvisioning() PresentationHighlightProvisioning { + if o == nil || o.Provisioning == nil { + var ret PresentationHighlightProvisioning + return ret + } + return *o.Provisioning +} + +// GetProvisioningOk returns a tuple with the Provisioning field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PresentationHighlight) GetProvisioningOk() (*PresentationHighlightProvisioning, bool) { + if o == nil || o.Provisioning == nil { + return nil, false + } + return o.Provisioning, true +} + +// HasProvisioning returns a boolean if a field has been set. +func (o *PresentationHighlight) HasProvisioning() bool { + if o != nil && o.Provisioning != nil { + return true + } + + return false +} + +// SetProvisioning gets a reference to the given PresentationHighlightProvisioning and assigns it to the Provisioning field. +func (o *PresentationHighlight) SetProvisioning(v PresentationHighlightProvisioning) { + o.Provisioning = &v +} + +// GetRelatedResources returns the RelatedResources field value if set, zero value otherwise. +func (o *PresentationHighlight) GetRelatedResources() []PresentationRelatedResource { + if o == nil || o.RelatedResources == nil { + var ret []PresentationRelatedResource + return ret + } + return o.RelatedResources +} + +// GetRelatedResourcesOk returns a tuple with the RelatedResources field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PresentationHighlight) GetRelatedResourcesOk() ([]PresentationRelatedResource, bool) { + if o == nil || o.RelatedResources == nil { + return nil, false + } + return o.RelatedResources, true +} + +// HasRelatedResources returns a boolean if a field has been set. +func (o *PresentationHighlight) HasRelatedResources() bool { + if o != nil && o.RelatedResources != nil { + return true + } + + return false +} + +// SetRelatedResources gets a reference to the given []PresentationRelatedResource and assigns it to the RelatedResources field. +func (o *PresentationHighlight) SetRelatedResources(v []PresentationRelatedResource) { + o.RelatedResources = v +} + func (o PresentationHighlight) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { @@ -96,6 +162,12 @@ func (o PresentationHighlight) MarshalJSON() ([]byte, error) { if true { toSerialize["fields"] = o.Fields } + if o.Provisioning != nil { + toSerialize["provisioning"] = o.Provisioning + } + if o.RelatedResources != nil { + toSerialize["relatedResources"] = o.RelatedResources + } return json.Marshal(toSerialize) } diff --git a/generated/stackstate_api/model_presentation_highlight_provisioning.go b/generated/stackstate_api/model_presentation_highlight_provisioning.go new file mode 100644 index 00000000..ff5cf900 --- /dev/null +++ b/generated/stackstate_api/model_presentation_highlight_provisioning.go @@ -0,0 +1,187 @@ +/* +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" +) + +// PresentationHighlightProvisioning Provisioning section of a component in the highlight presentation. The `externalComponentSelector` field is used to identify the external component with provisioning details for this component. +type PresentationHighlightProvisioning struct { + // Cel expression that selects the external component with provisioning details + ExternalComponentSelector *string `json:"externalComponentSelector,omitempty" yaml:"externalComponentSelector,omitempty"` + ShowConfiguration *bool `json:"showConfiguration,omitempty" yaml:"showConfiguration,omitempty"` + ShowStatus *bool `json:"showStatus,omitempty" yaml:"showStatus,omitempty"` +} + +// NewPresentationHighlightProvisioning instantiates a new PresentationHighlightProvisioning 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 NewPresentationHighlightProvisioning() *PresentationHighlightProvisioning { + this := PresentationHighlightProvisioning{} + return &this +} + +// NewPresentationHighlightProvisioningWithDefaults instantiates a new PresentationHighlightProvisioning 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 NewPresentationHighlightProvisioningWithDefaults() *PresentationHighlightProvisioning { + this := PresentationHighlightProvisioning{} + return &this +} + +// GetExternalComponentSelector returns the ExternalComponentSelector field value if set, zero value otherwise. +func (o *PresentationHighlightProvisioning) GetExternalComponentSelector() string { + if o == nil || o.ExternalComponentSelector == nil { + var ret string + return ret + } + return *o.ExternalComponentSelector +} + +// GetExternalComponentSelectorOk returns a tuple with the ExternalComponentSelector field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PresentationHighlightProvisioning) GetExternalComponentSelectorOk() (*string, bool) { + if o == nil || o.ExternalComponentSelector == nil { + return nil, false + } + return o.ExternalComponentSelector, true +} + +// HasExternalComponentSelector returns a boolean if a field has been set. +func (o *PresentationHighlightProvisioning) HasExternalComponentSelector() bool { + if o != nil && o.ExternalComponentSelector != nil { + return true + } + + return false +} + +// SetExternalComponentSelector gets a reference to the given string and assigns it to the ExternalComponentSelector field. +func (o *PresentationHighlightProvisioning) SetExternalComponentSelector(v string) { + o.ExternalComponentSelector = &v +} + +// GetShowConfiguration returns the ShowConfiguration field value if set, zero value otherwise. +func (o *PresentationHighlightProvisioning) GetShowConfiguration() bool { + if o == nil || o.ShowConfiguration == nil { + var ret bool + return ret + } + return *o.ShowConfiguration +} + +// GetShowConfigurationOk returns a tuple with the ShowConfiguration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PresentationHighlightProvisioning) GetShowConfigurationOk() (*bool, bool) { + if o == nil || o.ShowConfiguration == nil { + return nil, false + } + return o.ShowConfiguration, true +} + +// HasShowConfiguration returns a boolean if a field has been set. +func (o *PresentationHighlightProvisioning) HasShowConfiguration() bool { + if o != nil && o.ShowConfiguration != nil { + return true + } + + return false +} + +// SetShowConfiguration gets a reference to the given bool and assigns it to the ShowConfiguration field. +func (o *PresentationHighlightProvisioning) SetShowConfiguration(v bool) { + o.ShowConfiguration = &v +} + +// GetShowStatus returns the ShowStatus field value if set, zero value otherwise. +func (o *PresentationHighlightProvisioning) GetShowStatus() bool { + if o == nil || o.ShowStatus == nil { + var ret bool + return ret + } + return *o.ShowStatus +} + +// GetShowStatusOk returns a tuple with the ShowStatus field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PresentationHighlightProvisioning) GetShowStatusOk() (*bool, bool) { + if o == nil || o.ShowStatus == nil { + return nil, false + } + return o.ShowStatus, true +} + +// HasShowStatus returns a boolean if a field has been set. +func (o *PresentationHighlightProvisioning) HasShowStatus() bool { + if o != nil && o.ShowStatus != nil { + return true + } + + return false +} + +// SetShowStatus gets a reference to the given bool and assigns it to the ShowStatus field. +func (o *PresentationHighlightProvisioning) SetShowStatus(v bool) { + o.ShowStatus = &v +} + +func (o PresentationHighlightProvisioning) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.ExternalComponentSelector != nil { + toSerialize["externalComponentSelector"] = o.ExternalComponentSelector + } + if o.ShowConfiguration != nil { + toSerialize["showConfiguration"] = o.ShowConfiguration + } + if o.ShowStatus != nil { + toSerialize["showStatus"] = o.ShowStatus + } + return json.Marshal(toSerialize) +} + +type NullablePresentationHighlightProvisioning struct { + value *PresentationHighlightProvisioning + isSet bool +} + +func (v NullablePresentationHighlightProvisioning) Get() *PresentationHighlightProvisioning { + return v.value +} + +func (v *NullablePresentationHighlightProvisioning) Set(val *PresentationHighlightProvisioning) { + v.value = val + v.isSet = true +} + +func (v NullablePresentationHighlightProvisioning) IsSet() bool { + return v.isSet +} + +func (v *NullablePresentationHighlightProvisioning) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePresentationHighlightProvisioning(val *PresentationHighlightProvisioning) *NullablePresentationHighlightProvisioning { + return &NullablePresentationHighlightProvisioning{value: val, isSet: true} +} + +func (v NullablePresentationHighlightProvisioning) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePresentationHighlightProvisioning) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_presentation_related_resource.go b/generated/stackstate_api/model_presentation_related_resource.go new file mode 100644 index 00000000..35aac3e5 --- /dev/null +++ b/generated/stackstate_api/model_presentation_related_resource.go @@ -0,0 +1,242 @@ +/* +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" +) + +// PresentationRelatedResource Related resource definition for the highlight page. Each entry defines a section showing components related to the one being viewed, rendered using the referenced presentation's overview spec. Merge semantics follow highlight field rules: - All presentations whose binding matches the component contribute related resources. - Same resourceId with higher specificity wins (override). - Different resourceId entries are appended. - Display order is determined by the order field. +type PresentationRelatedResource struct { + // Stable identity key for merging across presentations, analogous to fieldId and filterId. + ResourceId string `json:"resourceId" yaml:"resourceId"` + // Section heading displayed in the UI for this related resource. + Title string `json:"title" yaml:"title"` + // Display order. Higher value means it shows first in UI. + Order float64 `json:"order" yaml:"order"` + // STQL query scoping the related components. Supports template interpolation with ${*} placeholders (e.g. ${identifiers[0]}, ${tags['namespace']}). The backend intersects this query with the referenced presentation's binding query. + TopologyQuery *string `json:"topologyQuery,omitempty" yaml:"topologyQuery,omitempty"` + // References a ComponentPresentation by identifier to reuse its overview spec (columns, name, filters) for rendering this related resource section. Must be within the same stackpack. + PresentationIdentifier *string `json:"presentationIdentifier,omitempty" yaml:"presentationIdentifier,omitempty"` +} + +// NewPresentationRelatedResource instantiates a new PresentationRelatedResource 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 NewPresentationRelatedResource(resourceId string, title string, order float64) *PresentationRelatedResource { + this := PresentationRelatedResource{} + this.ResourceId = resourceId + this.Title = title + this.Order = order + return &this +} + +// NewPresentationRelatedResourceWithDefaults instantiates a new PresentationRelatedResource 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 NewPresentationRelatedResourceWithDefaults() *PresentationRelatedResource { + this := PresentationRelatedResource{} + return &this +} + +// GetResourceId returns the ResourceId field value +func (o *PresentationRelatedResource) GetResourceId() string { + if o == nil { + var ret string + return ret + } + + return o.ResourceId +} + +// GetResourceIdOk returns a tuple with the ResourceId field value +// and a boolean to check if the value has been set. +func (o *PresentationRelatedResource) GetResourceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ResourceId, true +} + +// SetResourceId sets field value +func (o *PresentationRelatedResource) SetResourceId(v string) { + o.ResourceId = v +} + +// GetTitle returns the Title field value +func (o *PresentationRelatedResource) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +func (o *PresentationRelatedResource) GetTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *PresentationRelatedResource) SetTitle(v string) { + o.Title = v +} + +// GetOrder returns the Order field value +func (o *PresentationRelatedResource) GetOrder() float64 { + if o == nil { + var ret float64 + return ret + } + + return o.Order +} + +// GetOrderOk returns a tuple with the Order field value +// and a boolean to check if the value has been set. +func (o *PresentationRelatedResource) GetOrderOk() (*float64, bool) { + if o == nil { + return nil, false + } + return &o.Order, true +} + +// SetOrder sets field value +func (o *PresentationRelatedResource) SetOrder(v float64) { + o.Order = v +} + +// GetTopologyQuery returns the TopologyQuery field value if set, zero value otherwise. +func (o *PresentationRelatedResource) GetTopologyQuery() string { + if o == nil || o.TopologyQuery == nil { + var ret string + return ret + } + return *o.TopologyQuery +} + +// GetTopologyQueryOk returns a tuple with the TopologyQuery field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PresentationRelatedResource) GetTopologyQueryOk() (*string, bool) { + if o == nil || o.TopologyQuery == nil { + return nil, false + } + return o.TopologyQuery, true +} + +// HasTopologyQuery returns a boolean if a field has been set. +func (o *PresentationRelatedResource) HasTopologyQuery() bool { + if o != nil && o.TopologyQuery != nil { + return true + } + + return false +} + +// SetTopologyQuery gets a reference to the given string and assigns it to the TopologyQuery field. +func (o *PresentationRelatedResource) SetTopologyQuery(v string) { + o.TopologyQuery = &v +} + +// GetPresentationIdentifier returns the PresentationIdentifier field value if set, zero value otherwise. +func (o *PresentationRelatedResource) GetPresentationIdentifier() string { + if o == nil || o.PresentationIdentifier == nil { + var ret string + return ret + } + return *o.PresentationIdentifier +} + +// GetPresentationIdentifierOk returns a tuple with the PresentationIdentifier field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PresentationRelatedResource) GetPresentationIdentifierOk() (*string, bool) { + if o == nil || o.PresentationIdentifier == nil { + return nil, false + } + return o.PresentationIdentifier, true +} + +// HasPresentationIdentifier returns a boolean if a field has been set. +func (o *PresentationRelatedResource) HasPresentationIdentifier() bool { + if o != nil && o.PresentationIdentifier != nil { + return true + } + + return false +} + +// SetPresentationIdentifier gets a reference to the given string and assigns it to the PresentationIdentifier field. +func (o *PresentationRelatedResource) SetPresentationIdentifier(v string) { + o.PresentationIdentifier = &v +} + +func (o PresentationRelatedResource) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["resourceId"] = o.ResourceId + } + if true { + toSerialize["title"] = o.Title + } + if true { + toSerialize["order"] = o.Order + } + if o.TopologyQuery != nil { + toSerialize["topologyQuery"] = o.TopologyQuery + } + if o.PresentationIdentifier != nil { + toSerialize["presentationIdentifier"] = o.PresentationIdentifier + } + return json.Marshal(toSerialize) +} + +type NullablePresentationRelatedResource struct { + value *PresentationRelatedResource + isSet bool +} + +func (v NullablePresentationRelatedResource) Get() *PresentationRelatedResource { + return v.value +} + +func (v *NullablePresentationRelatedResource) Set(val *PresentationRelatedResource) { + v.value = val + v.isSet = true +} + +func (v NullablePresentationRelatedResource) IsSet() bool { + return v.isSet +} + +func (v *NullablePresentationRelatedResource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePresentationRelatedResource(val *PresentationRelatedResource) *NullablePresentationRelatedResource { + return &NullablePresentationRelatedResource{value: val, isSet: true} +} + +func (v NullablePresentationRelatedResource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePresentationRelatedResource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_ready_status_cell.go b/generated/stackstate_api/model_ready_status_cell.go index b9011fc2..0938a3d6 100644 --- a/generated/stackstate_api/model_ready_status_cell.go +++ b/generated/stackstate_api/model_ready_status_cell.go @@ -18,8 +18,8 @@ import ( // ReadyStatusCell struct for ReadyStatusCell type ReadyStatusCell struct { Type string `json:"_type" yaml:"_type"` - Ready int32 `json:"ready" yaml:"ready"` - Total int32 `json:"total" yaml:"total"` + Ready *int32 `json:"ready,omitempty" yaml:"ready,omitempty"` + Total *int32 `json:"total,omitempty" yaml:"total,omitempty"` Status *HealthStateValue `json:"status,omitempty" yaml:"status,omitempty"` } @@ -27,11 +27,9 @@ type ReadyStatusCell 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 NewReadyStatusCell(type_ string, ready int32, total int32) *ReadyStatusCell { +func NewReadyStatusCell(type_ string) *ReadyStatusCell { this := ReadyStatusCell{} this.Type = type_ - this.Ready = ready - this.Total = total return &this } @@ -67,52 +65,68 @@ func (o *ReadyStatusCell) SetType(v string) { o.Type = v } -// GetReady returns the Ready field value +// GetReady returns the Ready field value if set, zero value otherwise. func (o *ReadyStatusCell) GetReady() int32 { - if o == nil { + if o == nil || o.Ready == nil { var ret int32 return ret } - - return o.Ready + return *o.Ready } -// GetReadyOk returns a tuple with the Ready field value +// GetReadyOk returns a tuple with the Ready field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ReadyStatusCell) GetReadyOk() (*int32, bool) { - if o == nil { + if o == nil || o.Ready == nil { return nil, false } - return &o.Ready, true + return o.Ready, true +} + +// HasReady returns a boolean if a field has been set. +func (o *ReadyStatusCell) HasReady() bool { + if o != nil && o.Ready != nil { + return true + } + + return false } -// SetReady sets field value +// SetReady gets a reference to the given int32 and assigns it to the Ready field. func (o *ReadyStatusCell) SetReady(v int32) { - o.Ready = v + o.Ready = &v } -// GetTotal returns the Total field value +// GetTotal returns the Total field value if set, zero value otherwise. func (o *ReadyStatusCell) GetTotal() int32 { - if o == nil { + if o == nil || o.Total == nil { var ret int32 return ret } - - return o.Total + return *o.Total } -// GetTotalOk returns a tuple with the Total field value +// GetTotalOk returns a tuple with the Total field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ReadyStatusCell) GetTotalOk() (*int32, bool) { - if o == nil { + if o == nil || o.Total == nil { return nil, false } - return &o.Total, true + return o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *ReadyStatusCell) HasTotal() bool { + if o != nil && o.Total != nil { + return true + } + + return false } -// SetTotal sets field value +// SetTotal gets a reference to the given int32 and assigns it to the Total field. func (o *ReadyStatusCell) SetTotal(v int32) { - o.Total = v + o.Total = &v } // GetStatus returns the Status field value if set, zero value otherwise. @@ -152,10 +166,10 @@ func (o ReadyStatusCell) MarshalJSON() ([]byte, error) { if true { toSerialize["_type"] = o.Type } - if true { + if o.Ready != nil { toSerialize["ready"] = o.Ready } - if true { + if o.Total != nil { toSerialize["total"] = o.Total } if o.Status != nil { diff --git a/generated/stackstate_api/model_related_resource.go b/generated/stackstate_api/model_related_resource.go new file mode 100644 index 00000000..748586a3 --- /dev/null +++ b/generated/stackstate_api/model_related_resource.go @@ -0,0 +1,198 @@ +/* +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" +) + +// RelatedResource A resolved related resource definition returned in the FullComponent response. The backend merges related resources from all matching presentations, resolves template variables in the stql field, and derives the name from the referenced presentation's PresentationName. Array order in the response determines display order. +type RelatedResource struct { + // Identity key for this related resource. + ResourceId string `json:"resourceId" yaml:"resourceId"` + // Section heading displayed in the UI. + Title string `json:"title" yaml:"title"` + // Resolved STQL query with template variables substituted. + Stql string `json:"stql" yaml:"stql"` + // ComponentPresentation identifier whose overview spec is used for rendering. + PresentationIdentifier string `json:"presentationIdentifier" yaml:"presentationIdentifier"` +} + +// NewRelatedResource instantiates a new RelatedResource 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 NewRelatedResource(resourceId string, title string, stql string, presentationIdentifier string) *RelatedResource { + this := RelatedResource{} + this.ResourceId = resourceId + this.Title = title + this.Stql = stql + this.PresentationIdentifier = presentationIdentifier + return &this +} + +// NewRelatedResourceWithDefaults instantiates a new RelatedResource 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 NewRelatedResourceWithDefaults() *RelatedResource { + this := RelatedResource{} + return &this +} + +// GetResourceId returns the ResourceId field value +func (o *RelatedResource) GetResourceId() string { + if o == nil { + var ret string + return ret + } + + return o.ResourceId +} + +// GetResourceIdOk returns a tuple with the ResourceId field value +// and a boolean to check if the value has been set. +func (o *RelatedResource) GetResourceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ResourceId, true +} + +// SetResourceId sets field value +func (o *RelatedResource) SetResourceId(v string) { + o.ResourceId = v +} + +// GetTitle returns the Title field value +func (o *RelatedResource) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +func (o *RelatedResource) GetTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *RelatedResource) SetTitle(v string) { + o.Title = v +} + +// GetStql returns the Stql field value +func (o *RelatedResource) GetStql() string { + if o == nil { + var ret string + return ret + } + + return o.Stql +} + +// GetStqlOk returns a tuple with the Stql field value +// and a boolean to check if the value has been set. +func (o *RelatedResource) GetStqlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Stql, true +} + +// SetStql sets field value +func (o *RelatedResource) SetStql(v string) { + o.Stql = v +} + +// GetPresentationIdentifier returns the PresentationIdentifier field value +func (o *RelatedResource) GetPresentationIdentifier() string { + if o == nil { + var ret string + return ret + } + + return o.PresentationIdentifier +} + +// GetPresentationIdentifierOk returns a tuple with the PresentationIdentifier field value +// and a boolean to check if the value has been set. +func (o *RelatedResource) GetPresentationIdentifierOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PresentationIdentifier, true +} + +// SetPresentationIdentifier sets field value +func (o *RelatedResource) SetPresentationIdentifier(v string) { + o.PresentationIdentifier = v +} + +func (o RelatedResource) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["resourceId"] = o.ResourceId + } + if true { + toSerialize["title"] = o.Title + } + if true { + toSerialize["stql"] = o.Stql + } + if true { + toSerialize["presentationIdentifier"] = o.PresentationIdentifier + } + return json.Marshal(toSerialize) +} + +type NullableRelatedResource struct { + value *RelatedResource + isSet bool +} + +func (v NullableRelatedResource) Get() *RelatedResource { + return v.value +} + +func (v *NullableRelatedResource) Set(val *RelatedResource) { + v.value = val + v.isSet = true +} + +func (v NullableRelatedResource) IsSet() bool { + return v.isSet +} + +func (v *NullableRelatedResource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRelatedResource(val *RelatedResource) *NullableRelatedResource { + return &NullableRelatedResource{value: val, isSet: true} +} + +func (v NullableRelatedResource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRelatedResource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_relation_data.go b/generated/stackstate_api/model_relation_data.go index e93558ba..60bc8995 100644 --- a/generated/stackstate_api/model_relation_data.go +++ b/generated/stackstate_api/model_relation_data.go @@ -19,7 +19,6 @@ import ( type RelationData struct { Tags []string `json:"tags" yaml:"tags"` Health *HealthStateValue `json:"health,omitempty" yaml:"health,omitempty"` - Synced []ExternalRelation `json:"synced" yaml:"synced"` Identifiers []string `json:"identifiers" yaml:"identifiers"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` Id *int64 `json:"id,omitempty" yaml:"id,omitempty"` @@ -32,10 +31,9 @@ type RelationData 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 NewRelationData(tags []string, synced []ExternalRelation, identifiers []string, dependencyDirection DependencyDirection) *RelationData { +func NewRelationData(tags []string, identifiers []string, dependencyDirection DependencyDirection) *RelationData { this := RelationData{} this.Tags = tags - this.Synced = synced this.Identifiers = identifiers this.DependencyDirection = dependencyDirection return &this @@ -105,30 +103,6 @@ func (o *RelationData) SetHealth(v HealthStateValue) { o.Health = &v } -// GetSynced returns the Synced field value -func (o *RelationData) GetSynced() []ExternalRelation { - if o == nil { - var ret []ExternalRelation - return ret - } - - return o.Synced -} - -// GetSyncedOk returns a tuple with the Synced field value -// and a boolean to check if the value has been set. -func (o *RelationData) GetSyncedOk() ([]ExternalRelation, bool) { - if o == nil { - return nil, false - } - return o.Synced, true -} - -// SetSynced sets field value -func (o *RelationData) SetSynced(v []ExternalRelation) { - o.Synced = v -} - // GetIdentifiers returns the Identifiers field value func (o *RelationData) GetIdentifiers() []string { if o == nil { @@ -313,9 +287,6 @@ func (o RelationData) MarshalJSON() ([]byte, error) { if o.Health != nil { toSerialize["health"] = o.Health } - if true { - toSerialize["synced"] = o.Synced - } if true { toSerialize["identifiers"] = o.Identifiers } diff --git a/generated/stackstate_api/model_stack_pack_version_info.go b/generated/stackstate_api/model_stack_pack_version_info.go new file mode 100644 index 00000000..99303c23 --- /dev/null +++ b/generated/stackstate_api/model_stack_pack_version_info.go @@ -0,0 +1,165 @@ +/* +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" +) + +// StackPackVersionInfo struct for StackPackVersionInfo +type StackPackVersionInfo struct { + Version string `json:"version" yaml:"version"` + IsDev bool `json:"isDev" yaml:"isDev"` + IsInUse bool `json:"isInUse" yaml:"isInUse"` +} + +// NewStackPackVersionInfo instantiates a new StackPackVersionInfo 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 NewStackPackVersionInfo(version string, isDev bool, isInUse bool) *StackPackVersionInfo { + this := StackPackVersionInfo{} + this.Version = version + this.IsDev = isDev + this.IsInUse = isInUse + return &this +} + +// NewStackPackVersionInfoWithDefaults instantiates a new StackPackVersionInfo 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 NewStackPackVersionInfoWithDefaults() *StackPackVersionInfo { + this := StackPackVersionInfo{} + return &this +} + +// GetVersion returns the Version field value +func (o *StackPackVersionInfo) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *StackPackVersionInfo) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *StackPackVersionInfo) SetVersion(v string) { + o.Version = v +} + +// GetIsDev returns the IsDev field value +func (o *StackPackVersionInfo) GetIsDev() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsDev +} + +// GetIsDevOk returns a tuple with the IsDev field value +// and a boolean to check if the value has been set. +func (o *StackPackVersionInfo) GetIsDevOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsDev, true +} + +// SetIsDev sets field value +func (o *StackPackVersionInfo) SetIsDev(v bool) { + o.IsDev = v +} + +// GetIsInUse returns the IsInUse field value +func (o *StackPackVersionInfo) GetIsInUse() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsInUse +} + +// GetIsInUseOk returns a tuple with the IsInUse field value +// and a boolean to check if the value has been set. +func (o *StackPackVersionInfo) GetIsInUseOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsInUse, true +} + +// SetIsInUse sets field value +func (o *StackPackVersionInfo) SetIsInUse(v bool) { + o.IsInUse = v +} + +func (o StackPackVersionInfo) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["version"] = o.Version + } + if true { + toSerialize["isDev"] = o.IsDev + } + if true { + toSerialize["isInUse"] = o.IsInUse + } + return json.Marshal(toSerialize) +} + +type NullableStackPackVersionInfo struct { + value *StackPackVersionInfo + isSet bool +} + +func (v NullableStackPackVersionInfo) Get() *StackPackVersionInfo { + return v.value +} + +func (v *NullableStackPackVersionInfo) Set(val *StackPackVersionInfo) { + v.value = val + v.isSet = true +} + +func (v NullableStackPackVersionInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableStackPackVersionInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStackPackVersionInfo(val *StackPackVersionInfo) *NullableStackPackVersionInfo { + return &NullableStackPackVersionInfo{value: val, isSet: true} +} + +func (v NullableStackPackVersionInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStackPackVersionInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/mise.toml b/mise.toml new file mode 100644 index 00000000..2d1e9dd5 --- /dev/null +++ b/mise.toml @@ -0,0 +1,5 @@ +[tools] +go = "1.26.2" +golangci-lint = "2.11.3" +pre-commit = "4.5.1" +yq = "4.52.4" diff --git a/stackstate_openapi/openapi_version b/stackstate_openapi/openapi_version index cfda5e65..71f8eb69 100644 --- a/stackstate_openapi/openapi_version +++ b/stackstate_openapi/openapi_version @@ -1 +1 @@ -0010b2f10e6eb76a3c70ac41db3d9130d10ca180 +d95b238871c5fec489aacb5f6bcbf6fcf75c8207 \ No newline at end of file