From 755715af5bce356ab0be88378fac6c8981a96a25 Mon Sep 17 00:00:00 2001 From: Alejandro Acevedo Date: Thu, 20 Feb 2025 17:12:25 +0100 Subject: [PATCH] STAC-0: Drop status field --- .../topologysync_describe_test.go | 4 +- cmd/topologysync/topologysync_list.go | 3 +- cmd/topologysync/topologysync_list_test.go | 18 +- .../stackstate_api/.openapi-generator/FILES | 24 +- generated/stackstate_api/README.md | 12 +- generated/stackstate_api/api/openapi.yaml | 291 +++++++++++++++++- generated/stackstate_api/api_timeline.go | 243 +++++++++++++++ .../stackstate_api/api_user_authorization.go | 228 ++++++++++++++ generated/stackstate_api/client.go | 6 + .../docs/ComponentViewArguments.md | 98 ++++++ generated/stackstate_api/docs/EventFilters.md | 134 ++++++++ .../stackstate_api/docs/QueryViewArguments.md | 98 ++++++ generated/stackstate_api/docs/TimelineApi.md | 75 +++++ .../stackstate_api/docs/TimelineSummary.md | 93 ++++++ .../docs/TimelineSummaryError.md | 51 +++ .../docs/TimelineSummaryEventBucket.md | 119 +++++++ .../docs/TimelineSummaryHealthChange.md | 93 ++++++ .../docs/TimelineSummaryRequest.md | 145 +++++++++ .../docs/TimelineSummaryRequestArguments.md | 119 +++++++ .../docs/TopologyStreamListItem.md | 23 +- .../stackstate_api/docs/TopologySyncStatus.md | 17 - .../docs/UserAuthorizationApi.md | 73 +++++ .../model_component_view_arguments.go | 173 +++++++++++ .../stackstate_api/model_event_filters.go | 222 +++++++++++++ .../model_query_view_arguments.go | 173 +++++++++++ .../stackstate_api/model_timeline_summary.go | 165 ++++++++++ .../model_timeline_summary_error.go | 107 +++++++ .../model_timeline_summary_event_bucket.go | 201 ++++++++++++ .../model_timeline_summary_health_change.go | 165 ++++++++++ .../model_timeline_summary_request.go | 239 ++++++++++++++ ...odel_timeline_summary_request_arguments.go | 140 +++++++++ .../model_topology_stream_list_item.go | 47 +-- .../model_topology_sync_status.go | 115 ------- stackstate_openapi/openapi_version | 2 +- 34 files changed, 3493 insertions(+), 223 deletions(-) create mode 100644 generated/stackstate_api/api_timeline.go create mode 100644 generated/stackstate_api/api_user_authorization.go create mode 100644 generated/stackstate_api/docs/ComponentViewArguments.md create mode 100644 generated/stackstate_api/docs/EventFilters.md create mode 100644 generated/stackstate_api/docs/QueryViewArguments.md create mode 100644 generated/stackstate_api/docs/TimelineApi.md create mode 100644 generated/stackstate_api/docs/TimelineSummary.md create mode 100644 generated/stackstate_api/docs/TimelineSummaryError.md create mode 100644 generated/stackstate_api/docs/TimelineSummaryEventBucket.md create mode 100644 generated/stackstate_api/docs/TimelineSummaryHealthChange.md create mode 100644 generated/stackstate_api/docs/TimelineSummaryRequest.md create mode 100644 generated/stackstate_api/docs/TimelineSummaryRequestArguments.md delete mode 100644 generated/stackstate_api/docs/TopologySyncStatus.md create mode 100644 generated/stackstate_api/docs/UserAuthorizationApi.md create mode 100644 generated/stackstate_api/model_component_view_arguments.go create mode 100644 generated/stackstate_api/model_event_filters.go create mode 100644 generated/stackstate_api/model_query_view_arguments.go create mode 100644 generated/stackstate_api/model_timeline_summary.go create mode 100644 generated/stackstate_api/model_timeline_summary_error.go create mode 100644 generated/stackstate_api/model_timeline_summary_event_bucket.go create mode 100644 generated/stackstate_api/model_timeline_summary_health_change.go create mode 100644 generated/stackstate_api/model_timeline_summary_request.go create mode 100644 generated/stackstate_api/model_timeline_summary_request_arguments.go delete mode 100644 generated/stackstate_api/model_topology_sync_status.go diff --git a/cmd/topologysync/topologysync_describe_test.go b/cmd/topologysync/topologysync_describe_test.go index 44edccc5..c517602a 100644 --- a/cmd/topologysync/topologysync_describe_test.go +++ b/cmd/topologysync/topologysync_describe_test.go @@ -85,9 +85,9 @@ func TestTopologySyncDescribeErrors(t *testing.T) { expectedTableCall := []printer.TableData{ { - Header: []string{"Id", "Name", "Identifier", "Status", "Components", "Relations", "Errors"}, + Header: []string{"Id", "Name", "Identifier", "Components", "Relations", "Errors"}, Data: [][]interface{}{ - {Topo1.NodeId, Topo1.Name, "-", Topo1.Status, "+0 -0", "+0 -0", int64(0)}, + {Topo1.NodeId, Topo1.Name, "-", "+0 -0", "+0 -0", int64(0)}, }, MissingTableDataMsg: printer.NotFoundMsg{Types: "synchronizations"}, }, diff --git a/cmd/topologysync/topologysync_list.go b/cmd/topologysync/topologysync_list.go index af178a85..5fb43ca8 100644 --- a/cmd/topologysync/topologysync_list.go +++ b/cmd/topologysync/topologysync_list.go @@ -33,14 +33,13 @@ func FormatSyncTable(streams []stackstate_api.TopologyStreamListItem) printer.Ta stream.NodeId, stream.Name, identifier, - stream.Status, fmt.Sprintf("+%-4d %5s", stream.CreatedComponents, fmt.Sprintf("-%d", stream.DeletedComponents)), fmt.Sprintf("+%-4d %5s", stream.CreatedRelations, fmt.Sprintf("-%d", stream.DeletedRelations)), stream.Errors, } } return printer.TableData{ - Header: []string{"Id", "Name", "Identifier", "Status", "Components", "Relations", "Errors"}, + Header: []string{"Id", "Name", "Identifier", "Components", "Relations", "Errors"}, Data: data, MissingTableDataMsg: printer.NotFoundMsg{Types: "synchronizations"}, } diff --git a/cmd/topologysync/topologysync_list_test.go b/cmd/topologysync/topologysync_list_test.go index cd567dcb..0b60c5bb 100644 --- a/cmd/topologysync/topologysync_list_test.go +++ b/cmd/topologysync/topologysync_list_test.go @@ -10,12 +10,12 @@ import ( ) var ( - Topo1 = stackstate_api.NewTopologyStreamListItem(int64(23), "Topo 1", 0, 0, 0, 0, 0, stackstate_api.TOPOLOGYSYNCSTATUS_RUNNING) - Topo2 = stackstate_api.NewTopologyStreamListItem(5, "Topo 2", 23, 5, 23, 5, 0, stackstate_api.TOPOLOGYSYNCSTATUS_DELETING) + Topo1 = stackstate_api.NewTopologyStreamListItem(int64(23), "Topo 1", 0, 0, 0, 0, 0) + Topo2 = stackstate_api.NewTopologyStreamListItem(5, "Topo 2", 23, 5, 23, 5, 0) - Topo3 = stackstate_api.NewTopologyStreamListItem(13, "Topo 3", 12345, 23, 23, 12345, 1, stackstate_api.TOPOLOGYSYNCSTATUS_DELETE_FAILED) + Topo3 = stackstate_api.NewTopologyStreamListItem(13, "Topo 3", 12345, 23, 23, 12345, 1) - Topo4 = stackstate_api.NewTopologyStreamListItem(7, "Topo 4", 12345, 12345, 12345, 12345, 23, stackstate_api.TOPOLOGYSYNCSTATUS_RESETTING) + Topo4 = stackstate_api.NewTopologyStreamListItem(7, "Topo 4", 12345, 12345, 12345, 12345, 23) AllTopos = []stackstate_api.TopologyStreamListItem{*Topo1, *Topo2, *Topo3, *Topo4} @@ -31,12 +31,12 @@ func TestTopologySyncListTable(t *testing.T) { expectedTableCall := []printer.TableData{ { - Header: []string{"Id", "Name", "Identifier", "Status", "Components", "Relations", "Errors"}, + Header: []string{"Id", "Name", "Identifier", "Components", "Relations", "Errors"}, Data: [][]interface{}{ - {Topo1.NodeId, Topo1.Name, "-", Topo1.Status, "+0 -0", "+0 -0", int64(0)}, - {Topo2.NodeId, Topo2.Name, "-", Topo2.Status, "+23 -5", "+23 -5", int64(0)}, - {Topo3.NodeId, Topo3.Name, "-", Topo3.Status, "+23 -12345", "+12345 -23", int64(1)}, - {Topo4.NodeId, Topo4.Name, "-", Topo4.Status, "+12345 -12345", "+12345 -12345", int64(23)}, + {Topo1.NodeId, Topo1.Name, "-", "+0 -0", "+0 -0", int64(0)}, + {Topo2.NodeId, Topo2.Name, "-", "+23 -5", "+23 -5", int64(0)}, + {Topo3.NodeId, Topo3.Name, "-", "+23 -12345", "+12345 -23", int64(1)}, + {Topo4.NodeId, Topo4.Name, "-", "+12345 -12345", "+12345 -12345", int64(23)}, }, MissingTableDataMsg: printer.NotFoundMsg{Types: "synchronizations"}, }, diff --git a/generated/stackstate_api/.openapi-generator/FILES b/generated/stackstate_api/.openapi-generator/FILES index ab4e930a..dadf25bc 100644 --- a/generated/stackstate_api/.openapi-generator/FILES +++ b/generated/stackstate_api/.openapi-generator/FILES @@ -31,9 +31,11 @@ api_stackpack.go api_subject.go api_subscription.go api_system_notifications.go +api_timeline.go api_topic.go api_topology_synchronization.go api_traces.go +api_user_authorization.go api_user_profile.go api_user_session.go client.go @@ -81,6 +83,7 @@ docs/ComponentHighlightMetricSection.md docs/ComponentHighlightMetricSectionAllOf.md docs/ComponentNotFoundError.md docs/ComponentQuery.md +docs/ComponentViewArguments.md docs/CreateSubject.md docs/DataUnavailable.md docs/DependencyDirection.md @@ -100,6 +103,7 @@ docs/EventCategoryBucket.md docs/EventComponent.md docs/EventCursor.md docs/EventElement.md +docs/EventFilters.md docs/EventItemsWithTotal.md docs/EventListRequest.md docs/EventNotFoundError.md @@ -297,6 +301,7 @@ docs/PromSeriesEnvelope.md docs/PromVector.md docs/PromVectorResult.md docs/ProvisionResponse.md +docs/QueryViewArguments.md docs/ReleaseStatus.md docs/RequestError.md docs/RequestValidationError.md @@ -359,6 +364,13 @@ docs/TeamsChannelRefId.md docs/TeamsChannelWriteSchema.md docs/TeamsNotificationChannel.md docs/TeamsNotificationChannelAllOf.md +docs/TimelineApi.md +docs/TimelineSummary.md +docs/TimelineSummaryError.md +docs/TimelineSummaryEventBucket.md +docs/TimelineSummaryHealthChange.md +docs/TimelineSummaryRequest.md +docs/TimelineSummaryRequestArguments.md docs/TooManyActiveQueries.md docs/TooManyTopologyResults.md docs/Topic.md @@ -373,7 +385,6 @@ docs/TopologyStreamListItem.md docs/TopologyStreamListItemWithErrorDetails.md docs/TopologyStreamMetrics.md docs/TopologySyncError.md -docs/TopologySyncStatus.md docs/TopologySynchronizationApi.md docs/TopologyTimeOutOfRange.md docs/Trace.md @@ -391,6 +402,7 @@ docs/Traces.md docs/TracesApi.md docs/UnlicensedSubscription.md docs/UnmatchedCheckState.md +docs/UserAuthorizationApi.md docs/UserNameMismatchError.md docs/UserNotFoundError.md docs/UserNotLoggedInError.md @@ -444,6 +456,7 @@ model_component_highlight_metric_section.go 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_data_unavailable.go model_dependency_direction.go @@ -461,6 +474,7 @@ model_event_category_bucket.go model_event_component.go model_event_cursor.go model_event_element.go +model_event_filters.go model_event_items_with_total.go model_event_list_request.go model_event_not_found_error.go @@ -644,6 +658,7 @@ model_prom_series_envelope.go model_prom_vector.go model_prom_vector_result.go model_provision_response.go +model_query_view_arguments.go model_release_status.go model_request_error.go model_request_validation_error.go @@ -699,6 +714,12 @@ model_teams_channel_ref_id.go model_teams_channel_write_schema.go model_teams_notification_channel.go model_teams_notification_channel_all_of.go +model_timeline_summary.go +model_timeline_summary_error.go +model_timeline_summary_event_bucket.go +model_timeline_summary_health_change.go +model_timeline_summary_request.go +model_timeline_summary_request_arguments.go model_too_many_active_queries.go model_too_many_topology_results.go model_topic.go @@ -712,7 +733,6 @@ model_topology_stream_list_item.go model_topology_stream_list_item_with_error_details.go model_topology_stream_metrics.go model_topology_sync_error.go -model_topology_sync_status.go model_topology_time_out_of_range.go model_trace.go model_trace_api_error.go diff --git a/generated/stackstate_api/README.md b/generated/stackstate_api/README.md index f9f39d69..1947df1f 100644 --- a/generated/stackstate_api/README.md +++ b/generated/stackstate_api/README.md @@ -211,6 +211,7 @@ Class | Method | HTTP request | Description *SubscriptionApi* | [**GetSubscription**](docs/SubscriptionApi.md#getsubscription) | **Get** /subscription | Get subscription info *SubscriptionApi* | [**PostSubscription**](docs/SubscriptionApi.md#postsubscription) | **Post** /subscription | Submit a new license to update the subscription *SystemNotificationsApi* | [**AllSystemNotifications**](docs/SystemNotificationsApi.md#allsystemnotifications) | **Get** /system/notifications | Overview of system notifications +*TimelineApi* | [**GetTimelineSummary**](docs/TimelineApi.md#gettimelinesummary) | **Post** /timeline/summary | Timeline summary *TopicApi* | [**Describe**](docs/TopicApi.md#describe) | **Get** /topic/{topic} | Describe a topic *TopicApi* | [**List**](docs/TopicApi.md#list) | **Get** /topic | List topics *TopologySynchronizationApi* | [**GetTopologySynchronizationStreamById**](docs/TopologySynchronizationApi.md#gettopologysynchronizationstreambyid) | **Get** /synchronization/topology/streams/sync | Overview of a specific Topology Stream, queried by node id or sync identifier @@ -225,6 +226,7 @@ Class | Method | HTTP request | Description *TracesApi* | [**SuggestionsAttributeName**](docs/TracesApi.md#suggestionsattributename) | **Get** /traces/spans/fields/attributes | Suggestions for attribute names *TracesApi* | [**SuggestionsAttributeValue**](docs/TracesApi.md#suggestionsattributevalue) | **Get** /traces/spans/fields/attributes/{attributeName}/values | Suggestions for attribute values *TracesApi* | [**SuggestionsFieldValues**](docs/TracesApi.md#suggestionsfieldvalues) | **Get** /traces/spans/fields/{field}/values | Suggestions for span fields +*UserAuthorizationApi* | [**GetUserAuthorizationFor**](docs/UserAuthorizationApi.md#getuserauthorizationfor) | **Get** /user/authorization/for | Is the current user authorized for the provided permission *UserProfileApi* | [**GetCurrentUserProfile**](docs/UserProfileApi.md#getcurrentuserprofile) | **Get** /user/profile | Get current user profile *UserProfileApi* | [**SaveCurrentUserProfile**](docs/UserProfileApi.md#savecurrentuserprofile) | **Put** /user/profile | Save current user profile *UserSessionApi* | [**GetUserSessionAssumedRole**](docs/UserSessionApi.md#getusersessionassumedrole) | **Get** /user/session/assumedRole | Get the assumed a role for the current session @@ -272,6 +274,7 @@ Class | Method | HTTP request | Description - [ComponentHighlightMetricSectionAllOf](docs/ComponentHighlightMetricSectionAllOf.md) - [ComponentNotFoundError](docs/ComponentNotFoundError.md) - [ComponentQuery](docs/ComponentQuery.md) + - [ComponentViewArguments](docs/ComponentViewArguments.md) - [CreateSubject](docs/CreateSubject.md) - [DataUnavailable](docs/DataUnavailable.md) - [DependencyDirection](docs/DependencyDirection.md) @@ -289,6 +292,7 @@ Class | Method | HTTP request | Description - [EventComponent](docs/EventComponent.md) - [EventCursor](docs/EventCursor.md) - [EventElement](docs/EventElement.md) + - [EventFilters](docs/EventFilters.md) - [EventItemsWithTotal](docs/EventItemsWithTotal.md) - [EventListRequest](docs/EventListRequest.md) - [EventNotFoundError](docs/EventNotFoundError.md) @@ -472,6 +476,7 @@ Class | Method | HTTP request | Description - [PromVector](docs/PromVector.md) - [PromVectorResult](docs/PromVectorResult.md) - [ProvisionResponse](docs/ProvisionResponse.md) + - [QueryViewArguments](docs/QueryViewArguments.md) - [ReleaseStatus](docs/ReleaseStatus.md) - [RequestError](docs/RequestError.md) - [RequestValidationError](docs/RequestValidationError.md) @@ -527,6 +532,12 @@ Class | Method | HTTP request | Description - [TeamsChannelWriteSchema](docs/TeamsChannelWriteSchema.md) - [TeamsNotificationChannel](docs/TeamsNotificationChannel.md) - [TeamsNotificationChannelAllOf](docs/TeamsNotificationChannelAllOf.md) + - [TimelineSummary](docs/TimelineSummary.md) + - [TimelineSummaryError](docs/TimelineSummaryError.md) + - [TimelineSummaryEventBucket](docs/TimelineSummaryEventBucket.md) + - [TimelineSummaryHealthChange](docs/TimelineSummaryHealthChange.md) + - [TimelineSummaryRequest](docs/TimelineSummaryRequest.md) + - [TimelineSummaryRequestArguments](docs/TimelineSummaryRequestArguments.md) - [TooManyActiveQueries](docs/TooManyActiveQueries.md) - [TooManyTopologyResults](docs/TooManyTopologyResults.md) - [Topic](docs/Topic.md) @@ -540,7 +551,6 @@ Class | Method | HTTP request | Description - [TopologyStreamListItemWithErrorDetails](docs/TopologyStreamListItemWithErrorDetails.md) - [TopologyStreamMetrics](docs/TopologyStreamMetrics.md) - [TopologySyncError](docs/TopologySyncError.md) - - [TopologySyncStatus](docs/TopologySyncStatus.md) - [TopologyTimeOutOfRange](docs/TopologyTimeOutOfRange.md) - [Trace](docs/Trace.md) - [TraceApiError](docs/TraceApiError.md) diff --git a/generated/stackstate_api/api/openapi.yaml b/generated/stackstate_api/api/openapi.yaml index 1fdd41be..4c7f287c 100644 --- a/generated/stackstate_api/api/openapi.yaml +++ b/generated/stackstate_api/api/openapi.yaml @@ -2597,6 +2597,34 @@ paths: summary: Get a list of available roles for this session tags: - userSession + /user/authorization/for: + get: + description: Is the current user authorized for the provided permission + operationId: getUserAuthorizationFor + parameters: + - in: query + name: permission + required: true + schema: + type: string + responses: + "204": + description: User is authorized + "400": + description: Provided permission does not exist + "401": + description: User is not authorized + "403": + description: User is forbidden for the provided permission + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericErrorsResponse' + description: Error when handling the request on the server side. + summary: Is the current user authorized for the provided permission + tags: + - userAuthorization /events: post: description: Gets you a list of events that exist for topology and time selections. @@ -5635,6 +5663,30 @@ paths: summary: Overview of system notifications tags: - systemNotifications + /timeline/summary: + post: + description: Event summary and aggregated health changes for a topology over + a range of time + operationId: getTimelineSummary + requestBody: + $ref: '#/components/requestBodies/timelineSummaryRequest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/TimelineSummary' + description: Event summary and aggregated health changes over a range of + time + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/TimelineSummaryError' + description: Errors when computing events and health state + summary: Timeline summary + tags: + - timeline /dummy/dummy: get: description: "" @@ -5769,6 +5821,13 @@ components: $ref: '#/components/schemas/ComponentQuery' description: Span properties to find matching components required: true + timelineSummaryRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/TimelineSummaryRequest' + description: Request for event summary and aggregated health over time + required: true responses: genericErrorsResponse: content: @@ -6334,6 +6393,18 @@ components: schema: $ref: '#/components/schemas/ComponentNotFoundError' description: Component not found error + timelineSummaryResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/TimelineSummary' + description: Event summary and aggregated health changes over a range of time + timelineSummaryErrorResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/TimelineSummaryError' + description: Errors when computing events and health state stackElementNotFound: content: application/json: @@ -9815,7 +9886,6 @@ components: nodeId: 0 errors: 2 createdComponents: 5 - status: null - syncIdentifier: syncIdentifier createdRelations: 6 deletedComponents: 5 @@ -9824,7 +9894,6 @@ components: nodeId: 0 errors: 2 createdComponents: 5 - status: null properties: streams: items: @@ -9843,7 +9912,6 @@ components: nodeId: 0 errors: 2 createdComponents: 5 - status: null properties: syncIdentifier: nullable: true @@ -9868,8 +9936,6 @@ components: errors: format: int64 type: integer - status: - $ref: '#/components/schemas/TopologySyncStatus' required: - createdComponents - createdRelations @@ -9878,15 +9944,7 @@ components: - errors - name - nodeId - - status type: object - TopologySyncStatus: - enum: - - Running - - Resetting - - Deleting - - DeleteFailed - type: string TopologyStreamListItemWithErrorDetails: example: item: @@ -9898,7 +9956,6 @@ components: nodeId: 0 errors: 2 createdComponents: 5 - status: null errorDetails: - level: null externalId: externalId @@ -12862,6 +12919,205 @@ components: - warning - problem type: string + TimelineSummaryRequest: + example: + eventFilters: + types: + - types + - types + sources: + - sources + - sources + categories: + - categories + - categories + tags: + - tags + - tags + arguments: null + startTime: 0 + endTime: 6 + histogramBucketCount: 1 + properties: + arguments: + $ref: '#/components/schemas/TimelineSummaryRequest_arguments' + startTime: + description: Date/time representation in milliseconds since epoch (1970-01-01 + 00:00:00) + format: instant + type: integer + endTime: + description: Date/time representation in milliseconds since epoch (1970-01-01 + 00:00:00) + format: instant + type: integer + histogramBucketCount: + type: integer + eventFilters: + $ref: '#/components/schemas/EventFilters' + required: + - arguments + - histogramBucketCount + - startTime + type: object + ComponentViewArguments: + properties: + _type: + enum: + - ComponentViewArguments + type: string + componentIdentifier: + type: string + queryTime: + description: Date/time representation in milliseconds since epoch (1970-01-01 + 00:00:00) + format: instant + type: integer + required: + - _type + - componentIdentifier + type: object + QueryViewArguments: + properties: + _type: + enum: + - QueryViewArguments + type: string + query: + type: string + queryTime: + description: Date/time representation in milliseconds since epoch (1970-01-01 + 00:00:00) + format: instant + type: integer + required: + - _type + - query + type: object + EventFilters: + example: + types: + - types + - types + sources: + - sources + - sources + categories: + - categories + - categories + tags: + - tags + - tags + properties: + types: + items: + type: string + type: array + tags: + items: + type: string + type: array + categories: + items: + type: string + type: array + sources: + items: + type: string + type: array + type: object + TimelineSummary: + example: + healthHistory: + - newHealth: null + _type: TimelineSummaryHealthChange + timestamp: 5 + - newHealth: null + _type: TimelineSummaryHealthChange + timestamp: 5 + buckets: + - _type: TimelineSummaryEventBucket + count: 0 + endTimeEpochMillis: 1 + startTimeEpochMillis: 6 + - _type: TimelineSummaryEventBucket + count: 0 + endTimeEpochMillis: 1 + startTimeEpochMillis: 6 + fromTime: 5 + properties: + buckets: + items: + $ref: '#/components/schemas/TimelineSummaryEventBucket' + type: array + healthHistory: + items: + $ref: '#/components/schemas/TimelineSummaryHealthChange' + type: array + fromTime: + format: int64 + type: integer + required: + - buckets + - fromTime + - healthHistory + type: object + TimelineSummaryEventBucket: + discriminator: + propertyName: _type + example: + _type: TimelineSummaryEventBucket + count: 0 + endTimeEpochMillis: 1 + startTimeEpochMillis: 6 + properties: + _type: + enum: + - TimelineSummaryEventBucket + type: string + count: + format: int64 + type: integer + startTimeEpochMillis: + format: int64 + type: integer + endTimeEpochMillis: + format: int64 + type: integer + required: + - _type + - count + - startTimeEpochMillis + type: object + TimelineSummaryHealthChange: + discriminator: + propertyName: _type + example: + newHealth: null + _type: TimelineSummaryHealthChange + timestamp: 5 + properties: + _type: + enum: + - TimelineSummaryHealthChange + type: string + timestamp: + format: int64 + type: integer + newHealth: + $ref: '#/components/schemas/HealthStateValue' + required: + - _type + - newHealth + - timestamp + type: object + TimelineSummaryError: + properties: + message: + type: string + required: + - message + type: object StackElementNotFound: discriminator: propertyName: _type @@ -13627,6 +13883,13 @@ components: required: - _type type: object + TimelineSummaryRequest_arguments: + discriminator: + propertyName: _type + oneOf: + - $ref: '#/components/schemas/ComponentViewArguments' + - $ref: '#/components/schemas/QueryViewArguments' + type: object securitySchemes: ApiToken: description: | diff --git a/generated/stackstate_api/api_timeline.go b/generated/stackstate_api/api_timeline.go new file mode 100644 index 00000000..67b82cbe --- /dev/null +++ b/generated/stackstate_api/api_timeline.go @@ -0,0 +1,243 @@ +/* +StackState API + +This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). + +API version: 5.2.0 +Contact: info@stackstate.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackstate_api + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" +) + +type TimelineApi interface { + + /* + GetTimelineSummary Timeline summary + + Event summary and aggregated health changes for a topology over a range of time + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetTimelineSummaryRequest + */ + GetTimelineSummary(ctx context.Context) ApiGetTimelineSummaryRequest + + // GetTimelineSummaryExecute executes the request + // @return TimelineSummary + GetTimelineSummaryExecute(r ApiGetTimelineSummaryRequest) (*TimelineSummary, *http.Response, error) +} + +// TimelineApiService TimelineApi service +type TimelineApiService service + +type ApiGetTimelineSummaryRequest struct { + ctx context.Context + ApiService TimelineApi + timelineSummaryRequest *TimelineSummaryRequest +} + +// Request for event summary and aggregated health over time +func (r ApiGetTimelineSummaryRequest) TimelineSummaryRequest(timelineSummaryRequest TimelineSummaryRequest) ApiGetTimelineSummaryRequest { + r.timelineSummaryRequest = &timelineSummaryRequest + return r +} + +func (r ApiGetTimelineSummaryRequest) Execute() (*TimelineSummary, *http.Response, error) { + return r.ApiService.GetTimelineSummaryExecute(r) +} + +/* +GetTimelineSummary Timeline summary + +Event summary and aggregated health changes for a topology over a range of time + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetTimelineSummaryRequest +*/ +func (a *TimelineApiService) GetTimelineSummary(ctx context.Context) ApiGetTimelineSummaryRequest { + return ApiGetTimelineSummaryRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return TimelineSummary +func (a *TimelineApiService) GetTimelineSummaryExecute(r ApiGetTimelineSummaryRequest) (*TimelineSummary, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TimelineSummary + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TimelineApiService.GetTimelineSummary") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/timeline/summary" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.timelineSummaryRequest == nil { + return localVarReturnValue, nil, reportError("timelineSummaryRequest 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.timelineSummaryRequest + 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 TimelineSummaryError + 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 TimelineApiMock struct { + GetTimelineSummaryCalls *[]GetTimelineSummaryCall + GetTimelineSummaryResponse GetTimelineSummaryMockResponse +} + +func NewTimelineApiMock() TimelineApiMock { + xGetTimelineSummaryCalls := make([]GetTimelineSummaryCall, 0) + return TimelineApiMock{ + GetTimelineSummaryCalls: &xGetTimelineSummaryCalls, + } +} + +type GetTimelineSummaryMockResponse struct { + Result TimelineSummary + Response *http.Response + Error error +} + +type GetTimelineSummaryCall struct { + PtimelineSummaryRequest *TimelineSummaryRequest +} + +func (mock TimelineApiMock) GetTimelineSummary(ctx context.Context) ApiGetTimelineSummaryRequest { + return ApiGetTimelineSummaryRequest{ + ApiService: mock, + ctx: ctx, + } +} + +func (mock TimelineApiMock) GetTimelineSummaryExecute(r ApiGetTimelineSummaryRequest) (*TimelineSummary, *http.Response, error) { + p := GetTimelineSummaryCall{ + PtimelineSummaryRequest: r.timelineSummaryRequest, + } + *mock.GetTimelineSummaryCalls = append(*mock.GetTimelineSummaryCalls, p) + return &mock.GetTimelineSummaryResponse.Result, mock.GetTimelineSummaryResponse.Response, mock.GetTimelineSummaryResponse.Error +} diff --git a/generated/stackstate_api/api_user_authorization.go b/generated/stackstate_api/api_user_authorization.go new file mode 100644 index 00000000..9bcc3648 --- /dev/null +++ b/generated/stackstate_api/api_user_authorization.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 ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" +) + +type UserAuthorizationApi interface { + + /* + GetUserAuthorizationFor Is the current user authorized for the provided permission + + Is the current user authorized for the provided permission + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetUserAuthorizationForRequest + */ + GetUserAuthorizationFor(ctx context.Context) ApiGetUserAuthorizationForRequest + + // GetUserAuthorizationForExecute executes the request + GetUserAuthorizationForExecute(r ApiGetUserAuthorizationForRequest) (*http.Response, error) +} + +// UserAuthorizationApiService UserAuthorizationApi service +type UserAuthorizationApiService service + +type ApiGetUserAuthorizationForRequest struct { + ctx context.Context + ApiService UserAuthorizationApi + permission *string +} + +func (r ApiGetUserAuthorizationForRequest) Permission(permission string) ApiGetUserAuthorizationForRequest { + r.permission = &permission + return r +} + +func (r ApiGetUserAuthorizationForRequest) Execute() (*http.Response, error) { + return r.ApiService.GetUserAuthorizationForExecute(r) +} + +/* +GetUserAuthorizationFor Is the current user authorized for the provided permission + +Is the current user authorized for the provided permission + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetUserAuthorizationForRequest +*/ +func (a *UserAuthorizationApiService) GetUserAuthorizationFor(ctx context.Context) ApiGetUserAuthorizationForRequest { + return ApiGetUserAuthorizationForRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *UserAuthorizationApiService) GetUserAuthorizationForExecute(r ApiGetUserAuthorizationForRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserAuthorizationApiService.GetUserAuthorizationFor") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/user/authorization/for" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.permission == nil { + return nil, reportError("permission is required and must be specified") + } + + localVarQueryParams.Add("permission", parameterToString(*r.permission, "")) + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiToken"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-Token"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ServiceBearer"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-ServiceBearer"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ServiceToken"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v GenericErrorsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +// --------------------------------------------- +// ------------------ MOCKS -------------------- +// --------------------------------------------- + +type UserAuthorizationApiMock struct { + GetUserAuthorizationForCalls *[]GetUserAuthorizationForCall + GetUserAuthorizationForResponse GetUserAuthorizationForMockResponse +} + +func NewUserAuthorizationApiMock() UserAuthorizationApiMock { + xGetUserAuthorizationForCalls := make([]GetUserAuthorizationForCall, 0) + return UserAuthorizationApiMock{ + GetUserAuthorizationForCalls: &xGetUserAuthorizationForCalls, + } +} + +type GetUserAuthorizationForMockResponse struct { + Response *http.Response + Error error +} + +type GetUserAuthorizationForCall struct { + Ppermission *string +} + +func (mock UserAuthorizationApiMock) GetUserAuthorizationFor(ctx context.Context) ApiGetUserAuthorizationForRequest { + return ApiGetUserAuthorizationForRequest{ + ApiService: mock, + ctx: ctx, + } +} + +func (mock UserAuthorizationApiMock) GetUserAuthorizationForExecute(r ApiGetUserAuthorizationForRequest) (*http.Response, error) { + p := GetUserAuthorizationForCall{ + Ppermission: r.permission, + } + *mock.GetUserAuthorizationForCalls = append(*mock.GetUserAuthorizationForCalls, p) + return mock.GetUserAuthorizationForResponse.Response, mock.GetUserAuthorizationForResponse.Error +} diff --git a/generated/stackstate_api/client.go b/generated/stackstate_api/client.go index 71b3ace0..620f0322 100644 --- a/generated/stackstate_api/client.go +++ b/generated/stackstate_api/client.go @@ -106,12 +106,16 @@ type APIClient struct { SystemNotificationsApi SystemNotificationsApi + TimelineApi TimelineApi + TopicApi TopicApi TopologySynchronizationApi TopologySynchronizationApi TracesApi TracesApi + UserAuthorizationApi UserAuthorizationApi + UserProfileApi UserProfileApi UserSessionApi UserSessionApi @@ -161,9 +165,11 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.SubjectApi = (*SubjectApiService)(&c.common) c.SubscriptionApi = (*SubscriptionApiService)(&c.common) c.SystemNotificationsApi = (*SystemNotificationsApiService)(&c.common) + c.TimelineApi = (*TimelineApiService)(&c.common) c.TopicApi = (*TopicApiService)(&c.common) c.TopologySynchronizationApi = (*TopologySynchronizationApiService)(&c.common) c.TracesApi = (*TracesApiService)(&c.common) + c.UserAuthorizationApi = (*UserAuthorizationApiService)(&c.common) c.UserProfileApi = (*UserProfileApiService)(&c.common) c.UserSessionApi = (*UserSessionApiService)(&c.common) diff --git a/generated/stackstate_api/docs/ComponentViewArguments.md b/generated/stackstate_api/docs/ComponentViewArguments.md new file mode 100644 index 00000000..1a84597f --- /dev/null +++ b/generated/stackstate_api/docs/ComponentViewArguments.md @@ -0,0 +1,98 @@ +# ComponentViewArguments + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**ComponentIdentifier** | **string** | | +**QueryTime** | Pointer to **int32** | Date/time representation in milliseconds since epoch (1970-01-01 00:00:00) | [optional] + +## Methods + +### NewComponentViewArguments + +`func NewComponentViewArguments(type_ string, componentIdentifier string, ) *ComponentViewArguments` + +NewComponentViewArguments instantiates a new ComponentViewArguments 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 + +### NewComponentViewArgumentsWithDefaults + +`func NewComponentViewArgumentsWithDefaults() *ComponentViewArguments` + +NewComponentViewArgumentsWithDefaults instantiates a new ComponentViewArguments 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 *ComponentViewArguments) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ComponentViewArguments) 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 *ComponentViewArguments) SetType(v string)` + +SetType sets Type field to given value. + + +### GetComponentIdentifier + +`func (o *ComponentViewArguments) GetComponentIdentifier() string` + +GetComponentIdentifier returns the ComponentIdentifier field if non-nil, zero value otherwise. + +### GetComponentIdentifierOk + +`func (o *ComponentViewArguments) GetComponentIdentifierOk() (*string, bool)` + +GetComponentIdentifierOk returns a tuple with the ComponentIdentifier field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComponentIdentifier + +`func (o *ComponentViewArguments) SetComponentIdentifier(v string)` + +SetComponentIdentifier sets ComponentIdentifier field to given value. + + +### GetQueryTime + +`func (o *ComponentViewArguments) GetQueryTime() int32` + +GetQueryTime returns the QueryTime field if non-nil, zero value otherwise. + +### GetQueryTimeOk + +`func (o *ComponentViewArguments) GetQueryTimeOk() (*int32, bool)` + +GetQueryTimeOk returns a tuple with the QueryTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQueryTime + +`func (o *ComponentViewArguments) SetQueryTime(v int32)` + +SetQueryTime sets QueryTime field to given value. + +### HasQueryTime + +`func (o *ComponentViewArguments) HasQueryTime() bool` + +HasQueryTime 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/EventFilters.md b/generated/stackstate_api/docs/EventFilters.md new file mode 100644 index 00000000..99ef0f60 --- /dev/null +++ b/generated/stackstate_api/docs/EventFilters.md @@ -0,0 +1,134 @@ +# EventFilters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Types** | Pointer to **[]string** | | [optional] +**Tags** | Pointer to **[]string** | | [optional] +**Categories** | Pointer to **[]string** | | [optional] +**Sources** | Pointer to **[]string** | | [optional] + +## Methods + +### NewEventFilters + +`func NewEventFilters() *EventFilters` + +NewEventFilters instantiates a new EventFilters 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 + +### NewEventFiltersWithDefaults + +`func NewEventFiltersWithDefaults() *EventFilters` + +NewEventFiltersWithDefaults instantiates a new EventFilters 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 + +### GetTypes + +`func (o *EventFilters) GetTypes() []string` + +GetTypes returns the Types field if non-nil, zero value otherwise. + +### GetTypesOk + +`func (o *EventFilters) GetTypesOk() (*[]string, bool)` + +GetTypesOk returns a tuple with the Types field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTypes + +`func (o *EventFilters) SetTypes(v []string)` + +SetTypes sets Types field to given value. + +### HasTypes + +`func (o *EventFilters) HasTypes() bool` + +HasTypes returns a boolean if a field has been set. + +### GetTags + +`func (o *EventFilters) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *EventFilters) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *EventFilters) SetTags(v []string)` + +SetTags sets Tags field to given value. + +### HasTags + +`func (o *EventFilters) HasTags() bool` + +HasTags returns a boolean if a field has been set. + +### GetCategories + +`func (o *EventFilters) GetCategories() []string` + +GetCategories returns the Categories field if non-nil, zero value otherwise. + +### GetCategoriesOk + +`func (o *EventFilters) GetCategoriesOk() (*[]string, bool)` + +GetCategoriesOk returns a tuple with the Categories field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCategories + +`func (o *EventFilters) SetCategories(v []string)` + +SetCategories sets Categories field to given value. + +### HasCategories + +`func (o *EventFilters) HasCategories() bool` + +HasCategories returns a boolean if a field has been set. + +### GetSources + +`func (o *EventFilters) GetSources() []string` + +GetSources returns the Sources field if non-nil, zero value otherwise. + +### GetSourcesOk + +`func (o *EventFilters) GetSourcesOk() (*[]string, bool)` + +GetSourcesOk returns a tuple with the Sources field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSources + +`func (o *EventFilters) SetSources(v []string)` + +SetSources sets Sources field to given value. + +### HasSources + +`func (o *EventFilters) HasSources() bool` + +HasSources 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/QueryViewArguments.md b/generated/stackstate_api/docs/QueryViewArguments.md new file mode 100644 index 00000000..ff9d1a38 --- /dev/null +++ b/generated/stackstate_api/docs/QueryViewArguments.md @@ -0,0 +1,98 @@ +# QueryViewArguments + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Query** | **string** | | +**QueryTime** | Pointer to **int32** | Date/time representation in milliseconds since epoch (1970-01-01 00:00:00) | [optional] + +## Methods + +### NewQueryViewArguments + +`func NewQueryViewArguments(type_ string, query string, ) *QueryViewArguments` + +NewQueryViewArguments instantiates a new QueryViewArguments 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 + +### NewQueryViewArgumentsWithDefaults + +`func NewQueryViewArgumentsWithDefaults() *QueryViewArguments` + +NewQueryViewArgumentsWithDefaults instantiates a new QueryViewArguments 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 *QueryViewArguments) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *QueryViewArguments) 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 *QueryViewArguments) SetType(v string)` + +SetType sets Type field to given value. + + +### GetQuery + +`func (o *QueryViewArguments) GetQuery() string` + +GetQuery returns the Query field if non-nil, zero value otherwise. + +### GetQueryOk + +`func (o *QueryViewArguments) 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 *QueryViewArguments) SetQuery(v string)` + +SetQuery sets Query field to given value. + + +### GetQueryTime + +`func (o *QueryViewArguments) GetQueryTime() int32` + +GetQueryTime returns the QueryTime field if non-nil, zero value otherwise. + +### GetQueryTimeOk + +`func (o *QueryViewArguments) GetQueryTimeOk() (*int32, bool)` + +GetQueryTimeOk returns a tuple with the QueryTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQueryTime + +`func (o *QueryViewArguments) SetQueryTime(v int32)` + +SetQueryTime sets QueryTime field to given value. + +### HasQueryTime + +`func (o *QueryViewArguments) HasQueryTime() bool` + +HasQueryTime 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/TimelineApi.md b/generated/stackstate_api/docs/TimelineApi.md new file mode 100644 index 00000000..50c195d6 --- /dev/null +++ b/generated/stackstate_api/docs/TimelineApi.md @@ -0,0 +1,75 @@ +# \TimelineApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetTimelineSummary**](TimelineApi.md#GetTimelineSummary) | **Post** /timeline/summary | Timeline summary + + + +## GetTimelineSummary + +> TimelineSummary GetTimelineSummary(ctx).TimelineSummaryRequest(timelineSummaryRequest).Execute() + +Timeline summary + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + timelineSummaryRequest := *openapiclient.NewTimelineSummaryRequest(openapiclient.TimelineSummaryRequest_arguments{ComponentViewArguments: openapiclient.NewComponentViewArguments("Type_example", "ComponentIdentifier_example")}, int32(123), int32(123)) // TimelineSummaryRequest | Request for event summary and aggregated health over time + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.TimelineApi.GetTimelineSummary(context.Background()).TimelineSummaryRequest(timelineSummaryRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `TimelineApi.GetTimelineSummary``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetTimelineSummary`: TimelineSummary + fmt.Fprintf(os.Stdout, "Response from `TimelineApi.GetTimelineSummary`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetTimelineSummaryRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **timelineSummaryRequest** | [**TimelineSummaryRequest**](TimelineSummaryRequest.md) | Request for event summary and aggregated health over time | + +### Return type + +[**TimelineSummary**](TimelineSummary.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/TimelineSummary.md b/generated/stackstate_api/docs/TimelineSummary.md new file mode 100644 index 00000000..65af0fa8 --- /dev/null +++ b/generated/stackstate_api/docs/TimelineSummary.md @@ -0,0 +1,93 @@ +# TimelineSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Buckets** | [**[]TimelineSummaryEventBucket**](TimelineSummaryEventBucket.md) | | +**HealthHistory** | [**[]TimelineSummaryHealthChange**](TimelineSummaryHealthChange.md) | | +**FromTime** | **int64** | | + +## Methods + +### NewTimelineSummary + +`func NewTimelineSummary(buckets []TimelineSummaryEventBucket, healthHistory []TimelineSummaryHealthChange, fromTime int64, ) *TimelineSummary` + +NewTimelineSummary instantiates a new TimelineSummary 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 + +### NewTimelineSummaryWithDefaults + +`func NewTimelineSummaryWithDefaults() *TimelineSummary` + +NewTimelineSummaryWithDefaults instantiates a new TimelineSummary 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 + +### GetBuckets + +`func (o *TimelineSummary) GetBuckets() []TimelineSummaryEventBucket` + +GetBuckets returns the Buckets field if non-nil, zero value otherwise. + +### GetBucketsOk + +`func (o *TimelineSummary) GetBucketsOk() (*[]TimelineSummaryEventBucket, bool)` + +GetBucketsOk returns a tuple with the Buckets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBuckets + +`func (o *TimelineSummary) SetBuckets(v []TimelineSummaryEventBucket)` + +SetBuckets sets Buckets field to given value. + + +### GetHealthHistory + +`func (o *TimelineSummary) GetHealthHistory() []TimelineSummaryHealthChange` + +GetHealthHistory returns the HealthHistory field if non-nil, zero value otherwise. + +### GetHealthHistoryOk + +`func (o *TimelineSummary) GetHealthHistoryOk() (*[]TimelineSummaryHealthChange, bool)` + +GetHealthHistoryOk returns a tuple with the HealthHistory field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHealthHistory + +`func (o *TimelineSummary) SetHealthHistory(v []TimelineSummaryHealthChange)` + +SetHealthHistory sets HealthHistory field to given value. + + +### GetFromTime + +`func (o *TimelineSummary) GetFromTime() int64` + +GetFromTime returns the FromTime field if non-nil, zero value otherwise. + +### GetFromTimeOk + +`func (o *TimelineSummary) GetFromTimeOk() (*int64, bool)` + +GetFromTimeOk returns a tuple with the FromTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFromTime + +`func (o *TimelineSummary) SetFromTime(v int64)` + +SetFromTime sets FromTime 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/TimelineSummaryError.md b/generated/stackstate_api/docs/TimelineSummaryError.md new file mode 100644 index 00000000..c136d7c0 --- /dev/null +++ b/generated/stackstate_api/docs/TimelineSummaryError.md @@ -0,0 +1,51 @@ +# TimelineSummaryError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | | + +## Methods + +### NewTimelineSummaryError + +`func NewTimelineSummaryError(message string, ) *TimelineSummaryError` + +NewTimelineSummaryError instantiates a new TimelineSummaryError 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 + +### NewTimelineSummaryErrorWithDefaults + +`func NewTimelineSummaryErrorWithDefaults() *TimelineSummaryError` + +NewTimelineSummaryErrorWithDefaults instantiates a new TimelineSummaryError 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 *TimelineSummaryError) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *TimelineSummaryError) 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 *TimelineSummaryError) 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/TimelineSummaryEventBucket.md b/generated/stackstate_api/docs/TimelineSummaryEventBucket.md new file mode 100644 index 00000000..0ffcca2f --- /dev/null +++ b/generated/stackstate_api/docs/TimelineSummaryEventBucket.md @@ -0,0 +1,119 @@ +# TimelineSummaryEventBucket + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Count** | **int64** | | +**StartTimeEpochMillis** | **int64** | | +**EndTimeEpochMillis** | Pointer to **int64** | | [optional] + +## Methods + +### NewTimelineSummaryEventBucket + +`func NewTimelineSummaryEventBucket(type_ string, count int64, startTimeEpochMillis int64, ) *TimelineSummaryEventBucket` + +NewTimelineSummaryEventBucket instantiates a new TimelineSummaryEventBucket 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 + +### NewTimelineSummaryEventBucketWithDefaults + +`func NewTimelineSummaryEventBucketWithDefaults() *TimelineSummaryEventBucket` + +NewTimelineSummaryEventBucketWithDefaults instantiates a new TimelineSummaryEventBucket 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 *TimelineSummaryEventBucket) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TimelineSummaryEventBucket) 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 *TimelineSummaryEventBucket) SetType(v string)` + +SetType sets Type field to given value. + + +### GetCount + +`func (o *TimelineSummaryEventBucket) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *TimelineSummaryEventBucket) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *TimelineSummaryEventBucket) SetCount(v int64)` + +SetCount sets Count field to given value. + + +### GetStartTimeEpochMillis + +`func (o *TimelineSummaryEventBucket) GetStartTimeEpochMillis() int64` + +GetStartTimeEpochMillis returns the StartTimeEpochMillis field if non-nil, zero value otherwise. + +### GetStartTimeEpochMillisOk + +`func (o *TimelineSummaryEventBucket) GetStartTimeEpochMillisOk() (*int64, bool)` + +GetStartTimeEpochMillisOk returns a tuple with the StartTimeEpochMillis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStartTimeEpochMillis + +`func (o *TimelineSummaryEventBucket) SetStartTimeEpochMillis(v int64)` + +SetStartTimeEpochMillis sets StartTimeEpochMillis field to given value. + + +### GetEndTimeEpochMillis + +`func (o *TimelineSummaryEventBucket) GetEndTimeEpochMillis() int64` + +GetEndTimeEpochMillis returns the EndTimeEpochMillis field if non-nil, zero value otherwise. + +### GetEndTimeEpochMillisOk + +`func (o *TimelineSummaryEventBucket) GetEndTimeEpochMillisOk() (*int64, bool)` + +GetEndTimeEpochMillisOk returns a tuple with the EndTimeEpochMillis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEndTimeEpochMillis + +`func (o *TimelineSummaryEventBucket) SetEndTimeEpochMillis(v int64)` + +SetEndTimeEpochMillis sets EndTimeEpochMillis field to given value. + +### HasEndTimeEpochMillis + +`func (o *TimelineSummaryEventBucket) HasEndTimeEpochMillis() bool` + +HasEndTimeEpochMillis 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/TimelineSummaryHealthChange.md b/generated/stackstate_api/docs/TimelineSummaryHealthChange.md new file mode 100644 index 00000000..df4d7952 --- /dev/null +++ b/generated/stackstate_api/docs/TimelineSummaryHealthChange.md @@ -0,0 +1,93 @@ +# TimelineSummaryHealthChange + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Timestamp** | **int64** | | +**NewHealth** | [**HealthStateValue**](HealthStateValue.md) | | + +## Methods + +### NewTimelineSummaryHealthChange + +`func NewTimelineSummaryHealthChange(type_ string, timestamp int64, newHealth HealthStateValue, ) *TimelineSummaryHealthChange` + +NewTimelineSummaryHealthChange instantiates a new TimelineSummaryHealthChange 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 + +### NewTimelineSummaryHealthChangeWithDefaults + +`func NewTimelineSummaryHealthChangeWithDefaults() *TimelineSummaryHealthChange` + +NewTimelineSummaryHealthChangeWithDefaults instantiates a new TimelineSummaryHealthChange 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 *TimelineSummaryHealthChange) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TimelineSummaryHealthChange) 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 *TimelineSummaryHealthChange) SetType(v string)` + +SetType sets Type field to given value. + + +### GetTimestamp + +`func (o *TimelineSummaryHealthChange) GetTimestamp() int64` + +GetTimestamp returns the Timestamp field if non-nil, zero value otherwise. + +### GetTimestampOk + +`func (o *TimelineSummaryHealthChange) GetTimestampOk() (*int64, bool)` + +GetTimestampOk returns a tuple with the Timestamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimestamp + +`func (o *TimelineSummaryHealthChange) SetTimestamp(v int64)` + +SetTimestamp sets Timestamp field to given value. + + +### GetNewHealth + +`func (o *TimelineSummaryHealthChange) GetNewHealth() HealthStateValue` + +GetNewHealth returns the NewHealth field if non-nil, zero value otherwise. + +### GetNewHealthOk + +`func (o *TimelineSummaryHealthChange) GetNewHealthOk() (*HealthStateValue, bool)` + +GetNewHealthOk returns a tuple with the NewHealth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNewHealth + +`func (o *TimelineSummaryHealthChange) SetNewHealth(v HealthStateValue)` + +SetNewHealth sets NewHealth 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/TimelineSummaryRequest.md b/generated/stackstate_api/docs/TimelineSummaryRequest.md new file mode 100644 index 00000000..94e406c0 --- /dev/null +++ b/generated/stackstate_api/docs/TimelineSummaryRequest.md @@ -0,0 +1,145 @@ +# TimelineSummaryRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Arguments** | [**TimelineSummaryRequestArguments**](TimelineSummaryRequestArguments.md) | | +**StartTime** | **int32** | Date/time representation in milliseconds since epoch (1970-01-01 00:00:00) | +**EndTime** | Pointer to **int32** | Date/time representation in milliseconds since epoch (1970-01-01 00:00:00) | [optional] +**HistogramBucketCount** | **int32** | | +**EventFilters** | Pointer to [**EventFilters**](EventFilters.md) | | [optional] + +## Methods + +### NewTimelineSummaryRequest + +`func NewTimelineSummaryRequest(arguments TimelineSummaryRequestArguments, startTime int32, histogramBucketCount int32, ) *TimelineSummaryRequest` + +NewTimelineSummaryRequest instantiates a new TimelineSummaryRequest 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 + +### NewTimelineSummaryRequestWithDefaults + +`func NewTimelineSummaryRequestWithDefaults() *TimelineSummaryRequest` + +NewTimelineSummaryRequestWithDefaults instantiates a new TimelineSummaryRequest 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 + +### GetArguments + +`func (o *TimelineSummaryRequest) GetArguments() TimelineSummaryRequestArguments` + +GetArguments returns the Arguments field if non-nil, zero value otherwise. + +### GetArgumentsOk + +`func (o *TimelineSummaryRequest) GetArgumentsOk() (*TimelineSummaryRequestArguments, bool)` + +GetArgumentsOk returns a tuple with the Arguments field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArguments + +`func (o *TimelineSummaryRequest) SetArguments(v TimelineSummaryRequestArguments)` + +SetArguments sets Arguments field to given value. + + +### GetStartTime + +`func (o *TimelineSummaryRequest) GetStartTime() int32` + +GetStartTime returns the StartTime field if non-nil, zero value otherwise. + +### GetStartTimeOk + +`func (o *TimelineSummaryRequest) GetStartTimeOk() (*int32, bool)` + +GetStartTimeOk returns a tuple with the StartTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStartTime + +`func (o *TimelineSummaryRequest) SetStartTime(v int32)` + +SetStartTime sets StartTime field to given value. + + +### GetEndTime + +`func (o *TimelineSummaryRequest) GetEndTime() int32` + +GetEndTime returns the EndTime field if non-nil, zero value otherwise. + +### GetEndTimeOk + +`func (o *TimelineSummaryRequest) GetEndTimeOk() (*int32, bool)` + +GetEndTimeOk returns a tuple with the EndTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEndTime + +`func (o *TimelineSummaryRequest) SetEndTime(v int32)` + +SetEndTime sets EndTime field to given value. + +### HasEndTime + +`func (o *TimelineSummaryRequest) HasEndTime() bool` + +HasEndTime returns a boolean if a field has been set. + +### GetHistogramBucketCount + +`func (o *TimelineSummaryRequest) GetHistogramBucketCount() int32` + +GetHistogramBucketCount returns the HistogramBucketCount field if non-nil, zero value otherwise. + +### GetHistogramBucketCountOk + +`func (o *TimelineSummaryRequest) GetHistogramBucketCountOk() (*int32, bool)` + +GetHistogramBucketCountOk returns a tuple with the HistogramBucketCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHistogramBucketCount + +`func (o *TimelineSummaryRequest) SetHistogramBucketCount(v int32)` + +SetHistogramBucketCount sets HistogramBucketCount field to given value. + + +### GetEventFilters + +`func (o *TimelineSummaryRequest) GetEventFilters() EventFilters` + +GetEventFilters returns the EventFilters field if non-nil, zero value otherwise. + +### GetEventFiltersOk + +`func (o *TimelineSummaryRequest) GetEventFiltersOk() (*EventFilters, bool)` + +GetEventFiltersOk returns a tuple with the EventFilters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEventFilters + +`func (o *TimelineSummaryRequest) SetEventFilters(v EventFilters)` + +SetEventFilters sets EventFilters field to given value. + +### HasEventFilters + +`func (o *TimelineSummaryRequest) HasEventFilters() bool` + +HasEventFilters 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/TimelineSummaryRequestArguments.md b/generated/stackstate_api/docs/TimelineSummaryRequestArguments.md new file mode 100644 index 00000000..32f69c6a --- /dev/null +++ b/generated/stackstate_api/docs/TimelineSummaryRequestArguments.md @@ -0,0 +1,119 @@ +# TimelineSummaryRequestArguments + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**ComponentIdentifier** | **string** | | +**QueryTime** | Pointer to **int32** | Date/time representation in milliseconds since epoch (1970-01-01 00:00:00) | [optional] +**Query** | **string** | | + +## Methods + +### NewTimelineSummaryRequestArguments + +`func NewTimelineSummaryRequestArguments(type_ string, componentIdentifier string, query string, ) *TimelineSummaryRequestArguments` + +NewTimelineSummaryRequestArguments instantiates a new TimelineSummaryRequestArguments 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 + +### NewTimelineSummaryRequestArgumentsWithDefaults + +`func NewTimelineSummaryRequestArgumentsWithDefaults() *TimelineSummaryRequestArguments` + +NewTimelineSummaryRequestArgumentsWithDefaults instantiates a new TimelineSummaryRequestArguments 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 *TimelineSummaryRequestArguments) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TimelineSummaryRequestArguments) 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 *TimelineSummaryRequestArguments) SetType(v string)` + +SetType sets Type field to given value. + + +### GetComponentIdentifier + +`func (o *TimelineSummaryRequestArguments) GetComponentIdentifier() string` + +GetComponentIdentifier returns the ComponentIdentifier field if non-nil, zero value otherwise. + +### GetComponentIdentifierOk + +`func (o *TimelineSummaryRequestArguments) GetComponentIdentifierOk() (*string, bool)` + +GetComponentIdentifierOk returns a tuple with the ComponentIdentifier field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComponentIdentifier + +`func (o *TimelineSummaryRequestArguments) SetComponentIdentifier(v string)` + +SetComponentIdentifier sets ComponentIdentifier field to given value. + + +### GetQueryTime + +`func (o *TimelineSummaryRequestArguments) GetQueryTime() int32` + +GetQueryTime returns the QueryTime field if non-nil, zero value otherwise. + +### GetQueryTimeOk + +`func (o *TimelineSummaryRequestArguments) GetQueryTimeOk() (*int32, bool)` + +GetQueryTimeOk returns a tuple with the QueryTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQueryTime + +`func (o *TimelineSummaryRequestArguments) SetQueryTime(v int32)` + +SetQueryTime sets QueryTime field to given value. + +### HasQueryTime + +`func (o *TimelineSummaryRequestArguments) HasQueryTime() bool` + +HasQueryTime returns a boolean if a field has been set. + +### GetQuery + +`func (o *TimelineSummaryRequestArguments) GetQuery() string` + +GetQuery returns the Query field if non-nil, zero value otherwise. + +### GetQueryOk + +`func (o *TimelineSummaryRequestArguments) 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 *TimelineSummaryRequestArguments) SetQuery(v string)` + +SetQuery sets Query 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/TopologyStreamListItem.md b/generated/stackstate_api/docs/TopologyStreamListItem.md index df072a08..d29bd694 100644 --- a/generated/stackstate_api/docs/TopologyStreamListItem.md +++ b/generated/stackstate_api/docs/TopologyStreamListItem.md @@ -12,13 +12,12 @@ Name | Type | Description | Notes **CreatedComponents** | **int64** | | **DeletedComponents** | **int64** | | **Errors** | **int64** | | -**Status** | [**TopologySyncStatus**](TopologySyncStatus.md) | | ## Methods ### NewTopologyStreamListItem -`func NewTopologyStreamListItem(nodeId int64, name string, createdRelations int64, deletedRelations int64, createdComponents int64, deletedComponents int64, errors int64, status TopologySyncStatus, ) *TopologyStreamListItem` +`func NewTopologyStreamListItem(nodeId int64, name string, createdRelations int64, deletedRelations int64, createdComponents int64, deletedComponents int64, errors int64, ) *TopologyStreamListItem` NewTopologyStreamListItem instantiates a new TopologyStreamListItem object This constructor will assign default values to properties that have it defined, @@ -208,26 +207,6 @@ and a boolean to check if the value has been set. SetErrors sets Errors field to given value. -### GetStatus - -`func (o *TopologyStreamListItem) GetStatus() TopologySyncStatus` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *TopologyStreamListItem) GetStatusOk() (*TopologySyncStatus, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *TopologyStreamListItem) SetStatus(v TopologySyncStatus)` - -SetStatus sets Status 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/TopologySyncStatus.md b/generated/stackstate_api/docs/TopologySyncStatus.md deleted file mode 100644 index 1fc8304d..00000000 --- a/generated/stackstate_api/docs/TopologySyncStatus.md +++ /dev/null @@ -1,17 +0,0 @@ -# TopologySyncStatus - -## Enum - - -* `RUNNING` (value: `"Running"`) - -* `RESETTING` (value: `"Resetting"`) - -* `DELETING` (value: `"Deleting"`) - -* `DELETE_FAILED` (value: `"DeleteFailed"`) - - -[[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/UserAuthorizationApi.md b/generated/stackstate_api/docs/UserAuthorizationApi.md new file mode 100644 index 00000000..e34e3f1c --- /dev/null +++ b/generated/stackstate_api/docs/UserAuthorizationApi.md @@ -0,0 +1,73 @@ +# \UserAuthorizationApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetUserAuthorizationFor**](UserAuthorizationApi.md#GetUserAuthorizationFor) | **Get** /user/authorization/for | Is the current user authorized for the provided permission + + + +## GetUserAuthorizationFor + +> GetUserAuthorizationFor(ctx).Permission(permission).Execute() + +Is the current user authorized for the provided permission + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + permission := "permission_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.UserAuthorizationApi.GetUserAuthorizationFor(context.Background()).Permission(permission).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UserAuthorizationApi.GetUserAuthorizationFor``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetUserAuthorizationForRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **permission** | **string** | | + +### 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) + diff --git a/generated/stackstate_api/model_component_view_arguments.go b/generated/stackstate_api/model_component_view_arguments.go new file mode 100644 index 00000000..132f36cd --- /dev/null +++ b/generated/stackstate_api/model_component_view_arguments.go @@ -0,0 +1,173 @@ +/* +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" +) + +// ComponentViewArguments struct for ComponentViewArguments +type ComponentViewArguments struct { + Type string `json:"_type"` + ComponentIdentifier string `json:"componentIdentifier"` + // Date/time representation in milliseconds since epoch (1970-01-01 00:00:00) + QueryTime *int32 `json:"queryTime,omitempty"` +} + +// NewComponentViewArguments instantiates a new ComponentViewArguments 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 NewComponentViewArguments(type_ string, componentIdentifier string) *ComponentViewArguments { + this := ComponentViewArguments{} + this.Type = type_ + this.ComponentIdentifier = componentIdentifier + return &this +} + +// NewComponentViewArgumentsWithDefaults instantiates a new ComponentViewArguments 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 NewComponentViewArgumentsWithDefaults() *ComponentViewArguments { + this := ComponentViewArguments{} + return &this +} + +// GetType returns the Type field value +func (o *ComponentViewArguments) 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 *ComponentViewArguments) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ComponentViewArguments) SetType(v string) { + o.Type = v +} + +// GetComponentIdentifier returns the ComponentIdentifier field value +func (o *ComponentViewArguments) GetComponentIdentifier() string { + if o == nil { + var ret string + return ret + } + + return o.ComponentIdentifier +} + +// GetComponentIdentifierOk returns a tuple with the ComponentIdentifier field value +// and a boolean to check if the value has been set. +func (o *ComponentViewArguments) GetComponentIdentifierOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ComponentIdentifier, true +} + +// SetComponentIdentifier sets field value +func (o *ComponentViewArguments) SetComponentIdentifier(v string) { + o.ComponentIdentifier = v +} + +// GetQueryTime returns the QueryTime field value if set, zero value otherwise. +func (o *ComponentViewArguments) GetQueryTime() int32 { + if o == nil || o.QueryTime == nil { + var ret int32 + return ret + } + return *o.QueryTime +} + +// GetQueryTimeOk returns a tuple with the QueryTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ComponentViewArguments) GetQueryTimeOk() (*int32, bool) { + if o == nil || o.QueryTime == nil { + return nil, false + } + return o.QueryTime, true +} + +// HasQueryTime returns a boolean if a field has been set. +func (o *ComponentViewArguments) HasQueryTime() bool { + if o != nil && o.QueryTime != nil { + return true + } + + return false +} + +// SetQueryTime gets a reference to the given int32 and assigns it to the QueryTime field. +func (o *ComponentViewArguments) SetQueryTime(v int32) { + o.QueryTime = &v +} + +func (o ComponentViewArguments) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["_type"] = o.Type + } + if true { + toSerialize["componentIdentifier"] = o.ComponentIdentifier + } + if o.QueryTime != nil { + toSerialize["queryTime"] = o.QueryTime + } + return json.Marshal(toSerialize) +} + +type NullableComponentViewArguments struct { + value *ComponentViewArguments + isSet bool +} + +func (v NullableComponentViewArguments) Get() *ComponentViewArguments { + return v.value +} + +func (v *NullableComponentViewArguments) Set(val *ComponentViewArguments) { + v.value = val + v.isSet = true +} + +func (v NullableComponentViewArguments) IsSet() bool { + return v.isSet +} + +func (v *NullableComponentViewArguments) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableComponentViewArguments(val *ComponentViewArguments) *NullableComponentViewArguments { + return &NullableComponentViewArguments{value: val, isSet: true} +} + +func (v NullableComponentViewArguments) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableComponentViewArguments) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_event_filters.go b/generated/stackstate_api/model_event_filters.go new file mode 100644 index 00000000..4f3c286f --- /dev/null +++ b/generated/stackstate_api/model_event_filters.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" +) + +// EventFilters struct for EventFilters +type EventFilters struct { + Types []string `json:"types,omitempty"` + Tags []string `json:"tags,omitempty"` + Categories []string `json:"categories,omitempty"` + Sources []string `json:"sources,omitempty"` +} + +// NewEventFilters instantiates a new EventFilters 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 NewEventFilters() *EventFilters { + this := EventFilters{} + return &this +} + +// NewEventFiltersWithDefaults instantiates a new EventFilters 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 NewEventFiltersWithDefaults() *EventFilters { + this := EventFilters{} + return &this +} + +// GetTypes returns the Types field value if set, zero value otherwise. +func (o *EventFilters) GetTypes() []string { + if o == nil || o.Types == nil { + var ret []string + return ret + } + return o.Types +} + +// GetTypesOk returns a tuple with the Types field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EventFilters) GetTypesOk() ([]string, bool) { + if o == nil || o.Types == nil { + return nil, false + } + return o.Types, true +} + +// HasTypes returns a boolean if a field has been set. +func (o *EventFilters) HasTypes() bool { + if o != nil && o.Types != nil { + return true + } + + return false +} + +// SetTypes gets a reference to the given []string and assigns it to the Types field. +func (o *EventFilters) SetTypes(v []string) { + o.Types = v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *EventFilters) GetTags() []string { + if o == nil || o.Tags == nil { + var ret []string + return ret + } + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EventFilters) GetTagsOk() ([]string, bool) { + if o == nil || o.Tags == nil { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *EventFilters) HasTags() bool { + if o != nil && o.Tags != nil { + return true + } + + return false +} + +// SetTags gets a reference to the given []string and assigns it to the Tags field. +func (o *EventFilters) SetTags(v []string) { + o.Tags = v +} + +// GetCategories returns the Categories field value if set, zero value otherwise. +func (o *EventFilters) GetCategories() []string { + if o == nil || o.Categories == nil { + var ret []string + return ret + } + return o.Categories +} + +// GetCategoriesOk returns a tuple with the Categories field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EventFilters) GetCategoriesOk() ([]string, bool) { + if o == nil || o.Categories == nil { + return nil, false + } + return o.Categories, true +} + +// HasCategories returns a boolean if a field has been set. +func (o *EventFilters) HasCategories() bool { + if o != nil && o.Categories != nil { + return true + } + + return false +} + +// SetCategories gets a reference to the given []string and assigns it to the Categories field. +func (o *EventFilters) SetCategories(v []string) { + o.Categories = v +} + +// GetSources returns the Sources field value if set, zero value otherwise. +func (o *EventFilters) GetSources() []string { + if o == nil || o.Sources == nil { + var ret []string + return ret + } + return o.Sources +} + +// GetSourcesOk returns a tuple with the Sources field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *EventFilters) GetSourcesOk() ([]string, bool) { + if o == nil || o.Sources == nil { + return nil, false + } + return o.Sources, true +} + +// HasSources returns a boolean if a field has been set. +func (o *EventFilters) HasSources() bool { + if o != nil && o.Sources != nil { + return true + } + + return false +} + +// SetSources gets a reference to the given []string and assigns it to the Sources field. +func (o *EventFilters) SetSources(v []string) { + o.Sources = v +} + +func (o EventFilters) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.Types != nil { + toSerialize["types"] = o.Types + } + if o.Tags != nil { + toSerialize["tags"] = o.Tags + } + if o.Categories != nil { + toSerialize["categories"] = o.Categories + } + if o.Sources != nil { + toSerialize["sources"] = o.Sources + } + return json.Marshal(toSerialize) +} + +type NullableEventFilters struct { + value *EventFilters + isSet bool +} + +func (v NullableEventFilters) Get() *EventFilters { + return v.value +} + +func (v *NullableEventFilters) Set(val *EventFilters) { + v.value = val + v.isSet = true +} + +func (v NullableEventFilters) IsSet() bool { + return v.isSet +} + +func (v *NullableEventFilters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableEventFilters(val *EventFilters) *NullableEventFilters { + return &NullableEventFilters{value: val, isSet: true} +} + +func (v NullableEventFilters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableEventFilters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_query_view_arguments.go b/generated/stackstate_api/model_query_view_arguments.go new file mode 100644 index 00000000..2c635c8d --- /dev/null +++ b/generated/stackstate_api/model_query_view_arguments.go @@ -0,0 +1,173 @@ +/* +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" +) + +// QueryViewArguments struct for QueryViewArguments +type QueryViewArguments struct { + Type string `json:"_type"` + Query string `json:"query"` + // Date/time representation in milliseconds since epoch (1970-01-01 00:00:00) + QueryTime *int32 `json:"queryTime,omitempty"` +} + +// NewQueryViewArguments instantiates a new QueryViewArguments 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 NewQueryViewArguments(type_ string, query string) *QueryViewArguments { + this := QueryViewArguments{} + this.Type = type_ + this.Query = query + return &this +} + +// NewQueryViewArgumentsWithDefaults instantiates a new QueryViewArguments 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 NewQueryViewArgumentsWithDefaults() *QueryViewArguments { + this := QueryViewArguments{} + return &this +} + +// GetType returns the Type field value +func (o *QueryViewArguments) 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 *QueryViewArguments) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *QueryViewArguments) SetType(v string) { + o.Type = v +} + +// GetQuery returns the Query field value +func (o *QueryViewArguments) 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 *QueryViewArguments) GetQueryOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Query, true +} + +// SetQuery sets field value +func (o *QueryViewArguments) SetQuery(v string) { + o.Query = v +} + +// GetQueryTime returns the QueryTime field value if set, zero value otherwise. +func (o *QueryViewArguments) GetQueryTime() int32 { + if o == nil || o.QueryTime == nil { + var ret int32 + return ret + } + return *o.QueryTime +} + +// GetQueryTimeOk returns a tuple with the QueryTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *QueryViewArguments) GetQueryTimeOk() (*int32, bool) { + if o == nil || o.QueryTime == nil { + return nil, false + } + return o.QueryTime, true +} + +// HasQueryTime returns a boolean if a field has been set. +func (o *QueryViewArguments) HasQueryTime() bool { + if o != nil && o.QueryTime != nil { + return true + } + + return false +} + +// SetQueryTime gets a reference to the given int32 and assigns it to the QueryTime field. +func (o *QueryViewArguments) SetQueryTime(v int32) { + o.QueryTime = &v +} + +func (o QueryViewArguments) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["_type"] = o.Type + } + if true { + toSerialize["query"] = o.Query + } + if o.QueryTime != nil { + toSerialize["queryTime"] = o.QueryTime + } + return json.Marshal(toSerialize) +} + +type NullableQueryViewArguments struct { + value *QueryViewArguments + isSet bool +} + +func (v NullableQueryViewArguments) Get() *QueryViewArguments { + return v.value +} + +func (v *NullableQueryViewArguments) Set(val *QueryViewArguments) { + v.value = val + v.isSet = true +} + +func (v NullableQueryViewArguments) IsSet() bool { + return v.isSet +} + +func (v *NullableQueryViewArguments) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQueryViewArguments(val *QueryViewArguments) *NullableQueryViewArguments { + return &NullableQueryViewArguments{value: val, isSet: true} +} + +func (v NullableQueryViewArguments) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQueryViewArguments) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_timeline_summary.go b/generated/stackstate_api/model_timeline_summary.go new file mode 100644 index 00000000..301b64da --- /dev/null +++ b/generated/stackstate_api/model_timeline_summary.go @@ -0,0 +1,165 @@ +/* +StackState API + +This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). + +API version: 5.2.0 +Contact: info@stackstate.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackstate_api + +import ( + "encoding/json" +) + +// TimelineSummary struct for TimelineSummary +type TimelineSummary struct { + Buckets []TimelineSummaryEventBucket `json:"buckets"` + HealthHistory []TimelineSummaryHealthChange `json:"healthHistory"` + FromTime int64 `json:"fromTime"` +} + +// NewTimelineSummary instantiates a new TimelineSummary 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 NewTimelineSummary(buckets []TimelineSummaryEventBucket, healthHistory []TimelineSummaryHealthChange, fromTime int64) *TimelineSummary { + this := TimelineSummary{} + this.Buckets = buckets + this.HealthHistory = healthHistory + this.FromTime = fromTime + return &this +} + +// NewTimelineSummaryWithDefaults instantiates a new TimelineSummary 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 NewTimelineSummaryWithDefaults() *TimelineSummary { + this := TimelineSummary{} + return &this +} + +// GetBuckets returns the Buckets field value +func (o *TimelineSummary) GetBuckets() []TimelineSummaryEventBucket { + if o == nil { + var ret []TimelineSummaryEventBucket + return ret + } + + return o.Buckets +} + +// GetBucketsOk returns a tuple with the Buckets field value +// and a boolean to check if the value has been set. +func (o *TimelineSummary) GetBucketsOk() ([]TimelineSummaryEventBucket, bool) { + if o == nil { + return nil, false + } + return o.Buckets, true +} + +// SetBuckets sets field value +func (o *TimelineSummary) SetBuckets(v []TimelineSummaryEventBucket) { + o.Buckets = v +} + +// GetHealthHistory returns the HealthHistory field value +func (o *TimelineSummary) GetHealthHistory() []TimelineSummaryHealthChange { + if o == nil { + var ret []TimelineSummaryHealthChange + return ret + } + + return o.HealthHistory +} + +// GetHealthHistoryOk returns a tuple with the HealthHistory field value +// and a boolean to check if the value has been set. +func (o *TimelineSummary) GetHealthHistoryOk() ([]TimelineSummaryHealthChange, bool) { + if o == nil { + return nil, false + } + return o.HealthHistory, true +} + +// SetHealthHistory sets field value +func (o *TimelineSummary) SetHealthHistory(v []TimelineSummaryHealthChange) { + o.HealthHistory = v +} + +// GetFromTime returns the FromTime field value +func (o *TimelineSummary) GetFromTime() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.FromTime +} + +// GetFromTimeOk returns a tuple with the FromTime field value +// and a boolean to check if the value has been set. +func (o *TimelineSummary) GetFromTimeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.FromTime, true +} + +// SetFromTime sets field value +func (o *TimelineSummary) SetFromTime(v int64) { + o.FromTime = v +} + +func (o TimelineSummary) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["buckets"] = o.Buckets + } + if true { + toSerialize["healthHistory"] = o.HealthHistory + } + if true { + toSerialize["fromTime"] = o.FromTime + } + return json.Marshal(toSerialize) +} + +type NullableTimelineSummary struct { + value *TimelineSummary + isSet bool +} + +func (v NullableTimelineSummary) Get() *TimelineSummary { + return v.value +} + +func (v *NullableTimelineSummary) Set(val *TimelineSummary) { + v.value = val + v.isSet = true +} + +func (v NullableTimelineSummary) IsSet() bool { + return v.isSet +} + +func (v *NullableTimelineSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTimelineSummary(val *TimelineSummary) *NullableTimelineSummary { + return &NullableTimelineSummary{value: val, isSet: true} +} + +func (v NullableTimelineSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTimelineSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_timeline_summary_error.go b/generated/stackstate_api/model_timeline_summary_error.go new file mode 100644 index 00000000..fc81efd6 --- /dev/null +++ b/generated/stackstate_api/model_timeline_summary_error.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" +) + +// TimelineSummaryError struct for TimelineSummaryError +type TimelineSummaryError struct { + Message string `json:"message"` +} + +// NewTimelineSummaryError instantiates a new TimelineSummaryError 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 NewTimelineSummaryError(message string) *TimelineSummaryError { + this := TimelineSummaryError{} + this.Message = message + return &this +} + +// NewTimelineSummaryErrorWithDefaults instantiates a new TimelineSummaryError 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 NewTimelineSummaryErrorWithDefaults() *TimelineSummaryError { + this := TimelineSummaryError{} + return &this +} + +// GetMessage returns the Message field value +func (o *TimelineSummaryError) 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 *TimelineSummaryError) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *TimelineSummaryError) SetMessage(v string) { + o.Message = v +} + +func (o TimelineSummaryError) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["message"] = o.Message + } + return json.Marshal(toSerialize) +} + +type NullableTimelineSummaryError struct { + value *TimelineSummaryError + isSet bool +} + +func (v NullableTimelineSummaryError) Get() *TimelineSummaryError { + return v.value +} + +func (v *NullableTimelineSummaryError) Set(val *TimelineSummaryError) { + v.value = val + v.isSet = true +} + +func (v NullableTimelineSummaryError) IsSet() bool { + return v.isSet +} + +func (v *NullableTimelineSummaryError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTimelineSummaryError(val *TimelineSummaryError) *NullableTimelineSummaryError { + return &NullableTimelineSummaryError{value: val, isSet: true} +} + +func (v NullableTimelineSummaryError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTimelineSummaryError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_timeline_summary_event_bucket.go b/generated/stackstate_api/model_timeline_summary_event_bucket.go new file mode 100644 index 00000000..56c79147 --- /dev/null +++ b/generated/stackstate_api/model_timeline_summary_event_bucket.go @@ -0,0 +1,201 @@ +/* +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" +) + +// TimelineSummaryEventBucket struct for TimelineSummaryEventBucket +type TimelineSummaryEventBucket struct { + Type string `json:"_type"` + Count int64 `json:"count"` + StartTimeEpochMillis int64 `json:"startTimeEpochMillis"` + EndTimeEpochMillis *int64 `json:"endTimeEpochMillis,omitempty"` +} + +// NewTimelineSummaryEventBucket instantiates a new TimelineSummaryEventBucket 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 NewTimelineSummaryEventBucket(type_ string, count int64, startTimeEpochMillis int64) *TimelineSummaryEventBucket { + this := TimelineSummaryEventBucket{} + this.Type = type_ + this.Count = count + this.StartTimeEpochMillis = startTimeEpochMillis + return &this +} + +// NewTimelineSummaryEventBucketWithDefaults instantiates a new TimelineSummaryEventBucket 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 NewTimelineSummaryEventBucketWithDefaults() *TimelineSummaryEventBucket { + this := TimelineSummaryEventBucket{} + return &this +} + +// GetType returns the Type field value +func (o *TimelineSummaryEventBucket) 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 *TimelineSummaryEventBucket) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TimelineSummaryEventBucket) SetType(v string) { + o.Type = v +} + +// GetCount returns the Count field value +func (o *TimelineSummaryEventBucket) GetCount() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Count +} + +// GetCountOk returns a tuple with the Count field value +// and a boolean to check if the value has been set. +func (o *TimelineSummaryEventBucket) GetCountOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Count, true +} + +// SetCount sets field value +func (o *TimelineSummaryEventBucket) SetCount(v int64) { + o.Count = v +} + +// GetStartTimeEpochMillis returns the StartTimeEpochMillis field value +func (o *TimelineSummaryEventBucket) GetStartTimeEpochMillis() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.StartTimeEpochMillis +} + +// GetStartTimeEpochMillisOk returns a tuple with the StartTimeEpochMillis field value +// and a boolean to check if the value has been set. +func (o *TimelineSummaryEventBucket) GetStartTimeEpochMillisOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.StartTimeEpochMillis, true +} + +// SetStartTimeEpochMillis sets field value +func (o *TimelineSummaryEventBucket) SetStartTimeEpochMillis(v int64) { + o.StartTimeEpochMillis = v +} + +// GetEndTimeEpochMillis returns the EndTimeEpochMillis field value if set, zero value otherwise. +func (o *TimelineSummaryEventBucket) GetEndTimeEpochMillis() int64 { + if o == nil || o.EndTimeEpochMillis == nil { + var ret int64 + return ret + } + return *o.EndTimeEpochMillis +} + +// GetEndTimeEpochMillisOk returns a tuple with the EndTimeEpochMillis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TimelineSummaryEventBucket) GetEndTimeEpochMillisOk() (*int64, bool) { + if o == nil || o.EndTimeEpochMillis == nil { + return nil, false + } + return o.EndTimeEpochMillis, true +} + +// HasEndTimeEpochMillis returns a boolean if a field has been set. +func (o *TimelineSummaryEventBucket) HasEndTimeEpochMillis() bool { + if o != nil && o.EndTimeEpochMillis != nil { + return true + } + + return false +} + +// SetEndTimeEpochMillis gets a reference to the given int64 and assigns it to the EndTimeEpochMillis field. +func (o *TimelineSummaryEventBucket) SetEndTimeEpochMillis(v int64) { + o.EndTimeEpochMillis = &v +} + +func (o TimelineSummaryEventBucket) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["_type"] = o.Type + } + if true { + toSerialize["count"] = o.Count + } + if true { + toSerialize["startTimeEpochMillis"] = o.StartTimeEpochMillis + } + if o.EndTimeEpochMillis != nil { + toSerialize["endTimeEpochMillis"] = o.EndTimeEpochMillis + } + return json.Marshal(toSerialize) +} + +type NullableTimelineSummaryEventBucket struct { + value *TimelineSummaryEventBucket + isSet bool +} + +func (v NullableTimelineSummaryEventBucket) Get() *TimelineSummaryEventBucket { + return v.value +} + +func (v *NullableTimelineSummaryEventBucket) Set(val *TimelineSummaryEventBucket) { + v.value = val + v.isSet = true +} + +func (v NullableTimelineSummaryEventBucket) IsSet() bool { + return v.isSet +} + +func (v *NullableTimelineSummaryEventBucket) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTimelineSummaryEventBucket(val *TimelineSummaryEventBucket) *NullableTimelineSummaryEventBucket { + return &NullableTimelineSummaryEventBucket{value: val, isSet: true} +} + +func (v NullableTimelineSummaryEventBucket) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTimelineSummaryEventBucket) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_timeline_summary_health_change.go b/generated/stackstate_api/model_timeline_summary_health_change.go new file mode 100644 index 00000000..f57a9569 --- /dev/null +++ b/generated/stackstate_api/model_timeline_summary_health_change.go @@ -0,0 +1,165 @@ +/* +StackState API + +This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). + +API version: 5.2.0 +Contact: info@stackstate.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackstate_api + +import ( + "encoding/json" +) + +// TimelineSummaryHealthChange struct for TimelineSummaryHealthChange +type TimelineSummaryHealthChange struct { + Type string `json:"_type"` + Timestamp int64 `json:"timestamp"` + NewHealth HealthStateValue `json:"newHealth"` +} + +// NewTimelineSummaryHealthChange instantiates a new TimelineSummaryHealthChange 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 NewTimelineSummaryHealthChange(type_ string, timestamp int64, newHealth HealthStateValue) *TimelineSummaryHealthChange { + this := TimelineSummaryHealthChange{} + this.Type = type_ + this.Timestamp = timestamp + this.NewHealth = newHealth + return &this +} + +// NewTimelineSummaryHealthChangeWithDefaults instantiates a new TimelineSummaryHealthChange 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 NewTimelineSummaryHealthChangeWithDefaults() *TimelineSummaryHealthChange { + this := TimelineSummaryHealthChange{} + return &this +} + +// GetType returns the Type field value +func (o *TimelineSummaryHealthChange) 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 *TimelineSummaryHealthChange) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TimelineSummaryHealthChange) SetType(v string) { + o.Type = v +} + +// GetTimestamp returns the Timestamp field value +func (o *TimelineSummaryHealthChange) GetTimestamp() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value +// and a boolean to check if the value has been set. +func (o *TimelineSummaryHealthChange) GetTimestampOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Timestamp, true +} + +// SetTimestamp sets field value +func (o *TimelineSummaryHealthChange) SetTimestamp(v int64) { + o.Timestamp = v +} + +// GetNewHealth returns the NewHealth field value +func (o *TimelineSummaryHealthChange) GetNewHealth() HealthStateValue { + if o == nil { + var ret HealthStateValue + return ret + } + + return o.NewHealth +} + +// GetNewHealthOk returns a tuple with the NewHealth field value +// and a boolean to check if the value has been set. +func (o *TimelineSummaryHealthChange) GetNewHealthOk() (*HealthStateValue, bool) { + if o == nil { + return nil, false + } + return &o.NewHealth, true +} + +// SetNewHealth sets field value +func (o *TimelineSummaryHealthChange) SetNewHealth(v HealthStateValue) { + o.NewHealth = v +} + +func (o TimelineSummaryHealthChange) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["_type"] = o.Type + } + if true { + toSerialize["timestamp"] = o.Timestamp + } + if true { + toSerialize["newHealth"] = o.NewHealth + } + return json.Marshal(toSerialize) +} + +type NullableTimelineSummaryHealthChange struct { + value *TimelineSummaryHealthChange + isSet bool +} + +func (v NullableTimelineSummaryHealthChange) Get() *TimelineSummaryHealthChange { + return v.value +} + +func (v *NullableTimelineSummaryHealthChange) Set(val *TimelineSummaryHealthChange) { + v.value = val + v.isSet = true +} + +func (v NullableTimelineSummaryHealthChange) IsSet() bool { + return v.isSet +} + +func (v *NullableTimelineSummaryHealthChange) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTimelineSummaryHealthChange(val *TimelineSummaryHealthChange) *NullableTimelineSummaryHealthChange { + return &NullableTimelineSummaryHealthChange{value: val, isSet: true} +} + +func (v NullableTimelineSummaryHealthChange) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTimelineSummaryHealthChange) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_timeline_summary_request.go b/generated/stackstate_api/model_timeline_summary_request.go new file mode 100644 index 00000000..63bd6a9e --- /dev/null +++ b/generated/stackstate_api/model_timeline_summary_request.go @@ -0,0 +1,239 @@ +/* +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" +) + +// TimelineSummaryRequest struct for TimelineSummaryRequest +type TimelineSummaryRequest struct { + Arguments TimelineSummaryRequestArguments `json:"arguments"` + // Date/time representation in milliseconds since epoch (1970-01-01 00:00:00) + StartTime int32 `json:"startTime"` + // Date/time representation in milliseconds since epoch (1970-01-01 00:00:00) + EndTime *int32 `json:"endTime,omitempty"` + HistogramBucketCount int32 `json:"histogramBucketCount"` + EventFilters *EventFilters `json:"eventFilters,omitempty"` +} + +// NewTimelineSummaryRequest instantiates a new TimelineSummaryRequest 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 NewTimelineSummaryRequest(arguments TimelineSummaryRequestArguments, startTime int32, histogramBucketCount int32) *TimelineSummaryRequest { + this := TimelineSummaryRequest{} + this.Arguments = arguments + this.StartTime = startTime + this.HistogramBucketCount = histogramBucketCount + return &this +} + +// NewTimelineSummaryRequestWithDefaults instantiates a new TimelineSummaryRequest 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 NewTimelineSummaryRequestWithDefaults() *TimelineSummaryRequest { + this := TimelineSummaryRequest{} + return &this +} + +// GetArguments returns the Arguments field value +func (o *TimelineSummaryRequest) GetArguments() TimelineSummaryRequestArguments { + if o == nil { + var ret TimelineSummaryRequestArguments + return ret + } + + return o.Arguments +} + +// GetArgumentsOk returns a tuple with the Arguments field value +// and a boolean to check if the value has been set. +func (o *TimelineSummaryRequest) GetArgumentsOk() (*TimelineSummaryRequestArguments, bool) { + if o == nil { + return nil, false + } + return &o.Arguments, true +} + +// SetArguments sets field value +func (o *TimelineSummaryRequest) SetArguments(v TimelineSummaryRequestArguments) { + o.Arguments = v +} + +// GetStartTime returns the StartTime field value +func (o *TimelineSummaryRequest) GetStartTime() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.StartTime +} + +// GetStartTimeOk returns a tuple with the StartTime field value +// and a boolean to check if the value has been set. +func (o *TimelineSummaryRequest) GetStartTimeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.StartTime, true +} + +// SetStartTime sets field value +func (o *TimelineSummaryRequest) SetStartTime(v int32) { + o.StartTime = v +} + +// GetEndTime returns the EndTime field value if set, zero value otherwise. +func (o *TimelineSummaryRequest) GetEndTime() int32 { + if o == nil || o.EndTime == nil { + var ret int32 + return ret + } + return *o.EndTime +} + +// GetEndTimeOk returns a tuple with the EndTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TimelineSummaryRequest) GetEndTimeOk() (*int32, bool) { + if o == nil || o.EndTime == nil { + return nil, false + } + return o.EndTime, true +} + +// HasEndTime returns a boolean if a field has been set. +func (o *TimelineSummaryRequest) HasEndTime() bool { + if o != nil && o.EndTime != nil { + return true + } + + return false +} + +// SetEndTime gets a reference to the given int32 and assigns it to the EndTime field. +func (o *TimelineSummaryRequest) SetEndTime(v int32) { + o.EndTime = &v +} + +// GetHistogramBucketCount returns the HistogramBucketCount field value +func (o *TimelineSummaryRequest) GetHistogramBucketCount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.HistogramBucketCount +} + +// GetHistogramBucketCountOk returns a tuple with the HistogramBucketCount field value +// and a boolean to check if the value has been set. +func (o *TimelineSummaryRequest) GetHistogramBucketCountOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.HistogramBucketCount, true +} + +// SetHistogramBucketCount sets field value +func (o *TimelineSummaryRequest) SetHistogramBucketCount(v int32) { + o.HistogramBucketCount = v +} + +// GetEventFilters returns the EventFilters field value if set, zero value otherwise. +func (o *TimelineSummaryRequest) GetEventFilters() EventFilters { + if o == nil || o.EventFilters == nil { + var ret EventFilters + return ret + } + return *o.EventFilters +} + +// GetEventFiltersOk returns a tuple with the EventFilters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TimelineSummaryRequest) GetEventFiltersOk() (*EventFilters, bool) { + if o == nil || o.EventFilters == nil { + return nil, false + } + return o.EventFilters, true +} + +// HasEventFilters returns a boolean if a field has been set. +func (o *TimelineSummaryRequest) HasEventFilters() bool { + if o != nil && o.EventFilters != nil { + return true + } + + return false +} + +// SetEventFilters gets a reference to the given EventFilters and assigns it to the EventFilters field. +func (o *TimelineSummaryRequest) SetEventFilters(v EventFilters) { + o.EventFilters = &v +} + +func (o TimelineSummaryRequest) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["arguments"] = o.Arguments + } + if true { + toSerialize["startTime"] = o.StartTime + } + if o.EndTime != nil { + toSerialize["endTime"] = o.EndTime + } + if true { + toSerialize["histogramBucketCount"] = o.HistogramBucketCount + } + if o.EventFilters != nil { + toSerialize["eventFilters"] = o.EventFilters + } + return json.Marshal(toSerialize) +} + +type NullableTimelineSummaryRequest struct { + value *TimelineSummaryRequest + isSet bool +} + +func (v NullableTimelineSummaryRequest) Get() *TimelineSummaryRequest { + return v.value +} + +func (v *NullableTimelineSummaryRequest) Set(val *TimelineSummaryRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTimelineSummaryRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTimelineSummaryRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTimelineSummaryRequest(val *TimelineSummaryRequest) *NullableTimelineSummaryRequest { + return &NullableTimelineSummaryRequest{value: val, isSet: true} +} + +func (v NullableTimelineSummaryRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTimelineSummaryRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_timeline_summary_request_arguments.go b/generated/stackstate_api/model_timeline_summary_request_arguments.go new file mode 100644 index 00000000..64eaf9bd --- /dev/null +++ b/generated/stackstate_api/model_timeline_summary_request_arguments.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" +) + +// TimelineSummaryRequestArguments - struct for TimelineSummaryRequestArguments +type TimelineSummaryRequestArguments struct { + ComponentViewArguments *ComponentViewArguments + QueryViewArguments *QueryViewArguments +} + +// ComponentViewArgumentsAsTimelineSummaryRequestArguments is a convenience function that returns ComponentViewArguments wrapped in TimelineSummaryRequestArguments +func ComponentViewArgumentsAsTimelineSummaryRequestArguments(v *ComponentViewArguments) TimelineSummaryRequestArguments { + return TimelineSummaryRequestArguments{ + ComponentViewArguments: v, + } +} + +// QueryViewArgumentsAsTimelineSummaryRequestArguments is a convenience function that returns QueryViewArguments wrapped in TimelineSummaryRequestArguments +func QueryViewArgumentsAsTimelineSummaryRequestArguments(v *QueryViewArguments) TimelineSummaryRequestArguments { + return TimelineSummaryRequestArguments{ + QueryViewArguments: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *TimelineSummaryRequestArguments) 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 'ComponentViewArguments' + if jsonDict["_type"] == "ComponentViewArguments" { + // try to unmarshal JSON data into ComponentViewArguments + err = json.Unmarshal(data, &dst.ComponentViewArguments) + if err == nil { + return nil // data stored in dst.ComponentViewArguments, return on the first match + } else { + dst.ComponentViewArguments = nil + return fmt.Errorf("Failed to unmarshal TimelineSummaryRequestArguments as ComponentViewArguments: %s", err.Error()) + } + } + + // check if the discriminator value is 'QueryViewArguments' + if jsonDict["_type"] == "QueryViewArguments" { + // try to unmarshal JSON data into QueryViewArguments + err = json.Unmarshal(data, &dst.QueryViewArguments) + if err == nil { + return nil // data stored in dst.QueryViewArguments, return on the first match + } else { + dst.QueryViewArguments = nil + return fmt.Errorf("Failed to unmarshal TimelineSummaryRequestArguments as QueryViewArguments: %s", err.Error()) + } + } + + return nil +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src TimelineSummaryRequestArguments) MarshalJSON() ([]byte, error) { + if src.ComponentViewArguments != nil { + return json.Marshal(&src.ComponentViewArguments) + } + + if src.QueryViewArguments != nil { + return json.Marshal(&src.QueryViewArguments) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *TimelineSummaryRequestArguments) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.ComponentViewArguments != nil { + return obj.ComponentViewArguments + } + + if obj.QueryViewArguments != nil { + return obj.QueryViewArguments + } + + // all schemas are nil + return nil +} + +type NullableTimelineSummaryRequestArguments struct { + value *TimelineSummaryRequestArguments + isSet bool +} + +func (v NullableTimelineSummaryRequestArguments) Get() *TimelineSummaryRequestArguments { + return v.value +} + +func (v *NullableTimelineSummaryRequestArguments) Set(val *TimelineSummaryRequestArguments) { + v.value = val + v.isSet = true +} + +func (v NullableTimelineSummaryRequestArguments) IsSet() bool { + return v.isSet +} + +func (v *NullableTimelineSummaryRequestArguments) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTimelineSummaryRequestArguments(val *TimelineSummaryRequestArguments) *NullableTimelineSummaryRequestArguments { + return &NullableTimelineSummaryRequestArguments{value: val, isSet: true} +} + +func (v NullableTimelineSummaryRequestArguments) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTimelineSummaryRequestArguments) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_topology_stream_list_item.go b/generated/stackstate_api/model_topology_stream_list_item.go index 6044cfa4..dfb9ad49 100644 --- a/generated/stackstate_api/model_topology_stream_list_item.go +++ b/generated/stackstate_api/model_topology_stream_list_item.go @@ -17,22 +17,21 @@ import ( // TopologyStreamListItem struct for TopologyStreamListItem type TopologyStreamListItem struct { - SyncIdentifier NullableString `json:"syncIdentifier,omitempty"` - NodeId int64 `json:"nodeId"` - Name string `json:"name"` - CreatedRelations int64 `json:"createdRelations"` - DeletedRelations int64 `json:"deletedRelations"` - CreatedComponents int64 `json:"createdComponents"` - DeletedComponents int64 `json:"deletedComponents"` - Errors int64 `json:"errors"` - Status TopologySyncStatus `json:"status"` + SyncIdentifier NullableString `json:"syncIdentifier,omitempty"` + NodeId int64 `json:"nodeId"` + Name string `json:"name"` + CreatedRelations int64 `json:"createdRelations"` + DeletedRelations int64 `json:"deletedRelations"` + CreatedComponents int64 `json:"createdComponents"` + DeletedComponents int64 `json:"deletedComponents"` + Errors int64 `json:"errors"` } // NewTopologyStreamListItem instantiates a new TopologyStreamListItem 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 NewTopologyStreamListItem(nodeId int64, name string, createdRelations int64, deletedRelations int64, createdComponents int64, deletedComponents int64, errors int64, status TopologySyncStatus) *TopologyStreamListItem { +func NewTopologyStreamListItem(nodeId int64, name string, createdRelations int64, deletedRelations int64, createdComponents int64, deletedComponents int64, errors int64) *TopologyStreamListItem { this := TopologyStreamListItem{} this.NodeId = nodeId this.Name = name @@ -41,7 +40,6 @@ func NewTopologyStreamListItem(nodeId int64, name string, createdRelations int64 this.CreatedComponents = createdComponents this.DeletedComponents = deletedComponents this.Errors = errors - this.Status = status return &this } @@ -264,30 +262,6 @@ func (o *TopologyStreamListItem) SetErrors(v int64) { o.Errors = v } -// GetStatus returns the Status field value -func (o *TopologyStreamListItem) GetStatus() TopologySyncStatus { - if o == nil { - var ret TopologySyncStatus - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *TopologyStreamListItem) GetStatusOk() (*TopologySyncStatus, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *TopologyStreamListItem) SetStatus(v TopologySyncStatus) { - o.Status = v -} - func (o TopologyStreamListItem) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.SyncIdentifier.IsSet() { @@ -314,9 +288,6 @@ func (o TopologyStreamListItem) MarshalJSON() ([]byte, error) { if true { toSerialize["errors"] = o.Errors } - if true { - toSerialize["status"] = o.Status - } return json.Marshal(toSerialize) } diff --git a/generated/stackstate_api/model_topology_sync_status.go b/generated/stackstate_api/model_topology_sync_status.go deleted file mode 100644 index 70280523..00000000 --- a/generated/stackstate_api/model_topology_sync_status.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -StackState API - -This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). - -API version: 5.2.0 -Contact: info@stackstate.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package stackstate_api - -import ( - "encoding/json" - "fmt" -) - -// TopologySyncStatus the model 'TopologySyncStatus' -type TopologySyncStatus string - -// List of TopologySyncStatus -const ( - TOPOLOGYSYNCSTATUS_RUNNING TopologySyncStatus = "Running" - TOPOLOGYSYNCSTATUS_RESETTING TopologySyncStatus = "Resetting" - TOPOLOGYSYNCSTATUS_DELETING TopologySyncStatus = "Deleting" - TOPOLOGYSYNCSTATUS_DELETE_FAILED TopologySyncStatus = "DeleteFailed" -) - -// All allowed values of TopologySyncStatus enum -var AllowedTopologySyncStatusEnumValues = []TopologySyncStatus{ - "Running", - "Resetting", - "Deleting", - "DeleteFailed", -} - -func (v *TopologySyncStatus) UnmarshalJSON(src []byte) error { - var value string - err := json.Unmarshal(src, &value) - if err != nil { - return err - } - enumTypeValue := TopologySyncStatus(value) - for _, existing := range AllowedTopologySyncStatusEnumValues { - if existing == enumTypeValue { - *v = enumTypeValue - return nil - } - } - - return fmt.Errorf("%+v is not a valid TopologySyncStatus", value) -} - -// NewTopologySyncStatusFromValue returns a pointer to a valid TopologySyncStatus -// for the value passed as argument, or an error if the value passed is not allowed by the enum -func NewTopologySyncStatusFromValue(v string) (*TopologySyncStatus, error) { - ev := TopologySyncStatus(v) - if ev.IsValid() { - return &ev, nil - } else { - return nil, fmt.Errorf("invalid value '%v' for TopologySyncStatus: valid values are %v", v, AllowedTopologySyncStatusEnumValues) - } -} - -// IsValid return true if the value is valid for the enum, false otherwise -func (v TopologySyncStatus) IsValid() bool { - for _, existing := range AllowedTopologySyncStatusEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to TopologySyncStatus value -func (v TopologySyncStatus) Ptr() *TopologySyncStatus { - return &v -} - -type NullableTopologySyncStatus struct { - value *TopologySyncStatus - isSet bool -} - -func (v NullableTopologySyncStatus) Get() *TopologySyncStatus { - return v.value -} - -func (v *NullableTopologySyncStatus) Set(val *TopologySyncStatus) { - v.value = val - v.isSet = true -} - -func (v NullableTopologySyncStatus) IsSet() bool { - return v.isSet -} - -func (v *NullableTopologySyncStatus) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTopologySyncStatus(val *TopologySyncStatus) *NullableTopologySyncStatus { - return &NullableTopologySyncStatus{value: val, isSet: true} -} - -func (v NullableTopologySyncStatus) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTopologySyncStatus) 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 bf254d8f..d8ab2363 100644 --- a/stackstate_openapi/openapi_version +++ b/stackstate_openapi/openapi_version @@ -1 +1 @@ -05597064257d328b5c06f6118f9aa4a158f86a9e \ No newline at end of file +61c5cea0553929ea5a72bf3a319816a3323c2728 \ No newline at end of file