From 6278149409c1c600bd20c27c16cbf51f30330162 Mon Sep 17 00:00:00 2001 From: Alejandro Acevedo Date: Wed, 11 Jun 2025 10:13:01 +0200 Subject: [PATCH 1/4] STAC-22844: Drop support for setting up a scope on a subject --- cmd/rbac/flags.go | 14 +- cmd/rbac/rbac_create_subject.go | 6 +- cmd/rbac/rbac_create_subject_test.go | 11 +- cmd/rbac/rbac_delete_subject.go | 1 + cmd/rbac/rbac_describe_subjects.go | 17 +- cmd/rbac/rbac_describe_subjects_test.go | 28 +- .../stackstate_api/.openapi-generator/FILES | 114 +- generated/stackstate_api/README.md | 62 +- generated/stackstate_api/api/openapi.yaml | 2573 ++++++++++++++--- generated/stackstate_api/api_dashboards.go | 1387 +++++++++ .../stackstate_api/api_kubernetes_logs.go | 97 +- .../api_notification_channels.go | 6 +- generated/stackstate_api/api_subject.go | 25 +- generated/stackstate_api/api_timeline.go | 10 + generated/stackstate_api/api_traces.go | 32 +- generated/stackstate_api/client.go | 3 + .../stackstate_api/docs/CreateSubject.md | 72 - .../docs/DashboardAuthorizationError.md | 93 + .../docs/DashboardClientErrors.md | 93 + .../docs/DashboardCloneSchema.md | 129 + .../docs/DashboardInvalidIdentifierError.md | 93 + .../stackstate_api/docs/DashboardList.md | 51 + .../docs/DashboardNotFoundError.md | 72 + .../docs/DashboardPatchSchema.md | 134 + .../docs/DashboardReadBaseSchema.md | 203 ++ .../docs/DashboardReadFullSchema.md | 224 ++ .../docs/DashboardReadFullSchemaAllOf.md | 77 + .../docs/DashboardReadMetadataSchema.md | 203 ++ .../docs/DashboardReadMetadataSchemaAllOf.md | 56 + .../docs/DashboardReadSchema.md | 224 ++ .../stackstate_api/docs/DashboardScope.md | 13 + .../docs/DashboardValidationError.md | 72 + .../docs/DashboardWriteSchema.md | 114 + .../stackstate_api/docs/DashboardsApi.md | 430 +++ .../stackstate_api/docs/KubernetesLogsApi.md | 24 +- .../docs/NotificationChannel.md | 18 +- .../docs/NotificationChannelsApi.md | 8 +- .../docs/OpsgenieChannelWriteSchema.md | 18 +- .../docs/OpsgenieNotificationChannel.md | 18 +- .../stackstate_api/docs/OpsgeniePriority.md | 19 + .../stackstate_api/docs/OpsgenieRegion.md | 13 + .../stackstate_api/docs/OpsgenieResponder.md | 10 +- .../docs/OpsgenieResponderType.md | 17 + .../stackstate_api/docs/PersesDashboard.md | 108 + .../docs/PersesDashboardDisplaySpec.md | 82 + .../docs/PersesDashboardSpec.md | 212 ++ .../docs/PersesDatasourceSpec.md | 108 + .../stackstate_api/docs/PersesGridItem.md | 135 + .../docs/PersesGridLayoutCollapse.md | 51 + .../docs/PersesGridLayoutDisplay.md | 77 + .../stackstate_api/docs/PersesJSONRef.md | 51 + generated/stackstate_api/docs/PersesLayout.md | 72 + .../stackstate_api/docs/PersesLayoutKind.md | 11 + .../stackstate_api/docs/PersesLayoutSpec.md | 77 + generated/stackstate_api/docs/PersesLink.md | 160 + .../stackstate_api/docs/PersesListVariable.md | 77 + .../PersesListVariableDefaultSingleValue.md | 72 + .../PersesListVariableDefaultSliceValues.md | 72 + .../docs/PersesListVariableDefaultValue.md | 93 + .../docs/PersesListVariableSpec.md | 244 ++ generated/stackstate_api/docs/PersesPanel.md | 82 + .../stackstate_api/docs/PersesPanelDisplay.md | 82 + .../stackstate_api/docs/PersesPanelSpec.md | 134 + generated/stackstate_api/docs/PersesPlugin.md | 82 + .../docs/PersesProjectMetadata.md | 160 + generated/stackstate_api/docs/PersesQuery.md | 82 + .../stackstate_api/docs/PersesQuerySpec.md | 56 + .../stackstate_api/docs/PersesTextVariable.md | 77 + .../docs/PersesTextVariableSpec.md | 124 + .../docs/PersesVariableDisplaySpec.md | 108 + .../stackstate_api/docs/PersesVariableSort.md | 23 + .../docs/PersesVariableTypes.md | 77 + generated/stackstate_api/docs/Span.md | 40 +- generated/stackstate_api/docs/SpanResponse.md | 72 + generated/stackstate_api/docs/SubjectApi.md | 8 +- .../stackstate_api/docs/SubjectConfig.md | 26 - .../docs/TimelineSummaryOverflow.md | 51 + generated/stackstate_api/docs/Trace.md | 23 +- generated/stackstate_api/docs/TraceFilter.md | 47 +- .../stackstate_api/docs/TraceIdentifier.md | 72 - generated/stackstate_api/docs/TraceQuery.md | 47 +- .../stackstate_api/docs/TraceQueryMatch.md | 135 + .../docs/TraceQueryMatchAllOf.md | 72 + .../docs/{Traces.md => TraceQueryResponse.md} | 40 +- generated/stackstate_api/docs/TracesApi.md | 16 +- generated/stackstate_api/docs/UserProfile.md | 52 + .../stackstate_api/model_create_subject.go | 136 - .../model_dashboard_authorization_error.go | 166 ++ .../model_dashboard_client_errors.go | 140 + .../model_dashboard_clone_schema.go | 217 ++ ...odel_dashboard_invalid_identifier_error.go | 166 ++ .../stackstate_api/model_dashboard_list.go | 108 + .../model_dashboard_not_found_error.go | 137 + .../model_dashboard_patch_schema.go | 224 ++ .../model_dashboard_read_base_schema.go | 321 ++ .../model_dashboard_read_full_schema.go | 350 +++ ...model_dashboard_read_full_schema_all_of.go | 143 + .../model_dashboard_read_metadata_schema.go | 321 ++ ...l_dashboard_read_metadata_schema_all_of.go | 114 + .../model_dashboard_read_schema.go | 140 + .../stackstate_api/model_dashboard_scope.go | 111 + .../model_dashboard_validation_error.go | 137 + .../model_dashboard_write_schema.go | 196 ++ .../model_opsgenie_channel_write_schema.go | 22 +- .../model_opsgenie_notification_channel.go | 22 +- .../stackstate_api/model_opsgenie_priority.go | 117 + .../stackstate_api/model_opsgenie_region.go | 111 + .../model_opsgenie_responder.go | 14 +- .../model_opsgenie_responder_type.go | 115 + .../stackstate_api/model_perses_dashboard.go | 186 ++ .../model_perses_dashboard_display_spec.go | 150 + .../model_perses_dashboard_spec.go | 333 +++ .../model_perses_datasource_spec.go | 186 ++ .../stackstate_api/model_perses_grid_item.go | 227 ++ .../model_perses_grid_layout_collapse.go | 108 + .../model_perses_grid_layout_display.go | 144 + .../stackstate_api/model_perses_json_ref.go | 108 + .../stackstate_api/model_perses_layout.go | 136 + .../model_perses_layout_kind.go | 109 + .../model_perses_layout_spec.go | 143 + generated/stackstate_api/model_perses_link.go | 258 ++ .../model_perses_list_variable.go | 143 + ...rses_list_variable_default_single_value.go | 136 + ...rses_list_variable_default_slice_values.go | 136 + ...odel_perses_list_variable_default_value.go | 164 ++ .../model_perses_list_variable_spec.go | 374 +++ .../stackstate_api/model_perses_panel.go | 150 + .../model_perses_panel_display.go | 150 + .../stackstate_api/model_perses_panel_spec.go | 222 ++ .../stackstate_api/model_perses_plugin.go | 150 + .../model_perses_project_metadata.go | 259 ++ .../stackstate_api/model_perses_query.go | 150 + .../stackstate_api/model_perses_query_spec.go | 114 + .../model_perses_text_variable.go | 143 + .../model_perses_text_variable_spec.go | 208 ++ .../model_perses_variable_display_spec.go | 186 ++ .../model_perses_variable_sort.go | 121 + .../model_perses_variable_types.go | 164 ++ generated/stackstate_api/model_span.go | 52 +- .../stackstate_api/model_span_response.go | 137 + .../stackstate_api/model_subject_config.go | 38 +- .../model_timeline_summary_overflow.go | 107 + generated/stackstate_api/model_trace.go | 32 +- .../stackstate_api/model_trace_filter.go | 70 +- .../stackstate_api/model_trace_identifier.go | 138 - generated/stackstate_api/model_trace_query.go | 72 +- .../stackstate_api/model_trace_query_match.go | 228 ++ .../model_trace_query_match_all_of.go | 138 + ...races.go => model_trace_query_response.go} | 68 +- .../stackstate_api/model_user_profile.go | 72 + stackstate_openapi/openapi_version | 2 +- 151 files changed, 18762 insertions(+), 1352 deletions(-) create mode 100644 generated/stackstate_api/api_dashboards.go delete mode 100644 generated/stackstate_api/docs/CreateSubject.md create mode 100644 generated/stackstate_api/docs/DashboardAuthorizationError.md create mode 100644 generated/stackstate_api/docs/DashboardClientErrors.md create mode 100644 generated/stackstate_api/docs/DashboardCloneSchema.md create mode 100644 generated/stackstate_api/docs/DashboardInvalidIdentifierError.md create mode 100644 generated/stackstate_api/docs/DashboardList.md create mode 100644 generated/stackstate_api/docs/DashboardNotFoundError.md create mode 100644 generated/stackstate_api/docs/DashboardPatchSchema.md create mode 100644 generated/stackstate_api/docs/DashboardReadBaseSchema.md create mode 100644 generated/stackstate_api/docs/DashboardReadFullSchema.md create mode 100644 generated/stackstate_api/docs/DashboardReadFullSchemaAllOf.md create mode 100644 generated/stackstate_api/docs/DashboardReadMetadataSchema.md create mode 100644 generated/stackstate_api/docs/DashboardReadMetadataSchemaAllOf.md create mode 100644 generated/stackstate_api/docs/DashboardReadSchema.md create mode 100644 generated/stackstate_api/docs/DashboardScope.md create mode 100644 generated/stackstate_api/docs/DashboardValidationError.md create mode 100644 generated/stackstate_api/docs/DashboardWriteSchema.md create mode 100644 generated/stackstate_api/docs/DashboardsApi.md create mode 100644 generated/stackstate_api/docs/OpsgeniePriority.md create mode 100644 generated/stackstate_api/docs/OpsgenieRegion.md create mode 100644 generated/stackstate_api/docs/OpsgenieResponderType.md create mode 100644 generated/stackstate_api/docs/PersesDashboard.md create mode 100644 generated/stackstate_api/docs/PersesDashboardDisplaySpec.md create mode 100644 generated/stackstate_api/docs/PersesDashboardSpec.md create mode 100644 generated/stackstate_api/docs/PersesDatasourceSpec.md create mode 100644 generated/stackstate_api/docs/PersesGridItem.md create mode 100644 generated/stackstate_api/docs/PersesGridLayoutCollapse.md create mode 100644 generated/stackstate_api/docs/PersesGridLayoutDisplay.md create mode 100644 generated/stackstate_api/docs/PersesJSONRef.md create mode 100644 generated/stackstate_api/docs/PersesLayout.md create mode 100644 generated/stackstate_api/docs/PersesLayoutKind.md create mode 100644 generated/stackstate_api/docs/PersesLayoutSpec.md create mode 100644 generated/stackstate_api/docs/PersesLink.md create mode 100644 generated/stackstate_api/docs/PersesListVariable.md create mode 100644 generated/stackstate_api/docs/PersesListVariableDefaultSingleValue.md create mode 100644 generated/stackstate_api/docs/PersesListVariableDefaultSliceValues.md create mode 100644 generated/stackstate_api/docs/PersesListVariableDefaultValue.md create mode 100644 generated/stackstate_api/docs/PersesListVariableSpec.md create mode 100644 generated/stackstate_api/docs/PersesPanel.md create mode 100644 generated/stackstate_api/docs/PersesPanelDisplay.md create mode 100644 generated/stackstate_api/docs/PersesPanelSpec.md create mode 100644 generated/stackstate_api/docs/PersesPlugin.md create mode 100644 generated/stackstate_api/docs/PersesProjectMetadata.md create mode 100644 generated/stackstate_api/docs/PersesQuery.md create mode 100644 generated/stackstate_api/docs/PersesQuerySpec.md create mode 100644 generated/stackstate_api/docs/PersesTextVariable.md create mode 100644 generated/stackstate_api/docs/PersesTextVariableSpec.md create mode 100644 generated/stackstate_api/docs/PersesVariableDisplaySpec.md create mode 100644 generated/stackstate_api/docs/PersesVariableSort.md create mode 100644 generated/stackstate_api/docs/PersesVariableTypes.md create mode 100644 generated/stackstate_api/docs/SpanResponse.md create mode 100644 generated/stackstate_api/docs/TimelineSummaryOverflow.md delete mode 100644 generated/stackstate_api/docs/TraceIdentifier.md create mode 100644 generated/stackstate_api/docs/TraceQueryMatch.md create mode 100644 generated/stackstate_api/docs/TraceQueryMatchAllOf.md rename generated/stackstate_api/docs/{Traces.md => TraceQueryResponse.md} (63%) delete mode 100644 generated/stackstate_api/model_create_subject.go create mode 100644 generated/stackstate_api/model_dashboard_authorization_error.go create mode 100644 generated/stackstate_api/model_dashboard_client_errors.go create mode 100644 generated/stackstate_api/model_dashboard_clone_schema.go create mode 100644 generated/stackstate_api/model_dashboard_invalid_identifier_error.go create mode 100644 generated/stackstate_api/model_dashboard_list.go create mode 100644 generated/stackstate_api/model_dashboard_not_found_error.go create mode 100644 generated/stackstate_api/model_dashboard_patch_schema.go create mode 100644 generated/stackstate_api/model_dashboard_read_base_schema.go create mode 100644 generated/stackstate_api/model_dashboard_read_full_schema.go create mode 100644 generated/stackstate_api/model_dashboard_read_full_schema_all_of.go create mode 100644 generated/stackstate_api/model_dashboard_read_metadata_schema.go create mode 100644 generated/stackstate_api/model_dashboard_read_metadata_schema_all_of.go create mode 100644 generated/stackstate_api/model_dashboard_read_schema.go create mode 100644 generated/stackstate_api/model_dashboard_scope.go create mode 100644 generated/stackstate_api/model_dashboard_validation_error.go create mode 100644 generated/stackstate_api/model_dashboard_write_schema.go create mode 100644 generated/stackstate_api/model_opsgenie_priority.go create mode 100644 generated/stackstate_api/model_opsgenie_region.go create mode 100644 generated/stackstate_api/model_opsgenie_responder_type.go create mode 100644 generated/stackstate_api/model_perses_dashboard.go create mode 100644 generated/stackstate_api/model_perses_dashboard_display_spec.go create mode 100644 generated/stackstate_api/model_perses_dashboard_spec.go create mode 100644 generated/stackstate_api/model_perses_datasource_spec.go create mode 100644 generated/stackstate_api/model_perses_grid_item.go create mode 100644 generated/stackstate_api/model_perses_grid_layout_collapse.go create mode 100644 generated/stackstate_api/model_perses_grid_layout_display.go create mode 100644 generated/stackstate_api/model_perses_json_ref.go create mode 100644 generated/stackstate_api/model_perses_layout.go create mode 100644 generated/stackstate_api/model_perses_layout_kind.go create mode 100644 generated/stackstate_api/model_perses_layout_spec.go create mode 100644 generated/stackstate_api/model_perses_link.go create mode 100644 generated/stackstate_api/model_perses_list_variable.go create mode 100644 generated/stackstate_api/model_perses_list_variable_default_single_value.go create mode 100644 generated/stackstate_api/model_perses_list_variable_default_slice_values.go create mode 100644 generated/stackstate_api/model_perses_list_variable_default_value.go create mode 100644 generated/stackstate_api/model_perses_list_variable_spec.go create mode 100644 generated/stackstate_api/model_perses_panel.go create mode 100644 generated/stackstate_api/model_perses_panel_display.go create mode 100644 generated/stackstate_api/model_perses_panel_spec.go create mode 100644 generated/stackstate_api/model_perses_plugin.go create mode 100644 generated/stackstate_api/model_perses_project_metadata.go create mode 100644 generated/stackstate_api/model_perses_query.go create mode 100644 generated/stackstate_api/model_perses_query_spec.go create mode 100644 generated/stackstate_api/model_perses_text_variable.go create mode 100644 generated/stackstate_api/model_perses_text_variable_spec.go create mode 100644 generated/stackstate_api/model_perses_variable_display_spec.go create mode 100644 generated/stackstate_api/model_perses_variable_sort.go create mode 100644 generated/stackstate_api/model_perses_variable_types.go create mode 100644 generated/stackstate_api/model_span_response.go create mode 100644 generated/stackstate_api/model_timeline_summary_overflow.go delete mode 100644 generated/stackstate_api/model_trace_identifier.go create mode 100644 generated/stackstate_api/model_trace_query_match.go create mode 100644 generated/stackstate_api/model_trace_query_match_all_of.go rename generated/stackstate_api/{model_traces.go => model_trace_query_response.go} (63%) diff --git a/cmd/rbac/flags.go b/cmd/rbac/flags.go index 54a9951d..a3cf2cb8 100644 --- a/cmd/rbac/flags.go +++ b/cmd/rbac/flags.go @@ -4,20 +4,14 @@ const ( Subject = "subject" Permission = "permission" Resource = "resource" - Scope = "scope" SubjectUsage = "The handle of the subject of the permissions. If you're using LDAP, please use the usernameKey configured in StackState" PermissionRevokeUsage = "The permission to revoke" PermissionGrantUsage = "The permission to grant" PermissionDescribeUsage = "Filter the permissions by permission name" - ResourceDescribeUsage = "Filter the permissions by a resource identifier (e.g. system or a view name)" - ResourceGrantUsage = "The resource to grant the permission to (e.g. \"system\" or a view name)" - ResourceRevokeUsage = "The resource to revoke the permission to (e.g. \"system\" or a view name)" - ScopeUsage = "The query in STQL that will be prepended to every topology element retrieved in StackState. " + - "For example, if your scope is \"label = 'A'\", then all STQL executed in StackState" + - " (e.g. Retrieving topology) will only return elements that have the label A" + ResourceDescribeUsage = "Filter the permissions by a resource identifier (e.g. system, a resource name or tag)" + ResourceGrantUsage = "The resource to grant the permission to (e.g. \"system\" or a resource name or tag)" + ResourceRevokeUsage = "The resource to revoke the permission to (e.g. \"system\" or a resource name or tag)" - DefaultResource = "system" - DefaultScope = "id = '-1'" - DefaultSTQLVersion = "0.0.1" + DefaultResource = "system" ) diff --git a/cmd/rbac/rbac_create_subject.go b/cmd/rbac/rbac_create_subject.go index b1b5f1a0..1b4e653a 100644 --- a/cmd/rbac/rbac_create_subject.go +++ b/cmd/rbac/rbac_create_subject.go @@ -1,3 +1,4 @@ +//nolint:dupl package rbac import ( @@ -9,7 +10,6 @@ import ( type CreateSubjectArgs struct { Subject string - Scope string } func CreateSubjectCommand(deps *di.Deps) *cobra.Command { @@ -24,8 +24,6 @@ func CreateSubjectCommand(deps *di.Deps) *cobra.Command { cmd.Flags().StringVar(&args.Subject, Subject, "", SubjectUsage) cmd.MarkFlagRequired(Subject) //nolint:errcheck - cmd.Flags().StringVar(&args.Scope, Scope, DefaultScope, ScopeUsage) - return cmd } @@ -36,9 +34,7 @@ func RunCreateSubjectCommand(args *CreateSubjectArgs) di.CmdWithApiFn { api *stackstate_api.APIClient, serverInfo *stackstate_api.ServerInfo, ) common.CLIError { - subject := stackstate_api.NewCreateSubject(args.Scope, DefaultSTQLVersion) resp, err := api.SubjectApi.CreateSubject(cli.Context, args.Subject). - CreateSubject(*subject). Execute() if err != nil { diff --git a/cmd/rbac/rbac_create_subject_test.go b/cmd/rbac/rbac_create_subject_test.go index d1a1246b..f2008dab 100644 --- a/cmd/rbac/rbac_create_subject_test.go +++ b/cmd/rbac/rbac_create_subject_test.go @@ -4,7 +4,6 @@ import ( "fmt" "testing" - "github.com/stackvista/stackstate-cli/generated/stackstate_api" "github.com/stackvista/stackstate-cli/internal/di" "github.com/stretchr/testify/assert" ) @@ -24,10 +23,6 @@ func TestCreateSubjectJson(t *testing.T) { assert.Len(t, calls, 1) assert.Equal(t, SomeSubject, calls[0].Psubject) - expectedSubject := stackstate_api.NewCreateSubject(DefaultScope, DefaultSTQLVersion) - - assert.Equal(t, expectedSubject, calls[0].PcreateSubject) - expectedJson := []map[string]interface{}{ { "created-subject": SomeSubject, @@ -41,16 +36,12 @@ func TestCreateSubject(t *testing.T) { cli := di.NewMockDeps(t) cmd := CreateSubjectCommand(&cli.Deps) - di.ExecuteCommandWithContextUnsafe(&cli.Deps, cmd, "--subject", SomeOtherSubject, "--scope", SomeScope) + di.ExecuteCommandWithContextUnsafe(&cli.Deps, cmd, "--subject", SomeOtherSubject) calls := *cli.MockClient.ApiMocks.SubjectApi.CreateSubjectCalls assert.Len(t, calls, 1) assert.Equal(t, SomeOtherSubject, calls[0].Psubject) - otherExpectedSubject := stackstate_api.NewCreateSubject(SomeScope, DefaultSTQLVersion) - - assert.Equal(t, otherExpectedSubject, calls[0].PcreateSubject) - expectedStrings := []string{ fmt.Sprintf("Created subject '%s'", SomeOtherSubject), } diff --git a/cmd/rbac/rbac_delete_subject.go b/cmd/rbac/rbac_delete_subject.go index 289a81bf..203f3211 100644 --- a/cmd/rbac/rbac_delete_subject.go +++ b/cmd/rbac/rbac_delete_subject.go @@ -1,3 +1,4 @@ +//nolint:dupl package rbac import ( diff --git a/cmd/rbac/rbac_describe_subjects.go b/cmd/rbac/rbac_describe_subjects.go index cafd868f..7a9b6586 100644 --- a/cmd/rbac/rbac_describe_subjects.go +++ b/cmd/rbac/rbac_describe_subjects.go @@ -42,16 +42,14 @@ func RunDescribeSubjectsCommand(args *DescribeSubjectsArgs) di.CmdWithApiFn { if cli.IsJson() { cli.Printer.PrintJson(map[string]interface{}{ - "handle": subject.Handle, - "scopeQuery": safeDeref(subject.ScopeQuery), + "handle": subject.Handle, }) } else { cli.Printer.Table(printer.TableData{ - Header: []string{"Subject", "Scope Query"}, + Header: []string{"Subject"}, Data: [][]interface{}{ { subject.Handle, - safeDeref(subject.ScopeQuery), }, }, MissingTableDataMsg: printer.NotFoundMsg{Types: "matching subjects"}, @@ -72,11 +70,11 @@ func RunDescribeSubjectsCommand(args *DescribeSubjectsArgs) di.CmdWithApiFn { data := make([][]interface{}, 0) for _, subject := range subjects { - data = append(data, []interface{}{subject.Handle, safeDeref(subject.ScopeQuery)}) + data = append(data, []interface{}{subject.Handle}) } cli.Printer.Table(printer.TableData{ - Header: []string{"Subject", "Scope Query"}, + Header: []string{"Subject"}, Data: data, MissingTableDataMsg: printer.NotFoundMsg{Types: "subjects"}, }) @@ -85,10 +83,3 @@ func RunDescribeSubjectsCommand(args *DescribeSubjectsArgs) di.CmdWithApiFn { return nil } } - -func safeDeref(text *string) string { - if text == nil { - return "" - } - return *text -} diff --git a/cmd/rbac/rbac_describe_subjects_test.go b/cmd/rbac/rbac_describe_subjects_test.go index 01c85095..b57402ba 100644 --- a/cmd/rbac/rbac_describe_subjects_test.go +++ b/cmd/rbac/rbac_describe_subjects_test.go @@ -12,21 +12,17 @@ import ( var ( SomeScopeVar = SomeScope SubjectConfig1 = stackstate_api.SubjectConfig{ - Handle: SomeSubject, - ScopeQuery: &SomeScopeVar, + Handle: SomeSubject, } SomeOtherSubject = "handle" - SomeOtherScope = "meaningOfLife = 23" SubjectConfig2 = stackstate_api.SubjectConfig{ - Handle: SomeOtherSubject, - ScopeQuery: &SomeOtherScope, + Handle: SomeOtherSubject, } SubjectConfig3 = stackstate_api.SubjectConfig{ - Handle: SubjectHandle, - ScopeQuery: nil, + Handle: SubjectHandle, } ) @@ -47,11 +43,11 @@ func TestDescribeSubjectsTable(t *testing.T) { expected := []printer.TableData{ { - Header: []string{"Subject", "Scope Query"}, + Header: []string{"Subject"}, Data: [][]interface{}{ - {SubjectConfig1.Handle, *SubjectConfig1.ScopeQuery}, - {SubjectConfig2.Handle, *SubjectConfig2.ScopeQuery}, - {SubjectConfig3.Handle, ""}, + {SubjectConfig1.Handle}, + {SubjectConfig2.Handle}, + {SubjectConfig3.Handle}, }, MissingTableDataMsg: printer.NotFoundMsg{Types: "subjects"}, }, @@ -100,9 +96,9 @@ func TestDescribeSubjectsTableWithFilter(t *testing.T) { expected := []printer.TableData{ { - Header: []string{"Subject", "Scope Query"}, + Header: []string{"Subject"}, Data: [][]interface{}{ - {SubjectConfig1.Handle, *SubjectConfig1.ScopeQuery}, + {SubjectConfig1.Handle}, }, MissingTableDataMsg: printer.NotFoundMsg{Types: "matching subjects"}, }, @@ -130,12 +126,10 @@ func TestDescribeSubjectsJsonWithFilter(t *testing.T) { expectedJson := []map[string]interface{}{ { - "handle": SubjectConfig1.Handle, - "scopeQuery": *SubjectConfig1.ScopeQuery, + "handle": SubjectConfig1.Handle, }, { - "handle": SubjectConfig3.Handle, - "scopeQuery": "", + "handle": SubjectConfig3.Handle, }, } diff --git a/generated/stackstate_api/.openapi-generator/FILES b/generated/stackstate_api/.openapi-generator/FILES index 3be95924..98d6c203 100644 --- a/generated/stackstate_api/.openapi-generator/FILES +++ b/generated/stackstate_api/.openapi-generator/FILES @@ -8,6 +8,7 @@ api_agent_registrations.go api_api_token.go api_authorize_ingestion_api_key.go api_component.go +api_dashboards.go api_dummy.go api_event.go api_export.go @@ -84,7 +85,23 @@ docs/ComponentHighlightMetricSectionAllOf.md docs/ComponentNotFoundError.md docs/ComponentQuery.md docs/ComponentViewArguments.md -docs/CreateSubject.md +docs/DashboardAuthorizationError.md +docs/DashboardClientErrors.md +docs/DashboardCloneSchema.md +docs/DashboardInvalidIdentifierError.md +docs/DashboardList.md +docs/DashboardNotFoundError.md +docs/DashboardPatchSchema.md +docs/DashboardReadBaseSchema.md +docs/DashboardReadFullSchema.md +docs/DashboardReadFullSchemaAllOf.md +docs/DashboardReadMetadataSchema.md +docs/DashboardReadMetadataSchemaAllOf.md +docs/DashboardReadSchema.md +docs/DashboardScope.md +docs/DashboardValidationError.md +docs/DashboardWriteSchema.md +docs/DashboardsApi.md docs/DataUnavailable.md docs/DependencyDirection.md docs/DummyApi.md @@ -278,10 +295,42 @@ docs/OpsgenieChannelRefId.md docs/OpsgenieChannelWriteSchema.md docs/OpsgenieNotificationChannel.md docs/OpsgenieNotificationChannelAllOf.md +docs/OpsgeniePriority.md +docs/OpsgenieRegion.md docs/OpsgenieResponder.md +docs/OpsgenieResponderType.md docs/PermissionDescription.md docs/Permissions.md docs/PermissionsApi.md +docs/PersesDashboard.md +docs/PersesDashboardDisplaySpec.md +docs/PersesDashboardSpec.md +docs/PersesDatasourceSpec.md +docs/PersesGridItem.md +docs/PersesGridLayoutCollapse.md +docs/PersesGridLayoutDisplay.md +docs/PersesJSONRef.md +docs/PersesLayout.md +docs/PersesLayoutKind.md +docs/PersesLayoutSpec.md +docs/PersesLink.md +docs/PersesListVariable.md +docs/PersesListVariableDefaultSingleValue.md +docs/PersesListVariableDefaultSliceValues.md +docs/PersesListVariableDefaultValue.md +docs/PersesListVariableSpec.md +docs/PersesPanel.md +docs/PersesPanelDisplay.md +docs/PersesPanelSpec.md +docs/PersesPlugin.md +docs/PersesProjectMetadata.md +docs/PersesQuery.md +docs/PersesQuerySpec.md +docs/PersesTextVariable.md +docs/PersesTextVariableSpec.md +docs/PersesVariableDisplaySpec.md +docs/PersesVariableSort.md +docs/PersesVariableTypes.md docs/ProblemApi.md docs/ProblemNotFound.md docs/PromData.md @@ -332,6 +381,7 @@ docs/SpanFilter.md docs/SpanKind.md docs/SpanLink.md docs/SpanParentType.md +docs/SpanResponse.md docs/SpanSortDirection.md docs/SpanSortField.md docs/SpanSortOption.md @@ -369,6 +419,7 @@ docs/TimelineSummary.md docs/TimelineSummaryError.md docs/TimelineSummaryEventBucket.md docs/TimelineSummaryHealthChange.md +docs/TimelineSummaryOverflow.md docs/TimelineSummaryRequest.md docs/TimelineSummaryRequestArguments.md docs/TooManyActiveQueries.md @@ -397,9 +448,10 @@ docs/TraceApiSpanNotFound.md docs/TraceApiSpansBadRequest.md docs/TraceApiTraceNotFound.md docs/TraceFilter.md -docs/TraceIdentifier.md docs/TraceQuery.md -docs/Traces.md +docs/TraceQueryMatch.md +docs/TraceQueryMatchAllOf.md +docs/TraceQueryResponse.md docs/TracesApi.md docs/UnlicensedSubscription.md docs/UnmatchedCheckState.md @@ -458,7 +510,22 @@ model_component_highlight_metric_section_all_of.go model_component_not_found_error.go model_component_query.go model_component_view_arguments.go -model_create_subject.go +model_dashboard_authorization_error.go +model_dashboard_client_errors.go +model_dashboard_clone_schema.go +model_dashboard_invalid_identifier_error.go +model_dashboard_list.go +model_dashboard_not_found_error.go +model_dashboard_patch_schema.go +model_dashboard_read_base_schema.go +model_dashboard_read_full_schema.go +model_dashboard_read_full_schema_all_of.go +model_dashboard_read_metadata_schema.go +model_dashboard_read_metadata_schema_all_of.go +model_dashboard_read_schema.go +model_dashboard_scope.go +model_dashboard_validation_error.go +model_dashboard_write_schema.go model_data_unavailable.go model_dependency_direction.go model_duration_histogram.go @@ -638,9 +705,41 @@ model_opsgenie_channel_ref_id.go model_opsgenie_channel_write_schema.go model_opsgenie_notification_channel.go model_opsgenie_notification_channel_all_of.go +model_opsgenie_priority.go +model_opsgenie_region.go model_opsgenie_responder.go +model_opsgenie_responder_type.go model_permission_description.go model_permissions.go +model_perses_dashboard.go +model_perses_dashboard_display_spec.go +model_perses_dashboard_spec.go +model_perses_datasource_spec.go +model_perses_grid_item.go +model_perses_grid_layout_collapse.go +model_perses_grid_layout_display.go +model_perses_json_ref.go +model_perses_layout.go +model_perses_layout_kind.go +model_perses_layout_spec.go +model_perses_link.go +model_perses_list_variable.go +model_perses_list_variable_default_single_value.go +model_perses_list_variable_default_slice_values.go +model_perses_list_variable_default_value.go +model_perses_list_variable_spec.go +model_perses_panel.go +model_perses_panel_display.go +model_perses_panel_spec.go +model_perses_plugin.go +model_perses_project_metadata.go +model_perses_query.go +model_perses_query_spec.go +model_perses_text_variable.go +model_perses_text_variable_spec.go +model_perses_variable_display_spec.go +model_perses_variable_sort.go +model_perses_variable_types.go model_problem_not_found.go model_prom_data.go model_prom_data_result.go @@ -687,6 +786,7 @@ model_span_filter.go model_span_kind.go model_span_link.go model_span_parent_type.go +model_span_response.go model_span_sort_direction.go model_span_sort_field.go model_span_sort_option.go @@ -719,6 +819,7 @@ model_timeline_summary.go model_timeline_summary_error.go model_timeline_summary_event_bucket.go model_timeline_summary_health_change.go +model_timeline_summary_overflow.go model_timeline_summary_request.go model_timeline_summary_request_arguments.go model_too_many_active_queries.go @@ -745,9 +846,10 @@ model_trace_api_span_not_found.go model_trace_api_spans_bad_request.go model_trace_api_trace_not_found.go model_trace_filter.go -model_trace_identifier.go model_trace_query.go -model_traces.go +model_trace_query_match.go +model_trace_query_match_all_of.go +model_trace_query_response.go model_unlicensed_subscription.go model_unmatched_check_state.go model_user_name_mismatch_error.go diff --git a/generated/stackstate_api/README.md b/generated/stackstate_api/README.md index a5ad91d5..a4171cb0 100644 --- a/generated/stackstate_api/README.md +++ b/generated/stackstate_api/README.md @@ -92,6 +92,12 @@ Class | Method | HTTP request | Description *ApiTokenApi* | [**GetCurrentUserApiTokens**](docs/ApiTokenApi.md#getcurrentuserapitokens) | **Get** /user/profile/tokens | Get current user's API tokens *AuthorizeIngestionApiKeyApi* | [**AuthorizeIngestionApiKey**](docs/AuthorizeIngestionApiKeyApi.md#authorizeingestionapikey) | **Post** /security/ingestion/authorize | Check authorization for an Ingestion Api Key *ComponentApi* | [**GetComponentHealthHistory**](docs/ComponentApi.md#getcomponenthealthhistory) | **Get** /components/{componentIdOrUrn}/healthHistory | Get a component health history +*DashboardsApi* | [**CloneDashboard**](docs/DashboardsApi.md#clonedashboard) | **Post** /dashboards/{dashboardIdOrUrn}/clone | Clone a dashboard +*DashboardsApi* | [**CreateDashboard**](docs/DashboardsApi.md#createdashboard) | **Post** /dashboards | Create a new dashboard +*DashboardsApi* | [**DeleteDashboard**](docs/DashboardsApi.md#deletedashboard) | **Delete** /dashboards/{dashboardIdOrUrn} | Delete a dashboard +*DashboardsApi* | [**GetDashboard**](docs/DashboardsApi.md#getdashboard) | **Get** /dashboards/{dashboardIdOrUrn} | Get a single dashboard +*DashboardsApi* | [**GetDashboards**](docs/DashboardsApi.md#getdashboards) | **Get** /dashboards | Get a list of dashboards +*DashboardsApi* | [**PatchDashboard**](docs/DashboardsApi.md#patchdashboard) | **Patch** /dashboards/{dashboardIdOrUrn} | Patch a dashboard *DummyApi* | [**Dummy**](docs/DummyApi.md#dummy) | **Get** /dummy/dummy | Dummy path to fix omission in openapi generation when a type is not included. *EventApi* | [**GetEvent**](docs/EventApi.md#getevent) | **Get** /events/{eventId} | Get single event *EventApi* | [**GetEventSources**](docs/EventApi.md#geteventsources) | **Get** /eventSources | Get event sources @@ -275,7 +281,22 @@ Class | Method | HTTP request | Description - [ComponentNotFoundError](docs/ComponentNotFoundError.md) - [ComponentQuery](docs/ComponentQuery.md) - [ComponentViewArguments](docs/ComponentViewArguments.md) - - [CreateSubject](docs/CreateSubject.md) + - [DashboardAuthorizationError](docs/DashboardAuthorizationError.md) + - [DashboardClientErrors](docs/DashboardClientErrors.md) + - [DashboardCloneSchema](docs/DashboardCloneSchema.md) + - [DashboardInvalidIdentifierError](docs/DashboardInvalidIdentifierError.md) + - [DashboardList](docs/DashboardList.md) + - [DashboardNotFoundError](docs/DashboardNotFoundError.md) + - [DashboardPatchSchema](docs/DashboardPatchSchema.md) + - [DashboardReadBaseSchema](docs/DashboardReadBaseSchema.md) + - [DashboardReadFullSchema](docs/DashboardReadFullSchema.md) + - [DashboardReadFullSchemaAllOf](docs/DashboardReadFullSchemaAllOf.md) + - [DashboardReadMetadataSchema](docs/DashboardReadMetadataSchema.md) + - [DashboardReadMetadataSchemaAllOf](docs/DashboardReadMetadataSchemaAllOf.md) + - [DashboardReadSchema](docs/DashboardReadSchema.md) + - [DashboardScope](docs/DashboardScope.md) + - [DashboardValidationError](docs/DashboardValidationError.md) + - [DashboardWriteSchema](docs/DashboardWriteSchema.md) - [DataUnavailable](docs/DataUnavailable.md) - [DependencyDirection](docs/DependencyDirection.md) - [DurationHistogram](docs/DurationHistogram.md) @@ -455,9 +476,41 @@ Class | Method | HTTP request | Description - [OpsgenieChannelWriteSchema](docs/OpsgenieChannelWriteSchema.md) - [OpsgenieNotificationChannel](docs/OpsgenieNotificationChannel.md) - [OpsgenieNotificationChannelAllOf](docs/OpsgenieNotificationChannelAllOf.md) + - [OpsgeniePriority](docs/OpsgeniePriority.md) + - [OpsgenieRegion](docs/OpsgenieRegion.md) - [OpsgenieResponder](docs/OpsgenieResponder.md) + - [OpsgenieResponderType](docs/OpsgenieResponderType.md) - [PermissionDescription](docs/PermissionDescription.md) - [Permissions](docs/Permissions.md) + - [PersesDashboard](docs/PersesDashboard.md) + - [PersesDashboardDisplaySpec](docs/PersesDashboardDisplaySpec.md) + - [PersesDashboardSpec](docs/PersesDashboardSpec.md) + - [PersesDatasourceSpec](docs/PersesDatasourceSpec.md) + - [PersesGridItem](docs/PersesGridItem.md) + - [PersesGridLayoutCollapse](docs/PersesGridLayoutCollapse.md) + - [PersesGridLayoutDisplay](docs/PersesGridLayoutDisplay.md) + - [PersesJSONRef](docs/PersesJSONRef.md) + - [PersesLayout](docs/PersesLayout.md) + - [PersesLayoutKind](docs/PersesLayoutKind.md) + - [PersesLayoutSpec](docs/PersesLayoutSpec.md) + - [PersesLink](docs/PersesLink.md) + - [PersesListVariable](docs/PersesListVariable.md) + - [PersesListVariableDefaultSingleValue](docs/PersesListVariableDefaultSingleValue.md) + - [PersesListVariableDefaultSliceValues](docs/PersesListVariableDefaultSliceValues.md) + - [PersesListVariableDefaultValue](docs/PersesListVariableDefaultValue.md) + - [PersesListVariableSpec](docs/PersesListVariableSpec.md) + - [PersesPanel](docs/PersesPanel.md) + - [PersesPanelDisplay](docs/PersesPanelDisplay.md) + - [PersesPanelSpec](docs/PersesPanelSpec.md) + - [PersesPlugin](docs/PersesPlugin.md) + - [PersesProjectMetadata](docs/PersesProjectMetadata.md) + - [PersesQuery](docs/PersesQuery.md) + - [PersesQuerySpec](docs/PersesQuerySpec.md) + - [PersesTextVariable](docs/PersesTextVariable.md) + - [PersesTextVariableSpec](docs/PersesTextVariableSpec.md) + - [PersesVariableDisplaySpec](docs/PersesVariableDisplaySpec.md) + - [PersesVariableSort](docs/PersesVariableSort.md) + - [PersesVariableTypes](docs/PersesVariableTypes.md) - [ProblemNotFound](docs/ProblemNotFound.md) - [PromData](docs/PromData.md) - [PromDataResult](docs/PromDataResult.md) @@ -504,6 +557,7 @@ Class | Method | HTTP request | Description - [SpanKind](docs/SpanKind.md) - [SpanLink](docs/SpanLink.md) - [SpanParentType](docs/SpanParentType.md) + - [SpanResponse](docs/SpanResponse.md) - [SpanSortDirection](docs/SpanSortDirection.md) - [SpanSortField](docs/SpanSortField.md) - [SpanSortOption](docs/SpanSortOption.md) @@ -536,6 +590,7 @@ Class | Method | HTTP request | Description - [TimelineSummaryError](docs/TimelineSummaryError.md) - [TimelineSummaryEventBucket](docs/TimelineSummaryEventBucket.md) - [TimelineSummaryHealthChange](docs/TimelineSummaryHealthChange.md) + - [TimelineSummaryOverflow](docs/TimelineSummaryOverflow.md) - [TimelineSummaryRequest](docs/TimelineSummaryRequest.md) - [TimelineSummaryRequestArguments](docs/TimelineSummaryRequestArguments.md) - [TooManyActiveQueries](docs/TooManyActiveQueries.md) @@ -562,9 +617,10 @@ Class | Method | HTTP request | Description - [TraceApiSpansBadRequest](docs/TraceApiSpansBadRequest.md) - [TraceApiTraceNotFound](docs/TraceApiTraceNotFound.md) - [TraceFilter](docs/TraceFilter.md) - - [TraceIdentifier](docs/TraceIdentifier.md) - [TraceQuery](docs/TraceQuery.md) - - [Traces](docs/Traces.md) + - [TraceQueryMatch](docs/TraceQueryMatch.md) + - [TraceQueryMatchAllOf](docs/TraceQueryMatchAllOf.md) + - [TraceQueryResponse](docs/TraceQueryResponse.md) - [UnlicensedSubscription](docs/UnlicensedSubscription.md) - [UnmatchedCheckState](docs/UnmatchedCheckState.md) - [UserNameMismatchError](docs/UserNameMismatchError.md) diff --git a/generated/stackstate_api/api/openapi.yaml b/generated/stackstate_api/api/openapi.yaml index c9fb9de7..44c6fc56 100644 --- a/generated/stackstate_api/api/openapi.yaml +++ b/generated/stackstate_api/api/openapi.yaml @@ -1681,10 +1681,7 @@ paths: name: region required: true schema: - enum: - - EU - - US - type: string + $ref: '#/components/schemas/OpsgenieRegion' responses: "200": content: @@ -3962,12 +3959,6 @@ paths: required: true schema: $ref: '#/components/schemas/Subject' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateSubject' - required: true responses: "200": description: Subject created @@ -5019,6 +5010,12 @@ paths: schema: format: uuid type: string + - description: Cluster name which identifies the scope of the RBAC data + in: query + name: cluster + required: true + schema: + type: string - description: Find only logs for the given container names. in: query name: containerNames @@ -5039,6 +5036,13 @@ paths: items: $ref: '#/components/schemas/LogSeverity' type: array + - description: A timestamp at which the pod existed. If not given the pod is + queried at current time. + in: query + name: topologyTime + schema: + format: instant + type: integer responses: "200": content: @@ -5092,6 +5096,12 @@ paths: schema: format: uuid type: string + - description: Cluster name which identifies the scope of the RBAC data + in: query + name: cluster + required: true + schema: + type: string - description: Find only logs for the given container names. in: query name: containerNames @@ -5114,6 +5124,13 @@ paths: items: $ref: '#/components/schemas/LogSeverity' type: array + - description: A timestamp at which the pod existed. If not given the pod is + queried at current time. + in: query + name: topologyTime + schema: + format: instant + type: integer responses: "200": content: @@ -5160,6 +5177,19 @@ paths: schema: format: uuid type: string + - description: Cluster name which identifies the scope of the RBAC data + in: query + name: cluster + required: true + schema: + type: string + - description: A timestamp at which the pod existed. If not given the pod is + queried at current time. + in: query + name: topologyTime + schema: + format: instant + type: integer responses: "200": content: @@ -5232,7 +5262,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Traces' + $ref: '#/components/schemas/TraceQueryResponse' description: Traces "400": content: @@ -5355,7 +5385,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Span' + $ref: '#/components/schemas/SpanResponse' description: Span "404": content: @@ -5678,6 +5708,12 @@ paths: $ref: '#/components/schemas/TimelineSummary' description: Event summary and aggregated health changes over a range of time + "413": + content: + application/json: + schema: + $ref: '#/components/schemas/TimelineSummaryOverflow' + description: Limit was reached during timeline processing "500": content: application/json: @@ -5687,6 +5723,247 @@ paths: summary: Timeline summary tags: - timeline + /dashboards: + get: + description: "Get a list of dashboards, optionally filtered by name." + operationId: getDashboards + parameters: + - description: "If true, includes the full dashboard content in the response.\ + \ Defaults to false (only metadata is returned) for retrieval endpoints.\ + \ Defaults to true for create/update operations." + in: query + name: loadFullDashboard + required: false + schema: + default: false + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardList' + description: List of dashboards + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericErrorsResponse' + description: Error when handling the request on the server side. + summary: Get a list of dashboards + tags: + - dashboards + post: + description: Create a new dashboard. The dashboard can be private or public + based on the scope parameter. + operationId: createDashboard + requestBody: + $ref: '#/components/requestBodies/dashboardWriteRequest' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardReadFullSchema' + description: A single fully loaded dashboard response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardClientErrors' + description: Dashboard client errors. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericErrorsResponse' + description: Error when handling the request on the server side. + summary: Create a new dashboard + tags: + - dashboards + /dashboards/{dashboardIdOrUrn}: + delete: + description: Delete a dashboard by its identifier. Only user-owned dashboards + can be deleted. + operationId: deleteDashboard + parameters: + - description: The identifier of a dashboard + in: path + name: dashboardIdOrUrn + required: true + schema: + $ref: '#/components/schemas/DashboardIdOrUrn' + responses: + "204": + description: "Dashboard deleted (return ok, but no content)." + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardClientErrors' + description: Dashboard client errors. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardAuthorizationError' + description: Dashboard not found. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardNotFoundError' + description: Dashboard not found. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericErrorsResponse' + description: Error when handling the request on the server side. + summary: Delete a dashboard + tags: + - dashboards + get: + description: Get a dashboard by its identifier. + operationId: getDashboard + parameters: + - description: The identifier of a dashboard + in: path + name: dashboardIdOrUrn + required: true + schema: + $ref: '#/components/schemas/DashboardIdOrUrn' + - description: "If true, includes the full dashboard content in the response.\ + \ Defaults to false (only metadata is returned) for retrieval endpoints.\ + \ Defaults to true for create/update operations." + in: query + name: loadFullDashboard + required: false + schema: + default: false + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardReadSchema' + description: A single dashboard + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardClientErrors' + description: Dashboard client errors. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardNotFoundError' + description: Dashboard not found. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericErrorsResponse' + description: Error when handling the request on the server side. + summary: Get a single dashboard + tags: + - dashboards + patch: + description: Patch an existing dashboard by its identifier. Only user-owned + dashboard can be patched. + operationId: patchDashboard + parameters: + - description: The identifier of a dashboard + in: path + name: dashboardIdOrUrn + required: true + schema: + $ref: '#/components/schemas/DashboardIdOrUrn' + requestBody: + $ref: '#/components/requestBodies/dashboardPatchRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardReadFullSchema' + description: A single fully loaded dashboard response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardClientErrors' + description: Dashboard client errors. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardAuthorizationError' + description: Dashboard not found. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardNotFoundError' + description: Dashboard not found. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericErrorsResponse' + description: Error when handling the request on the server side. + summary: Patch a dashboard + tags: + - dashboards + /dashboards/{dashboardIdOrUrn}/clone: + post: + description: Clone a dashboard by its identifier. + operationId: cloneDashboard + parameters: + - description: The identifier of a dashboard + in: path + name: dashboardIdOrUrn + required: true + schema: + $ref: '#/components/schemas/DashboardIdOrUrn' + requestBody: + $ref: '#/components/requestBodies/dashboardCloneRequest' + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardReadFullSchema' + description: A single fully loaded dashboard response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardClientErrors' + description: Dashboard client errors. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardAuthorizationError' + description: Dashboard not found. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardNotFoundError' + description: Dashboard not found. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericErrorsResponse' + description: Error when handling the request on the server side. + summary: Clone a dashboard + tags: + - dashboards /dummy/dummy: get: description: "" @@ -5828,6 +6105,24 @@ components: $ref: '#/components/schemas/TimelineSummaryRequest' description: Request for event summary and aggregated health over time required: true + dashboardWriteRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardWriteSchema' + required: true + dashboardPatchRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardPatchSchema' + required: true + dashboardCloneRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardCloneSchema' + required: true responses: genericErrorsResponse: content: @@ -6308,11 +6603,11 @@ components: $ref: '#/components/schemas/GetKubernetesLogsAutocompleteBadRequest' description: Can not get the logs autocomplete values because one or more request params are invalid. - traces: + traceQueryResponse: content: application/json: schema: - $ref: '#/components/schemas/Traces' + $ref: '#/components/schemas/TraceQueryResponse' description: Traces traceApiSpansBadRequest: content: @@ -6348,7 +6643,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/Span' + $ref: '#/components/schemas/SpanResponse' description: Span traceApiSpanNotFound: content: @@ -6399,12 +6694,54 @@ components: schema: $ref: '#/components/schemas/TimelineSummary' description: Event summary and aggregated health changes over a range of time + timelineSummaryOverflowResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/TimelineSummaryOverflow' + description: Limit was reached during timeline processing timelineSummaryErrorResponse: content: application/json: schema: $ref: '#/components/schemas/TimelineSummaryError' description: Errors when computing events and health state + dashboards: + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardList' + description: List of dashboards + dashboardFullSchema: + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardReadFullSchema' + description: A single fully loaded dashboard response + dashboardClientErrors: + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardClientErrors' + description: Dashboard client errors. + dashboard: + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardReadSchema' + description: A single dashboard + dashboardNotFoundError: + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardNotFoundError' + description: Dashboard not found. + dashboardAuthorizationError: + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardAuthorizationError' + description: Dashboard not found. stackElementNotFound: content: application/json: @@ -8446,19 +8783,16 @@ components: OpsgenieChannelWriteSchema: example: genieKey: genieKey - region: EU - priority: P1 + region: null + priority: null responders: - responder: responder - responderType: TEAM + responderType: null - responder: responder - responderType: TEAM + responderType: null properties: region: - enum: - - EU - - US - type: string + $ref: '#/components/schemas/OpsgenieRegion' genieKey: type: string responders: @@ -8466,37 +8800,46 @@ components: $ref: '#/components/schemas/OpsgenieResponder' type: array priority: - enum: - - P1 - - P2 - - P3 - - P4 - - P5 - type: string + $ref: '#/components/schemas/OpsgeniePriority' required: - genieKey - priority - region - responders type: object + OpsgenieRegion: + enum: + - EU + - US + type: string OpsgenieResponder: example: responder: responder - responderType: TEAM + responderType: null properties: responderType: - enum: - - TEAM - - USER - - SCHEDULE - - ESCALATION - type: string + $ref: '#/components/schemas/OpsgenieResponderType' responder: type: string required: - responder - responderType type: object + OpsgenieResponderType: + enum: + - TEAM + - USER + - SCHEDULE + - ESCALATION + type: string + OpsgeniePriority: + enum: + - P1 + - P2 + - P3 + - P4 + - P5 + type: string OpsgenieNotificationChannel: allOf: - $ref: '#/components/schemas/BaseNotificationChannel' @@ -8823,20 +9166,24 @@ components: UserProfile: example: identifier: identifier - lastUpdateTimestamp: 6 - systemNotificationsRead: - - systemNotificationsRead - - systemNotificationsRead + displayName: displayName starredViews: - 1 - 1 - name: name description: description + starredDashboards: + - 5 + - 5 hideUnavailableMonitors: true + hideUnavailableMetrics: true + lastUpdateTimestamp: 6 + systemNotificationsRead: + - systemNotificationsRead + - systemNotificationsRead + name: name id: 0 hideUnavailableConnections: true ownedBy: ownedBy - hideUnavailableMetrics: true properties: id: format: int64 @@ -8848,6 +9195,8 @@ components: type: integer name: type: string + displayName: + type: string description: type: string identifier: @@ -8857,6 +9206,11 @@ components: format: int64 type: integer type: array + starredDashboards: + items: + format: int64 + type: integer + type: array systemNotificationsRead: items: type: string @@ -10541,33 +10895,13 @@ components: type: array SubjectConfig: example: - scopeQuery: scopeQuery handle: handle properties: handle: type: string - scopeQuery: - type: string required: - handle type: object - Query: - type: string - CreateSubject: - example: - query: query - version: version - properties: - query: - type: string - version: - type: string - required: - - query - - version - type: object - Version: - type: string SubscriptionState: discriminator: propertyName: _type @@ -11769,8 +12103,42 @@ components: - to type: object TraceQuery: + description: "Find traces that have a span that matches the primary filter and\ + \ a span that matches the secondary filter. These could be the same, or two\ + \ different spans of the same trace." example: - spanFilter: + sortBy: + - field: null + direction: null + - field: null + direction: null + primarySpanFilter: + traceId: + - 6942f450030e8c5f7411a23c26185aa2 + spanId: + - 1a607e3a97735e71 + durationFromNanos: 500000 + spanKind: + - Client + durationToNanos: 5000000 + scopeName: + - scopeName + - scopeName + attributes: + key: + - attributes + - attributes + spanParentType: + - External + serviceName: orderService + spanName: + - GET /orders + statusCode: + - Error + scopeVersion: + - scopeVersion + - scopeVersion + secondarySpanFilter: traceId: - 6942f450030e8c5f7411a23c26185aa2 spanId: @@ -11796,32 +12164,17 @@ components: scopeVersion: - scopeVersion - scopeVersion - sortBy: - - field: null - direction: null - - field: null - direction: null - traceAttributes: - key: - - traceAttributes - - traceAttributes properties: - spanFilter: + primarySpanFilter: + $ref: '#/components/schemas/SpanFilter' + secondarySpanFilter: $ref: '#/components/schemas/SpanFilter' - traceAttributes: - additionalProperties: - items: - type: string - type: array - description: Filter traces by 1 or more attributes - type: object sortBy: items: $ref: '#/components/schemas/SpanSortOption' type: array required: - - spanFilter - - traceAttributes + - primarySpanFilter type: object SpanFilter: example: @@ -11982,21 +12335,19 @@ components: - Ascending - Descending type: string - Traces: + TraceQueryResponse: example: traces: - - traceId: traceId - spanId: spanId - - traceId: traceId - spanId: spanId + - null + - null pageSize: 0 page: 6 matchesTotal: 1 properties: traces: - description: List of traces + description: List of traces matching the query items: - $ref: '#/components/schemas/TraceIdentifier' + $ref: '#/components/schemas/TraceQueryMatch' type: array pageSize: description: Maximum number of the traces in the result. @@ -12014,13 +12365,188 @@ components: - pageSize - traces type: object - TraceIdentifier: - description: "Identifier for a \"service trace\", the branch of an OTEL trace\ - \ that corresponds to a single service entry span" + TraceQueryMatch: + allOf: + - $ref: '#/components/schemas/Trace' + - $ref: '#/components/schemas/TraceQueryMatch_allOf' + description: "A trace that matched the query filters. It structurally matches\ + \ the Trace schema, with extra fields representing \nthe result of the trace\ + \ query.\n" + Trace: + example: + traceId: traceId + spans: + - traceId: traceId + durationNanos: 1 + resourceId: resourceId + spanKind: null + scopeName: scopeName + spanAttributes: + key: spanAttributes + spanParentType: null + serviceName: serviceName + parentSpanId: parentSpanId + statusMessage: statusMessage + spanName: spanName + scopeVersion: scopeVersion + spanId: spanId + traceState: traceState + startTime: + offsetNanos: 602745 + timestamp: 0 + links: + - traceId: traceId + spanId: spanId + traceState: traceState + attributes: + key: attributes + - traceId: traceId + spanId: spanId + traceState: traceState + attributes: + key: attributes + endTime: + offsetNanos: 602745 + timestamp: 0 + events: + - name: name + attributes: + key: attributes + timestamp: + offsetNanos: 602745 + timestamp: 0 + - name: name + attributes: + key: attributes + timestamp: + offsetNanos: 602745 + timestamp: 0 + statusCode: null + - traceId: traceId + durationNanos: 1 + resourceId: resourceId + spanKind: null + scopeName: scopeName + spanAttributes: + key: spanAttributes + spanParentType: null + serviceName: serviceName + parentSpanId: parentSpanId + statusMessage: statusMessage + spanName: spanName + scopeVersion: scopeVersion + spanId: spanId + traceState: traceState + startTime: + offsetNanos: 602745 + timestamp: 0 + links: + - traceId: traceId + spanId: spanId + traceState: traceState + attributes: + key: attributes + - traceId: traceId + spanId: spanId + traceState: traceState + attributes: + key: attributes + endTime: + offsetNanos: 602745 + timestamp: 0 + events: + - name: name + attributes: + key: attributes + timestamp: + offsetNanos: 602745 + timestamp: 0 + - name: name + attributes: + key: attributes + timestamp: + offsetNanos: 602745 + timestamp: 0 + statusCode: null + resources: + key: null + properties: + traceId: + description: The id of the trace + type: string + spans: + description: All spans for the trace + items: + $ref: '#/components/schemas/Span' + type: array + resources: + additionalProperties: + $ref: '#/components/schemas/Attributes' + description: | + Map of resource identifiers to their corresponding resource attributes (key/value pairs). Keys are UUIDs used in the spans’ `resourceId` fields. + type: object + required: + - resources + - spans + - traceId + type: object + Span: example: traceId: traceId + durationNanos: 1 + resourceId: resourceId + spanKind: null + scopeName: scopeName + spanAttributes: + key: spanAttributes + spanParentType: null + serviceName: serviceName + parentSpanId: parentSpanId + statusMessage: statusMessage + spanName: spanName + scopeVersion: scopeVersion spanId: spanId + traceState: traceState + startTime: + offsetNanos: 602745 + timestamp: 0 + links: + - traceId: traceId + spanId: spanId + traceState: traceState + attributes: + key: attributes + - traceId: traceId + spanId: spanId + traceState: traceState + attributes: + key: attributes + endTime: + offsetNanos: 602745 + timestamp: 0 + events: + - name: name + attributes: + key: attributes + timestamp: + offsetNanos: 602745 + timestamp: 0 + - name: name + attributes: + key: attributes + timestamp: + offsetNanos: 602745 + timestamp: 0 + statusCode: null properties: + startTime: + $ref: '#/components/schemas/InstantNanoPrecision' + endTime: + $ref: '#/components/schemas/InstantNanoPrecision' + durationNanos: + description: Duration of the span in nanoseconds + format: int64 + type: integer traceId: description: "The unique identifier for the trace, all spans of the same\ \ trace share the same trace_id" @@ -12028,35 +12554,160 @@ components: spanId: description: The unique identifier of the span within the trace type: string - required: - - spanId - - traceId - type: object - TraceApiSpansBadRequest: - discriminator: - propertyName: _type - oneOf: - - $ref: '#/components/schemas/TraceApiInvalidTimeRange' - - $ref: '#/components/schemas/TraceApiInvalidPagination' - - $ref: '#/components/schemas/TraceApiInvalidDurationFilter' - required: - - _type - TraceApiInvalidTimeRange: - properties: - _type: - enum: - - TraceApiInvalidTimeRange + parentSpanId: + description: The id of the parent span of this span. Empty if this is the + root span type: string - message: + traceState: + description: Can contain vendor specific trace identification information + https://www.w3.org/TR/trace-context/#tracestate-header type: string - from: - description: Date/time representation in milliseconds since epoch (1970-01-01 - 00:00:00) - format: instant - type: integer - to: - description: Date/time representation in milliseconds since epoch (1970-01-01 - 00:00:00) + spanName: + description: "A description of the span's operation. For example, the name\ + \ can be a qualified method name or a file name and a line number where\ + \ the operation is called" + type: string + serviceName: + description: Logical name of the service for the span + type: string + spanKind: + $ref: '#/components/schemas/SpanKind' + spanParentType: + $ref: '#/components/schemas/SpanParentType' + spanAttributes: + additionalProperties: + type: string + description: Set of key/value pairs providing extra contextual information. + Keys are unique. + type: object + resourceId: + description: "Reference to shared resource attributes, used to deduplicate\ + \ repeated resource data." + type: string + statusCode: + $ref: '#/components/schemas/StatusCode' + statusMessage: + description: Human readable message for the status + type: string + scopeName: + description: The name of the instrumentation scope for the span https://opentelemetry.io/docs/specs/otel/glossary/#instrumentation-scope + type: string + scopeVersion: + description: The version for the instrumentation scope for the span https://opentelemetry.io/docs/specs/otel/glossary/#instrumentation-scope + type: string + events: + description: Time-stamped annotations on the span providing extra application + context + items: + $ref: '#/components/schemas/SpanEvent' + type: array + links: + description: Links to related spans in the same or in other traces + items: + $ref: '#/components/schemas/SpanLink' + type: array + required: + - durationNanos + - endTime + - events + - links + - resourceId + - serviceName + - spanAttributes + - spanId + - spanKind + - spanName + - spanParentType + - startTime + - statusCode + - traceId + type: object + Attributes: + additionalProperties: + type: string + description: Set of key/value pairs providing extra contextual information. + Keys are unique. + type: object + SpanEvent: + description: "Event is a time-stamped annotation of the span, consisting of\ + \ user-supplied text description and key-value pairs." + example: + name: name + attributes: + key: attributes + timestamp: + offsetNanos: 602745 + timestamp: 0 + properties: + timestamp: + $ref: '#/components/schemas/InstantNanoPrecision' + name: + type: string + attributes: + additionalProperties: + type: string + description: Set of key/value pairs providing extra contextual information. + Keys are unique. + type: object + required: + - attributes + - name + - timestamp + type: object + SpanLink: + description: "A pointer from the current span to another span in the same trace\ + \ or in a different trace. \nFor example, this can be used in batching operations,\ + \ where a single batch handler processes \nmultiple requests from different\ + \ traces or when the handler receives a request from a different project.\n" + example: + traceId: traceId + spanId: spanId + traceState: traceState + attributes: + key: attributes + properties: + traceId: + type: string + spanId: + type: string + traceState: + type: string + attributes: + additionalProperties: + type: string + description: Set of key/value pairs providing extra contextual information. + Keys are unique. + type: object + required: + - attributes + - spanId + - traceId + type: object + TraceApiSpansBadRequest: + discriminator: + propertyName: _type + oneOf: + - $ref: '#/components/schemas/TraceApiInvalidTimeRange' + - $ref: '#/components/schemas/TraceApiInvalidPagination' + - $ref: '#/components/schemas/TraceApiInvalidDurationFilter' + required: + - _type + TraceApiInvalidTimeRange: + properties: + _type: + enum: + - TraceApiInvalidTimeRange + type: string + message: + type: string + from: + description: Date/time representation in milliseconds since epoch (1970-01-01 + 00:00:00) + format: instant + type: integer + to: + description: Date/time representation in milliseconds since epoch (1970-01-01 + 00:00:00) format: instant type: integer required: @@ -12108,8 +12759,37 @@ components: - message type: object TraceFilter: + description: "Filter traces that have a span that matches the primary filter\ + \ and a span that matches the secondary filter. These could be the same, or\ + \ two different spans of the same trace." example: - spanFilter: + primarySpanFilter: + traceId: + - 6942f450030e8c5f7411a23c26185aa2 + spanId: + - 1a607e3a97735e71 + durationFromNanos: 500000 + spanKind: + - Client + durationToNanos: 5000000 + scopeName: + - scopeName + - scopeName + attributes: + key: + - attributes + - attributes + spanParentType: + - External + serviceName: orderService + spanName: + - GET /orders + statusCode: + - Error + scopeVersion: + - scopeVersion + - scopeVersion + secondarySpanFilter: traceId: - 6942f450030e8c5f7411a23c26185aa2 spanId: @@ -12135,23 +12815,13 @@ components: scopeVersion: - scopeVersion - scopeVersion - traceAttributes: - key: - - traceAttributes - - traceAttributes properties: - spanFilter: + primarySpanFilter: + $ref: '#/components/schemas/SpanFilter' + secondarySpanFilter: $ref: '#/components/schemas/SpanFilter' - traceAttributes: - additionalProperties: - items: - type: string - type: array - description: Filter traces by 1 or more attributes - type: object required: - - spanFilter - - traceAttributes + - primarySpanFilter type: object DurationHistogram: example: @@ -12211,349 +12881,108 @@ components: description: Upper limit on trace duration format: int64 type: integer - required: - - errorCount - - okCount - - unsetCount - type: object - DurationQuantiles: - example: - q99: 3.616076749251911 - q90: 7.061401241503109 - q95: 9.301444243932576 - q50: 2.3021358869347655 - properties: - q50: - format: double - type: number - q90: - format: double - type: number - q95: - format: double - type: number - q99: - format: double - type: number - required: - - q50 - - q90 - - q95 - - q99 - type: object - Trace: - example: - traceId: traceId - spans: - - traceId: traceId - durationNanos: 1 - spanKind: null - scopeName: scopeName - spanAttributes: - key: spanAttributes - spanParentType: null - serviceName: serviceName - parentSpanId: parentSpanId - resourceAttributes: - key: resourceAttributes - statusMessage: statusMessage - spanName: spanName - scopeVersion: scopeVersion - spanId: spanId - traceState: traceState - startTime: - offsetNanos: 602745 - timestamp: 0 - links: - - traceId: traceId - spanId: spanId - traceState: traceState - attributes: - key: attributes - - traceId: traceId - spanId: spanId - traceState: traceState - attributes: - key: attributes - endTime: - offsetNanos: 602745 - timestamp: 0 - events: - - name: name - attributes: - key: attributes - timestamp: - offsetNanos: 602745 - timestamp: 0 - - name: name - attributes: - key: attributes - timestamp: - offsetNanos: 602745 - timestamp: 0 - statusCode: null - - traceId: traceId - durationNanos: 1 - spanKind: null - scopeName: scopeName - spanAttributes: - key: spanAttributes - spanParentType: null - serviceName: serviceName - parentSpanId: parentSpanId - resourceAttributes: - key: resourceAttributes - statusMessage: statusMessage - spanName: spanName - scopeVersion: scopeVersion - spanId: spanId - traceState: traceState - startTime: - offsetNanos: 602745 - timestamp: 0 - links: - - traceId: traceId - spanId: spanId - traceState: traceState - attributes: - key: attributes - - traceId: traceId - spanId: spanId - traceState: traceState - attributes: - key: attributes - endTime: - offsetNanos: 602745 - timestamp: 0 - events: - - name: name - attributes: - key: attributes - timestamp: - offsetNanos: 602745 - timestamp: 0 - - name: name - attributes: - key: attributes - timestamp: - offsetNanos: 602745 - timestamp: 0 - statusCode: null - properties: - traceId: - description: The id of the trace - type: string - spans: - description: All spans for the trace - items: - $ref: '#/components/schemas/Span' - type: array - required: - - spans - - traceId - type: object - Span: - example: - traceId: traceId - durationNanos: 1 - spanKind: null - scopeName: scopeName - spanAttributes: - key: spanAttributes - spanParentType: null - serviceName: serviceName - parentSpanId: parentSpanId - resourceAttributes: - key: resourceAttributes - statusMessage: statusMessage - spanName: spanName - scopeVersion: scopeVersion - spanId: spanId - traceState: traceState - startTime: - offsetNanos: 602745 - timestamp: 0 - links: - - traceId: traceId - spanId: spanId - traceState: traceState - attributes: - key: attributes - - traceId: traceId - spanId: spanId - traceState: traceState - attributes: - key: attributes - endTime: - offsetNanos: 602745 - timestamp: 0 - events: - - name: name - attributes: - key: attributes - timestamp: - offsetNanos: 602745 - timestamp: 0 - - name: name - attributes: - key: attributes - timestamp: - offsetNanos: 602745 - timestamp: 0 - statusCode: null - properties: - startTime: - $ref: '#/components/schemas/InstantNanoPrecision' - endTime: - $ref: '#/components/schemas/InstantNanoPrecision' - durationNanos: - description: Duration of the span in nanoseconds - format: int64 - type: integer - traceId: - description: "The unique identifier for the trace, all spans of the same\ - \ trace share the same trace_id" - type: string - spanId: - description: The unique identifier of the span within the trace - type: string - parentSpanId: - description: The id of the parent span of this span. Empty if this is the - root span - type: string - traceState: - description: Can contain vendor specific trace identification information - https://www.w3.org/TR/trace-context/#tracestate-header - type: string - spanName: - description: "A description of the span's operation. For example, the name\ - \ can be a qualified method name or a file name and a line number where\ - \ the operation is called" - type: string - serviceName: - description: Logical name of the service for the span - type: string - spanKind: - $ref: '#/components/schemas/SpanKind' - spanParentType: - $ref: '#/components/schemas/SpanParentType' - resourceAttributes: - additionalProperties: - type: string - description: Set of key/value pairs providing extra contextual information. - Keys are unique. - type: object - spanAttributes: - additionalProperties: - type: string - description: Set of key/value pairs providing extra contextual information. - Keys are unique. - type: object - statusCode: - $ref: '#/components/schemas/StatusCode' - statusMessage: - description: Human readable message for the status - type: string - scopeName: - description: The name of the instrumentation scope for the span https://opentelemetry.io/docs/specs/otel/glossary/#instrumentation-scope - type: string - scopeVersion: - description: The version for the instrumentation scope for the span https://opentelemetry.io/docs/specs/otel/glossary/#instrumentation-scope - type: string - events: - description: Time-stamped annotations on the span providing extra application - context - items: - $ref: '#/components/schemas/SpanEvent' - type: array - links: - description: Links to related spans in the same or in other traces - items: - $ref: '#/components/schemas/SpanLink' - type: array - required: - - durationNanos - - endTime - - events - - links - - resourceAttributes - - serviceName - - spanAttributes - - spanId - - spanKind - - spanName - - spanParentType - - startTime - - statusCode - - traceId - type: object - Attributes: - additionalProperties: - type: string - description: Set of key/value pairs providing extra contextual information. - Keys are unique. + required: + - errorCount + - okCount + - unsetCount type: object - SpanEvent: - description: "Event is a time-stamped annotation of the span, consisting of\ - \ user-supplied text description and key-value pairs." + DurationQuantiles: example: - name: name - attributes: - key: attributes - timestamp: - offsetNanos: 602745 - timestamp: 0 + q99: 3.616076749251911 + q90: 7.061401241503109 + q95: 9.301444243932576 + q50: 2.3021358869347655 properties: - timestamp: - $ref: '#/components/schemas/InstantNanoPrecision' - name: - type: string - attributes: - additionalProperties: - type: string - description: Set of key/value pairs providing extra contextual information. - Keys are unique. - type: object + q50: + format: double + type: number + q90: + format: double + type: number + q95: + format: double + type: number + q99: + format: double + type: number required: - - attributes - - name - - timestamp + - q50 + - q90 + - q95 + - q99 type: object - SpanLink: - description: "A pointer from the current span to another span in the same trace\ - \ or in a different trace. \nFor example, this can be used in batching operations,\ - \ where a single batch handler processes \nmultiple requests from different\ - \ traces or when the handler receives a request from a different project.\n" - example: - traceId: traceId - spanId: spanId - traceState: traceState - attributes: - key: attributes + TraceApiTraceNotFound: properties: traceId: type: string - spanId: - type: string - traceState: - type: string - attributes: + required: + - traceId + type: object + SpanResponse: + description: "The result of looking up a span. As an optimization to reduce\ + \ duplication, resource attributes are inlined at the\nroot-level of the schema.\n" + example: + resourceAttributes: + key: resourceAttributes + span: + traceId: traceId + durationNanos: 1 + resourceId: resourceId + spanKind: null + scopeName: scopeName + spanAttributes: + key: spanAttributes + spanParentType: null + serviceName: serviceName + parentSpanId: parentSpanId + statusMessage: statusMessage + spanName: spanName + scopeVersion: scopeVersion + spanId: spanId + traceState: traceState + startTime: + offsetNanos: 602745 + timestamp: 0 + links: + - traceId: traceId + spanId: spanId + traceState: traceState + attributes: + key: attributes + - traceId: traceId + spanId: spanId + traceState: traceState + attributes: + key: attributes + endTime: + offsetNanos: 602745 + timestamp: 0 + events: + - name: name + attributes: + key: attributes + timestamp: + offsetNanos: 602745 + timestamp: 0 + - name: name + attributes: + key: attributes + timestamp: + offsetNanos: 602745 + timestamp: 0 + statusCode: null + properties: + span: + $ref: '#/components/schemas/Span' + resourceAttributes: additionalProperties: type: string description: Set of key/value pairs providing extra contextual information. Keys are unique. type: object required: - - attributes - - spanId - - traceId - type: object - TraceApiTraceNotFound: - properties: - traceId: - type: string - required: - - traceId + - resourceAttributes + - span type: object TraceApiSpanNotFound: properties: @@ -13136,6 +13565,13 @@ components: - newHealth - timestamp type: object + TimelineSummaryOverflow: + properties: + message: + type: string + required: + - message + type: object TimelineSummaryError: properties: message: @@ -13143,6 +13579,498 @@ components: required: - message type: object + DashboardList: + example: + dashboards: + - null + - null + properties: + dashboards: + description: "List of dashboards, which can be either metadata or full representations." + items: + $ref: '#/components/schemas/DashboardReadSchema' + type: array + required: + - dashboards + type: object + DashboardReadSchema: + discriminator: + propertyName: _type + oneOf: + - $ref: '#/components/schemas/DashboardReadMetadataSchema' + - $ref: '#/components/schemas/DashboardReadFullSchema' + DashboardReadMetadataSchema: + allOf: + - $ref: '#/components/schemas/DashboardReadBaseSchema' + - $ref: '#/components/schemas/DashboardReadMetadataSchema_allOf' + DashboardReadBaseSchema: + properties: + _type: + type: string + identifier: + description: The identifier of a dashboard. Either the system/graph ID or + URN of the resource. + pattern: "^urn:.+|[0-9]+$" + type: string + id: + format: int64 + type: integer + name: + description: Name of the dashboard + type: string + description: + description: Description of the dashboard + type: string + scope: + $ref: '#/components/schemas/DashboardScope' + ownerId: + description: "The user id of the dashboard owner. A dashboard was either\ + \ created by a user or from a StackPack. For a user, the identifier will\ + \ be the system/graph ID, and for a StackPack, the field will be empty/omitted." + format: int64 + type: integer + lastUpdateTimestamp: + format: int64 + type: integer + required: + - _type + - description + - id + - identifier + - lastUpdateTimestamp + - name + - scope + type: object + DashboardIdOrUrn: + description: The identifier of a dashboard. Either the system/graph ID or URN + of the resource. + pattern: "^urn:.+|[0-9]+$" + type: string + DashboardScope: + description: "Scope of the dashboard. 'publicDashboard' for accessible by everyone,\ + \ 'privateDashboard' for owned and accessible by the current user." + enum: + - publicDashboard + - privateDashboard + type: string + DashboardReadFullSchema: + allOf: + - $ref: '#/components/schemas/DashboardReadBaseSchema' + - $ref: '#/components/schemas/DashboardReadFullSchema_allOf' + DashboardWriteSchema: + example: + scope: null + name: name + description: description + dashboard: + metadata: + createdAt: 2000-01-23T04:56:07.000+00:00 + name: name + project: project + version: 0 + updatedAt: 2000-01-23T04:56:07.000+00:00 + kind: kind + spec: + duration: duration + variables: + - null + - null + datasources: + key: + default: true + plugin: + kind: kind + spec: "{}" + display: + name: name + description: description + refreshInterval: refreshInterval + panels: + key: + kind: kind + spec: + plugin: + kind: kind + spec: "{}" + display: + name: name + description: description + links: + - targetBlank: true + name: name + tooltip: tooltip + renderVariables: true + url: url + - targetBlank: true + name: name + tooltip: tooltip + renderVariables: true + url: url + queries: + - kind: kind + spec: + plugin: + kind: kind + spec: "{}" + - kind: kind + spec: + plugin: + kind: kind + spec: "{}" + display: + name: name + description: description + layouts: + - kind: null + spec: + display: + title: title + collapse: + open: true + items: + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + - kind: null + spec: + display: + title: title + collapse: + open: true + items: + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + properties: + name: + description: Name of the dashboard + type: string + description: + description: Description of the dashboard + type: string + scope: + $ref: '#/components/schemas/DashboardScope' + dashboard: + $ref: '#/components/schemas/PersesDashboard' + required: + - dashboard + - description + - name + - scope + type: object + DashboardClientErrors: + discriminator: + propertyName: _type + oneOf: + - $ref: '#/components/schemas/DashboardInvalidIdentifierError' + - $ref: '#/components/schemas/DashboardValidationError' + DashboardInvalidIdentifierError: + properties: + _type: + enum: + - DashboardInvalidIdentifierError + type: string + message: + description: A detailed error message describing why the operation failed. + type: string + dashboardIdOrUrn: + type: string + required: + - _type + - dashboardIdOrUrn + - message + type: object + DashboardValidationError: + properties: + _type: + enum: + - DashboardValidationError + type: string + message: + description: A detailed error message describing why the operation failed. + type: string + required: + - _type + - message + type: object + DashboardNotFoundError: + properties: + message: + description: A detailed error message describing why the operation failed. + type: string + dashboardIdOrUrn: + type: string + required: + - dashboardIdOrUrn + - message + type: object + DashboardAuthorizationError: + properties: + message: + description: A detailed error message describing why the operation failed. + type: string + dashboardIdOrUrn: + type: string + userName: + type: string + required: + - dashboardIdOrUrn + - message + - userName + type: object + DashboardPatchSchema: + description: The provided fields are used to patch the corresponding fields + of a dashboard. + example: + scope: null + name: name + description: description + dashboard: + metadata: + createdAt: 2000-01-23T04:56:07.000+00:00 + name: name + project: project + version: 0 + updatedAt: 2000-01-23T04:56:07.000+00:00 + kind: kind + spec: + duration: duration + variables: + - null + - null + datasources: + key: + default: true + plugin: + kind: kind + spec: "{}" + display: + name: name + description: description + refreshInterval: refreshInterval + panels: + key: + kind: kind + spec: + plugin: + kind: kind + spec: "{}" + display: + name: name + description: description + links: + - targetBlank: true + name: name + tooltip: tooltip + renderVariables: true + url: url + - targetBlank: true + name: name + tooltip: tooltip + renderVariables: true + url: url + queries: + - kind: kind + spec: + plugin: + kind: kind + spec: "{}" + - kind: kind + spec: + plugin: + kind: kind + spec: "{}" + display: + name: name + description: description + layouts: + - kind: null + spec: + display: + title: title + collapse: + open: true + items: + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + - kind: null + spec: + display: + title: title + collapse: + open: true + items: + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + properties: + name: + description: Name of the dashboard + type: string + description: + description: Description of the dashboard + type: string + scope: + $ref: '#/components/schemas/DashboardScope' + dashboard: + $ref: '#/components/schemas/PersesDashboard' + type: object + DashboardCloneSchema: + description: The provided fields are used to override the corresponding fields + of the new (cloned) dashboard. + example: + scope: null + name: name + description: description + dashboard: + metadata: + createdAt: 2000-01-23T04:56:07.000+00:00 + name: name + project: project + version: 0 + updatedAt: 2000-01-23T04:56:07.000+00:00 + kind: kind + spec: + duration: duration + variables: + - null + - null + datasources: + key: + default: true + plugin: + kind: kind + spec: "{}" + display: + name: name + description: description + refreshInterval: refreshInterval + panels: + key: + kind: kind + spec: + plugin: + kind: kind + spec: "{}" + display: + name: name + description: description + links: + - targetBlank: true + name: name + tooltip: tooltip + renderVariables: true + url: url + - targetBlank: true + name: name + tooltip: tooltip + renderVariables: true + url: url + queries: + - kind: kind + spec: + plugin: + kind: kind + spec: "{}" + - kind: kind + spec: + plugin: + kind: kind + spec: "{}" + display: + name: name + description: description + layouts: + - kind: null + spec: + display: + title: title + collapse: + open: true + items: + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + - kind: null + spec: + display: + title: title + collapse: + open: true + items: + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + properties: + name: + description: Name of the dashboard. Required to make it easier so see which + dashboard is the new (cloned) dashboard. + type: string + description: + description: Description of the dashboard + type: string + scope: + $ref: '#/components/schemas/DashboardScope' + dashboard: + $ref: '#/components/schemas/PersesDashboard' + required: + - name + type: object StackElementNotFound: discriminator: propertyName: _type @@ -13742,6 +14670,687 @@ components: - offsetNanos - timestamp type: object + PersesDashboard: + example: + metadata: + createdAt: 2000-01-23T04:56:07.000+00:00 + name: name + project: project + version: 0 + updatedAt: 2000-01-23T04:56:07.000+00:00 + kind: kind + spec: + duration: duration + variables: + - null + - null + datasources: + key: + default: true + plugin: + kind: kind + spec: "{}" + display: + name: name + description: description + refreshInterval: refreshInterval + panels: + key: + kind: kind + spec: + plugin: + kind: kind + spec: "{}" + display: + name: name + description: description + links: + - targetBlank: true + name: name + tooltip: tooltip + renderVariables: true + url: url + - targetBlank: true + name: name + tooltip: tooltip + renderVariables: true + url: url + queries: + - kind: kind + spec: + plugin: + kind: kind + spec: "{}" + - kind: kind + spec: + plugin: + kind: kind + spec: "{}" + display: + name: name + description: description + layouts: + - kind: null + spec: + display: + title: title + collapse: + open: true + items: + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + - kind: null + spec: + display: + title: title + collapse: + open: true + items: + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + properties: + kind: + type: string + metadata: + $ref: '#/components/schemas/PersesProjectMetadata' + spec: + $ref: '#/components/schemas/PersesDashboardSpec' + type: object + PersesKind: + type: string + PersesProjectMetadata: + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + name: name + project: project + version: 0 + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + createdAt: + format: date-time + type: string + name: + type: string + project: + type: string + updatedAt: + format: date-time + type: string + version: + format: uint64 + type: integer + type: object + PersesDashboardSpec: + example: + duration: duration + variables: + - null + - null + datasources: + key: + default: true + plugin: + kind: kind + spec: "{}" + display: + name: name + description: description + refreshInterval: refreshInterval + panels: + key: + kind: kind + spec: + plugin: + kind: kind + spec: "{}" + display: + name: name + description: description + links: + - targetBlank: true + name: name + tooltip: tooltip + renderVariables: true + url: url + - targetBlank: true + name: name + tooltip: tooltip + renderVariables: true + url: url + queries: + - kind: kind + spec: + plugin: + kind: kind + spec: "{}" + - kind: kind + spec: + plugin: + kind: kind + spec: "{}" + display: + name: name + description: description + layouts: + - kind: null + spec: + display: + title: title + collapse: + open: true + items: + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + - kind: null + spec: + display: + title: title + collapse: + open: true + items: + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + properties: + datasources: + additionalProperties: + $ref: '#/components/schemas/PersesDatasourceSpec' + description: Datasources is an optional list of datasource definition. + type: object + display: + $ref: '#/components/schemas/PersesDashboardDisplaySpec' + duration: + description: "A Duration represents the elapsed time between two instants.\n\ + It must be provided as a string like \"1h\", \"30m\", \"15s\".\n" + type: string + layouts: + items: + $ref: '#/components/schemas/PersesLayout' + type: array + panels: + additionalProperties: + $ref: '#/components/schemas/PersesPanel' + type: object + refreshInterval: + description: "A Duration represents the elapsed time between two instants.\n\ + It must be provided as a string like \"1h\", \"30m\", \"15s\".\n" + type: string + variables: + items: + $ref: '#/components/schemas/PersesVariableTypes' + type: array + type: object + PersesDatasourceSpec: + example: + default: true + plugin: + kind: kind + spec: "{}" + display: + name: name + description: description + properties: + default: + type: boolean + display: + $ref: '#/components/schemas/PersesDashboardDisplaySpec' + plugin: + $ref: '#/components/schemas/PersesPlugin' + type: object + PersesDashboardDisplaySpec: + example: + name: name + description: description + properties: + description: + type: string + name: + type: string + type: object + PersesPlugin: + example: + kind: kind + spec: "{}" + properties: + kind: + type: string + spec: + type: object + type: object + PersesDuration: + description: "A Duration represents the elapsed time between two instants.\n\ + It must be provided as a string like \"1h\", \"30m\", \"15s\".\n" + type: string + PersesLayout: + example: + kind: null + spec: + display: + title: title + collapse: + open: true + items: + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + properties: + kind: + $ref: '#/components/schemas/PersesLayoutKind' + spec: + $ref: '#/components/schemas/PersesLayoutSpec' + required: + - kind + - spec + type: object + PersesLayoutKind: + description: "Defines the layout type. Currently, only 'Grid' is supported." + enum: + - Grid + type: string + PersesLayoutSpec: + example: + display: + title: title + collapse: + open: true + items: + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + - x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + properties: + display: + $ref: '#/components/schemas/PersesGridLayoutDisplay' + items: + items: + $ref: '#/components/schemas/PersesGridItem' + type: array + required: + - items + type: object + PersesGridLayoutDisplay: + example: + title: title + collapse: + open: true + properties: + title: + description: The title of the grid layout. + type: string + collapse: + $ref: '#/components/schemas/PersesGridLayoutCollapse' + required: + - title + type: object + PersesGridLayoutCollapse: + example: + open: true + properties: + open: + description: Indicates whether the grid layout is collapsed. + type: boolean + required: + - open + type: object + PersesGridItem: + example: + x: 6 + width: 5 + "y": 1 + content: + $ref: $ref + height: 5 + properties: + x: + description: The x-coordinate of the item in the grid. + type: integer + "y": + description: The y-coordinate of the item in the grid. + type: integer + width: + description: The width of the item in the grid. + type: integer + height: + description: The height of the item in the grid. + type: integer + content: + $ref: '#/components/schemas/PersesJSONRef' + required: + - content + - height + - width + - x + - "y" + type: object + PersesJSONRef: + example: + $ref: $ref + properties: + $ref: + description: "The JSON reference pointing to the actual object. The property\ + \ name '$ref' contains a reserved char, which gets stripped away when\ + \ generated (it's possible to handle this but makes the generation code\ + \ more complex). For now, consumers of this spec will need to omit the\ + \ '$' in the property name." + type: string + required: + - $ref + type: object + PersesPanel: + example: + kind: kind + spec: + plugin: + kind: kind + spec: "{}" + display: + name: name + description: description + links: + - targetBlank: true + name: name + tooltip: tooltip + renderVariables: true + url: url + - targetBlank: true + name: name + tooltip: tooltip + renderVariables: true + url: url + queries: + - kind: kind + spec: + plugin: + kind: kind + spec: "{}" + - kind: kind + spec: + plugin: + kind: kind + spec: "{}" + properties: + kind: + type: string + spec: + $ref: '#/components/schemas/PersesPanelSpec' + type: object + PersesPanelSpec: + example: + plugin: + kind: kind + spec: "{}" + display: + name: name + description: description + links: + - targetBlank: true + name: name + tooltip: tooltip + renderVariables: true + url: url + - targetBlank: true + name: name + tooltip: tooltip + renderVariables: true + url: url + queries: + - kind: kind + spec: + plugin: + kind: kind + spec: "{}" + - kind: kind + spec: + plugin: + kind: kind + spec: "{}" + properties: + display: + $ref: '#/components/schemas/PersesPanelDisplay' + links: + items: + $ref: '#/components/schemas/PersesLink' + type: array + plugin: + $ref: '#/components/schemas/PersesPlugin' + queries: + items: + $ref: '#/components/schemas/PersesQuery' + type: array + type: object + PersesPanelDisplay: + example: + name: name + description: description + properties: + description: + type: string + name: + type: string + type: object + PersesLink: + example: + targetBlank: true + name: name + tooltip: tooltip + renderVariables: true + url: url + properties: + name: + type: string + renderVariables: + type: boolean + targetBlank: + type: boolean + tooltip: + type: string + url: + type: string + type: object + PersesQuery: + example: + kind: kind + spec: + plugin: + kind: kind + spec: "{}" + properties: + kind: + type: string + spec: + $ref: '#/components/schemas/PersesQuerySpec' + type: object + PersesQuerySpec: + example: + plugin: + kind: kind + spec: "{}" + properties: + plugin: + $ref: '#/components/schemas/PersesPlugin' + type: object + PersesVariableTypes: + discriminator: + mapping: + TextVariable: '#/components/schemas/PersesTextVariable' + ListVariable: '#/components/schemas/PersesListVariable' + propertyName: kind + oneOf: + - $ref: '#/components/schemas/PersesTextVariable' + - $ref: '#/components/schemas/PersesListVariable' + PersesTextVariable: + properties: + kind: + enum: + - TextVariable + type: string + spec: + $ref: '#/components/schemas/PersesTextVariableSpec' + required: + - kind + type: object + PersesTextVariableSpec: + properties: + name: + type: string + display: + $ref: '#/components/schemas/PersesVariableDisplaySpec' + value: + type: string + constant: + type: boolean + required: + - name + - value + type: object + PersesVariableDisplaySpec: + properties: + name: + type: string + description: + type: string + hidden: + type: boolean + type: object + PersesListVariable: + properties: + kind: + enum: + - ListVariable + type: string + spec: + $ref: '#/components/schemas/PersesListVariableSpec' + required: + - kind + type: object + PersesListVariableSpec: + properties: + name: + type: string + display: + $ref: '#/components/schemas/PersesVariableDisplaySpec' + defaultValue: + $ref: '#/components/schemas/PersesListVariableDefaultValue' + allowAllValue: + type: boolean + allowMultiple: + type: boolean + customAllValue: + type: string + capturingRegexp: + type: string + sort: + $ref: '#/components/schemas/PersesVariableSort' + plugin: + $ref: '#/components/schemas/PersesPlugin' + required: + - allowAllValue + - allowMultiple + - name + - plugin + type: object + PersesListVariableDefaultValue: + discriminator: + mapping: + singleValue: '#/components/schemas/PersesListVariableDefaultSingleValue' + sliceValues: '#/components/schemas/PersesListVariableDefaultSliceValues' + propertyName: kind + oneOf: + - $ref: '#/components/schemas/PersesListVariableDefaultSingleValue' + - $ref: '#/components/schemas/PersesListVariableDefaultSliceValues' + type: object + PersesListVariableDefaultSingleValue: + properties: + kind: + enum: + - singleValue + type: string + singleValue: + type: string + required: + - kind + - singleValue + type: object + PersesListVariableDefaultSliceValues: + properties: + kind: + enum: + - sliceValues + type: string + sliceValues: + items: + type: string + type: array + required: + - kind + - sliceValues + type: object + PersesVariableSort: + enum: + - none + - alphabetical-asc + - alphabetical-desc + - numerical-asc + - numerical-desc + - alphabetical-ci-asc + - alphabetical-ci-desc + type: string NodeTypes_nodeTypes_inner: example: typeName: typeName @@ -13878,6 +15487,24 @@ components: type: number - format: sample_value type: string + TraceQueryMatch_allOf: + properties: + primaryFilterMatches: + description: Spans matching the primary filter + items: + description: The unique identifier of the span within the trace + type: string + type: array + secondaryFilterMatches: + description: Spans matching the secondary filter + items: + description: The unique identifier of the span within the trace + type: string + type: array + required: + - primaryFilterMatches + - secondaryFilterMatches + type: object MetricPerspectiveTab_allOf: properties: _type: @@ -13915,6 +15542,24 @@ components: - $ref: '#/components/schemas/ComponentViewArguments' - $ref: '#/components/schemas/QueryViewArguments' type: object + DashboardReadMetadataSchema_allOf: + properties: + _type: + enum: + - DashboardReadMetadataSchema + type: string + type: object + DashboardReadFullSchema_allOf: + properties: + _type: + enum: + - DashboardReadFullSchema + type: string + dashboard: + $ref: '#/components/schemas/PersesDashboard' + required: + - dashboard + type: object securitySchemes: ApiToken: description: | diff --git a/generated/stackstate_api/api_dashboards.go b/generated/stackstate_api/api_dashboards.go new file mode 100644 index 00000000..385c6626 --- /dev/null +++ b/generated/stackstate_api/api_dashboards.go @@ -0,0 +1,1387 @@ +/* +StackState API + +This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). + +API version: 5.2.0 +Contact: info@stackstate.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackstate_api + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +type DashboardsApi interface { + + /* + CloneDashboard Clone a dashboard + + Clone a dashboard by its identifier. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardIdOrUrn The identifier of a dashboard + @return ApiCloneDashboardRequest + */ + CloneDashboard(ctx context.Context, dashboardIdOrUrn string) ApiCloneDashboardRequest + + // CloneDashboardExecute executes the request + // @return DashboardReadFullSchema + CloneDashboardExecute(r ApiCloneDashboardRequest) (*DashboardReadFullSchema, *http.Response, error) + + /* + CreateDashboard Create a new dashboard + + Create a new dashboard. The dashboard can be private or public based on the scope parameter. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateDashboardRequest + */ + CreateDashboard(ctx context.Context) ApiCreateDashboardRequest + + // CreateDashboardExecute executes the request + // @return DashboardReadFullSchema + CreateDashboardExecute(r ApiCreateDashboardRequest) (*DashboardReadFullSchema, *http.Response, error) + + /* + DeleteDashboard Delete a dashboard + + Delete a dashboard by its identifier. Only user-owned dashboards can be deleted. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardIdOrUrn The identifier of a dashboard + @return ApiDeleteDashboardRequest + */ + DeleteDashboard(ctx context.Context, dashboardIdOrUrn string) ApiDeleteDashboardRequest + + // DeleteDashboardExecute executes the request + DeleteDashboardExecute(r ApiDeleteDashboardRequest) (*http.Response, error) + + /* + GetDashboard Get a single dashboard + + Get a dashboard by its identifier. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardIdOrUrn The identifier of a dashboard + @return ApiGetDashboardRequest + */ + GetDashboard(ctx context.Context, dashboardIdOrUrn string) ApiGetDashboardRequest + + // GetDashboardExecute executes the request + // @return DashboardReadSchema + GetDashboardExecute(r ApiGetDashboardRequest) (*DashboardReadSchema, *http.Response, error) + + /* + GetDashboards Get a list of dashboards + + Get a list of dashboards, optionally filtered by name. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetDashboardsRequest + */ + GetDashboards(ctx context.Context) ApiGetDashboardsRequest + + // GetDashboardsExecute executes the request + // @return DashboardList + GetDashboardsExecute(r ApiGetDashboardsRequest) (*DashboardList, *http.Response, error) + + /* + PatchDashboard Patch a dashboard + + Patch an existing dashboard by its identifier. Only user-owned dashboard can be patched. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardIdOrUrn The identifier of a dashboard + @return ApiPatchDashboardRequest + */ + PatchDashboard(ctx context.Context, dashboardIdOrUrn string) ApiPatchDashboardRequest + + // PatchDashboardExecute executes the request + // @return DashboardReadFullSchema + PatchDashboardExecute(r ApiPatchDashboardRequest) (*DashboardReadFullSchema, *http.Response, error) +} + +// DashboardsApiService DashboardsApi service +type DashboardsApiService service + +type ApiCloneDashboardRequest struct { + ctx context.Context + ApiService DashboardsApi + dashboardIdOrUrn string + dashboardCloneSchema *DashboardCloneSchema +} + +func (r ApiCloneDashboardRequest) DashboardCloneSchema(dashboardCloneSchema DashboardCloneSchema) ApiCloneDashboardRequest { + r.dashboardCloneSchema = &dashboardCloneSchema + return r +} + +func (r ApiCloneDashboardRequest) Execute() (*DashboardReadFullSchema, *http.Response, error) { + return r.ApiService.CloneDashboardExecute(r) +} + +/* +CloneDashboard Clone a dashboard + +Clone a dashboard by its identifier. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardIdOrUrn The identifier of a dashboard + @return ApiCloneDashboardRequest +*/ +func (a *DashboardsApiService) CloneDashboard(ctx context.Context, dashboardIdOrUrn string) ApiCloneDashboardRequest { + return ApiCloneDashboardRequest{ + ApiService: a, + ctx: ctx, + dashboardIdOrUrn: dashboardIdOrUrn, + } +} + +// Execute executes the request +// @return DashboardReadFullSchema +func (a *DashboardsApiService) CloneDashboardExecute(r ApiCloneDashboardRequest) (*DashboardReadFullSchema, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DashboardReadFullSchema + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DashboardsApiService.CloneDashboard") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/dashboards/{dashboardIdOrUrn}/clone" + localVarPath = strings.Replace(localVarPath, "{"+"dashboardIdOrUrn"+"}", url.PathEscape(parameterToString(r.dashboardIdOrUrn, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dashboardCloneSchema == nil { + return localVarReturnValue, nil, reportError("dashboardCloneSchema is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.dashboardCloneSchema + 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 DashboardClientErrors + 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 == 403 { + var v DashboardAuthorizationError + 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 == 404 { + var v DashboardNotFoundError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GenericErrorsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateDashboardRequest struct { + ctx context.Context + ApiService DashboardsApi + dashboardWriteSchema *DashboardWriteSchema +} + +func (r ApiCreateDashboardRequest) DashboardWriteSchema(dashboardWriteSchema DashboardWriteSchema) ApiCreateDashboardRequest { + r.dashboardWriteSchema = &dashboardWriteSchema + return r +} + +func (r ApiCreateDashboardRequest) Execute() (*DashboardReadFullSchema, *http.Response, error) { + return r.ApiService.CreateDashboardExecute(r) +} + +/* +CreateDashboard Create a new dashboard + +Create a new dashboard. The dashboard can be private or public based on the scope parameter. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateDashboardRequest +*/ +func (a *DashboardsApiService) CreateDashboard(ctx context.Context) ApiCreateDashboardRequest { + return ApiCreateDashboardRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return DashboardReadFullSchema +func (a *DashboardsApiService) CreateDashboardExecute(r ApiCreateDashboardRequest) (*DashboardReadFullSchema, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DashboardReadFullSchema + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DashboardsApiService.CreateDashboard") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/dashboards" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dashboardWriteSchema == nil { + return localVarReturnValue, nil, reportError("dashboardWriteSchema is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.dashboardWriteSchema + 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 DashboardClientErrors + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GenericErrorsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteDashboardRequest struct { + ctx context.Context + ApiService DashboardsApi + dashboardIdOrUrn string +} + +func (r ApiDeleteDashboardRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteDashboardExecute(r) +} + +/* +DeleteDashboard Delete a dashboard + +Delete a dashboard by its identifier. Only user-owned dashboards can be deleted. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardIdOrUrn The identifier of a dashboard + @return ApiDeleteDashboardRequest +*/ +func (a *DashboardsApiService) DeleteDashboard(ctx context.Context, dashboardIdOrUrn string) ApiDeleteDashboardRequest { + return ApiDeleteDashboardRequest{ + ApiService: a, + ctx: ctx, + dashboardIdOrUrn: dashboardIdOrUrn, + } +} + +// Execute executes the request +func (a *DashboardsApiService) DeleteDashboardExecute(r ApiDeleteDashboardRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DashboardsApiService.DeleteDashboard") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/dashboards/{dashboardIdOrUrn}" + localVarPath = strings.Replace(localVarPath, "{"+"dashboardIdOrUrn"+"}", url.PathEscape(parameterToString(r.dashboardIdOrUrn, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiToken"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-Token"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ServiceBearer"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-ServiceBearer"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ServiceToken"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DashboardClientErrors + 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 == 403 { + var v DashboardAuthorizationError + 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 DashboardNotFoundError + 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 localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiGetDashboardRequest struct { + ctx context.Context + ApiService DashboardsApi + dashboardIdOrUrn string + loadFullDashboard *bool +} + +// If true, includes the full dashboard content in the response. Defaults to false (only metadata is returned) for retrieval endpoints. Defaults to true for create/update operations. +func (r ApiGetDashboardRequest) LoadFullDashboard(loadFullDashboard bool) ApiGetDashboardRequest { + r.loadFullDashboard = &loadFullDashboard + return r +} + +func (r ApiGetDashboardRequest) Execute() (*DashboardReadSchema, *http.Response, error) { + return r.ApiService.GetDashboardExecute(r) +} + +/* +GetDashboard Get a single dashboard + +Get a dashboard by its identifier. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardIdOrUrn The identifier of a dashboard + @return ApiGetDashboardRequest +*/ +func (a *DashboardsApiService) GetDashboard(ctx context.Context, dashboardIdOrUrn string) ApiGetDashboardRequest { + return ApiGetDashboardRequest{ + ApiService: a, + ctx: ctx, + dashboardIdOrUrn: dashboardIdOrUrn, + } +} + +// Execute executes the request +// @return DashboardReadSchema +func (a *DashboardsApiService) GetDashboardExecute(r ApiGetDashboardRequest) (*DashboardReadSchema, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DashboardReadSchema + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DashboardsApiService.GetDashboard") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/dashboards/{dashboardIdOrUrn}" + localVarPath = strings.Replace(localVarPath, "{"+"dashboardIdOrUrn"+"}", url.PathEscape(parameterToString(r.dashboardIdOrUrn, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.loadFullDashboard != nil { + localVarQueryParams.Add("loadFullDashboard", parameterToString(*r.loadFullDashboard, "")) + } + // 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 DashboardClientErrors + 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 == 404 { + var v DashboardNotFoundError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GenericErrorsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetDashboardsRequest struct { + ctx context.Context + ApiService DashboardsApi + loadFullDashboard *bool +} + +// If true, includes the full dashboard content in the response. Defaults to false (only metadata is returned) for retrieval endpoints. Defaults to true for create/update operations. +func (r ApiGetDashboardsRequest) LoadFullDashboard(loadFullDashboard bool) ApiGetDashboardsRequest { + r.loadFullDashboard = &loadFullDashboard + return r +} + +func (r ApiGetDashboardsRequest) Execute() (*DashboardList, *http.Response, error) { + return r.ApiService.GetDashboardsExecute(r) +} + +/* +GetDashboards Get a list of dashboards + +Get a list of dashboards, optionally filtered by name. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetDashboardsRequest +*/ +func (a *DashboardsApiService) GetDashboards(ctx context.Context) ApiGetDashboardsRequest { + return ApiGetDashboardsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return DashboardList +func (a *DashboardsApiService) GetDashboardsExecute(r ApiGetDashboardsRequest) (*DashboardList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DashboardList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DashboardsApiService.GetDashboards") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/dashboards" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.loadFullDashboard != nil { + localVarQueryParams.Add("loadFullDashboard", parameterToString(*r.loadFullDashboard, "")) + } + // 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 ApiPatchDashboardRequest struct { + ctx context.Context + ApiService DashboardsApi + dashboardIdOrUrn string + dashboardPatchSchema *DashboardPatchSchema +} + +func (r ApiPatchDashboardRequest) DashboardPatchSchema(dashboardPatchSchema DashboardPatchSchema) ApiPatchDashboardRequest { + r.dashboardPatchSchema = &dashboardPatchSchema + return r +} + +func (r ApiPatchDashboardRequest) Execute() (*DashboardReadFullSchema, *http.Response, error) { + return r.ApiService.PatchDashboardExecute(r) +} + +/* +PatchDashboard Patch a dashboard + +Patch an existing dashboard by its identifier. Only user-owned dashboard can be patched. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardIdOrUrn The identifier of a dashboard + @return ApiPatchDashboardRequest +*/ +func (a *DashboardsApiService) PatchDashboard(ctx context.Context, dashboardIdOrUrn string) ApiPatchDashboardRequest { + return ApiPatchDashboardRequest{ + ApiService: a, + ctx: ctx, + dashboardIdOrUrn: dashboardIdOrUrn, + } +} + +// Execute executes the request +// @return DashboardReadFullSchema +func (a *DashboardsApiService) PatchDashboardExecute(r ApiPatchDashboardRequest) (*DashboardReadFullSchema, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DashboardReadFullSchema + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DashboardsApiService.PatchDashboard") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/dashboards/{dashboardIdOrUrn}" + localVarPath = strings.Replace(localVarPath, "{"+"dashboardIdOrUrn"+"}", url.PathEscape(parameterToString(r.dashboardIdOrUrn, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dashboardPatchSchema == nil { + return localVarReturnValue, nil, reportError("dashboardPatchSchema is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.dashboardPatchSchema + 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 DashboardClientErrors + 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 == 403 { + var v DashboardAuthorizationError + 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 == 404 { + var v DashboardNotFoundError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GenericErrorsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// --------------------------------------------- +// ------------------ MOCKS -------------------- +// --------------------------------------------- + +type DashboardsApiMock struct { + CloneDashboardCalls *[]CloneDashboardCall + CloneDashboardResponse CloneDashboardMockResponse + CreateDashboardCalls *[]CreateDashboardCall + CreateDashboardResponse CreateDashboardMockResponse + DeleteDashboardCalls *[]DeleteDashboardCall + DeleteDashboardResponse DeleteDashboardMockResponse + GetDashboardCalls *[]GetDashboardCall + GetDashboardResponse GetDashboardMockResponse + GetDashboardsCalls *[]GetDashboardsCall + GetDashboardsResponse GetDashboardsMockResponse + PatchDashboardCalls *[]PatchDashboardCall + PatchDashboardResponse PatchDashboardMockResponse +} + +func NewDashboardsApiMock() DashboardsApiMock { + xCloneDashboardCalls := make([]CloneDashboardCall, 0) + xCreateDashboardCalls := make([]CreateDashboardCall, 0) + xDeleteDashboardCalls := make([]DeleteDashboardCall, 0) + xGetDashboardCalls := make([]GetDashboardCall, 0) + xGetDashboardsCalls := make([]GetDashboardsCall, 0) + xPatchDashboardCalls := make([]PatchDashboardCall, 0) + return DashboardsApiMock{ + CloneDashboardCalls: &xCloneDashboardCalls, + CreateDashboardCalls: &xCreateDashboardCalls, + DeleteDashboardCalls: &xDeleteDashboardCalls, + GetDashboardCalls: &xGetDashboardCalls, + GetDashboardsCalls: &xGetDashboardsCalls, + PatchDashboardCalls: &xPatchDashboardCalls, + } +} + +type CloneDashboardMockResponse struct { + Result DashboardReadFullSchema + Response *http.Response + Error error +} + +type CloneDashboardCall struct { + PdashboardIdOrUrn string + PdashboardCloneSchema *DashboardCloneSchema +} + +func (mock DashboardsApiMock) CloneDashboard(ctx context.Context, dashboardIdOrUrn string) ApiCloneDashboardRequest { + return ApiCloneDashboardRequest{ + ApiService: mock, + ctx: ctx, + dashboardIdOrUrn: dashboardIdOrUrn, + } +} + +func (mock DashboardsApiMock) CloneDashboardExecute(r ApiCloneDashboardRequest) (*DashboardReadFullSchema, *http.Response, error) { + p := CloneDashboardCall{ + PdashboardIdOrUrn: r.dashboardIdOrUrn, + PdashboardCloneSchema: r.dashboardCloneSchema, + } + *mock.CloneDashboardCalls = append(*mock.CloneDashboardCalls, p) + return &mock.CloneDashboardResponse.Result, mock.CloneDashboardResponse.Response, mock.CloneDashboardResponse.Error +} + +type CreateDashboardMockResponse struct { + Result DashboardReadFullSchema + Response *http.Response + Error error +} + +type CreateDashboardCall struct { + PdashboardWriteSchema *DashboardWriteSchema +} + +func (mock DashboardsApiMock) CreateDashboard(ctx context.Context) ApiCreateDashboardRequest { + return ApiCreateDashboardRequest{ + ApiService: mock, + ctx: ctx, + } +} + +func (mock DashboardsApiMock) CreateDashboardExecute(r ApiCreateDashboardRequest) (*DashboardReadFullSchema, *http.Response, error) { + p := CreateDashboardCall{ + PdashboardWriteSchema: r.dashboardWriteSchema, + } + *mock.CreateDashboardCalls = append(*mock.CreateDashboardCalls, p) + return &mock.CreateDashboardResponse.Result, mock.CreateDashboardResponse.Response, mock.CreateDashboardResponse.Error +} + +type DeleteDashboardMockResponse struct { + Response *http.Response + Error error +} + +type DeleteDashboardCall struct { + PdashboardIdOrUrn string +} + +func (mock DashboardsApiMock) DeleteDashboard(ctx context.Context, dashboardIdOrUrn string) ApiDeleteDashboardRequest { + return ApiDeleteDashboardRequest{ + ApiService: mock, + ctx: ctx, + dashboardIdOrUrn: dashboardIdOrUrn, + } +} + +func (mock DashboardsApiMock) DeleteDashboardExecute(r ApiDeleteDashboardRequest) (*http.Response, error) { + p := DeleteDashboardCall{ + PdashboardIdOrUrn: r.dashboardIdOrUrn, + } + *mock.DeleteDashboardCalls = append(*mock.DeleteDashboardCalls, p) + return mock.DeleteDashboardResponse.Response, mock.DeleteDashboardResponse.Error +} + +type GetDashboardMockResponse struct { + Result DashboardReadSchema + Response *http.Response + Error error +} + +type GetDashboardCall struct { + PdashboardIdOrUrn string + PloadFullDashboard *bool +} + +func (mock DashboardsApiMock) GetDashboard(ctx context.Context, dashboardIdOrUrn string) ApiGetDashboardRequest { + return ApiGetDashboardRequest{ + ApiService: mock, + ctx: ctx, + dashboardIdOrUrn: dashboardIdOrUrn, + } +} + +func (mock DashboardsApiMock) GetDashboardExecute(r ApiGetDashboardRequest) (*DashboardReadSchema, *http.Response, error) { + p := GetDashboardCall{ + PdashboardIdOrUrn: r.dashboardIdOrUrn, + PloadFullDashboard: r.loadFullDashboard, + } + *mock.GetDashboardCalls = append(*mock.GetDashboardCalls, p) + return &mock.GetDashboardResponse.Result, mock.GetDashboardResponse.Response, mock.GetDashboardResponse.Error +} + +type GetDashboardsMockResponse struct { + Result DashboardList + Response *http.Response + Error error +} + +type GetDashboardsCall struct { + PloadFullDashboard *bool +} + +func (mock DashboardsApiMock) GetDashboards(ctx context.Context) ApiGetDashboardsRequest { + return ApiGetDashboardsRequest{ + ApiService: mock, + ctx: ctx, + } +} + +func (mock DashboardsApiMock) GetDashboardsExecute(r ApiGetDashboardsRequest) (*DashboardList, *http.Response, error) { + p := GetDashboardsCall{ + PloadFullDashboard: r.loadFullDashboard, + } + *mock.GetDashboardsCalls = append(*mock.GetDashboardsCalls, p) + return &mock.GetDashboardsResponse.Result, mock.GetDashboardsResponse.Response, mock.GetDashboardsResponse.Error +} + +type PatchDashboardMockResponse struct { + Result DashboardReadFullSchema + Response *http.Response + Error error +} + +type PatchDashboardCall struct { + PdashboardIdOrUrn string + PdashboardPatchSchema *DashboardPatchSchema +} + +func (mock DashboardsApiMock) PatchDashboard(ctx context.Context, dashboardIdOrUrn string) ApiPatchDashboardRequest { + return ApiPatchDashboardRequest{ + ApiService: mock, + ctx: ctx, + dashboardIdOrUrn: dashboardIdOrUrn, + } +} + +func (mock DashboardsApiMock) PatchDashboardExecute(r ApiPatchDashboardRequest) (*DashboardReadFullSchema, *http.Response, error) { + p := PatchDashboardCall{ + PdashboardIdOrUrn: r.dashboardIdOrUrn, + PdashboardPatchSchema: r.dashboardPatchSchema, + } + *mock.PatchDashboardCalls = append(*mock.PatchDashboardCalls, p) + return &mock.PatchDashboardResponse.Result, mock.PatchDashboardResponse.Response, mock.PatchDashboardResponse.Error +} diff --git a/generated/stackstate_api/api_kubernetes_logs.go b/generated/stackstate_api/api_kubernetes_logs.go index b27661a4..74efe79d 100644 --- a/generated/stackstate_api/api_kubernetes_logs.go +++ b/generated/stackstate_api/api_kubernetes_logs.go @@ -67,12 +67,14 @@ type ApiGetKubernetesLogsRequest struct { from *int32 to *int32 podUID *string + cluster *string pageSize *int32 page *int32 query *string containerNames *[]string direction *LogsDirection severity *[]LogSeverity + topologyTime *int32 } // Logs initial timestamp. @@ -93,6 +95,12 @@ func (r ApiGetKubernetesLogsRequest) PodUID(podUID string) ApiGetKubernetesLogsR return r } +// Cluster name which identifies the scope of the RBAC data +func (r ApiGetKubernetesLogsRequest) Cluster(cluster string) ApiGetKubernetesLogsRequest { + r.cluster = &cluster + return r +} + // Maximum number of the log lines in the result. func (r ApiGetKubernetesLogsRequest) PageSize(pageSize int32) ApiGetKubernetesLogsRequest { r.pageSize = &pageSize @@ -129,6 +137,12 @@ func (r ApiGetKubernetesLogsRequest) Severity(severity []LogSeverity) ApiGetKube return r } +// A timestamp at which the pod existed. If not given the pod is queried at current time. +func (r ApiGetKubernetesLogsRequest) TopologyTime(topologyTime int32) ApiGetKubernetesLogsRequest { + r.topologyTime = &topologyTime + return r +} + func (r ApiGetKubernetesLogsRequest) Execute() (*GetKubernetesLogsResult, *http.Response, error) { return r.ApiService.GetKubernetesLogsExecute(r) } @@ -175,6 +189,9 @@ func (a *KubernetesLogsApiService) GetKubernetesLogsExecute(r ApiGetKubernetesLo if r.podUID == nil { return localVarReturnValue, nil, reportError("podUID is required and must be specified") } + if r.cluster == nil { + return localVarReturnValue, nil, reportError("cluster is required and must be specified") + } localVarQueryParams.Add("from", parameterToString(*r.from, "")) localVarQueryParams.Add("to", parameterToString(*r.to, "")) @@ -188,6 +205,7 @@ func (a *KubernetesLogsApiService) GetKubernetesLogsExecute(r ApiGetKubernetesLo localVarQueryParams.Add("query", parameterToString(*r.query, "")) } localVarQueryParams.Add("podUID", parameterToString(*r.podUID, "")) + localVarQueryParams.Add("cluster", parameterToString(*r.cluster, "")) if r.containerNames != nil { localVarQueryParams.Add("containerNames", parameterToString(*r.containerNames, "csv")) } @@ -197,6 +215,9 @@ func (a *KubernetesLogsApiService) GetKubernetesLogsExecute(r ApiGetKubernetesLo if r.severity != nil { localVarQueryParams.Add("severity", parameterToString(*r.severity, "csv")) } + if r.topologyTime != nil { + localVarQueryParams.Add("topologyTime", parameterToString(*r.topologyTime, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -313,11 +334,13 @@ func (a *KubernetesLogsApiService) GetKubernetesLogsExecute(r ApiGetKubernetesLo } type ApiGetKubernetesLogsAutocompleteRequest struct { - ctx context.Context - ApiService KubernetesLogsApi - from *int32 - to *int32 - podUID *string + ctx context.Context + ApiService KubernetesLogsApi + from *int32 + to *int32 + podUID *string + cluster *string + topologyTime *int32 } // Logs initial timestamp. @@ -338,6 +361,18 @@ func (r ApiGetKubernetesLogsAutocompleteRequest) PodUID(podUID string) ApiGetKub return r } +// Cluster name which identifies the scope of the RBAC data +func (r ApiGetKubernetesLogsAutocompleteRequest) Cluster(cluster string) ApiGetKubernetesLogsAutocompleteRequest { + r.cluster = &cluster + return r +} + +// A timestamp at which the pod existed. If not given the pod is queried at current time. +func (r ApiGetKubernetesLogsAutocompleteRequest) TopologyTime(topologyTime int32) ApiGetKubernetesLogsAutocompleteRequest { + r.topologyTime = &topologyTime + return r +} + func (r ApiGetKubernetesLogsAutocompleteRequest) Execute() (*GetKubernetesLogsAutocompleteResult, *http.Response, error) { return r.ApiService.GetKubernetesLogsAutocompleteExecute(r) } @@ -384,10 +419,17 @@ func (a *KubernetesLogsApiService) GetKubernetesLogsAutocompleteExecute(r ApiGet if r.podUID == nil { return localVarReturnValue, nil, reportError("podUID is required and must be specified") } + if r.cluster == nil { + return localVarReturnValue, nil, reportError("cluster is required and must be specified") + } localVarQueryParams.Add("from", parameterToString(*r.from, "")) localVarQueryParams.Add("to", parameterToString(*r.to, "")) localVarQueryParams.Add("podUID", parameterToString(*r.podUID, "")) + localVarQueryParams.Add("cluster", parameterToString(*r.cluster, "")) + if r.topologyTime != nil { + localVarQueryParams.Add("topologyTime", parameterToString(*r.topologyTime, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -509,10 +551,12 @@ type ApiGetKubernetesLogsHistogramRequest struct { from *int32 to *int32 podUID *string + cluster *string bucketsCount *int32 query *string containerNames *[]string severity *[]LogSeverity + topologyTime *int32 } // Logs initial timestamp. @@ -533,6 +577,12 @@ func (r ApiGetKubernetesLogsHistogramRequest) PodUID(podUID string) ApiGetKubern return r } +// Cluster name which identifies the scope of the RBAC data +func (r ApiGetKubernetesLogsHistogramRequest) Cluster(cluster string) ApiGetKubernetesLogsHistogramRequest { + r.cluster = &cluster + return r +} + // The number of histogram buckets. func (r ApiGetKubernetesLogsHistogramRequest) BucketsCount(bucketsCount int32) ApiGetKubernetesLogsHistogramRequest { r.bucketsCount = &bucketsCount @@ -557,6 +607,12 @@ func (r ApiGetKubernetesLogsHistogramRequest) Severity(severity []LogSeverity) A return r } +// A timestamp at which the pod existed. If not given the pod is queried at current time. +func (r ApiGetKubernetesLogsHistogramRequest) TopologyTime(topologyTime int32) ApiGetKubernetesLogsHistogramRequest { + r.topologyTime = &topologyTime + return r +} + func (r ApiGetKubernetesLogsHistogramRequest) Execute() (*GetKubernetesLogsHistogramResult, *http.Response, error) { return r.ApiService.GetKubernetesLogsHistogramExecute(r) } @@ -603,6 +659,9 @@ func (a *KubernetesLogsApiService) GetKubernetesLogsHistogramExecute(r ApiGetKub if r.podUID == nil { return localVarReturnValue, nil, reportError("podUID is required and must be specified") } + if r.cluster == nil { + return localVarReturnValue, nil, reportError("cluster is required and must be specified") + } if r.bucketsCount == nil { return localVarReturnValue, nil, reportError("bucketsCount is required and must be specified") } @@ -613,6 +672,7 @@ func (a *KubernetesLogsApiService) GetKubernetesLogsHistogramExecute(r ApiGetKub localVarQueryParams.Add("query", parameterToString(*r.query, "")) } localVarQueryParams.Add("podUID", parameterToString(*r.podUID, "")) + localVarQueryParams.Add("cluster", parameterToString(*r.cluster, "")) if r.containerNames != nil { localVarQueryParams.Add("containerNames", parameterToString(*r.containerNames, "csv")) } @@ -620,6 +680,9 @@ func (a *KubernetesLogsApiService) GetKubernetesLogsHistogramExecute(r ApiGetKub if r.severity != nil { localVarQueryParams.Add("severity", parameterToString(*r.severity, "csv")) } + if r.topologyTime != nil { + localVarQueryParams.Add("topologyTime", parameterToString(*r.topologyTime, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -769,12 +832,14 @@ type GetKubernetesLogsCall struct { Pfrom *int32 Pto *int32 PpodUID *string + Pcluster *string PpageSize *int32 Ppage *int32 Pquery *string PcontainerNames *[]string Pdirection *LogsDirection Pseverity *[]LogSeverity + PtopologyTime *int32 } func (mock KubernetesLogsApiMock) GetKubernetesLogs(ctx context.Context) ApiGetKubernetesLogsRequest { @@ -789,12 +854,14 @@ func (mock KubernetesLogsApiMock) GetKubernetesLogsExecute(r ApiGetKubernetesLog Pfrom: r.from, Pto: r.to, PpodUID: r.podUID, + Pcluster: r.cluster, PpageSize: r.pageSize, Ppage: r.page, Pquery: r.query, PcontainerNames: r.containerNames, Pdirection: r.direction, Pseverity: r.severity, + PtopologyTime: r.topologyTime, } *mock.GetKubernetesLogsCalls = append(*mock.GetKubernetesLogsCalls, p) return &mock.GetKubernetesLogsResponse.Result, mock.GetKubernetesLogsResponse.Response, mock.GetKubernetesLogsResponse.Error @@ -807,9 +874,11 @@ type GetKubernetesLogsAutocompleteMockResponse struct { } type GetKubernetesLogsAutocompleteCall struct { - Pfrom *int32 - Pto *int32 - PpodUID *string + Pfrom *int32 + Pto *int32 + PpodUID *string + Pcluster *string + PtopologyTime *int32 } func (mock KubernetesLogsApiMock) GetKubernetesLogsAutocomplete(ctx context.Context) ApiGetKubernetesLogsAutocompleteRequest { @@ -821,9 +890,11 @@ func (mock KubernetesLogsApiMock) GetKubernetesLogsAutocomplete(ctx context.Cont func (mock KubernetesLogsApiMock) GetKubernetesLogsAutocompleteExecute(r ApiGetKubernetesLogsAutocompleteRequest) (*GetKubernetesLogsAutocompleteResult, *http.Response, error) { p := GetKubernetesLogsAutocompleteCall{ - Pfrom: r.from, - Pto: r.to, - PpodUID: r.podUID, + Pfrom: r.from, + Pto: r.to, + PpodUID: r.podUID, + Pcluster: r.cluster, + PtopologyTime: r.topologyTime, } *mock.GetKubernetesLogsAutocompleteCalls = append(*mock.GetKubernetesLogsAutocompleteCalls, p) return &mock.GetKubernetesLogsAutocompleteResponse.Result, mock.GetKubernetesLogsAutocompleteResponse.Response, mock.GetKubernetesLogsAutocompleteResponse.Error @@ -839,10 +910,12 @@ type GetKubernetesLogsHistogramCall struct { Pfrom *int32 Pto *int32 PpodUID *string + Pcluster *string PbucketsCount *int32 Pquery *string PcontainerNames *[]string Pseverity *[]LogSeverity + PtopologyTime *int32 } func (mock KubernetesLogsApiMock) GetKubernetesLogsHistogram(ctx context.Context) ApiGetKubernetesLogsHistogramRequest { @@ -857,10 +930,12 @@ func (mock KubernetesLogsApiMock) GetKubernetesLogsHistogramExecute(r ApiGetKube Pfrom: r.from, Pto: r.to, PpodUID: r.podUID, + Pcluster: r.cluster, PbucketsCount: r.bucketsCount, Pquery: r.query, PcontainerNames: r.containerNames, Pseverity: r.severity, + PtopologyTime: r.topologyTime, } *mock.GetKubernetesLogsHistogramCalls = append(*mock.GetKubernetesLogsHistogramCalls, p) return &mock.GetKubernetesLogsHistogramResponse.Result, mock.GetKubernetesLogsHistogramResponse.Response, mock.GetKubernetesLogsHistogramResponse.Error diff --git a/generated/stackstate_api/api_notification_channels.go b/generated/stackstate_api/api_notification_channels.go index f0020a17..3265d626 100644 --- a/generated/stackstate_api/api_notification_channels.go +++ b/generated/stackstate_api/api_notification_channels.go @@ -3164,7 +3164,7 @@ type ApiListOpsgenieRespondersRequest struct { ctx context.Context ApiService NotificationChannelsApi genieKey *string - region *string + region *OpsgenieRegion } // OpsGenie API key @@ -3174,7 +3174,7 @@ func (r ApiListOpsgenieRespondersRequest) GenieKey(genieKey string) ApiListOpsge } // OpsGenie region -func (r ApiListOpsgenieRespondersRequest) Region(region string) ApiListOpsgenieRespondersRequest { +func (r ApiListOpsgenieRespondersRequest) Region(region OpsgenieRegion) ApiListOpsgenieRespondersRequest { r.region = ®ion return r } @@ -5918,7 +5918,7 @@ type ListOpsgenieRespondersMockResponse struct { type ListOpsgenieRespondersCall struct { PgenieKey *string - Pregion *string + Pregion *OpsgenieRegion } func (mock NotificationChannelsApiMock) ListOpsgenieResponders(ctx context.Context) ApiListOpsgenieRespondersRequest { diff --git a/generated/stackstate_api/api_subject.go b/generated/stackstate_api/api_subject.go index bcb350bc..533fc058 100644 --- a/generated/stackstate_api/api_subject.go +++ b/generated/stackstate_api/api_subject.go @@ -84,15 +84,9 @@ type SubjectApi interface { type SubjectApiService service type ApiCreateSubjectRequest struct { - ctx context.Context - ApiService SubjectApi - subject string - createSubject *CreateSubject -} - -func (r ApiCreateSubjectRequest) CreateSubject(createSubject CreateSubject) ApiCreateSubjectRequest { - r.createSubject = &createSubject - return r + ctx context.Context + ApiService SubjectApi + subject string } func (r ApiCreateSubjectRequest) Execute() (*http.Response, error) { @@ -135,12 +129,9 @@ func (a *SubjectApiService) CreateSubjectExecute(r ApiCreateSubjectRequest) (*ht localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.createSubject == nil { - return nil, reportError("createSubject is required and must be specified") - } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -156,8 +147,6 @@ func (a *SubjectApiService) CreateSubjectExecute(r ApiCreateSubjectRequest) (*ht if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.createSubject if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -748,8 +737,7 @@ type CreateSubjectMockResponse struct { } type CreateSubjectCall struct { - Psubject string - PcreateSubject *CreateSubject + Psubject string } func (mock SubjectApiMock) CreateSubject(ctx context.Context, subject string) ApiCreateSubjectRequest { @@ -762,8 +750,7 @@ func (mock SubjectApiMock) CreateSubject(ctx context.Context, subject string) Ap func (mock SubjectApiMock) CreateSubjectExecute(r ApiCreateSubjectRequest) (*http.Response, error) { p := CreateSubjectCall{ - Psubject: r.subject, - PcreateSubject: r.createSubject, + Psubject: r.subject, } *mock.CreateSubjectCalls = append(*mock.CreateSubjectCalls, p) return mock.CreateSubjectResponse.Response, mock.CreateSubjectResponse.Error diff --git a/generated/stackstate_api/api_timeline.go b/generated/stackstate_api/api_timeline.go index 67b82cbe..ecc86919 100644 --- a/generated/stackstate_api/api_timeline.go +++ b/generated/stackstate_api/api_timeline.go @@ -177,6 +177,16 @@ func (a *TimelineApiService) GetTimelineSummaryExecute(r ApiGetTimelineSummaryRe body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 413 { + var v TimelineSummaryOverflow + 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 TimelineSummaryError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) diff --git a/generated/stackstate_api/api_traces.go b/generated/stackstate_api/api_traces.go index 69956901..5896c162 100644 --- a/generated/stackstate_api/api_traces.go +++ b/generated/stackstate_api/api_traces.go @@ -35,8 +35,8 @@ type TracesApi interface { GetSpan(ctx context.Context, traceId string, spanId string) ApiGetSpanRequest // GetSpanExecute executes the request - // @return Span - GetSpanExecute(r ApiGetSpanRequest) (*Span, *http.Response, error) + // @return SpanResponse + GetSpanExecute(r ApiGetSpanRequest) (*SpanResponse, *http.Response, error) /* GetTrace Fetch a trace @@ -78,8 +78,8 @@ type TracesApi interface { QueryTraces(ctx context.Context) ApiQueryTracesRequest // QueryTracesExecute executes the request - // @return Traces - QueryTracesExecute(r ApiQueryTracesRequest) (*Traces, *http.Response, error) + // @return TraceQueryResponse + QueryTracesExecute(r ApiQueryTracesRequest) (*TraceQueryResponse, *http.Response, error) /* SpanComponents Fetch components based on resource attributes @@ -150,7 +150,7 @@ type ApiGetSpanRequest struct { spanId string } -func (r ApiGetSpanRequest) Execute() (*Span, *http.Response, error) { +func (r ApiGetSpanRequest) Execute() (*SpanResponse, *http.Response, error) { return r.ApiService.GetSpanExecute(r) } @@ -174,13 +174,13 @@ func (a *TracesApiService) GetSpan(ctx context.Context, traceId string, spanId s } // Execute executes the request -// @return Span -func (a *TracesApiService) GetSpanExecute(r ApiGetSpanRequest) (*Span, *http.Response, error) { +// @return SpanResponse +func (a *TracesApiService) GetSpanExecute(r ApiGetSpanRequest) (*SpanResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *Span + localVarReturnValue *SpanResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracesApiService.GetSpan") @@ -720,7 +720,7 @@ func (r ApiQueryTracesRequest) Page(page int32) ApiQueryTracesRequest { return r } -func (r ApiQueryTracesRequest) Execute() (*Traces, *http.Response, error) { +func (r ApiQueryTracesRequest) Execute() (*TraceQueryResponse, *http.Response, error) { return r.ApiService.QueryTracesExecute(r) } @@ -740,13 +740,13 @@ func (a *TracesApiService) QueryTraces(ctx context.Context) ApiQueryTracesReques } // Execute executes the request -// @return Traces -func (a *TracesApiService) QueryTracesExecute(r ApiQueryTracesRequest) (*Traces, *http.Response, error) { +// @return TraceQueryResponse +func (a *TracesApiService) QueryTracesExecute(r ApiQueryTracesRequest) (*TraceQueryResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *Traces + localVarReturnValue *TraceQueryResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TracesApiService.QueryTraces") @@ -1589,7 +1589,7 @@ func NewTracesApiMock() TracesApiMock { } type GetSpanMockResponse struct { - Result Span + Result SpanResponse Response *http.Response Error error } @@ -1608,7 +1608,7 @@ func (mock TracesApiMock) GetSpan(ctx context.Context, traceId string, spanId st } } -func (mock TracesApiMock) GetSpanExecute(r ApiGetSpanRequest) (*Span, *http.Response, error) { +func (mock TracesApiMock) GetSpanExecute(r ApiGetSpanRequest) (*SpanResponse, *http.Response, error) { p := GetSpanCall{ PtraceId: r.traceId, PspanId: r.spanId, @@ -1675,7 +1675,7 @@ func (mock TracesApiMock) QueryDurationExecute(r ApiQueryDurationRequest) (*Dura } type QueryTracesMockResponse struct { - Result Traces + Result TraceQueryResponse Response *http.Response Error error } @@ -1695,7 +1695,7 @@ func (mock TracesApiMock) QueryTraces(ctx context.Context) ApiQueryTracesRequest } } -func (mock TracesApiMock) QueryTracesExecute(r ApiQueryTracesRequest) (*Traces, *http.Response, error) { +func (mock TracesApiMock) QueryTracesExecute(r ApiQueryTracesRequest) (*TraceQueryResponse, *http.Response, error) { p := QueryTracesCall{ Pstart: r.start, Pend: r.end, diff --git a/generated/stackstate_api/client.go b/generated/stackstate_api/client.go index 620f0322..370e85a6 100644 --- a/generated/stackstate_api/client.go +++ b/generated/stackstate_api/client.go @@ -60,6 +60,8 @@ type APIClient struct { ComponentApi ComponentApi + DashboardsApi DashboardsApi + DummyApi DummyApi EventApi EventApi @@ -142,6 +144,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.ApiTokenApi = (*ApiTokenApiService)(&c.common) c.AuthorizeIngestionApiKeyApi = (*AuthorizeIngestionApiKeyApiService)(&c.common) c.ComponentApi = (*ComponentApiService)(&c.common) + c.DashboardsApi = (*DashboardsApiService)(&c.common) c.DummyApi = (*DummyApiService)(&c.common) c.EventApi = (*EventApiService)(&c.common) c.ExportApi = (*ExportApiService)(&c.common) diff --git a/generated/stackstate_api/docs/CreateSubject.md b/generated/stackstate_api/docs/CreateSubject.md deleted file mode 100644 index f23d9868..00000000 --- a/generated/stackstate_api/docs/CreateSubject.md +++ /dev/null @@ -1,72 +0,0 @@ -# CreateSubject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Query** | **string** | | -**Version** | **string** | | - -## Methods - -### NewCreateSubject - -`func NewCreateSubject(query string, version string, ) *CreateSubject` - -NewCreateSubject instantiates a new CreateSubject 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 - -### NewCreateSubjectWithDefaults - -`func NewCreateSubjectWithDefaults() *CreateSubject` - -NewCreateSubjectWithDefaults instantiates a new CreateSubject 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 - -### GetQuery - -`func (o *CreateSubject) GetQuery() string` - -GetQuery returns the Query field if non-nil, zero value otherwise. - -### GetQueryOk - -`func (o *CreateSubject) GetQueryOk() (*string, bool)` - -GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetQuery - -`func (o *CreateSubject) SetQuery(v string)` - -SetQuery sets Query field to given value. - - -### GetVersion - -`func (o *CreateSubject) GetVersion() string` - -GetVersion returns the Version field if non-nil, zero value otherwise. - -### GetVersionOk - -`func (o *CreateSubject) 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 *CreateSubject) SetVersion(v string)` - -SetVersion sets Version 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/DashboardAuthorizationError.md b/generated/stackstate_api/docs/DashboardAuthorizationError.md new file mode 100644 index 00000000..ba13f7d6 --- /dev/null +++ b/generated/stackstate_api/docs/DashboardAuthorizationError.md @@ -0,0 +1,93 @@ +# DashboardAuthorizationError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | A detailed error message describing why the operation failed. | +**DashboardIdOrUrn** | **string** | | +**UserName** | **string** | | + +## Methods + +### NewDashboardAuthorizationError + +`func NewDashboardAuthorizationError(message string, dashboardIdOrUrn string, userName string, ) *DashboardAuthorizationError` + +NewDashboardAuthorizationError instantiates a new DashboardAuthorizationError 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 + +### NewDashboardAuthorizationErrorWithDefaults + +`func NewDashboardAuthorizationErrorWithDefaults() *DashboardAuthorizationError` + +NewDashboardAuthorizationErrorWithDefaults instantiates a new DashboardAuthorizationError 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 + +### GetMessage + +`func (o *DashboardAuthorizationError) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DashboardAuthorizationError) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DashboardAuthorizationError) SetMessage(v string)` + +SetMessage sets Message field to given value. + + +### GetDashboardIdOrUrn + +`func (o *DashboardAuthorizationError) GetDashboardIdOrUrn() string` + +GetDashboardIdOrUrn returns the DashboardIdOrUrn field if non-nil, zero value otherwise. + +### GetDashboardIdOrUrnOk + +`func (o *DashboardAuthorizationError) GetDashboardIdOrUrnOk() (*string, bool)` + +GetDashboardIdOrUrnOk returns a tuple with the DashboardIdOrUrn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDashboardIdOrUrn + +`func (o *DashboardAuthorizationError) SetDashboardIdOrUrn(v string)` + +SetDashboardIdOrUrn sets DashboardIdOrUrn field to given value. + + +### GetUserName + +`func (o *DashboardAuthorizationError) GetUserName() string` + +GetUserName returns the UserName field if non-nil, zero value otherwise. + +### GetUserNameOk + +`func (o *DashboardAuthorizationError) GetUserNameOk() (*string, bool)` + +GetUserNameOk returns a tuple with the UserName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserName + +`func (o *DashboardAuthorizationError) SetUserName(v string)` + +SetUserName sets UserName 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/DashboardClientErrors.md b/generated/stackstate_api/docs/DashboardClientErrors.md new file mode 100644 index 00000000..cab1dfe3 --- /dev/null +++ b/generated/stackstate_api/docs/DashboardClientErrors.md @@ -0,0 +1,93 @@ +# DashboardClientErrors + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Message** | **string** | A detailed error message describing why the operation failed. | +**DashboardIdOrUrn** | **string** | | + +## Methods + +### NewDashboardClientErrors + +`func NewDashboardClientErrors(type_ string, message string, dashboardIdOrUrn string, ) *DashboardClientErrors` + +NewDashboardClientErrors instantiates a new DashboardClientErrors 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 + +### NewDashboardClientErrorsWithDefaults + +`func NewDashboardClientErrorsWithDefaults() *DashboardClientErrors` + +NewDashboardClientErrorsWithDefaults instantiates a new DashboardClientErrors object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *DashboardClientErrors) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DashboardClientErrors) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DashboardClientErrors) SetType(v string)` + +SetType sets Type field to given value. + + +### GetMessage + +`func (o *DashboardClientErrors) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DashboardClientErrors) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DashboardClientErrors) SetMessage(v string)` + +SetMessage sets Message field to given value. + + +### GetDashboardIdOrUrn + +`func (o *DashboardClientErrors) GetDashboardIdOrUrn() string` + +GetDashboardIdOrUrn returns the DashboardIdOrUrn field if non-nil, zero value otherwise. + +### GetDashboardIdOrUrnOk + +`func (o *DashboardClientErrors) GetDashboardIdOrUrnOk() (*string, bool)` + +GetDashboardIdOrUrnOk returns a tuple with the DashboardIdOrUrn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDashboardIdOrUrn + +`func (o *DashboardClientErrors) SetDashboardIdOrUrn(v string)` + +SetDashboardIdOrUrn sets DashboardIdOrUrn 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/DashboardCloneSchema.md b/generated/stackstate_api/docs/DashboardCloneSchema.md new file mode 100644 index 00000000..7e6fc344 --- /dev/null +++ b/generated/stackstate_api/docs/DashboardCloneSchema.md @@ -0,0 +1,129 @@ +# DashboardCloneSchema + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the dashboard. Required to make it easier so see which dashboard is the new (cloned) dashboard. | +**Description** | Pointer to **string** | Description of the dashboard | [optional] +**Scope** | Pointer to [**DashboardScope**](DashboardScope.md) | | [optional] +**Dashboard** | Pointer to [**PersesDashboard**](PersesDashboard.md) | | [optional] + +## Methods + +### NewDashboardCloneSchema + +`func NewDashboardCloneSchema(name string, ) *DashboardCloneSchema` + +NewDashboardCloneSchema instantiates a new DashboardCloneSchema 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 + +### NewDashboardCloneSchemaWithDefaults + +`func NewDashboardCloneSchemaWithDefaults() *DashboardCloneSchema` + +NewDashboardCloneSchemaWithDefaults instantiates a new DashboardCloneSchema 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 *DashboardCloneSchema) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DashboardCloneSchema) 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 *DashboardCloneSchema) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *DashboardCloneSchema) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *DashboardCloneSchema) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *DashboardCloneSchema) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *DashboardCloneSchema) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetScope + +`func (o *DashboardCloneSchema) GetScope() DashboardScope` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *DashboardCloneSchema) GetScopeOk() (*DashboardScope, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *DashboardCloneSchema) SetScope(v DashboardScope)` + +SetScope sets Scope field to given value. + +### HasScope + +`func (o *DashboardCloneSchema) HasScope() bool` + +HasScope returns a boolean if a field has been set. + +### GetDashboard + +`func (o *DashboardCloneSchema) GetDashboard() PersesDashboard` + +GetDashboard returns the Dashboard field if non-nil, zero value otherwise. + +### GetDashboardOk + +`func (o *DashboardCloneSchema) GetDashboardOk() (*PersesDashboard, bool)` + +GetDashboardOk returns a tuple with the Dashboard field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDashboard + +`func (o *DashboardCloneSchema) SetDashboard(v PersesDashboard)` + +SetDashboard sets Dashboard field to given value. + +### HasDashboard + +`func (o *DashboardCloneSchema) HasDashboard() bool` + +HasDashboard 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/DashboardInvalidIdentifierError.md b/generated/stackstate_api/docs/DashboardInvalidIdentifierError.md new file mode 100644 index 00000000..341a1527 --- /dev/null +++ b/generated/stackstate_api/docs/DashboardInvalidIdentifierError.md @@ -0,0 +1,93 @@ +# DashboardInvalidIdentifierError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Message** | **string** | A detailed error message describing why the operation failed. | +**DashboardIdOrUrn** | **string** | | + +## Methods + +### NewDashboardInvalidIdentifierError + +`func NewDashboardInvalidIdentifierError(type_ string, message string, dashboardIdOrUrn string, ) *DashboardInvalidIdentifierError` + +NewDashboardInvalidIdentifierError instantiates a new DashboardInvalidIdentifierError 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 + +### NewDashboardInvalidIdentifierErrorWithDefaults + +`func NewDashboardInvalidIdentifierErrorWithDefaults() *DashboardInvalidIdentifierError` + +NewDashboardInvalidIdentifierErrorWithDefaults instantiates a new DashboardInvalidIdentifierError object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *DashboardInvalidIdentifierError) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DashboardInvalidIdentifierError) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DashboardInvalidIdentifierError) SetType(v string)` + +SetType sets Type field to given value. + + +### GetMessage + +`func (o *DashboardInvalidIdentifierError) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DashboardInvalidIdentifierError) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DashboardInvalidIdentifierError) SetMessage(v string)` + +SetMessage sets Message field to given value. + + +### GetDashboardIdOrUrn + +`func (o *DashboardInvalidIdentifierError) GetDashboardIdOrUrn() string` + +GetDashboardIdOrUrn returns the DashboardIdOrUrn field if non-nil, zero value otherwise. + +### GetDashboardIdOrUrnOk + +`func (o *DashboardInvalidIdentifierError) GetDashboardIdOrUrnOk() (*string, bool)` + +GetDashboardIdOrUrnOk returns a tuple with the DashboardIdOrUrn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDashboardIdOrUrn + +`func (o *DashboardInvalidIdentifierError) SetDashboardIdOrUrn(v string)` + +SetDashboardIdOrUrn sets DashboardIdOrUrn 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/DashboardList.md b/generated/stackstate_api/docs/DashboardList.md new file mode 100644 index 00000000..137761d6 --- /dev/null +++ b/generated/stackstate_api/docs/DashboardList.md @@ -0,0 +1,51 @@ +# DashboardList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Dashboards** | [**[]DashboardReadSchema**](DashboardReadSchema.md) | List of dashboards, which can be either metadata or full representations. | + +## Methods + +### NewDashboardList + +`func NewDashboardList(dashboards []DashboardReadSchema, ) *DashboardList` + +NewDashboardList instantiates a new DashboardList 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 + +### NewDashboardListWithDefaults + +`func NewDashboardListWithDefaults() *DashboardList` + +NewDashboardListWithDefaults instantiates a new DashboardList 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 + +### GetDashboards + +`func (o *DashboardList) GetDashboards() []DashboardReadSchema` + +GetDashboards returns the Dashboards field if non-nil, zero value otherwise. + +### GetDashboardsOk + +`func (o *DashboardList) GetDashboardsOk() (*[]DashboardReadSchema, bool)` + +GetDashboardsOk returns a tuple with the Dashboards field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDashboards + +`func (o *DashboardList) SetDashboards(v []DashboardReadSchema)` + +SetDashboards sets Dashboards 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/DashboardNotFoundError.md b/generated/stackstate_api/docs/DashboardNotFoundError.md new file mode 100644 index 00000000..bbd00918 --- /dev/null +++ b/generated/stackstate_api/docs/DashboardNotFoundError.md @@ -0,0 +1,72 @@ +# DashboardNotFoundError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | A detailed error message describing why the operation failed. | +**DashboardIdOrUrn** | **string** | | + +## Methods + +### NewDashboardNotFoundError + +`func NewDashboardNotFoundError(message string, dashboardIdOrUrn string, ) *DashboardNotFoundError` + +NewDashboardNotFoundError instantiates a new DashboardNotFoundError 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 + +### NewDashboardNotFoundErrorWithDefaults + +`func NewDashboardNotFoundErrorWithDefaults() *DashboardNotFoundError` + +NewDashboardNotFoundErrorWithDefaults instantiates a new DashboardNotFoundError 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 + +### GetMessage + +`func (o *DashboardNotFoundError) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DashboardNotFoundError) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DashboardNotFoundError) SetMessage(v string)` + +SetMessage sets Message field to given value. + + +### GetDashboardIdOrUrn + +`func (o *DashboardNotFoundError) GetDashboardIdOrUrn() string` + +GetDashboardIdOrUrn returns the DashboardIdOrUrn field if non-nil, zero value otherwise. + +### GetDashboardIdOrUrnOk + +`func (o *DashboardNotFoundError) GetDashboardIdOrUrnOk() (*string, bool)` + +GetDashboardIdOrUrnOk returns a tuple with the DashboardIdOrUrn field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDashboardIdOrUrn + +`func (o *DashboardNotFoundError) SetDashboardIdOrUrn(v string)` + +SetDashboardIdOrUrn sets DashboardIdOrUrn 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/DashboardPatchSchema.md b/generated/stackstate_api/docs/DashboardPatchSchema.md new file mode 100644 index 00000000..b6a7bea3 --- /dev/null +++ b/generated/stackstate_api/docs/DashboardPatchSchema.md @@ -0,0 +1,134 @@ +# DashboardPatchSchema + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | Name of the dashboard | [optional] +**Description** | Pointer to **string** | Description of the dashboard | [optional] +**Scope** | Pointer to [**DashboardScope**](DashboardScope.md) | | [optional] +**Dashboard** | Pointer to [**PersesDashboard**](PersesDashboard.md) | | [optional] + +## Methods + +### NewDashboardPatchSchema + +`func NewDashboardPatchSchema() *DashboardPatchSchema` + +NewDashboardPatchSchema instantiates a new DashboardPatchSchema 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 + +### NewDashboardPatchSchemaWithDefaults + +`func NewDashboardPatchSchemaWithDefaults() *DashboardPatchSchema` + +NewDashboardPatchSchemaWithDefaults instantiates a new DashboardPatchSchema 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 *DashboardPatchSchema) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DashboardPatchSchema) 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 *DashboardPatchSchema) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *DashboardPatchSchema) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *DashboardPatchSchema) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *DashboardPatchSchema) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *DashboardPatchSchema) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *DashboardPatchSchema) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetScope + +`func (o *DashboardPatchSchema) GetScope() DashboardScope` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *DashboardPatchSchema) GetScopeOk() (*DashboardScope, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *DashboardPatchSchema) SetScope(v DashboardScope)` + +SetScope sets Scope field to given value. + +### HasScope + +`func (o *DashboardPatchSchema) HasScope() bool` + +HasScope returns a boolean if a field has been set. + +### GetDashboard + +`func (o *DashboardPatchSchema) GetDashboard() PersesDashboard` + +GetDashboard returns the Dashboard field if non-nil, zero value otherwise. + +### GetDashboardOk + +`func (o *DashboardPatchSchema) GetDashboardOk() (*PersesDashboard, bool)` + +GetDashboardOk returns a tuple with the Dashboard field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDashboard + +`func (o *DashboardPatchSchema) SetDashboard(v PersesDashboard)` + +SetDashboard sets Dashboard field to given value. + +### HasDashboard + +`func (o *DashboardPatchSchema) HasDashboard() bool` + +HasDashboard 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/DashboardReadBaseSchema.md b/generated/stackstate_api/docs/DashboardReadBaseSchema.md new file mode 100644 index 00000000..a57cb226 --- /dev/null +++ b/generated/stackstate_api/docs/DashboardReadBaseSchema.md @@ -0,0 +1,203 @@ +# DashboardReadBaseSchema + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Identifier** | **string** | The identifier of a dashboard. Either the system/graph ID or URN of the resource. | +**Id** | **int64** | | +**Name** | **string** | Name of the dashboard | +**Description** | **string** | Description of the dashboard | +**Scope** | [**DashboardScope**](DashboardScope.md) | | +**OwnerId** | Pointer to **int64** | The user id of the dashboard owner. A dashboard was either created by a user or from a StackPack. For a user, the identifier will be the system/graph ID, and for a StackPack, the field will be empty/omitted. | [optional] +**LastUpdateTimestamp** | **int64** | | + +## Methods + +### NewDashboardReadBaseSchema + +`func NewDashboardReadBaseSchema(type_ string, identifier string, id int64, name string, description string, scope DashboardScope, lastUpdateTimestamp int64, ) *DashboardReadBaseSchema` + +NewDashboardReadBaseSchema instantiates a new DashboardReadBaseSchema 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 + +### NewDashboardReadBaseSchemaWithDefaults + +`func NewDashboardReadBaseSchemaWithDefaults() *DashboardReadBaseSchema` + +NewDashboardReadBaseSchemaWithDefaults instantiates a new DashboardReadBaseSchema object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *DashboardReadBaseSchema) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DashboardReadBaseSchema) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DashboardReadBaseSchema) SetType(v string)` + +SetType sets Type field to given value. + + +### GetIdentifier + +`func (o *DashboardReadBaseSchema) GetIdentifier() string` + +GetIdentifier returns the Identifier field if non-nil, zero value otherwise. + +### GetIdentifierOk + +`func (o *DashboardReadBaseSchema) GetIdentifierOk() (*string, bool)` + +GetIdentifierOk returns a tuple with the Identifier field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentifier + +`func (o *DashboardReadBaseSchema) SetIdentifier(v string)` + +SetIdentifier sets Identifier field to given value. + + +### GetId + +`func (o *DashboardReadBaseSchema) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DashboardReadBaseSchema) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *DashboardReadBaseSchema) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *DashboardReadBaseSchema) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DashboardReadBaseSchema) 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 *DashboardReadBaseSchema) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *DashboardReadBaseSchema) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *DashboardReadBaseSchema) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *DashboardReadBaseSchema) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetScope + +`func (o *DashboardReadBaseSchema) GetScope() DashboardScope` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *DashboardReadBaseSchema) GetScopeOk() (*DashboardScope, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *DashboardReadBaseSchema) SetScope(v DashboardScope)` + +SetScope sets Scope field to given value. + + +### GetOwnerId + +`func (o *DashboardReadBaseSchema) GetOwnerId() int64` + +GetOwnerId returns the OwnerId field if non-nil, zero value otherwise. + +### GetOwnerIdOk + +`func (o *DashboardReadBaseSchema) GetOwnerIdOk() (*int64, bool)` + +GetOwnerIdOk returns a tuple with the OwnerId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwnerId + +`func (o *DashboardReadBaseSchema) SetOwnerId(v int64)` + +SetOwnerId sets OwnerId field to given value. + +### HasOwnerId + +`func (o *DashboardReadBaseSchema) HasOwnerId() bool` + +HasOwnerId returns a boolean if a field has been set. + +### GetLastUpdateTimestamp + +`func (o *DashboardReadBaseSchema) GetLastUpdateTimestamp() int64` + +GetLastUpdateTimestamp returns the LastUpdateTimestamp field if non-nil, zero value otherwise. + +### GetLastUpdateTimestampOk + +`func (o *DashboardReadBaseSchema) GetLastUpdateTimestampOk() (*int64, bool)` + +GetLastUpdateTimestampOk returns a tuple with the LastUpdateTimestamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastUpdateTimestamp + +`func (o *DashboardReadBaseSchema) SetLastUpdateTimestamp(v int64)` + +SetLastUpdateTimestamp sets LastUpdateTimestamp 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/DashboardReadFullSchema.md b/generated/stackstate_api/docs/DashboardReadFullSchema.md new file mode 100644 index 00000000..fd0241ec --- /dev/null +++ b/generated/stackstate_api/docs/DashboardReadFullSchema.md @@ -0,0 +1,224 @@ +# DashboardReadFullSchema + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Identifier** | **string** | The identifier of a dashboard. Either the system/graph ID or URN of the resource. | +**Id** | **int64** | | +**Name** | **string** | Name of the dashboard | +**Description** | **string** | Description of the dashboard | +**Scope** | [**DashboardScope**](DashboardScope.md) | | +**OwnerId** | Pointer to **int64** | The user id of the dashboard owner. A dashboard was either created by a user or from a StackPack. For a user, the identifier will be the system/graph ID, and for a StackPack, the field will be empty/omitted. | [optional] +**LastUpdateTimestamp** | **int64** | | +**Dashboard** | [**PersesDashboard**](PersesDashboard.md) | | + +## Methods + +### NewDashboardReadFullSchema + +`func NewDashboardReadFullSchema(type_ string, identifier string, id int64, name string, description string, scope DashboardScope, lastUpdateTimestamp int64, dashboard PersesDashboard, ) *DashboardReadFullSchema` + +NewDashboardReadFullSchema instantiates a new DashboardReadFullSchema 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 + +### NewDashboardReadFullSchemaWithDefaults + +`func NewDashboardReadFullSchemaWithDefaults() *DashboardReadFullSchema` + +NewDashboardReadFullSchemaWithDefaults instantiates a new DashboardReadFullSchema object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *DashboardReadFullSchema) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DashboardReadFullSchema) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DashboardReadFullSchema) SetType(v string)` + +SetType sets Type field to given value. + + +### GetIdentifier + +`func (o *DashboardReadFullSchema) GetIdentifier() string` + +GetIdentifier returns the Identifier field if non-nil, zero value otherwise. + +### GetIdentifierOk + +`func (o *DashboardReadFullSchema) GetIdentifierOk() (*string, bool)` + +GetIdentifierOk returns a tuple with the Identifier field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentifier + +`func (o *DashboardReadFullSchema) SetIdentifier(v string)` + +SetIdentifier sets Identifier field to given value. + + +### GetId + +`func (o *DashboardReadFullSchema) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DashboardReadFullSchema) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *DashboardReadFullSchema) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *DashboardReadFullSchema) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DashboardReadFullSchema) 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 *DashboardReadFullSchema) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *DashboardReadFullSchema) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *DashboardReadFullSchema) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *DashboardReadFullSchema) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetScope + +`func (o *DashboardReadFullSchema) GetScope() DashboardScope` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *DashboardReadFullSchema) GetScopeOk() (*DashboardScope, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *DashboardReadFullSchema) SetScope(v DashboardScope)` + +SetScope sets Scope field to given value. + + +### GetOwnerId + +`func (o *DashboardReadFullSchema) GetOwnerId() int64` + +GetOwnerId returns the OwnerId field if non-nil, zero value otherwise. + +### GetOwnerIdOk + +`func (o *DashboardReadFullSchema) GetOwnerIdOk() (*int64, bool)` + +GetOwnerIdOk returns a tuple with the OwnerId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwnerId + +`func (o *DashboardReadFullSchema) SetOwnerId(v int64)` + +SetOwnerId sets OwnerId field to given value. + +### HasOwnerId + +`func (o *DashboardReadFullSchema) HasOwnerId() bool` + +HasOwnerId returns a boolean if a field has been set. + +### GetLastUpdateTimestamp + +`func (o *DashboardReadFullSchema) GetLastUpdateTimestamp() int64` + +GetLastUpdateTimestamp returns the LastUpdateTimestamp field if non-nil, zero value otherwise. + +### GetLastUpdateTimestampOk + +`func (o *DashboardReadFullSchema) GetLastUpdateTimestampOk() (*int64, bool)` + +GetLastUpdateTimestampOk returns a tuple with the LastUpdateTimestamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastUpdateTimestamp + +`func (o *DashboardReadFullSchema) SetLastUpdateTimestamp(v int64)` + +SetLastUpdateTimestamp sets LastUpdateTimestamp field to given value. + + +### GetDashboard + +`func (o *DashboardReadFullSchema) GetDashboard() PersesDashboard` + +GetDashboard returns the Dashboard field if non-nil, zero value otherwise. + +### GetDashboardOk + +`func (o *DashboardReadFullSchema) GetDashboardOk() (*PersesDashboard, bool)` + +GetDashboardOk returns a tuple with the Dashboard field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDashboard + +`func (o *DashboardReadFullSchema) SetDashboard(v PersesDashboard)` + +SetDashboard sets Dashboard 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/DashboardReadFullSchemaAllOf.md b/generated/stackstate_api/docs/DashboardReadFullSchemaAllOf.md new file mode 100644 index 00000000..36f99ed9 --- /dev/null +++ b/generated/stackstate_api/docs/DashboardReadFullSchemaAllOf.md @@ -0,0 +1,77 @@ +# DashboardReadFullSchemaAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] +**Dashboard** | [**PersesDashboard**](PersesDashboard.md) | | + +## Methods + +### NewDashboardReadFullSchemaAllOf + +`func NewDashboardReadFullSchemaAllOf(dashboard PersesDashboard, ) *DashboardReadFullSchemaAllOf` + +NewDashboardReadFullSchemaAllOf instantiates a new DashboardReadFullSchemaAllOf 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 + +### NewDashboardReadFullSchemaAllOfWithDefaults + +`func NewDashboardReadFullSchemaAllOfWithDefaults() *DashboardReadFullSchemaAllOf` + +NewDashboardReadFullSchemaAllOfWithDefaults instantiates a new DashboardReadFullSchemaAllOf object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *DashboardReadFullSchemaAllOf) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DashboardReadFullSchemaAllOf) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DashboardReadFullSchemaAllOf) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *DashboardReadFullSchemaAllOf) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetDashboard + +`func (o *DashboardReadFullSchemaAllOf) GetDashboard() PersesDashboard` + +GetDashboard returns the Dashboard field if non-nil, zero value otherwise. + +### GetDashboardOk + +`func (o *DashboardReadFullSchemaAllOf) GetDashboardOk() (*PersesDashboard, bool)` + +GetDashboardOk returns a tuple with the Dashboard field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDashboard + +`func (o *DashboardReadFullSchemaAllOf) SetDashboard(v PersesDashboard)` + +SetDashboard sets Dashboard 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/DashboardReadMetadataSchema.md b/generated/stackstate_api/docs/DashboardReadMetadataSchema.md new file mode 100644 index 00000000..422681ee --- /dev/null +++ b/generated/stackstate_api/docs/DashboardReadMetadataSchema.md @@ -0,0 +1,203 @@ +# DashboardReadMetadataSchema + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Identifier** | **string** | The identifier of a dashboard. Either the system/graph ID or URN of the resource. | +**Id** | **int64** | | +**Name** | **string** | Name of the dashboard | +**Description** | **string** | Description of the dashboard | +**Scope** | [**DashboardScope**](DashboardScope.md) | | +**OwnerId** | Pointer to **int64** | The user id of the dashboard owner. A dashboard was either created by a user or from a StackPack. For a user, the identifier will be the system/graph ID, and for a StackPack, the field will be empty/omitted. | [optional] +**LastUpdateTimestamp** | **int64** | | + +## Methods + +### NewDashboardReadMetadataSchema + +`func NewDashboardReadMetadataSchema(type_ string, identifier string, id int64, name string, description string, scope DashboardScope, lastUpdateTimestamp int64, ) *DashboardReadMetadataSchema` + +NewDashboardReadMetadataSchema instantiates a new DashboardReadMetadataSchema 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 + +### NewDashboardReadMetadataSchemaWithDefaults + +`func NewDashboardReadMetadataSchemaWithDefaults() *DashboardReadMetadataSchema` + +NewDashboardReadMetadataSchemaWithDefaults instantiates a new DashboardReadMetadataSchema object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *DashboardReadMetadataSchema) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DashboardReadMetadataSchema) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DashboardReadMetadataSchema) SetType(v string)` + +SetType sets Type field to given value. + + +### GetIdentifier + +`func (o *DashboardReadMetadataSchema) GetIdentifier() string` + +GetIdentifier returns the Identifier field if non-nil, zero value otherwise. + +### GetIdentifierOk + +`func (o *DashboardReadMetadataSchema) GetIdentifierOk() (*string, bool)` + +GetIdentifierOk returns a tuple with the Identifier field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentifier + +`func (o *DashboardReadMetadataSchema) SetIdentifier(v string)` + +SetIdentifier sets Identifier field to given value. + + +### GetId + +`func (o *DashboardReadMetadataSchema) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DashboardReadMetadataSchema) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *DashboardReadMetadataSchema) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *DashboardReadMetadataSchema) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DashboardReadMetadataSchema) 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 *DashboardReadMetadataSchema) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *DashboardReadMetadataSchema) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *DashboardReadMetadataSchema) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *DashboardReadMetadataSchema) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetScope + +`func (o *DashboardReadMetadataSchema) GetScope() DashboardScope` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *DashboardReadMetadataSchema) GetScopeOk() (*DashboardScope, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *DashboardReadMetadataSchema) SetScope(v DashboardScope)` + +SetScope sets Scope field to given value. + + +### GetOwnerId + +`func (o *DashboardReadMetadataSchema) GetOwnerId() int64` + +GetOwnerId returns the OwnerId field if non-nil, zero value otherwise. + +### GetOwnerIdOk + +`func (o *DashboardReadMetadataSchema) GetOwnerIdOk() (*int64, bool)` + +GetOwnerIdOk returns a tuple with the OwnerId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwnerId + +`func (o *DashboardReadMetadataSchema) SetOwnerId(v int64)` + +SetOwnerId sets OwnerId field to given value. + +### HasOwnerId + +`func (o *DashboardReadMetadataSchema) HasOwnerId() bool` + +HasOwnerId returns a boolean if a field has been set. + +### GetLastUpdateTimestamp + +`func (o *DashboardReadMetadataSchema) GetLastUpdateTimestamp() int64` + +GetLastUpdateTimestamp returns the LastUpdateTimestamp field if non-nil, zero value otherwise. + +### GetLastUpdateTimestampOk + +`func (o *DashboardReadMetadataSchema) GetLastUpdateTimestampOk() (*int64, bool)` + +GetLastUpdateTimestampOk returns a tuple with the LastUpdateTimestamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastUpdateTimestamp + +`func (o *DashboardReadMetadataSchema) SetLastUpdateTimestamp(v int64)` + +SetLastUpdateTimestamp sets LastUpdateTimestamp 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/DashboardReadMetadataSchemaAllOf.md b/generated/stackstate_api/docs/DashboardReadMetadataSchemaAllOf.md new file mode 100644 index 00000000..1c417cef --- /dev/null +++ b/generated/stackstate_api/docs/DashboardReadMetadataSchemaAllOf.md @@ -0,0 +1,56 @@ +# DashboardReadMetadataSchemaAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | | [optional] + +## Methods + +### NewDashboardReadMetadataSchemaAllOf + +`func NewDashboardReadMetadataSchemaAllOf() *DashboardReadMetadataSchemaAllOf` + +NewDashboardReadMetadataSchemaAllOf instantiates a new DashboardReadMetadataSchemaAllOf 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 + +### NewDashboardReadMetadataSchemaAllOfWithDefaults + +`func NewDashboardReadMetadataSchemaAllOfWithDefaults() *DashboardReadMetadataSchemaAllOf` + +NewDashboardReadMetadataSchemaAllOfWithDefaults instantiates a new DashboardReadMetadataSchemaAllOf object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *DashboardReadMetadataSchemaAllOf) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DashboardReadMetadataSchemaAllOf) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DashboardReadMetadataSchemaAllOf) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *DashboardReadMetadataSchemaAllOf) HasType() bool` + +HasType 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/DashboardReadSchema.md b/generated/stackstate_api/docs/DashboardReadSchema.md new file mode 100644 index 00000000..a21826f7 --- /dev/null +++ b/generated/stackstate_api/docs/DashboardReadSchema.md @@ -0,0 +1,224 @@ +# DashboardReadSchema + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Identifier** | **string** | The identifier of a dashboard. Either the system/graph ID or URN of the resource. | +**Id** | **int64** | | +**Name** | **string** | Name of the dashboard | +**Description** | **string** | Description of the dashboard | +**Scope** | [**DashboardScope**](DashboardScope.md) | | +**OwnerId** | Pointer to **int64** | The user id of the dashboard owner. A dashboard was either created by a user or from a StackPack. For a user, the identifier will be the system/graph ID, and for a StackPack, the field will be empty/omitted. | [optional] +**LastUpdateTimestamp** | **int64** | | +**Dashboard** | [**PersesDashboard**](PersesDashboard.md) | | + +## Methods + +### NewDashboardReadSchema + +`func NewDashboardReadSchema(type_ string, identifier string, id int64, name string, description string, scope DashboardScope, lastUpdateTimestamp int64, dashboard PersesDashboard, ) *DashboardReadSchema` + +NewDashboardReadSchema instantiates a new DashboardReadSchema 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 + +### NewDashboardReadSchemaWithDefaults + +`func NewDashboardReadSchemaWithDefaults() *DashboardReadSchema` + +NewDashboardReadSchemaWithDefaults instantiates a new DashboardReadSchema object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *DashboardReadSchema) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DashboardReadSchema) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DashboardReadSchema) SetType(v string)` + +SetType sets Type field to given value. + + +### GetIdentifier + +`func (o *DashboardReadSchema) GetIdentifier() string` + +GetIdentifier returns the Identifier field if non-nil, zero value otherwise. + +### GetIdentifierOk + +`func (o *DashboardReadSchema) GetIdentifierOk() (*string, bool)` + +GetIdentifierOk returns a tuple with the Identifier field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentifier + +`func (o *DashboardReadSchema) SetIdentifier(v string)` + +SetIdentifier sets Identifier field to given value. + + +### GetId + +`func (o *DashboardReadSchema) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DashboardReadSchema) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *DashboardReadSchema) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *DashboardReadSchema) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DashboardReadSchema) 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 *DashboardReadSchema) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *DashboardReadSchema) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *DashboardReadSchema) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *DashboardReadSchema) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetScope + +`func (o *DashboardReadSchema) GetScope() DashboardScope` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *DashboardReadSchema) GetScopeOk() (*DashboardScope, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *DashboardReadSchema) SetScope(v DashboardScope)` + +SetScope sets Scope field to given value. + + +### GetOwnerId + +`func (o *DashboardReadSchema) GetOwnerId() int64` + +GetOwnerId returns the OwnerId field if non-nil, zero value otherwise. + +### GetOwnerIdOk + +`func (o *DashboardReadSchema) GetOwnerIdOk() (*int64, bool)` + +GetOwnerIdOk returns a tuple with the OwnerId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwnerId + +`func (o *DashboardReadSchema) SetOwnerId(v int64)` + +SetOwnerId sets OwnerId field to given value. + +### HasOwnerId + +`func (o *DashboardReadSchema) HasOwnerId() bool` + +HasOwnerId returns a boolean if a field has been set. + +### GetLastUpdateTimestamp + +`func (o *DashboardReadSchema) GetLastUpdateTimestamp() int64` + +GetLastUpdateTimestamp returns the LastUpdateTimestamp field if non-nil, zero value otherwise. + +### GetLastUpdateTimestampOk + +`func (o *DashboardReadSchema) GetLastUpdateTimestampOk() (*int64, bool)` + +GetLastUpdateTimestampOk returns a tuple with the LastUpdateTimestamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastUpdateTimestamp + +`func (o *DashboardReadSchema) SetLastUpdateTimestamp(v int64)` + +SetLastUpdateTimestamp sets LastUpdateTimestamp field to given value. + + +### GetDashboard + +`func (o *DashboardReadSchema) GetDashboard() PersesDashboard` + +GetDashboard returns the Dashboard field if non-nil, zero value otherwise. + +### GetDashboardOk + +`func (o *DashboardReadSchema) GetDashboardOk() (*PersesDashboard, bool)` + +GetDashboardOk returns a tuple with the Dashboard field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDashboard + +`func (o *DashboardReadSchema) SetDashboard(v PersesDashboard)` + +SetDashboard sets Dashboard 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/DashboardScope.md b/generated/stackstate_api/docs/DashboardScope.md new file mode 100644 index 00000000..ff3a13bc --- /dev/null +++ b/generated/stackstate_api/docs/DashboardScope.md @@ -0,0 +1,13 @@ +# DashboardScope + +## Enum + + +* `PUBLIC_DASHBOARD` (value: `"publicDashboard"`) + +* `PRIVATE_DASHBOARD` (value: `"privateDashboard"`) + + +[[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/DashboardValidationError.md b/generated/stackstate_api/docs/DashboardValidationError.md new file mode 100644 index 00000000..92963bba --- /dev/null +++ b/generated/stackstate_api/docs/DashboardValidationError.md @@ -0,0 +1,72 @@ +# DashboardValidationError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Message** | **string** | A detailed error message describing why the operation failed. | + +## Methods + +### NewDashboardValidationError + +`func NewDashboardValidationError(type_ string, message string, ) *DashboardValidationError` + +NewDashboardValidationError instantiates a new DashboardValidationError 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 + +### NewDashboardValidationErrorWithDefaults + +`func NewDashboardValidationErrorWithDefaults() *DashboardValidationError` + +NewDashboardValidationErrorWithDefaults instantiates a new DashboardValidationError object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *DashboardValidationError) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DashboardValidationError) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DashboardValidationError) SetType(v string)` + +SetType sets Type field to given value. + + +### GetMessage + +`func (o *DashboardValidationError) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DashboardValidationError) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DashboardValidationError) SetMessage(v string)` + +SetMessage sets Message field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/stackstate_api/docs/DashboardWriteSchema.md b/generated/stackstate_api/docs/DashboardWriteSchema.md new file mode 100644 index 00000000..bda6c09d --- /dev/null +++ b/generated/stackstate_api/docs/DashboardWriteSchema.md @@ -0,0 +1,114 @@ +# DashboardWriteSchema + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the dashboard | +**Description** | **string** | Description of the dashboard | +**Scope** | [**DashboardScope**](DashboardScope.md) | | +**Dashboard** | [**PersesDashboard**](PersesDashboard.md) | | + +## Methods + +### NewDashboardWriteSchema + +`func NewDashboardWriteSchema(name string, description string, scope DashboardScope, dashboard PersesDashboard, ) *DashboardWriteSchema` + +NewDashboardWriteSchema instantiates a new DashboardWriteSchema 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 + +### NewDashboardWriteSchemaWithDefaults + +`func NewDashboardWriteSchemaWithDefaults() *DashboardWriteSchema` + +NewDashboardWriteSchemaWithDefaults instantiates a new DashboardWriteSchema 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 *DashboardWriteSchema) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DashboardWriteSchema) 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 *DashboardWriteSchema) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *DashboardWriteSchema) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *DashboardWriteSchema) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *DashboardWriteSchema) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetScope + +`func (o *DashboardWriteSchema) GetScope() DashboardScope` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *DashboardWriteSchema) GetScopeOk() (*DashboardScope, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *DashboardWriteSchema) SetScope(v DashboardScope)` + +SetScope sets Scope field to given value. + + +### GetDashboard + +`func (o *DashboardWriteSchema) GetDashboard() PersesDashboard` + +GetDashboard returns the Dashboard field if non-nil, zero value otherwise. + +### GetDashboardOk + +`func (o *DashboardWriteSchema) GetDashboardOk() (*PersesDashboard, bool)` + +GetDashboardOk returns a tuple with the Dashboard field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDashboard + +`func (o *DashboardWriteSchema) SetDashboard(v PersesDashboard)` + +SetDashboard sets Dashboard 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/DashboardsApi.md b/generated/stackstate_api/docs/DashboardsApi.md new file mode 100644 index 00000000..40afa889 --- /dev/null +++ b/generated/stackstate_api/docs/DashboardsApi.md @@ -0,0 +1,430 @@ +# \DashboardsApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CloneDashboard**](DashboardsApi.md#CloneDashboard) | **Post** /dashboards/{dashboardIdOrUrn}/clone | Clone a dashboard +[**CreateDashboard**](DashboardsApi.md#CreateDashboard) | **Post** /dashboards | Create a new dashboard +[**DeleteDashboard**](DashboardsApi.md#DeleteDashboard) | **Delete** /dashboards/{dashboardIdOrUrn} | Delete a dashboard +[**GetDashboard**](DashboardsApi.md#GetDashboard) | **Get** /dashboards/{dashboardIdOrUrn} | Get a single dashboard +[**GetDashboards**](DashboardsApi.md#GetDashboards) | **Get** /dashboards | Get a list of dashboards +[**PatchDashboard**](DashboardsApi.md#PatchDashboard) | **Patch** /dashboards/{dashboardIdOrUrn} | Patch a dashboard + + + +## CloneDashboard + +> DashboardReadFullSchema CloneDashboard(ctx, dashboardIdOrUrn).DashboardCloneSchema(dashboardCloneSchema).Execute() + +Clone a dashboard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + dashboardIdOrUrn := "dashboardIdOrUrn_example" // string | The identifier of a dashboard + dashboardCloneSchema := *openapiclient.NewDashboardCloneSchema("Name_example") // DashboardCloneSchema | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CloneDashboard(context.Background(), dashboardIdOrUrn).DashboardCloneSchema(dashboardCloneSchema).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CloneDashboard``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CloneDashboard`: DashboardReadFullSchema + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CloneDashboard`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dashboardIdOrUrn** | **string** | The identifier of a dashboard | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCloneDashboardRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **dashboardCloneSchema** | [**DashboardCloneSchema**](DashboardCloneSchema.md) | | + +### Return type + +[**DashboardReadFullSchema**](DashboardReadFullSchema.md) + +### Authorization + +[ApiToken](../README.md#ApiToken), [ServiceBearer](../README.md#ServiceBearer), [ServiceToken](../README.md#ServiceToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateDashboard + +> DashboardReadFullSchema CreateDashboard(ctx).DashboardWriteSchema(dashboardWriteSchema).Execute() + +Create a new dashboard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + dashboardWriteSchema := *openapiclient.NewDashboardWriteSchema("Name_example", "Description_example", openapiclient.DashboardScope("publicDashboard"), *openapiclient.NewPersesDashboard()) // DashboardWriteSchema | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.CreateDashboard(context.Background()).DashboardWriteSchema(dashboardWriteSchema).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.CreateDashboard``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateDashboard`: DashboardReadFullSchema + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.CreateDashboard`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateDashboardRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dashboardWriteSchema** | [**DashboardWriteSchema**](DashboardWriteSchema.md) | | + +### Return type + +[**DashboardReadFullSchema**](DashboardReadFullSchema.md) + +### Authorization + +[ApiToken](../README.md#ApiToken), [ServiceBearer](../README.md#ServiceBearer), [ServiceToken](../README.md#ServiceToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteDashboard + +> DeleteDashboard(ctx, dashboardIdOrUrn).Execute() + +Delete a dashboard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + dashboardIdOrUrn := "dashboardIdOrUrn_example" // string | The identifier of a dashboard + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.DeleteDashboard(context.Background(), dashboardIdOrUrn).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.DeleteDashboard``: %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. +**dashboardIdOrUrn** | **string** | The identifier of a dashboard | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteDashboardRequest 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) + + +## GetDashboard + +> DashboardReadSchema GetDashboard(ctx, dashboardIdOrUrn).LoadFullDashboard(loadFullDashboard).Execute() + +Get a single dashboard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + dashboardIdOrUrn := "dashboardIdOrUrn_example" // string | The identifier of a dashboard + loadFullDashboard := true // bool | If true, includes the full dashboard content in the response. Defaults to false (only metadata is returned) for retrieval endpoints. Defaults to true for create/update operations. (optional) (default to false) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.GetDashboard(context.Background(), dashboardIdOrUrn).LoadFullDashboard(loadFullDashboard).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.GetDashboard``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetDashboard`: DashboardReadSchema + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.GetDashboard`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dashboardIdOrUrn** | **string** | The identifier of a dashboard | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetDashboardRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **loadFullDashboard** | **bool** | If true, includes the full dashboard content in the response. Defaults to false (only metadata is returned) for retrieval endpoints. Defaults to true for create/update operations. | [default to false] + +### Return type + +[**DashboardReadSchema**](DashboardReadSchema.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) + + +## GetDashboards + +> DashboardList GetDashboards(ctx).LoadFullDashboard(loadFullDashboard).Execute() + +Get a list of dashboards + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + loadFullDashboard := true // bool | If true, includes the full dashboard content in the response. Defaults to false (only metadata is returned) for retrieval endpoints. Defaults to true for create/update operations. (optional) (default to false) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.GetDashboards(context.Background()).LoadFullDashboard(loadFullDashboard).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.GetDashboards``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetDashboards`: DashboardList + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.GetDashboards`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetDashboardsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loadFullDashboard** | **bool** | If true, includes the full dashboard content in the response. Defaults to false (only metadata is returned) for retrieval endpoints. Defaults to true for create/update operations. | [default to false] + +### Return type + +[**DashboardList**](DashboardList.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) + + +## PatchDashboard + +> DashboardReadFullSchema PatchDashboard(ctx, dashboardIdOrUrn).DashboardPatchSchema(dashboardPatchSchema).Execute() + +Patch a dashboard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + dashboardIdOrUrn := "dashboardIdOrUrn_example" // string | The identifier of a dashboard + dashboardPatchSchema := *openapiclient.NewDashboardPatchSchema() // DashboardPatchSchema | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DashboardsApi.PatchDashboard(context.Background(), dashboardIdOrUrn).DashboardPatchSchema(dashboardPatchSchema).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DashboardsApi.PatchDashboard``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PatchDashboard`: DashboardReadFullSchema + fmt.Fprintf(os.Stdout, "Response from `DashboardsApi.PatchDashboard`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dashboardIdOrUrn** | **string** | The identifier of a dashboard | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPatchDashboardRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **dashboardPatchSchema** | [**DashboardPatchSchema**](DashboardPatchSchema.md) | | + +### Return type + +[**DashboardReadFullSchema**](DashboardReadFullSchema.md) + +### Authorization + +[ApiToken](../README.md#ApiToken), [ServiceBearer](../README.md#ServiceBearer), [ServiceToken](../README.md#ServiceToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/generated/stackstate_api/docs/KubernetesLogsApi.md b/generated/stackstate_api/docs/KubernetesLogsApi.md index a9ccfde0..d93101b2 100644 --- a/generated/stackstate_api/docs/KubernetesLogsApi.md +++ b/generated/stackstate_api/docs/KubernetesLogsApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description ## GetKubernetesLogs -> GetKubernetesLogsResult GetKubernetesLogs(ctx).From(from).To(to).PodUID(podUID).PageSize(pageSize).Page(page).Query(query).ContainerNames(containerNames).Direction(direction).Severity(severity).Execute() +> GetKubernetesLogsResult GetKubernetesLogs(ctx).From(from).To(to).PodUID(podUID).Cluster(cluster).PageSize(pageSize).Page(page).Query(query).ContainerNames(containerNames).Direction(direction).Severity(severity).TopologyTime(topologyTime).Execute() Get Kubernetes logs @@ -32,16 +32,18 @@ func main() { from := int32(56) // int32 | Logs initial timestamp. to := int32(56) // int32 | Logs last timestamp. podUID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Find only logs for the given pod UID. + cluster := "cluster_example" // string | Cluster name which identifies the scope of the RBAC data pageSize := int32(56) // int32 | Maximum number of the log lines in the result. (optional) (default to 25) page := int32(56) // int32 | The page for which the log lines of pageSize must be returned. (optional) (default to 1) query := "query_example" // string | Find only logs containing query text. (optional) containerNames := []string{"Inner_example"} // []string | Find only logs for the given container names. (optional) direction := openapiclient.LogsDirection("NEWEST") // LogsDirection | Fetch Oldest or Newest first. (optional) (default to "NEWEST") severity := []openapiclient.LogSeverity{openapiclient.LogSeverity("WARNING")} // []LogSeverity | Search a specific log severity WARN, ERROR, OTHER. (optional) + topologyTime := int32(56) // int32 | A timestamp at which the pod existed. If not given the pod is queried at current time. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.KubernetesLogsApi.GetKubernetesLogs(context.Background()).From(from).To(to).PodUID(podUID).PageSize(pageSize).Page(page).Query(query).ContainerNames(containerNames).Direction(direction).Severity(severity).Execute() + resp, r, err := apiClient.KubernetesLogsApi.GetKubernetesLogs(context.Background()).From(from).To(to).PodUID(podUID).Cluster(cluster).PageSize(pageSize).Page(page).Query(query).ContainerNames(containerNames).Direction(direction).Severity(severity).TopologyTime(topologyTime).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `KubernetesLogsApi.GetKubernetesLogs``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -65,12 +67,14 @@ Name | Type | Description | Notes **from** | **int32** | Logs initial timestamp. | **to** | **int32** | Logs last timestamp. | **podUID** | **string** | Find only logs for the given pod UID. | + **cluster** | **string** | Cluster name which identifies the scope of the RBAC data | **pageSize** | **int32** | Maximum number of the log lines in the result. | [default to 25] **page** | **int32** | The page for which the log lines of pageSize must be returned. | [default to 1] **query** | **string** | Find only logs containing query text. | **containerNames** | **[]string** | Find only logs for the given container names. | **direction** | [**LogsDirection**](LogsDirection.md) | Fetch Oldest or Newest first. | [default to "NEWEST"] **severity** | [**[]LogSeverity**](LogSeverity.md) | Search a specific log severity WARN, ERROR, OTHER. | + **topologyTime** | **int32** | A timestamp at which the pod existed. If not given the pod is queried at current time. | ### Return type @@ -92,7 +96,7 @@ Name | Type | Description | Notes ## GetKubernetesLogsAutocomplete -> GetKubernetesLogsAutocompleteResult GetKubernetesLogsAutocomplete(ctx).From(from).To(to).PodUID(podUID).Execute() +> GetKubernetesLogsAutocompleteResult GetKubernetesLogsAutocomplete(ctx).From(from).To(to).PodUID(podUID).Cluster(cluster).TopologyTime(topologyTime).Execute() Get Kubernetes logs autocomplete values @@ -112,10 +116,12 @@ func main() { from := int32(56) // int32 | Logs initial timestamp. to := int32(56) // int32 | Logs last timestamp. podUID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Find only logs for the given pod UID. + cluster := "cluster_example" // string | Cluster name which identifies the scope of the RBAC data + topologyTime := int32(56) // int32 | A timestamp at which the pod existed. If not given the pod is queried at current time. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.KubernetesLogsApi.GetKubernetesLogsAutocomplete(context.Background()).From(from).To(to).PodUID(podUID).Execute() + resp, r, err := apiClient.KubernetesLogsApi.GetKubernetesLogsAutocomplete(context.Background()).From(from).To(to).PodUID(podUID).Cluster(cluster).TopologyTime(topologyTime).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `KubernetesLogsApi.GetKubernetesLogsAutocomplete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -139,6 +145,8 @@ Name | Type | Description | Notes **from** | **int32** | Logs initial timestamp. | **to** | **int32** | Logs last timestamp. | **podUID** | **string** | Find only logs for the given pod UID. | + **cluster** | **string** | Cluster name which identifies the scope of the RBAC data | + **topologyTime** | **int32** | A timestamp at which the pod existed. If not given the pod is queried at current time. | ### Return type @@ -160,7 +168,7 @@ Name | Type | Description | Notes ## GetKubernetesLogsHistogram -> GetKubernetesLogsHistogramResult GetKubernetesLogsHistogram(ctx).From(from).To(to).PodUID(podUID).BucketsCount(bucketsCount).Query(query).ContainerNames(containerNames).Severity(severity).Execute() +> GetKubernetesLogsHistogramResult GetKubernetesLogsHistogram(ctx).From(from).To(to).PodUID(podUID).Cluster(cluster).BucketsCount(bucketsCount).Query(query).ContainerNames(containerNames).Severity(severity).TopologyTime(topologyTime).Execute() Get Kubernetes logs histogram @@ -180,14 +188,16 @@ func main() { from := int32(56) // int32 | Logs initial timestamp. to := int32(56) // int32 | Logs last timestamp. podUID := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Find only logs for the given pod UID. + cluster := "cluster_example" // string | Cluster name which identifies the scope of the RBAC data bucketsCount := int32(56) // int32 | The number of histogram buckets. query := "query_example" // string | Find only logs containing query text. (optional) containerNames := []string{"Inner_example"} // []string | Find only logs for the given container names. (optional) severity := []openapiclient.LogSeverity{openapiclient.LogSeverity("WARNING")} // []LogSeverity | Search a specific log severity WARN, ERROR, OTHER. (optional) + topologyTime := int32(56) // int32 | A timestamp at which the pod existed. If not given the pod is queried at current time. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.KubernetesLogsApi.GetKubernetesLogsHistogram(context.Background()).From(from).To(to).PodUID(podUID).BucketsCount(bucketsCount).Query(query).ContainerNames(containerNames).Severity(severity).Execute() + resp, r, err := apiClient.KubernetesLogsApi.GetKubernetesLogsHistogram(context.Background()).From(from).To(to).PodUID(podUID).Cluster(cluster).BucketsCount(bucketsCount).Query(query).ContainerNames(containerNames).Severity(severity).TopologyTime(topologyTime).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `KubernetesLogsApi.GetKubernetesLogsHistogram``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -211,10 +221,12 @@ Name | Type | Description | Notes **from** | **int32** | Logs initial timestamp. | **to** | **int32** | Logs last timestamp. | **podUID** | **string** | Find only logs for the given pod UID. | + **cluster** | **string** | Cluster name which identifies the scope of the RBAC data | **bucketsCount** | **int32** | The number of histogram buckets. | **query** | **string** | Find only logs containing query text. | **containerNames** | **[]string** | Find only logs for the given container names. | **severity** | [**[]LogSeverity**](LogSeverity.md) | Search a specific log severity WARN, ERROR, OTHER. | + **topologyTime** | **int32** | A timestamp at which the pod existed. If not given the pod is queried at current time. | ### Return type diff --git a/generated/stackstate_api/docs/NotificationChannel.md b/generated/stackstate_api/docs/NotificationChannel.md index 77170328..0eead89e 100644 --- a/generated/stackstate_api/docs/NotificationChannel.md +++ b/generated/stackstate_api/docs/NotificationChannel.md @@ -15,10 +15,10 @@ Name | Type | Description | Notes **Token** | **string** | | **VerifySsl** | **bool** | | **Metadata** | **map[string]string** | | -**Region** | **string** | | +**Region** | [**OpsgenieRegion**](OpsgenieRegion.md) | | **GenieKey** | **string** | | **Responders** | [**[]OpsgenieResponder**](OpsgenieResponder.md) | | -**Priority** | **string** | | +**Priority** | [**OpsgeniePriority**](OpsgeniePriority.md) | | **To** | **[]string** | | **Cc** | **[]string** | | **SubjectPrefix** | Pointer to **string** | | [optional] @@ -27,7 +27,7 @@ Name | Type | Description | Notes ### NewNotificationChannel -`func NewNotificationChannel(id int64, status NotificationChannelStatus, type_ string, slackWorkspace string, url string, token string, verifySsl bool, metadata map[string]string, region string, genieKey string, responders []OpsgenieResponder, priority string, to []string, cc []string, ) *NotificationChannel` +`func NewNotificationChannel(id int64, status NotificationChannelStatus, type_ string, slackWorkspace string, url string, token string, verifySsl bool, metadata map[string]string, region OpsgenieRegion, genieKey string, responders []OpsgenieResponder, priority OpsgeniePriority, to []string, cc []string, ) *NotificationChannel` NewNotificationChannel instantiates a new NotificationChannel object This constructor will assign default values to properties that have it defined, @@ -279,20 +279,20 @@ SetMetadata sets Metadata field to given value. ### GetRegion -`func (o *NotificationChannel) GetRegion() string` +`func (o *NotificationChannel) GetRegion() OpsgenieRegion` GetRegion returns the Region field if non-nil, zero value otherwise. ### GetRegionOk -`func (o *NotificationChannel) GetRegionOk() (*string, bool)` +`func (o *NotificationChannel) GetRegionOk() (*OpsgenieRegion, bool)` GetRegionOk returns a tuple with the Region field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRegion -`func (o *NotificationChannel) SetRegion(v string)` +`func (o *NotificationChannel) SetRegion(v OpsgenieRegion)` SetRegion sets Region field to given value. @@ -339,20 +339,20 @@ SetResponders sets Responders field to given value. ### GetPriority -`func (o *NotificationChannel) GetPriority() string` +`func (o *NotificationChannel) GetPriority() OpsgeniePriority` GetPriority returns the Priority field if non-nil, zero value otherwise. ### GetPriorityOk -`func (o *NotificationChannel) GetPriorityOk() (*string, bool)` +`func (o *NotificationChannel) GetPriorityOk() (*OpsgeniePriority, bool)` GetPriorityOk returns a tuple with the Priority field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPriority -`func (o *NotificationChannel) SetPriority(v string)` +`func (o *NotificationChannel) SetPriority(v OpsgeniePriority)` SetPriority sets Priority field to given value. diff --git a/generated/stackstate_api/docs/NotificationChannelsApi.md b/generated/stackstate_api/docs/NotificationChannelsApi.md index c77b13c7..5957b6e5 100644 --- a/generated/stackstate_api/docs/NotificationChannelsApi.md +++ b/generated/stackstate_api/docs/NotificationChannelsApi.md @@ -123,7 +123,7 @@ import ( ) func main() { - opsgenieChannelWriteSchema := *openapiclient.NewOpsgenieChannelWriteSchema("Region_example", "GenieKey_example", []openapiclient.OpsgenieResponder{*openapiclient.NewOpsgenieResponder("ResponderType_example", "Responder_example")}, "Priority_example") // OpsgenieChannelWriteSchema | Create or update a opsgenie channel + opsgenieChannelWriteSchema := *openapiclient.NewOpsgenieChannelWriteSchema(openapiclient.OpsgenieRegion("EU"), "GenieKey_example", []openapiclient.OpsgenieResponder{*openapiclient.NewOpsgenieResponder(openapiclient.OpsgenieResponderType("TEAM"), "Responder_example")}, openapiclient.OpsgeniePriority("P1")) // OpsgenieChannelWriteSchema | Create or update a opsgenie channel configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -1145,7 +1145,7 @@ import ( func main() { genieKey := "genieKey_example" // string | OpsGenie API key - region := "region_example" // string | OpsGenie region + region := openapiclient.OpsgenieRegion("EU") // OpsgenieRegion | OpsGenie region configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -1171,7 +1171,7 @@ Other parameters are passed through a pointer to a apiListOpsgenieRespondersRequ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **genieKey** | **string** | OpsGenie API key | - **region** | **string** | OpsGenie region | + **region** | [**OpsgenieRegion**](OpsgenieRegion.md) | OpsGenie region | ### Return type @@ -1827,7 +1827,7 @@ import ( func main() { channelId := int64(789) // int64 | Channel identifier - opsgenieChannelWriteSchema := *openapiclient.NewOpsgenieChannelWriteSchema("Region_example", "GenieKey_example", []openapiclient.OpsgenieResponder{*openapiclient.NewOpsgenieResponder("ResponderType_example", "Responder_example")}, "Priority_example") // OpsgenieChannelWriteSchema | Create or update a opsgenie channel + opsgenieChannelWriteSchema := *openapiclient.NewOpsgenieChannelWriteSchema(openapiclient.OpsgenieRegion("EU"), "GenieKey_example", []openapiclient.OpsgenieResponder{*openapiclient.NewOpsgenieResponder(openapiclient.OpsgenieResponderType("TEAM"), "Responder_example")}, openapiclient.OpsgeniePriority("P1")) // OpsgenieChannelWriteSchema | Create or update a opsgenie channel configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) diff --git a/generated/stackstate_api/docs/OpsgenieChannelWriteSchema.md b/generated/stackstate_api/docs/OpsgenieChannelWriteSchema.md index a59963bd..8690c572 100644 --- a/generated/stackstate_api/docs/OpsgenieChannelWriteSchema.md +++ b/generated/stackstate_api/docs/OpsgenieChannelWriteSchema.md @@ -4,16 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Region** | **string** | | +**Region** | [**OpsgenieRegion**](OpsgenieRegion.md) | | **GenieKey** | **string** | | **Responders** | [**[]OpsgenieResponder**](OpsgenieResponder.md) | | -**Priority** | **string** | | +**Priority** | [**OpsgeniePriority**](OpsgeniePriority.md) | | ## Methods ### NewOpsgenieChannelWriteSchema -`func NewOpsgenieChannelWriteSchema(region string, genieKey string, responders []OpsgenieResponder, priority string, ) *OpsgenieChannelWriteSchema` +`func NewOpsgenieChannelWriteSchema(region OpsgenieRegion, genieKey string, responders []OpsgenieResponder, priority OpsgeniePriority, ) *OpsgenieChannelWriteSchema` NewOpsgenieChannelWriteSchema instantiates a new OpsgenieChannelWriteSchema object This constructor will assign default values to properties that have it defined, @@ -30,20 +30,20 @@ but it doesn't guarantee that properties required by API are set ### GetRegion -`func (o *OpsgenieChannelWriteSchema) GetRegion() string` +`func (o *OpsgenieChannelWriteSchema) GetRegion() OpsgenieRegion` GetRegion returns the Region field if non-nil, zero value otherwise. ### GetRegionOk -`func (o *OpsgenieChannelWriteSchema) GetRegionOk() (*string, bool)` +`func (o *OpsgenieChannelWriteSchema) GetRegionOk() (*OpsgenieRegion, bool)` GetRegionOk returns a tuple with the Region field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRegion -`func (o *OpsgenieChannelWriteSchema) SetRegion(v string)` +`func (o *OpsgenieChannelWriteSchema) SetRegion(v OpsgenieRegion)` SetRegion sets Region field to given value. @@ -90,20 +90,20 @@ SetResponders sets Responders field to given value. ### GetPriority -`func (o *OpsgenieChannelWriteSchema) GetPriority() string` +`func (o *OpsgenieChannelWriteSchema) GetPriority() OpsgeniePriority` GetPriority returns the Priority field if non-nil, zero value otherwise. ### GetPriorityOk -`func (o *OpsgenieChannelWriteSchema) GetPriorityOk() (*string, bool)` +`func (o *OpsgenieChannelWriteSchema) GetPriorityOk() (*OpsgeniePriority, bool)` GetPriorityOk returns a tuple with the Priority field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPriority -`func (o *OpsgenieChannelWriteSchema) SetPriority(v string)` +`func (o *OpsgenieChannelWriteSchema) SetPriority(v OpsgeniePriority)` SetPriority sets Priority field to given value. diff --git a/generated/stackstate_api/docs/OpsgenieNotificationChannel.md b/generated/stackstate_api/docs/OpsgenieNotificationChannel.md index d2c4b249..042a755d 100644 --- a/generated/stackstate_api/docs/OpsgenieNotificationChannel.md +++ b/generated/stackstate_api/docs/OpsgenieNotificationChannel.md @@ -7,17 +7,17 @@ Name | Type | Description | Notes **Id** | **int64** | | **NotificationConfigurationId** | Pointer to **int64** | | [optional] **Status** | [**NotificationChannelStatus**](NotificationChannelStatus.md) | | -**Region** | **string** | | +**Region** | [**OpsgenieRegion**](OpsgenieRegion.md) | | **GenieKey** | **string** | | **Responders** | [**[]OpsgenieResponder**](OpsgenieResponder.md) | | -**Priority** | **string** | | +**Priority** | [**OpsgeniePriority**](OpsgeniePriority.md) | | **Type** | **string** | | ## Methods ### NewOpsgenieNotificationChannel -`func NewOpsgenieNotificationChannel(id int64, status NotificationChannelStatus, region string, genieKey string, responders []OpsgenieResponder, priority string, type_ string, ) *OpsgenieNotificationChannel` +`func NewOpsgenieNotificationChannel(id int64, status NotificationChannelStatus, region OpsgenieRegion, genieKey string, responders []OpsgenieResponder, priority OpsgeniePriority, type_ string, ) *OpsgenieNotificationChannel` NewOpsgenieNotificationChannel instantiates a new OpsgenieNotificationChannel object This constructor will assign default values to properties that have it defined, @@ -99,20 +99,20 @@ SetStatus sets Status field to given value. ### GetRegion -`func (o *OpsgenieNotificationChannel) GetRegion() string` +`func (o *OpsgenieNotificationChannel) GetRegion() OpsgenieRegion` GetRegion returns the Region field if non-nil, zero value otherwise. ### GetRegionOk -`func (o *OpsgenieNotificationChannel) GetRegionOk() (*string, bool)` +`func (o *OpsgenieNotificationChannel) GetRegionOk() (*OpsgenieRegion, bool)` GetRegionOk returns a tuple with the Region field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRegion -`func (o *OpsgenieNotificationChannel) SetRegion(v string)` +`func (o *OpsgenieNotificationChannel) SetRegion(v OpsgenieRegion)` SetRegion sets Region field to given value. @@ -159,20 +159,20 @@ SetResponders sets Responders field to given value. ### GetPriority -`func (o *OpsgenieNotificationChannel) GetPriority() string` +`func (o *OpsgenieNotificationChannel) GetPriority() OpsgeniePriority` GetPriority returns the Priority field if non-nil, zero value otherwise. ### GetPriorityOk -`func (o *OpsgenieNotificationChannel) GetPriorityOk() (*string, bool)` +`func (o *OpsgenieNotificationChannel) GetPriorityOk() (*OpsgeniePriority, bool)` GetPriorityOk returns a tuple with the Priority field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPriority -`func (o *OpsgenieNotificationChannel) SetPriority(v string)` +`func (o *OpsgenieNotificationChannel) SetPriority(v OpsgeniePriority)` SetPriority sets Priority field to given value. diff --git a/generated/stackstate_api/docs/OpsgeniePriority.md b/generated/stackstate_api/docs/OpsgeniePriority.md new file mode 100644 index 00000000..7c57b642 --- /dev/null +++ b/generated/stackstate_api/docs/OpsgeniePriority.md @@ -0,0 +1,19 @@ +# OpsgeniePriority + +## Enum + + +* `P1` (value: `"P1"`) + +* `P2` (value: `"P2"`) + +* `P3` (value: `"P3"`) + +* `P4` (value: `"P4"`) + +* `P5` (value: `"P5"`) + + +[[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/OpsgenieRegion.md b/generated/stackstate_api/docs/OpsgenieRegion.md new file mode 100644 index 00000000..34e98e30 --- /dev/null +++ b/generated/stackstate_api/docs/OpsgenieRegion.md @@ -0,0 +1,13 @@ +# OpsgenieRegion + +## Enum + + +* `EU` (value: `"EU"`) + +* `US` (value: `"US"`) + + +[[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/OpsgenieResponder.md b/generated/stackstate_api/docs/OpsgenieResponder.md index 6ae379d9..e836dabf 100644 --- a/generated/stackstate_api/docs/OpsgenieResponder.md +++ b/generated/stackstate_api/docs/OpsgenieResponder.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ResponderType** | **string** | | +**ResponderType** | [**OpsgenieResponderType**](OpsgenieResponderType.md) | | **Responder** | **string** | | ## Methods ### NewOpsgenieResponder -`func NewOpsgenieResponder(responderType string, responder string, ) *OpsgenieResponder` +`func NewOpsgenieResponder(responderType OpsgenieResponderType, responder string, ) *OpsgenieResponder` NewOpsgenieResponder instantiates a new OpsgenieResponder object This constructor will assign default values to properties that have it defined, @@ -28,20 +28,20 @@ but it doesn't guarantee that properties required by API are set ### GetResponderType -`func (o *OpsgenieResponder) GetResponderType() string` +`func (o *OpsgenieResponder) GetResponderType() OpsgenieResponderType` GetResponderType returns the ResponderType field if non-nil, zero value otherwise. ### GetResponderTypeOk -`func (o *OpsgenieResponder) GetResponderTypeOk() (*string, bool)` +`func (o *OpsgenieResponder) GetResponderTypeOk() (*OpsgenieResponderType, bool)` GetResponderTypeOk returns a tuple with the ResponderType field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetResponderType -`func (o *OpsgenieResponder) SetResponderType(v string)` +`func (o *OpsgenieResponder) SetResponderType(v OpsgenieResponderType)` SetResponderType sets ResponderType field to given value. diff --git a/generated/stackstate_api/docs/OpsgenieResponderType.md b/generated/stackstate_api/docs/OpsgenieResponderType.md new file mode 100644 index 00000000..d30ef80c --- /dev/null +++ b/generated/stackstate_api/docs/OpsgenieResponderType.md @@ -0,0 +1,17 @@ +# OpsgenieResponderType + +## Enum + + +* `TEAM` (value: `"TEAM"`) + +* `USER` (value: `"USER"`) + +* `SCHEDULE` (value: `"SCHEDULE"`) + +* `ESCALATION` (value: `"ESCALATION"`) + + +[[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/PersesDashboard.md b/generated/stackstate_api/docs/PersesDashboard.md new file mode 100644 index 00000000..209c1a08 --- /dev/null +++ b/generated/stackstate_api/docs/PersesDashboard.md @@ -0,0 +1,108 @@ +# PersesDashboard + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Kind** | Pointer to **string** | | [optional] +**Metadata** | Pointer to [**PersesProjectMetadata**](PersesProjectMetadata.md) | | [optional] +**Spec** | Pointer to [**PersesDashboardSpec**](PersesDashboardSpec.md) | | [optional] + +## Methods + +### NewPersesDashboard + +`func NewPersesDashboard() *PersesDashboard` + +NewPersesDashboard instantiates a new PersesDashboard 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 + +### NewPersesDashboardWithDefaults + +`func NewPersesDashboardWithDefaults() *PersesDashboard` + +NewPersesDashboardWithDefaults instantiates a new PersesDashboard 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 + +### GetKind + +`func (o *PersesDashboard) GetKind() string` + +GetKind returns the Kind field if non-nil, zero value otherwise. + +### GetKindOk + +`func (o *PersesDashboard) GetKindOk() (*string, bool)` + +GetKindOk returns a tuple with the Kind field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKind + +`func (o *PersesDashboard) SetKind(v string)` + +SetKind sets Kind field to given value. + +### HasKind + +`func (o *PersesDashboard) HasKind() bool` + +HasKind returns a boolean if a field has been set. + +### GetMetadata + +`func (o *PersesDashboard) GetMetadata() PersesProjectMetadata` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *PersesDashboard) GetMetadataOk() (*PersesProjectMetadata, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *PersesDashboard) SetMetadata(v PersesProjectMetadata)` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *PersesDashboard) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + +### GetSpec + +`func (o *PersesDashboard) GetSpec() PersesDashboardSpec` + +GetSpec returns the Spec field if non-nil, zero value otherwise. + +### GetSpecOk + +`func (o *PersesDashboard) GetSpecOk() (*PersesDashboardSpec, bool)` + +GetSpecOk returns a tuple with the Spec field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSpec + +`func (o *PersesDashboard) SetSpec(v PersesDashboardSpec)` + +SetSpec sets Spec field to given value. + +### HasSpec + +`func (o *PersesDashboard) HasSpec() bool` + +HasSpec 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/PersesDashboardDisplaySpec.md b/generated/stackstate_api/docs/PersesDashboardDisplaySpec.md new file mode 100644 index 00000000..f5bfb0da --- /dev/null +++ b/generated/stackstate_api/docs/PersesDashboardDisplaySpec.md @@ -0,0 +1,82 @@ +# PersesDashboardDisplaySpec + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### NewPersesDashboardDisplaySpec + +`func NewPersesDashboardDisplaySpec() *PersesDashboardDisplaySpec` + +NewPersesDashboardDisplaySpec instantiates a new PersesDashboardDisplaySpec 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 + +### NewPersesDashboardDisplaySpecWithDefaults + +`func NewPersesDashboardDisplaySpecWithDefaults() *PersesDashboardDisplaySpec` + +NewPersesDashboardDisplaySpecWithDefaults instantiates a new PersesDashboardDisplaySpec 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 + +### GetDescription + +`func (o *PersesDashboardDisplaySpec) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *PersesDashboardDisplaySpec) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *PersesDashboardDisplaySpec) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *PersesDashboardDisplaySpec) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetName + +`func (o *PersesDashboardDisplaySpec) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PersesDashboardDisplaySpec) 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 *PersesDashboardDisplaySpec) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PersesDashboardDisplaySpec) HasName() bool` + +HasName 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/PersesDashboardSpec.md b/generated/stackstate_api/docs/PersesDashboardSpec.md new file mode 100644 index 00000000..54b9d70e --- /dev/null +++ b/generated/stackstate_api/docs/PersesDashboardSpec.md @@ -0,0 +1,212 @@ +# PersesDashboardSpec + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Datasources** | Pointer to [**map[string]PersesDatasourceSpec**](PersesDatasourceSpec.md) | Datasources is an optional list of datasource definition. | [optional] +**Display** | Pointer to [**PersesDashboardDisplaySpec**](PersesDashboardDisplaySpec.md) | | [optional] +**Duration** | Pointer to **string** | A Duration represents the elapsed time between two instants. It must be provided as a string like \"1h\", \"30m\", \"15s\". | [optional] +**Layouts** | Pointer to [**[]PersesLayout**](PersesLayout.md) | | [optional] +**Panels** | Pointer to [**map[string]PersesPanel**](PersesPanel.md) | | [optional] +**RefreshInterval** | Pointer to **string** | A Duration represents the elapsed time between two instants. It must be provided as a string like \"1h\", \"30m\", \"15s\". | [optional] +**Variables** | Pointer to [**[]PersesVariableTypes**](PersesVariableTypes.md) | | [optional] + +## Methods + +### NewPersesDashboardSpec + +`func NewPersesDashboardSpec() *PersesDashboardSpec` + +NewPersesDashboardSpec instantiates a new PersesDashboardSpec 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 + +### NewPersesDashboardSpecWithDefaults + +`func NewPersesDashboardSpecWithDefaults() *PersesDashboardSpec` + +NewPersesDashboardSpecWithDefaults instantiates a new PersesDashboardSpec 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 + +### GetDatasources + +`func (o *PersesDashboardSpec) GetDatasources() map[string]PersesDatasourceSpec` + +GetDatasources returns the Datasources field if non-nil, zero value otherwise. + +### GetDatasourcesOk + +`func (o *PersesDashboardSpec) GetDatasourcesOk() (*map[string]PersesDatasourceSpec, bool)` + +GetDatasourcesOk returns a tuple with the Datasources field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDatasources + +`func (o *PersesDashboardSpec) SetDatasources(v map[string]PersesDatasourceSpec)` + +SetDatasources sets Datasources field to given value. + +### HasDatasources + +`func (o *PersesDashboardSpec) HasDatasources() bool` + +HasDatasources returns a boolean if a field has been set. + +### GetDisplay + +`func (o *PersesDashboardSpec) GetDisplay() PersesDashboardDisplaySpec` + +GetDisplay returns the Display field if non-nil, zero value otherwise. + +### GetDisplayOk + +`func (o *PersesDashboardSpec) GetDisplayOk() (*PersesDashboardDisplaySpec, bool)` + +GetDisplayOk returns a tuple with the Display field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplay + +`func (o *PersesDashboardSpec) SetDisplay(v PersesDashboardDisplaySpec)` + +SetDisplay sets Display field to given value. + +### HasDisplay + +`func (o *PersesDashboardSpec) HasDisplay() bool` + +HasDisplay returns a boolean if a field has been set. + +### GetDuration + +`func (o *PersesDashboardSpec) GetDuration() string` + +GetDuration returns the Duration field if non-nil, zero value otherwise. + +### GetDurationOk + +`func (o *PersesDashboardSpec) GetDurationOk() (*string, bool)` + +GetDurationOk returns a tuple with the Duration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDuration + +`func (o *PersesDashboardSpec) SetDuration(v string)` + +SetDuration sets Duration field to given value. + +### HasDuration + +`func (o *PersesDashboardSpec) HasDuration() bool` + +HasDuration returns a boolean if a field has been set. + +### GetLayouts + +`func (o *PersesDashboardSpec) GetLayouts() []PersesLayout` + +GetLayouts returns the Layouts field if non-nil, zero value otherwise. + +### GetLayoutsOk + +`func (o *PersesDashboardSpec) GetLayoutsOk() (*[]PersesLayout, bool)` + +GetLayoutsOk returns a tuple with the Layouts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLayouts + +`func (o *PersesDashboardSpec) SetLayouts(v []PersesLayout)` + +SetLayouts sets Layouts field to given value. + +### HasLayouts + +`func (o *PersesDashboardSpec) HasLayouts() bool` + +HasLayouts returns a boolean if a field has been set. + +### GetPanels + +`func (o *PersesDashboardSpec) GetPanels() map[string]PersesPanel` + +GetPanels returns the Panels field if non-nil, zero value otherwise. + +### GetPanelsOk + +`func (o *PersesDashboardSpec) GetPanelsOk() (*map[string]PersesPanel, bool)` + +GetPanelsOk returns a tuple with the Panels field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPanels + +`func (o *PersesDashboardSpec) SetPanels(v map[string]PersesPanel)` + +SetPanels sets Panels field to given value. + +### HasPanels + +`func (o *PersesDashboardSpec) HasPanels() bool` + +HasPanels returns a boolean if a field has been set. + +### GetRefreshInterval + +`func (o *PersesDashboardSpec) GetRefreshInterval() string` + +GetRefreshInterval returns the RefreshInterval field if non-nil, zero value otherwise. + +### GetRefreshIntervalOk + +`func (o *PersesDashboardSpec) GetRefreshIntervalOk() (*string, bool)` + +GetRefreshIntervalOk returns a tuple with the RefreshInterval field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRefreshInterval + +`func (o *PersesDashboardSpec) SetRefreshInterval(v string)` + +SetRefreshInterval sets RefreshInterval field to given value. + +### HasRefreshInterval + +`func (o *PersesDashboardSpec) HasRefreshInterval() bool` + +HasRefreshInterval returns a boolean if a field has been set. + +### GetVariables + +`func (o *PersesDashboardSpec) GetVariables() []PersesVariableTypes` + +GetVariables returns the Variables field if non-nil, zero value otherwise. + +### GetVariablesOk + +`func (o *PersesDashboardSpec) GetVariablesOk() (*[]PersesVariableTypes, bool)` + +GetVariablesOk returns a tuple with the Variables field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVariables + +`func (o *PersesDashboardSpec) SetVariables(v []PersesVariableTypes)` + +SetVariables sets Variables field to given value. + +### HasVariables + +`func (o *PersesDashboardSpec) HasVariables() bool` + +HasVariables 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/PersesDatasourceSpec.md b/generated/stackstate_api/docs/PersesDatasourceSpec.md new file mode 100644 index 00000000..dbd6a9fa --- /dev/null +++ b/generated/stackstate_api/docs/PersesDatasourceSpec.md @@ -0,0 +1,108 @@ +# PersesDatasourceSpec + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Default** | Pointer to **bool** | | [optional] +**Display** | Pointer to [**PersesDashboardDisplaySpec**](PersesDashboardDisplaySpec.md) | | [optional] +**Plugin** | Pointer to [**PersesPlugin**](PersesPlugin.md) | | [optional] + +## Methods + +### NewPersesDatasourceSpec + +`func NewPersesDatasourceSpec() *PersesDatasourceSpec` + +NewPersesDatasourceSpec instantiates a new PersesDatasourceSpec 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 + +### NewPersesDatasourceSpecWithDefaults + +`func NewPersesDatasourceSpecWithDefaults() *PersesDatasourceSpec` + +NewPersesDatasourceSpecWithDefaults instantiates a new PersesDatasourceSpec 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 + +### GetDefault + +`func (o *PersesDatasourceSpec) GetDefault() bool` + +GetDefault returns the Default field if non-nil, zero value otherwise. + +### GetDefaultOk + +`func (o *PersesDatasourceSpec) GetDefaultOk() (*bool, bool)` + +GetDefaultOk returns a tuple with the Default field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefault + +`func (o *PersesDatasourceSpec) SetDefault(v bool)` + +SetDefault sets Default field to given value. + +### HasDefault + +`func (o *PersesDatasourceSpec) HasDefault() bool` + +HasDefault returns a boolean if a field has been set. + +### GetDisplay + +`func (o *PersesDatasourceSpec) GetDisplay() PersesDashboardDisplaySpec` + +GetDisplay returns the Display field if non-nil, zero value otherwise. + +### GetDisplayOk + +`func (o *PersesDatasourceSpec) GetDisplayOk() (*PersesDashboardDisplaySpec, bool)` + +GetDisplayOk returns a tuple with the Display field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplay + +`func (o *PersesDatasourceSpec) SetDisplay(v PersesDashboardDisplaySpec)` + +SetDisplay sets Display field to given value. + +### HasDisplay + +`func (o *PersesDatasourceSpec) HasDisplay() bool` + +HasDisplay returns a boolean if a field has been set. + +### GetPlugin + +`func (o *PersesDatasourceSpec) GetPlugin() PersesPlugin` + +GetPlugin returns the Plugin field if non-nil, zero value otherwise. + +### GetPluginOk + +`func (o *PersesDatasourceSpec) GetPluginOk() (*PersesPlugin, bool)` + +GetPluginOk returns a tuple with the Plugin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlugin + +`func (o *PersesDatasourceSpec) SetPlugin(v PersesPlugin)` + +SetPlugin sets Plugin field to given value. + +### HasPlugin + +`func (o *PersesDatasourceSpec) HasPlugin() bool` + +HasPlugin 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/PersesGridItem.md b/generated/stackstate_api/docs/PersesGridItem.md new file mode 100644 index 00000000..34b65c0b --- /dev/null +++ b/generated/stackstate_api/docs/PersesGridItem.md @@ -0,0 +1,135 @@ +# PersesGridItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**X** | **int32** | The x-coordinate of the item in the grid. | +**Y** | **int32** | The y-coordinate of the item in the grid. | +**Width** | **int32** | The width of the item in the grid. | +**Height** | **int32** | The height of the item in the grid. | +**Content** | [**PersesJSONRef**](PersesJSONRef.md) | | + +## Methods + +### NewPersesGridItem + +`func NewPersesGridItem(x int32, y int32, width int32, height int32, content PersesJSONRef, ) *PersesGridItem` + +NewPersesGridItem instantiates a new PersesGridItem 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 + +### NewPersesGridItemWithDefaults + +`func NewPersesGridItemWithDefaults() *PersesGridItem` + +NewPersesGridItemWithDefaults instantiates a new PersesGridItem 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 + +### GetX + +`func (o *PersesGridItem) GetX() int32` + +GetX returns the X field if non-nil, zero value otherwise. + +### GetXOk + +`func (o *PersesGridItem) GetXOk() (*int32, bool)` + +GetXOk returns a tuple with the X field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetX + +`func (o *PersesGridItem) SetX(v int32)` + +SetX sets X field to given value. + + +### GetY + +`func (o *PersesGridItem) GetY() int32` + +GetY returns the Y field if non-nil, zero value otherwise. + +### GetYOk + +`func (o *PersesGridItem) GetYOk() (*int32, bool)` + +GetYOk returns a tuple with the Y field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetY + +`func (o *PersesGridItem) SetY(v int32)` + +SetY sets Y field to given value. + + +### GetWidth + +`func (o *PersesGridItem) GetWidth() int32` + +GetWidth returns the Width field if non-nil, zero value otherwise. + +### GetWidthOk + +`func (o *PersesGridItem) GetWidthOk() (*int32, bool)` + +GetWidthOk returns a tuple with the Width field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWidth + +`func (o *PersesGridItem) SetWidth(v int32)` + +SetWidth sets Width field to given value. + + +### GetHeight + +`func (o *PersesGridItem) GetHeight() int32` + +GetHeight returns the Height field if non-nil, zero value otherwise. + +### GetHeightOk + +`func (o *PersesGridItem) GetHeightOk() (*int32, bool)` + +GetHeightOk returns a tuple with the Height field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHeight + +`func (o *PersesGridItem) SetHeight(v int32)` + +SetHeight sets Height field to given value. + + +### GetContent + +`func (o *PersesGridItem) GetContent() PersesJSONRef` + +GetContent returns the Content field if non-nil, zero value otherwise. + +### GetContentOk + +`func (o *PersesGridItem) GetContentOk() (*PersesJSONRef, bool)` + +GetContentOk returns a tuple with the Content field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContent + +`func (o *PersesGridItem) SetContent(v PersesJSONRef)` + +SetContent sets Content 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/PersesGridLayoutCollapse.md b/generated/stackstate_api/docs/PersesGridLayoutCollapse.md new file mode 100644 index 00000000..168f3ef3 --- /dev/null +++ b/generated/stackstate_api/docs/PersesGridLayoutCollapse.md @@ -0,0 +1,51 @@ +# PersesGridLayoutCollapse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Open** | **bool** | Indicates whether the grid layout is collapsed. | + +## Methods + +### NewPersesGridLayoutCollapse + +`func NewPersesGridLayoutCollapse(open bool, ) *PersesGridLayoutCollapse` + +NewPersesGridLayoutCollapse instantiates a new PersesGridLayoutCollapse 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 + +### NewPersesGridLayoutCollapseWithDefaults + +`func NewPersesGridLayoutCollapseWithDefaults() *PersesGridLayoutCollapse` + +NewPersesGridLayoutCollapseWithDefaults instantiates a new PersesGridLayoutCollapse 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 + +### GetOpen + +`func (o *PersesGridLayoutCollapse) GetOpen() bool` + +GetOpen returns the Open field if non-nil, zero value otherwise. + +### GetOpenOk + +`func (o *PersesGridLayoutCollapse) GetOpenOk() (*bool, bool)` + +GetOpenOk returns a tuple with the Open field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOpen + +`func (o *PersesGridLayoutCollapse) SetOpen(v bool)` + +SetOpen sets Open 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/PersesGridLayoutDisplay.md b/generated/stackstate_api/docs/PersesGridLayoutDisplay.md new file mode 100644 index 00000000..a2c9ebab --- /dev/null +++ b/generated/stackstate_api/docs/PersesGridLayoutDisplay.md @@ -0,0 +1,77 @@ +# PersesGridLayoutDisplay + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | **string** | The title of the grid layout. | +**Collapse** | Pointer to [**PersesGridLayoutCollapse**](PersesGridLayoutCollapse.md) | | [optional] + +## Methods + +### NewPersesGridLayoutDisplay + +`func NewPersesGridLayoutDisplay(title string, ) *PersesGridLayoutDisplay` + +NewPersesGridLayoutDisplay instantiates a new PersesGridLayoutDisplay 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 + +### NewPersesGridLayoutDisplayWithDefaults + +`func NewPersesGridLayoutDisplayWithDefaults() *PersesGridLayoutDisplay` + +NewPersesGridLayoutDisplayWithDefaults instantiates a new PersesGridLayoutDisplay 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 + +### GetTitle + +`func (o *PersesGridLayoutDisplay) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *PersesGridLayoutDisplay) 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 *PersesGridLayoutDisplay) SetTitle(v string)` + +SetTitle sets Title field to given value. + + +### GetCollapse + +`func (o *PersesGridLayoutDisplay) GetCollapse() PersesGridLayoutCollapse` + +GetCollapse returns the Collapse field if non-nil, zero value otherwise. + +### GetCollapseOk + +`func (o *PersesGridLayoutDisplay) GetCollapseOk() (*PersesGridLayoutCollapse, bool)` + +GetCollapseOk returns a tuple with the Collapse field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCollapse + +`func (o *PersesGridLayoutDisplay) SetCollapse(v PersesGridLayoutCollapse)` + +SetCollapse sets Collapse field to given value. + +### HasCollapse + +`func (o *PersesGridLayoutDisplay) HasCollapse() bool` + +HasCollapse 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/PersesJSONRef.md b/generated/stackstate_api/docs/PersesJSONRef.md new file mode 100644 index 00000000..3c2921e3 --- /dev/null +++ b/generated/stackstate_api/docs/PersesJSONRef.md @@ -0,0 +1,51 @@ +# PersesJSONRef + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ref** | **string** | The JSON reference pointing to the actual object. The property name '$ref' contains a reserved char, which gets stripped away when generated (it's possible to handle this but makes the generation code more complex). For now, consumers of this spec will need to omit the '$' in the property name. | + +## Methods + +### NewPersesJSONRef + +`func NewPersesJSONRef(ref string, ) *PersesJSONRef` + +NewPersesJSONRef instantiates a new PersesJSONRef 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 + +### NewPersesJSONRefWithDefaults + +`func NewPersesJSONRefWithDefaults() *PersesJSONRef` + +NewPersesJSONRefWithDefaults instantiates a new PersesJSONRef 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 + +### GetRef + +`func (o *PersesJSONRef) GetRef() string` + +GetRef returns the Ref field if non-nil, zero value otherwise. + +### GetRefOk + +`func (o *PersesJSONRef) GetRefOk() (*string, bool)` + +GetRefOk returns a tuple with the Ref field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRef + +`func (o *PersesJSONRef) SetRef(v string)` + +SetRef sets Ref 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/PersesLayout.md b/generated/stackstate_api/docs/PersesLayout.md new file mode 100644 index 00000000..6a2bb617 --- /dev/null +++ b/generated/stackstate_api/docs/PersesLayout.md @@ -0,0 +1,72 @@ +# PersesLayout + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Kind** | [**PersesLayoutKind**](PersesLayoutKind.md) | | +**Spec** | [**PersesLayoutSpec**](PersesLayoutSpec.md) | | + +## Methods + +### NewPersesLayout + +`func NewPersesLayout(kind PersesLayoutKind, spec PersesLayoutSpec, ) *PersesLayout` + +NewPersesLayout instantiates a new PersesLayout 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 + +### NewPersesLayoutWithDefaults + +`func NewPersesLayoutWithDefaults() *PersesLayout` + +NewPersesLayoutWithDefaults instantiates a new PersesLayout 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 + +### GetKind + +`func (o *PersesLayout) GetKind() PersesLayoutKind` + +GetKind returns the Kind field if non-nil, zero value otherwise. + +### GetKindOk + +`func (o *PersesLayout) GetKindOk() (*PersesLayoutKind, bool)` + +GetKindOk returns a tuple with the Kind field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKind + +`func (o *PersesLayout) SetKind(v PersesLayoutKind)` + +SetKind sets Kind field to given value. + + +### GetSpec + +`func (o *PersesLayout) GetSpec() PersesLayoutSpec` + +GetSpec returns the Spec field if non-nil, zero value otherwise. + +### GetSpecOk + +`func (o *PersesLayout) GetSpecOk() (*PersesLayoutSpec, bool)` + +GetSpecOk returns a tuple with the Spec field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSpec + +`func (o *PersesLayout) SetSpec(v PersesLayoutSpec)` + +SetSpec sets Spec 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/PersesLayoutKind.md b/generated/stackstate_api/docs/PersesLayoutKind.md new file mode 100644 index 00000000..bfd39f8a --- /dev/null +++ b/generated/stackstate_api/docs/PersesLayoutKind.md @@ -0,0 +1,11 @@ +# PersesLayoutKind + +## Enum + + +* `GRID` (value: `"Grid"`) + + +[[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/PersesLayoutSpec.md b/generated/stackstate_api/docs/PersesLayoutSpec.md new file mode 100644 index 00000000..6425a587 --- /dev/null +++ b/generated/stackstate_api/docs/PersesLayoutSpec.md @@ -0,0 +1,77 @@ +# PersesLayoutSpec + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Display** | Pointer to [**PersesGridLayoutDisplay**](PersesGridLayoutDisplay.md) | | [optional] +**Items** | [**[]PersesGridItem**](PersesGridItem.md) | | + +## Methods + +### NewPersesLayoutSpec + +`func NewPersesLayoutSpec(items []PersesGridItem, ) *PersesLayoutSpec` + +NewPersesLayoutSpec instantiates a new PersesLayoutSpec 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 + +### NewPersesLayoutSpecWithDefaults + +`func NewPersesLayoutSpecWithDefaults() *PersesLayoutSpec` + +NewPersesLayoutSpecWithDefaults instantiates a new PersesLayoutSpec 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 + +### GetDisplay + +`func (o *PersesLayoutSpec) GetDisplay() PersesGridLayoutDisplay` + +GetDisplay returns the Display field if non-nil, zero value otherwise. + +### GetDisplayOk + +`func (o *PersesLayoutSpec) GetDisplayOk() (*PersesGridLayoutDisplay, bool)` + +GetDisplayOk returns a tuple with the Display field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplay + +`func (o *PersesLayoutSpec) SetDisplay(v PersesGridLayoutDisplay)` + +SetDisplay sets Display field to given value. + +### HasDisplay + +`func (o *PersesLayoutSpec) HasDisplay() bool` + +HasDisplay returns a boolean if a field has been set. + +### GetItems + +`func (o *PersesLayoutSpec) GetItems() []PersesGridItem` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *PersesLayoutSpec) GetItemsOk() (*[]PersesGridItem, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *PersesLayoutSpec) SetItems(v []PersesGridItem)` + +SetItems sets Items 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/PersesLink.md b/generated/stackstate_api/docs/PersesLink.md new file mode 100644 index 00000000..5e578695 --- /dev/null +++ b/generated/stackstate_api/docs/PersesLink.md @@ -0,0 +1,160 @@ +# PersesLink + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**RenderVariables** | Pointer to **bool** | | [optional] +**TargetBlank** | Pointer to **bool** | | [optional] +**Tooltip** | Pointer to **string** | | [optional] +**Url** | Pointer to **string** | | [optional] + +## Methods + +### NewPersesLink + +`func NewPersesLink() *PersesLink` + +NewPersesLink instantiates a new PersesLink 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 + +### NewPersesLinkWithDefaults + +`func NewPersesLinkWithDefaults() *PersesLink` + +NewPersesLinkWithDefaults instantiates a new PersesLink 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 *PersesLink) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PersesLink) 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 *PersesLink) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PersesLink) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetRenderVariables + +`func (o *PersesLink) GetRenderVariables() bool` + +GetRenderVariables returns the RenderVariables field if non-nil, zero value otherwise. + +### GetRenderVariablesOk + +`func (o *PersesLink) GetRenderVariablesOk() (*bool, bool)` + +GetRenderVariablesOk returns a tuple with the RenderVariables field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRenderVariables + +`func (o *PersesLink) SetRenderVariables(v bool)` + +SetRenderVariables sets RenderVariables field to given value. + +### HasRenderVariables + +`func (o *PersesLink) HasRenderVariables() bool` + +HasRenderVariables returns a boolean if a field has been set. + +### GetTargetBlank + +`func (o *PersesLink) GetTargetBlank() bool` + +GetTargetBlank returns the TargetBlank field if non-nil, zero value otherwise. + +### GetTargetBlankOk + +`func (o *PersesLink) GetTargetBlankOk() (*bool, bool)` + +GetTargetBlankOk returns a tuple with the TargetBlank field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTargetBlank + +`func (o *PersesLink) SetTargetBlank(v bool)` + +SetTargetBlank sets TargetBlank field to given value. + +### HasTargetBlank + +`func (o *PersesLink) HasTargetBlank() bool` + +HasTargetBlank returns a boolean if a field has been set. + +### GetTooltip + +`func (o *PersesLink) GetTooltip() string` + +GetTooltip returns the Tooltip field if non-nil, zero value otherwise. + +### GetTooltipOk + +`func (o *PersesLink) GetTooltipOk() (*string, bool)` + +GetTooltipOk returns a tuple with the Tooltip field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTooltip + +`func (o *PersesLink) SetTooltip(v string)` + +SetTooltip sets Tooltip field to given value. + +### HasTooltip + +`func (o *PersesLink) HasTooltip() bool` + +HasTooltip returns a boolean if a field has been set. + +### GetUrl + +`func (o *PersesLink) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *PersesLink) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *PersesLink) SetUrl(v string)` + +SetUrl sets Url field to given value. + +### HasUrl + +`func (o *PersesLink) HasUrl() bool` + +HasUrl 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/PersesListVariable.md b/generated/stackstate_api/docs/PersesListVariable.md new file mode 100644 index 00000000..073c5637 --- /dev/null +++ b/generated/stackstate_api/docs/PersesListVariable.md @@ -0,0 +1,77 @@ +# PersesListVariable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Kind** | **string** | | +**Spec** | Pointer to [**PersesListVariableSpec**](PersesListVariableSpec.md) | | [optional] + +## Methods + +### NewPersesListVariable + +`func NewPersesListVariable(kind string, ) *PersesListVariable` + +NewPersesListVariable instantiates a new PersesListVariable 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 + +### NewPersesListVariableWithDefaults + +`func NewPersesListVariableWithDefaults() *PersesListVariable` + +NewPersesListVariableWithDefaults instantiates a new PersesListVariable 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 + +### GetKind + +`func (o *PersesListVariable) GetKind() string` + +GetKind returns the Kind field if non-nil, zero value otherwise. + +### GetKindOk + +`func (o *PersesListVariable) GetKindOk() (*string, bool)` + +GetKindOk returns a tuple with the Kind field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKind + +`func (o *PersesListVariable) SetKind(v string)` + +SetKind sets Kind field to given value. + + +### GetSpec + +`func (o *PersesListVariable) GetSpec() PersesListVariableSpec` + +GetSpec returns the Spec field if non-nil, zero value otherwise. + +### GetSpecOk + +`func (o *PersesListVariable) GetSpecOk() (*PersesListVariableSpec, bool)` + +GetSpecOk returns a tuple with the Spec field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSpec + +`func (o *PersesListVariable) SetSpec(v PersesListVariableSpec)` + +SetSpec sets Spec field to given value. + +### HasSpec + +`func (o *PersesListVariable) HasSpec() bool` + +HasSpec 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/PersesListVariableDefaultSingleValue.md b/generated/stackstate_api/docs/PersesListVariableDefaultSingleValue.md new file mode 100644 index 00000000..bbb2a796 --- /dev/null +++ b/generated/stackstate_api/docs/PersesListVariableDefaultSingleValue.md @@ -0,0 +1,72 @@ +# PersesListVariableDefaultSingleValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Kind** | **string** | | +**SingleValue** | **string** | | + +## Methods + +### NewPersesListVariableDefaultSingleValue + +`func NewPersesListVariableDefaultSingleValue(kind string, singleValue string, ) *PersesListVariableDefaultSingleValue` + +NewPersesListVariableDefaultSingleValue instantiates a new PersesListVariableDefaultSingleValue 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 + +### NewPersesListVariableDefaultSingleValueWithDefaults + +`func NewPersesListVariableDefaultSingleValueWithDefaults() *PersesListVariableDefaultSingleValue` + +NewPersesListVariableDefaultSingleValueWithDefaults instantiates a new PersesListVariableDefaultSingleValue 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 + +### GetKind + +`func (o *PersesListVariableDefaultSingleValue) GetKind() string` + +GetKind returns the Kind field if non-nil, zero value otherwise. + +### GetKindOk + +`func (o *PersesListVariableDefaultSingleValue) GetKindOk() (*string, bool)` + +GetKindOk returns a tuple with the Kind field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKind + +`func (o *PersesListVariableDefaultSingleValue) SetKind(v string)` + +SetKind sets Kind field to given value. + + +### GetSingleValue + +`func (o *PersesListVariableDefaultSingleValue) GetSingleValue() string` + +GetSingleValue returns the SingleValue field if non-nil, zero value otherwise. + +### GetSingleValueOk + +`func (o *PersesListVariableDefaultSingleValue) GetSingleValueOk() (*string, bool)` + +GetSingleValueOk returns a tuple with the SingleValue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSingleValue + +`func (o *PersesListVariableDefaultSingleValue) SetSingleValue(v string)` + +SetSingleValue sets SingleValue 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/PersesListVariableDefaultSliceValues.md b/generated/stackstate_api/docs/PersesListVariableDefaultSliceValues.md new file mode 100644 index 00000000..ac165a4d --- /dev/null +++ b/generated/stackstate_api/docs/PersesListVariableDefaultSliceValues.md @@ -0,0 +1,72 @@ +# PersesListVariableDefaultSliceValues + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Kind** | **string** | | +**SliceValues** | **[]string** | | + +## Methods + +### NewPersesListVariableDefaultSliceValues + +`func NewPersesListVariableDefaultSliceValues(kind string, sliceValues []string, ) *PersesListVariableDefaultSliceValues` + +NewPersesListVariableDefaultSliceValues instantiates a new PersesListVariableDefaultSliceValues 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 + +### NewPersesListVariableDefaultSliceValuesWithDefaults + +`func NewPersesListVariableDefaultSliceValuesWithDefaults() *PersesListVariableDefaultSliceValues` + +NewPersesListVariableDefaultSliceValuesWithDefaults instantiates a new PersesListVariableDefaultSliceValues 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 + +### GetKind + +`func (o *PersesListVariableDefaultSliceValues) GetKind() string` + +GetKind returns the Kind field if non-nil, zero value otherwise. + +### GetKindOk + +`func (o *PersesListVariableDefaultSliceValues) GetKindOk() (*string, bool)` + +GetKindOk returns a tuple with the Kind field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKind + +`func (o *PersesListVariableDefaultSliceValues) SetKind(v string)` + +SetKind sets Kind field to given value. + + +### GetSliceValues + +`func (o *PersesListVariableDefaultSliceValues) GetSliceValues() []string` + +GetSliceValues returns the SliceValues field if non-nil, zero value otherwise. + +### GetSliceValuesOk + +`func (o *PersesListVariableDefaultSliceValues) GetSliceValuesOk() (*[]string, bool)` + +GetSliceValuesOk returns a tuple with the SliceValues field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSliceValues + +`func (o *PersesListVariableDefaultSliceValues) SetSliceValues(v []string)` + +SetSliceValues sets SliceValues 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/PersesListVariableDefaultValue.md b/generated/stackstate_api/docs/PersesListVariableDefaultValue.md new file mode 100644 index 00000000..63065b77 --- /dev/null +++ b/generated/stackstate_api/docs/PersesListVariableDefaultValue.md @@ -0,0 +1,93 @@ +# PersesListVariableDefaultValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Kind** | **string** | | +**SingleValue** | **string** | | +**SliceValues** | **[]string** | | + +## Methods + +### NewPersesListVariableDefaultValue + +`func NewPersesListVariableDefaultValue(kind string, singleValue string, sliceValues []string, ) *PersesListVariableDefaultValue` + +NewPersesListVariableDefaultValue instantiates a new PersesListVariableDefaultValue 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 + +### NewPersesListVariableDefaultValueWithDefaults + +`func NewPersesListVariableDefaultValueWithDefaults() *PersesListVariableDefaultValue` + +NewPersesListVariableDefaultValueWithDefaults instantiates a new PersesListVariableDefaultValue 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 + +### GetKind + +`func (o *PersesListVariableDefaultValue) GetKind() string` + +GetKind returns the Kind field if non-nil, zero value otherwise. + +### GetKindOk + +`func (o *PersesListVariableDefaultValue) GetKindOk() (*string, bool)` + +GetKindOk returns a tuple with the Kind field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKind + +`func (o *PersesListVariableDefaultValue) SetKind(v string)` + +SetKind sets Kind field to given value. + + +### GetSingleValue + +`func (o *PersesListVariableDefaultValue) GetSingleValue() string` + +GetSingleValue returns the SingleValue field if non-nil, zero value otherwise. + +### GetSingleValueOk + +`func (o *PersesListVariableDefaultValue) GetSingleValueOk() (*string, bool)` + +GetSingleValueOk returns a tuple with the SingleValue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSingleValue + +`func (o *PersesListVariableDefaultValue) SetSingleValue(v string)` + +SetSingleValue sets SingleValue field to given value. + + +### GetSliceValues + +`func (o *PersesListVariableDefaultValue) GetSliceValues() []string` + +GetSliceValues returns the SliceValues field if non-nil, zero value otherwise. + +### GetSliceValuesOk + +`func (o *PersesListVariableDefaultValue) GetSliceValuesOk() (*[]string, bool)` + +GetSliceValuesOk returns a tuple with the SliceValues field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSliceValues + +`func (o *PersesListVariableDefaultValue) SetSliceValues(v []string)` + +SetSliceValues sets SliceValues 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/PersesListVariableSpec.md b/generated/stackstate_api/docs/PersesListVariableSpec.md new file mode 100644 index 00000000..21ab79dc --- /dev/null +++ b/generated/stackstate_api/docs/PersesListVariableSpec.md @@ -0,0 +1,244 @@ +# PersesListVariableSpec + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Display** | Pointer to [**PersesVariableDisplaySpec**](PersesVariableDisplaySpec.md) | | [optional] +**DefaultValue** | Pointer to [**PersesListVariableDefaultValue**](PersesListVariableDefaultValue.md) | | [optional] +**AllowAllValue** | **bool** | | +**AllowMultiple** | **bool** | | +**CustomAllValue** | Pointer to **string** | | [optional] +**CapturingRegexp** | Pointer to **string** | | [optional] +**Sort** | Pointer to [**PersesVariableSort**](PersesVariableSort.md) | | [optional] +**Plugin** | [**PersesPlugin**](PersesPlugin.md) | | + +## Methods + +### NewPersesListVariableSpec + +`func NewPersesListVariableSpec(name string, allowAllValue bool, allowMultiple bool, plugin PersesPlugin, ) *PersesListVariableSpec` + +NewPersesListVariableSpec instantiates a new PersesListVariableSpec 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 + +### NewPersesListVariableSpecWithDefaults + +`func NewPersesListVariableSpecWithDefaults() *PersesListVariableSpec` + +NewPersesListVariableSpecWithDefaults instantiates a new PersesListVariableSpec 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 *PersesListVariableSpec) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PersesListVariableSpec) 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 *PersesListVariableSpec) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDisplay + +`func (o *PersesListVariableSpec) GetDisplay() PersesVariableDisplaySpec` + +GetDisplay returns the Display field if non-nil, zero value otherwise. + +### GetDisplayOk + +`func (o *PersesListVariableSpec) GetDisplayOk() (*PersesVariableDisplaySpec, bool)` + +GetDisplayOk returns a tuple with the Display field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplay + +`func (o *PersesListVariableSpec) SetDisplay(v PersesVariableDisplaySpec)` + +SetDisplay sets Display field to given value. + +### HasDisplay + +`func (o *PersesListVariableSpec) HasDisplay() bool` + +HasDisplay returns a boolean if a field has been set. + +### GetDefaultValue + +`func (o *PersesListVariableSpec) GetDefaultValue() PersesListVariableDefaultValue` + +GetDefaultValue returns the DefaultValue field if non-nil, zero value otherwise. + +### GetDefaultValueOk + +`func (o *PersesListVariableSpec) GetDefaultValueOk() (*PersesListVariableDefaultValue, bool)` + +GetDefaultValueOk returns a tuple with the DefaultValue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultValue + +`func (o *PersesListVariableSpec) SetDefaultValue(v PersesListVariableDefaultValue)` + +SetDefaultValue sets DefaultValue field to given value. + +### HasDefaultValue + +`func (o *PersesListVariableSpec) HasDefaultValue() bool` + +HasDefaultValue returns a boolean if a field has been set. + +### GetAllowAllValue + +`func (o *PersesListVariableSpec) GetAllowAllValue() bool` + +GetAllowAllValue returns the AllowAllValue field if non-nil, zero value otherwise. + +### GetAllowAllValueOk + +`func (o *PersesListVariableSpec) GetAllowAllValueOk() (*bool, bool)` + +GetAllowAllValueOk returns a tuple with the AllowAllValue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAllowAllValue + +`func (o *PersesListVariableSpec) SetAllowAllValue(v bool)` + +SetAllowAllValue sets AllowAllValue field to given value. + + +### GetAllowMultiple + +`func (o *PersesListVariableSpec) GetAllowMultiple() bool` + +GetAllowMultiple returns the AllowMultiple field if non-nil, zero value otherwise. + +### GetAllowMultipleOk + +`func (o *PersesListVariableSpec) GetAllowMultipleOk() (*bool, bool)` + +GetAllowMultipleOk returns a tuple with the AllowMultiple field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAllowMultiple + +`func (o *PersesListVariableSpec) SetAllowMultiple(v bool)` + +SetAllowMultiple sets AllowMultiple field to given value. + + +### GetCustomAllValue + +`func (o *PersesListVariableSpec) GetCustomAllValue() string` + +GetCustomAllValue returns the CustomAllValue field if non-nil, zero value otherwise. + +### GetCustomAllValueOk + +`func (o *PersesListVariableSpec) GetCustomAllValueOk() (*string, bool)` + +GetCustomAllValueOk returns a tuple with the CustomAllValue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomAllValue + +`func (o *PersesListVariableSpec) SetCustomAllValue(v string)` + +SetCustomAllValue sets CustomAllValue field to given value. + +### HasCustomAllValue + +`func (o *PersesListVariableSpec) HasCustomAllValue() bool` + +HasCustomAllValue returns a boolean if a field has been set. + +### GetCapturingRegexp + +`func (o *PersesListVariableSpec) GetCapturingRegexp() string` + +GetCapturingRegexp returns the CapturingRegexp field if non-nil, zero value otherwise. + +### GetCapturingRegexpOk + +`func (o *PersesListVariableSpec) GetCapturingRegexpOk() (*string, bool)` + +GetCapturingRegexpOk returns a tuple with the CapturingRegexp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCapturingRegexp + +`func (o *PersesListVariableSpec) SetCapturingRegexp(v string)` + +SetCapturingRegexp sets CapturingRegexp field to given value. + +### HasCapturingRegexp + +`func (o *PersesListVariableSpec) HasCapturingRegexp() bool` + +HasCapturingRegexp returns a boolean if a field has been set. + +### GetSort + +`func (o *PersesListVariableSpec) GetSort() PersesVariableSort` + +GetSort returns the Sort field if non-nil, zero value otherwise. + +### GetSortOk + +`func (o *PersesListVariableSpec) GetSortOk() (*PersesVariableSort, bool)` + +GetSortOk returns a tuple with the Sort field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSort + +`func (o *PersesListVariableSpec) SetSort(v PersesVariableSort)` + +SetSort sets Sort field to given value. + +### HasSort + +`func (o *PersesListVariableSpec) HasSort() bool` + +HasSort returns a boolean if a field has been set. + +### GetPlugin + +`func (o *PersesListVariableSpec) GetPlugin() PersesPlugin` + +GetPlugin returns the Plugin field if non-nil, zero value otherwise. + +### GetPluginOk + +`func (o *PersesListVariableSpec) GetPluginOk() (*PersesPlugin, bool)` + +GetPluginOk returns a tuple with the Plugin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlugin + +`func (o *PersesListVariableSpec) SetPlugin(v PersesPlugin)` + +SetPlugin sets Plugin 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/PersesPanel.md b/generated/stackstate_api/docs/PersesPanel.md new file mode 100644 index 00000000..7bdeba02 --- /dev/null +++ b/generated/stackstate_api/docs/PersesPanel.md @@ -0,0 +1,82 @@ +# PersesPanel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Kind** | Pointer to **string** | | [optional] +**Spec** | Pointer to [**PersesPanelSpec**](PersesPanelSpec.md) | | [optional] + +## Methods + +### NewPersesPanel + +`func NewPersesPanel() *PersesPanel` + +NewPersesPanel instantiates a new PersesPanel 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 + +### NewPersesPanelWithDefaults + +`func NewPersesPanelWithDefaults() *PersesPanel` + +NewPersesPanelWithDefaults instantiates a new PersesPanel 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 + +### GetKind + +`func (o *PersesPanel) GetKind() string` + +GetKind returns the Kind field if non-nil, zero value otherwise. + +### GetKindOk + +`func (o *PersesPanel) GetKindOk() (*string, bool)` + +GetKindOk returns a tuple with the Kind field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKind + +`func (o *PersesPanel) SetKind(v string)` + +SetKind sets Kind field to given value. + +### HasKind + +`func (o *PersesPanel) HasKind() bool` + +HasKind returns a boolean if a field has been set. + +### GetSpec + +`func (o *PersesPanel) GetSpec() PersesPanelSpec` + +GetSpec returns the Spec field if non-nil, zero value otherwise. + +### GetSpecOk + +`func (o *PersesPanel) GetSpecOk() (*PersesPanelSpec, bool)` + +GetSpecOk returns a tuple with the Spec field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSpec + +`func (o *PersesPanel) SetSpec(v PersesPanelSpec)` + +SetSpec sets Spec field to given value. + +### HasSpec + +`func (o *PersesPanel) HasSpec() bool` + +HasSpec 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/PersesPanelDisplay.md b/generated/stackstate_api/docs/PersesPanelDisplay.md new file mode 100644 index 00000000..789ebf1a --- /dev/null +++ b/generated/stackstate_api/docs/PersesPanelDisplay.md @@ -0,0 +1,82 @@ +# PersesPanelDisplay + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] + +## Methods + +### NewPersesPanelDisplay + +`func NewPersesPanelDisplay() *PersesPanelDisplay` + +NewPersesPanelDisplay instantiates a new PersesPanelDisplay 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 + +### NewPersesPanelDisplayWithDefaults + +`func NewPersesPanelDisplayWithDefaults() *PersesPanelDisplay` + +NewPersesPanelDisplayWithDefaults instantiates a new PersesPanelDisplay 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 + +### GetDescription + +`func (o *PersesPanelDisplay) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *PersesPanelDisplay) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *PersesPanelDisplay) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *PersesPanelDisplay) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetName + +`func (o *PersesPanelDisplay) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PersesPanelDisplay) 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 *PersesPanelDisplay) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PersesPanelDisplay) HasName() bool` + +HasName 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/PersesPanelSpec.md b/generated/stackstate_api/docs/PersesPanelSpec.md new file mode 100644 index 00000000..624e4f3b --- /dev/null +++ b/generated/stackstate_api/docs/PersesPanelSpec.md @@ -0,0 +1,134 @@ +# PersesPanelSpec + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Display** | Pointer to [**PersesPanelDisplay**](PersesPanelDisplay.md) | | [optional] +**Links** | Pointer to [**[]PersesLink**](PersesLink.md) | | [optional] +**Plugin** | Pointer to [**PersesPlugin**](PersesPlugin.md) | | [optional] +**Queries** | Pointer to [**[]PersesQuery**](PersesQuery.md) | | [optional] + +## Methods + +### NewPersesPanelSpec + +`func NewPersesPanelSpec() *PersesPanelSpec` + +NewPersesPanelSpec instantiates a new PersesPanelSpec 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 + +### NewPersesPanelSpecWithDefaults + +`func NewPersesPanelSpecWithDefaults() *PersesPanelSpec` + +NewPersesPanelSpecWithDefaults instantiates a new PersesPanelSpec 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 + +### GetDisplay + +`func (o *PersesPanelSpec) GetDisplay() PersesPanelDisplay` + +GetDisplay returns the Display field if non-nil, zero value otherwise. + +### GetDisplayOk + +`func (o *PersesPanelSpec) GetDisplayOk() (*PersesPanelDisplay, bool)` + +GetDisplayOk returns a tuple with the Display field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplay + +`func (o *PersesPanelSpec) SetDisplay(v PersesPanelDisplay)` + +SetDisplay sets Display field to given value. + +### HasDisplay + +`func (o *PersesPanelSpec) HasDisplay() bool` + +HasDisplay returns a boolean if a field has been set. + +### GetLinks + +`func (o *PersesPanelSpec) GetLinks() []PersesLink` + +GetLinks returns the Links field if non-nil, zero value otherwise. + +### GetLinksOk + +`func (o *PersesPanelSpec) GetLinksOk() (*[]PersesLink, bool)` + +GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLinks + +`func (o *PersesPanelSpec) SetLinks(v []PersesLink)` + +SetLinks sets Links field to given value. + +### HasLinks + +`func (o *PersesPanelSpec) HasLinks() bool` + +HasLinks returns a boolean if a field has been set. + +### GetPlugin + +`func (o *PersesPanelSpec) GetPlugin() PersesPlugin` + +GetPlugin returns the Plugin field if non-nil, zero value otherwise. + +### GetPluginOk + +`func (o *PersesPanelSpec) GetPluginOk() (*PersesPlugin, bool)` + +GetPluginOk returns a tuple with the Plugin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlugin + +`func (o *PersesPanelSpec) SetPlugin(v PersesPlugin)` + +SetPlugin sets Plugin field to given value. + +### HasPlugin + +`func (o *PersesPanelSpec) HasPlugin() bool` + +HasPlugin returns a boolean if a field has been set. + +### GetQueries + +`func (o *PersesPanelSpec) GetQueries() []PersesQuery` + +GetQueries returns the Queries field if non-nil, zero value otherwise. + +### GetQueriesOk + +`func (o *PersesPanelSpec) GetQueriesOk() (*[]PersesQuery, bool)` + +GetQueriesOk returns a tuple with the Queries field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQueries + +`func (o *PersesPanelSpec) SetQueries(v []PersesQuery)` + +SetQueries sets Queries field to given value. + +### HasQueries + +`func (o *PersesPanelSpec) HasQueries() bool` + +HasQueries 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/PersesPlugin.md b/generated/stackstate_api/docs/PersesPlugin.md new file mode 100644 index 00000000..ed0b7d69 --- /dev/null +++ b/generated/stackstate_api/docs/PersesPlugin.md @@ -0,0 +1,82 @@ +# PersesPlugin + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Kind** | Pointer to **string** | | [optional] +**Spec** | Pointer to **map[string]interface{}** | | [optional] + +## Methods + +### NewPersesPlugin + +`func NewPersesPlugin() *PersesPlugin` + +NewPersesPlugin instantiates a new PersesPlugin 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 + +### NewPersesPluginWithDefaults + +`func NewPersesPluginWithDefaults() *PersesPlugin` + +NewPersesPluginWithDefaults instantiates a new PersesPlugin 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 + +### GetKind + +`func (o *PersesPlugin) GetKind() string` + +GetKind returns the Kind field if non-nil, zero value otherwise. + +### GetKindOk + +`func (o *PersesPlugin) GetKindOk() (*string, bool)` + +GetKindOk returns a tuple with the Kind field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKind + +`func (o *PersesPlugin) SetKind(v string)` + +SetKind sets Kind field to given value. + +### HasKind + +`func (o *PersesPlugin) HasKind() bool` + +HasKind returns a boolean if a field has been set. + +### GetSpec + +`func (o *PersesPlugin) GetSpec() map[string]interface{}` + +GetSpec returns the Spec field if non-nil, zero value otherwise. + +### GetSpecOk + +`func (o *PersesPlugin) GetSpecOk() (*map[string]interface{}, bool)` + +GetSpecOk returns a tuple with the Spec field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSpec + +`func (o *PersesPlugin) SetSpec(v map[string]interface{})` + +SetSpec sets Spec field to given value. + +### HasSpec + +`func (o *PersesPlugin) HasSpec() bool` + +HasSpec 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/PersesProjectMetadata.md b/generated/stackstate_api/docs/PersesProjectMetadata.md new file mode 100644 index 00000000..04662eed --- /dev/null +++ b/generated/stackstate_api/docs/PersesProjectMetadata.md @@ -0,0 +1,160 @@ +# PersesProjectMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | Pointer to **time.Time** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Project** | Pointer to **string** | | [optional] +**UpdatedAt** | Pointer to **time.Time** | | [optional] +**Version** | Pointer to **int32** | | [optional] + +## Methods + +### NewPersesProjectMetadata + +`func NewPersesProjectMetadata() *PersesProjectMetadata` + +NewPersesProjectMetadata instantiates a new PersesProjectMetadata 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 + +### NewPersesProjectMetadataWithDefaults + +`func NewPersesProjectMetadataWithDefaults() *PersesProjectMetadata` + +NewPersesProjectMetadataWithDefaults instantiates a new PersesProjectMetadata 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 + +### GetCreatedAt + +`func (o *PersesProjectMetadata) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *PersesProjectMetadata) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *PersesProjectMetadata) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + +### HasCreatedAt + +`func (o *PersesProjectMetadata) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### GetName + +`func (o *PersesProjectMetadata) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PersesProjectMetadata) 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 *PersesProjectMetadata) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PersesProjectMetadata) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetProject + +`func (o *PersesProjectMetadata) GetProject() string` + +GetProject returns the Project field if non-nil, zero value otherwise. + +### GetProjectOk + +`func (o *PersesProjectMetadata) GetProjectOk() (*string, bool)` + +GetProjectOk returns a tuple with the Project field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProject + +`func (o *PersesProjectMetadata) SetProject(v string)` + +SetProject sets Project field to given value. + +### HasProject + +`func (o *PersesProjectMetadata) HasProject() bool` + +HasProject returns a boolean if a field has been set. + +### GetUpdatedAt + +`func (o *PersesProjectMetadata) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *PersesProjectMetadata) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *PersesProjectMetadata) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + +### HasUpdatedAt + +`func (o *PersesProjectMetadata) HasUpdatedAt() bool` + +HasUpdatedAt returns a boolean if a field has been set. + +### GetVersion + +`func (o *PersesProjectMetadata) GetVersion() int32` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *PersesProjectMetadata) GetVersionOk() (*int32, 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 *PersesProjectMetadata) SetVersion(v int32)` + +SetVersion sets Version field to given value. + +### HasVersion + +`func (o *PersesProjectMetadata) HasVersion() bool` + +HasVersion 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/PersesQuery.md b/generated/stackstate_api/docs/PersesQuery.md new file mode 100644 index 00000000..5f740742 --- /dev/null +++ b/generated/stackstate_api/docs/PersesQuery.md @@ -0,0 +1,82 @@ +# PersesQuery + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Kind** | Pointer to **string** | | [optional] +**Spec** | Pointer to [**PersesQuerySpec**](PersesQuerySpec.md) | | [optional] + +## Methods + +### NewPersesQuery + +`func NewPersesQuery() *PersesQuery` + +NewPersesQuery instantiates a new PersesQuery 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 + +### NewPersesQueryWithDefaults + +`func NewPersesQueryWithDefaults() *PersesQuery` + +NewPersesQueryWithDefaults instantiates a new PersesQuery 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 + +### GetKind + +`func (o *PersesQuery) GetKind() string` + +GetKind returns the Kind field if non-nil, zero value otherwise. + +### GetKindOk + +`func (o *PersesQuery) GetKindOk() (*string, bool)` + +GetKindOk returns a tuple with the Kind field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKind + +`func (o *PersesQuery) SetKind(v string)` + +SetKind sets Kind field to given value. + +### HasKind + +`func (o *PersesQuery) HasKind() bool` + +HasKind returns a boolean if a field has been set. + +### GetSpec + +`func (o *PersesQuery) GetSpec() PersesQuerySpec` + +GetSpec returns the Spec field if non-nil, zero value otherwise. + +### GetSpecOk + +`func (o *PersesQuery) GetSpecOk() (*PersesQuerySpec, bool)` + +GetSpecOk returns a tuple with the Spec field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSpec + +`func (o *PersesQuery) SetSpec(v PersesQuerySpec)` + +SetSpec sets Spec field to given value. + +### HasSpec + +`func (o *PersesQuery) HasSpec() bool` + +HasSpec 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/PersesQuerySpec.md b/generated/stackstate_api/docs/PersesQuerySpec.md new file mode 100644 index 00000000..1b4be8ec --- /dev/null +++ b/generated/stackstate_api/docs/PersesQuerySpec.md @@ -0,0 +1,56 @@ +# PersesQuerySpec + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Plugin** | Pointer to [**PersesPlugin**](PersesPlugin.md) | | [optional] + +## Methods + +### NewPersesQuerySpec + +`func NewPersesQuerySpec() *PersesQuerySpec` + +NewPersesQuerySpec instantiates a new PersesQuerySpec 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 + +### NewPersesQuerySpecWithDefaults + +`func NewPersesQuerySpecWithDefaults() *PersesQuerySpec` + +NewPersesQuerySpecWithDefaults instantiates a new PersesQuerySpec 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 + +### GetPlugin + +`func (o *PersesQuerySpec) GetPlugin() PersesPlugin` + +GetPlugin returns the Plugin field if non-nil, zero value otherwise. + +### GetPluginOk + +`func (o *PersesQuerySpec) GetPluginOk() (*PersesPlugin, bool)` + +GetPluginOk returns a tuple with the Plugin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPlugin + +`func (o *PersesQuerySpec) SetPlugin(v PersesPlugin)` + +SetPlugin sets Plugin field to given value. + +### HasPlugin + +`func (o *PersesQuerySpec) HasPlugin() bool` + +HasPlugin 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/PersesTextVariable.md b/generated/stackstate_api/docs/PersesTextVariable.md new file mode 100644 index 00000000..93bfe192 --- /dev/null +++ b/generated/stackstate_api/docs/PersesTextVariable.md @@ -0,0 +1,77 @@ +# PersesTextVariable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Kind** | **string** | | +**Spec** | Pointer to [**PersesTextVariableSpec**](PersesTextVariableSpec.md) | | [optional] + +## Methods + +### NewPersesTextVariable + +`func NewPersesTextVariable(kind string, ) *PersesTextVariable` + +NewPersesTextVariable instantiates a new PersesTextVariable 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 + +### NewPersesTextVariableWithDefaults + +`func NewPersesTextVariableWithDefaults() *PersesTextVariable` + +NewPersesTextVariableWithDefaults instantiates a new PersesTextVariable 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 + +### GetKind + +`func (o *PersesTextVariable) GetKind() string` + +GetKind returns the Kind field if non-nil, zero value otherwise. + +### GetKindOk + +`func (o *PersesTextVariable) GetKindOk() (*string, bool)` + +GetKindOk returns a tuple with the Kind field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKind + +`func (o *PersesTextVariable) SetKind(v string)` + +SetKind sets Kind field to given value. + + +### GetSpec + +`func (o *PersesTextVariable) GetSpec() PersesTextVariableSpec` + +GetSpec returns the Spec field if non-nil, zero value otherwise. + +### GetSpecOk + +`func (o *PersesTextVariable) GetSpecOk() (*PersesTextVariableSpec, bool)` + +GetSpecOk returns a tuple with the Spec field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSpec + +`func (o *PersesTextVariable) SetSpec(v PersesTextVariableSpec)` + +SetSpec sets Spec field to given value. + +### HasSpec + +`func (o *PersesTextVariable) HasSpec() bool` + +HasSpec 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/PersesTextVariableSpec.md b/generated/stackstate_api/docs/PersesTextVariableSpec.md new file mode 100644 index 00000000..eca50c0b --- /dev/null +++ b/generated/stackstate_api/docs/PersesTextVariableSpec.md @@ -0,0 +1,124 @@ +# PersesTextVariableSpec + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Display** | Pointer to [**PersesVariableDisplaySpec**](PersesVariableDisplaySpec.md) | | [optional] +**Value** | **string** | | +**Constant** | Pointer to **bool** | | [optional] + +## Methods + +### NewPersesTextVariableSpec + +`func NewPersesTextVariableSpec(name string, value string, ) *PersesTextVariableSpec` + +NewPersesTextVariableSpec instantiates a new PersesTextVariableSpec 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 + +### NewPersesTextVariableSpecWithDefaults + +`func NewPersesTextVariableSpecWithDefaults() *PersesTextVariableSpec` + +NewPersesTextVariableSpecWithDefaults instantiates a new PersesTextVariableSpec 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 *PersesTextVariableSpec) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PersesTextVariableSpec) 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 *PersesTextVariableSpec) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDisplay + +`func (o *PersesTextVariableSpec) GetDisplay() PersesVariableDisplaySpec` + +GetDisplay returns the Display field if non-nil, zero value otherwise. + +### GetDisplayOk + +`func (o *PersesTextVariableSpec) GetDisplayOk() (*PersesVariableDisplaySpec, bool)` + +GetDisplayOk returns a tuple with the Display field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplay + +`func (o *PersesTextVariableSpec) SetDisplay(v PersesVariableDisplaySpec)` + +SetDisplay sets Display field to given value. + +### HasDisplay + +`func (o *PersesTextVariableSpec) HasDisplay() bool` + +HasDisplay returns a boolean if a field has been set. + +### GetValue + +`func (o *PersesTextVariableSpec) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *PersesTextVariableSpec) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *PersesTextVariableSpec) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetConstant + +`func (o *PersesTextVariableSpec) GetConstant() bool` + +GetConstant returns the Constant field if non-nil, zero value otherwise. + +### GetConstantOk + +`func (o *PersesTextVariableSpec) GetConstantOk() (*bool, bool)` + +GetConstantOk returns a tuple with the Constant field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConstant + +`func (o *PersesTextVariableSpec) SetConstant(v bool)` + +SetConstant sets Constant field to given value. + +### HasConstant + +`func (o *PersesTextVariableSpec) HasConstant() bool` + +HasConstant 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/PersesVariableDisplaySpec.md b/generated/stackstate_api/docs/PersesVariableDisplaySpec.md new file mode 100644 index 00000000..0c6803aa --- /dev/null +++ b/generated/stackstate_api/docs/PersesVariableDisplaySpec.md @@ -0,0 +1,108 @@ +# PersesVariableDisplaySpec + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Hidden** | Pointer to **bool** | | [optional] + +## Methods + +### NewPersesVariableDisplaySpec + +`func NewPersesVariableDisplaySpec() *PersesVariableDisplaySpec` + +NewPersesVariableDisplaySpec instantiates a new PersesVariableDisplaySpec 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 + +### NewPersesVariableDisplaySpecWithDefaults + +`func NewPersesVariableDisplaySpecWithDefaults() *PersesVariableDisplaySpec` + +NewPersesVariableDisplaySpecWithDefaults instantiates a new PersesVariableDisplaySpec 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 *PersesVariableDisplaySpec) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PersesVariableDisplaySpec) 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 *PersesVariableDisplaySpec) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PersesVariableDisplaySpec) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *PersesVariableDisplaySpec) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *PersesVariableDisplaySpec) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *PersesVariableDisplaySpec) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *PersesVariableDisplaySpec) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetHidden + +`func (o *PersesVariableDisplaySpec) GetHidden() bool` + +GetHidden returns the Hidden field if non-nil, zero value otherwise. + +### GetHiddenOk + +`func (o *PersesVariableDisplaySpec) GetHiddenOk() (*bool, bool)` + +GetHiddenOk returns a tuple with the Hidden field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHidden + +`func (o *PersesVariableDisplaySpec) SetHidden(v bool)` + +SetHidden sets Hidden field to given value. + +### HasHidden + +`func (o *PersesVariableDisplaySpec) HasHidden() bool` + +HasHidden 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/PersesVariableSort.md b/generated/stackstate_api/docs/PersesVariableSort.md new file mode 100644 index 00000000..a239d6c4 --- /dev/null +++ b/generated/stackstate_api/docs/PersesVariableSort.md @@ -0,0 +1,23 @@ +# PersesVariableSort + +## Enum + + +* `NONE` (value: `"none"`) + +* `ALPHABETICAL_ASC` (value: `"alphabetical-asc"`) + +* `ALPHABETICAL_DESC` (value: `"alphabetical-desc"`) + +* `NUMERICAL_ASC` (value: `"numerical-asc"`) + +* `NUMERICAL_DESC` (value: `"numerical-desc"`) + +* `ALPHABETICAL_CI_ASC` (value: `"alphabetical-ci-asc"`) + +* `ALPHABETICAL_CI_DESC` (value: `"alphabetical-ci-desc"`) + + +[[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/PersesVariableTypes.md b/generated/stackstate_api/docs/PersesVariableTypes.md new file mode 100644 index 00000000..48672c1d --- /dev/null +++ b/generated/stackstate_api/docs/PersesVariableTypes.md @@ -0,0 +1,77 @@ +# PersesVariableTypes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Kind** | **string** | | +**Spec** | Pointer to [**PersesListVariableSpec**](PersesListVariableSpec.md) | | [optional] + +## Methods + +### NewPersesVariableTypes + +`func NewPersesVariableTypes(kind string, ) *PersesVariableTypes` + +NewPersesVariableTypes instantiates a new PersesVariableTypes 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 + +### NewPersesVariableTypesWithDefaults + +`func NewPersesVariableTypesWithDefaults() *PersesVariableTypes` + +NewPersesVariableTypesWithDefaults instantiates a new PersesVariableTypes 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 + +### GetKind + +`func (o *PersesVariableTypes) GetKind() string` + +GetKind returns the Kind field if non-nil, zero value otherwise. + +### GetKindOk + +`func (o *PersesVariableTypes) GetKindOk() (*string, bool)` + +GetKindOk returns a tuple with the Kind field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKind + +`func (o *PersesVariableTypes) SetKind(v string)` + +SetKind sets Kind field to given value. + + +### GetSpec + +`func (o *PersesVariableTypes) GetSpec() PersesListVariableSpec` + +GetSpec returns the Spec field if non-nil, zero value otherwise. + +### GetSpecOk + +`func (o *PersesVariableTypes) GetSpecOk() (*PersesListVariableSpec, bool)` + +GetSpecOk returns a tuple with the Spec field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSpec + +`func (o *PersesVariableTypes) SetSpec(v PersesListVariableSpec)` + +SetSpec sets Spec field to given value. + +### HasSpec + +`func (o *PersesVariableTypes) HasSpec() bool` + +HasSpec 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/Span.md b/generated/stackstate_api/docs/Span.md index 10601989..f02a1c7e 100644 --- a/generated/stackstate_api/docs/Span.md +++ b/generated/stackstate_api/docs/Span.md @@ -15,8 +15,8 @@ Name | Type | Description | Notes **ServiceName** | **string** | Logical name of the service for the span | **SpanKind** | [**SpanKind**](SpanKind.md) | | **SpanParentType** | [**SpanParentType**](SpanParentType.md) | | -**ResourceAttributes** | **map[string]string** | Set of key/value pairs providing extra contextual information. Keys are unique. | **SpanAttributes** | **map[string]string** | Set of key/value pairs providing extra contextual information. Keys are unique. | +**ResourceId** | **string** | Reference to shared resource attributes, used to deduplicate repeated resource data. | **StatusCode** | [**StatusCode**](StatusCode.md) | | **StatusMessage** | Pointer to **string** | Human readable message for the status | [optional] **ScopeName** | Pointer to **string** | The name of the instrumentation scope for the span https://opentelemetry.io/docs/specs/otel/glossary/#instrumentation-scope | [optional] @@ -28,7 +28,7 @@ Name | Type | Description | Notes ### NewSpan -`func NewSpan(startTime InstantNanoPrecision, endTime InstantNanoPrecision, durationNanos int64, traceId string, spanId string, spanName string, serviceName string, spanKind SpanKind, spanParentType SpanParentType, resourceAttributes map[string]string, spanAttributes map[string]string, statusCode StatusCode, events []SpanEvent, links []SpanLink, ) *Span` +`func NewSpan(startTime InstantNanoPrecision, endTime InstantNanoPrecision, durationNanos int64, traceId string, spanId string, spanName string, serviceName string, spanKind SpanKind, spanParentType SpanParentType, spanAttributes map[string]string, resourceId string, statusCode StatusCode, events []SpanEvent, links []SpanLink, ) *Span` NewSpan instantiates a new Span object This constructor will assign default values to properties that have it defined, @@ -273,44 +273,44 @@ and a boolean to check if the value has been set. SetSpanParentType sets SpanParentType field to given value. -### GetResourceAttributes +### GetSpanAttributes -`func (o *Span) GetResourceAttributes() map[string]string` +`func (o *Span) GetSpanAttributes() map[string]string` -GetResourceAttributes returns the ResourceAttributes field if non-nil, zero value otherwise. +GetSpanAttributes returns the SpanAttributes field if non-nil, zero value otherwise. -### GetResourceAttributesOk +### GetSpanAttributesOk -`func (o *Span) GetResourceAttributesOk() (*map[string]string, bool)` +`func (o *Span) GetSpanAttributesOk() (*map[string]string, bool)` -GetResourceAttributesOk returns a tuple with the ResourceAttributes field if it's non-nil, zero value otherwise +GetSpanAttributesOk returns a tuple with the SpanAttributes field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetResourceAttributes +### SetSpanAttributes -`func (o *Span) SetResourceAttributes(v map[string]string)` +`func (o *Span) SetSpanAttributes(v map[string]string)` -SetResourceAttributes sets ResourceAttributes field to given value. +SetSpanAttributes sets SpanAttributes field to given value. -### GetSpanAttributes +### GetResourceId -`func (o *Span) GetSpanAttributes() map[string]string` +`func (o *Span) GetResourceId() string` -GetSpanAttributes returns the SpanAttributes field if non-nil, zero value otherwise. +GetResourceId returns the ResourceId field if non-nil, zero value otherwise. -### GetSpanAttributesOk +### GetResourceIdOk -`func (o *Span) GetSpanAttributesOk() (*map[string]string, bool)` +`func (o *Span) GetResourceIdOk() (*string, bool)` -GetSpanAttributesOk returns a tuple with the SpanAttributes field if it's non-nil, zero value otherwise +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. -### SetSpanAttributes +### SetResourceId -`func (o *Span) SetSpanAttributes(v map[string]string)` +`func (o *Span) SetResourceId(v string)` -SetSpanAttributes sets SpanAttributes field to given value. +SetResourceId sets ResourceId field to given value. ### GetStatusCode diff --git a/generated/stackstate_api/docs/SpanResponse.md b/generated/stackstate_api/docs/SpanResponse.md new file mode 100644 index 00000000..6fc88126 --- /dev/null +++ b/generated/stackstate_api/docs/SpanResponse.md @@ -0,0 +1,72 @@ +# SpanResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Span** | [**Span**](Span.md) | | +**ResourceAttributes** | **map[string]string** | Set of key/value pairs providing extra contextual information. Keys are unique. | + +## Methods + +### NewSpanResponse + +`func NewSpanResponse(span Span, resourceAttributes map[string]string, ) *SpanResponse` + +NewSpanResponse instantiates a new SpanResponse 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 + +### NewSpanResponseWithDefaults + +`func NewSpanResponseWithDefaults() *SpanResponse` + +NewSpanResponseWithDefaults instantiates a new SpanResponse 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 + +### GetSpan + +`func (o *SpanResponse) GetSpan() Span` + +GetSpan returns the Span field if non-nil, zero value otherwise. + +### GetSpanOk + +`func (o *SpanResponse) GetSpanOk() (*Span, bool)` + +GetSpanOk returns a tuple with the Span field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSpan + +`func (o *SpanResponse) SetSpan(v Span)` + +SetSpan sets Span field to given value. + + +### GetResourceAttributes + +`func (o *SpanResponse) GetResourceAttributes() map[string]string` + +GetResourceAttributes returns the ResourceAttributes field if non-nil, zero value otherwise. + +### GetResourceAttributesOk + +`func (o *SpanResponse) GetResourceAttributesOk() (*map[string]string, bool)` + +GetResourceAttributesOk returns a tuple with the ResourceAttributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResourceAttributes + +`func (o *SpanResponse) SetResourceAttributes(v map[string]string)` + +SetResourceAttributes sets ResourceAttributes 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/SubjectApi.md b/generated/stackstate_api/docs/SubjectApi.md index 8b2a32a6..1febe832 100644 --- a/generated/stackstate_api/docs/SubjectApi.md +++ b/generated/stackstate_api/docs/SubjectApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description ## CreateSubject -> CreateSubject(ctx, subject).CreateSubject(createSubject).Execute() +> CreateSubject(ctx, subject).Execute() Create a subject @@ -33,11 +33,10 @@ import ( func main() { subject := "subject_example" // string | - createSubject := *openapiclient.NewCreateSubject("Query_example", "Version_example") // CreateSubject | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubjectApi.CreateSubject(context.Background(), subject).CreateSubject(createSubject).Execute() + resp, r, err := apiClient.SubjectApi.CreateSubject(context.Background(), subject).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SubjectApi.CreateSubject``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -61,7 +60,6 @@ Other parameters are passed through a pointer to a apiCreateSubjectRequest struc Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **createSubject** | [**CreateSubject**](CreateSubject.md) | | ### Return type @@ -73,7 +71,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/generated/stackstate_api/docs/SubjectConfig.md b/generated/stackstate_api/docs/SubjectConfig.md index 431cfb48..f3212c8d 100644 --- a/generated/stackstate_api/docs/SubjectConfig.md +++ b/generated/stackstate_api/docs/SubjectConfig.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Handle** | **string** | | -**ScopeQuery** | Pointer to **string** | | [optional] ## Methods @@ -46,31 +45,6 @@ and a boolean to check if the value has been set. SetHandle sets Handle field to given value. -### GetScopeQuery - -`func (o *SubjectConfig) GetScopeQuery() string` - -GetScopeQuery returns the ScopeQuery field if non-nil, zero value otherwise. - -### GetScopeQueryOk - -`func (o *SubjectConfig) GetScopeQueryOk() (*string, bool)` - -GetScopeQueryOk returns a tuple with the ScopeQuery field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetScopeQuery - -`func (o *SubjectConfig) SetScopeQuery(v string)` - -SetScopeQuery sets ScopeQuery field to given value. - -### HasScopeQuery - -`func (o *SubjectConfig) HasScopeQuery() bool` - -HasScopeQuery 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/TimelineSummaryOverflow.md b/generated/stackstate_api/docs/TimelineSummaryOverflow.md new file mode 100644 index 00000000..ac44b7eb --- /dev/null +++ b/generated/stackstate_api/docs/TimelineSummaryOverflow.md @@ -0,0 +1,51 @@ +# TimelineSummaryOverflow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | | + +## Methods + +### NewTimelineSummaryOverflow + +`func NewTimelineSummaryOverflow(message string, ) *TimelineSummaryOverflow` + +NewTimelineSummaryOverflow instantiates a new TimelineSummaryOverflow 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 + +### NewTimelineSummaryOverflowWithDefaults + +`func NewTimelineSummaryOverflowWithDefaults() *TimelineSummaryOverflow` + +NewTimelineSummaryOverflowWithDefaults instantiates a new TimelineSummaryOverflow 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 + +### GetMessage + +`func (o *TimelineSummaryOverflow) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *TimelineSummaryOverflow) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *TimelineSummaryOverflow) SetMessage(v string)` + +SetMessage sets Message field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/stackstate_api/docs/Trace.md b/generated/stackstate_api/docs/Trace.md index 80cb541c..14a0a7ed 100644 --- a/generated/stackstate_api/docs/Trace.md +++ b/generated/stackstate_api/docs/Trace.md @@ -6,12 +6,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **TraceId** | **string** | The id of the trace | **Spans** | [**[]Span**](Span.md) | All spans for the trace | +**Resources** | **map[string]map[string]string** | Map of resource identifiers to their corresponding resource attributes (key/value pairs). Keys are UUIDs used in the spans’ `resourceId` fields. | ## Methods ### NewTrace -`func NewTrace(traceId string, spans []Span, ) *Trace` +`func NewTrace(traceId string, spans []Span, resources map[string]map[string]string, ) *Trace` NewTrace instantiates a new Trace object This constructor will assign default values to properties that have it defined, @@ -66,6 +67,26 @@ and a boolean to check if the value has been set. SetSpans sets Spans field to given value. +### GetResources + +`func (o *Trace) GetResources() map[string]map[string]string` + +GetResources returns the Resources field if non-nil, zero value otherwise. + +### GetResourcesOk + +`func (o *Trace) GetResourcesOk() (*map[string]map[string]string, bool)` + +GetResourcesOk returns a tuple with the Resources field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResources + +`func (o *Trace) SetResources(v map[string]map[string]string)` + +SetResources sets Resources 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/TraceFilter.md b/generated/stackstate_api/docs/TraceFilter.md index 4ade617e..b449eb7d 100644 --- a/generated/stackstate_api/docs/TraceFilter.md +++ b/generated/stackstate_api/docs/TraceFilter.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SpanFilter** | [**SpanFilter**](SpanFilter.md) | | -**TraceAttributes** | **map[string][]string** | Filter traces by 1 or more attributes | +**PrimarySpanFilter** | [**SpanFilter**](SpanFilter.md) | | +**SecondarySpanFilter** | Pointer to [**SpanFilter**](SpanFilter.md) | | [optional] ## Methods ### NewTraceFilter -`func NewTraceFilter(spanFilter SpanFilter, traceAttributes map[string][]string, ) *TraceFilter` +`func NewTraceFilter(primarySpanFilter SpanFilter, ) *TraceFilter` NewTraceFilter instantiates a new TraceFilter object This constructor will assign default values to properties that have it defined, @@ -26,45 +26,50 @@ NewTraceFilterWithDefaults instantiates a new TraceFilter 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 -### GetSpanFilter +### GetPrimarySpanFilter -`func (o *TraceFilter) GetSpanFilter() SpanFilter` +`func (o *TraceFilter) GetPrimarySpanFilter() SpanFilter` -GetSpanFilter returns the SpanFilter field if non-nil, zero value otherwise. +GetPrimarySpanFilter returns the PrimarySpanFilter field if non-nil, zero value otherwise. -### GetSpanFilterOk +### GetPrimarySpanFilterOk -`func (o *TraceFilter) GetSpanFilterOk() (*SpanFilter, bool)` +`func (o *TraceFilter) GetPrimarySpanFilterOk() (*SpanFilter, bool)` -GetSpanFilterOk returns a tuple with the SpanFilter field if it's non-nil, zero value otherwise +GetPrimarySpanFilterOk returns a tuple with the PrimarySpanFilter field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetSpanFilter +### SetPrimarySpanFilter -`func (o *TraceFilter) SetSpanFilter(v SpanFilter)` +`func (o *TraceFilter) SetPrimarySpanFilter(v SpanFilter)` -SetSpanFilter sets SpanFilter field to given value. +SetPrimarySpanFilter sets PrimarySpanFilter field to given value. -### GetTraceAttributes +### GetSecondarySpanFilter -`func (o *TraceFilter) GetTraceAttributes() map[string][]string` +`func (o *TraceFilter) GetSecondarySpanFilter() SpanFilter` -GetTraceAttributes returns the TraceAttributes field if non-nil, zero value otherwise. +GetSecondarySpanFilter returns the SecondarySpanFilter field if non-nil, zero value otherwise. -### GetTraceAttributesOk +### GetSecondarySpanFilterOk -`func (o *TraceFilter) GetTraceAttributesOk() (*map[string][]string, bool)` +`func (o *TraceFilter) GetSecondarySpanFilterOk() (*SpanFilter, bool)` -GetTraceAttributesOk returns a tuple with the TraceAttributes field if it's non-nil, zero value otherwise +GetSecondarySpanFilterOk returns a tuple with the SecondarySpanFilter field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetTraceAttributes +### SetSecondarySpanFilter -`func (o *TraceFilter) SetTraceAttributes(v map[string][]string)` +`func (o *TraceFilter) SetSecondarySpanFilter(v SpanFilter)` -SetTraceAttributes sets TraceAttributes field to given value. +SetSecondarySpanFilter sets SecondarySpanFilter field to given value. +### HasSecondarySpanFilter + +`func (o *TraceFilter) HasSecondarySpanFilter() bool` + +HasSecondarySpanFilter 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/TraceIdentifier.md b/generated/stackstate_api/docs/TraceIdentifier.md deleted file mode 100644 index bd6e00f6..00000000 --- a/generated/stackstate_api/docs/TraceIdentifier.md +++ /dev/null @@ -1,72 +0,0 @@ -# TraceIdentifier - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**TraceId** | **string** | The unique identifier for the trace, all spans of the same trace share the same trace_id | -**SpanId** | **string** | The unique identifier of the span within the trace | - -## Methods - -### NewTraceIdentifier - -`func NewTraceIdentifier(traceId string, spanId string, ) *TraceIdentifier` - -NewTraceIdentifier instantiates a new TraceIdentifier 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 - -### NewTraceIdentifierWithDefaults - -`func NewTraceIdentifierWithDefaults() *TraceIdentifier` - -NewTraceIdentifierWithDefaults instantiates a new TraceIdentifier 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 - -### GetTraceId - -`func (o *TraceIdentifier) GetTraceId() string` - -GetTraceId returns the TraceId field if non-nil, zero value otherwise. - -### GetTraceIdOk - -`func (o *TraceIdentifier) GetTraceIdOk() (*string, bool)` - -GetTraceIdOk returns a tuple with the TraceId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTraceId - -`func (o *TraceIdentifier) SetTraceId(v string)` - -SetTraceId sets TraceId field to given value. - - -### GetSpanId - -`func (o *TraceIdentifier) GetSpanId() string` - -GetSpanId returns the SpanId field if non-nil, zero value otherwise. - -### GetSpanIdOk - -`func (o *TraceIdentifier) GetSpanIdOk() (*string, bool)` - -GetSpanIdOk returns a tuple with the SpanId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSpanId - -`func (o *TraceIdentifier) SetSpanId(v string)` - -SetSpanId sets SpanId 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/TraceQuery.md b/generated/stackstate_api/docs/TraceQuery.md index 536f2869..a989621b 100644 --- a/generated/stackstate_api/docs/TraceQuery.md +++ b/generated/stackstate_api/docs/TraceQuery.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SpanFilter** | [**SpanFilter**](SpanFilter.md) | | -**TraceAttributes** | **map[string][]string** | Filter traces by 1 or more attributes | +**PrimarySpanFilter** | [**SpanFilter**](SpanFilter.md) | | +**SecondarySpanFilter** | Pointer to [**SpanFilter**](SpanFilter.md) | | [optional] **SortBy** | Pointer to [**[]SpanSortOption**](SpanSortOption.md) | | [optional] ## Methods ### NewTraceQuery -`func NewTraceQuery(spanFilter SpanFilter, traceAttributes map[string][]string, ) *TraceQuery` +`func NewTraceQuery(primarySpanFilter SpanFilter, ) *TraceQuery` NewTraceQuery instantiates a new TraceQuery object This constructor will assign default values to properties that have it defined, @@ -27,45 +27,50 @@ NewTraceQueryWithDefaults instantiates a new TraceQuery 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 -### GetSpanFilter +### GetPrimarySpanFilter -`func (o *TraceQuery) GetSpanFilter() SpanFilter` +`func (o *TraceQuery) GetPrimarySpanFilter() SpanFilter` -GetSpanFilter returns the SpanFilter field if non-nil, zero value otherwise. +GetPrimarySpanFilter returns the PrimarySpanFilter field if non-nil, zero value otherwise. -### GetSpanFilterOk +### GetPrimarySpanFilterOk -`func (o *TraceQuery) GetSpanFilterOk() (*SpanFilter, bool)` +`func (o *TraceQuery) GetPrimarySpanFilterOk() (*SpanFilter, bool)` -GetSpanFilterOk returns a tuple with the SpanFilter field if it's non-nil, zero value otherwise +GetPrimarySpanFilterOk returns a tuple with the PrimarySpanFilter field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetSpanFilter +### SetPrimarySpanFilter -`func (o *TraceQuery) SetSpanFilter(v SpanFilter)` +`func (o *TraceQuery) SetPrimarySpanFilter(v SpanFilter)` -SetSpanFilter sets SpanFilter field to given value. +SetPrimarySpanFilter sets PrimarySpanFilter field to given value. -### GetTraceAttributes +### GetSecondarySpanFilter -`func (o *TraceQuery) GetTraceAttributes() map[string][]string` +`func (o *TraceQuery) GetSecondarySpanFilter() SpanFilter` -GetTraceAttributes returns the TraceAttributes field if non-nil, zero value otherwise. +GetSecondarySpanFilter returns the SecondarySpanFilter field if non-nil, zero value otherwise. -### GetTraceAttributesOk +### GetSecondarySpanFilterOk -`func (o *TraceQuery) GetTraceAttributesOk() (*map[string][]string, bool)` +`func (o *TraceQuery) GetSecondarySpanFilterOk() (*SpanFilter, bool)` -GetTraceAttributesOk returns a tuple with the TraceAttributes field if it's non-nil, zero value otherwise +GetSecondarySpanFilterOk returns a tuple with the SecondarySpanFilter field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetTraceAttributes +### SetSecondarySpanFilter -`func (o *TraceQuery) SetTraceAttributes(v map[string][]string)` +`func (o *TraceQuery) SetSecondarySpanFilter(v SpanFilter)` -SetTraceAttributes sets TraceAttributes field to given value. +SetSecondarySpanFilter sets SecondarySpanFilter field to given value. +### HasSecondarySpanFilter + +`func (o *TraceQuery) HasSecondarySpanFilter() bool` + +HasSecondarySpanFilter returns a boolean if a field has been set. ### GetSortBy diff --git a/generated/stackstate_api/docs/TraceQueryMatch.md b/generated/stackstate_api/docs/TraceQueryMatch.md new file mode 100644 index 00000000..94660736 --- /dev/null +++ b/generated/stackstate_api/docs/TraceQueryMatch.md @@ -0,0 +1,135 @@ +# TraceQueryMatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TraceId** | **string** | The id of the trace | +**Spans** | [**[]Span**](Span.md) | All spans for the trace | +**Resources** | **map[string]map[string]string** | Map of resource identifiers to their corresponding resource attributes (key/value pairs). Keys are UUIDs used in the spans’ `resourceId` fields. | +**PrimaryFilterMatches** | **[]string** | Spans matching the primary filter | +**SecondaryFilterMatches** | **[]string** | Spans matching the secondary filter | + +## Methods + +### NewTraceQueryMatch + +`func NewTraceQueryMatch(traceId string, spans []Span, resources map[string]map[string]string, primaryFilterMatches []string, secondaryFilterMatches []string, ) *TraceQueryMatch` + +NewTraceQueryMatch instantiates a new TraceQueryMatch 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 + +### NewTraceQueryMatchWithDefaults + +`func NewTraceQueryMatchWithDefaults() *TraceQueryMatch` + +NewTraceQueryMatchWithDefaults instantiates a new TraceQueryMatch 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 + +### GetTraceId + +`func (o *TraceQueryMatch) GetTraceId() string` + +GetTraceId returns the TraceId field if non-nil, zero value otherwise. + +### GetTraceIdOk + +`func (o *TraceQueryMatch) GetTraceIdOk() (*string, bool)` + +GetTraceIdOk returns a tuple with the TraceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTraceId + +`func (o *TraceQueryMatch) SetTraceId(v string)` + +SetTraceId sets TraceId field to given value. + + +### GetSpans + +`func (o *TraceQueryMatch) GetSpans() []Span` + +GetSpans returns the Spans field if non-nil, zero value otherwise. + +### GetSpansOk + +`func (o *TraceQueryMatch) GetSpansOk() (*[]Span, bool)` + +GetSpansOk returns a tuple with the Spans field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSpans + +`func (o *TraceQueryMatch) SetSpans(v []Span)` + +SetSpans sets Spans field to given value. + + +### GetResources + +`func (o *TraceQueryMatch) GetResources() map[string]map[string]string` + +GetResources returns the Resources field if non-nil, zero value otherwise. + +### GetResourcesOk + +`func (o *TraceQueryMatch) GetResourcesOk() (*map[string]map[string]string, bool)` + +GetResourcesOk returns a tuple with the Resources field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResources + +`func (o *TraceQueryMatch) SetResources(v map[string]map[string]string)` + +SetResources sets Resources field to given value. + + +### GetPrimaryFilterMatches + +`func (o *TraceQueryMatch) GetPrimaryFilterMatches() []string` + +GetPrimaryFilterMatches returns the PrimaryFilterMatches field if non-nil, zero value otherwise. + +### GetPrimaryFilterMatchesOk + +`func (o *TraceQueryMatch) GetPrimaryFilterMatchesOk() (*[]string, bool)` + +GetPrimaryFilterMatchesOk returns a tuple with the PrimaryFilterMatches field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrimaryFilterMatches + +`func (o *TraceQueryMatch) SetPrimaryFilterMatches(v []string)` + +SetPrimaryFilterMatches sets PrimaryFilterMatches field to given value. + + +### GetSecondaryFilterMatches + +`func (o *TraceQueryMatch) GetSecondaryFilterMatches() []string` + +GetSecondaryFilterMatches returns the SecondaryFilterMatches field if non-nil, zero value otherwise. + +### GetSecondaryFilterMatchesOk + +`func (o *TraceQueryMatch) GetSecondaryFilterMatchesOk() (*[]string, bool)` + +GetSecondaryFilterMatchesOk returns a tuple with the SecondaryFilterMatches field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecondaryFilterMatches + +`func (o *TraceQueryMatch) SetSecondaryFilterMatches(v []string)` + +SetSecondaryFilterMatches sets SecondaryFilterMatches 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/TraceQueryMatchAllOf.md b/generated/stackstate_api/docs/TraceQueryMatchAllOf.md new file mode 100644 index 00000000..6dd794a3 --- /dev/null +++ b/generated/stackstate_api/docs/TraceQueryMatchAllOf.md @@ -0,0 +1,72 @@ +# TraceQueryMatchAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PrimaryFilterMatches** | **[]string** | Spans matching the primary filter | +**SecondaryFilterMatches** | **[]string** | Spans matching the secondary filter | + +## Methods + +### NewTraceQueryMatchAllOf + +`func NewTraceQueryMatchAllOf(primaryFilterMatches []string, secondaryFilterMatches []string, ) *TraceQueryMatchAllOf` + +NewTraceQueryMatchAllOf instantiates a new TraceQueryMatchAllOf 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 + +### NewTraceQueryMatchAllOfWithDefaults + +`func NewTraceQueryMatchAllOfWithDefaults() *TraceQueryMatchAllOf` + +NewTraceQueryMatchAllOfWithDefaults instantiates a new TraceQueryMatchAllOf 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 + +### GetPrimaryFilterMatches + +`func (o *TraceQueryMatchAllOf) GetPrimaryFilterMatches() []string` + +GetPrimaryFilterMatches returns the PrimaryFilterMatches field if non-nil, zero value otherwise. + +### GetPrimaryFilterMatchesOk + +`func (o *TraceQueryMatchAllOf) GetPrimaryFilterMatchesOk() (*[]string, bool)` + +GetPrimaryFilterMatchesOk returns a tuple with the PrimaryFilterMatches field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrimaryFilterMatches + +`func (o *TraceQueryMatchAllOf) SetPrimaryFilterMatches(v []string)` + +SetPrimaryFilterMatches sets PrimaryFilterMatches field to given value. + + +### GetSecondaryFilterMatches + +`func (o *TraceQueryMatchAllOf) GetSecondaryFilterMatches() []string` + +GetSecondaryFilterMatches returns the SecondaryFilterMatches field if non-nil, zero value otherwise. + +### GetSecondaryFilterMatchesOk + +`func (o *TraceQueryMatchAllOf) GetSecondaryFilterMatchesOk() (*[]string, bool)` + +GetSecondaryFilterMatchesOk returns a tuple with the SecondaryFilterMatches field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecondaryFilterMatches + +`func (o *TraceQueryMatchAllOf) SetSecondaryFilterMatches(v []string)` + +SetSecondaryFilterMatches sets SecondaryFilterMatches 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/Traces.md b/generated/stackstate_api/docs/TraceQueryResponse.md similarity index 63% rename from generated/stackstate_api/docs/Traces.md rename to generated/stackstate_api/docs/TraceQueryResponse.md index 26213405..d09dfdb1 100644 --- a/generated/stackstate_api/docs/Traces.md +++ b/generated/stackstate_api/docs/TraceQueryResponse.md @@ -1,109 +1,109 @@ -# Traces +# TraceQueryResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Traces** | [**[]TraceIdentifier**](TraceIdentifier.md) | List of traces | +**Traces** | [**[]TraceQueryMatch**](TraceQueryMatch.md) | List of traces matching the query | **PageSize** | **int32** | Maximum number of the traces in the result. | **Page** | **int32** | The requested page. | **MatchesTotal** | **int64** | The total number of matching traces. | ## Methods -### NewTraces +### NewTraceQueryResponse -`func NewTraces(traces []TraceIdentifier, pageSize int32, page int32, matchesTotal int64, ) *Traces` +`func NewTraceQueryResponse(traces []TraceQueryMatch, pageSize int32, page int32, matchesTotal int64, ) *TraceQueryResponse` -NewTraces instantiates a new Traces object +NewTraceQueryResponse instantiates a new TraceQueryResponse 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 -### NewTracesWithDefaults +### NewTraceQueryResponseWithDefaults -`func NewTracesWithDefaults() *Traces` +`func NewTraceQueryResponseWithDefaults() *TraceQueryResponse` -NewTracesWithDefaults instantiates a new Traces object +NewTraceQueryResponseWithDefaults instantiates a new TraceQueryResponse 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 ### GetTraces -`func (o *Traces) GetTraces() []TraceIdentifier` +`func (o *TraceQueryResponse) GetTraces() []TraceQueryMatch` GetTraces returns the Traces field if non-nil, zero value otherwise. ### GetTracesOk -`func (o *Traces) GetTracesOk() (*[]TraceIdentifier, bool)` +`func (o *TraceQueryResponse) GetTracesOk() (*[]TraceQueryMatch, bool)` GetTracesOk returns a tuple with the Traces field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTraces -`func (o *Traces) SetTraces(v []TraceIdentifier)` +`func (o *TraceQueryResponse) SetTraces(v []TraceQueryMatch)` SetTraces sets Traces field to given value. ### GetPageSize -`func (o *Traces) GetPageSize() int32` +`func (o *TraceQueryResponse) GetPageSize() int32` GetPageSize returns the PageSize field if non-nil, zero value otherwise. ### GetPageSizeOk -`func (o *Traces) GetPageSizeOk() (*int32, bool)` +`func (o *TraceQueryResponse) GetPageSizeOk() (*int32, bool)` GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPageSize -`func (o *Traces) SetPageSize(v int32)` +`func (o *TraceQueryResponse) SetPageSize(v int32)` SetPageSize sets PageSize field to given value. ### GetPage -`func (o *Traces) GetPage() int32` +`func (o *TraceQueryResponse) GetPage() int32` GetPage returns the Page field if non-nil, zero value otherwise. ### GetPageOk -`func (o *Traces) GetPageOk() (*int32, bool)` +`func (o *TraceQueryResponse) GetPageOk() (*int32, bool)` GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPage -`func (o *Traces) SetPage(v int32)` +`func (o *TraceQueryResponse) SetPage(v int32)` SetPage sets Page field to given value. ### GetMatchesTotal -`func (o *Traces) GetMatchesTotal() int64` +`func (o *TraceQueryResponse) GetMatchesTotal() int64` GetMatchesTotal returns the MatchesTotal field if non-nil, zero value otherwise. ### GetMatchesTotalOk -`func (o *Traces) GetMatchesTotalOk() (*int64, bool)` +`func (o *TraceQueryResponse) GetMatchesTotalOk() (*int64, bool)` GetMatchesTotalOk returns a tuple with the MatchesTotal field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMatchesTotal -`func (o *Traces) SetMatchesTotal(v int64)` +`func (o *TraceQueryResponse) SetMatchesTotal(v int64)` SetMatchesTotal sets MatchesTotal field to given value. diff --git a/generated/stackstate_api/docs/TracesApi.md b/generated/stackstate_api/docs/TracesApi.md index 020bfa68..2066ec82 100644 --- a/generated/stackstate_api/docs/TracesApi.md +++ b/generated/stackstate_api/docs/TracesApi.md @@ -17,7 +17,7 @@ Method | HTTP request | Description ## GetSpan -> Span GetSpan(ctx, traceId, spanId).Execute() +> SpanResponse GetSpan(ctx, traceId, spanId).Execute() Get a span @@ -46,7 +46,7 @@ func main() { fmt.Fprintf(os.Stderr, "Error when calling `TracesApi.GetSpan``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `GetSpan`: Span + // response from `GetSpan`: SpanResponse fmt.Fprintf(os.Stdout, "Response from `TracesApi.GetSpan`: %v\n", resp) } ``` @@ -72,7 +72,7 @@ Name | Type | Description | Notes ### Return type -[**Span**](Span.md) +[**SpanResponse**](SpanResponse.md) ### Authorization @@ -182,7 +182,7 @@ func main() { start := int32(1707117737) // int32 | Filter spans by start time >= value end := int32(1707121359) // int32 | Filter spans by start time < value bucketsCount := int32(56) // int32 | The number of histogram buckets. - traceFilter := *openapiclient.NewTraceFilter(*openapiclient.NewSpanFilter(), map[string][]string{"key": []string{"Inner_example"}}) // TraceFilter | Filter for traces + traceFilter := *openapiclient.NewTraceFilter(*openapiclient.NewSpanFilter()) // TraceFilter | Filter for traces configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -232,7 +232,7 @@ Name | Type | Description | Notes ## QueryTraces -> Traces QueryTraces(ctx).Start(start).End(end).TraceQuery(traceQuery).PageSize(pageSize).Page(page).Execute() +> TraceQueryResponse QueryTraces(ctx).Start(start).End(end).TraceQuery(traceQuery).PageSize(pageSize).Page(page).Execute() Query for traces @@ -253,7 +253,7 @@ import ( func main() { start := int32(1707117737) // int32 | Filter spans by start time >= value end := int32(1707121359) // int32 | Filter spans by start time < value - traceQuery := *openapiclient.NewTraceQuery(*openapiclient.NewSpanFilter(), map[string][]string{"key": []string{"Inner_example"}}) // TraceQuery | Query for traces + traceQuery := *openapiclient.NewTraceQuery(*openapiclient.NewSpanFilter()) // TraceQuery | Query for traces pageSize := int32(30) // int32 | Number of spans in 1 page (optional) (default to 20) page := int32(4) // int32 | Get the specified page (with pageSize # of spans), defaults to page 0 (optional) (default to 0) @@ -264,7 +264,7 @@ func main() { fmt.Fprintf(os.Stderr, "Error when calling `TracesApi.QueryTraces``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `QueryTraces`: Traces + // response from `QueryTraces`: TraceQueryResponse fmt.Fprintf(os.Stdout, "Response from `TracesApi.QueryTraces`: %v\n", resp) } ``` @@ -288,7 +288,7 @@ Name | Type | Description | Notes ### Return type -[**Traces**](Traces.md) +[**TraceQueryResponse**](TraceQueryResponse.md) ### Authorization diff --git a/generated/stackstate_api/docs/UserProfile.md b/generated/stackstate_api/docs/UserProfile.md index 028b19f5..a80ab279 100644 --- a/generated/stackstate_api/docs/UserProfile.md +++ b/generated/stackstate_api/docs/UserProfile.md @@ -7,9 +7,11 @@ Name | Type | Description | Notes **Id** | Pointer to **int64** | | [optional] [readonly] **LastUpdateTimestamp** | Pointer to **int64** | | [optional] [readonly] **Name** | **string** | | +**DisplayName** | Pointer to **string** | | [optional] **Description** | Pointer to **string** | | [optional] **Identifier** | Pointer to **string** | | [optional] **StarredViews** | Pointer to **[]int64** | | [optional] +**StarredDashboards** | Pointer to **[]int64** | | [optional] **SystemNotificationsRead** | **[]string** | | **HideUnavailableMonitors** | **bool** | | **HideUnavailableMetrics** | **bool** | | @@ -105,6 +107,31 @@ and a boolean to check if the value has been set. SetName sets Name field to given value. +### GetDisplayName + +`func (o *UserProfile) GetDisplayName() string` + +GetDisplayName returns the DisplayName field if non-nil, zero value otherwise. + +### GetDisplayNameOk + +`func (o *UserProfile) GetDisplayNameOk() (*string, bool)` + +GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisplayName + +`func (o *UserProfile) SetDisplayName(v string)` + +SetDisplayName sets DisplayName field to given value. + +### HasDisplayName + +`func (o *UserProfile) HasDisplayName() bool` + +HasDisplayName returns a boolean if a field has been set. + ### GetDescription `func (o *UserProfile) GetDescription() string` @@ -180,6 +207,31 @@ SetStarredViews sets StarredViews field to given value. HasStarredViews returns a boolean if a field has been set. +### GetStarredDashboards + +`func (o *UserProfile) GetStarredDashboards() []int64` + +GetStarredDashboards returns the StarredDashboards field if non-nil, zero value otherwise. + +### GetStarredDashboardsOk + +`func (o *UserProfile) GetStarredDashboardsOk() (*[]int64, bool)` + +GetStarredDashboardsOk returns a tuple with the StarredDashboards field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStarredDashboards + +`func (o *UserProfile) SetStarredDashboards(v []int64)` + +SetStarredDashboards sets StarredDashboards field to given value. + +### HasStarredDashboards + +`func (o *UserProfile) HasStarredDashboards() bool` + +HasStarredDashboards returns a boolean if a field has been set. + ### GetSystemNotificationsRead `func (o *UserProfile) GetSystemNotificationsRead() []string` diff --git a/generated/stackstate_api/model_create_subject.go b/generated/stackstate_api/model_create_subject.go deleted file mode 100644 index 0c5a580c..00000000 --- a/generated/stackstate_api/model_create_subject.go +++ /dev/null @@ -1,136 +0,0 @@ -/* -StackState API - -This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). - -API version: 5.2.0 -Contact: info@stackstate.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackstate_api - -import ( - "encoding/json" -) - -// CreateSubject struct for CreateSubject -type CreateSubject struct { - Query string `json:"query"` - Version string `json:"version"` -} - -// NewCreateSubject instantiates a new CreateSubject 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 NewCreateSubject(query string, version string) *CreateSubject { - this := CreateSubject{} - this.Query = query - this.Version = version - return &this -} - -// NewCreateSubjectWithDefaults instantiates a new CreateSubject 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 NewCreateSubjectWithDefaults() *CreateSubject { - this := CreateSubject{} - return &this -} - -// GetQuery returns the Query field value -func (o *CreateSubject) GetQuery() string { - if o == nil { - var ret string - return ret - } - - return o.Query -} - -// GetQueryOk returns a tuple with the Query field value -// and a boolean to check if the value has been set. -func (o *CreateSubject) GetQueryOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Query, true -} - -// SetQuery sets field value -func (o *CreateSubject) SetQuery(v string) { - o.Query = v -} - -// GetVersion returns the Version field value -func (o *CreateSubject) 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 *CreateSubject) GetVersionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Version, true -} - -// SetVersion sets field value -func (o *CreateSubject) SetVersion(v string) { - o.Version = v -} - -func (o CreateSubject) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["query"] = o.Query - } - if true { - toSerialize["version"] = o.Version - } - return json.Marshal(toSerialize) -} - -type NullableCreateSubject struct { - value *CreateSubject - isSet bool -} - -func (v NullableCreateSubject) Get() *CreateSubject { - return v.value -} - -func (v *NullableCreateSubject) Set(val *CreateSubject) { - v.value = val - v.isSet = true -} - -func (v NullableCreateSubject) IsSet() bool { - return v.isSet -} - -func (v *NullableCreateSubject) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCreateSubject(val *CreateSubject) *NullableCreateSubject { - return &NullableCreateSubject{value: val, isSet: true} -} - -func (v NullableCreateSubject) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCreateSubject) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/stackstate_api/model_dashboard_authorization_error.go b/generated/stackstate_api/model_dashboard_authorization_error.go new file mode 100644 index 00000000..352ece12 --- /dev/null +++ b/generated/stackstate_api/model_dashboard_authorization_error.go @@ -0,0 +1,166 @@ +/* +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" +) + +// DashboardAuthorizationError struct for DashboardAuthorizationError +type DashboardAuthorizationError struct { + // A detailed error message describing why the operation failed. + Message string `json:"message"` + DashboardIdOrUrn string `json:"dashboardIdOrUrn"` + UserName string `json:"userName"` +} + +// NewDashboardAuthorizationError instantiates a new DashboardAuthorizationError 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 NewDashboardAuthorizationError(message string, dashboardIdOrUrn string, userName string) *DashboardAuthorizationError { + this := DashboardAuthorizationError{} + this.Message = message + this.DashboardIdOrUrn = dashboardIdOrUrn + this.UserName = userName + return &this +} + +// NewDashboardAuthorizationErrorWithDefaults instantiates a new DashboardAuthorizationError 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 NewDashboardAuthorizationErrorWithDefaults() *DashboardAuthorizationError { + this := DashboardAuthorizationError{} + return &this +} + +// GetMessage returns the Message field value +func (o *DashboardAuthorizationError) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *DashboardAuthorizationError) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *DashboardAuthorizationError) SetMessage(v string) { + o.Message = v +} + +// GetDashboardIdOrUrn returns the DashboardIdOrUrn field value +func (o *DashboardAuthorizationError) GetDashboardIdOrUrn() string { + if o == nil { + var ret string + return ret + } + + return o.DashboardIdOrUrn +} + +// GetDashboardIdOrUrnOk returns a tuple with the DashboardIdOrUrn field value +// and a boolean to check if the value has been set. +func (o *DashboardAuthorizationError) GetDashboardIdOrUrnOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DashboardIdOrUrn, true +} + +// SetDashboardIdOrUrn sets field value +func (o *DashboardAuthorizationError) SetDashboardIdOrUrn(v string) { + o.DashboardIdOrUrn = v +} + +// GetUserName returns the UserName field value +func (o *DashboardAuthorizationError) GetUserName() string { + if o == nil { + var ret string + return ret + } + + return o.UserName +} + +// GetUserNameOk returns a tuple with the UserName field value +// and a boolean to check if the value has been set. +func (o *DashboardAuthorizationError) GetUserNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserName, true +} + +// SetUserName sets field value +func (o *DashboardAuthorizationError) SetUserName(v string) { + o.UserName = v +} + +func (o DashboardAuthorizationError) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["message"] = o.Message + } + if true { + toSerialize["dashboardIdOrUrn"] = o.DashboardIdOrUrn + } + if true { + toSerialize["userName"] = o.UserName + } + return json.Marshal(toSerialize) +} + +type NullableDashboardAuthorizationError struct { + value *DashboardAuthorizationError + isSet bool +} + +func (v NullableDashboardAuthorizationError) Get() *DashboardAuthorizationError { + return v.value +} + +func (v *NullableDashboardAuthorizationError) Set(val *DashboardAuthorizationError) { + v.value = val + v.isSet = true +} + +func (v NullableDashboardAuthorizationError) IsSet() bool { + return v.isSet +} + +func (v *NullableDashboardAuthorizationError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDashboardAuthorizationError(val *DashboardAuthorizationError) *NullableDashboardAuthorizationError { + return &NullableDashboardAuthorizationError{value: val, isSet: true} +} + +func (v NullableDashboardAuthorizationError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDashboardAuthorizationError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_dashboard_client_errors.go b/generated/stackstate_api/model_dashboard_client_errors.go new file mode 100644 index 00000000..5719c180 --- /dev/null +++ b/generated/stackstate_api/model_dashboard_client_errors.go @@ -0,0 +1,140 @@ +/* +StackState API + +This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). + +API version: 5.2.0 +Contact: info@stackstate.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackstate_api + +import ( + "encoding/json" + "fmt" +) + +// DashboardClientErrors - struct for DashboardClientErrors +type DashboardClientErrors struct { + DashboardInvalidIdentifierError *DashboardInvalidIdentifierError + DashboardValidationError *DashboardValidationError +} + +// DashboardInvalidIdentifierErrorAsDashboardClientErrors is a convenience function that returns DashboardInvalidIdentifierError wrapped in DashboardClientErrors +func DashboardInvalidIdentifierErrorAsDashboardClientErrors(v *DashboardInvalidIdentifierError) DashboardClientErrors { + return DashboardClientErrors{ + DashboardInvalidIdentifierError: v, + } +} + +// DashboardValidationErrorAsDashboardClientErrors is a convenience function that returns DashboardValidationError wrapped in DashboardClientErrors +func DashboardValidationErrorAsDashboardClientErrors(v *DashboardValidationError) DashboardClientErrors { + return DashboardClientErrors{ + DashboardValidationError: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *DashboardClientErrors) UnmarshalJSON(data []byte) error { + var err error + // use discriminator value to speed up the lookup + var jsonDict map[string]interface{} + err = newStrictDecoder(data).Decode(&jsonDict) + if err != nil { + return fmt.Errorf("Failed to unmarshal JSON into map for the discriminator lookup.") + } + + // check if the discriminator value is 'DashboardInvalidIdentifierError' + if jsonDict["_type"] == "DashboardInvalidIdentifierError" { + // try to unmarshal JSON data into DashboardInvalidIdentifierError + err = json.Unmarshal(data, &dst.DashboardInvalidIdentifierError) + if err == nil { + return nil // data stored in dst.DashboardInvalidIdentifierError, return on the first match + } else { + dst.DashboardInvalidIdentifierError = nil + return fmt.Errorf("Failed to unmarshal DashboardClientErrors as DashboardInvalidIdentifierError: %s", err.Error()) + } + } + + // check if the discriminator value is 'DashboardValidationError' + if jsonDict["_type"] == "DashboardValidationError" { + // try to unmarshal JSON data into DashboardValidationError + err = json.Unmarshal(data, &dst.DashboardValidationError) + if err == nil { + return nil // data stored in dst.DashboardValidationError, return on the first match + } else { + dst.DashboardValidationError = nil + return fmt.Errorf("Failed to unmarshal DashboardClientErrors as DashboardValidationError: %s", err.Error()) + } + } + + return nil +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src DashboardClientErrors) MarshalJSON() ([]byte, error) { + if src.DashboardInvalidIdentifierError != nil { + return json.Marshal(&src.DashboardInvalidIdentifierError) + } + + if src.DashboardValidationError != nil { + return json.Marshal(&src.DashboardValidationError) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *DashboardClientErrors) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.DashboardInvalidIdentifierError != nil { + return obj.DashboardInvalidIdentifierError + } + + if obj.DashboardValidationError != nil { + return obj.DashboardValidationError + } + + // all schemas are nil + return nil +} + +type NullableDashboardClientErrors struct { + value *DashboardClientErrors + isSet bool +} + +func (v NullableDashboardClientErrors) Get() *DashboardClientErrors { + return v.value +} + +func (v *NullableDashboardClientErrors) Set(val *DashboardClientErrors) { + v.value = val + v.isSet = true +} + +func (v NullableDashboardClientErrors) IsSet() bool { + return v.isSet +} + +func (v *NullableDashboardClientErrors) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDashboardClientErrors(val *DashboardClientErrors) *NullableDashboardClientErrors { + return &NullableDashboardClientErrors{value: val, isSet: true} +} + +func (v NullableDashboardClientErrors) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDashboardClientErrors) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_dashboard_clone_schema.go b/generated/stackstate_api/model_dashboard_clone_schema.go new file mode 100644 index 00000000..e7761363 --- /dev/null +++ b/generated/stackstate_api/model_dashboard_clone_schema.go @@ -0,0 +1,217 @@ +/* +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" +) + +// DashboardCloneSchema The provided fields are used to override the corresponding fields of the new (cloned) dashboard. +type DashboardCloneSchema struct { + // Name of the dashboard. Required to make it easier so see which dashboard is the new (cloned) dashboard. + Name string `json:"name"` + // Description of the dashboard + Description *string `json:"description,omitempty"` + Scope *DashboardScope `json:"scope,omitempty"` + Dashboard *PersesDashboard `json:"dashboard,omitempty"` +} + +// NewDashboardCloneSchema instantiates a new DashboardCloneSchema 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 NewDashboardCloneSchema(name string) *DashboardCloneSchema { + this := DashboardCloneSchema{} + this.Name = name + return &this +} + +// NewDashboardCloneSchemaWithDefaults instantiates a new DashboardCloneSchema 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 NewDashboardCloneSchemaWithDefaults() *DashboardCloneSchema { + this := DashboardCloneSchema{} + return &this +} + +// GetName returns the Name field value +func (o *DashboardCloneSchema) 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 *DashboardCloneSchema) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DashboardCloneSchema) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *DashboardCloneSchema) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DashboardCloneSchema) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *DashboardCloneSchema) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *DashboardCloneSchema) SetDescription(v string) { + o.Description = &v +} + +// GetScope returns the Scope field value if set, zero value otherwise. +func (o *DashboardCloneSchema) GetScope() DashboardScope { + if o == nil || o.Scope == nil { + var ret DashboardScope + return ret + } + return *o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DashboardCloneSchema) GetScopeOk() (*DashboardScope, bool) { + if o == nil || o.Scope == nil { + return nil, false + } + return o.Scope, true +} + +// HasScope returns a boolean if a field has been set. +func (o *DashboardCloneSchema) HasScope() bool { + if o != nil && o.Scope != nil { + return true + } + + return false +} + +// SetScope gets a reference to the given DashboardScope and assigns it to the Scope field. +func (o *DashboardCloneSchema) SetScope(v DashboardScope) { + o.Scope = &v +} + +// GetDashboard returns the Dashboard field value if set, zero value otherwise. +func (o *DashboardCloneSchema) GetDashboard() PersesDashboard { + if o == nil || o.Dashboard == nil { + var ret PersesDashboard + return ret + } + return *o.Dashboard +} + +// GetDashboardOk returns a tuple with the Dashboard field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DashboardCloneSchema) GetDashboardOk() (*PersesDashboard, bool) { + if o == nil || o.Dashboard == nil { + return nil, false + } + return o.Dashboard, true +} + +// HasDashboard returns a boolean if a field has been set. +func (o *DashboardCloneSchema) HasDashboard() bool { + if o != nil && o.Dashboard != nil { + return true + } + + return false +} + +// SetDashboard gets a reference to the given PersesDashboard and assigns it to the Dashboard field. +func (o *DashboardCloneSchema) SetDashboard(v PersesDashboard) { + o.Dashboard = &v +} + +func (o DashboardCloneSchema) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if o.Scope != nil { + toSerialize["scope"] = o.Scope + } + if o.Dashboard != nil { + toSerialize["dashboard"] = o.Dashboard + } + return json.Marshal(toSerialize) +} + +type NullableDashboardCloneSchema struct { + value *DashboardCloneSchema + isSet bool +} + +func (v NullableDashboardCloneSchema) Get() *DashboardCloneSchema { + return v.value +} + +func (v *NullableDashboardCloneSchema) Set(val *DashboardCloneSchema) { + v.value = val + v.isSet = true +} + +func (v NullableDashboardCloneSchema) IsSet() bool { + return v.isSet +} + +func (v *NullableDashboardCloneSchema) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDashboardCloneSchema(val *DashboardCloneSchema) *NullableDashboardCloneSchema { + return &NullableDashboardCloneSchema{value: val, isSet: true} +} + +func (v NullableDashboardCloneSchema) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDashboardCloneSchema) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_dashboard_invalid_identifier_error.go b/generated/stackstate_api/model_dashboard_invalid_identifier_error.go new file mode 100644 index 00000000..584aba51 --- /dev/null +++ b/generated/stackstate_api/model_dashboard_invalid_identifier_error.go @@ -0,0 +1,166 @@ +/* +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" +) + +// DashboardInvalidIdentifierError struct for DashboardInvalidIdentifierError +type DashboardInvalidIdentifierError struct { + Type string `json:"_type"` + // A detailed error message describing why the operation failed. + Message string `json:"message"` + DashboardIdOrUrn string `json:"dashboardIdOrUrn"` +} + +// NewDashboardInvalidIdentifierError instantiates a new DashboardInvalidIdentifierError 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 NewDashboardInvalidIdentifierError(type_ string, message string, dashboardIdOrUrn string) *DashboardInvalidIdentifierError { + this := DashboardInvalidIdentifierError{} + this.Type = type_ + this.Message = message + this.DashboardIdOrUrn = dashboardIdOrUrn + return &this +} + +// NewDashboardInvalidIdentifierErrorWithDefaults instantiates a new DashboardInvalidIdentifierError 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 NewDashboardInvalidIdentifierErrorWithDefaults() *DashboardInvalidIdentifierError { + this := DashboardInvalidIdentifierError{} + return &this +} + +// GetType returns the Type field value +func (o *DashboardInvalidIdentifierError) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *DashboardInvalidIdentifierError) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *DashboardInvalidIdentifierError) SetType(v string) { + o.Type = v +} + +// GetMessage returns the Message field value +func (o *DashboardInvalidIdentifierError) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *DashboardInvalidIdentifierError) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *DashboardInvalidIdentifierError) SetMessage(v string) { + o.Message = v +} + +// GetDashboardIdOrUrn returns the DashboardIdOrUrn field value +func (o *DashboardInvalidIdentifierError) GetDashboardIdOrUrn() string { + if o == nil { + var ret string + return ret + } + + return o.DashboardIdOrUrn +} + +// GetDashboardIdOrUrnOk returns a tuple with the DashboardIdOrUrn field value +// and a boolean to check if the value has been set. +func (o *DashboardInvalidIdentifierError) GetDashboardIdOrUrnOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DashboardIdOrUrn, true +} + +// SetDashboardIdOrUrn sets field value +func (o *DashboardInvalidIdentifierError) SetDashboardIdOrUrn(v string) { + o.DashboardIdOrUrn = v +} + +func (o DashboardInvalidIdentifierError) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["_type"] = o.Type + } + if true { + toSerialize["message"] = o.Message + } + if true { + toSerialize["dashboardIdOrUrn"] = o.DashboardIdOrUrn + } + return json.Marshal(toSerialize) +} + +type NullableDashboardInvalidIdentifierError struct { + value *DashboardInvalidIdentifierError + isSet bool +} + +func (v NullableDashboardInvalidIdentifierError) Get() *DashboardInvalidIdentifierError { + return v.value +} + +func (v *NullableDashboardInvalidIdentifierError) Set(val *DashboardInvalidIdentifierError) { + v.value = val + v.isSet = true +} + +func (v NullableDashboardInvalidIdentifierError) IsSet() bool { + return v.isSet +} + +func (v *NullableDashboardInvalidIdentifierError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDashboardInvalidIdentifierError(val *DashboardInvalidIdentifierError) *NullableDashboardInvalidIdentifierError { + return &NullableDashboardInvalidIdentifierError{value: val, isSet: true} +} + +func (v NullableDashboardInvalidIdentifierError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDashboardInvalidIdentifierError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_dashboard_list.go b/generated/stackstate_api/model_dashboard_list.go new file mode 100644 index 00000000..61847c93 --- /dev/null +++ b/generated/stackstate_api/model_dashboard_list.go @@ -0,0 +1,108 @@ +/* +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" +) + +// DashboardList struct for DashboardList +type DashboardList struct { + // List of dashboards, which can be either metadata or full representations. + Dashboards []DashboardReadSchema `json:"dashboards"` +} + +// NewDashboardList instantiates a new DashboardList 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 NewDashboardList(dashboards []DashboardReadSchema) *DashboardList { + this := DashboardList{} + this.Dashboards = dashboards + return &this +} + +// NewDashboardListWithDefaults instantiates a new DashboardList 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 NewDashboardListWithDefaults() *DashboardList { + this := DashboardList{} + return &this +} + +// GetDashboards returns the Dashboards field value +func (o *DashboardList) GetDashboards() []DashboardReadSchema { + if o == nil { + var ret []DashboardReadSchema + return ret + } + + return o.Dashboards +} + +// GetDashboardsOk returns a tuple with the Dashboards field value +// and a boolean to check if the value has been set. +func (o *DashboardList) GetDashboardsOk() ([]DashboardReadSchema, bool) { + if o == nil { + return nil, false + } + return o.Dashboards, true +} + +// SetDashboards sets field value +func (o *DashboardList) SetDashboards(v []DashboardReadSchema) { + o.Dashboards = v +} + +func (o DashboardList) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["dashboards"] = o.Dashboards + } + return json.Marshal(toSerialize) +} + +type NullableDashboardList struct { + value *DashboardList + isSet bool +} + +func (v NullableDashboardList) Get() *DashboardList { + return v.value +} + +func (v *NullableDashboardList) Set(val *DashboardList) { + v.value = val + v.isSet = true +} + +func (v NullableDashboardList) IsSet() bool { + return v.isSet +} + +func (v *NullableDashboardList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDashboardList(val *DashboardList) *NullableDashboardList { + return &NullableDashboardList{value: val, isSet: true} +} + +func (v NullableDashboardList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDashboardList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_dashboard_not_found_error.go b/generated/stackstate_api/model_dashboard_not_found_error.go new file mode 100644 index 00000000..59020bcc --- /dev/null +++ b/generated/stackstate_api/model_dashboard_not_found_error.go @@ -0,0 +1,137 @@ +/* +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" +) + +// DashboardNotFoundError struct for DashboardNotFoundError +type DashboardNotFoundError struct { + // A detailed error message describing why the operation failed. + Message string `json:"message"` + DashboardIdOrUrn string `json:"dashboardIdOrUrn"` +} + +// NewDashboardNotFoundError instantiates a new DashboardNotFoundError 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 NewDashboardNotFoundError(message string, dashboardIdOrUrn string) *DashboardNotFoundError { + this := DashboardNotFoundError{} + this.Message = message + this.DashboardIdOrUrn = dashboardIdOrUrn + return &this +} + +// NewDashboardNotFoundErrorWithDefaults instantiates a new DashboardNotFoundError 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 NewDashboardNotFoundErrorWithDefaults() *DashboardNotFoundError { + this := DashboardNotFoundError{} + return &this +} + +// GetMessage returns the Message field value +func (o *DashboardNotFoundError) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *DashboardNotFoundError) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *DashboardNotFoundError) SetMessage(v string) { + o.Message = v +} + +// GetDashboardIdOrUrn returns the DashboardIdOrUrn field value +func (o *DashboardNotFoundError) GetDashboardIdOrUrn() string { + if o == nil { + var ret string + return ret + } + + return o.DashboardIdOrUrn +} + +// GetDashboardIdOrUrnOk returns a tuple with the DashboardIdOrUrn field value +// and a boolean to check if the value has been set. +func (o *DashboardNotFoundError) GetDashboardIdOrUrnOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DashboardIdOrUrn, true +} + +// SetDashboardIdOrUrn sets field value +func (o *DashboardNotFoundError) SetDashboardIdOrUrn(v string) { + o.DashboardIdOrUrn = v +} + +func (o DashboardNotFoundError) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["message"] = o.Message + } + if true { + toSerialize["dashboardIdOrUrn"] = o.DashboardIdOrUrn + } + return json.Marshal(toSerialize) +} + +type NullableDashboardNotFoundError struct { + value *DashboardNotFoundError + isSet bool +} + +func (v NullableDashboardNotFoundError) Get() *DashboardNotFoundError { + return v.value +} + +func (v *NullableDashboardNotFoundError) Set(val *DashboardNotFoundError) { + v.value = val + v.isSet = true +} + +func (v NullableDashboardNotFoundError) IsSet() bool { + return v.isSet +} + +func (v *NullableDashboardNotFoundError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDashboardNotFoundError(val *DashboardNotFoundError) *NullableDashboardNotFoundError { + return &NullableDashboardNotFoundError{value: val, isSet: true} +} + +func (v NullableDashboardNotFoundError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDashboardNotFoundError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_dashboard_patch_schema.go b/generated/stackstate_api/model_dashboard_patch_schema.go new file mode 100644 index 00000000..7117df05 --- /dev/null +++ b/generated/stackstate_api/model_dashboard_patch_schema.go @@ -0,0 +1,224 @@ +/* +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" +) + +// DashboardPatchSchema The provided fields are used to patch the corresponding fields of a dashboard. +type DashboardPatchSchema struct { + // Name of the dashboard + Name *string `json:"name,omitempty"` + // Description of the dashboard + Description *string `json:"description,omitempty"` + Scope *DashboardScope `json:"scope,omitempty"` + Dashboard *PersesDashboard `json:"dashboard,omitempty"` +} + +// NewDashboardPatchSchema instantiates a new DashboardPatchSchema 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 NewDashboardPatchSchema() *DashboardPatchSchema { + this := DashboardPatchSchema{} + return &this +} + +// NewDashboardPatchSchemaWithDefaults instantiates a new DashboardPatchSchema 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 NewDashboardPatchSchemaWithDefaults() *DashboardPatchSchema { + this := DashboardPatchSchema{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *DashboardPatchSchema) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DashboardPatchSchema) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *DashboardPatchSchema) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *DashboardPatchSchema) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *DashboardPatchSchema) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DashboardPatchSchema) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *DashboardPatchSchema) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *DashboardPatchSchema) SetDescription(v string) { + o.Description = &v +} + +// GetScope returns the Scope field value if set, zero value otherwise. +func (o *DashboardPatchSchema) GetScope() DashboardScope { + if o == nil || o.Scope == nil { + var ret DashboardScope + return ret + } + return *o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DashboardPatchSchema) GetScopeOk() (*DashboardScope, bool) { + if o == nil || o.Scope == nil { + return nil, false + } + return o.Scope, true +} + +// HasScope returns a boolean if a field has been set. +func (o *DashboardPatchSchema) HasScope() bool { + if o != nil && o.Scope != nil { + return true + } + + return false +} + +// SetScope gets a reference to the given DashboardScope and assigns it to the Scope field. +func (o *DashboardPatchSchema) SetScope(v DashboardScope) { + o.Scope = &v +} + +// GetDashboard returns the Dashboard field value if set, zero value otherwise. +func (o *DashboardPatchSchema) GetDashboard() PersesDashboard { + if o == nil || o.Dashboard == nil { + var ret PersesDashboard + return ret + } + return *o.Dashboard +} + +// GetDashboardOk returns a tuple with the Dashboard field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DashboardPatchSchema) GetDashboardOk() (*PersesDashboard, bool) { + if o == nil || o.Dashboard == nil { + return nil, false + } + return o.Dashboard, true +} + +// HasDashboard returns a boolean if a field has been set. +func (o *DashboardPatchSchema) HasDashboard() bool { + if o != nil && o.Dashboard != nil { + return true + } + + return false +} + +// SetDashboard gets a reference to the given PersesDashboard and assigns it to the Dashboard field. +func (o *DashboardPatchSchema) SetDashboard(v PersesDashboard) { + o.Dashboard = &v +} + +func (o DashboardPatchSchema) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if o.Scope != nil { + toSerialize["scope"] = o.Scope + } + if o.Dashboard != nil { + toSerialize["dashboard"] = o.Dashboard + } + return json.Marshal(toSerialize) +} + +type NullableDashboardPatchSchema struct { + value *DashboardPatchSchema + isSet bool +} + +func (v NullableDashboardPatchSchema) Get() *DashboardPatchSchema { + return v.value +} + +func (v *NullableDashboardPatchSchema) Set(val *DashboardPatchSchema) { + v.value = val + v.isSet = true +} + +func (v NullableDashboardPatchSchema) IsSet() bool { + return v.isSet +} + +func (v *NullableDashboardPatchSchema) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDashboardPatchSchema(val *DashboardPatchSchema) *NullableDashboardPatchSchema { + return &NullableDashboardPatchSchema{value: val, isSet: true} +} + +func (v NullableDashboardPatchSchema) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDashboardPatchSchema) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_dashboard_read_base_schema.go b/generated/stackstate_api/model_dashboard_read_base_schema.go new file mode 100644 index 00000000..f781b2c9 --- /dev/null +++ b/generated/stackstate_api/model_dashboard_read_base_schema.go @@ -0,0 +1,321 @@ +/* +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" +) + +// DashboardReadBaseSchema struct for DashboardReadBaseSchema +type DashboardReadBaseSchema struct { + Type string `json:"_type"` + // The identifier of a dashboard. Either the system/graph ID or URN of the resource. + Identifier string `json:"identifier"` + Id int64 `json:"id"` + // Name of the dashboard + Name string `json:"name"` + // Description of the dashboard + Description string `json:"description"` + Scope DashboardScope `json:"scope"` + // The user id of the dashboard owner. A dashboard was either created by a user or from a StackPack. For a user, the identifier will be the system/graph ID, and for a StackPack, the field will be empty/omitted. + OwnerId *int64 `json:"ownerId,omitempty"` + LastUpdateTimestamp int64 `json:"lastUpdateTimestamp"` +} + +// NewDashboardReadBaseSchema instantiates a new DashboardReadBaseSchema 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 NewDashboardReadBaseSchema(type_ string, identifier string, id int64, name string, description string, scope DashboardScope, lastUpdateTimestamp int64) *DashboardReadBaseSchema { + this := DashboardReadBaseSchema{} + this.Type = type_ + this.Identifier = identifier + this.Id = id + this.Name = name + this.Description = description + this.Scope = scope + this.LastUpdateTimestamp = lastUpdateTimestamp + return &this +} + +// NewDashboardReadBaseSchemaWithDefaults instantiates a new DashboardReadBaseSchema 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 NewDashboardReadBaseSchemaWithDefaults() *DashboardReadBaseSchema { + this := DashboardReadBaseSchema{} + return &this +} + +// GetType returns the Type field value +func (o *DashboardReadBaseSchema) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *DashboardReadBaseSchema) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *DashboardReadBaseSchema) SetType(v string) { + o.Type = v +} + +// GetIdentifier returns the Identifier field value +func (o *DashboardReadBaseSchema) GetIdentifier() string { + if o == nil { + var ret string + return ret + } + + return o.Identifier +} + +// GetIdentifierOk returns a tuple with the Identifier field value +// and a boolean to check if the value has been set. +func (o *DashboardReadBaseSchema) GetIdentifierOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Identifier, true +} + +// SetIdentifier sets field value +func (o *DashboardReadBaseSchema) SetIdentifier(v string) { + o.Identifier = v +} + +// GetId returns the Id field value +func (o *DashboardReadBaseSchema) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *DashboardReadBaseSchema) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *DashboardReadBaseSchema) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *DashboardReadBaseSchema) 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 *DashboardReadBaseSchema) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DashboardReadBaseSchema) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value +func (o *DashboardReadBaseSchema) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *DashboardReadBaseSchema) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *DashboardReadBaseSchema) SetDescription(v string) { + o.Description = v +} + +// GetScope returns the Scope field value +func (o *DashboardReadBaseSchema) GetScope() DashboardScope { + if o == nil { + var ret DashboardScope + return ret + } + + return o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value +// and a boolean to check if the value has been set. +func (o *DashboardReadBaseSchema) GetScopeOk() (*DashboardScope, bool) { + if o == nil { + return nil, false + } + return &o.Scope, true +} + +// SetScope sets field value +func (o *DashboardReadBaseSchema) SetScope(v DashboardScope) { + o.Scope = v +} + +// GetOwnerId returns the OwnerId field value if set, zero value otherwise. +func (o *DashboardReadBaseSchema) GetOwnerId() int64 { + if o == nil || o.OwnerId == nil { + var ret int64 + return ret + } + return *o.OwnerId +} + +// GetOwnerIdOk returns a tuple with the OwnerId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DashboardReadBaseSchema) GetOwnerIdOk() (*int64, bool) { + if o == nil || o.OwnerId == nil { + return nil, false + } + return o.OwnerId, true +} + +// HasOwnerId returns a boolean if a field has been set. +func (o *DashboardReadBaseSchema) HasOwnerId() bool { + if o != nil && o.OwnerId != nil { + return true + } + + return false +} + +// SetOwnerId gets a reference to the given int64 and assigns it to the OwnerId field. +func (o *DashboardReadBaseSchema) SetOwnerId(v int64) { + o.OwnerId = &v +} + +// GetLastUpdateTimestamp returns the LastUpdateTimestamp field value +func (o *DashboardReadBaseSchema) GetLastUpdateTimestamp() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.LastUpdateTimestamp +} + +// GetLastUpdateTimestampOk returns a tuple with the LastUpdateTimestamp field value +// and a boolean to check if the value has been set. +func (o *DashboardReadBaseSchema) GetLastUpdateTimestampOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.LastUpdateTimestamp, true +} + +// SetLastUpdateTimestamp sets field value +func (o *DashboardReadBaseSchema) SetLastUpdateTimestamp(v int64) { + o.LastUpdateTimestamp = v +} + +func (o DashboardReadBaseSchema) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["_type"] = o.Type + } + if true { + toSerialize["identifier"] = o.Identifier + } + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["name"] = o.Name + } + if true { + toSerialize["description"] = o.Description + } + if true { + toSerialize["scope"] = o.Scope + } + if o.OwnerId != nil { + toSerialize["ownerId"] = o.OwnerId + } + if true { + toSerialize["lastUpdateTimestamp"] = o.LastUpdateTimestamp + } + return json.Marshal(toSerialize) +} + +type NullableDashboardReadBaseSchema struct { + value *DashboardReadBaseSchema + isSet bool +} + +func (v NullableDashboardReadBaseSchema) Get() *DashboardReadBaseSchema { + return v.value +} + +func (v *NullableDashboardReadBaseSchema) Set(val *DashboardReadBaseSchema) { + v.value = val + v.isSet = true +} + +func (v NullableDashboardReadBaseSchema) IsSet() bool { + return v.isSet +} + +func (v *NullableDashboardReadBaseSchema) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDashboardReadBaseSchema(val *DashboardReadBaseSchema) *NullableDashboardReadBaseSchema { + return &NullableDashboardReadBaseSchema{value: val, isSet: true} +} + +func (v NullableDashboardReadBaseSchema) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDashboardReadBaseSchema) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_dashboard_read_full_schema.go b/generated/stackstate_api/model_dashboard_read_full_schema.go new file mode 100644 index 00000000..7362448b --- /dev/null +++ b/generated/stackstate_api/model_dashboard_read_full_schema.go @@ -0,0 +1,350 @@ +/* +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" +) + +// DashboardReadFullSchema struct for DashboardReadFullSchema +type DashboardReadFullSchema struct { + Type string `json:"_type"` + // The identifier of a dashboard. Either the system/graph ID or URN of the resource. + Identifier string `json:"identifier"` + Id int64 `json:"id"` + // Name of the dashboard + Name string `json:"name"` + // Description of the dashboard + Description string `json:"description"` + Scope DashboardScope `json:"scope"` + // The user id of the dashboard owner. A dashboard was either created by a user or from a StackPack. For a user, the identifier will be the system/graph ID, and for a StackPack, the field will be empty/omitted. + OwnerId *int64 `json:"ownerId,omitempty"` + LastUpdateTimestamp int64 `json:"lastUpdateTimestamp"` + Dashboard PersesDashboard `json:"dashboard"` +} + +// NewDashboardReadFullSchema instantiates a new DashboardReadFullSchema 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 NewDashboardReadFullSchema(type_ string, identifier string, id int64, name string, description string, scope DashboardScope, lastUpdateTimestamp int64, dashboard PersesDashboard) *DashboardReadFullSchema { + this := DashboardReadFullSchema{} + this.Type = type_ + this.Identifier = identifier + this.Id = id + this.Name = name + this.Description = description + this.Scope = scope + this.LastUpdateTimestamp = lastUpdateTimestamp + this.Dashboard = dashboard + return &this +} + +// NewDashboardReadFullSchemaWithDefaults instantiates a new DashboardReadFullSchema 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 NewDashboardReadFullSchemaWithDefaults() *DashboardReadFullSchema { + this := DashboardReadFullSchema{} + return &this +} + +// GetType returns the Type field value +func (o *DashboardReadFullSchema) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *DashboardReadFullSchema) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *DashboardReadFullSchema) SetType(v string) { + o.Type = v +} + +// GetIdentifier returns the Identifier field value +func (o *DashboardReadFullSchema) GetIdentifier() string { + if o == nil { + var ret string + return ret + } + + return o.Identifier +} + +// GetIdentifierOk returns a tuple with the Identifier field value +// and a boolean to check if the value has been set. +func (o *DashboardReadFullSchema) GetIdentifierOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Identifier, true +} + +// SetIdentifier sets field value +func (o *DashboardReadFullSchema) SetIdentifier(v string) { + o.Identifier = v +} + +// GetId returns the Id field value +func (o *DashboardReadFullSchema) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *DashboardReadFullSchema) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *DashboardReadFullSchema) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *DashboardReadFullSchema) 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 *DashboardReadFullSchema) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DashboardReadFullSchema) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value +func (o *DashboardReadFullSchema) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *DashboardReadFullSchema) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *DashboardReadFullSchema) SetDescription(v string) { + o.Description = v +} + +// GetScope returns the Scope field value +func (o *DashboardReadFullSchema) GetScope() DashboardScope { + if o == nil { + var ret DashboardScope + return ret + } + + return o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value +// and a boolean to check if the value has been set. +func (o *DashboardReadFullSchema) GetScopeOk() (*DashboardScope, bool) { + if o == nil { + return nil, false + } + return &o.Scope, true +} + +// SetScope sets field value +func (o *DashboardReadFullSchema) SetScope(v DashboardScope) { + o.Scope = v +} + +// GetOwnerId returns the OwnerId field value if set, zero value otherwise. +func (o *DashboardReadFullSchema) GetOwnerId() int64 { + if o == nil || o.OwnerId == nil { + var ret int64 + return ret + } + return *o.OwnerId +} + +// GetOwnerIdOk returns a tuple with the OwnerId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DashboardReadFullSchema) GetOwnerIdOk() (*int64, bool) { + if o == nil || o.OwnerId == nil { + return nil, false + } + return o.OwnerId, true +} + +// HasOwnerId returns a boolean if a field has been set. +func (o *DashboardReadFullSchema) HasOwnerId() bool { + if o != nil && o.OwnerId != nil { + return true + } + + return false +} + +// SetOwnerId gets a reference to the given int64 and assigns it to the OwnerId field. +func (o *DashboardReadFullSchema) SetOwnerId(v int64) { + o.OwnerId = &v +} + +// GetLastUpdateTimestamp returns the LastUpdateTimestamp field value +func (o *DashboardReadFullSchema) GetLastUpdateTimestamp() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.LastUpdateTimestamp +} + +// GetLastUpdateTimestampOk returns a tuple with the LastUpdateTimestamp field value +// and a boolean to check if the value has been set. +func (o *DashboardReadFullSchema) GetLastUpdateTimestampOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.LastUpdateTimestamp, true +} + +// SetLastUpdateTimestamp sets field value +func (o *DashboardReadFullSchema) SetLastUpdateTimestamp(v int64) { + o.LastUpdateTimestamp = v +} + +// GetDashboard returns the Dashboard field value +func (o *DashboardReadFullSchema) GetDashboard() PersesDashboard { + if o == nil { + var ret PersesDashboard + return ret + } + + return o.Dashboard +} + +// GetDashboardOk returns a tuple with the Dashboard field value +// and a boolean to check if the value has been set. +func (o *DashboardReadFullSchema) GetDashboardOk() (*PersesDashboard, bool) { + if o == nil { + return nil, false + } + return &o.Dashboard, true +} + +// SetDashboard sets field value +func (o *DashboardReadFullSchema) SetDashboard(v PersesDashboard) { + o.Dashboard = v +} + +func (o DashboardReadFullSchema) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["_type"] = o.Type + } + if true { + toSerialize["identifier"] = o.Identifier + } + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["name"] = o.Name + } + if true { + toSerialize["description"] = o.Description + } + if true { + toSerialize["scope"] = o.Scope + } + if o.OwnerId != nil { + toSerialize["ownerId"] = o.OwnerId + } + if true { + toSerialize["lastUpdateTimestamp"] = o.LastUpdateTimestamp + } + if true { + toSerialize["dashboard"] = o.Dashboard + } + return json.Marshal(toSerialize) +} + +type NullableDashboardReadFullSchema struct { + value *DashboardReadFullSchema + isSet bool +} + +func (v NullableDashboardReadFullSchema) Get() *DashboardReadFullSchema { + return v.value +} + +func (v *NullableDashboardReadFullSchema) Set(val *DashboardReadFullSchema) { + v.value = val + v.isSet = true +} + +func (v NullableDashboardReadFullSchema) IsSet() bool { + return v.isSet +} + +func (v *NullableDashboardReadFullSchema) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDashboardReadFullSchema(val *DashboardReadFullSchema) *NullableDashboardReadFullSchema { + return &NullableDashboardReadFullSchema{value: val, isSet: true} +} + +func (v NullableDashboardReadFullSchema) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDashboardReadFullSchema) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_dashboard_read_full_schema_all_of.go b/generated/stackstate_api/model_dashboard_read_full_schema_all_of.go new file mode 100644 index 00000000..92af653c --- /dev/null +++ b/generated/stackstate_api/model_dashboard_read_full_schema_all_of.go @@ -0,0 +1,143 @@ +/* +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" +) + +// DashboardReadFullSchemaAllOf struct for DashboardReadFullSchemaAllOf +type DashboardReadFullSchemaAllOf struct { + Type *string `json:"_type,omitempty"` + Dashboard PersesDashboard `json:"dashboard"` +} + +// NewDashboardReadFullSchemaAllOf instantiates a new DashboardReadFullSchemaAllOf 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 NewDashboardReadFullSchemaAllOf(dashboard PersesDashboard) *DashboardReadFullSchemaAllOf { + this := DashboardReadFullSchemaAllOf{} + this.Dashboard = dashboard + return &this +} + +// NewDashboardReadFullSchemaAllOfWithDefaults instantiates a new DashboardReadFullSchemaAllOf 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 NewDashboardReadFullSchemaAllOfWithDefaults() *DashboardReadFullSchemaAllOf { + this := DashboardReadFullSchemaAllOf{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *DashboardReadFullSchemaAllOf) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DashboardReadFullSchemaAllOf) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *DashboardReadFullSchemaAllOf) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *DashboardReadFullSchemaAllOf) SetType(v string) { + o.Type = &v +} + +// GetDashboard returns the Dashboard field value +func (o *DashboardReadFullSchemaAllOf) GetDashboard() PersesDashboard { + if o == nil { + var ret PersesDashboard + return ret + } + + return o.Dashboard +} + +// GetDashboardOk returns a tuple with the Dashboard field value +// and a boolean to check if the value has been set. +func (o *DashboardReadFullSchemaAllOf) GetDashboardOk() (*PersesDashboard, bool) { + if o == nil { + return nil, false + } + return &o.Dashboard, true +} + +// SetDashboard sets field value +func (o *DashboardReadFullSchemaAllOf) SetDashboard(v PersesDashboard) { + o.Dashboard = v +} + +func (o DashboardReadFullSchemaAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Type != nil { + toSerialize["_type"] = o.Type + } + if true { + toSerialize["dashboard"] = o.Dashboard + } + return json.Marshal(toSerialize) +} + +type NullableDashboardReadFullSchemaAllOf struct { + value *DashboardReadFullSchemaAllOf + isSet bool +} + +func (v NullableDashboardReadFullSchemaAllOf) Get() *DashboardReadFullSchemaAllOf { + return v.value +} + +func (v *NullableDashboardReadFullSchemaAllOf) Set(val *DashboardReadFullSchemaAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableDashboardReadFullSchemaAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableDashboardReadFullSchemaAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDashboardReadFullSchemaAllOf(val *DashboardReadFullSchemaAllOf) *NullableDashboardReadFullSchemaAllOf { + return &NullableDashboardReadFullSchemaAllOf{value: val, isSet: true} +} + +func (v NullableDashboardReadFullSchemaAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDashboardReadFullSchemaAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_dashboard_read_metadata_schema.go b/generated/stackstate_api/model_dashboard_read_metadata_schema.go new file mode 100644 index 00000000..e2ab3a56 --- /dev/null +++ b/generated/stackstate_api/model_dashboard_read_metadata_schema.go @@ -0,0 +1,321 @@ +/* +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" +) + +// DashboardReadMetadataSchema struct for DashboardReadMetadataSchema +type DashboardReadMetadataSchema struct { + Type string `json:"_type"` + // The identifier of a dashboard. Either the system/graph ID or URN of the resource. + Identifier string `json:"identifier"` + Id int64 `json:"id"` + // Name of the dashboard + Name string `json:"name"` + // Description of the dashboard + Description string `json:"description"` + Scope DashboardScope `json:"scope"` + // The user id of the dashboard owner. A dashboard was either created by a user or from a StackPack. For a user, the identifier will be the system/graph ID, and for a StackPack, the field will be empty/omitted. + OwnerId *int64 `json:"ownerId,omitempty"` + LastUpdateTimestamp int64 `json:"lastUpdateTimestamp"` +} + +// NewDashboardReadMetadataSchema instantiates a new DashboardReadMetadataSchema 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 NewDashboardReadMetadataSchema(type_ string, identifier string, id int64, name string, description string, scope DashboardScope, lastUpdateTimestamp int64) *DashboardReadMetadataSchema { + this := DashboardReadMetadataSchema{} + this.Type = type_ + this.Identifier = identifier + this.Id = id + this.Name = name + this.Description = description + this.Scope = scope + this.LastUpdateTimestamp = lastUpdateTimestamp + return &this +} + +// NewDashboardReadMetadataSchemaWithDefaults instantiates a new DashboardReadMetadataSchema 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 NewDashboardReadMetadataSchemaWithDefaults() *DashboardReadMetadataSchema { + this := DashboardReadMetadataSchema{} + return &this +} + +// GetType returns the Type field value +func (o *DashboardReadMetadataSchema) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *DashboardReadMetadataSchema) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *DashboardReadMetadataSchema) SetType(v string) { + o.Type = v +} + +// GetIdentifier returns the Identifier field value +func (o *DashboardReadMetadataSchema) GetIdentifier() string { + if o == nil { + var ret string + return ret + } + + return o.Identifier +} + +// GetIdentifierOk returns a tuple with the Identifier field value +// and a boolean to check if the value has been set. +func (o *DashboardReadMetadataSchema) GetIdentifierOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Identifier, true +} + +// SetIdentifier sets field value +func (o *DashboardReadMetadataSchema) SetIdentifier(v string) { + o.Identifier = v +} + +// GetId returns the Id field value +func (o *DashboardReadMetadataSchema) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *DashboardReadMetadataSchema) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *DashboardReadMetadataSchema) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *DashboardReadMetadataSchema) 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 *DashboardReadMetadataSchema) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DashboardReadMetadataSchema) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value +func (o *DashboardReadMetadataSchema) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *DashboardReadMetadataSchema) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *DashboardReadMetadataSchema) SetDescription(v string) { + o.Description = v +} + +// GetScope returns the Scope field value +func (o *DashboardReadMetadataSchema) GetScope() DashboardScope { + if o == nil { + var ret DashboardScope + return ret + } + + return o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value +// and a boolean to check if the value has been set. +func (o *DashboardReadMetadataSchema) GetScopeOk() (*DashboardScope, bool) { + if o == nil { + return nil, false + } + return &o.Scope, true +} + +// SetScope sets field value +func (o *DashboardReadMetadataSchema) SetScope(v DashboardScope) { + o.Scope = v +} + +// GetOwnerId returns the OwnerId field value if set, zero value otherwise. +func (o *DashboardReadMetadataSchema) GetOwnerId() int64 { + if o == nil || o.OwnerId == nil { + var ret int64 + return ret + } + return *o.OwnerId +} + +// GetOwnerIdOk returns a tuple with the OwnerId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DashboardReadMetadataSchema) GetOwnerIdOk() (*int64, bool) { + if o == nil || o.OwnerId == nil { + return nil, false + } + return o.OwnerId, true +} + +// HasOwnerId returns a boolean if a field has been set. +func (o *DashboardReadMetadataSchema) HasOwnerId() bool { + if o != nil && o.OwnerId != nil { + return true + } + + return false +} + +// SetOwnerId gets a reference to the given int64 and assigns it to the OwnerId field. +func (o *DashboardReadMetadataSchema) SetOwnerId(v int64) { + o.OwnerId = &v +} + +// GetLastUpdateTimestamp returns the LastUpdateTimestamp field value +func (o *DashboardReadMetadataSchema) GetLastUpdateTimestamp() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.LastUpdateTimestamp +} + +// GetLastUpdateTimestampOk returns a tuple with the LastUpdateTimestamp field value +// and a boolean to check if the value has been set. +func (o *DashboardReadMetadataSchema) GetLastUpdateTimestampOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.LastUpdateTimestamp, true +} + +// SetLastUpdateTimestamp sets field value +func (o *DashboardReadMetadataSchema) SetLastUpdateTimestamp(v int64) { + o.LastUpdateTimestamp = v +} + +func (o DashboardReadMetadataSchema) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["_type"] = o.Type + } + if true { + toSerialize["identifier"] = o.Identifier + } + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["name"] = o.Name + } + if true { + toSerialize["description"] = o.Description + } + if true { + toSerialize["scope"] = o.Scope + } + if o.OwnerId != nil { + toSerialize["ownerId"] = o.OwnerId + } + if true { + toSerialize["lastUpdateTimestamp"] = o.LastUpdateTimestamp + } + return json.Marshal(toSerialize) +} + +type NullableDashboardReadMetadataSchema struct { + value *DashboardReadMetadataSchema + isSet bool +} + +func (v NullableDashboardReadMetadataSchema) Get() *DashboardReadMetadataSchema { + return v.value +} + +func (v *NullableDashboardReadMetadataSchema) Set(val *DashboardReadMetadataSchema) { + v.value = val + v.isSet = true +} + +func (v NullableDashboardReadMetadataSchema) IsSet() bool { + return v.isSet +} + +func (v *NullableDashboardReadMetadataSchema) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDashboardReadMetadataSchema(val *DashboardReadMetadataSchema) *NullableDashboardReadMetadataSchema { + return &NullableDashboardReadMetadataSchema{value: val, isSet: true} +} + +func (v NullableDashboardReadMetadataSchema) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDashboardReadMetadataSchema) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_dashboard_read_metadata_schema_all_of.go b/generated/stackstate_api/model_dashboard_read_metadata_schema_all_of.go new file mode 100644 index 00000000..4a1f204c --- /dev/null +++ b/generated/stackstate_api/model_dashboard_read_metadata_schema_all_of.go @@ -0,0 +1,114 @@ +/* +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" +) + +// DashboardReadMetadataSchemaAllOf struct for DashboardReadMetadataSchemaAllOf +type DashboardReadMetadataSchemaAllOf struct { + Type *string `json:"_type,omitempty"` +} + +// NewDashboardReadMetadataSchemaAllOf instantiates a new DashboardReadMetadataSchemaAllOf 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 NewDashboardReadMetadataSchemaAllOf() *DashboardReadMetadataSchemaAllOf { + this := DashboardReadMetadataSchemaAllOf{} + return &this +} + +// NewDashboardReadMetadataSchemaAllOfWithDefaults instantiates a new DashboardReadMetadataSchemaAllOf 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 NewDashboardReadMetadataSchemaAllOfWithDefaults() *DashboardReadMetadataSchemaAllOf { + this := DashboardReadMetadataSchemaAllOf{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *DashboardReadMetadataSchemaAllOf) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DashboardReadMetadataSchemaAllOf) GetTypeOk() (*string, bool) { + if o == nil || o.Type == nil { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *DashboardReadMetadataSchemaAllOf) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *DashboardReadMetadataSchemaAllOf) SetType(v string) { + o.Type = &v +} + +func (o DashboardReadMetadataSchemaAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Type != nil { + toSerialize["_type"] = o.Type + } + return json.Marshal(toSerialize) +} + +type NullableDashboardReadMetadataSchemaAllOf struct { + value *DashboardReadMetadataSchemaAllOf + isSet bool +} + +func (v NullableDashboardReadMetadataSchemaAllOf) Get() *DashboardReadMetadataSchemaAllOf { + return v.value +} + +func (v *NullableDashboardReadMetadataSchemaAllOf) Set(val *DashboardReadMetadataSchemaAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableDashboardReadMetadataSchemaAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableDashboardReadMetadataSchemaAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDashboardReadMetadataSchemaAllOf(val *DashboardReadMetadataSchemaAllOf) *NullableDashboardReadMetadataSchemaAllOf { + return &NullableDashboardReadMetadataSchemaAllOf{value: val, isSet: true} +} + +func (v NullableDashboardReadMetadataSchemaAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDashboardReadMetadataSchemaAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_dashboard_read_schema.go b/generated/stackstate_api/model_dashboard_read_schema.go new file mode 100644 index 00000000..9016ed36 --- /dev/null +++ b/generated/stackstate_api/model_dashboard_read_schema.go @@ -0,0 +1,140 @@ +/* +StackState API + +This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). + +API version: 5.2.0 +Contact: info@stackstate.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackstate_api + +import ( + "encoding/json" + "fmt" +) + +// DashboardReadSchema - struct for DashboardReadSchema +type DashboardReadSchema struct { + DashboardReadFullSchema *DashboardReadFullSchema + DashboardReadMetadataSchema *DashboardReadMetadataSchema +} + +// DashboardReadFullSchemaAsDashboardReadSchema is a convenience function that returns DashboardReadFullSchema wrapped in DashboardReadSchema +func DashboardReadFullSchemaAsDashboardReadSchema(v *DashboardReadFullSchema) DashboardReadSchema { + return DashboardReadSchema{ + DashboardReadFullSchema: v, + } +} + +// DashboardReadMetadataSchemaAsDashboardReadSchema is a convenience function that returns DashboardReadMetadataSchema wrapped in DashboardReadSchema +func DashboardReadMetadataSchemaAsDashboardReadSchema(v *DashboardReadMetadataSchema) DashboardReadSchema { + return DashboardReadSchema{ + DashboardReadMetadataSchema: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *DashboardReadSchema) UnmarshalJSON(data []byte) error { + var err error + // use discriminator value to speed up the lookup + var jsonDict map[string]interface{} + err = newStrictDecoder(data).Decode(&jsonDict) + if err != nil { + return fmt.Errorf("Failed to unmarshal JSON into map for the discriminator lookup.") + } + + // check if the discriminator value is 'DashboardReadFullSchema' + if jsonDict["_type"] == "DashboardReadFullSchema" { + // try to unmarshal JSON data into DashboardReadFullSchema + err = json.Unmarshal(data, &dst.DashboardReadFullSchema) + if err == nil { + return nil // data stored in dst.DashboardReadFullSchema, return on the first match + } else { + dst.DashboardReadFullSchema = nil + return fmt.Errorf("Failed to unmarshal DashboardReadSchema as DashboardReadFullSchema: %s", err.Error()) + } + } + + // check if the discriminator value is 'DashboardReadMetadataSchema' + if jsonDict["_type"] == "DashboardReadMetadataSchema" { + // try to unmarshal JSON data into DashboardReadMetadataSchema + err = json.Unmarshal(data, &dst.DashboardReadMetadataSchema) + if err == nil { + return nil // data stored in dst.DashboardReadMetadataSchema, return on the first match + } else { + dst.DashboardReadMetadataSchema = nil + return fmt.Errorf("Failed to unmarshal DashboardReadSchema as DashboardReadMetadataSchema: %s", err.Error()) + } + } + + return nil +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src DashboardReadSchema) MarshalJSON() ([]byte, error) { + if src.DashboardReadFullSchema != nil { + return json.Marshal(&src.DashboardReadFullSchema) + } + + if src.DashboardReadMetadataSchema != nil { + return json.Marshal(&src.DashboardReadMetadataSchema) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *DashboardReadSchema) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.DashboardReadFullSchema != nil { + return obj.DashboardReadFullSchema + } + + if obj.DashboardReadMetadataSchema != nil { + return obj.DashboardReadMetadataSchema + } + + // all schemas are nil + return nil +} + +type NullableDashboardReadSchema struct { + value *DashboardReadSchema + isSet bool +} + +func (v NullableDashboardReadSchema) Get() *DashboardReadSchema { + return v.value +} + +func (v *NullableDashboardReadSchema) Set(val *DashboardReadSchema) { + v.value = val + v.isSet = true +} + +func (v NullableDashboardReadSchema) IsSet() bool { + return v.isSet +} + +func (v *NullableDashboardReadSchema) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDashboardReadSchema(val *DashboardReadSchema) *NullableDashboardReadSchema { + return &NullableDashboardReadSchema{value: val, isSet: true} +} + +func (v NullableDashboardReadSchema) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDashboardReadSchema) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_dashboard_scope.go b/generated/stackstate_api/model_dashboard_scope.go new file mode 100644 index 00000000..15366235 --- /dev/null +++ b/generated/stackstate_api/model_dashboard_scope.go @@ -0,0 +1,111 @@ +/* +StackState API + +This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). + +API version: 5.2.0 +Contact: info@stackstate.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackstate_api + +import ( + "encoding/json" + "fmt" +) + +// DashboardScope Scope of the dashboard. 'publicDashboard' for accessible by everyone, 'privateDashboard' for owned and accessible by the current user. +type DashboardScope string + +// List of DashboardScope +const ( + DASHBOARDSCOPE_PUBLIC_DASHBOARD DashboardScope = "publicDashboard" + DASHBOARDSCOPE_PRIVATE_DASHBOARD DashboardScope = "privateDashboard" +) + +// All allowed values of DashboardScope enum +var AllowedDashboardScopeEnumValues = []DashboardScope{ + "publicDashboard", + "privateDashboard", +} + +func (v *DashboardScope) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := DashboardScope(value) + for _, existing := range AllowedDashboardScopeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid DashboardScope", value) +} + +// NewDashboardScopeFromValue returns a pointer to a valid DashboardScope +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewDashboardScopeFromValue(v string) (*DashboardScope, error) { + ev := DashboardScope(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for DashboardScope: valid values are %v", v, AllowedDashboardScopeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v DashboardScope) IsValid() bool { + for _, existing := range AllowedDashboardScopeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to DashboardScope value +func (v DashboardScope) Ptr() *DashboardScope { + return &v +} + +type NullableDashboardScope struct { + value *DashboardScope + isSet bool +} + +func (v NullableDashboardScope) Get() *DashboardScope { + return v.value +} + +func (v *NullableDashboardScope) Set(val *DashboardScope) { + v.value = val + v.isSet = true +} + +func (v NullableDashboardScope) IsSet() bool { + return v.isSet +} + +func (v *NullableDashboardScope) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDashboardScope(val *DashboardScope) *NullableDashboardScope { + return &NullableDashboardScope{value: val, isSet: true} +} + +func (v NullableDashboardScope) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDashboardScope) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_dashboard_validation_error.go b/generated/stackstate_api/model_dashboard_validation_error.go new file mode 100644 index 00000000..9b7ab618 --- /dev/null +++ b/generated/stackstate_api/model_dashboard_validation_error.go @@ -0,0 +1,137 @@ +/* +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" +) + +// DashboardValidationError struct for DashboardValidationError +type DashboardValidationError struct { + Type string `json:"_type"` + // A detailed error message describing why the operation failed. + Message string `json:"message"` +} + +// NewDashboardValidationError instantiates a new DashboardValidationError 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 NewDashboardValidationError(type_ string, message string) *DashboardValidationError { + this := DashboardValidationError{} + this.Type = type_ + this.Message = message + return &this +} + +// NewDashboardValidationErrorWithDefaults instantiates a new DashboardValidationError 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 NewDashboardValidationErrorWithDefaults() *DashboardValidationError { + this := DashboardValidationError{} + return &this +} + +// GetType returns the Type field value +func (o *DashboardValidationError) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *DashboardValidationError) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *DashboardValidationError) SetType(v string) { + o.Type = v +} + +// GetMessage returns the Message field value +func (o *DashboardValidationError) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *DashboardValidationError) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *DashboardValidationError) SetMessage(v string) { + o.Message = v +} + +func (o DashboardValidationError) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["_type"] = o.Type + } + if true { + toSerialize["message"] = o.Message + } + return json.Marshal(toSerialize) +} + +type NullableDashboardValidationError struct { + value *DashboardValidationError + isSet bool +} + +func (v NullableDashboardValidationError) Get() *DashboardValidationError { + return v.value +} + +func (v *NullableDashboardValidationError) Set(val *DashboardValidationError) { + v.value = val + v.isSet = true +} + +func (v NullableDashboardValidationError) IsSet() bool { + return v.isSet +} + +func (v *NullableDashboardValidationError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDashboardValidationError(val *DashboardValidationError) *NullableDashboardValidationError { + return &NullableDashboardValidationError{value: val, isSet: true} +} + +func (v NullableDashboardValidationError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDashboardValidationError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_dashboard_write_schema.go b/generated/stackstate_api/model_dashboard_write_schema.go new file mode 100644 index 00000000..2b4957f4 --- /dev/null +++ b/generated/stackstate_api/model_dashboard_write_schema.go @@ -0,0 +1,196 @@ +/* +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" +) + +// DashboardWriteSchema struct for DashboardWriteSchema +type DashboardWriteSchema struct { + // Name of the dashboard + Name string `json:"name"` + // Description of the dashboard + Description string `json:"description"` + Scope DashboardScope `json:"scope"` + Dashboard PersesDashboard `json:"dashboard"` +} + +// NewDashboardWriteSchema instantiates a new DashboardWriteSchema 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 NewDashboardWriteSchema(name string, description string, scope DashboardScope, dashboard PersesDashboard) *DashboardWriteSchema { + this := DashboardWriteSchema{} + this.Name = name + this.Description = description + this.Scope = scope + this.Dashboard = dashboard + return &this +} + +// NewDashboardWriteSchemaWithDefaults instantiates a new DashboardWriteSchema 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 NewDashboardWriteSchemaWithDefaults() *DashboardWriteSchema { + this := DashboardWriteSchema{} + return &this +} + +// GetName returns the Name field value +func (o *DashboardWriteSchema) 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 *DashboardWriteSchema) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DashboardWriteSchema) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value +func (o *DashboardWriteSchema) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *DashboardWriteSchema) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *DashboardWriteSchema) SetDescription(v string) { + o.Description = v +} + +// GetScope returns the Scope field value +func (o *DashboardWriteSchema) GetScope() DashboardScope { + if o == nil { + var ret DashboardScope + return ret + } + + return o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value +// and a boolean to check if the value has been set. +func (o *DashboardWriteSchema) GetScopeOk() (*DashboardScope, bool) { + if o == nil { + return nil, false + } + return &o.Scope, true +} + +// SetScope sets field value +func (o *DashboardWriteSchema) SetScope(v DashboardScope) { + o.Scope = v +} + +// GetDashboard returns the Dashboard field value +func (o *DashboardWriteSchema) GetDashboard() PersesDashboard { + if o == nil { + var ret PersesDashboard + return ret + } + + return o.Dashboard +} + +// GetDashboardOk returns a tuple with the Dashboard field value +// and a boolean to check if the value has been set. +func (o *DashboardWriteSchema) GetDashboardOk() (*PersesDashboard, bool) { + if o == nil { + return nil, false + } + return &o.Dashboard, true +} + +// SetDashboard sets field value +func (o *DashboardWriteSchema) SetDashboard(v PersesDashboard) { + o.Dashboard = v +} + +func (o DashboardWriteSchema) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["name"] = o.Name + } + if true { + toSerialize["description"] = o.Description + } + if true { + toSerialize["scope"] = o.Scope + } + if true { + toSerialize["dashboard"] = o.Dashboard + } + return json.Marshal(toSerialize) +} + +type NullableDashboardWriteSchema struct { + value *DashboardWriteSchema + isSet bool +} + +func (v NullableDashboardWriteSchema) Get() *DashboardWriteSchema { + return v.value +} + +func (v *NullableDashboardWriteSchema) Set(val *DashboardWriteSchema) { + v.value = val + v.isSet = true +} + +func (v NullableDashboardWriteSchema) IsSet() bool { + return v.isSet +} + +func (v *NullableDashboardWriteSchema) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDashboardWriteSchema(val *DashboardWriteSchema) *NullableDashboardWriteSchema { + return &NullableDashboardWriteSchema{value: val, isSet: true} +} + +func (v NullableDashboardWriteSchema) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDashboardWriteSchema) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_opsgenie_channel_write_schema.go b/generated/stackstate_api/model_opsgenie_channel_write_schema.go index 2d2dbfb7..24ac20e1 100644 --- a/generated/stackstate_api/model_opsgenie_channel_write_schema.go +++ b/generated/stackstate_api/model_opsgenie_channel_write_schema.go @@ -17,17 +17,17 @@ import ( // OpsgenieChannelWriteSchema struct for OpsgenieChannelWriteSchema type OpsgenieChannelWriteSchema struct { - Region string `json:"region"` + Region OpsgenieRegion `json:"region"` GenieKey string `json:"genieKey"` Responders []OpsgenieResponder `json:"responders"` - Priority string `json:"priority"` + Priority OpsgeniePriority `json:"priority"` } // NewOpsgenieChannelWriteSchema instantiates a new OpsgenieChannelWriteSchema 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 NewOpsgenieChannelWriteSchema(region string, genieKey string, responders []OpsgenieResponder, priority string) *OpsgenieChannelWriteSchema { +func NewOpsgenieChannelWriteSchema(region OpsgenieRegion, genieKey string, responders []OpsgenieResponder, priority OpsgeniePriority) *OpsgenieChannelWriteSchema { this := OpsgenieChannelWriteSchema{} this.Region = region this.GenieKey = genieKey @@ -45,9 +45,9 @@ func NewOpsgenieChannelWriteSchemaWithDefaults() *OpsgenieChannelWriteSchema { } // GetRegion returns the Region field value -func (o *OpsgenieChannelWriteSchema) GetRegion() string { +func (o *OpsgenieChannelWriteSchema) GetRegion() OpsgenieRegion { if o == nil { - var ret string + var ret OpsgenieRegion return ret } @@ -56,7 +56,7 @@ func (o *OpsgenieChannelWriteSchema) GetRegion() string { // GetRegionOk returns a tuple with the Region field value // and a boolean to check if the value has been set. -func (o *OpsgenieChannelWriteSchema) GetRegionOk() (*string, bool) { +func (o *OpsgenieChannelWriteSchema) GetRegionOk() (*OpsgenieRegion, bool) { if o == nil { return nil, false } @@ -64,7 +64,7 @@ func (o *OpsgenieChannelWriteSchema) GetRegionOk() (*string, bool) { } // SetRegion sets field value -func (o *OpsgenieChannelWriteSchema) SetRegion(v string) { +func (o *OpsgenieChannelWriteSchema) SetRegion(v OpsgenieRegion) { o.Region = v } @@ -117,9 +117,9 @@ func (o *OpsgenieChannelWriteSchema) SetResponders(v []OpsgenieResponder) { } // GetPriority returns the Priority field value -func (o *OpsgenieChannelWriteSchema) GetPriority() string { +func (o *OpsgenieChannelWriteSchema) GetPriority() OpsgeniePriority { if o == nil { - var ret string + var ret OpsgeniePriority return ret } @@ -128,7 +128,7 @@ func (o *OpsgenieChannelWriteSchema) GetPriority() string { // GetPriorityOk returns a tuple with the Priority field value // and a boolean to check if the value has been set. -func (o *OpsgenieChannelWriteSchema) GetPriorityOk() (*string, bool) { +func (o *OpsgenieChannelWriteSchema) GetPriorityOk() (*OpsgeniePriority, bool) { if o == nil { return nil, false } @@ -136,7 +136,7 @@ func (o *OpsgenieChannelWriteSchema) GetPriorityOk() (*string, bool) { } // SetPriority sets field value -func (o *OpsgenieChannelWriteSchema) SetPriority(v string) { +func (o *OpsgenieChannelWriteSchema) SetPriority(v OpsgeniePriority) { o.Priority = v } diff --git a/generated/stackstate_api/model_opsgenie_notification_channel.go b/generated/stackstate_api/model_opsgenie_notification_channel.go index 8a6eec6c..3649d658 100644 --- a/generated/stackstate_api/model_opsgenie_notification_channel.go +++ b/generated/stackstate_api/model_opsgenie_notification_channel.go @@ -20,10 +20,10 @@ type OpsgenieNotificationChannel struct { Id int64 `json:"id"` NotificationConfigurationId *int64 `json:"notificationConfigurationId,omitempty"` Status NotificationChannelStatus `json:"status"` - Region string `json:"region"` + Region OpsgenieRegion `json:"region"` GenieKey string `json:"genieKey"` Responders []OpsgenieResponder `json:"responders"` - Priority string `json:"priority"` + Priority OpsgeniePriority `json:"priority"` Type string `json:"_type"` } @@ -31,7 +31,7 @@ type OpsgenieNotificationChannel 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 NewOpsgenieNotificationChannel(id int64, status NotificationChannelStatus, region string, genieKey string, responders []OpsgenieResponder, priority string, type_ string) *OpsgenieNotificationChannel { +func NewOpsgenieNotificationChannel(id int64, status NotificationChannelStatus, region OpsgenieRegion, genieKey string, responders []OpsgenieResponder, priority OpsgeniePriority, type_ string) *OpsgenieNotificationChannel { this := OpsgenieNotificationChannel{} this.Id = id this.Status = status @@ -132,9 +132,9 @@ func (o *OpsgenieNotificationChannel) SetStatus(v NotificationChannelStatus) { } // GetRegion returns the Region field value -func (o *OpsgenieNotificationChannel) GetRegion() string { +func (o *OpsgenieNotificationChannel) GetRegion() OpsgenieRegion { if o == nil { - var ret string + var ret OpsgenieRegion return ret } @@ -143,7 +143,7 @@ func (o *OpsgenieNotificationChannel) GetRegion() string { // GetRegionOk returns a tuple with the Region field value // and a boolean to check if the value has been set. -func (o *OpsgenieNotificationChannel) GetRegionOk() (*string, bool) { +func (o *OpsgenieNotificationChannel) GetRegionOk() (*OpsgenieRegion, bool) { if o == nil { return nil, false } @@ -151,7 +151,7 @@ func (o *OpsgenieNotificationChannel) GetRegionOk() (*string, bool) { } // SetRegion sets field value -func (o *OpsgenieNotificationChannel) SetRegion(v string) { +func (o *OpsgenieNotificationChannel) SetRegion(v OpsgenieRegion) { o.Region = v } @@ -204,9 +204,9 @@ func (o *OpsgenieNotificationChannel) SetResponders(v []OpsgenieResponder) { } // GetPriority returns the Priority field value -func (o *OpsgenieNotificationChannel) GetPriority() string { +func (o *OpsgenieNotificationChannel) GetPriority() OpsgeniePriority { if o == nil { - var ret string + var ret OpsgeniePriority return ret } @@ -215,7 +215,7 @@ func (o *OpsgenieNotificationChannel) GetPriority() string { // GetPriorityOk returns a tuple with the Priority field value // and a boolean to check if the value has been set. -func (o *OpsgenieNotificationChannel) GetPriorityOk() (*string, bool) { +func (o *OpsgenieNotificationChannel) GetPriorityOk() (*OpsgeniePriority, bool) { if o == nil { return nil, false } @@ -223,7 +223,7 @@ func (o *OpsgenieNotificationChannel) GetPriorityOk() (*string, bool) { } // SetPriority sets field value -func (o *OpsgenieNotificationChannel) SetPriority(v string) { +func (o *OpsgenieNotificationChannel) SetPriority(v OpsgeniePriority) { o.Priority = v } diff --git a/generated/stackstate_api/model_opsgenie_priority.go b/generated/stackstate_api/model_opsgenie_priority.go new file mode 100644 index 00000000..721e76ef --- /dev/null +++ b/generated/stackstate_api/model_opsgenie_priority.go @@ -0,0 +1,117 @@ +/* +StackState API + +This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). + +API version: 5.2.0 +Contact: info@stackstate.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackstate_api + +import ( + "encoding/json" + "fmt" +) + +// OpsgeniePriority the model 'OpsgeniePriority' +type OpsgeniePriority string + +// List of OpsgeniePriority +const ( + OPSGENIEPRIORITY_P1 OpsgeniePriority = "P1" + OPSGENIEPRIORITY_P2 OpsgeniePriority = "P2" + OPSGENIEPRIORITY_P3 OpsgeniePriority = "P3" + OPSGENIEPRIORITY_P4 OpsgeniePriority = "P4" + OPSGENIEPRIORITY_P5 OpsgeniePriority = "P5" +) + +// All allowed values of OpsgeniePriority enum +var AllowedOpsgeniePriorityEnumValues = []OpsgeniePriority{ + "P1", + "P2", + "P3", + "P4", + "P5", +} + +func (v *OpsgeniePriority) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := OpsgeniePriority(value) + for _, existing := range AllowedOpsgeniePriorityEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid OpsgeniePriority", value) +} + +// NewOpsgeniePriorityFromValue returns a pointer to a valid OpsgeniePriority +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewOpsgeniePriorityFromValue(v string) (*OpsgeniePriority, error) { + ev := OpsgeniePriority(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for OpsgeniePriority: valid values are %v", v, AllowedOpsgeniePriorityEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v OpsgeniePriority) IsValid() bool { + for _, existing := range AllowedOpsgeniePriorityEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to OpsgeniePriority value +func (v OpsgeniePriority) Ptr() *OpsgeniePriority { + return &v +} + +type NullableOpsgeniePriority struct { + value *OpsgeniePriority + isSet bool +} + +func (v NullableOpsgeniePriority) Get() *OpsgeniePriority { + return v.value +} + +func (v *NullableOpsgeniePriority) Set(val *OpsgeniePriority) { + v.value = val + v.isSet = true +} + +func (v NullableOpsgeniePriority) IsSet() bool { + return v.isSet +} + +func (v *NullableOpsgeniePriority) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOpsgeniePriority(val *OpsgeniePriority) *NullableOpsgeniePriority { + return &NullableOpsgeniePriority{value: val, isSet: true} +} + +func (v NullableOpsgeniePriority) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOpsgeniePriority) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_opsgenie_region.go b/generated/stackstate_api/model_opsgenie_region.go new file mode 100644 index 00000000..06a91b50 --- /dev/null +++ b/generated/stackstate_api/model_opsgenie_region.go @@ -0,0 +1,111 @@ +/* +StackState API + +This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). + +API version: 5.2.0 +Contact: info@stackstate.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackstate_api + +import ( + "encoding/json" + "fmt" +) + +// OpsgenieRegion the model 'OpsgenieRegion' +type OpsgenieRegion string + +// List of OpsgenieRegion +const ( + OPSGENIEREGION_EU OpsgenieRegion = "EU" + OPSGENIEREGION_US OpsgenieRegion = "US" +) + +// All allowed values of OpsgenieRegion enum +var AllowedOpsgenieRegionEnumValues = []OpsgenieRegion{ + "EU", + "US", +} + +func (v *OpsgenieRegion) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := OpsgenieRegion(value) + for _, existing := range AllowedOpsgenieRegionEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid OpsgenieRegion", value) +} + +// NewOpsgenieRegionFromValue returns a pointer to a valid OpsgenieRegion +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewOpsgenieRegionFromValue(v string) (*OpsgenieRegion, error) { + ev := OpsgenieRegion(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for OpsgenieRegion: valid values are %v", v, AllowedOpsgenieRegionEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v OpsgenieRegion) IsValid() bool { + for _, existing := range AllowedOpsgenieRegionEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to OpsgenieRegion value +func (v OpsgenieRegion) Ptr() *OpsgenieRegion { + return &v +} + +type NullableOpsgenieRegion struct { + value *OpsgenieRegion + isSet bool +} + +func (v NullableOpsgenieRegion) Get() *OpsgenieRegion { + return v.value +} + +func (v *NullableOpsgenieRegion) Set(val *OpsgenieRegion) { + v.value = val + v.isSet = true +} + +func (v NullableOpsgenieRegion) IsSet() bool { + return v.isSet +} + +func (v *NullableOpsgenieRegion) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOpsgenieRegion(val *OpsgenieRegion) *NullableOpsgenieRegion { + return &NullableOpsgenieRegion{value: val, isSet: true} +} + +func (v NullableOpsgenieRegion) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOpsgenieRegion) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_opsgenie_responder.go b/generated/stackstate_api/model_opsgenie_responder.go index ce71dd3a..4f26a5e4 100644 --- a/generated/stackstate_api/model_opsgenie_responder.go +++ b/generated/stackstate_api/model_opsgenie_responder.go @@ -17,15 +17,15 @@ import ( // OpsgenieResponder struct for OpsgenieResponder type OpsgenieResponder struct { - ResponderType string `json:"responderType"` - Responder string `json:"responder"` + ResponderType OpsgenieResponderType `json:"responderType"` + Responder string `json:"responder"` } // NewOpsgenieResponder instantiates a new OpsgenieResponder 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 NewOpsgenieResponder(responderType string, responder string) *OpsgenieResponder { +func NewOpsgenieResponder(responderType OpsgenieResponderType, responder string) *OpsgenieResponder { this := OpsgenieResponder{} this.ResponderType = responderType this.Responder = responder @@ -41,9 +41,9 @@ func NewOpsgenieResponderWithDefaults() *OpsgenieResponder { } // GetResponderType returns the ResponderType field value -func (o *OpsgenieResponder) GetResponderType() string { +func (o *OpsgenieResponder) GetResponderType() OpsgenieResponderType { if o == nil { - var ret string + var ret OpsgenieResponderType return ret } @@ -52,7 +52,7 @@ func (o *OpsgenieResponder) GetResponderType() string { // GetResponderTypeOk returns a tuple with the ResponderType field value // and a boolean to check if the value has been set. -func (o *OpsgenieResponder) GetResponderTypeOk() (*string, bool) { +func (o *OpsgenieResponder) GetResponderTypeOk() (*OpsgenieResponderType, bool) { if o == nil { return nil, false } @@ -60,7 +60,7 @@ func (o *OpsgenieResponder) GetResponderTypeOk() (*string, bool) { } // SetResponderType sets field value -func (o *OpsgenieResponder) SetResponderType(v string) { +func (o *OpsgenieResponder) SetResponderType(v OpsgenieResponderType) { o.ResponderType = v } diff --git a/generated/stackstate_api/model_opsgenie_responder_type.go b/generated/stackstate_api/model_opsgenie_responder_type.go new file mode 100644 index 00000000..32538107 --- /dev/null +++ b/generated/stackstate_api/model_opsgenie_responder_type.go @@ -0,0 +1,115 @@ +/* +StackState API + +This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). + +API version: 5.2.0 +Contact: info@stackstate.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackstate_api + +import ( + "encoding/json" + "fmt" +) + +// OpsgenieResponderType the model 'OpsgenieResponderType' +type OpsgenieResponderType string + +// List of OpsgenieResponderType +const ( + OPSGENIERESPONDERTYPE_TEAM OpsgenieResponderType = "TEAM" + OPSGENIERESPONDERTYPE_USER OpsgenieResponderType = "USER" + OPSGENIERESPONDERTYPE_SCHEDULE OpsgenieResponderType = "SCHEDULE" + OPSGENIERESPONDERTYPE_ESCALATION OpsgenieResponderType = "ESCALATION" +) + +// All allowed values of OpsgenieResponderType enum +var AllowedOpsgenieResponderTypeEnumValues = []OpsgenieResponderType{ + "TEAM", + "USER", + "SCHEDULE", + "ESCALATION", +} + +func (v *OpsgenieResponderType) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := OpsgenieResponderType(value) + for _, existing := range AllowedOpsgenieResponderTypeEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid OpsgenieResponderType", value) +} + +// NewOpsgenieResponderTypeFromValue returns a pointer to a valid OpsgenieResponderType +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewOpsgenieResponderTypeFromValue(v string) (*OpsgenieResponderType, error) { + ev := OpsgenieResponderType(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for OpsgenieResponderType: valid values are %v", v, AllowedOpsgenieResponderTypeEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v OpsgenieResponderType) IsValid() bool { + for _, existing := range AllowedOpsgenieResponderTypeEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to OpsgenieResponderType value +func (v OpsgenieResponderType) Ptr() *OpsgenieResponderType { + return &v +} + +type NullableOpsgenieResponderType struct { + value *OpsgenieResponderType + isSet bool +} + +func (v NullableOpsgenieResponderType) Get() *OpsgenieResponderType { + return v.value +} + +func (v *NullableOpsgenieResponderType) Set(val *OpsgenieResponderType) { + v.value = val + v.isSet = true +} + +func (v NullableOpsgenieResponderType) IsSet() bool { + return v.isSet +} + +func (v *NullableOpsgenieResponderType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOpsgenieResponderType(val *OpsgenieResponderType) *NullableOpsgenieResponderType { + return &NullableOpsgenieResponderType{value: val, isSet: true} +} + +func (v NullableOpsgenieResponderType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOpsgenieResponderType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_dashboard.go b/generated/stackstate_api/model_perses_dashboard.go new file mode 100644 index 00000000..5d040cd9 --- /dev/null +++ b/generated/stackstate_api/model_perses_dashboard.go @@ -0,0 +1,186 @@ +/* +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" +) + +// PersesDashboard struct for PersesDashboard +type PersesDashboard struct { + Kind *string `json:"kind,omitempty"` + Metadata *PersesProjectMetadata `json:"metadata,omitempty"` + Spec *PersesDashboardSpec `json:"spec,omitempty"` +} + +// NewPersesDashboard instantiates a new PersesDashboard 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 NewPersesDashboard() *PersesDashboard { + this := PersesDashboard{} + return &this +} + +// NewPersesDashboardWithDefaults instantiates a new PersesDashboard 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 NewPersesDashboardWithDefaults() *PersesDashboard { + this := PersesDashboard{} + return &this +} + +// GetKind returns the Kind field value if set, zero value otherwise. +func (o *PersesDashboard) GetKind() string { + if o == nil || o.Kind == nil { + var ret string + return ret + } + return *o.Kind +} + +// GetKindOk returns a tuple with the Kind field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesDashboard) GetKindOk() (*string, bool) { + if o == nil || o.Kind == nil { + return nil, false + } + return o.Kind, true +} + +// HasKind returns a boolean if a field has been set. +func (o *PersesDashboard) HasKind() bool { + if o != nil && o.Kind != nil { + return true + } + + return false +} + +// SetKind gets a reference to the given string and assigns it to the Kind field. +func (o *PersesDashboard) SetKind(v string) { + o.Kind = &v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *PersesDashboard) GetMetadata() PersesProjectMetadata { + if o == nil || o.Metadata == nil { + var ret PersesProjectMetadata + return ret + } + return *o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesDashboard) GetMetadataOk() (*PersesProjectMetadata, bool) { + if o == nil || o.Metadata == nil { + return nil, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *PersesDashboard) HasMetadata() bool { + if o != nil && o.Metadata != nil { + return true + } + + return false +} + +// SetMetadata gets a reference to the given PersesProjectMetadata and assigns it to the Metadata field. +func (o *PersesDashboard) SetMetadata(v PersesProjectMetadata) { + o.Metadata = &v +} + +// GetSpec returns the Spec field value if set, zero value otherwise. +func (o *PersesDashboard) GetSpec() PersesDashboardSpec { + if o == nil || o.Spec == nil { + var ret PersesDashboardSpec + return ret + } + return *o.Spec +} + +// GetSpecOk returns a tuple with the Spec field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesDashboard) GetSpecOk() (*PersesDashboardSpec, bool) { + if o == nil || o.Spec == nil { + return nil, false + } + return o.Spec, true +} + +// HasSpec returns a boolean if a field has been set. +func (o *PersesDashboard) HasSpec() bool { + if o != nil && o.Spec != nil { + return true + } + + return false +} + +// SetSpec gets a reference to the given PersesDashboardSpec and assigns it to the Spec field. +func (o *PersesDashboard) SetSpec(v PersesDashboardSpec) { + o.Spec = &v +} + +func (o PersesDashboard) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Kind != nil { + toSerialize["kind"] = o.Kind + } + if o.Metadata != nil { + toSerialize["metadata"] = o.Metadata + } + if o.Spec != nil { + toSerialize["spec"] = o.Spec + } + return json.Marshal(toSerialize) +} + +type NullablePersesDashboard struct { + value *PersesDashboard + isSet bool +} + +func (v NullablePersesDashboard) Get() *PersesDashboard { + return v.value +} + +func (v *NullablePersesDashboard) Set(val *PersesDashboard) { + v.value = val + v.isSet = true +} + +func (v NullablePersesDashboard) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesDashboard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesDashboard(val *PersesDashboard) *NullablePersesDashboard { + return &NullablePersesDashboard{value: val, isSet: true} +} + +func (v NullablePersesDashboard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesDashboard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_dashboard_display_spec.go b/generated/stackstate_api/model_perses_dashboard_display_spec.go new file mode 100644 index 00000000..57091a0b --- /dev/null +++ b/generated/stackstate_api/model_perses_dashboard_display_spec.go @@ -0,0 +1,150 @@ +/* +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" +) + +// PersesDashboardDisplaySpec struct for PersesDashboardDisplaySpec +type PersesDashboardDisplaySpec struct { + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` +} + +// NewPersesDashboardDisplaySpec instantiates a new PersesDashboardDisplaySpec 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 NewPersesDashboardDisplaySpec() *PersesDashboardDisplaySpec { + this := PersesDashboardDisplaySpec{} + return &this +} + +// NewPersesDashboardDisplaySpecWithDefaults instantiates a new PersesDashboardDisplaySpec 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 NewPersesDashboardDisplaySpecWithDefaults() *PersesDashboardDisplaySpec { + this := PersesDashboardDisplaySpec{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PersesDashboardDisplaySpec) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesDashboardDisplaySpec) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PersesDashboardDisplaySpec) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PersesDashboardDisplaySpec) SetDescription(v string) { + o.Description = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PersesDashboardDisplaySpec) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesDashboardDisplaySpec) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PersesDashboardDisplaySpec) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PersesDashboardDisplaySpec) SetName(v string) { + o.Name = &v +} + +func (o PersesDashboardDisplaySpec) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Description != nil { + toSerialize["description"] = o.Description + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + +type NullablePersesDashboardDisplaySpec struct { + value *PersesDashboardDisplaySpec + isSet bool +} + +func (v NullablePersesDashboardDisplaySpec) Get() *PersesDashboardDisplaySpec { + return v.value +} + +func (v *NullablePersesDashboardDisplaySpec) Set(val *PersesDashboardDisplaySpec) { + v.value = val + v.isSet = true +} + +func (v NullablePersesDashboardDisplaySpec) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesDashboardDisplaySpec) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesDashboardDisplaySpec(val *PersesDashboardDisplaySpec) *NullablePersesDashboardDisplaySpec { + return &NullablePersesDashboardDisplaySpec{value: val, isSet: true} +} + +func (v NullablePersesDashboardDisplaySpec) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesDashboardDisplaySpec) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_dashboard_spec.go b/generated/stackstate_api/model_perses_dashboard_spec.go new file mode 100644 index 00000000..379b99d2 --- /dev/null +++ b/generated/stackstate_api/model_perses_dashboard_spec.go @@ -0,0 +1,333 @@ +/* +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" +) + +// PersesDashboardSpec struct for PersesDashboardSpec +type PersesDashboardSpec struct { + // Datasources is an optional list of datasource definition. + Datasources *map[string]PersesDatasourceSpec `json:"datasources,omitempty"` + Display *PersesDashboardDisplaySpec `json:"display,omitempty"` + // A Duration represents the elapsed time between two instants. It must be provided as a string like \"1h\", \"30m\", \"15s\". + Duration *string `json:"duration,omitempty"` + Layouts []PersesLayout `json:"layouts,omitempty"` + Panels *map[string]PersesPanel `json:"panels,omitempty"` + // A Duration represents the elapsed time between two instants. It must be provided as a string like \"1h\", \"30m\", \"15s\". + RefreshInterval *string `json:"refreshInterval,omitempty"` + Variables []PersesVariableTypes `json:"variables,omitempty"` +} + +// NewPersesDashboardSpec instantiates a new PersesDashboardSpec 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 NewPersesDashboardSpec() *PersesDashboardSpec { + this := PersesDashboardSpec{} + return &this +} + +// NewPersesDashboardSpecWithDefaults instantiates a new PersesDashboardSpec 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 NewPersesDashboardSpecWithDefaults() *PersesDashboardSpec { + this := PersesDashboardSpec{} + return &this +} + +// GetDatasources returns the Datasources field value if set, zero value otherwise. +func (o *PersesDashboardSpec) GetDatasources() map[string]PersesDatasourceSpec { + if o == nil || o.Datasources == nil { + var ret map[string]PersesDatasourceSpec + return ret + } + return *o.Datasources +} + +// GetDatasourcesOk returns a tuple with the Datasources field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesDashboardSpec) GetDatasourcesOk() (*map[string]PersesDatasourceSpec, bool) { + if o == nil || o.Datasources == nil { + return nil, false + } + return o.Datasources, true +} + +// HasDatasources returns a boolean if a field has been set. +func (o *PersesDashboardSpec) HasDatasources() bool { + if o != nil && o.Datasources != nil { + return true + } + + return false +} + +// SetDatasources gets a reference to the given map[string]PersesDatasourceSpec and assigns it to the Datasources field. +func (o *PersesDashboardSpec) SetDatasources(v map[string]PersesDatasourceSpec) { + o.Datasources = &v +} + +// GetDisplay returns the Display field value if set, zero value otherwise. +func (o *PersesDashboardSpec) GetDisplay() PersesDashboardDisplaySpec { + if o == nil || o.Display == nil { + var ret PersesDashboardDisplaySpec + return ret + } + return *o.Display +} + +// GetDisplayOk returns a tuple with the Display field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesDashboardSpec) GetDisplayOk() (*PersesDashboardDisplaySpec, bool) { + if o == nil || o.Display == nil { + return nil, false + } + return o.Display, true +} + +// HasDisplay returns a boolean if a field has been set. +func (o *PersesDashboardSpec) HasDisplay() bool { + if o != nil && o.Display != nil { + return true + } + + return false +} + +// SetDisplay gets a reference to the given PersesDashboardDisplaySpec and assigns it to the Display field. +func (o *PersesDashboardSpec) SetDisplay(v PersesDashboardDisplaySpec) { + o.Display = &v +} + +// GetDuration returns the Duration field value if set, zero value otherwise. +func (o *PersesDashboardSpec) GetDuration() string { + if o == nil || o.Duration == nil { + var ret string + return ret + } + return *o.Duration +} + +// GetDurationOk returns a tuple with the Duration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesDashboardSpec) GetDurationOk() (*string, bool) { + if o == nil || o.Duration == nil { + return nil, false + } + return o.Duration, true +} + +// HasDuration returns a boolean if a field has been set. +func (o *PersesDashboardSpec) HasDuration() bool { + if o != nil && o.Duration != nil { + return true + } + + return false +} + +// SetDuration gets a reference to the given string and assigns it to the Duration field. +func (o *PersesDashboardSpec) SetDuration(v string) { + o.Duration = &v +} + +// GetLayouts returns the Layouts field value if set, zero value otherwise. +func (o *PersesDashboardSpec) GetLayouts() []PersesLayout { + if o == nil || o.Layouts == nil { + var ret []PersesLayout + return ret + } + return o.Layouts +} + +// GetLayoutsOk returns a tuple with the Layouts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesDashboardSpec) GetLayoutsOk() ([]PersesLayout, bool) { + if o == nil || o.Layouts == nil { + return nil, false + } + return o.Layouts, true +} + +// HasLayouts returns a boolean if a field has been set. +func (o *PersesDashboardSpec) HasLayouts() bool { + if o != nil && o.Layouts != nil { + return true + } + + return false +} + +// SetLayouts gets a reference to the given []PersesLayout and assigns it to the Layouts field. +func (o *PersesDashboardSpec) SetLayouts(v []PersesLayout) { + o.Layouts = v +} + +// GetPanels returns the Panels field value if set, zero value otherwise. +func (o *PersesDashboardSpec) GetPanels() map[string]PersesPanel { + if o == nil || o.Panels == nil { + var ret map[string]PersesPanel + return ret + } + return *o.Panels +} + +// GetPanelsOk returns a tuple with the Panels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesDashboardSpec) GetPanelsOk() (*map[string]PersesPanel, bool) { + if o == nil || o.Panels == nil { + return nil, false + } + return o.Panels, true +} + +// HasPanels returns a boolean if a field has been set. +func (o *PersesDashboardSpec) HasPanels() bool { + if o != nil && o.Panels != nil { + return true + } + + return false +} + +// SetPanels gets a reference to the given map[string]PersesPanel and assigns it to the Panels field. +func (o *PersesDashboardSpec) SetPanels(v map[string]PersesPanel) { + o.Panels = &v +} + +// GetRefreshInterval returns the RefreshInterval field value if set, zero value otherwise. +func (o *PersesDashboardSpec) GetRefreshInterval() string { + if o == nil || o.RefreshInterval == nil { + var ret string + return ret + } + return *o.RefreshInterval +} + +// GetRefreshIntervalOk returns a tuple with the RefreshInterval field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesDashboardSpec) GetRefreshIntervalOk() (*string, bool) { + if o == nil || o.RefreshInterval == nil { + return nil, false + } + return o.RefreshInterval, true +} + +// HasRefreshInterval returns a boolean if a field has been set. +func (o *PersesDashboardSpec) HasRefreshInterval() bool { + if o != nil && o.RefreshInterval != nil { + return true + } + + return false +} + +// SetRefreshInterval gets a reference to the given string and assigns it to the RefreshInterval field. +func (o *PersesDashboardSpec) SetRefreshInterval(v string) { + o.RefreshInterval = &v +} + +// GetVariables returns the Variables field value if set, zero value otherwise. +func (o *PersesDashboardSpec) GetVariables() []PersesVariableTypes { + if o == nil || o.Variables == nil { + var ret []PersesVariableTypes + return ret + } + return o.Variables +} + +// GetVariablesOk returns a tuple with the Variables field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesDashboardSpec) GetVariablesOk() ([]PersesVariableTypes, bool) { + if o == nil || o.Variables == nil { + return nil, false + } + return o.Variables, true +} + +// HasVariables returns a boolean if a field has been set. +func (o *PersesDashboardSpec) HasVariables() bool { + if o != nil && o.Variables != nil { + return true + } + + return false +} + +// SetVariables gets a reference to the given []PersesVariableTypes and assigns it to the Variables field. +func (o *PersesDashboardSpec) SetVariables(v []PersesVariableTypes) { + o.Variables = v +} + +func (o PersesDashboardSpec) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Datasources != nil { + toSerialize["datasources"] = o.Datasources + } + if o.Display != nil { + toSerialize["display"] = o.Display + } + if o.Duration != nil { + toSerialize["duration"] = o.Duration + } + if o.Layouts != nil { + toSerialize["layouts"] = o.Layouts + } + if o.Panels != nil { + toSerialize["panels"] = o.Panels + } + if o.RefreshInterval != nil { + toSerialize["refreshInterval"] = o.RefreshInterval + } + if o.Variables != nil { + toSerialize["variables"] = o.Variables + } + return json.Marshal(toSerialize) +} + +type NullablePersesDashboardSpec struct { + value *PersesDashboardSpec + isSet bool +} + +func (v NullablePersesDashboardSpec) Get() *PersesDashboardSpec { + return v.value +} + +func (v *NullablePersesDashboardSpec) Set(val *PersesDashboardSpec) { + v.value = val + v.isSet = true +} + +func (v NullablePersesDashboardSpec) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesDashboardSpec) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesDashboardSpec(val *PersesDashboardSpec) *NullablePersesDashboardSpec { + return &NullablePersesDashboardSpec{value: val, isSet: true} +} + +func (v NullablePersesDashboardSpec) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesDashboardSpec) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_datasource_spec.go b/generated/stackstate_api/model_perses_datasource_spec.go new file mode 100644 index 00000000..ab7878ed --- /dev/null +++ b/generated/stackstate_api/model_perses_datasource_spec.go @@ -0,0 +1,186 @@ +/* +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" +) + +// PersesDatasourceSpec struct for PersesDatasourceSpec +type PersesDatasourceSpec struct { + Default *bool `json:"default,omitempty"` + Display *PersesDashboardDisplaySpec `json:"display,omitempty"` + Plugin *PersesPlugin `json:"plugin,omitempty"` +} + +// NewPersesDatasourceSpec instantiates a new PersesDatasourceSpec 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 NewPersesDatasourceSpec() *PersesDatasourceSpec { + this := PersesDatasourceSpec{} + return &this +} + +// NewPersesDatasourceSpecWithDefaults instantiates a new PersesDatasourceSpec 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 NewPersesDatasourceSpecWithDefaults() *PersesDatasourceSpec { + this := PersesDatasourceSpec{} + return &this +} + +// GetDefault returns the Default field value if set, zero value otherwise. +func (o *PersesDatasourceSpec) GetDefault() bool { + if o == nil || o.Default == nil { + var ret bool + return ret + } + return *o.Default +} + +// GetDefaultOk returns a tuple with the Default field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesDatasourceSpec) GetDefaultOk() (*bool, bool) { + if o == nil || o.Default == nil { + return nil, false + } + return o.Default, true +} + +// HasDefault returns a boolean if a field has been set. +func (o *PersesDatasourceSpec) HasDefault() bool { + if o != nil && o.Default != nil { + return true + } + + return false +} + +// SetDefault gets a reference to the given bool and assigns it to the Default field. +func (o *PersesDatasourceSpec) SetDefault(v bool) { + o.Default = &v +} + +// GetDisplay returns the Display field value if set, zero value otherwise. +func (o *PersesDatasourceSpec) GetDisplay() PersesDashboardDisplaySpec { + if o == nil || o.Display == nil { + var ret PersesDashboardDisplaySpec + return ret + } + return *o.Display +} + +// GetDisplayOk returns a tuple with the Display field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesDatasourceSpec) GetDisplayOk() (*PersesDashboardDisplaySpec, bool) { + if o == nil || o.Display == nil { + return nil, false + } + return o.Display, true +} + +// HasDisplay returns a boolean if a field has been set. +func (o *PersesDatasourceSpec) HasDisplay() bool { + if o != nil && o.Display != nil { + return true + } + + return false +} + +// SetDisplay gets a reference to the given PersesDashboardDisplaySpec and assigns it to the Display field. +func (o *PersesDatasourceSpec) SetDisplay(v PersesDashboardDisplaySpec) { + o.Display = &v +} + +// GetPlugin returns the Plugin field value if set, zero value otherwise. +func (o *PersesDatasourceSpec) GetPlugin() PersesPlugin { + if o == nil || o.Plugin == nil { + var ret PersesPlugin + return ret + } + return *o.Plugin +} + +// GetPluginOk returns a tuple with the Plugin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesDatasourceSpec) GetPluginOk() (*PersesPlugin, bool) { + if o == nil || o.Plugin == nil { + return nil, false + } + return o.Plugin, true +} + +// HasPlugin returns a boolean if a field has been set. +func (o *PersesDatasourceSpec) HasPlugin() bool { + if o != nil && o.Plugin != nil { + return true + } + + return false +} + +// SetPlugin gets a reference to the given PersesPlugin and assigns it to the Plugin field. +func (o *PersesDatasourceSpec) SetPlugin(v PersesPlugin) { + o.Plugin = &v +} + +func (o PersesDatasourceSpec) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Default != nil { + toSerialize["default"] = o.Default + } + if o.Display != nil { + toSerialize["display"] = o.Display + } + if o.Plugin != nil { + toSerialize["plugin"] = o.Plugin + } + return json.Marshal(toSerialize) +} + +type NullablePersesDatasourceSpec struct { + value *PersesDatasourceSpec + isSet bool +} + +func (v NullablePersesDatasourceSpec) Get() *PersesDatasourceSpec { + return v.value +} + +func (v *NullablePersesDatasourceSpec) Set(val *PersesDatasourceSpec) { + v.value = val + v.isSet = true +} + +func (v NullablePersesDatasourceSpec) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesDatasourceSpec) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesDatasourceSpec(val *PersesDatasourceSpec) *NullablePersesDatasourceSpec { + return &NullablePersesDatasourceSpec{value: val, isSet: true} +} + +func (v NullablePersesDatasourceSpec) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesDatasourceSpec) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_grid_item.go b/generated/stackstate_api/model_perses_grid_item.go new file mode 100644 index 00000000..ae9fd06f --- /dev/null +++ b/generated/stackstate_api/model_perses_grid_item.go @@ -0,0 +1,227 @@ +/* +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" +) + +// PersesGridItem struct for PersesGridItem +type PersesGridItem struct { + // The x-coordinate of the item in the grid. + X int32 `json:"x"` + // The y-coordinate of the item in the grid. + Y int32 `json:"y"` + // The width of the item in the grid. + Width int32 `json:"width"` + // The height of the item in the grid. + Height int32 `json:"height"` + Content PersesJSONRef `json:"content"` +} + +// NewPersesGridItem instantiates a new PersesGridItem 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 NewPersesGridItem(x int32, y int32, width int32, height int32, content PersesJSONRef) *PersesGridItem { + this := PersesGridItem{} + this.X = x + this.Y = y + this.Width = width + this.Height = height + this.Content = content + return &this +} + +// NewPersesGridItemWithDefaults instantiates a new PersesGridItem 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 NewPersesGridItemWithDefaults() *PersesGridItem { + this := PersesGridItem{} + return &this +} + +// GetX returns the X field value +func (o *PersesGridItem) GetX() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.X +} + +// GetXOk returns a tuple with the X field value +// and a boolean to check if the value has been set. +func (o *PersesGridItem) GetXOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.X, true +} + +// SetX sets field value +func (o *PersesGridItem) SetX(v int32) { + o.X = v +} + +// GetY returns the Y field value +func (o *PersesGridItem) GetY() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Y +} + +// GetYOk returns a tuple with the Y field value +// and a boolean to check if the value has been set. +func (o *PersesGridItem) GetYOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Y, true +} + +// SetY sets field value +func (o *PersesGridItem) SetY(v int32) { + o.Y = v +} + +// GetWidth returns the Width field value +func (o *PersesGridItem) GetWidth() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Width +} + +// GetWidthOk returns a tuple with the Width field value +// and a boolean to check if the value has been set. +func (o *PersesGridItem) GetWidthOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Width, true +} + +// SetWidth sets field value +func (o *PersesGridItem) SetWidth(v int32) { + o.Width = v +} + +// GetHeight returns the Height field value +func (o *PersesGridItem) GetHeight() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Height +} + +// GetHeightOk returns a tuple with the Height field value +// and a boolean to check if the value has been set. +func (o *PersesGridItem) GetHeightOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Height, true +} + +// SetHeight sets field value +func (o *PersesGridItem) SetHeight(v int32) { + o.Height = v +} + +// GetContent returns the Content field value +func (o *PersesGridItem) GetContent() PersesJSONRef { + if o == nil { + var ret PersesJSONRef + return ret + } + + return o.Content +} + +// GetContentOk returns a tuple with the Content field value +// and a boolean to check if the value has been set. +func (o *PersesGridItem) GetContentOk() (*PersesJSONRef, bool) { + if o == nil { + return nil, false + } + return &o.Content, true +} + +// SetContent sets field value +func (o *PersesGridItem) SetContent(v PersesJSONRef) { + o.Content = v +} + +func (o PersesGridItem) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["x"] = o.X + } + if true { + toSerialize["y"] = o.Y + } + if true { + toSerialize["width"] = o.Width + } + if true { + toSerialize["height"] = o.Height + } + if true { + toSerialize["content"] = o.Content + } + return json.Marshal(toSerialize) +} + +type NullablePersesGridItem struct { + value *PersesGridItem + isSet bool +} + +func (v NullablePersesGridItem) Get() *PersesGridItem { + return v.value +} + +func (v *NullablePersesGridItem) Set(val *PersesGridItem) { + v.value = val + v.isSet = true +} + +func (v NullablePersesGridItem) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesGridItem) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesGridItem(val *PersesGridItem) *NullablePersesGridItem { + return &NullablePersesGridItem{value: val, isSet: true} +} + +func (v NullablePersesGridItem) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesGridItem) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_grid_layout_collapse.go b/generated/stackstate_api/model_perses_grid_layout_collapse.go new file mode 100644 index 00000000..632beaec --- /dev/null +++ b/generated/stackstate_api/model_perses_grid_layout_collapse.go @@ -0,0 +1,108 @@ +/* +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" +) + +// PersesGridLayoutCollapse struct for PersesGridLayoutCollapse +type PersesGridLayoutCollapse struct { + // Indicates whether the grid layout is collapsed. + Open bool `json:"open"` +} + +// NewPersesGridLayoutCollapse instantiates a new PersesGridLayoutCollapse 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 NewPersesGridLayoutCollapse(open bool) *PersesGridLayoutCollapse { + this := PersesGridLayoutCollapse{} + this.Open = open + return &this +} + +// NewPersesGridLayoutCollapseWithDefaults instantiates a new PersesGridLayoutCollapse 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 NewPersesGridLayoutCollapseWithDefaults() *PersesGridLayoutCollapse { + this := PersesGridLayoutCollapse{} + return &this +} + +// GetOpen returns the Open field value +func (o *PersesGridLayoutCollapse) GetOpen() bool { + if o == nil { + var ret bool + return ret + } + + return o.Open +} + +// GetOpenOk returns a tuple with the Open field value +// and a boolean to check if the value has been set. +func (o *PersesGridLayoutCollapse) GetOpenOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Open, true +} + +// SetOpen sets field value +func (o *PersesGridLayoutCollapse) SetOpen(v bool) { + o.Open = v +} + +func (o PersesGridLayoutCollapse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["open"] = o.Open + } + return json.Marshal(toSerialize) +} + +type NullablePersesGridLayoutCollapse struct { + value *PersesGridLayoutCollapse + isSet bool +} + +func (v NullablePersesGridLayoutCollapse) Get() *PersesGridLayoutCollapse { + return v.value +} + +func (v *NullablePersesGridLayoutCollapse) Set(val *PersesGridLayoutCollapse) { + v.value = val + v.isSet = true +} + +func (v NullablePersesGridLayoutCollapse) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesGridLayoutCollapse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesGridLayoutCollapse(val *PersesGridLayoutCollapse) *NullablePersesGridLayoutCollapse { + return &NullablePersesGridLayoutCollapse{value: val, isSet: true} +} + +func (v NullablePersesGridLayoutCollapse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesGridLayoutCollapse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_grid_layout_display.go b/generated/stackstate_api/model_perses_grid_layout_display.go new file mode 100644 index 00000000..7aff85f7 --- /dev/null +++ b/generated/stackstate_api/model_perses_grid_layout_display.go @@ -0,0 +1,144 @@ +/* +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" +) + +// PersesGridLayoutDisplay struct for PersesGridLayoutDisplay +type PersesGridLayoutDisplay struct { + // The title of the grid layout. + Title string `json:"title"` + Collapse *PersesGridLayoutCollapse `json:"collapse,omitempty"` +} + +// NewPersesGridLayoutDisplay instantiates a new PersesGridLayoutDisplay 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 NewPersesGridLayoutDisplay(title string) *PersesGridLayoutDisplay { + this := PersesGridLayoutDisplay{} + this.Title = title + return &this +} + +// NewPersesGridLayoutDisplayWithDefaults instantiates a new PersesGridLayoutDisplay 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 NewPersesGridLayoutDisplayWithDefaults() *PersesGridLayoutDisplay { + this := PersesGridLayoutDisplay{} + return &this +} + +// GetTitle returns the Title field value +func (o *PersesGridLayoutDisplay) 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 *PersesGridLayoutDisplay) GetTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *PersesGridLayoutDisplay) SetTitle(v string) { + o.Title = v +} + +// GetCollapse returns the Collapse field value if set, zero value otherwise. +func (o *PersesGridLayoutDisplay) GetCollapse() PersesGridLayoutCollapse { + if o == nil || o.Collapse == nil { + var ret PersesGridLayoutCollapse + return ret + } + return *o.Collapse +} + +// GetCollapseOk returns a tuple with the Collapse field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesGridLayoutDisplay) GetCollapseOk() (*PersesGridLayoutCollapse, bool) { + if o == nil || o.Collapse == nil { + return nil, false + } + return o.Collapse, true +} + +// HasCollapse returns a boolean if a field has been set. +func (o *PersesGridLayoutDisplay) HasCollapse() bool { + if o != nil && o.Collapse != nil { + return true + } + + return false +} + +// SetCollapse gets a reference to the given PersesGridLayoutCollapse and assigns it to the Collapse field. +func (o *PersesGridLayoutDisplay) SetCollapse(v PersesGridLayoutCollapse) { + o.Collapse = &v +} + +func (o PersesGridLayoutDisplay) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["title"] = o.Title + } + if o.Collapse != nil { + toSerialize["collapse"] = o.Collapse + } + return json.Marshal(toSerialize) +} + +type NullablePersesGridLayoutDisplay struct { + value *PersesGridLayoutDisplay + isSet bool +} + +func (v NullablePersesGridLayoutDisplay) Get() *PersesGridLayoutDisplay { + return v.value +} + +func (v *NullablePersesGridLayoutDisplay) Set(val *PersesGridLayoutDisplay) { + v.value = val + v.isSet = true +} + +func (v NullablePersesGridLayoutDisplay) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesGridLayoutDisplay) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesGridLayoutDisplay(val *PersesGridLayoutDisplay) *NullablePersesGridLayoutDisplay { + return &NullablePersesGridLayoutDisplay{value: val, isSet: true} +} + +func (v NullablePersesGridLayoutDisplay) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesGridLayoutDisplay) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_json_ref.go b/generated/stackstate_api/model_perses_json_ref.go new file mode 100644 index 00000000..36aa4c97 --- /dev/null +++ b/generated/stackstate_api/model_perses_json_ref.go @@ -0,0 +1,108 @@ +/* +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" +) + +// PersesJSONRef struct for PersesJSONRef +type PersesJSONRef struct { + // The JSON reference pointing to the actual object. The property name '$ref' contains a reserved char, which gets stripped away when generated (it's possible to handle this but makes the generation code more complex). For now, consumers of this spec will need to omit the '$' in the property name. + Ref string `json:"$ref"` +} + +// NewPersesJSONRef instantiates a new PersesJSONRef 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 NewPersesJSONRef(ref string) *PersesJSONRef { + this := PersesJSONRef{} + this.Ref = ref + return &this +} + +// NewPersesJSONRefWithDefaults instantiates a new PersesJSONRef 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 NewPersesJSONRefWithDefaults() *PersesJSONRef { + this := PersesJSONRef{} + return &this +} + +// GetRef returns the Ref field value +func (o *PersesJSONRef) GetRef() string { + if o == nil { + var ret string + return ret + } + + return o.Ref +} + +// GetRefOk returns a tuple with the Ref field value +// and a boolean to check if the value has been set. +func (o *PersesJSONRef) GetRefOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Ref, true +} + +// SetRef sets field value +func (o *PersesJSONRef) SetRef(v string) { + o.Ref = v +} + +func (o PersesJSONRef) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["$ref"] = o.Ref + } + return json.Marshal(toSerialize) +} + +type NullablePersesJSONRef struct { + value *PersesJSONRef + isSet bool +} + +func (v NullablePersesJSONRef) Get() *PersesJSONRef { + return v.value +} + +func (v *NullablePersesJSONRef) Set(val *PersesJSONRef) { + v.value = val + v.isSet = true +} + +func (v NullablePersesJSONRef) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesJSONRef) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesJSONRef(val *PersesJSONRef) *NullablePersesJSONRef { + return &NullablePersesJSONRef{value: val, isSet: true} +} + +func (v NullablePersesJSONRef) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesJSONRef) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_layout.go b/generated/stackstate_api/model_perses_layout.go new file mode 100644 index 00000000..29decc07 --- /dev/null +++ b/generated/stackstate_api/model_perses_layout.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" +) + +// PersesLayout struct for PersesLayout +type PersesLayout struct { + Kind PersesLayoutKind `json:"kind"` + Spec PersesLayoutSpec `json:"spec"` +} + +// NewPersesLayout instantiates a new PersesLayout 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 NewPersesLayout(kind PersesLayoutKind, spec PersesLayoutSpec) *PersesLayout { + this := PersesLayout{} + this.Kind = kind + this.Spec = spec + return &this +} + +// NewPersesLayoutWithDefaults instantiates a new PersesLayout 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 NewPersesLayoutWithDefaults() *PersesLayout { + this := PersesLayout{} + return &this +} + +// GetKind returns the Kind field value +func (o *PersesLayout) GetKind() PersesLayoutKind { + if o == nil { + var ret PersesLayoutKind + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *PersesLayout) GetKindOk() (*PersesLayoutKind, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *PersesLayout) SetKind(v PersesLayoutKind) { + o.Kind = v +} + +// GetSpec returns the Spec field value +func (o *PersesLayout) GetSpec() PersesLayoutSpec { + if o == nil { + var ret PersesLayoutSpec + return ret + } + + return o.Spec +} + +// GetSpecOk returns a tuple with the Spec field value +// and a boolean to check if the value has been set. +func (o *PersesLayout) GetSpecOk() (*PersesLayoutSpec, bool) { + if o == nil { + return nil, false + } + return &o.Spec, true +} + +// SetSpec sets field value +func (o *PersesLayout) SetSpec(v PersesLayoutSpec) { + o.Spec = v +} + +func (o PersesLayout) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if true { + toSerialize["spec"] = o.Spec + } + return json.Marshal(toSerialize) +} + +type NullablePersesLayout struct { + value *PersesLayout + isSet bool +} + +func (v NullablePersesLayout) Get() *PersesLayout { + return v.value +} + +func (v *NullablePersesLayout) Set(val *PersesLayout) { + v.value = val + v.isSet = true +} + +func (v NullablePersesLayout) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesLayout) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesLayout(val *PersesLayout) *NullablePersesLayout { + return &NullablePersesLayout{value: val, isSet: true} +} + +func (v NullablePersesLayout) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesLayout) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_layout_kind.go b/generated/stackstate_api/model_perses_layout_kind.go new file mode 100644 index 00000000..3ca516f3 --- /dev/null +++ b/generated/stackstate_api/model_perses_layout_kind.go @@ -0,0 +1,109 @@ +/* +StackState API + +This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). + +API version: 5.2.0 +Contact: info@stackstate.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackstate_api + +import ( + "encoding/json" + "fmt" +) + +// PersesLayoutKind Defines the layout type. Currently, only 'Grid' is supported. +type PersesLayoutKind string + +// List of PersesLayoutKind +const ( + PERSESLAYOUTKIND_GRID PersesLayoutKind = "Grid" +) + +// All allowed values of PersesLayoutKind enum +var AllowedPersesLayoutKindEnumValues = []PersesLayoutKind{ + "Grid", +} + +func (v *PersesLayoutKind) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := PersesLayoutKind(value) + for _, existing := range AllowedPersesLayoutKindEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid PersesLayoutKind", value) +} + +// NewPersesLayoutKindFromValue returns a pointer to a valid PersesLayoutKind +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewPersesLayoutKindFromValue(v string) (*PersesLayoutKind, error) { + ev := PersesLayoutKind(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for PersesLayoutKind: valid values are %v", v, AllowedPersesLayoutKindEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v PersesLayoutKind) IsValid() bool { + for _, existing := range AllowedPersesLayoutKindEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to PersesLayoutKind value +func (v PersesLayoutKind) Ptr() *PersesLayoutKind { + return &v +} + +type NullablePersesLayoutKind struct { + value *PersesLayoutKind + isSet bool +} + +func (v NullablePersesLayoutKind) Get() *PersesLayoutKind { + return v.value +} + +func (v *NullablePersesLayoutKind) Set(val *PersesLayoutKind) { + v.value = val + v.isSet = true +} + +func (v NullablePersesLayoutKind) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesLayoutKind) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesLayoutKind(val *PersesLayoutKind) *NullablePersesLayoutKind { + return &NullablePersesLayoutKind{value: val, isSet: true} +} + +func (v NullablePersesLayoutKind) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesLayoutKind) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_layout_spec.go b/generated/stackstate_api/model_perses_layout_spec.go new file mode 100644 index 00000000..d3fa0f2d --- /dev/null +++ b/generated/stackstate_api/model_perses_layout_spec.go @@ -0,0 +1,143 @@ +/* +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" +) + +// PersesLayoutSpec struct for PersesLayoutSpec +type PersesLayoutSpec struct { + Display *PersesGridLayoutDisplay `json:"display,omitempty"` + Items []PersesGridItem `json:"items"` +} + +// NewPersesLayoutSpec instantiates a new PersesLayoutSpec 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 NewPersesLayoutSpec(items []PersesGridItem) *PersesLayoutSpec { + this := PersesLayoutSpec{} + this.Items = items + return &this +} + +// NewPersesLayoutSpecWithDefaults instantiates a new PersesLayoutSpec 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 NewPersesLayoutSpecWithDefaults() *PersesLayoutSpec { + this := PersesLayoutSpec{} + return &this +} + +// GetDisplay returns the Display field value if set, zero value otherwise. +func (o *PersesLayoutSpec) GetDisplay() PersesGridLayoutDisplay { + if o == nil || o.Display == nil { + var ret PersesGridLayoutDisplay + return ret + } + return *o.Display +} + +// GetDisplayOk returns a tuple with the Display field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesLayoutSpec) GetDisplayOk() (*PersesGridLayoutDisplay, bool) { + if o == nil || o.Display == nil { + return nil, false + } + return o.Display, true +} + +// HasDisplay returns a boolean if a field has been set. +func (o *PersesLayoutSpec) HasDisplay() bool { + if o != nil && o.Display != nil { + return true + } + + return false +} + +// SetDisplay gets a reference to the given PersesGridLayoutDisplay and assigns it to the Display field. +func (o *PersesLayoutSpec) SetDisplay(v PersesGridLayoutDisplay) { + o.Display = &v +} + +// GetItems returns the Items field value +func (o *PersesLayoutSpec) GetItems() []PersesGridItem { + if o == nil { + var ret []PersesGridItem + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *PersesLayoutSpec) GetItemsOk() ([]PersesGridItem, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *PersesLayoutSpec) SetItems(v []PersesGridItem) { + o.Items = v +} + +func (o PersesLayoutSpec) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Display != nil { + toSerialize["display"] = o.Display + } + if true { + toSerialize["items"] = o.Items + } + return json.Marshal(toSerialize) +} + +type NullablePersesLayoutSpec struct { + value *PersesLayoutSpec + isSet bool +} + +func (v NullablePersesLayoutSpec) Get() *PersesLayoutSpec { + return v.value +} + +func (v *NullablePersesLayoutSpec) Set(val *PersesLayoutSpec) { + v.value = val + v.isSet = true +} + +func (v NullablePersesLayoutSpec) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesLayoutSpec) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesLayoutSpec(val *PersesLayoutSpec) *NullablePersesLayoutSpec { + return &NullablePersesLayoutSpec{value: val, isSet: true} +} + +func (v NullablePersesLayoutSpec) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesLayoutSpec) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_link.go b/generated/stackstate_api/model_perses_link.go new file mode 100644 index 00000000..d90b306e --- /dev/null +++ b/generated/stackstate_api/model_perses_link.go @@ -0,0 +1,258 @@ +/* +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" +) + +// PersesLink struct for PersesLink +type PersesLink struct { + Name *string `json:"name,omitempty"` + RenderVariables *bool `json:"renderVariables,omitempty"` + TargetBlank *bool `json:"targetBlank,omitempty"` + Tooltip *string `json:"tooltip,omitempty"` + Url *string `json:"url,omitempty"` +} + +// NewPersesLink instantiates a new PersesLink 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 NewPersesLink() *PersesLink { + this := PersesLink{} + return &this +} + +// NewPersesLinkWithDefaults instantiates a new PersesLink 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 NewPersesLinkWithDefaults() *PersesLink { + this := PersesLink{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PersesLink) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesLink) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PersesLink) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PersesLink) SetName(v string) { + o.Name = &v +} + +// GetRenderVariables returns the RenderVariables field value if set, zero value otherwise. +func (o *PersesLink) GetRenderVariables() bool { + if o == nil || o.RenderVariables == nil { + var ret bool + return ret + } + return *o.RenderVariables +} + +// GetRenderVariablesOk returns a tuple with the RenderVariables field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesLink) GetRenderVariablesOk() (*bool, bool) { + if o == nil || o.RenderVariables == nil { + return nil, false + } + return o.RenderVariables, true +} + +// HasRenderVariables returns a boolean if a field has been set. +func (o *PersesLink) HasRenderVariables() bool { + if o != nil && o.RenderVariables != nil { + return true + } + + return false +} + +// SetRenderVariables gets a reference to the given bool and assigns it to the RenderVariables field. +func (o *PersesLink) SetRenderVariables(v bool) { + o.RenderVariables = &v +} + +// GetTargetBlank returns the TargetBlank field value if set, zero value otherwise. +func (o *PersesLink) GetTargetBlank() bool { + if o == nil || o.TargetBlank == nil { + var ret bool + return ret + } + return *o.TargetBlank +} + +// GetTargetBlankOk returns a tuple with the TargetBlank field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesLink) GetTargetBlankOk() (*bool, bool) { + if o == nil || o.TargetBlank == nil { + return nil, false + } + return o.TargetBlank, true +} + +// HasTargetBlank returns a boolean if a field has been set. +func (o *PersesLink) HasTargetBlank() bool { + if o != nil && o.TargetBlank != nil { + return true + } + + return false +} + +// SetTargetBlank gets a reference to the given bool and assigns it to the TargetBlank field. +func (o *PersesLink) SetTargetBlank(v bool) { + o.TargetBlank = &v +} + +// GetTooltip returns the Tooltip field value if set, zero value otherwise. +func (o *PersesLink) GetTooltip() string { + if o == nil || o.Tooltip == nil { + var ret string + return ret + } + return *o.Tooltip +} + +// GetTooltipOk returns a tuple with the Tooltip field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesLink) GetTooltipOk() (*string, bool) { + if o == nil || o.Tooltip == nil { + return nil, false + } + return o.Tooltip, true +} + +// HasTooltip returns a boolean if a field has been set. +func (o *PersesLink) HasTooltip() bool { + if o != nil && o.Tooltip != nil { + return true + } + + return false +} + +// SetTooltip gets a reference to the given string and assigns it to the Tooltip field. +func (o *PersesLink) SetTooltip(v string) { + o.Tooltip = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *PersesLink) GetUrl() string { + if o == nil || o.Url == nil { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesLink) GetUrlOk() (*string, bool) { + if o == nil || o.Url == nil { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *PersesLink) HasUrl() bool { + if o != nil && o.Url != nil { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *PersesLink) SetUrl(v string) { + o.Url = &v +} + +func (o PersesLink) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.RenderVariables != nil { + toSerialize["renderVariables"] = o.RenderVariables + } + if o.TargetBlank != nil { + toSerialize["targetBlank"] = o.TargetBlank + } + if o.Tooltip != nil { + toSerialize["tooltip"] = o.Tooltip + } + if o.Url != nil { + toSerialize["url"] = o.Url + } + return json.Marshal(toSerialize) +} + +type NullablePersesLink struct { + value *PersesLink + isSet bool +} + +func (v NullablePersesLink) Get() *PersesLink { + return v.value +} + +func (v *NullablePersesLink) Set(val *PersesLink) { + v.value = val + v.isSet = true +} + +func (v NullablePersesLink) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesLink) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesLink(val *PersesLink) *NullablePersesLink { + return &NullablePersesLink{value: val, isSet: true} +} + +func (v NullablePersesLink) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesLink) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_list_variable.go b/generated/stackstate_api/model_perses_list_variable.go new file mode 100644 index 00000000..c1792756 --- /dev/null +++ b/generated/stackstate_api/model_perses_list_variable.go @@ -0,0 +1,143 @@ +/* +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" +) + +// PersesListVariable struct for PersesListVariable +type PersesListVariable struct { + Kind string `json:"kind"` + Spec *PersesListVariableSpec `json:"spec,omitempty"` +} + +// NewPersesListVariable instantiates a new PersesListVariable 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 NewPersesListVariable(kind string) *PersesListVariable { + this := PersesListVariable{} + this.Kind = kind + return &this +} + +// NewPersesListVariableWithDefaults instantiates a new PersesListVariable 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 NewPersesListVariableWithDefaults() *PersesListVariable { + this := PersesListVariable{} + return &this +} + +// GetKind returns the Kind field value +func (o *PersesListVariable) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *PersesListVariable) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *PersesListVariable) SetKind(v string) { + o.Kind = v +} + +// GetSpec returns the Spec field value if set, zero value otherwise. +func (o *PersesListVariable) GetSpec() PersesListVariableSpec { + if o == nil || o.Spec == nil { + var ret PersesListVariableSpec + return ret + } + return *o.Spec +} + +// GetSpecOk returns a tuple with the Spec field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesListVariable) GetSpecOk() (*PersesListVariableSpec, bool) { + if o == nil || o.Spec == nil { + return nil, false + } + return o.Spec, true +} + +// HasSpec returns a boolean if a field has been set. +func (o *PersesListVariable) HasSpec() bool { + if o != nil && o.Spec != nil { + return true + } + + return false +} + +// SetSpec gets a reference to the given PersesListVariableSpec and assigns it to the Spec field. +func (o *PersesListVariable) SetSpec(v PersesListVariableSpec) { + o.Spec = &v +} + +func (o PersesListVariable) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if o.Spec != nil { + toSerialize["spec"] = o.Spec + } + return json.Marshal(toSerialize) +} + +type NullablePersesListVariable struct { + value *PersesListVariable + isSet bool +} + +func (v NullablePersesListVariable) Get() *PersesListVariable { + return v.value +} + +func (v *NullablePersesListVariable) Set(val *PersesListVariable) { + v.value = val + v.isSet = true +} + +func (v NullablePersesListVariable) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesListVariable) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesListVariable(val *PersesListVariable) *NullablePersesListVariable { + return &NullablePersesListVariable{value: val, isSet: true} +} + +func (v NullablePersesListVariable) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesListVariable) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_list_variable_default_single_value.go b/generated/stackstate_api/model_perses_list_variable_default_single_value.go new file mode 100644 index 00000000..a25cf099 --- /dev/null +++ b/generated/stackstate_api/model_perses_list_variable_default_single_value.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" +) + +// PersesListVariableDefaultSingleValue struct for PersesListVariableDefaultSingleValue +type PersesListVariableDefaultSingleValue struct { + Kind string `json:"kind"` + SingleValue string `json:"singleValue"` +} + +// NewPersesListVariableDefaultSingleValue instantiates a new PersesListVariableDefaultSingleValue 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 NewPersesListVariableDefaultSingleValue(kind string, singleValue string) *PersesListVariableDefaultSingleValue { + this := PersesListVariableDefaultSingleValue{} + this.Kind = kind + this.SingleValue = singleValue + return &this +} + +// NewPersesListVariableDefaultSingleValueWithDefaults instantiates a new PersesListVariableDefaultSingleValue 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 NewPersesListVariableDefaultSingleValueWithDefaults() *PersesListVariableDefaultSingleValue { + this := PersesListVariableDefaultSingleValue{} + return &this +} + +// GetKind returns the Kind field value +func (o *PersesListVariableDefaultSingleValue) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *PersesListVariableDefaultSingleValue) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *PersesListVariableDefaultSingleValue) SetKind(v string) { + o.Kind = v +} + +// GetSingleValue returns the SingleValue field value +func (o *PersesListVariableDefaultSingleValue) GetSingleValue() string { + if o == nil { + var ret string + return ret + } + + return o.SingleValue +} + +// GetSingleValueOk returns a tuple with the SingleValue field value +// and a boolean to check if the value has been set. +func (o *PersesListVariableDefaultSingleValue) GetSingleValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SingleValue, true +} + +// SetSingleValue sets field value +func (o *PersesListVariableDefaultSingleValue) SetSingleValue(v string) { + o.SingleValue = v +} + +func (o PersesListVariableDefaultSingleValue) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if true { + toSerialize["singleValue"] = o.SingleValue + } + return json.Marshal(toSerialize) +} + +type NullablePersesListVariableDefaultSingleValue struct { + value *PersesListVariableDefaultSingleValue + isSet bool +} + +func (v NullablePersesListVariableDefaultSingleValue) Get() *PersesListVariableDefaultSingleValue { + return v.value +} + +func (v *NullablePersesListVariableDefaultSingleValue) Set(val *PersesListVariableDefaultSingleValue) { + v.value = val + v.isSet = true +} + +func (v NullablePersesListVariableDefaultSingleValue) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesListVariableDefaultSingleValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesListVariableDefaultSingleValue(val *PersesListVariableDefaultSingleValue) *NullablePersesListVariableDefaultSingleValue { + return &NullablePersesListVariableDefaultSingleValue{value: val, isSet: true} +} + +func (v NullablePersesListVariableDefaultSingleValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesListVariableDefaultSingleValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_list_variable_default_slice_values.go b/generated/stackstate_api/model_perses_list_variable_default_slice_values.go new file mode 100644 index 00000000..2387624b --- /dev/null +++ b/generated/stackstate_api/model_perses_list_variable_default_slice_values.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" +) + +// PersesListVariableDefaultSliceValues struct for PersesListVariableDefaultSliceValues +type PersesListVariableDefaultSliceValues struct { + Kind string `json:"kind"` + SliceValues []string `json:"sliceValues"` +} + +// NewPersesListVariableDefaultSliceValues instantiates a new PersesListVariableDefaultSliceValues 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 NewPersesListVariableDefaultSliceValues(kind string, sliceValues []string) *PersesListVariableDefaultSliceValues { + this := PersesListVariableDefaultSliceValues{} + this.Kind = kind + this.SliceValues = sliceValues + return &this +} + +// NewPersesListVariableDefaultSliceValuesWithDefaults instantiates a new PersesListVariableDefaultSliceValues 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 NewPersesListVariableDefaultSliceValuesWithDefaults() *PersesListVariableDefaultSliceValues { + this := PersesListVariableDefaultSliceValues{} + return &this +} + +// GetKind returns the Kind field value +func (o *PersesListVariableDefaultSliceValues) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *PersesListVariableDefaultSliceValues) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *PersesListVariableDefaultSliceValues) SetKind(v string) { + o.Kind = v +} + +// GetSliceValues returns the SliceValues field value +func (o *PersesListVariableDefaultSliceValues) GetSliceValues() []string { + if o == nil { + var ret []string + return ret + } + + return o.SliceValues +} + +// GetSliceValuesOk returns a tuple with the SliceValues field value +// and a boolean to check if the value has been set. +func (o *PersesListVariableDefaultSliceValues) GetSliceValuesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.SliceValues, true +} + +// SetSliceValues sets field value +func (o *PersesListVariableDefaultSliceValues) SetSliceValues(v []string) { + o.SliceValues = v +} + +func (o PersesListVariableDefaultSliceValues) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if true { + toSerialize["sliceValues"] = o.SliceValues + } + return json.Marshal(toSerialize) +} + +type NullablePersesListVariableDefaultSliceValues struct { + value *PersesListVariableDefaultSliceValues + isSet bool +} + +func (v NullablePersesListVariableDefaultSliceValues) Get() *PersesListVariableDefaultSliceValues { + return v.value +} + +func (v *NullablePersesListVariableDefaultSliceValues) Set(val *PersesListVariableDefaultSliceValues) { + v.value = val + v.isSet = true +} + +func (v NullablePersesListVariableDefaultSliceValues) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesListVariableDefaultSliceValues) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesListVariableDefaultSliceValues(val *PersesListVariableDefaultSliceValues) *NullablePersesListVariableDefaultSliceValues { + return &NullablePersesListVariableDefaultSliceValues{value: val, isSet: true} +} + +func (v NullablePersesListVariableDefaultSliceValues) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesListVariableDefaultSliceValues) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_list_variable_default_value.go b/generated/stackstate_api/model_perses_list_variable_default_value.go new file mode 100644 index 00000000..5ced52ee --- /dev/null +++ b/generated/stackstate_api/model_perses_list_variable_default_value.go @@ -0,0 +1,164 @@ +/* +StackState API + +This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). + +API version: 5.2.0 +Contact: info@stackstate.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackstate_api + +import ( + "encoding/json" + "fmt" +) + +// PersesListVariableDefaultValue - struct for PersesListVariableDefaultValue +type PersesListVariableDefaultValue struct { + PersesListVariableDefaultSingleValue *PersesListVariableDefaultSingleValue + PersesListVariableDefaultSliceValues *PersesListVariableDefaultSliceValues +} + +// PersesListVariableDefaultSingleValueAsPersesListVariableDefaultValue is a convenience function that returns PersesListVariableDefaultSingleValue wrapped in PersesListVariableDefaultValue +func PersesListVariableDefaultSingleValueAsPersesListVariableDefaultValue(v *PersesListVariableDefaultSingleValue) PersesListVariableDefaultValue { + return PersesListVariableDefaultValue{ + PersesListVariableDefaultSingleValue: v, + } +} + +// PersesListVariableDefaultSliceValuesAsPersesListVariableDefaultValue is a convenience function that returns PersesListVariableDefaultSliceValues wrapped in PersesListVariableDefaultValue +func PersesListVariableDefaultSliceValuesAsPersesListVariableDefaultValue(v *PersesListVariableDefaultSliceValues) PersesListVariableDefaultValue { + return PersesListVariableDefaultValue{ + PersesListVariableDefaultSliceValues: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *PersesListVariableDefaultValue) UnmarshalJSON(data []byte) error { + var err error + // use discriminator value to speed up the lookup + var jsonDict map[string]interface{} + err = newStrictDecoder(data).Decode(&jsonDict) + if err != nil { + return fmt.Errorf("Failed to unmarshal JSON into map for the discriminator lookup.") + } + + // check if the discriminator value is 'PersesListVariableDefaultSingleValue' + if jsonDict["kind"] == "PersesListVariableDefaultSingleValue" { + // try to unmarshal JSON data into PersesListVariableDefaultSingleValue + err = json.Unmarshal(data, &dst.PersesListVariableDefaultSingleValue) + if err == nil { + return nil // data stored in dst.PersesListVariableDefaultSingleValue, return on the first match + } else { + dst.PersesListVariableDefaultSingleValue = nil + return fmt.Errorf("Failed to unmarshal PersesListVariableDefaultValue as PersesListVariableDefaultSingleValue: %s", err.Error()) + } + } + + // check if the discriminator value is 'PersesListVariableDefaultSliceValues' + if jsonDict["kind"] == "PersesListVariableDefaultSliceValues" { + // try to unmarshal JSON data into PersesListVariableDefaultSliceValues + err = json.Unmarshal(data, &dst.PersesListVariableDefaultSliceValues) + if err == nil { + return nil // data stored in dst.PersesListVariableDefaultSliceValues, return on the first match + } else { + dst.PersesListVariableDefaultSliceValues = nil + return fmt.Errorf("Failed to unmarshal PersesListVariableDefaultValue as PersesListVariableDefaultSliceValues: %s", err.Error()) + } + } + + // check if the discriminator value is 'singleValue' + if jsonDict["kind"] == "singleValue" { + // try to unmarshal JSON data into PersesListVariableDefaultSingleValue + err = json.Unmarshal(data, &dst.PersesListVariableDefaultSingleValue) + if err == nil { + return nil // data stored in dst.PersesListVariableDefaultSingleValue, return on the first match + } else { + dst.PersesListVariableDefaultSingleValue = nil + return fmt.Errorf("Failed to unmarshal PersesListVariableDefaultValue as PersesListVariableDefaultSingleValue: %s", err.Error()) + } + } + + // check if the discriminator value is 'sliceValues' + if jsonDict["kind"] == "sliceValues" { + // try to unmarshal JSON data into PersesListVariableDefaultSliceValues + err = json.Unmarshal(data, &dst.PersesListVariableDefaultSliceValues) + if err == nil { + return nil // data stored in dst.PersesListVariableDefaultSliceValues, return on the first match + } else { + dst.PersesListVariableDefaultSliceValues = nil + return fmt.Errorf("Failed to unmarshal PersesListVariableDefaultValue as PersesListVariableDefaultSliceValues: %s", err.Error()) + } + } + + return nil +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src PersesListVariableDefaultValue) MarshalJSON() ([]byte, error) { + if src.PersesListVariableDefaultSingleValue != nil { + return json.Marshal(&src.PersesListVariableDefaultSingleValue) + } + + if src.PersesListVariableDefaultSliceValues != nil { + return json.Marshal(&src.PersesListVariableDefaultSliceValues) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *PersesListVariableDefaultValue) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.PersesListVariableDefaultSingleValue != nil { + return obj.PersesListVariableDefaultSingleValue + } + + if obj.PersesListVariableDefaultSliceValues != nil { + return obj.PersesListVariableDefaultSliceValues + } + + // all schemas are nil + return nil +} + +type NullablePersesListVariableDefaultValue struct { + value *PersesListVariableDefaultValue + isSet bool +} + +func (v NullablePersesListVariableDefaultValue) Get() *PersesListVariableDefaultValue { + return v.value +} + +func (v *NullablePersesListVariableDefaultValue) Set(val *PersesListVariableDefaultValue) { + v.value = val + v.isSet = true +} + +func (v NullablePersesListVariableDefaultValue) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesListVariableDefaultValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesListVariableDefaultValue(val *PersesListVariableDefaultValue) *NullablePersesListVariableDefaultValue { + return &NullablePersesListVariableDefaultValue{value: val, isSet: true} +} + +func (v NullablePersesListVariableDefaultValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesListVariableDefaultValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_list_variable_spec.go b/generated/stackstate_api/model_perses_list_variable_spec.go new file mode 100644 index 00000000..215b4494 --- /dev/null +++ b/generated/stackstate_api/model_perses_list_variable_spec.go @@ -0,0 +1,374 @@ +/* +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" +) + +// PersesListVariableSpec struct for PersesListVariableSpec +type PersesListVariableSpec struct { + Name string `json:"name"` + Display *PersesVariableDisplaySpec `json:"display,omitempty"` + DefaultValue *PersesListVariableDefaultValue `json:"defaultValue,omitempty"` + AllowAllValue bool `json:"allowAllValue"` + AllowMultiple bool `json:"allowMultiple"` + CustomAllValue *string `json:"customAllValue,omitempty"` + CapturingRegexp *string `json:"capturingRegexp,omitempty"` + Sort *PersesVariableSort `json:"sort,omitempty"` + Plugin PersesPlugin `json:"plugin"` +} + +// NewPersesListVariableSpec instantiates a new PersesListVariableSpec 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 NewPersesListVariableSpec(name string, allowAllValue bool, allowMultiple bool, plugin PersesPlugin) *PersesListVariableSpec { + this := PersesListVariableSpec{} + this.Name = name + this.AllowAllValue = allowAllValue + this.AllowMultiple = allowMultiple + this.Plugin = plugin + return &this +} + +// NewPersesListVariableSpecWithDefaults instantiates a new PersesListVariableSpec 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 NewPersesListVariableSpecWithDefaults() *PersesListVariableSpec { + this := PersesListVariableSpec{} + return &this +} + +// GetName returns the Name field value +func (o *PersesListVariableSpec) 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 *PersesListVariableSpec) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PersesListVariableSpec) SetName(v string) { + o.Name = v +} + +// GetDisplay returns the Display field value if set, zero value otherwise. +func (o *PersesListVariableSpec) GetDisplay() PersesVariableDisplaySpec { + if o == nil || o.Display == nil { + var ret PersesVariableDisplaySpec + return ret + } + return *o.Display +} + +// GetDisplayOk returns a tuple with the Display field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesListVariableSpec) GetDisplayOk() (*PersesVariableDisplaySpec, bool) { + if o == nil || o.Display == nil { + return nil, false + } + return o.Display, true +} + +// HasDisplay returns a boolean if a field has been set. +func (o *PersesListVariableSpec) HasDisplay() bool { + if o != nil && o.Display != nil { + return true + } + + return false +} + +// SetDisplay gets a reference to the given PersesVariableDisplaySpec and assigns it to the Display field. +func (o *PersesListVariableSpec) SetDisplay(v PersesVariableDisplaySpec) { + o.Display = &v +} + +// GetDefaultValue returns the DefaultValue field value if set, zero value otherwise. +func (o *PersesListVariableSpec) GetDefaultValue() PersesListVariableDefaultValue { + if o == nil || o.DefaultValue == nil { + var ret PersesListVariableDefaultValue + return ret + } + return *o.DefaultValue +} + +// GetDefaultValueOk returns a tuple with the DefaultValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesListVariableSpec) GetDefaultValueOk() (*PersesListVariableDefaultValue, bool) { + if o == nil || o.DefaultValue == nil { + return nil, false + } + return o.DefaultValue, true +} + +// HasDefaultValue returns a boolean if a field has been set. +func (o *PersesListVariableSpec) HasDefaultValue() bool { + if o != nil && o.DefaultValue != nil { + return true + } + + return false +} + +// SetDefaultValue gets a reference to the given PersesListVariableDefaultValue and assigns it to the DefaultValue field. +func (o *PersesListVariableSpec) SetDefaultValue(v PersesListVariableDefaultValue) { + o.DefaultValue = &v +} + +// GetAllowAllValue returns the AllowAllValue field value +func (o *PersesListVariableSpec) GetAllowAllValue() bool { + if o == nil { + var ret bool + return ret + } + + return o.AllowAllValue +} + +// GetAllowAllValueOk returns a tuple with the AllowAllValue field value +// and a boolean to check if the value has been set. +func (o *PersesListVariableSpec) GetAllowAllValueOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.AllowAllValue, true +} + +// SetAllowAllValue sets field value +func (o *PersesListVariableSpec) SetAllowAllValue(v bool) { + o.AllowAllValue = v +} + +// GetAllowMultiple returns the AllowMultiple field value +func (o *PersesListVariableSpec) GetAllowMultiple() bool { + if o == nil { + var ret bool + return ret + } + + return o.AllowMultiple +} + +// GetAllowMultipleOk returns a tuple with the AllowMultiple field value +// and a boolean to check if the value has been set. +func (o *PersesListVariableSpec) GetAllowMultipleOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.AllowMultiple, true +} + +// SetAllowMultiple sets field value +func (o *PersesListVariableSpec) SetAllowMultiple(v bool) { + o.AllowMultiple = v +} + +// GetCustomAllValue returns the CustomAllValue field value if set, zero value otherwise. +func (o *PersesListVariableSpec) GetCustomAllValue() string { + if o == nil || o.CustomAllValue == nil { + var ret string + return ret + } + return *o.CustomAllValue +} + +// GetCustomAllValueOk returns a tuple with the CustomAllValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesListVariableSpec) GetCustomAllValueOk() (*string, bool) { + if o == nil || o.CustomAllValue == nil { + return nil, false + } + return o.CustomAllValue, true +} + +// HasCustomAllValue returns a boolean if a field has been set. +func (o *PersesListVariableSpec) HasCustomAllValue() bool { + if o != nil && o.CustomAllValue != nil { + return true + } + + return false +} + +// SetCustomAllValue gets a reference to the given string and assigns it to the CustomAllValue field. +func (o *PersesListVariableSpec) SetCustomAllValue(v string) { + o.CustomAllValue = &v +} + +// GetCapturingRegexp returns the CapturingRegexp field value if set, zero value otherwise. +func (o *PersesListVariableSpec) GetCapturingRegexp() string { + if o == nil || o.CapturingRegexp == nil { + var ret string + return ret + } + return *o.CapturingRegexp +} + +// GetCapturingRegexpOk returns a tuple with the CapturingRegexp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesListVariableSpec) GetCapturingRegexpOk() (*string, bool) { + if o == nil || o.CapturingRegexp == nil { + return nil, false + } + return o.CapturingRegexp, true +} + +// HasCapturingRegexp returns a boolean if a field has been set. +func (o *PersesListVariableSpec) HasCapturingRegexp() bool { + if o != nil && o.CapturingRegexp != nil { + return true + } + + return false +} + +// SetCapturingRegexp gets a reference to the given string and assigns it to the CapturingRegexp field. +func (o *PersesListVariableSpec) SetCapturingRegexp(v string) { + o.CapturingRegexp = &v +} + +// GetSort returns the Sort field value if set, zero value otherwise. +func (o *PersesListVariableSpec) GetSort() PersesVariableSort { + if o == nil || o.Sort == nil { + var ret PersesVariableSort + return ret + } + return *o.Sort +} + +// GetSortOk returns a tuple with the Sort field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesListVariableSpec) GetSortOk() (*PersesVariableSort, bool) { + if o == nil || o.Sort == nil { + return nil, false + } + return o.Sort, true +} + +// HasSort returns a boolean if a field has been set. +func (o *PersesListVariableSpec) HasSort() bool { + if o != nil && o.Sort != nil { + return true + } + + return false +} + +// SetSort gets a reference to the given PersesVariableSort and assigns it to the Sort field. +func (o *PersesListVariableSpec) SetSort(v PersesVariableSort) { + o.Sort = &v +} + +// GetPlugin returns the Plugin field value +func (o *PersesListVariableSpec) GetPlugin() PersesPlugin { + if o == nil { + var ret PersesPlugin + return ret + } + + return o.Plugin +} + +// GetPluginOk returns a tuple with the Plugin field value +// and a boolean to check if the value has been set. +func (o *PersesListVariableSpec) GetPluginOk() (*PersesPlugin, bool) { + if o == nil { + return nil, false + } + return &o.Plugin, true +} + +// SetPlugin sets field value +func (o *PersesListVariableSpec) SetPlugin(v PersesPlugin) { + o.Plugin = v +} + +func (o PersesListVariableSpec) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["name"] = o.Name + } + if o.Display != nil { + toSerialize["display"] = o.Display + } + if o.DefaultValue != nil { + toSerialize["defaultValue"] = o.DefaultValue + } + if true { + toSerialize["allowAllValue"] = o.AllowAllValue + } + if true { + toSerialize["allowMultiple"] = o.AllowMultiple + } + if o.CustomAllValue != nil { + toSerialize["customAllValue"] = o.CustomAllValue + } + if o.CapturingRegexp != nil { + toSerialize["capturingRegexp"] = o.CapturingRegexp + } + if o.Sort != nil { + toSerialize["sort"] = o.Sort + } + if true { + toSerialize["plugin"] = o.Plugin + } + return json.Marshal(toSerialize) +} + +type NullablePersesListVariableSpec struct { + value *PersesListVariableSpec + isSet bool +} + +func (v NullablePersesListVariableSpec) Get() *PersesListVariableSpec { + return v.value +} + +func (v *NullablePersesListVariableSpec) Set(val *PersesListVariableSpec) { + v.value = val + v.isSet = true +} + +func (v NullablePersesListVariableSpec) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesListVariableSpec) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesListVariableSpec(val *PersesListVariableSpec) *NullablePersesListVariableSpec { + return &NullablePersesListVariableSpec{value: val, isSet: true} +} + +func (v NullablePersesListVariableSpec) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesListVariableSpec) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_panel.go b/generated/stackstate_api/model_perses_panel.go new file mode 100644 index 00000000..55c21a92 --- /dev/null +++ b/generated/stackstate_api/model_perses_panel.go @@ -0,0 +1,150 @@ +/* +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" +) + +// PersesPanel struct for PersesPanel +type PersesPanel struct { + Kind *string `json:"kind,omitempty"` + Spec *PersesPanelSpec `json:"spec,omitempty"` +} + +// NewPersesPanel instantiates a new PersesPanel 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 NewPersesPanel() *PersesPanel { + this := PersesPanel{} + return &this +} + +// NewPersesPanelWithDefaults instantiates a new PersesPanel 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 NewPersesPanelWithDefaults() *PersesPanel { + this := PersesPanel{} + return &this +} + +// GetKind returns the Kind field value if set, zero value otherwise. +func (o *PersesPanel) GetKind() string { + if o == nil || o.Kind == nil { + var ret string + return ret + } + return *o.Kind +} + +// GetKindOk returns a tuple with the Kind field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesPanel) GetKindOk() (*string, bool) { + if o == nil || o.Kind == nil { + return nil, false + } + return o.Kind, true +} + +// HasKind returns a boolean if a field has been set. +func (o *PersesPanel) HasKind() bool { + if o != nil && o.Kind != nil { + return true + } + + return false +} + +// SetKind gets a reference to the given string and assigns it to the Kind field. +func (o *PersesPanel) SetKind(v string) { + o.Kind = &v +} + +// GetSpec returns the Spec field value if set, zero value otherwise. +func (o *PersesPanel) GetSpec() PersesPanelSpec { + if o == nil || o.Spec == nil { + var ret PersesPanelSpec + return ret + } + return *o.Spec +} + +// GetSpecOk returns a tuple with the Spec field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesPanel) GetSpecOk() (*PersesPanelSpec, bool) { + if o == nil || o.Spec == nil { + return nil, false + } + return o.Spec, true +} + +// HasSpec returns a boolean if a field has been set. +func (o *PersesPanel) HasSpec() bool { + if o != nil && o.Spec != nil { + return true + } + + return false +} + +// SetSpec gets a reference to the given PersesPanelSpec and assigns it to the Spec field. +func (o *PersesPanel) SetSpec(v PersesPanelSpec) { + o.Spec = &v +} + +func (o PersesPanel) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Kind != nil { + toSerialize["kind"] = o.Kind + } + if o.Spec != nil { + toSerialize["spec"] = o.Spec + } + return json.Marshal(toSerialize) +} + +type NullablePersesPanel struct { + value *PersesPanel + isSet bool +} + +func (v NullablePersesPanel) Get() *PersesPanel { + return v.value +} + +func (v *NullablePersesPanel) Set(val *PersesPanel) { + v.value = val + v.isSet = true +} + +func (v NullablePersesPanel) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesPanel) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesPanel(val *PersesPanel) *NullablePersesPanel { + return &NullablePersesPanel{value: val, isSet: true} +} + +func (v NullablePersesPanel) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesPanel) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_panel_display.go b/generated/stackstate_api/model_perses_panel_display.go new file mode 100644 index 00000000..a782e057 --- /dev/null +++ b/generated/stackstate_api/model_perses_panel_display.go @@ -0,0 +1,150 @@ +/* +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" +) + +// PersesPanelDisplay struct for PersesPanelDisplay +type PersesPanelDisplay struct { + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` +} + +// NewPersesPanelDisplay instantiates a new PersesPanelDisplay 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 NewPersesPanelDisplay() *PersesPanelDisplay { + this := PersesPanelDisplay{} + return &this +} + +// NewPersesPanelDisplayWithDefaults instantiates a new PersesPanelDisplay 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 NewPersesPanelDisplayWithDefaults() *PersesPanelDisplay { + this := PersesPanelDisplay{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PersesPanelDisplay) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesPanelDisplay) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PersesPanelDisplay) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PersesPanelDisplay) SetDescription(v string) { + o.Description = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PersesPanelDisplay) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesPanelDisplay) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PersesPanelDisplay) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PersesPanelDisplay) SetName(v string) { + o.Name = &v +} + +func (o PersesPanelDisplay) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Description != nil { + toSerialize["description"] = o.Description + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + return json.Marshal(toSerialize) +} + +type NullablePersesPanelDisplay struct { + value *PersesPanelDisplay + isSet bool +} + +func (v NullablePersesPanelDisplay) Get() *PersesPanelDisplay { + return v.value +} + +func (v *NullablePersesPanelDisplay) Set(val *PersesPanelDisplay) { + v.value = val + v.isSet = true +} + +func (v NullablePersesPanelDisplay) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesPanelDisplay) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesPanelDisplay(val *PersesPanelDisplay) *NullablePersesPanelDisplay { + return &NullablePersesPanelDisplay{value: val, isSet: true} +} + +func (v NullablePersesPanelDisplay) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesPanelDisplay) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_panel_spec.go b/generated/stackstate_api/model_perses_panel_spec.go new file mode 100644 index 00000000..8982b026 --- /dev/null +++ b/generated/stackstate_api/model_perses_panel_spec.go @@ -0,0 +1,222 @@ +/* +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" +) + +// PersesPanelSpec struct for PersesPanelSpec +type PersesPanelSpec struct { + Display *PersesPanelDisplay `json:"display,omitempty"` + Links []PersesLink `json:"links,omitempty"` + Plugin *PersesPlugin `json:"plugin,omitempty"` + Queries []PersesQuery `json:"queries,omitempty"` +} + +// NewPersesPanelSpec instantiates a new PersesPanelSpec 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 NewPersesPanelSpec() *PersesPanelSpec { + this := PersesPanelSpec{} + return &this +} + +// NewPersesPanelSpecWithDefaults instantiates a new PersesPanelSpec 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 NewPersesPanelSpecWithDefaults() *PersesPanelSpec { + this := PersesPanelSpec{} + return &this +} + +// GetDisplay returns the Display field value if set, zero value otherwise. +func (o *PersesPanelSpec) GetDisplay() PersesPanelDisplay { + if o == nil || o.Display == nil { + var ret PersesPanelDisplay + return ret + } + return *o.Display +} + +// GetDisplayOk returns a tuple with the Display field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesPanelSpec) GetDisplayOk() (*PersesPanelDisplay, bool) { + if o == nil || o.Display == nil { + return nil, false + } + return o.Display, true +} + +// HasDisplay returns a boolean if a field has been set. +func (o *PersesPanelSpec) HasDisplay() bool { + if o != nil && o.Display != nil { + return true + } + + return false +} + +// SetDisplay gets a reference to the given PersesPanelDisplay and assigns it to the Display field. +func (o *PersesPanelSpec) SetDisplay(v PersesPanelDisplay) { + o.Display = &v +} + +// GetLinks returns the Links field value if set, zero value otherwise. +func (o *PersesPanelSpec) GetLinks() []PersesLink { + if o == nil || o.Links == nil { + var ret []PersesLink + return ret + } + return o.Links +} + +// GetLinksOk returns a tuple with the Links field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesPanelSpec) GetLinksOk() ([]PersesLink, bool) { + if o == nil || o.Links == nil { + return nil, false + } + return o.Links, true +} + +// HasLinks returns a boolean if a field has been set. +func (o *PersesPanelSpec) HasLinks() bool { + if o != nil && o.Links != nil { + return true + } + + return false +} + +// SetLinks gets a reference to the given []PersesLink and assigns it to the Links field. +func (o *PersesPanelSpec) SetLinks(v []PersesLink) { + o.Links = v +} + +// GetPlugin returns the Plugin field value if set, zero value otherwise. +func (o *PersesPanelSpec) GetPlugin() PersesPlugin { + if o == nil || o.Plugin == nil { + var ret PersesPlugin + return ret + } + return *o.Plugin +} + +// GetPluginOk returns a tuple with the Plugin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesPanelSpec) GetPluginOk() (*PersesPlugin, bool) { + if o == nil || o.Plugin == nil { + return nil, false + } + return o.Plugin, true +} + +// HasPlugin returns a boolean if a field has been set. +func (o *PersesPanelSpec) HasPlugin() bool { + if o != nil && o.Plugin != nil { + return true + } + + return false +} + +// SetPlugin gets a reference to the given PersesPlugin and assigns it to the Plugin field. +func (o *PersesPanelSpec) SetPlugin(v PersesPlugin) { + o.Plugin = &v +} + +// GetQueries returns the Queries field value if set, zero value otherwise. +func (o *PersesPanelSpec) GetQueries() []PersesQuery { + if o == nil || o.Queries == nil { + var ret []PersesQuery + return ret + } + return o.Queries +} + +// GetQueriesOk returns a tuple with the Queries field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesPanelSpec) GetQueriesOk() ([]PersesQuery, bool) { + if o == nil || o.Queries == nil { + return nil, false + } + return o.Queries, true +} + +// HasQueries returns a boolean if a field has been set. +func (o *PersesPanelSpec) HasQueries() bool { + if o != nil && o.Queries != nil { + return true + } + + return false +} + +// SetQueries gets a reference to the given []PersesQuery and assigns it to the Queries field. +func (o *PersesPanelSpec) SetQueries(v []PersesQuery) { + o.Queries = v +} + +func (o PersesPanelSpec) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Display != nil { + toSerialize["display"] = o.Display + } + if o.Links != nil { + toSerialize["links"] = o.Links + } + if o.Plugin != nil { + toSerialize["plugin"] = o.Plugin + } + if o.Queries != nil { + toSerialize["queries"] = o.Queries + } + return json.Marshal(toSerialize) +} + +type NullablePersesPanelSpec struct { + value *PersesPanelSpec + isSet bool +} + +func (v NullablePersesPanelSpec) Get() *PersesPanelSpec { + return v.value +} + +func (v *NullablePersesPanelSpec) Set(val *PersesPanelSpec) { + v.value = val + v.isSet = true +} + +func (v NullablePersesPanelSpec) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesPanelSpec) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesPanelSpec(val *PersesPanelSpec) *NullablePersesPanelSpec { + return &NullablePersesPanelSpec{value: val, isSet: true} +} + +func (v NullablePersesPanelSpec) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesPanelSpec) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_plugin.go b/generated/stackstate_api/model_perses_plugin.go new file mode 100644 index 00000000..23896436 --- /dev/null +++ b/generated/stackstate_api/model_perses_plugin.go @@ -0,0 +1,150 @@ +/* +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" +) + +// PersesPlugin struct for PersesPlugin +type PersesPlugin struct { + Kind *string `json:"kind,omitempty"` + Spec map[string]interface{} `json:"spec,omitempty"` +} + +// NewPersesPlugin instantiates a new PersesPlugin 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 NewPersesPlugin() *PersesPlugin { + this := PersesPlugin{} + return &this +} + +// NewPersesPluginWithDefaults instantiates a new PersesPlugin 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 NewPersesPluginWithDefaults() *PersesPlugin { + this := PersesPlugin{} + return &this +} + +// GetKind returns the Kind field value if set, zero value otherwise. +func (o *PersesPlugin) GetKind() string { + if o == nil || o.Kind == nil { + var ret string + return ret + } + return *o.Kind +} + +// GetKindOk returns a tuple with the Kind field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesPlugin) GetKindOk() (*string, bool) { + if o == nil || o.Kind == nil { + return nil, false + } + return o.Kind, true +} + +// HasKind returns a boolean if a field has been set. +func (o *PersesPlugin) HasKind() bool { + if o != nil && o.Kind != nil { + return true + } + + return false +} + +// SetKind gets a reference to the given string and assigns it to the Kind field. +func (o *PersesPlugin) SetKind(v string) { + o.Kind = &v +} + +// GetSpec returns the Spec field value if set, zero value otherwise. +func (o *PersesPlugin) GetSpec() map[string]interface{} { + if o == nil || o.Spec == nil { + var ret map[string]interface{} + return ret + } + return o.Spec +} + +// GetSpecOk returns a tuple with the Spec field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesPlugin) GetSpecOk() (map[string]interface{}, bool) { + if o == nil || o.Spec == nil { + return nil, false + } + return o.Spec, true +} + +// HasSpec returns a boolean if a field has been set. +func (o *PersesPlugin) HasSpec() bool { + if o != nil && o.Spec != nil { + return true + } + + return false +} + +// SetSpec gets a reference to the given map[string]interface{} and assigns it to the Spec field. +func (o *PersesPlugin) SetSpec(v map[string]interface{}) { + o.Spec = v +} + +func (o PersesPlugin) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Kind != nil { + toSerialize["kind"] = o.Kind + } + if o.Spec != nil { + toSerialize["spec"] = o.Spec + } + return json.Marshal(toSerialize) +} + +type NullablePersesPlugin struct { + value *PersesPlugin + isSet bool +} + +func (v NullablePersesPlugin) Get() *PersesPlugin { + return v.value +} + +func (v *NullablePersesPlugin) Set(val *PersesPlugin) { + v.value = val + v.isSet = true +} + +func (v NullablePersesPlugin) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesPlugin) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesPlugin(val *PersesPlugin) *NullablePersesPlugin { + return &NullablePersesPlugin{value: val, isSet: true} +} + +func (v NullablePersesPlugin) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesPlugin) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_project_metadata.go b/generated/stackstate_api/model_perses_project_metadata.go new file mode 100644 index 00000000..4a512059 --- /dev/null +++ b/generated/stackstate_api/model_perses_project_metadata.go @@ -0,0 +1,259 @@ +/* +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" + "time" +) + +// PersesProjectMetadata struct for PersesProjectMetadata +type PersesProjectMetadata struct { + CreatedAt *time.Time `json:"createdAt,omitempty"` + Name *string `json:"name,omitempty"` + Project *string `json:"project,omitempty"` + UpdatedAt *time.Time `json:"updatedAt,omitempty"` + Version *int32 `json:"version,omitempty"` +} + +// NewPersesProjectMetadata instantiates a new PersesProjectMetadata 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 NewPersesProjectMetadata() *PersesProjectMetadata { + this := PersesProjectMetadata{} + return &this +} + +// NewPersesProjectMetadataWithDefaults instantiates a new PersesProjectMetadata 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 NewPersesProjectMetadataWithDefaults() *PersesProjectMetadata { + this := PersesProjectMetadata{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *PersesProjectMetadata) GetCreatedAt() time.Time { + if o == nil || o.CreatedAt == nil { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesProjectMetadata) GetCreatedAtOk() (*time.Time, bool) { + if o == nil || o.CreatedAt == nil { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *PersesProjectMetadata) HasCreatedAt() bool { + if o != nil && o.CreatedAt != nil { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *PersesProjectMetadata) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PersesProjectMetadata) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesProjectMetadata) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PersesProjectMetadata) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PersesProjectMetadata) SetName(v string) { + o.Name = &v +} + +// GetProject returns the Project field value if set, zero value otherwise. +func (o *PersesProjectMetadata) GetProject() string { + if o == nil || o.Project == nil { + var ret string + return ret + } + return *o.Project +} + +// GetProjectOk returns a tuple with the Project field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesProjectMetadata) GetProjectOk() (*string, bool) { + if o == nil || o.Project == nil { + return nil, false + } + return o.Project, true +} + +// HasProject returns a boolean if a field has been set. +func (o *PersesProjectMetadata) HasProject() bool { + if o != nil && o.Project != nil { + return true + } + + return false +} + +// SetProject gets a reference to the given string and assigns it to the Project field. +func (o *PersesProjectMetadata) SetProject(v string) { + o.Project = &v +} + +// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. +func (o *PersesProjectMetadata) GetUpdatedAt() time.Time { + if o == nil || o.UpdatedAt == nil { + var ret time.Time + return ret + } + return *o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesProjectMetadata) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil || o.UpdatedAt == nil { + return nil, false + } + return o.UpdatedAt, true +} + +// HasUpdatedAt returns a boolean if a field has been set. +func (o *PersesProjectMetadata) HasUpdatedAt() bool { + if o != nil && o.UpdatedAt != nil { + return true + } + + return false +} + +// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field. +func (o *PersesProjectMetadata) SetUpdatedAt(v time.Time) { + o.UpdatedAt = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *PersesProjectMetadata) GetVersion() int32 { + if o == nil || o.Version == nil { + var ret int32 + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesProjectMetadata) GetVersionOk() (*int32, bool) { + if o == nil || o.Version == nil { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *PersesProjectMetadata) HasVersion() bool { + if o != nil && o.Version != nil { + return true + } + + return false +} + +// SetVersion gets a reference to the given int32 and assigns it to the Version field. +func (o *PersesProjectMetadata) SetVersion(v int32) { + o.Version = &v +} + +func (o PersesProjectMetadata) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.CreatedAt != nil { + toSerialize["createdAt"] = o.CreatedAt + } + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Project != nil { + toSerialize["project"] = o.Project + } + if o.UpdatedAt != nil { + toSerialize["updatedAt"] = o.UpdatedAt + } + if o.Version != nil { + toSerialize["version"] = o.Version + } + return json.Marshal(toSerialize) +} + +type NullablePersesProjectMetadata struct { + value *PersesProjectMetadata + isSet bool +} + +func (v NullablePersesProjectMetadata) Get() *PersesProjectMetadata { + return v.value +} + +func (v *NullablePersesProjectMetadata) Set(val *PersesProjectMetadata) { + v.value = val + v.isSet = true +} + +func (v NullablePersesProjectMetadata) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesProjectMetadata) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesProjectMetadata(val *PersesProjectMetadata) *NullablePersesProjectMetadata { + return &NullablePersesProjectMetadata{value: val, isSet: true} +} + +func (v NullablePersesProjectMetadata) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesProjectMetadata) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_query.go b/generated/stackstate_api/model_perses_query.go new file mode 100644 index 00000000..c70a1337 --- /dev/null +++ b/generated/stackstate_api/model_perses_query.go @@ -0,0 +1,150 @@ +/* +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" +) + +// PersesQuery struct for PersesQuery +type PersesQuery struct { + Kind *string `json:"kind,omitempty"` + Spec *PersesQuerySpec `json:"spec,omitempty"` +} + +// NewPersesQuery instantiates a new PersesQuery 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 NewPersesQuery() *PersesQuery { + this := PersesQuery{} + return &this +} + +// NewPersesQueryWithDefaults instantiates a new PersesQuery 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 NewPersesQueryWithDefaults() *PersesQuery { + this := PersesQuery{} + return &this +} + +// GetKind returns the Kind field value if set, zero value otherwise. +func (o *PersesQuery) GetKind() string { + if o == nil || o.Kind == nil { + var ret string + return ret + } + return *o.Kind +} + +// GetKindOk returns a tuple with the Kind field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesQuery) GetKindOk() (*string, bool) { + if o == nil || o.Kind == nil { + return nil, false + } + return o.Kind, true +} + +// HasKind returns a boolean if a field has been set. +func (o *PersesQuery) HasKind() bool { + if o != nil && o.Kind != nil { + return true + } + + return false +} + +// SetKind gets a reference to the given string and assigns it to the Kind field. +func (o *PersesQuery) SetKind(v string) { + o.Kind = &v +} + +// GetSpec returns the Spec field value if set, zero value otherwise. +func (o *PersesQuery) GetSpec() PersesQuerySpec { + if o == nil || o.Spec == nil { + var ret PersesQuerySpec + return ret + } + return *o.Spec +} + +// GetSpecOk returns a tuple with the Spec field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesQuery) GetSpecOk() (*PersesQuerySpec, bool) { + if o == nil || o.Spec == nil { + return nil, false + } + return o.Spec, true +} + +// HasSpec returns a boolean if a field has been set. +func (o *PersesQuery) HasSpec() bool { + if o != nil && o.Spec != nil { + return true + } + + return false +} + +// SetSpec gets a reference to the given PersesQuerySpec and assigns it to the Spec field. +func (o *PersesQuery) SetSpec(v PersesQuerySpec) { + o.Spec = &v +} + +func (o PersesQuery) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Kind != nil { + toSerialize["kind"] = o.Kind + } + if o.Spec != nil { + toSerialize["spec"] = o.Spec + } + return json.Marshal(toSerialize) +} + +type NullablePersesQuery struct { + value *PersesQuery + isSet bool +} + +func (v NullablePersesQuery) Get() *PersesQuery { + return v.value +} + +func (v *NullablePersesQuery) Set(val *PersesQuery) { + v.value = val + v.isSet = true +} + +func (v NullablePersesQuery) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesQuery) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesQuery(val *PersesQuery) *NullablePersesQuery { + return &NullablePersesQuery{value: val, isSet: true} +} + +func (v NullablePersesQuery) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesQuery) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_query_spec.go b/generated/stackstate_api/model_perses_query_spec.go new file mode 100644 index 00000000..8fdf93c3 --- /dev/null +++ b/generated/stackstate_api/model_perses_query_spec.go @@ -0,0 +1,114 @@ +/* +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" +) + +// PersesQuerySpec struct for PersesQuerySpec +type PersesQuerySpec struct { + Plugin *PersesPlugin `json:"plugin,omitempty"` +} + +// NewPersesQuerySpec instantiates a new PersesQuerySpec 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 NewPersesQuerySpec() *PersesQuerySpec { + this := PersesQuerySpec{} + return &this +} + +// NewPersesQuerySpecWithDefaults instantiates a new PersesQuerySpec 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 NewPersesQuerySpecWithDefaults() *PersesQuerySpec { + this := PersesQuerySpec{} + return &this +} + +// GetPlugin returns the Plugin field value if set, zero value otherwise. +func (o *PersesQuerySpec) GetPlugin() PersesPlugin { + if o == nil || o.Plugin == nil { + var ret PersesPlugin + return ret + } + return *o.Plugin +} + +// GetPluginOk returns a tuple with the Plugin field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesQuerySpec) GetPluginOk() (*PersesPlugin, bool) { + if o == nil || o.Plugin == nil { + return nil, false + } + return o.Plugin, true +} + +// HasPlugin returns a boolean if a field has been set. +func (o *PersesQuerySpec) HasPlugin() bool { + if o != nil && o.Plugin != nil { + return true + } + + return false +} + +// SetPlugin gets a reference to the given PersesPlugin and assigns it to the Plugin field. +func (o *PersesQuerySpec) SetPlugin(v PersesPlugin) { + o.Plugin = &v +} + +func (o PersesQuerySpec) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Plugin != nil { + toSerialize["plugin"] = o.Plugin + } + return json.Marshal(toSerialize) +} + +type NullablePersesQuerySpec struct { + value *PersesQuerySpec + isSet bool +} + +func (v NullablePersesQuerySpec) Get() *PersesQuerySpec { + return v.value +} + +func (v *NullablePersesQuerySpec) Set(val *PersesQuerySpec) { + v.value = val + v.isSet = true +} + +func (v NullablePersesQuerySpec) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesQuerySpec) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesQuerySpec(val *PersesQuerySpec) *NullablePersesQuerySpec { + return &NullablePersesQuerySpec{value: val, isSet: true} +} + +func (v NullablePersesQuerySpec) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesQuerySpec) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_text_variable.go b/generated/stackstate_api/model_perses_text_variable.go new file mode 100644 index 00000000..c229c418 --- /dev/null +++ b/generated/stackstate_api/model_perses_text_variable.go @@ -0,0 +1,143 @@ +/* +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" +) + +// PersesTextVariable struct for PersesTextVariable +type PersesTextVariable struct { + Kind string `json:"kind"` + Spec *PersesTextVariableSpec `json:"spec,omitempty"` +} + +// NewPersesTextVariable instantiates a new PersesTextVariable 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 NewPersesTextVariable(kind string) *PersesTextVariable { + this := PersesTextVariable{} + this.Kind = kind + return &this +} + +// NewPersesTextVariableWithDefaults instantiates a new PersesTextVariable 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 NewPersesTextVariableWithDefaults() *PersesTextVariable { + this := PersesTextVariable{} + return &this +} + +// GetKind returns the Kind field value +func (o *PersesTextVariable) GetKind() string { + if o == nil { + var ret string + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *PersesTextVariable) GetKindOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *PersesTextVariable) SetKind(v string) { + o.Kind = v +} + +// GetSpec returns the Spec field value if set, zero value otherwise. +func (o *PersesTextVariable) GetSpec() PersesTextVariableSpec { + if o == nil || o.Spec == nil { + var ret PersesTextVariableSpec + return ret + } + return *o.Spec +} + +// GetSpecOk returns a tuple with the Spec field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesTextVariable) GetSpecOk() (*PersesTextVariableSpec, bool) { + if o == nil || o.Spec == nil { + return nil, false + } + return o.Spec, true +} + +// HasSpec returns a boolean if a field has been set. +func (o *PersesTextVariable) HasSpec() bool { + if o != nil && o.Spec != nil { + return true + } + + return false +} + +// SetSpec gets a reference to the given PersesTextVariableSpec and assigns it to the Spec field. +func (o *PersesTextVariable) SetSpec(v PersesTextVariableSpec) { + o.Spec = &v +} + +func (o PersesTextVariable) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["kind"] = o.Kind + } + if o.Spec != nil { + toSerialize["spec"] = o.Spec + } + return json.Marshal(toSerialize) +} + +type NullablePersesTextVariable struct { + value *PersesTextVariable + isSet bool +} + +func (v NullablePersesTextVariable) Get() *PersesTextVariable { + return v.value +} + +func (v *NullablePersesTextVariable) Set(val *PersesTextVariable) { + v.value = val + v.isSet = true +} + +func (v NullablePersesTextVariable) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesTextVariable) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesTextVariable(val *PersesTextVariable) *NullablePersesTextVariable { + return &NullablePersesTextVariable{value: val, isSet: true} +} + +func (v NullablePersesTextVariable) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesTextVariable) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_text_variable_spec.go b/generated/stackstate_api/model_perses_text_variable_spec.go new file mode 100644 index 00000000..6123ee7f --- /dev/null +++ b/generated/stackstate_api/model_perses_text_variable_spec.go @@ -0,0 +1,208 @@ +/* +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" +) + +// PersesTextVariableSpec struct for PersesTextVariableSpec +type PersesTextVariableSpec struct { + Name string `json:"name"` + Display *PersesVariableDisplaySpec `json:"display,omitempty"` + Value string `json:"value"` + Constant *bool `json:"constant,omitempty"` +} + +// NewPersesTextVariableSpec instantiates a new PersesTextVariableSpec 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 NewPersesTextVariableSpec(name string, value string) *PersesTextVariableSpec { + this := PersesTextVariableSpec{} + this.Name = name + this.Value = value + return &this +} + +// NewPersesTextVariableSpecWithDefaults instantiates a new PersesTextVariableSpec 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 NewPersesTextVariableSpecWithDefaults() *PersesTextVariableSpec { + this := PersesTextVariableSpec{} + return &this +} + +// GetName returns the Name field value +func (o *PersesTextVariableSpec) 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 *PersesTextVariableSpec) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PersesTextVariableSpec) SetName(v string) { + o.Name = v +} + +// GetDisplay returns the Display field value if set, zero value otherwise. +func (o *PersesTextVariableSpec) GetDisplay() PersesVariableDisplaySpec { + if o == nil || o.Display == nil { + var ret PersesVariableDisplaySpec + return ret + } + return *o.Display +} + +// GetDisplayOk returns a tuple with the Display field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesTextVariableSpec) GetDisplayOk() (*PersesVariableDisplaySpec, bool) { + if o == nil || o.Display == nil { + return nil, false + } + return o.Display, true +} + +// HasDisplay returns a boolean if a field has been set. +func (o *PersesTextVariableSpec) HasDisplay() bool { + if o != nil && o.Display != nil { + return true + } + + return false +} + +// SetDisplay gets a reference to the given PersesVariableDisplaySpec and assigns it to the Display field. +func (o *PersesTextVariableSpec) SetDisplay(v PersesVariableDisplaySpec) { + o.Display = &v +} + +// GetValue returns the Value field value +func (o *PersesTextVariableSpec) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *PersesTextVariableSpec) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *PersesTextVariableSpec) SetValue(v string) { + o.Value = v +} + +// GetConstant returns the Constant field value if set, zero value otherwise. +func (o *PersesTextVariableSpec) GetConstant() bool { + if o == nil || o.Constant == nil { + var ret bool + return ret + } + return *o.Constant +} + +// GetConstantOk returns a tuple with the Constant field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesTextVariableSpec) GetConstantOk() (*bool, bool) { + if o == nil || o.Constant == nil { + return nil, false + } + return o.Constant, true +} + +// HasConstant returns a boolean if a field has been set. +func (o *PersesTextVariableSpec) HasConstant() bool { + if o != nil && o.Constant != nil { + return true + } + + return false +} + +// SetConstant gets a reference to the given bool and assigns it to the Constant field. +func (o *PersesTextVariableSpec) SetConstant(v bool) { + o.Constant = &v +} + +func (o PersesTextVariableSpec) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["name"] = o.Name + } + if o.Display != nil { + toSerialize["display"] = o.Display + } + if true { + toSerialize["value"] = o.Value + } + if o.Constant != nil { + toSerialize["constant"] = o.Constant + } + return json.Marshal(toSerialize) +} + +type NullablePersesTextVariableSpec struct { + value *PersesTextVariableSpec + isSet bool +} + +func (v NullablePersesTextVariableSpec) Get() *PersesTextVariableSpec { + return v.value +} + +func (v *NullablePersesTextVariableSpec) Set(val *PersesTextVariableSpec) { + v.value = val + v.isSet = true +} + +func (v NullablePersesTextVariableSpec) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesTextVariableSpec) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesTextVariableSpec(val *PersesTextVariableSpec) *NullablePersesTextVariableSpec { + return &NullablePersesTextVariableSpec{value: val, isSet: true} +} + +func (v NullablePersesTextVariableSpec) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesTextVariableSpec) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_variable_display_spec.go b/generated/stackstate_api/model_perses_variable_display_spec.go new file mode 100644 index 00000000..9150c52c --- /dev/null +++ b/generated/stackstate_api/model_perses_variable_display_spec.go @@ -0,0 +1,186 @@ +/* +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" +) + +// PersesVariableDisplaySpec struct for PersesVariableDisplaySpec +type PersesVariableDisplaySpec struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Hidden *bool `json:"hidden,omitempty"` +} + +// NewPersesVariableDisplaySpec instantiates a new PersesVariableDisplaySpec 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 NewPersesVariableDisplaySpec() *PersesVariableDisplaySpec { + this := PersesVariableDisplaySpec{} + return &this +} + +// NewPersesVariableDisplaySpecWithDefaults instantiates a new PersesVariableDisplaySpec 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 NewPersesVariableDisplaySpecWithDefaults() *PersesVariableDisplaySpec { + this := PersesVariableDisplaySpec{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PersesVariableDisplaySpec) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesVariableDisplaySpec) GetNameOk() (*string, bool) { + if o == nil || o.Name == nil { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PersesVariableDisplaySpec) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PersesVariableDisplaySpec) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PersesVariableDisplaySpec) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesVariableDisplaySpec) GetDescriptionOk() (*string, bool) { + if o == nil || o.Description == nil { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PersesVariableDisplaySpec) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PersesVariableDisplaySpec) SetDescription(v string) { + o.Description = &v +} + +// GetHidden returns the Hidden field value if set, zero value otherwise. +func (o *PersesVariableDisplaySpec) GetHidden() bool { + if o == nil || o.Hidden == nil { + var ret bool + return ret + } + return *o.Hidden +} + +// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PersesVariableDisplaySpec) GetHiddenOk() (*bool, bool) { + if o == nil || o.Hidden == nil { + return nil, false + } + return o.Hidden, true +} + +// HasHidden returns a boolean if a field has been set. +func (o *PersesVariableDisplaySpec) HasHidden() bool { + if o != nil && o.Hidden != nil { + return true + } + + return false +} + +// SetHidden gets a reference to the given bool and assigns it to the Hidden field. +func (o *PersesVariableDisplaySpec) SetHidden(v bool) { + o.Hidden = &v +} + +func (o PersesVariableDisplaySpec) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Name != nil { + toSerialize["name"] = o.Name + } + if o.Description != nil { + toSerialize["description"] = o.Description + } + if o.Hidden != nil { + toSerialize["hidden"] = o.Hidden + } + return json.Marshal(toSerialize) +} + +type NullablePersesVariableDisplaySpec struct { + value *PersesVariableDisplaySpec + isSet bool +} + +func (v NullablePersesVariableDisplaySpec) Get() *PersesVariableDisplaySpec { + return v.value +} + +func (v *NullablePersesVariableDisplaySpec) Set(val *PersesVariableDisplaySpec) { + v.value = val + v.isSet = true +} + +func (v NullablePersesVariableDisplaySpec) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesVariableDisplaySpec) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesVariableDisplaySpec(val *PersesVariableDisplaySpec) *NullablePersesVariableDisplaySpec { + return &NullablePersesVariableDisplaySpec{value: val, isSet: true} +} + +func (v NullablePersesVariableDisplaySpec) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesVariableDisplaySpec) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_variable_sort.go b/generated/stackstate_api/model_perses_variable_sort.go new file mode 100644 index 00000000..0e0806ca --- /dev/null +++ b/generated/stackstate_api/model_perses_variable_sort.go @@ -0,0 +1,121 @@ +/* +StackState API + +This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). + +API version: 5.2.0 +Contact: info@stackstate.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackstate_api + +import ( + "encoding/json" + "fmt" +) + +// PersesVariableSort the model 'PersesVariableSort' +type PersesVariableSort string + +// List of PersesVariableSort +const ( + PERSESVARIABLESORT_NONE PersesVariableSort = "none" + PERSESVARIABLESORT_ALPHABETICAL_ASC PersesVariableSort = "alphabetical-asc" + PERSESVARIABLESORT_ALPHABETICAL_DESC PersesVariableSort = "alphabetical-desc" + PERSESVARIABLESORT_NUMERICAL_ASC PersesVariableSort = "numerical-asc" + PERSESVARIABLESORT_NUMERICAL_DESC PersesVariableSort = "numerical-desc" + PERSESVARIABLESORT_ALPHABETICAL_CI_ASC PersesVariableSort = "alphabetical-ci-asc" + PERSESVARIABLESORT_ALPHABETICAL_CI_DESC PersesVariableSort = "alphabetical-ci-desc" +) + +// All allowed values of PersesVariableSort enum +var AllowedPersesVariableSortEnumValues = []PersesVariableSort{ + "none", + "alphabetical-asc", + "alphabetical-desc", + "numerical-asc", + "numerical-desc", + "alphabetical-ci-asc", + "alphabetical-ci-desc", +} + +func (v *PersesVariableSort) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := PersesVariableSort(value) + for _, existing := range AllowedPersesVariableSortEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid PersesVariableSort", value) +} + +// NewPersesVariableSortFromValue returns a pointer to a valid PersesVariableSort +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewPersesVariableSortFromValue(v string) (*PersesVariableSort, error) { + ev := PersesVariableSort(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for PersesVariableSort: valid values are %v", v, AllowedPersesVariableSortEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v PersesVariableSort) IsValid() bool { + for _, existing := range AllowedPersesVariableSortEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to PersesVariableSort value +func (v PersesVariableSort) Ptr() *PersesVariableSort { + return &v +} + +type NullablePersesVariableSort struct { + value *PersesVariableSort + isSet bool +} + +func (v NullablePersesVariableSort) Get() *PersesVariableSort { + return v.value +} + +func (v *NullablePersesVariableSort) Set(val *PersesVariableSort) { + v.value = val + v.isSet = true +} + +func (v NullablePersesVariableSort) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesVariableSort) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesVariableSort(val *PersesVariableSort) *NullablePersesVariableSort { + return &NullablePersesVariableSort{value: val, isSet: true} +} + +func (v NullablePersesVariableSort) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesVariableSort) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_perses_variable_types.go b/generated/stackstate_api/model_perses_variable_types.go new file mode 100644 index 00000000..076a03df --- /dev/null +++ b/generated/stackstate_api/model_perses_variable_types.go @@ -0,0 +1,164 @@ +/* +StackState API + +This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). + +API version: 5.2.0 +Contact: info@stackstate.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackstate_api + +import ( + "encoding/json" + "fmt" +) + +// PersesVariableTypes - struct for PersesVariableTypes +type PersesVariableTypes struct { + PersesListVariable *PersesListVariable + PersesTextVariable *PersesTextVariable +} + +// PersesListVariableAsPersesVariableTypes is a convenience function that returns PersesListVariable wrapped in PersesVariableTypes +func PersesListVariableAsPersesVariableTypes(v *PersesListVariable) PersesVariableTypes { + return PersesVariableTypes{ + PersesListVariable: v, + } +} + +// PersesTextVariableAsPersesVariableTypes is a convenience function that returns PersesTextVariable wrapped in PersesVariableTypes +func PersesTextVariableAsPersesVariableTypes(v *PersesTextVariable) PersesVariableTypes { + return PersesVariableTypes{ + PersesTextVariable: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *PersesVariableTypes) UnmarshalJSON(data []byte) error { + var err error + // use discriminator value to speed up the lookup + var jsonDict map[string]interface{} + err = newStrictDecoder(data).Decode(&jsonDict) + if err != nil { + return fmt.Errorf("Failed to unmarshal JSON into map for the discriminator lookup.") + } + + // check if the discriminator value is 'ListVariable' + if jsonDict["kind"] == "ListVariable" { + // try to unmarshal JSON data into PersesListVariable + err = json.Unmarshal(data, &dst.PersesListVariable) + if err == nil { + return nil // data stored in dst.PersesListVariable, return on the first match + } else { + dst.PersesListVariable = nil + return fmt.Errorf("Failed to unmarshal PersesVariableTypes as PersesListVariable: %s", err.Error()) + } + } + + // check if the discriminator value is 'PersesListVariable' + if jsonDict["kind"] == "PersesListVariable" { + // try to unmarshal JSON data into PersesListVariable + err = json.Unmarshal(data, &dst.PersesListVariable) + if err == nil { + return nil // data stored in dst.PersesListVariable, return on the first match + } else { + dst.PersesListVariable = nil + return fmt.Errorf("Failed to unmarshal PersesVariableTypes as PersesListVariable: %s", err.Error()) + } + } + + // check if the discriminator value is 'PersesTextVariable' + if jsonDict["kind"] == "PersesTextVariable" { + // try to unmarshal JSON data into PersesTextVariable + err = json.Unmarshal(data, &dst.PersesTextVariable) + if err == nil { + return nil // data stored in dst.PersesTextVariable, return on the first match + } else { + dst.PersesTextVariable = nil + return fmt.Errorf("Failed to unmarshal PersesVariableTypes as PersesTextVariable: %s", err.Error()) + } + } + + // check if the discriminator value is 'TextVariable' + if jsonDict["kind"] == "TextVariable" { + // try to unmarshal JSON data into PersesTextVariable + err = json.Unmarshal(data, &dst.PersesTextVariable) + if err == nil { + return nil // data stored in dst.PersesTextVariable, return on the first match + } else { + dst.PersesTextVariable = nil + return fmt.Errorf("Failed to unmarshal PersesVariableTypes as PersesTextVariable: %s", err.Error()) + } + } + + return nil +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src PersesVariableTypes) MarshalJSON() ([]byte, error) { + if src.PersesListVariable != nil { + return json.Marshal(&src.PersesListVariable) + } + + if src.PersesTextVariable != nil { + return json.Marshal(&src.PersesTextVariable) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *PersesVariableTypes) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.PersesListVariable != nil { + return obj.PersesListVariable + } + + if obj.PersesTextVariable != nil { + return obj.PersesTextVariable + } + + // all schemas are nil + return nil +} + +type NullablePersesVariableTypes struct { + value *PersesVariableTypes + isSet bool +} + +func (v NullablePersesVariableTypes) Get() *PersesVariableTypes { + return v.value +} + +func (v *NullablePersesVariableTypes) Set(val *PersesVariableTypes) { + v.value = val + v.isSet = true +} + +func (v NullablePersesVariableTypes) IsSet() bool { + return v.isSet +} + +func (v *NullablePersesVariableTypes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePersesVariableTypes(val *PersesVariableTypes) *NullablePersesVariableTypes { + return &NullablePersesVariableTypes{value: val, isSet: true} +} + +func (v NullablePersesVariableTypes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePersesVariableTypes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_span.go b/generated/stackstate_api/model_span.go index e66d9f67..a486501a 100644 --- a/generated/stackstate_api/model_span.go +++ b/generated/stackstate_api/model_span.go @@ -36,10 +36,10 @@ type Span struct { SpanKind SpanKind `json:"spanKind"` SpanParentType SpanParentType `json:"spanParentType"` // Set of key/value pairs providing extra contextual information. Keys are unique. - ResourceAttributes map[string]string `json:"resourceAttributes"` - // Set of key/value pairs providing extra contextual information. Keys are unique. SpanAttributes map[string]string `json:"spanAttributes"` - StatusCode StatusCode `json:"statusCode"` + // Reference to shared resource attributes, used to deduplicate repeated resource data. + ResourceId string `json:"resourceId"` + StatusCode StatusCode `json:"statusCode"` // Human readable message for the status StatusMessage *string `json:"statusMessage,omitempty"` // The name of the instrumentation scope for the span https://opentelemetry.io/docs/specs/otel/glossary/#instrumentation-scope @@ -56,7 +56,7 @@ type Span 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 NewSpan(startTime InstantNanoPrecision, endTime InstantNanoPrecision, durationNanos int64, traceId string, spanId string, spanName string, serviceName string, spanKind SpanKind, spanParentType SpanParentType, resourceAttributes map[string]string, spanAttributes map[string]string, statusCode StatusCode, events []SpanEvent, links []SpanLink) *Span { +func NewSpan(startTime InstantNanoPrecision, endTime InstantNanoPrecision, durationNanos int64, traceId string, spanId string, spanName string, serviceName string, spanKind SpanKind, spanParentType SpanParentType, spanAttributes map[string]string, resourceId string, statusCode StatusCode, events []SpanEvent, links []SpanLink) *Span { this := Span{} this.StartTime = startTime this.EndTime = endTime @@ -67,8 +67,8 @@ func NewSpan(startTime InstantNanoPrecision, endTime InstantNanoPrecision, durat this.ServiceName = serviceName this.SpanKind = spanKind this.SpanParentType = spanParentType - this.ResourceAttributes = resourceAttributes this.SpanAttributes = spanAttributes + this.ResourceId = resourceId this.StatusCode = statusCode this.Events = events this.Links = links @@ -363,52 +363,52 @@ func (o *Span) SetSpanParentType(v SpanParentType) { o.SpanParentType = v } -// GetResourceAttributes returns the ResourceAttributes field value -func (o *Span) GetResourceAttributes() map[string]string { +// GetSpanAttributes returns the SpanAttributes field value +func (o *Span) GetSpanAttributes() map[string]string { if o == nil { var ret map[string]string return ret } - return o.ResourceAttributes + return o.SpanAttributes } -// GetResourceAttributesOk returns a tuple with the ResourceAttributes field value +// GetSpanAttributesOk returns a tuple with the SpanAttributes field value // and a boolean to check if the value has been set. -func (o *Span) GetResourceAttributesOk() (*map[string]string, bool) { +func (o *Span) GetSpanAttributesOk() (*map[string]string, bool) { if o == nil { return nil, false } - return &o.ResourceAttributes, true + return &o.SpanAttributes, true } -// SetResourceAttributes sets field value -func (o *Span) SetResourceAttributes(v map[string]string) { - o.ResourceAttributes = v +// SetSpanAttributes sets field value +func (o *Span) SetSpanAttributes(v map[string]string) { + o.SpanAttributes = v } -// GetSpanAttributes returns the SpanAttributes field value -func (o *Span) GetSpanAttributes() map[string]string { +// GetResourceId returns the ResourceId field value +func (o *Span) GetResourceId() string { if o == nil { - var ret map[string]string + var ret string return ret } - return o.SpanAttributes + return o.ResourceId } -// GetSpanAttributesOk returns a tuple with the SpanAttributes field value +// GetResourceIdOk returns a tuple with the ResourceId field value // and a boolean to check if the value has been set. -func (o *Span) GetSpanAttributesOk() (*map[string]string, bool) { +func (o *Span) GetResourceIdOk() (*string, bool) { if o == nil { return nil, false } - return &o.SpanAttributes, true + return &o.ResourceId, true } -// SetSpanAttributes sets field value -func (o *Span) SetSpanAttributes(v map[string]string) { - o.SpanAttributes = v +// SetResourceId sets field value +func (o *Span) SetResourceId(v string) { + o.ResourceId = v } // GetStatusCode returns the StatusCode field value @@ -615,10 +615,10 @@ func (o Span) MarshalJSON() ([]byte, error) { toSerialize["spanParentType"] = o.SpanParentType } if true { - toSerialize["resourceAttributes"] = o.ResourceAttributes + toSerialize["spanAttributes"] = o.SpanAttributes } if true { - toSerialize["spanAttributes"] = o.SpanAttributes + toSerialize["resourceId"] = o.ResourceId } if true { toSerialize["statusCode"] = o.StatusCode diff --git a/generated/stackstate_api/model_span_response.go b/generated/stackstate_api/model_span_response.go new file mode 100644 index 00000000..6fc50931 --- /dev/null +++ b/generated/stackstate_api/model_span_response.go @@ -0,0 +1,137 @@ +/* +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" +) + +// SpanResponse The result of looking up a span. As an optimization to reduce duplication, resource attributes are inlined at the root-level of the schema. +type SpanResponse struct { + Span Span `json:"span"` + // Set of key/value pairs providing extra contextual information. Keys are unique. + ResourceAttributes map[string]string `json:"resourceAttributes"` +} + +// NewSpanResponse instantiates a new SpanResponse 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 NewSpanResponse(span Span, resourceAttributes map[string]string) *SpanResponse { + this := SpanResponse{} + this.Span = span + this.ResourceAttributes = resourceAttributes + return &this +} + +// NewSpanResponseWithDefaults instantiates a new SpanResponse 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 NewSpanResponseWithDefaults() *SpanResponse { + this := SpanResponse{} + return &this +} + +// GetSpan returns the Span field value +func (o *SpanResponse) GetSpan() Span { + if o == nil { + var ret Span + return ret + } + + return o.Span +} + +// GetSpanOk returns a tuple with the Span field value +// and a boolean to check if the value has been set. +func (o *SpanResponse) GetSpanOk() (*Span, bool) { + if o == nil { + return nil, false + } + return &o.Span, true +} + +// SetSpan sets field value +func (o *SpanResponse) SetSpan(v Span) { + o.Span = v +} + +// GetResourceAttributes returns the ResourceAttributes field value +func (o *SpanResponse) GetResourceAttributes() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + + return o.ResourceAttributes +} + +// GetResourceAttributesOk returns a tuple with the ResourceAttributes field value +// and a boolean to check if the value has been set. +func (o *SpanResponse) GetResourceAttributesOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.ResourceAttributes, true +} + +// SetResourceAttributes sets field value +func (o *SpanResponse) SetResourceAttributes(v map[string]string) { + o.ResourceAttributes = v +} + +func (o SpanResponse) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["span"] = o.Span + } + if true { + toSerialize["resourceAttributes"] = o.ResourceAttributes + } + return json.Marshal(toSerialize) +} + +type NullableSpanResponse struct { + value *SpanResponse + isSet bool +} + +func (v NullableSpanResponse) Get() *SpanResponse { + return v.value +} + +func (v *NullableSpanResponse) Set(val *SpanResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSpanResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSpanResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSpanResponse(val *SpanResponse) *NullableSpanResponse { + return &NullableSpanResponse{value: val, isSet: true} +} + +func (v NullableSpanResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSpanResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_subject_config.go b/generated/stackstate_api/model_subject_config.go index f81bbfd7..1dab807e 100644 --- a/generated/stackstate_api/model_subject_config.go +++ b/generated/stackstate_api/model_subject_config.go @@ -17,8 +17,7 @@ import ( // SubjectConfig struct for SubjectConfig type SubjectConfig struct { - Handle string `json:"handle"` - ScopeQuery *string `json:"scopeQuery,omitempty"` + Handle string `json:"handle"` } // NewSubjectConfig instantiates a new SubjectConfig object @@ -63,46 +62,11 @@ func (o *SubjectConfig) SetHandle(v string) { o.Handle = v } -// GetScopeQuery returns the ScopeQuery field value if set, zero value otherwise. -func (o *SubjectConfig) GetScopeQuery() string { - if o == nil || o.ScopeQuery == nil { - var ret string - return ret - } - return *o.ScopeQuery -} - -// GetScopeQueryOk returns a tuple with the ScopeQuery field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SubjectConfig) GetScopeQueryOk() (*string, bool) { - if o == nil || o.ScopeQuery == nil { - return nil, false - } - return o.ScopeQuery, true -} - -// HasScopeQuery returns a boolean if a field has been set. -func (o *SubjectConfig) HasScopeQuery() bool { - if o != nil && o.ScopeQuery != nil { - return true - } - - return false -} - -// SetScopeQuery gets a reference to the given string and assigns it to the ScopeQuery field. -func (o *SubjectConfig) SetScopeQuery(v string) { - o.ScopeQuery = &v -} - func (o SubjectConfig) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { toSerialize["handle"] = o.Handle } - if o.ScopeQuery != nil { - toSerialize["scopeQuery"] = o.ScopeQuery - } return json.Marshal(toSerialize) } diff --git a/generated/stackstate_api/model_timeline_summary_overflow.go b/generated/stackstate_api/model_timeline_summary_overflow.go new file mode 100644 index 00000000..78139e5f --- /dev/null +++ b/generated/stackstate_api/model_timeline_summary_overflow.go @@ -0,0 +1,107 @@ +/* +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" +) + +// TimelineSummaryOverflow struct for TimelineSummaryOverflow +type TimelineSummaryOverflow struct { + Message string `json:"message"` +} + +// NewTimelineSummaryOverflow instantiates a new TimelineSummaryOverflow 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 NewTimelineSummaryOverflow(message string) *TimelineSummaryOverflow { + this := TimelineSummaryOverflow{} + this.Message = message + return &this +} + +// NewTimelineSummaryOverflowWithDefaults instantiates a new TimelineSummaryOverflow 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 NewTimelineSummaryOverflowWithDefaults() *TimelineSummaryOverflow { + this := TimelineSummaryOverflow{} + return &this +} + +// GetMessage returns the Message field value +func (o *TimelineSummaryOverflow) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *TimelineSummaryOverflow) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *TimelineSummaryOverflow) SetMessage(v string) { + o.Message = v +} + +func (o TimelineSummaryOverflow) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["message"] = o.Message + } + return json.Marshal(toSerialize) +} + +type NullableTimelineSummaryOverflow struct { + value *TimelineSummaryOverflow + isSet bool +} + +func (v NullableTimelineSummaryOverflow) Get() *TimelineSummaryOverflow { + return v.value +} + +func (v *NullableTimelineSummaryOverflow) Set(val *TimelineSummaryOverflow) { + v.value = val + v.isSet = true +} + +func (v NullableTimelineSummaryOverflow) IsSet() bool { + return v.isSet +} + +func (v *NullableTimelineSummaryOverflow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTimelineSummaryOverflow(val *TimelineSummaryOverflow) *NullableTimelineSummaryOverflow { + return &NullableTimelineSummaryOverflow{value: val, isSet: true} +} + +func (v NullableTimelineSummaryOverflow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTimelineSummaryOverflow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_trace.go b/generated/stackstate_api/model_trace.go index c3090f0c..8713d1da 100644 --- a/generated/stackstate_api/model_trace.go +++ b/generated/stackstate_api/model_trace.go @@ -21,16 +21,19 @@ type Trace struct { TraceId string `json:"traceId"` // All spans for the trace Spans []Span `json:"spans"` + // Map of resource identifiers to their corresponding resource attributes (key/value pairs). Keys are UUIDs used in the spans’ `resourceId` fields. + Resources map[string]map[string]string `json:"resources"` } // NewTrace instantiates a new Trace 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 NewTrace(traceId string, spans []Span) *Trace { +func NewTrace(traceId string, spans []Span, resources map[string]map[string]string) *Trace { this := Trace{} this.TraceId = traceId this.Spans = spans + this.Resources = resources return &this } @@ -90,6 +93,30 @@ func (o *Trace) SetSpans(v []Span) { o.Spans = v } +// GetResources returns the Resources field value +func (o *Trace) GetResources() map[string]map[string]string { + if o == nil { + var ret map[string]map[string]string + return ret + } + + return o.Resources +} + +// GetResourcesOk returns a tuple with the Resources field value +// and a boolean to check if the value has been set. +func (o *Trace) GetResourcesOk() (*map[string]map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.Resources, true +} + +// SetResources sets field value +func (o *Trace) SetResources(v map[string]map[string]string) { + o.Resources = v +} + func (o Trace) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { @@ -98,6 +125,9 @@ func (o Trace) MarshalJSON() ([]byte, error) { if true { toSerialize["spans"] = o.Spans } + if true { + toSerialize["resources"] = o.Resources + } return json.Marshal(toSerialize) } diff --git a/generated/stackstate_api/model_trace_filter.go b/generated/stackstate_api/model_trace_filter.go index 3547d3eb..88dfac13 100644 --- a/generated/stackstate_api/model_trace_filter.go +++ b/generated/stackstate_api/model_trace_filter.go @@ -15,21 +15,19 @@ import ( "encoding/json" ) -// TraceFilter struct for TraceFilter +// TraceFilter Filter traces that have a span that matches the primary filter and a span that matches the secondary filter. These could be the same, or two different spans of the same trace. type TraceFilter struct { - SpanFilter SpanFilter `json:"spanFilter"` - // Filter traces by 1 or more attributes - TraceAttributes map[string][]string `json:"traceAttributes"` + PrimarySpanFilter SpanFilter `json:"primarySpanFilter"` + SecondarySpanFilter *SpanFilter `json:"secondarySpanFilter,omitempty"` } // NewTraceFilter instantiates a new TraceFilter 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 NewTraceFilter(spanFilter SpanFilter, traceAttributes map[string][]string) *TraceFilter { +func NewTraceFilter(primarySpanFilter SpanFilter) *TraceFilter { this := TraceFilter{} - this.SpanFilter = spanFilter - this.TraceAttributes = traceAttributes + this.PrimarySpanFilter = primarySpanFilter return &this } @@ -41,61 +39,69 @@ func NewTraceFilterWithDefaults() *TraceFilter { return &this } -// GetSpanFilter returns the SpanFilter field value -func (o *TraceFilter) GetSpanFilter() SpanFilter { +// GetPrimarySpanFilter returns the PrimarySpanFilter field value +func (o *TraceFilter) GetPrimarySpanFilter() SpanFilter { if o == nil { var ret SpanFilter return ret } - return o.SpanFilter + return o.PrimarySpanFilter } -// GetSpanFilterOk returns a tuple with the SpanFilter field value +// GetPrimarySpanFilterOk returns a tuple with the PrimarySpanFilter field value // and a boolean to check if the value has been set. -func (o *TraceFilter) GetSpanFilterOk() (*SpanFilter, bool) { +func (o *TraceFilter) GetPrimarySpanFilterOk() (*SpanFilter, bool) { if o == nil { return nil, false } - return &o.SpanFilter, true + return &o.PrimarySpanFilter, true } -// SetSpanFilter sets field value -func (o *TraceFilter) SetSpanFilter(v SpanFilter) { - o.SpanFilter = v +// SetPrimarySpanFilter sets field value +func (o *TraceFilter) SetPrimarySpanFilter(v SpanFilter) { + o.PrimarySpanFilter = v } -// GetTraceAttributes returns the TraceAttributes field value -func (o *TraceFilter) GetTraceAttributes() map[string][]string { - if o == nil { - var ret map[string][]string +// GetSecondarySpanFilter returns the SecondarySpanFilter field value if set, zero value otherwise. +func (o *TraceFilter) GetSecondarySpanFilter() SpanFilter { + if o == nil || o.SecondarySpanFilter == nil { + var ret SpanFilter return ret } - - return o.TraceAttributes + return *o.SecondarySpanFilter } -// GetTraceAttributesOk returns a tuple with the TraceAttributes field value +// GetSecondarySpanFilterOk returns a tuple with the SecondarySpanFilter field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TraceFilter) GetTraceAttributesOk() (*map[string][]string, bool) { - if o == nil { +func (o *TraceFilter) GetSecondarySpanFilterOk() (*SpanFilter, bool) { + if o == nil || o.SecondarySpanFilter == nil { return nil, false } - return &o.TraceAttributes, true + return o.SecondarySpanFilter, true } -// SetTraceAttributes sets field value -func (o *TraceFilter) SetTraceAttributes(v map[string][]string) { - o.TraceAttributes = v +// HasSecondarySpanFilter returns a boolean if a field has been set. +func (o *TraceFilter) HasSecondarySpanFilter() bool { + if o != nil && o.SecondarySpanFilter != nil { + return true + } + + return false +} + +// SetSecondarySpanFilter gets a reference to the given SpanFilter and assigns it to the SecondarySpanFilter field. +func (o *TraceFilter) SetSecondarySpanFilter(v SpanFilter) { + o.SecondarySpanFilter = &v } func (o TraceFilter) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { - toSerialize["spanFilter"] = o.SpanFilter + toSerialize["primarySpanFilter"] = o.PrimarySpanFilter } - if true { - toSerialize["traceAttributes"] = o.TraceAttributes + if o.SecondarySpanFilter != nil { + toSerialize["secondarySpanFilter"] = o.SecondarySpanFilter } return json.Marshal(toSerialize) } diff --git a/generated/stackstate_api/model_trace_identifier.go b/generated/stackstate_api/model_trace_identifier.go deleted file mode 100644 index 07f15d35..00000000 --- a/generated/stackstate_api/model_trace_identifier.go +++ /dev/null @@ -1,138 +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" -) - -// TraceIdentifier Identifier for a \"service trace\", the branch of an OTEL trace that corresponds to a single service entry span -type TraceIdentifier struct { - // The unique identifier for the trace, all spans of the same trace share the same trace_id - TraceId string `json:"traceId"` - // The unique identifier of the span within the trace - SpanId string `json:"spanId"` -} - -// NewTraceIdentifier instantiates a new TraceIdentifier 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 NewTraceIdentifier(traceId string, spanId string) *TraceIdentifier { - this := TraceIdentifier{} - this.TraceId = traceId - this.SpanId = spanId - return &this -} - -// NewTraceIdentifierWithDefaults instantiates a new TraceIdentifier 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 NewTraceIdentifierWithDefaults() *TraceIdentifier { - this := TraceIdentifier{} - return &this -} - -// GetTraceId returns the TraceId field value -func (o *TraceIdentifier) GetTraceId() string { - if o == nil { - var ret string - return ret - } - - return o.TraceId -} - -// GetTraceIdOk returns a tuple with the TraceId field value -// and a boolean to check if the value has been set. -func (o *TraceIdentifier) GetTraceIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TraceId, true -} - -// SetTraceId sets field value -func (o *TraceIdentifier) SetTraceId(v string) { - o.TraceId = v -} - -// GetSpanId returns the SpanId field value -func (o *TraceIdentifier) GetSpanId() string { - if o == nil { - var ret string - return ret - } - - return o.SpanId -} - -// GetSpanIdOk returns a tuple with the SpanId field value -// and a boolean to check if the value has been set. -func (o *TraceIdentifier) GetSpanIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SpanId, true -} - -// SetSpanId sets field value -func (o *TraceIdentifier) SetSpanId(v string) { - o.SpanId = v -} - -func (o TraceIdentifier) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["traceId"] = o.TraceId - } - if true { - toSerialize["spanId"] = o.SpanId - } - return json.Marshal(toSerialize) -} - -type NullableTraceIdentifier struct { - value *TraceIdentifier - isSet bool -} - -func (v NullableTraceIdentifier) Get() *TraceIdentifier { - return v.value -} - -func (v *NullableTraceIdentifier) Set(val *TraceIdentifier) { - v.value = val - v.isSet = true -} - -func (v NullableTraceIdentifier) IsSet() bool { - return v.isSet -} - -func (v *NullableTraceIdentifier) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTraceIdentifier(val *TraceIdentifier) *NullableTraceIdentifier { - return &NullableTraceIdentifier{value: val, isSet: true} -} - -func (v NullableTraceIdentifier) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTraceIdentifier) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/stackstate_api/model_trace_query.go b/generated/stackstate_api/model_trace_query.go index 7b3dd255..d445350e 100644 --- a/generated/stackstate_api/model_trace_query.go +++ b/generated/stackstate_api/model_trace_query.go @@ -15,22 +15,20 @@ import ( "encoding/json" ) -// TraceQuery struct for TraceQuery +// TraceQuery Find traces that have a span that matches the primary filter and a span that matches the secondary filter. These could be the same, or two different spans of the same trace. type TraceQuery struct { - SpanFilter SpanFilter `json:"spanFilter"` - // Filter traces by 1 or more attributes - TraceAttributes map[string][]string `json:"traceAttributes"` - SortBy []SpanSortOption `json:"sortBy,omitempty"` + PrimarySpanFilter SpanFilter `json:"primarySpanFilter"` + SecondarySpanFilter *SpanFilter `json:"secondarySpanFilter,omitempty"` + SortBy []SpanSortOption `json:"sortBy,omitempty"` } // NewTraceQuery instantiates a new TraceQuery 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 NewTraceQuery(spanFilter SpanFilter, traceAttributes map[string][]string) *TraceQuery { +func NewTraceQuery(primarySpanFilter SpanFilter) *TraceQuery { this := TraceQuery{} - this.SpanFilter = spanFilter - this.TraceAttributes = traceAttributes + this.PrimarySpanFilter = primarySpanFilter return &this } @@ -42,52 +40,60 @@ func NewTraceQueryWithDefaults() *TraceQuery { return &this } -// GetSpanFilter returns the SpanFilter field value -func (o *TraceQuery) GetSpanFilter() SpanFilter { +// GetPrimarySpanFilter returns the PrimarySpanFilter field value +func (o *TraceQuery) GetPrimarySpanFilter() SpanFilter { if o == nil { var ret SpanFilter return ret } - return o.SpanFilter + return o.PrimarySpanFilter } -// GetSpanFilterOk returns a tuple with the SpanFilter field value +// GetPrimarySpanFilterOk returns a tuple with the PrimarySpanFilter field value // and a boolean to check if the value has been set. -func (o *TraceQuery) GetSpanFilterOk() (*SpanFilter, bool) { +func (o *TraceQuery) GetPrimarySpanFilterOk() (*SpanFilter, bool) { if o == nil { return nil, false } - return &o.SpanFilter, true + return &o.PrimarySpanFilter, true } -// SetSpanFilter sets field value -func (o *TraceQuery) SetSpanFilter(v SpanFilter) { - o.SpanFilter = v +// SetPrimarySpanFilter sets field value +func (o *TraceQuery) SetPrimarySpanFilter(v SpanFilter) { + o.PrimarySpanFilter = v } -// GetTraceAttributes returns the TraceAttributes field value -func (o *TraceQuery) GetTraceAttributes() map[string][]string { - if o == nil { - var ret map[string][]string +// GetSecondarySpanFilter returns the SecondarySpanFilter field value if set, zero value otherwise. +func (o *TraceQuery) GetSecondarySpanFilter() SpanFilter { + if o == nil || o.SecondarySpanFilter == nil { + var ret SpanFilter return ret } - - return o.TraceAttributes + return *o.SecondarySpanFilter } -// GetTraceAttributesOk returns a tuple with the TraceAttributes field value +// GetSecondarySpanFilterOk returns a tuple with the SecondarySpanFilter field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *TraceQuery) GetTraceAttributesOk() (*map[string][]string, bool) { - if o == nil { +func (o *TraceQuery) GetSecondarySpanFilterOk() (*SpanFilter, bool) { + if o == nil || o.SecondarySpanFilter == nil { return nil, false } - return &o.TraceAttributes, true + return o.SecondarySpanFilter, true } -// SetTraceAttributes sets field value -func (o *TraceQuery) SetTraceAttributes(v map[string][]string) { - o.TraceAttributes = v +// HasSecondarySpanFilter returns a boolean if a field has been set. +func (o *TraceQuery) HasSecondarySpanFilter() bool { + if o != nil && o.SecondarySpanFilter != nil { + return true + } + + return false +} + +// SetSecondarySpanFilter gets a reference to the given SpanFilter and assigns it to the SecondarySpanFilter field. +func (o *TraceQuery) SetSecondarySpanFilter(v SpanFilter) { + o.SecondarySpanFilter = &v } // GetSortBy returns the SortBy field value if set, zero value otherwise. @@ -125,10 +131,10 @@ func (o *TraceQuery) SetSortBy(v []SpanSortOption) { func (o TraceQuery) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { - toSerialize["spanFilter"] = o.SpanFilter + toSerialize["primarySpanFilter"] = o.PrimarySpanFilter } - if true { - toSerialize["traceAttributes"] = o.TraceAttributes + if o.SecondarySpanFilter != nil { + toSerialize["secondarySpanFilter"] = o.SecondarySpanFilter } if o.SortBy != nil { toSerialize["sortBy"] = o.SortBy diff --git a/generated/stackstate_api/model_trace_query_match.go b/generated/stackstate_api/model_trace_query_match.go new file mode 100644 index 00000000..b89a7133 --- /dev/null +++ b/generated/stackstate_api/model_trace_query_match.go @@ -0,0 +1,228 @@ +/* +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" +) + +// TraceQueryMatch A trace that matched the query filters. It structurally matches the Trace schema, with extra fields representing the result of the trace query. +type TraceQueryMatch struct { + // The id of the trace + TraceId string `json:"traceId"` + // All spans for the trace + Spans []Span `json:"spans"` + // Map of resource identifiers to their corresponding resource attributes (key/value pairs). Keys are UUIDs used in the spans’ `resourceId` fields. + Resources map[string]map[string]string `json:"resources"` + // Spans matching the primary filter + PrimaryFilterMatches []string `json:"primaryFilterMatches"` + // Spans matching the secondary filter + SecondaryFilterMatches []string `json:"secondaryFilterMatches"` +} + +// NewTraceQueryMatch instantiates a new TraceQueryMatch 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 NewTraceQueryMatch(traceId string, spans []Span, resources map[string]map[string]string, primaryFilterMatches []string, secondaryFilterMatches []string) *TraceQueryMatch { + this := TraceQueryMatch{} + this.TraceId = traceId + this.Spans = spans + this.Resources = resources + this.PrimaryFilterMatches = primaryFilterMatches + this.SecondaryFilterMatches = secondaryFilterMatches + return &this +} + +// NewTraceQueryMatchWithDefaults instantiates a new TraceQueryMatch 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 NewTraceQueryMatchWithDefaults() *TraceQueryMatch { + this := TraceQueryMatch{} + return &this +} + +// GetTraceId returns the TraceId field value +func (o *TraceQueryMatch) GetTraceId() string { + if o == nil { + var ret string + return ret + } + + return o.TraceId +} + +// GetTraceIdOk returns a tuple with the TraceId field value +// and a boolean to check if the value has been set. +func (o *TraceQueryMatch) GetTraceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TraceId, true +} + +// SetTraceId sets field value +func (o *TraceQueryMatch) SetTraceId(v string) { + o.TraceId = v +} + +// GetSpans returns the Spans field value +func (o *TraceQueryMatch) GetSpans() []Span { + if o == nil { + var ret []Span + return ret + } + + return o.Spans +} + +// GetSpansOk returns a tuple with the Spans field value +// and a boolean to check if the value has been set. +func (o *TraceQueryMatch) GetSpansOk() ([]Span, bool) { + if o == nil { + return nil, false + } + return o.Spans, true +} + +// SetSpans sets field value +func (o *TraceQueryMatch) SetSpans(v []Span) { + o.Spans = v +} + +// GetResources returns the Resources field value +func (o *TraceQueryMatch) GetResources() map[string]map[string]string { + if o == nil { + var ret map[string]map[string]string + return ret + } + + return o.Resources +} + +// GetResourcesOk returns a tuple with the Resources field value +// and a boolean to check if the value has been set. +func (o *TraceQueryMatch) GetResourcesOk() (*map[string]map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.Resources, true +} + +// SetResources sets field value +func (o *TraceQueryMatch) SetResources(v map[string]map[string]string) { + o.Resources = v +} + +// GetPrimaryFilterMatches returns the PrimaryFilterMatches field value +func (o *TraceQueryMatch) GetPrimaryFilterMatches() []string { + if o == nil { + var ret []string + return ret + } + + return o.PrimaryFilterMatches +} + +// GetPrimaryFilterMatchesOk returns a tuple with the PrimaryFilterMatches field value +// and a boolean to check if the value has been set. +func (o *TraceQueryMatch) GetPrimaryFilterMatchesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.PrimaryFilterMatches, true +} + +// SetPrimaryFilterMatches sets field value +func (o *TraceQueryMatch) SetPrimaryFilterMatches(v []string) { + o.PrimaryFilterMatches = v +} + +// GetSecondaryFilterMatches returns the SecondaryFilterMatches field value +func (o *TraceQueryMatch) GetSecondaryFilterMatches() []string { + if o == nil { + var ret []string + return ret + } + + return o.SecondaryFilterMatches +} + +// GetSecondaryFilterMatchesOk returns a tuple with the SecondaryFilterMatches field value +// and a boolean to check if the value has been set. +func (o *TraceQueryMatch) GetSecondaryFilterMatchesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.SecondaryFilterMatches, true +} + +// SetSecondaryFilterMatches sets field value +func (o *TraceQueryMatch) SetSecondaryFilterMatches(v []string) { + o.SecondaryFilterMatches = v +} + +func (o TraceQueryMatch) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["traceId"] = o.TraceId + } + if true { + toSerialize["spans"] = o.Spans + } + if true { + toSerialize["resources"] = o.Resources + } + if true { + toSerialize["primaryFilterMatches"] = o.PrimaryFilterMatches + } + if true { + toSerialize["secondaryFilterMatches"] = o.SecondaryFilterMatches + } + return json.Marshal(toSerialize) +} + +type NullableTraceQueryMatch struct { + value *TraceQueryMatch + isSet bool +} + +func (v NullableTraceQueryMatch) Get() *TraceQueryMatch { + return v.value +} + +func (v *NullableTraceQueryMatch) Set(val *TraceQueryMatch) { + v.value = val + v.isSet = true +} + +func (v NullableTraceQueryMatch) IsSet() bool { + return v.isSet +} + +func (v *NullableTraceQueryMatch) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTraceQueryMatch(val *TraceQueryMatch) *NullableTraceQueryMatch { + return &NullableTraceQueryMatch{value: val, isSet: true} +} + +func (v NullableTraceQueryMatch) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTraceQueryMatch) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_trace_query_match_all_of.go b/generated/stackstate_api/model_trace_query_match_all_of.go new file mode 100644 index 00000000..de9d7429 --- /dev/null +++ b/generated/stackstate_api/model_trace_query_match_all_of.go @@ -0,0 +1,138 @@ +/* +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" +) + +// TraceQueryMatchAllOf struct for TraceQueryMatchAllOf +type TraceQueryMatchAllOf struct { + // Spans matching the primary filter + PrimaryFilterMatches []string `json:"primaryFilterMatches"` + // Spans matching the secondary filter + SecondaryFilterMatches []string `json:"secondaryFilterMatches"` +} + +// NewTraceQueryMatchAllOf instantiates a new TraceQueryMatchAllOf 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 NewTraceQueryMatchAllOf(primaryFilterMatches []string, secondaryFilterMatches []string) *TraceQueryMatchAllOf { + this := TraceQueryMatchAllOf{} + this.PrimaryFilterMatches = primaryFilterMatches + this.SecondaryFilterMatches = secondaryFilterMatches + return &this +} + +// NewTraceQueryMatchAllOfWithDefaults instantiates a new TraceQueryMatchAllOf 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 NewTraceQueryMatchAllOfWithDefaults() *TraceQueryMatchAllOf { + this := TraceQueryMatchAllOf{} + return &this +} + +// GetPrimaryFilterMatches returns the PrimaryFilterMatches field value +func (o *TraceQueryMatchAllOf) GetPrimaryFilterMatches() []string { + if o == nil { + var ret []string + return ret + } + + return o.PrimaryFilterMatches +} + +// GetPrimaryFilterMatchesOk returns a tuple with the PrimaryFilterMatches field value +// and a boolean to check if the value has been set. +func (o *TraceQueryMatchAllOf) GetPrimaryFilterMatchesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.PrimaryFilterMatches, true +} + +// SetPrimaryFilterMatches sets field value +func (o *TraceQueryMatchAllOf) SetPrimaryFilterMatches(v []string) { + o.PrimaryFilterMatches = v +} + +// GetSecondaryFilterMatches returns the SecondaryFilterMatches field value +func (o *TraceQueryMatchAllOf) GetSecondaryFilterMatches() []string { + if o == nil { + var ret []string + return ret + } + + return o.SecondaryFilterMatches +} + +// GetSecondaryFilterMatchesOk returns a tuple with the SecondaryFilterMatches field value +// and a boolean to check if the value has been set. +func (o *TraceQueryMatchAllOf) GetSecondaryFilterMatchesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.SecondaryFilterMatches, true +} + +// SetSecondaryFilterMatches sets field value +func (o *TraceQueryMatchAllOf) SetSecondaryFilterMatches(v []string) { + o.SecondaryFilterMatches = v +} + +func (o TraceQueryMatchAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["primaryFilterMatches"] = o.PrimaryFilterMatches + } + if true { + toSerialize["secondaryFilterMatches"] = o.SecondaryFilterMatches + } + return json.Marshal(toSerialize) +} + +type NullableTraceQueryMatchAllOf struct { + value *TraceQueryMatchAllOf + isSet bool +} + +func (v NullableTraceQueryMatchAllOf) Get() *TraceQueryMatchAllOf { + return v.value +} + +func (v *NullableTraceQueryMatchAllOf) Set(val *TraceQueryMatchAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableTraceQueryMatchAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableTraceQueryMatchAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTraceQueryMatchAllOf(val *TraceQueryMatchAllOf) *NullableTraceQueryMatchAllOf { + return &NullableTraceQueryMatchAllOf{value: val, isSet: true} +} + +func (v NullableTraceQueryMatchAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTraceQueryMatchAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_traces.go b/generated/stackstate_api/model_trace_query_response.go similarity index 63% rename from generated/stackstate_api/model_traces.go rename to generated/stackstate_api/model_trace_query_response.go index 0ff05997..7f1350b5 100644 --- a/generated/stackstate_api/model_traces.go +++ b/generated/stackstate_api/model_trace_query_response.go @@ -15,10 +15,10 @@ import ( "encoding/json" ) -// Traces struct for Traces -type Traces struct { - // List of traces - Traces []TraceIdentifier `json:"traces"` +// TraceQueryResponse struct for TraceQueryResponse +type TraceQueryResponse struct { + // List of traces matching the query + Traces []TraceQueryMatch `json:"traces"` // Maximum number of the traces in the result. PageSize int32 `json:"pageSize"` // The requested page. @@ -27,12 +27,12 @@ type Traces struct { MatchesTotal int64 `json:"matchesTotal"` } -// NewTraces instantiates a new Traces object +// NewTraceQueryResponse instantiates a new TraceQueryResponse 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 NewTraces(traces []TraceIdentifier, pageSize int32, page int32, matchesTotal int64) *Traces { - this := Traces{} +func NewTraceQueryResponse(traces []TraceQueryMatch, pageSize int32, page int32, matchesTotal int64) *TraceQueryResponse { + this := TraceQueryResponse{} this.Traces = traces this.PageSize = pageSize this.Page = page @@ -40,18 +40,18 @@ func NewTraces(traces []TraceIdentifier, pageSize int32, page int32, matchesTota return &this } -// NewTracesWithDefaults instantiates a new Traces object +// NewTraceQueryResponseWithDefaults instantiates a new TraceQueryResponse 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 NewTracesWithDefaults() *Traces { - this := Traces{} +func NewTraceQueryResponseWithDefaults() *TraceQueryResponse { + this := TraceQueryResponse{} return &this } // GetTraces returns the Traces field value -func (o *Traces) GetTraces() []TraceIdentifier { +func (o *TraceQueryResponse) GetTraces() []TraceQueryMatch { if o == nil { - var ret []TraceIdentifier + var ret []TraceQueryMatch return ret } @@ -60,7 +60,7 @@ func (o *Traces) GetTraces() []TraceIdentifier { // GetTracesOk returns a tuple with the Traces field value // and a boolean to check if the value has been set. -func (o *Traces) GetTracesOk() ([]TraceIdentifier, bool) { +func (o *TraceQueryResponse) GetTracesOk() ([]TraceQueryMatch, bool) { if o == nil { return nil, false } @@ -68,12 +68,12 @@ func (o *Traces) GetTracesOk() ([]TraceIdentifier, bool) { } // SetTraces sets field value -func (o *Traces) SetTraces(v []TraceIdentifier) { +func (o *TraceQueryResponse) SetTraces(v []TraceQueryMatch) { o.Traces = v } // GetPageSize returns the PageSize field value -func (o *Traces) GetPageSize() int32 { +func (o *TraceQueryResponse) GetPageSize() int32 { if o == nil { var ret int32 return ret @@ -84,7 +84,7 @@ func (o *Traces) GetPageSize() int32 { // GetPageSizeOk returns a tuple with the PageSize field value // and a boolean to check if the value has been set. -func (o *Traces) GetPageSizeOk() (*int32, bool) { +func (o *TraceQueryResponse) GetPageSizeOk() (*int32, bool) { if o == nil { return nil, false } @@ -92,12 +92,12 @@ func (o *Traces) GetPageSizeOk() (*int32, bool) { } // SetPageSize sets field value -func (o *Traces) SetPageSize(v int32) { +func (o *TraceQueryResponse) SetPageSize(v int32) { o.PageSize = v } // GetPage returns the Page field value -func (o *Traces) GetPage() int32 { +func (o *TraceQueryResponse) GetPage() int32 { if o == nil { var ret int32 return ret @@ -108,7 +108,7 @@ func (o *Traces) GetPage() int32 { // GetPageOk returns a tuple with the Page field value // and a boolean to check if the value has been set. -func (o *Traces) GetPageOk() (*int32, bool) { +func (o *TraceQueryResponse) GetPageOk() (*int32, bool) { if o == nil { return nil, false } @@ -116,12 +116,12 @@ func (o *Traces) GetPageOk() (*int32, bool) { } // SetPage sets field value -func (o *Traces) SetPage(v int32) { +func (o *TraceQueryResponse) SetPage(v int32) { o.Page = v } // GetMatchesTotal returns the MatchesTotal field value -func (o *Traces) GetMatchesTotal() int64 { +func (o *TraceQueryResponse) GetMatchesTotal() int64 { if o == nil { var ret int64 return ret @@ -132,7 +132,7 @@ func (o *Traces) GetMatchesTotal() int64 { // GetMatchesTotalOk returns a tuple with the MatchesTotal field value // and a boolean to check if the value has been set. -func (o *Traces) GetMatchesTotalOk() (*int64, bool) { +func (o *TraceQueryResponse) GetMatchesTotalOk() (*int64, bool) { if o == nil { return nil, false } @@ -140,11 +140,11 @@ func (o *Traces) GetMatchesTotalOk() (*int64, bool) { } // SetMatchesTotal sets field value -func (o *Traces) SetMatchesTotal(v int64) { +func (o *TraceQueryResponse) SetMatchesTotal(v int64) { o.MatchesTotal = v } -func (o Traces) MarshalJSON() ([]byte, error) { +func (o TraceQueryResponse) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { toSerialize["traces"] = o.Traces @@ -161,38 +161,38 @@ func (o Traces) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -type NullableTraces struct { - value *Traces +type NullableTraceQueryResponse struct { + value *TraceQueryResponse isSet bool } -func (v NullableTraces) Get() *Traces { +func (v NullableTraceQueryResponse) Get() *TraceQueryResponse { return v.value } -func (v *NullableTraces) Set(val *Traces) { +func (v *NullableTraceQueryResponse) Set(val *TraceQueryResponse) { v.value = val v.isSet = true } -func (v NullableTraces) IsSet() bool { +func (v NullableTraceQueryResponse) IsSet() bool { return v.isSet } -func (v *NullableTraces) Unset() { +func (v *NullableTraceQueryResponse) Unset() { v.value = nil v.isSet = false } -func NewNullableTraces(val *Traces) *NullableTraces { - return &NullableTraces{value: val, isSet: true} +func NewNullableTraceQueryResponse(val *TraceQueryResponse) *NullableTraceQueryResponse { + return &NullableTraceQueryResponse{value: val, isSet: true} } -func (v NullableTraces) MarshalJSON() ([]byte, error) { +func (v NullableTraceQueryResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableTraces) UnmarshalJSON(src []byte) error { +func (v *NullableTraceQueryResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/generated/stackstate_api/model_user_profile.go b/generated/stackstate_api/model_user_profile.go index 9dbc947f..d2c0d7cd 100644 --- a/generated/stackstate_api/model_user_profile.go +++ b/generated/stackstate_api/model_user_profile.go @@ -20,9 +20,11 @@ type UserProfile struct { Id *int64 `json:"id,omitempty"` LastUpdateTimestamp *int64 `json:"lastUpdateTimestamp,omitempty"` Name string `json:"name"` + DisplayName *string `json:"displayName,omitempty"` Description *string `json:"description,omitempty"` Identifier *string `json:"identifier,omitempty"` StarredViews []int64 `json:"starredViews,omitempty"` + StarredDashboards []int64 `json:"starredDashboards,omitempty"` SystemNotificationsRead []string `json:"systemNotificationsRead"` HideUnavailableMonitors bool `json:"hideUnavailableMonitors"` HideUnavailableMetrics bool `json:"hideUnavailableMetrics"` @@ -140,6 +142,38 @@ func (o *UserProfile) SetName(v string) { o.Name = v } +// GetDisplayName returns the DisplayName field value if set, zero value otherwise. +func (o *UserProfile) GetDisplayName() string { + if o == nil || o.DisplayName == nil { + var ret string + return ret + } + return *o.DisplayName +} + +// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserProfile) GetDisplayNameOk() (*string, bool) { + if o == nil || o.DisplayName == nil { + return nil, false + } + return o.DisplayName, true +} + +// HasDisplayName returns a boolean if a field has been set. +func (o *UserProfile) HasDisplayName() bool { + if o != nil && o.DisplayName != nil { + return true + } + + return false +} + +// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field. +func (o *UserProfile) SetDisplayName(v string) { + o.DisplayName = &v +} + // GetDescription returns the Description field value if set, zero value otherwise. func (o *UserProfile) GetDescription() string { if o == nil || o.Description == nil { @@ -236,6 +270,38 @@ func (o *UserProfile) SetStarredViews(v []int64) { o.StarredViews = v } +// GetStarredDashboards returns the StarredDashboards field value if set, zero value otherwise. +func (o *UserProfile) GetStarredDashboards() []int64 { + if o == nil || o.StarredDashboards == nil { + var ret []int64 + return ret + } + return o.StarredDashboards +} + +// GetStarredDashboardsOk returns a tuple with the StarredDashboards field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserProfile) GetStarredDashboardsOk() ([]int64, bool) { + if o == nil || o.StarredDashboards == nil { + return nil, false + } + return o.StarredDashboards, true +} + +// HasStarredDashboards returns a boolean if a field has been set. +func (o *UserProfile) HasStarredDashboards() bool { + if o != nil && o.StarredDashboards != nil { + return true + } + + return false +} + +// SetStarredDashboards gets a reference to the given []int64 and assigns it to the StarredDashboards field. +func (o *UserProfile) SetStarredDashboards(v []int64) { + o.StarredDashboards = v +} + // GetSystemNotificationsRead returns the SystemNotificationsRead field value func (o *UserProfile) GetSystemNotificationsRead() []string { if o == nil { @@ -375,6 +441,9 @@ func (o UserProfile) MarshalJSON() ([]byte, error) { if true { toSerialize["name"] = o.Name } + if o.DisplayName != nil { + toSerialize["displayName"] = o.DisplayName + } if o.Description != nil { toSerialize["description"] = o.Description } @@ -384,6 +453,9 @@ func (o UserProfile) MarshalJSON() ([]byte, error) { if o.StarredViews != nil { toSerialize["starredViews"] = o.StarredViews } + if o.StarredDashboards != nil { + toSerialize["starredDashboards"] = o.StarredDashboards + } if true { toSerialize["systemNotificationsRead"] = o.SystemNotificationsRead } diff --git a/stackstate_openapi/openapi_version b/stackstate_openapi/openapi_version index 5bd3acde..4744dc1e 100644 --- a/stackstate_openapi/openapi_version +++ b/stackstate_openapi/openapi_version @@ -1 +1 @@ -6c785c2ba8c6d39802b66b4f42ab1190ba9214bc \ No newline at end of file +4f5c1c4dd1c960d52bd7d68142995638c38a48cb \ No newline at end of file From cc1ce622abbf8781a2763cd810d62fc1d20c27c2 Mon Sep 17 00:00:00 2001 From: Alejandro Acevedo Date: Fri, 13 Jun 2025 11:00:52 +0200 Subject: [PATCH 2/4] STAC-22844: Describing the resource that you just deleted fails by definition for ResourcePermissions --- cmd/rbac/rbac_revoke.go | 2 +- cmd/rbac/rbac_revoke_test.go | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/rbac/rbac_revoke.go b/cmd/rbac/rbac_revoke.go index fdc7b1ba..4fd19ddd 100644 --- a/cmd/rbac/rbac_revoke.go +++ b/cmd/rbac/rbac_revoke.go @@ -49,7 +49,7 @@ func RunRevokePermissionsCommand(args *RevokePermissionsArgs) di.CmdWithApiFn { return common.NewResponseError(revokeErr, revokeResp) } - description, descrResp, descrErr := describePermissions(cli, api, args.Subject, args.Permission, args.Resource).Execute() + description, descrResp, descrErr := describePermissions(cli, api, args.Subject, args.Permission, "").Execute() if descrErr != nil { return common.NewResponseError(descrErr, descrResp) diff --git a/cmd/rbac/rbac_revoke_test.go b/cmd/rbac/rbac_revoke_test.go index d65ec4a6..547a3b65 100644 --- a/cmd/rbac/rbac_revoke_test.go +++ b/cmd/rbac/rbac_revoke_test.go @@ -26,7 +26,6 @@ func TestRevokePermissions(t *testing.T) { assert.Len(t, describeCalls, 1) assert.Equal(t, SomeSubject, describeCalls[0].Psubject) assert.Equal(t, SomePermission, *describeCalls[0].Ppermission) - assert.Equal(t, "system", *describeCalls[0].Presource) di.ExecuteCommandWithContextUnsafe(&cli.Deps, cmd, "--subject", SomeSubject, "--permission", SomePermission, "--resource", SomeResource) @@ -40,7 +39,6 @@ func TestRevokePermissions(t *testing.T) { assert.Len(t, describeCalls, 2) assert.Equal(t, SomeSubject, describeCalls[1].Psubject) assert.Equal(t, SomePermission, *describeCalls[1].Ppermission) - assert.Equal(t, SomeResource, *describeCalls[1].Presource) expectedResult := []printer.TableData{ ExpectedTable, From 730e07156b16bcc3683484671413df9c6e9807bd Mon Sep 17 00:00:00 2001 From: Frank van Lankvelt Date: Wed, 18 Jun 2025 13:22:51 +0200 Subject: [PATCH 3/4] STAC-22844: restore backwards compatibility - bring back the scope query --- cmd/rbac/flags.go | 10 +- cmd/rbac/rbac_create_subject.go | 9 ++ cmd/rbac/rbac_create_subject_test.go | 10 +- .../stackstate_api/.openapi-generator/FILES | 2 + generated/stackstate_api/README.md | 1 + generated/stackstate_api/api/openapi.yaml | 15 +++ generated/stackstate_api/api_subject.go | 25 +++- .../stackstate_api/docs/CreateSubject.md | 56 +++++++++ generated/stackstate_api/docs/SubjectApi.md | 8 +- .../stackstate_api/model_create_subject.go | 114 ++++++++++++++++++ stackstate_openapi/openapi_version | 2 +- 11 files changed, 238 insertions(+), 14 deletions(-) create mode 100644 generated/stackstate_api/docs/CreateSubject.md create mode 100644 generated/stackstate_api/model_create_subject.go diff --git a/cmd/rbac/flags.go b/cmd/rbac/flags.go index a3cf2cb8..6ff5dcc5 100644 --- a/cmd/rbac/flags.go +++ b/cmd/rbac/flags.go @@ -4,14 +4,18 @@ const ( Subject = "subject" Permission = "permission" Resource = "resource" + Scope = "scope" SubjectUsage = "The handle of the subject of the permissions. If you're using LDAP, please use the usernameKey configured in StackState" PermissionRevokeUsage = "The permission to revoke" PermissionGrantUsage = "The permission to grant" PermissionDescribeUsage = "Filter the permissions by permission name" - ResourceDescribeUsage = "Filter the permissions by a resource identifier (e.g. system, a resource name or tag)" - ResourceGrantUsage = "The resource to grant the permission to (e.g. \"system\" or a resource name or tag)" - ResourceRevokeUsage = "The resource to revoke the permission to (e.g. \"system\" or a resource name or tag)" + ResourceDescribeUsage = "Filter the permissions by a resource identifier (e.g. system or a view name)" + ResourceGrantUsage = "The resource to grant the permission to (e.g. \"system\" or a view name)" + ResourceRevokeUsage = "The resource to revoke the permission to (e.g. \"system\" or a view name)" + ScopeUsage = "The query in STQL that will be prepended to every topology element retrieved in StackState. " + + "For example, if your scope is \"label = 'A'\", then all STQL executed in StackState" + + " (e.g. Retrieving topology) will only return elements that have the label A" DefaultResource = "system" ) diff --git a/cmd/rbac/rbac_create_subject.go b/cmd/rbac/rbac_create_subject.go index 1b4e653a..84abe771 100644 --- a/cmd/rbac/rbac_create_subject.go +++ b/cmd/rbac/rbac_create_subject.go @@ -10,6 +10,7 @@ import ( type CreateSubjectArgs struct { Subject string + Scope string } func CreateSubjectCommand(deps *di.Deps) *cobra.Command { @@ -24,6 +25,8 @@ func CreateSubjectCommand(deps *di.Deps) *cobra.Command { cmd.Flags().StringVar(&args.Subject, Subject, "", SubjectUsage) cmd.MarkFlagRequired(Subject) //nolint:errcheck + cmd.Flags().StringVar(&args.Scope, Scope, "", ScopeUsage) + return cmd } @@ -34,7 +37,13 @@ func RunCreateSubjectCommand(args *CreateSubjectArgs) di.CmdWithApiFn { api *stackstate_api.APIClient, serverInfo *stackstate_api.ServerInfo, ) common.CLIError { + subject := stackstate_api.NewCreateSubject() + if args.Scope != "" { + subject.SetQuery(args.Scope) + } + resp, err := api.SubjectApi.CreateSubject(cli.Context, args.Subject). + CreateSubject(*subject). Execute() if err != nil { diff --git a/cmd/rbac/rbac_create_subject_test.go b/cmd/rbac/rbac_create_subject_test.go index f2008dab..fb00e7d9 100644 --- a/cmd/rbac/rbac_create_subject_test.go +++ b/cmd/rbac/rbac_create_subject_test.go @@ -2,6 +2,7 @@ package rbac import ( "fmt" + "github.com/stackvista/stackstate-cli/generated/stackstate_api" "testing" "github.com/stackvista/stackstate-cli/internal/di" @@ -23,6 +24,9 @@ func TestCreateSubjectJson(t *testing.T) { assert.Len(t, calls, 1) assert.Equal(t, SomeSubject, calls[0].Psubject) + expectedSubject := stackstate_api.NewCreateSubject() + assert.Equal(t, expectedSubject, calls[0].PcreateSubject) + expectedJson := []map[string]interface{}{ { "created-subject": SomeSubject, @@ -36,12 +40,16 @@ func TestCreateSubject(t *testing.T) { cli := di.NewMockDeps(t) cmd := CreateSubjectCommand(&cli.Deps) - di.ExecuteCommandWithContextUnsafe(&cli.Deps, cmd, "--subject", SomeOtherSubject) + di.ExecuteCommandWithContextUnsafe(&cli.Deps, cmd, "--subject", SomeOtherSubject, "--scope", SomeScope) calls := *cli.MockClient.ApiMocks.SubjectApi.CreateSubjectCalls assert.Len(t, calls, 1) assert.Equal(t, SomeOtherSubject, calls[0].Psubject) + otherExpectedSubject := stackstate_api.NewCreateSubject() + otherExpectedSubject.SetQuery(SomeScope) + assert.Equal(t, otherExpectedSubject, calls[0].PcreateSubject) + expectedStrings := []string{ fmt.Sprintf("Created subject '%s'", SomeOtherSubject), } diff --git a/generated/stackstate_api/.openapi-generator/FILES b/generated/stackstate_api/.openapi-generator/FILES index 98d6c203..b754aef2 100644 --- a/generated/stackstate_api/.openapi-generator/FILES +++ b/generated/stackstate_api/.openapi-generator/FILES @@ -85,6 +85,7 @@ docs/ComponentHighlightMetricSectionAllOf.md docs/ComponentNotFoundError.md docs/ComponentQuery.md docs/ComponentViewArguments.md +docs/CreateSubject.md docs/DashboardAuthorizationError.md docs/DashboardClientErrors.md docs/DashboardCloneSchema.md @@ -510,6 +511,7 @@ model_component_highlight_metric_section_all_of.go model_component_not_found_error.go model_component_query.go model_component_view_arguments.go +model_create_subject.go model_dashboard_authorization_error.go model_dashboard_client_errors.go model_dashboard_clone_schema.go diff --git a/generated/stackstate_api/README.md b/generated/stackstate_api/README.md index a4171cb0..42ce4ffd 100644 --- a/generated/stackstate_api/README.md +++ b/generated/stackstate_api/README.md @@ -281,6 +281,7 @@ Class | Method | HTTP request | Description - [ComponentNotFoundError](docs/ComponentNotFoundError.md) - [ComponentQuery](docs/ComponentQuery.md) - [ComponentViewArguments](docs/ComponentViewArguments.md) + - [CreateSubject](docs/CreateSubject.md) - [DashboardAuthorizationError](docs/DashboardAuthorizationError.md) - [DashboardClientErrors](docs/DashboardClientErrors.md) - [DashboardCloneSchema](docs/DashboardCloneSchema.md) diff --git a/generated/stackstate_api/api/openapi.yaml b/generated/stackstate_api/api/openapi.yaml index 44c6fc56..9d3bc9e8 100644 --- a/generated/stackstate_api/api/openapi.yaml +++ b/generated/stackstate_api/api/openapi.yaml @@ -3959,6 +3959,12 @@ paths: required: true schema: $ref: '#/components/schemas/Subject' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateSubject' + required: true responses: "200": description: Subject created @@ -10902,6 +10908,15 @@ components: required: - handle type: object + CreateSubject: + example: + query: query + properties: + query: + type: string + type: object + Query: + type: string SubscriptionState: discriminator: propertyName: _type diff --git a/generated/stackstate_api/api_subject.go b/generated/stackstate_api/api_subject.go index 533fc058..bcb350bc 100644 --- a/generated/stackstate_api/api_subject.go +++ b/generated/stackstate_api/api_subject.go @@ -84,9 +84,15 @@ type SubjectApi interface { type SubjectApiService service type ApiCreateSubjectRequest struct { - ctx context.Context - ApiService SubjectApi - subject string + ctx context.Context + ApiService SubjectApi + subject string + createSubject *CreateSubject +} + +func (r ApiCreateSubjectRequest) CreateSubject(createSubject CreateSubject) ApiCreateSubjectRequest { + r.createSubject = &createSubject + return r } func (r ApiCreateSubjectRequest) Execute() (*http.Response, error) { @@ -129,9 +135,12 @@ func (a *SubjectApiService) CreateSubjectExecute(r ApiCreateSubjectRequest) (*ht localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.createSubject == nil { + return nil, reportError("createSubject is required and must be specified") + } // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -147,6 +156,8 @@ func (a *SubjectApiService) CreateSubjectExecute(r ApiCreateSubjectRequest) (*ht if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + // body params + localVarPostBody = r.createSubject if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -737,7 +748,8 @@ type CreateSubjectMockResponse struct { } type CreateSubjectCall struct { - Psubject string + Psubject string + PcreateSubject *CreateSubject } func (mock SubjectApiMock) CreateSubject(ctx context.Context, subject string) ApiCreateSubjectRequest { @@ -750,7 +762,8 @@ func (mock SubjectApiMock) CreateSubject(ctx context.Context, subject string) Ap func (mock SubjectApiMock) CreateSubjectExecute(r ApiCreateSubjectRequest) (*http.Response, error) { p := CreateSubjectCall{ - Psubject: r.subject, + Psubject: r.subject, + PcreateSubject: r.createSubject, } *mock.CreateSubjectCalls = append(*mock.CreateSubjectCalls, p) return mock.CreateSubjectResponse.Response, mock.CreateSubjectResponse.Error diff --git a/generated/stackstate_api/docs/CreateSubject.md b/generated/stackstate_api/docs/CreateSubject.md new file mode 100644 index 00000000..4f79bfcb --- /dev/null +++ b/generated/stackstate_api/docs/CreateSubject.md @@ -0,0 +1,56 @@ +# CreateSubject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Query** | Pointer to **string** | | [optional] + +## Methods + +### NewCreateSubject + +`func NewCreateSubject() *CreateSubject` + +NewCreateSubject instantiates a new CreateSubject 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 + +### NewCreateSubjectWithDefaults + +`func NewCreateSubjectWithDefaults() *CreateSubject` + +NewCreateSubjectWithDefaults instantiates a new CreateSubject 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 + +### GetQuery + +`func (o *CreateSubject) GetQuery() string` + +GetQuery returns the Query field if non-nil, zero value otherwise. + +### GetQueryOk + +`func (o *CreateSubject) GetQueryOk() (*string, bool)` + +GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQuery + +`func (o *CreateSubject) SetQuery(v string)` + +SetQuery sets Query field to given value. + +### HasQuery + +`func (o *CreateSubject) HasQuery() bool` + +HasQuery 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/SubjectApi.md b/generated/stackstate_api/docs/SubjectApi.md index 1febe832..09b92a50 100644 --- a/generated/stackstate_api/docs/SubjectApi.md +++ b/generated/stackstate_api/docs/SubjectApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description ## CreateSubject -> CreateSubject(ctx, subject).Execute() +> CreateSubject(ctx, subject).CreateSubject(createSubject).Execute() Create a subject @@ -33,10 +33,11 @@ import ( func main() { subject := "subject_example" // string | + createSubject := *openapiclient.NewCreateSubject() // CreateSubject | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubjectApi.CreateSubject(context.Background(), subject).Execute() + resp, r, err := apiClient.SubjectApi.CreateSubject(context.Background(), subject).CreateSubject(createSubject).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SubjectApi.CreateSubject``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -60,6 +61,7 @@ Other parameters are passed through a pointer to a apiCreateSubjectRequest struc Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **createSubject** | [**CreateSubject**](CreateSubject.md) | | ### Return type @@ -71,7 +73,7 @@ Name | Type | Description | Notes ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/generated/stackstate_api/model_create_subject.go b/generated/stackstate_api/model_create_subject.go new file mode 100644 index 00000000..d442188b --- /dev/null +++ b/generated/stackstate_api/model_create_subject.go @@ -0,0 +1,114 @@ +/* +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" +) + +// CreateSubject struct for CreateSubject +type CreateSubject struct { + Query *string `json:"query,omitempty"` +} + +// NewCreateSubject instantiates a new CreateSubject 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 NewCreateSubject() *CreateSubject { + this := CreateSubject{} + return &this +} + +// NewCreateSubjectWithDefaults instantiates a new CreateSubject 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 NewCreateSubjectWithDefaults() *CreateSubject { + this := CreateSubject{} + return &this +} + +// GetQuery returns the Query field value if set, zero value otherwise. +func (o *CreateSubject) GetQuery() string { + if o == nil || o.Query == nil { + var ret string + return ret + } + return *o.Query +} + +// GetQueryOk returns a tuple with the Query field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateSubject) GetQueryOk() (*string, bool) { + if o == nil || o.Query == nil { + return nil, false + } + return o.Query, true +} + +// HasQuery returns a boolean if a field has been set. +func (o *CreateSubject) HasQuery() bool { + if o != nil && o.Query != nil { + return true + } + + return false +} + +// SetQuery gets a reference to the given string and assigns it to the Query field. +func (o *CreateSubject) SetQuery(v string) { + o.Query = &v +} + +func (o CreateSubject) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Query != nil { + toSerialize["query"] = o.Query + } + return json.Marshal(toSerialize) +} + +type NullableCreateSubject struct { + value *CreateSubject + isSet bool +} + +func (v NullableCreateSubject) Get() *CreateSubject { + return v.value +} + +func (v *NullableCreateSubject) Set(val *CreateSubject) { + v.value = val + v.isSet = true +} + +func (v NullableCreateSubject) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateSubject) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateSubject(val *CreateSubject) *NullableCreateSubject { + return &NullableCreateSubject{value: val, isSet: true} +} + +func (v NullableCreateSubject) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateSubject) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/stackstate_openapi/openapi_version b/stackstate_openapi/openapi_version index 4744dc1e..7a3669dd 100644 --- a/stackstate_openapi/openapi_version +++ b/stackstate_openapi/openapi_version @@ -1 +1 @@ -4f5c1c4dd1c960d52bd7d68142995638c38a48cb \ No newline at end of file +69b0921eca6bff1d2a3d8ad6327fc171571797ad From 7ee794883bbc4a32a8bead830ca4050f1bb31572 Mon Sep 17 00:00:00 2001 From: Frank van Lankvelt Date: Wed, 18 Jun 2025 14:15:11 +0200 Subject: [PATCH 4/4] STAC-22844: fix import ordering --- cmd/rbac/rbac_create_subject_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/rbac/rbac_create_subject_test.go b/cmd/rbac/rbac_create_subject_test.go index fb00e7d9..f4bbe145 100644 --- a/cmd/rbac/rbac_create_subject_test.go +++ b/cmd/rbac/rbac_create_subject_test.go @@ -2,9 +2,9 @@ package rbac import ( "fmt" - "github.com/stackvista/stackstate-cli/generated/stackstate_api" "testing" + "github.com/stackvista/stackstate-cli/generated/stackstate_api" "github.com/stackvista/stackstate-cli/internal/di" "github.com/stretchr/testify/assert" )