From 35496aff74a405dfacac68238948cf86b35be855 Mon Sep 17 00:00:00 2001 From: Jeroen van Erp Date: Wed, 5 Jun 2024 10:25:47 +0200 Subject: [PATCH 1/3] STAC-21285: Fix OS Detection for install script Signed-off-by: Jeroen van Erp --- scripts/publish/installers/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/publish/installers/install.sh b/scripts/publish/installers/install.sh index b4bb664a..962cb8e0 100755 --- a/scripts/publish/installers/install.sh +++ b/scripts/publish/installers/install.sh @@ -19,7 +19,7 @@ function error() { exit 10 } -if [[ "$OSTYPE" == "linux-gnu"* ]]; then +if [[ "$OSTYPE" == "linux"* ]]; then OS=linux elif [[ "$OSTYPE" == "darwin"* ]]; then OS=darwin From 118452d4815a633962ab5d733fd2109648393510 Mon Sep 17 00:00:00 2001 From: Jeroen van Erp Date: Wed, 5 Jun 2024 10:29:18 +0200 Subject: [PATCH 2/3] STAC-21289: Do not automatically require sudo if no explicit location is given Signed-off-by: Jeroen van Erp --- scripts/publish/installers/install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/publish/installers/install.sh b/scripts/publish/installers/install.sh index 962cb8e0..51675f5b 100755 --- a/scripts/publish/installers/install.sh +++ b/scripts/publish/installers/install.sh @@ -39,11 +39,12 @@ fi # Check if custom location was defined if [[ -z "$STS_CLI_LOCATION" ]]; then # Use default installation location - TARGET_CLI_PATH=/usr/local/bin + TARGET_CLI_PATH="$(pwd)" # check if the user has permissions to write on default location - if [[ -w "$TARGET_CLI_PATH" ]]; then - # user has writing permissions, so no need to use sudo - NO_SUDO=true + if [[ !-w "$TARGET_CLI_PATH" ]]; then + # user has no writing permissions, exit because no explicit location given. + echo "Cannot write to the current directory. Please either execute the script from a writeable directory or set STS_CLI_LOCATION to a different directory." + exit 1 fi else # Check if the custom installation location is valid From cdd0863e89ad6b8f0341cc6a530a41d8df21e2b7 Mon Sep 17 00:00:00 2001 From: Jeroen van Erp Date: Wed, 5 Jun 2024 12:24:56 +0200 Subject: [PATCH 3/3] STAC-21286: Update to latest OpenAPI and fix int64 topic offset Signed-off-by: Jeroen van Erp --- cmd/topic/topic_describe.go | 8 +- cmd/topic/topic_describe_test.go | 2 +- .../.openapi-generator/VERSION | 2 +- .../stackstate_api/.openapi-generator/FILES | 38 + .../stackstate_api/.openapi-generator/VERSION | 2 +- generated/stackstate_api/README.md | 25 +- generated/stackstate_api/api/openapi.yaml | 1139 ++++++++++++----- .../api_authorize_ingestion_api_key.go | 241 ++++ generated/stackstate_api/api_component.go | 285 +++++ .../stackstate_api/api_ingestion_api_key.go | 209 +-- generated/stackstate_api/api_layout.go | 228 ++++ generated/stackstate_api/api_monitor.go | 888 ++++++++++++- .../api_monitor_check_status.go | 4 +- generated/stackstate_api/api_topic.go | 6 +- generated/stackstate_api/client.go | 9 + .../docs/AuthorizeIngestionApiKeyApi.md | 75 ++ .../stackstate_api/docs/BaseLayoutHint.md | 72 ++ generated/stackstate_api/docs/ComponentApi.md | 85 ++ .../docs/ComponentHealthChange.md | 72 ++ .../docs/ComponentHealthHistory.md | 114 ++ .../docs/ComponentHighlightMetricSection.md | 93 ++ .../ComponentHighlightMetricSectionAllOf.md | 51 + .../docs/ComponentNotFoundError.md | 72 ++ .../stackstate_api/docs/IngestionApiKeyApi.md | 65 - generated/stackstate_api/docs/LayoutApi.md | 70 + .../stackstate_api/docs/LayoutApiError.md | 72 ++ generated/stackstate_api/docs/LayoutHint.md | 114 ++ generated/stackstate_api/docs/LayoutList.md | 51 + generated/stackstate_api/docs/Message.md | 10 +- .../docs/MetricPerspectiveSection.md | 114 ++ .../docs/MetricPerspectiveSectionAllOf.md | 72 ++ .../docs/MetricPerspectiveTab.md | 93 ++ .../docs/MetricPerspectiveTabAllOf.md | 51 + generated/stackstate_api/docs/MonitorApi.md | 229 ++++ .../stackstate_api/docs/MonitorCheckStates.md | 51 + .../docs/MonitorCheckStatusApi.md | 4 +- .../stackstate_api/docs/SpanComponent.md | 23 +- generated/stackstate_api/docs/SpanSummary.md | 224 ++++ generated/stackstate_api/docs/Spans.md | 10 +- generated/stackstate_api/docs/TopicApi.md | 4 +- .../stackstate_api/docs/ViewCheckState.md | 156 +++ .../stackstate_api/model_base_layout_hint.go | 136 ++ .../model_component_health_change.go | 136 ++ .../model_component_health_history.go | 195 +++ ...odel_component_highlight_metric_section.go | 165 +++ ...mponent_highlight_metric_section_all_of.go | 107 ++ .../model_component_not_found_error.go | 136 ++ .../stackstate_api/model_layout_api_error.go | 136 ++ generated/stackstate_api/model_layout_hint.go | 168 +++ generated/stackstate_api/model_layout_list.go | 107 ++ generated/stackstate_api/model_message.go | 12 +- .../model_metric_perspective_section.go | 194 +++ ...model_metric_perspective_section_all_of.go | 136 ++ .../model_metric_perspective_tab.go | 165 +++ .../model_metric_perspective_tab_all_of.go | 107 ++ .../model_monitor_check_states.go | 107 ++ .../stackstate_api/model_span_component.go | 39 +- .../stackstate_api/model_span_summary.go | 352 +++++ generated/stackstate_api/model_spans.go | 12 +- .../stackstate_api/model_view_check_state.go | 252 ++++ stackstate_openapi/openapi_version | 2 +- 61 files changed, 7079 insertions(+), 718 deletions(-) create mode 100644 generated/stackstate_api/api_authorize_ingestion_api_key.go create mode 100644 generated/stackstate_api/api_component.go create mode 100644 generated/stackstate_api/api_layout.go create mode 100644 generated/stackstate_api/docs/AuthorizeIngestionApiKeyApi.md create mode 100644 generated/stackstate_api/docs/BaseLayoutHint.md create mode 100644 generated/stackstate_api/docs/ComponentApi.md create mode 100644 generated/stackstate_api/docs/ComponentHealthChange.md create mode 100644 generated/stackstate_api/docs/ComponentHealthHistory.md create mode 100644 generated/stackstate_api/docs/ComponentHighlightMetricSection.md create mode 100644 generated/stackstate_api/docs/ComponentHighlightMetricSectionAllOf.md create mode 100644 generated/stackstate_api/docs/ComponentNotFoundError.md create mode 100644 generated/stackstate_api/docs/LayoutApi.md create mode 100644 generated/stackstate_api/docs/LayoutApiError.md create mode 100644 generated/stackstate_api/docs/LayoutHint.md create mode 100644 generated/stackstate_api/docs/LayoutList.md create mode 100644 generated/stackstate_api/docs/MetricPerspectiveSection.md create mode 100644 generated/stackstate_api/docs/MetricPerspectiveSectionAllOf.md create mode 100644 generated/stackstate_api/docs/MetricPerspectiveTab.md create mode 100644 generated/stackstate_api/docs/MetricPerspectiveTabAllOf.md create mode 100644 generated/stackstate_api/docs/MonitorCheckStates.md create mode 100644 generated/stackstate_api/docs/SpanSummary.md create mode 100644 generated/stackstate_api/docs/ViewCheckState.md create mode 100644 generated/stackstate_api/model_base_layout_hint.go create mode 100644 generated/stackstate_api/model_component_health_change.go create mode 100644 generated/stackstate_api/model_component_health_history.go create mode 100644 generated/stackstate_api/model_component_highlight_metric_section.go create mode 100644 generated/stackstate_api/model_component_highlight_metric_section_all_of.go create mode 100644 generated/stackstate_api/model_component_not_found_error.go create mode 100644 generated/stackstate_api/model_layout_api_error.go create mode 100644 generated/stackstate_api/model_layout_hint.go create mode 100644 generated/stackstate_api/model_layout_list.go create mode 100644 generated/stackstate_api/model_metric_perspective_section.go create mode 100644 generated/stackstate_api/model_metric_perspective_section_all_of.go create mode 100644 generated/stackstate_api/model_metric_perspective_tab.go create mode 100644 generated/stackstate_api/model_metric_perspective_tab_all_of.go create mode 100644 generated/stackstate_api/model_monitor_check_states.go create mode 100644 generated/stackstate_api/model_span_summary.go create mode 100644 generated/stackstate_api/model_view_check_state.go diff --git a/cmd/topic/topic_describe.go b/cmd/topic/topic_describe.go index edfd0900..8b83eb05 100644 --- a/cmd/topic/topic_describe.go +++ b/cmd/topic/topic_describe.go @@ -30,7 +30,7 @@ const ( type DescribeArgs struct { Name string - Offset int32 + Offset int64 Limit int32 Partition int32 File string @@ -48,7 +48,7 @@ func DescribeCommand(deps *di.Deps) *cobra.Command { cmd.Flags().StringVar(&args.Name, Name, "", NameUsage) cmd.MarkFlagRequired(Name) //nolint:errcheck - cmd.Flags().Int32Var(&args.Offset, Offset, -1, OffsetUsage) + cmd.Flags().Int64Var(&args.Offset, Offset, -1, OffsetUsage) cmd.Flags().Int32Var(&args.Limit, Limit, DefaultLimit, LimitUsage) cmd.Flags().Int32Var(&args.Partition, Partition, -1, PartitionUsage) common.AddFileFlagVar(cmd, &args.File, FileUsage) @@ -56,7 +56,7 @@ func DescribeCommand(deps *di.Deps) *cobra.Command { return cmd } -func argValueError(name string, value int32) common.CLIError { +func argValueError(name string, value int64) common.CLIError { return common.NewCLIArgParseError(fmt.Errorf("invalid value for argument '%s' specified: %d", name, value)) } @@ -85,7 +85,7 @@ func RunDescribeCommand(args *DescribeArgs) di.CmdWithApiFn { return argValueError(Offset, args.Offset) } if args.Limit < 1 { - return argValueError(Limit, args.Limit) + return argValueError(Limit, int64(args.Limit)) } request := api.TopicApi.Describe(cli.Context, args.Name) diff --git a/cmd/topic/topic_describe_test.go b/cmd/topic/topic_describe_test.go index f0a50b17..11e337f8 100644 --- a/cmd/topic/topic_describe_test.go +++ b/cmd/topic/topic_describe_test.go @@ -186,7 +186,7 @@ func TestTopicDescribeDefaults(t *testing.T) { type InvalidArgs struct { Name string - Value int32 + Value int64 } func TestTopicDescribePaginationLimits(t *testing.T) { diff --git a/generated/stackstate_admin_api/.openapi-generator/VERSION b/generated/stackstate_admin_api/.openapi-generator/VERSION index 358e78e6..6d54bbd7 100644 --- a/generated/stackstate_admin_api/.openapi-generator/VERSION +++ b/generated/stackstate_admin_api/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0 \ No newline at end of file +6.0.1 \ No newline at end of file diff --git a/generated/stackstate_api/.openapi-generator/FILES b/generated/stackstate_api/.openapi-generator/FILES index e14f87ba..a99eeb52 100644 --- a/generated/stackstate_api/.openapi-generator/FILES +++ b/generated/stackstate_api/.openapi-generator/FILES @@ -4,6 +4,8 @@ README.md api/openapi.yaml api_api_token.go +api_authorize_ingestion_api_key.go +api_component.go api_dummy.go api_event.go api_export.go @@ -11,6 +13,7 @@ api_health_synchronization.go api_import.go api_ingestion_api_key.go api_kubernetes_logs.go +api_layout.go api_metric.go api_monitor.go api_monitor_check_status.go @@ -53,13 +56,21 @@ docs/ArgumentStructTypeVal.md docs/ArgumentTimeWindowVal.md docs/ArgumentTopologyPromQLMetricVal.md docs/ArgumentTopologyQueryVal.md +docs/AuthorizeIngestionApiKeyApi.md docs/AuthorizeIngestionApiKeyRequest.md +docs/BaseLayoutHint.md docs/BaseMonitorError.md docs/BaseNotificationChannel.md docs/CausingEventsAreNotAvailableForTheTime.md docs/CausingEventsResult.md docs/ChannelReferenceId.md docs/ComparatorWithoutEquality.md +docs/ComponentApi.md +docs/ComponentHealthChange.md +docs/ComponentHealthHistory.md +docs/ComponentHighlightMetricSection.md +docs/ComponentHighlightMetricSectionAllOf.md +docs/ComponentNotFoundError.md docs/ComponentQuery.md docs/CreateSubject.md docs/DataUnavailable.md @@ -153,6 +164,10 @@ docs/KubernetesLogHistogramBucket.md docs/KubernetesLogRecord.md docs/KubernetesLogSeverityHistogramBucket.md docs/KubernetesLogsApi.md +docs/LayoutApi.md +docs/LayoutApiError.md +docs/LayoutHint.md +docs/LayoutList.md docs/LicensedSubscription.md docs/LimitOutOfRange.md docs/LockedResponse.md @@ -164,10 +179,15 @@ docs/MessageLevel.md docs/Messages.md docs/MetricApi.md docs/MetricBucketValue.md +docs/MetricPerspectiveSection.md +docs/MetricPerspectiveSectionAllOf.md +docs/MetricPerspectiveTab.md +docs/MetricPerspectiveTabAllOf.md docs/Monitor.md docs/MonitorApi.md docs/MonitorApiError.md docs/MonitorApiErrorAllOf.md +docs/MonitorCheckStates.md docs/MonitorCheckStatus.md docs/MonitorCheckStatusApi.md docs/MonitorCheckStatusApiError.md @@ -300,6 +320,7 @@ docs/SpanSortDirection.md docs/SpanSortField.md docs/SpanSortOption.md docs/SpanSuggestionField.md +docs/SpanSummary.md docs/Spans.md docs/StackElementNotFound.md docs/StackPack.md @@ -356,6 +377,7 @@ docs/UserProfile.md docs/UserProfileApi.md docs/UserProfileSaveError.md docs/UserSessionApi.md +docs/ViewCheckState.md docs/WebhookChannelRefId.md docs/WebhookChannelWriteSchema.md docs/WebhookNotificationChannel.md @@ -384,12 +406,18 @@ model_argument_time_window_val.go model_argument_topology_prom_ql_metric_val.go model_argument_topology_query_val.go model_authorize_ingestion_api_key_request.go +model_base_layout_hint.go model_base_monitor_error.go model_base_notification_channel.go model_causing_events_are_not_available_for_the_time.go model_causing_events_result.go model_channel_reference_id.go model_comparator_without_equality.go +model_component_health_change.go +model_component_health_history.go +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_create_subject.go model_data_unavailable.go @@ -476,6 +504,9 @@ model_kubernetes_log_highlight.go model_kubernetes_log_histogram_bucket.go model_kubernetes_log_record.go model_kubernetes_log_severity_histogram_bucket.go +model_layout_api_error.go +model_layout_hint.go +model_layout_list.go model_licensed_subscription.go model_limit_out_of_range.go model_locked_response.go @@ -486,9 +517,14 @@ model_message.go model_message_level.go model_messages.go model_metric_bucket_value.go +model_metric_perspective_section.go +model_metric_perspective_section_all_of.go +model_metric_perspective_tab.go +model_metric_perspective_tab_all_of.go model_monitor.go model_monitor_api_error.go model_monitor_api_error_all_of.go +model_monitor_check_states.go model_monitor_check_status.go model_monitor_check_status_api_error.go model_monitor_check_status_component.go @@ -612,6 +648,7 @@ model_span_sort_direction.go model_span_sort_field.go model_span_sort_option.go model_span_suggestion_field.go +model_span_summary.go model_spans.go model_stack_element_not_found.go model_stack_pack.go @@ -660,6 +697,7 @@ model_user_not_found_error.go model_user_not_logged_in_error.go model_user_profile.go model_user_profile_save_error.go +model_view_check_state.go model_webhook_channel_ref_id.go model_webhook_channel_write_schema.go model_webhook_notification_channel.go diff --git a/generated/stackstate_api/.openapi-generator/VERSION b/generated/stackstate_api/.openapi-generator/VERSION index 358e78e6..6d54bbd7 100644 --- a/generated/stackstate_api/.openapi-generator/VERSION +++ b/generated/stackstate_api/.openapi-generator/VERSION @@ -1 +1 @@ -6.1.0 \ No newline at end of file +6.0.1 \ No newline at end of file diff --git a/generated/stackstate_api/README.md b/generated/stackstate_api/README.md index 0d969984..d8c3e054 100644 --- a/generated/stackstate_api/README.md +++ b/generated/stackstate_api/README.md @@ -88,6 +88,8 @@ All URIs are relative to *http://localhost* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *ApiTokenApi* | [**GetCurrentUserApiTokens**](docs/ApiTokenApi.md#getcurrentuserapitokens) | **Get** /user/profile/tokens | Get current user's API tokens +*AuthorizeIngestionApiKeyApi* | [**AuthorizeIngestionApiKey**](docs/AuthorizeIngestionApiKeyApi.md#authorizeingestionapikey) | **Post** /security/ingestion/authorize | Check authorization for an Ingestion Api Key +*ComponentApi* | [**GetComponentHealthHistory**](docs/ComponentApi.md#getcomponenthealthhistory) | **Get** /components/{componentIdOrUrn}/healthHistory | Get a component health history *DummyApi* | [**Dummy**](docs/DummyApi.md#dummy) | **Get** /dummy/dummy | Dummy path to fix omission in openapi generation when a type is not included. *EventApi* | [**GetEvent**](docs/EventApi.md#getevent) | **Get** /events/{eventId} | Get single event *EventApi* | [**GetEventSources**](docs/EventApi.md#geteventsources) | **Get** /eventSources | Get event sources @@ -105,13 +107,13 @@ Class | Method | HTTP request | Description *HealthSynchronizationApi* | [**GetHealthSynchronizationSubStreamTopologyMatches**](docs/HealthSynchronizationApi.md#gethealthsynchronizationsubstreamtopologymatches) | **Get** /synchronization/health/streams/{healthStreamUrn}/substreams/{healthSyncSubStreamId}/topologyMatches | List health sync sub-stream check-states *HealthSynchronizationApi* | [**PostHealthSynchronizationStreamClearErrors**](docs/HealthSynchronizationApi.md#posthealthsynchronizationstreamclearerrors) | **Post** /synchronization/health/streams/{healthStreamUrn}/clearErrors | Clear health sync stream errors *ImportApi* | [**ImportSettings**](docs/ImportApi.md#importsettings) | **Post** /import | Import settings -*IngestionApiKeyApi* | [**AuthorizeIngestionApiKey**](docs/IngestionApiKeyApi.md#authorizeingestionapikey) | **Post** /security/ingestion/authorize | Check authorization for an Ingestion Api Key *IngestionApiKeyApi* | [**DeleteIngestionApiKey**](docs/IngestionApiKeyApi.md#deleteingestionapikey) | **Delete** /security/ingestion/api_keys/{ingestionApiKeyId} | Delete Ingestion Api Key *IngestionApiKeyApi* | [**GenerateIngestionApiKey**](docs/IngestionApiKeyApi.md#generateingestionapikey) | **Post** /security/ingestion/api_keys | Generate a new Ingestion Api Key *IngestionApiKeyApi* | [**GetIngestionApiKeys**](docs/IngestionApiKeyApi.md#getingestionapikeys) | **Get** /security/ingestion/api_keys | List Ingestion Api Keys *KubernetesLogsApi* | [**GetKubernetesLogs**](docs/KubernetesLogsApi.md#getkuberneteslogs) | **Get** /k8s/logs | Get Kubernetes logs *KubernetesLogsApi* | [**GetKubernetesLogsAutocomplete**](docs/KubernetesLogsApi.md#getkuberneteslogsautocomplete) | **Get** /k8s/logs/autocomplete | Get Kubernetes logs autocomplete values *KubernetesLogsApi* | [**GetKubernetesLogsHistogram**](docs/KubernetesLogsApi.md#getkuberneteslogshistogram) | **Get** /k8s/logs/histogram | Get Kubernetes logs histogram +*LayoutApi* | [**GetAllLayouts**](docs/LayoutApi.md#getalllayouts) | **Get** /layouts | List layout hints *MetricApi* | [**GetExemplarsQuery**](docs/MetricApi.md#getexemplarsquery) | **Get** /metrics/query_exemplars | Experimental: Exemplars for a specific time range *MetricApi* | [**GetInstantQuery**](docs/MetricApi.md#getinstantquery) | **Get** /metrics/query | Instant query at a single point in time *MetricApi* | [**GetLabelValues**](docs/MetricApi.md#getlabelvalues) | **Get** /metrics/label/{label}/values | List of label values for a provided label name @@ -129,16 +131,19 @@ Class | Method | HTTP request | Description *MonitorApi* | [**DeleteMonitor**](docs/MonitorApi.md#deletemonitor) | **Delete** /monitors/{monitorIdOrUrn} | Delete a monitor *MonitorApi* | [**GetAllMonitors**](docs/MonitorApi.md#getallmonitors) | **Get** /monitors | List monitors *MonitorApi* | [**GetMonitor**](docs/MonitorApi.md#getmonitor) | **Get** /monitors/{monitorIdOrUrn} | Get a monitor +*MonitorApi* | [**GetMonitorCheckStates**](docs/MonitorApi.md#getmonitorcheckstates) | **Get** /monitors/{monitorIdOrUrn}/checkStates | Get the check states for a monitor *MonitorApi* | [**GetMonitorWithStatus**](docs/MonitorApi.md#getmonitorwithstatus) | **Get** /monitors/{monitorIdOrUrn}/status | Get a monitor with stream information *MonitorApi* | [**GetMonitorsOverview**](docs/MonitorApi.md#getmonitorsoverview) | **Get** /monitors/overview | List monitors overview *MonitorApi* | [**LookupIdentifier**](docs/MonitorApi.md#lookupidentifier) | **Post** /monitors/identifierLookup | Multiple component identifier lookup *MonitorApi* | [**PatchMonitor**](docs/MonitorApi.md#patchmonitor) | **Patch** /monitors/{monitorIdOrUrn} | Update some monitor properties *MonitorApi* | [**PreviewMonitor**](docs/MonitorApi.md#previewmonitor) | **Post** /monitors/{monitorIdOrUrn}/preview | Preview a monitor +*MonitorApi* | [**PreviewMonitorCheckStates**](docs/MonitorApi.md#previewmonitorcheckstates) | **Post** /monitors/{monitorIdOrUrn}/preview/checkStates | Preview a monitor *MonitorApi* | [**PublishHealthStates**](docs/MonitorApi.md#publishhealthstates) | **Post** /monitors/{monitorIdOrUrn}/publish | Post monitor health states *MonitorApi* | [**RunMonitor**](docs/MonitorApi.md#runmonitor) | **Post** /monitors/{monitorIdOrUrn}/run | Run a monitor *MonitorApi* | [**TestMonitorFunction**](docs/MonitorApi.md#testmonitorfunction) | **Post** /monitors/{monitorFunctionIdOrUrn}/test | Test a monitor +*MonitorApi* | [**TestMonitorFunctionCheckStates**](docs/MonitorApi.md#testmonitorfunctioncheckstates) | **Post** /monitors/{monitorFunctionIdOrUrn}/test/checkStates | Test a monitor *MonitorCheckStatusApi* | [**GetMonitorCheckStatus**](docs/MonitorCheckStatusApi.md#getmonitorcheckstatus) | **Get** /monitor/checkStatus/{id} | Get a monitor check status -*MonitorCheckStatusApi* | [**GetMonitorCheckStatusHealthHistory**](docs/MonitorCheckStatusApi.md#getmonitorcheckstatushealthhistory) | **Get** /monitor/checkStatus/{id}/healthHistory | Get a monitor check health hisotry +*MonitorCheckStatusApi* | [**GetMonitorCheckStatusHealthHistory**](docs/MonitorCheckStatusApi.md#getmonitorcheckstatushealthhistory) | **Get** /monitor/checkStatus/{id}/healthHistory | Get a monitor check health history *MonitorCheckStatusApi* | [**GetMonitorCheckStatusRelatedFailures**](docs/MonitorCheckStatusApi.md#getmonitorcheckstatusrelatedfailures) | **Get** /monitor/checkStatus/{id}/relatedFailures | Get a monitor check related failures *NodeApi* | [**Clone**](docs/NodeApi.md#clone) | **Post** /node/{nodeType}/{nodeIdOrUrn}/clone | Clone a node with a new name *NodeApi* | [**Delete**](docs/NodeApi.md#delete) | **Delete** /node/{nodeType}/{nodeId} | Node deletion API @@ -236,12 +241,18 @@ Class | Method | HTTP request | Description - [ArgumentTopologyPromQLMetricVal](docs/ArgumentTopologyPromQLMetricVal.md) - [ArgumentTopologyQueryVal](docs/ArgumentTopologyQueryVal.md) - [AuthorizeIngestionApiKeyRequest](docs/AuthorizeIngestionApiKeyRequest.md) + - [BaseLayoutHint](docs/BaseLayoutHint.md) - [BaseMonitorError](docs/BaseMonitorError.md) - [BaseNotificationChannel](docs/BaseNotificationChannel.md) - [CausingEventsAreNotAvailableForTheTime](docs/CausingEventsAreNotAvailableForTheTime.md) - [CausingEventsResult](docs/CausingEventsResult.md) - [ChannelReferenceId](docs/ChannelReferenceId.md) - [ComparatorWithoutEquality](docs/ComparatorWithoutEquality.md) + - [ComponentHealthChange](docs/ComponentHealthChange.md) + - [ComponentHealthHistory](docs/ComponentHealthHistory.md) + - [ComponentHighlightMetricSection](docs/ComponentHighlightMetricSection.md) + - [ComponentHighlightMetricSectionAllOf](docs/ComponentHighlightMetricSectionAllOf.md) + - [ComponentNotFoundError](docs/ComponentNotFoundError.md) - [ComponentQuery](docs/ComponentQuery.md) - [CreateSubject](docs/CreateSubject.md) - [DataUnavailable](docs/DataUnavailable.md) @@ -328,6 +339,9 @@ Class | Method | HTTP request | Description - [KubernetesLogHistogramBucket](docs/KubernetesLogHistogramBucket.md) - [KubernetesLogRecord](docs/KubernetesLogRecord.md) - [KubernetesLogSeverityHistogramBucket](docs/KubernetesLogSeverityHistogramBucket.md) + - [LayoutApiError](docs/LayoutApiError.md) + - [LayoutHint](docs/LayoutHint.md) + - [LayoutList](docs/LayoutList.md) - [LicensedSubscription](docs/LicensedSubscription.md) - [LimitOutOfRange](docs/LimitOutOfRange.md) - [LockedResponse](docs/LockedResponse.md) @@ -338,9 +352,14 @@ Class | Method | HTTP request | Description - [MessageLevel](docs/MessageLevel.md) - [Messages](docs/Messages.md) - [MetricBucketValue](docs/MetricBucketValue.md) + - [MetricPerspectiveSection](docs/MetricPerspectiveSection.md) + - [MetricPerspectiveSectionAllOf](docs/MetricPerspectiveSectionAllOf.md) + - [MetricPerspectiveTab](docs/MetricPerspectiveTab.md) + - [MetricPerspectiveTabAllOf](docs/MetricPerspectiveTabAllOf.md) - [Monitor](docs/Monitor.md) - [MonitorApiError](docs/MonitorApiError.md) - [MonitorApiErrorAllOf](docs/MonitorApiErrorAllOf.md) + - [MonitorCheckStates](docs/MonitorCheckStates.md) - [MonitorCheckStatus](docs/MonitorCheckStatus.md) - [MonitorCheckStatusApiError](docs/MonitorCheckStatusApiError.md) - [MonitorCheckStatusComponent](docs/MonitorCheckStatusComponent.md) @@ -464,6 +483,7 @@ Class | Method | HTTP request | Description - [SpanSortField](docs/SpanSortField.md) - [SpanSortOption](docs/SpanSortOption.md) - [SpanSuggestionField](docs/SpanSuggestionField.md) + - [SpanSummary](docs/SpanSummary.md) - [Spans](docs/Spans.md) - [StackElementNotFound](docs/StackElementNotFound.md) - [StackPack](docs/StackPack.md) @@ -512,6 +532,7 @@ Class | Method | HTTP request | Description - [UserNotLoggedInError](docs/UserNotLoggedInError.md) - [UserProfile](docs/UserProfile.md) - [UserProfileSaveError](docs/UserProfileSaveError.md) + - [ViewCheckState](docs/ViewCheckState.md) - [WebhookChannelRefId](docs/WebhookChannelRefId.md) - [WebhookChannelWriteSchema](docs/WebhookChannelWriteSchema.md) - [WebhookNotificationChannel](docs/WebhookNotificationChannel.md) diff --git a/generated/stackstate_api/api/openapi.yaml b/generated/stackstate_api/api/openapi.yaml index c62d52ea..413c3f6b 100644 --- a/generated/stackstate_api/api/openapi.yaml +++ b/generated/stackstate_api/api/openapi.yaml @@ -673,6 +673,57 @@ paths: summary: Preview a monitor tags: - monitor + /monitors/{monitorIdOrUrn}/preview/checkStates: + post: + description: Performs a run of a monitor allowing to test it with new arguments + and returns the health states produced + operationId: previewMonitorCheckStates + parameters: + - description: The id or identifier (urn) of a monitor + in: path + name: monitorIdOrUrn + required: true + schema: + $ref: '#/components/schemas/MonitorIdOrUrn' + - description: Health state of check states + in: query + name: healthState + schema: + $ref: '#/components/schemas/HealthStateValue' + - in: query + name: limit + schema: + type: integer + requestBody: + $ref: '#/components/requestBodies/monitorPreview' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MonitorCheckStates' + description: Check states of a monitor + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/InvalidMonitorIdentifierError' + description: Invalid monitor id or identifier + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/MonitorNotFoundError' + description: monitor was not found in the database + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/MonitorApiError' + description: container for all error response + summary: Preview a monitor + tags: + - monitor /monitors/{monitorIdOrUrn}/run: post: description: "Performs a run of a monitor. If 'dryRun' is set, topology state\ @@ -757,6 +808,54 @@ paths: summary: Get a monitor with stream information tags: - monitor + /monitors/{monitorIdOrUrn}/checkStates: + get: + description: Returns the checkstates that a monitor generated + operationId: getMonitorCheckStates + parameters: + - description: The id or identifier (urn) of a monitor + in: path + name: monitorIdOrUrn + required: true + schema: + $ref: '#/components/schemas/MonitorIdOrUrn' + - description: Health state of check states + in: query + name: healthState + schema: + $ref: '#/components/schemas/HealthStateValue' + - in: query + name: limit + schema: + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MonitorCheckStates' + description: Check states of a monitor + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/InvalidMonitorIdentifierError' + description: Invalid monitor id or identifier + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/MonitorNotFoundError' + description: monitor was not found in the database + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/MonitorApiError' + description: container for all error response + summary: Get the check states for a monitor + tags: + - monitor /monitors/{monitorIdOrUrn}/publish: post: description: Publish health states for monitor @@ -836,6 +935,57 @@ paths: summary: Test a monitor tags: - monitor + /monitors/{monitorFunctionIdOrUrn}/test/checkStates: + post: + description: Performs a run of a monitor function to test arguments and returns + the health states produced + operationId: testMonitorFunctionCheckStates + parameters: + - description: The id or identifier (urn) of a monitor function + in: path + name: monitorFunctionIdOrUrn + required: true + schema: + $ref: '#/components/schemas/MonitorFunctionIdOrUrn' + - description: Health state of check states + in: query + name: healthState + schema: + $ref: '#/components/schemas/HealthStateValue' + - in: query + name: limit + schema: + type: integer + requestBody: + $ref: '#/components/requestBodies/monitorFunctionTest' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MonitorCheckStates' + description: Check states of a monitor + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/InvalidMonitorIdentifierError' + description: Invalid monitor id or identifier + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/MonitorFunctionNotFoundError' + description: monitor function was not found in the database + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/MonitorApiError' + description: container for all error response + summary: Test a monitor + tags: + - monitor /monitors/identifierLookup: post: description: Find identifier templates using a component type and a metrics @@ -1039,7 +1189,7 @@ paths: schema: $ref: '#/components/schemas/MonitorCheckStatusApiError' description: container for all error response - summary: Get a monitor check health hisotry + summary: Get a monitor check health history tags: - monitorCheckStatus /notifications/channels/slack/oauth-redirect: @@ -3104,6 +3254,15 @@ paths: post: description: Checks if an ingestion api key is valid operationId: authorizeIngestionApiKey + parameters: + - description: "By default, the endpoint uses only Ingestion API Keys, true\ + \ value - to verify also Receiver API Key" + in: query + name: withReceiverKey + required: false + schema: + default: false + type: boolean requestBody: content: application/json: @@ -3123,7 +3282,7 @@ paths: description: Error when handling the request on the server side. summary: Check authorization for an Ingestion Api Key tags: - - ingestionApiKey + - authorizeIngestionApiKey /security/ingestion/api_keys/{ingestionApiKeyId}: delete: description: "Deleted token can't be used by sources, so all ingestion pipelines\ @@ -4335,6 +4494,7 @@ paths: - in: query name: offset schema: + format: int64 type: integer - in: query name: partition @@ -4900,6 +5060,83 @@ paths: summary: Fetch components based on resource attributes tags: - traces + /layouts: + get: + description: List all available layout hints in the system + operationId: getAllLayouts + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/LayoutList' + description: List of all available layout hints + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/LayoutApiError' + description: container for all error response + summary: List layout hints + tags: + - layout + /components/{componentIdOrUrn}/healthHistory: + get: + description: Get a component health history for a defined period of time by + id + operationId: getComponentHealthHistory + parameters: + - description: The id or identifier (urn) of a component + in: path + name: componentIdOrUrn + required: true + schema: + $ref: '#/components/schemas/ComponentIdOrUrn' + - description: The start time of a time range to query resources. + in: query + name: startTime + required: true + schema: + format: instant + type: integer + - description: The end time of a time range to query resources. If not given + the endTime is set to current time. + in: query + name: endTime + required: false + schema: + format: instant + type: integer + - description: A timestamp at which resources will be queried. If not given + the resources are queried at current time. + in: query + name: topologyTime + required: false + schema: + format: instant + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentHealthHistory' + description: Component health history + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentNotFoundError' + description: Component not found error + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/GenericErrorsResponse' + description: Error when handling the request on the server side. + summary: Get a component health history + tags: + - component /dummy/dummy: get: description: "" @@ -5069,6 +5306,12 @@ components: schema: $ref: '#/components/schemas/MonitorPreviewResult' description: Summary representation of the result of a monitor run + monitorCheckStates: + content: + application/json: + schema: + $ref: '#/components/schemas/MonitorCheckStates' + description: Check states of a monitor monitorRunResult: content: application/json: @@ -5537,6 +5780,30 @@ components: schema: $ref: '#/components/schemas/SpanComponents' description: Components + layouts: + content: + application/json: + schema: + $ref: '#/components/schemas/LayoutList' + description: List of all available layout hints + layoutApiError: + content: + application/json: + schema: + $ref: '#/components/schemas/LayoutApiError' + description: container for all error response + componentHealthHistory: + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentHealthHistory' + description: Component health history + componentNotFoundError: + content: + application/json: + schema: + $ref: '#/components/schemas/ComponentNotFoundError' + description: Component not found error stackElementNotFound: content: application/json: @@ -6395,6 +6662,39 @@ components: - matchingComponents - uniqueIdentifiers type: object + HealthStateValue: + enum: + - UNINITIALIZED + - UNKNOWN + - CLEAR + - DISABLED + - DEVIATING + - FLAPPING + - CRITICAL + type: string + MonitorCheckStates: + example: + states: + - componentType: componentType + lastUpdateTimestamp: 0 + healthState: null + checkStateId: checkStateId + componentName: componentName + componentIdentifier: componentIdentifier + - componentType: componentType + lastUpdateTimestamp: 0 + healthState: null + checkStateId: checkStateId + componentName: componentName + componentIdentifier: componentIdentifier + properties: + states: + items: + $ref: '#/components/schemas/ViewCheckState' + type: array + required: + - states + type: object MonitorRunResult: example: result: "{}" @@ -10392,6 +10692,7 @@ components: partition: type: integer offset: + format: int64 type: integer message: type: object @@ -10996,98 +11297,30 @@ components: example: spans: - traceId: traceId + spanId: spanId durationNanos: 1 - spanKind: null - scopeName: scopeName - spanAttributes: - key: spanAttributes - spanParentType: null + startTime: + offsetNanos: 602745 + timestamp: 0 + endTime: + offsetNanos: 602745 + timestamp: 0 serviceName: serviceName parentSpanId: parentSpanId - resourceAttributes: - key: resourceAttributes - statusMessage: statusMessage spanName: spanName - scopeVersion: scopeVersion + statusCode: null + - traceId: traceId spanId: spanId - traceState: traceState + durationNanos: 1 startTime: offsetNanos: 602745 timestamp: 0 - links: - - traceId: traceId - spanId: spanId - traceState: traceState - attributes: - key: attributes - - traceId: traceId - spanId: spanId - traceState: traceState - attributes: - key: attributes endTime: offsetNanos: 602745 timestamp: 0 - events: - - name: name - attributes: - key: attributes - timestamp: - offsetNanos: 602745 - timestamp: 0 - - name: name - attributes: - key: attributes - timestamp: - offsetNanos: 602745 - timestamp: 0 - statusCode: null - - traceId: traceId - durationNanos: 1 - spanKind: null - scopeName: scopeName - spanAttributes: - key: spanAttributes - spanParentType: null serviceName: serviceName parentSpanId: parentSpanId - resourceAttributes: - key: resourceAttributes - statusMessage: statusMessage spanName: spanName - scopeVersion: scopeVersion - spanId: spanId - traceState: traceState - startTime: - offsetNanos: 602745 - timestamp: 0 - links: - - traceId: traceId - spanId: spanId - traceState: traceState - attributes: - key: attributes - - traceId: traceId - spanId: spanId - traceState: traceState - attributes: - key: attributes - endTime: - offsetNanos: 602745 - timestamp: 0 - events: - - name: name - attributes: - key: attributes - timestamp: - offsetNanos: 602745 - timestamp: 0 - - name: name - attributes: - key: attributes - timestamp: - offsetNanos: 602745 - timestamp: 0 statusCode: null pageSize: 5 page: 5 @@ -11096,7 +11329,7 @@ components: spans: description: List of spans items: - $ref: '#/components/schemas/Span' + $ref: '#/components/schemas/SpanSummary' type: array pageSize: description: Maximum number of the spans in the result. @@ -11114,54 +11347,20 @@ components: - pageSize - spans type: object - Span: + SpanSummary: example: traceId: traceId - durationNanos: 1 - spanKind: null - scopeName: scopeName - spanAttributes: - key: spanAttributes - spanParentType: null - serviceName: serviceName - parentSpanId: parentSpanId - resourceAttributes: - key: resourceAttributes - statusMessage: statusMessage - spanName: spanName - scopeVersion: scopeVersion spanId: spanId - traceState: traceState + durationNanos: 1 startTime: offsetNanos: 602745 timestamp: 0 - links: - - traceId: traceId - spanId: spanId - traceState: traceState - attributes: - key: attributes - - traceId: traceId - spanId: spanId - traceState: traceState - attributes: - key: attributes endTime: offsetNanos: 602745 timestamp: 0 - events: - - name: name - attributes: - key: attributes - timestamp: - offsetNanos: 602745 - timestamp: 0 - - name: name - attributes: - key: attributes - timestamp: - offsetNanos: 602745 - timestamp: 0 + serviceName: serviceName + parentSpanId: parentSpanId + spanName: spanName statusCode: null properties: startTime: @@ -11183,10 +11382,6 @@ components: description: The id of the parent span of this span. Empty if this is the root span type: string - traceState: - description: Can contain vendor specific trace identification information - https://www.w3.org/TR/trace-context/#tracestate-header - type: string spanName: description: "A description of the span's operation. For example, the name\ \ can be a qualified method name or a file name and a line number where\ @@ -11195,121 +11390,18 @@ components: serviceName: description: Logical name of the service for the span type: string - spanKind: - $ref: '#/components/schemas/SpanKind' - spanParentType: - $ref: '#/components/schemas/SpanParentType' - resourceAttributes: - additionalProperties: - type: string - description: Set of key/value pairs providing extra contextual information. - Keys are unique. - type: object - spanAttributes: - additionalProperties: - type: string - description: Set of key/value pairs providing extra contextual information. - Keys are unique. - type: object statusCode: $ref: '#/components/schemas/StatusCode' - statusMessage: - description: Human readable message for the status - type: string - scopeName: - description: The name of the instrumentation scope for the span https://opentelemetry.io/docs/specs/otel/glossary/#instrumentation-scope - type: string - scopeVersion: - description: The version for the instrumentation scope for the span https://opentelemetry.io/docs/specs/otel/glossary/#instrumentation-scope - type: string - events: - description: Time-stamped annotations on the span providing extra application - context - items: - $ref: '#/components/schemas/SpanEvent' - type: array - links: - description: Links to related spans in the same or in other traces - items: - $ref: '#/components/schemas/SpanLink' - type: array required: - durationNanos - endTime - - events - - links - - resourceAttributes - serviceName - - spanAttributes - spanId - - spanKind - spanName - - spanParentType - startTime - statusCode - traceId type: object - Attributes: - additionalProperties: - type: string - description: Set of key/value pairs providing extra contextual information. - Keys are unique. - type: object - SpanEvent: - description: "Event is a time-stamped annotation of the span, consisting of\ - \ user-supplied text description and key-value pairs." - example: - name: name - attributes: - key: attributes - timestamp: - offsetNanos: 602745 - timestamp: 0 - properties: - timestamp: - $ref: '#/components/schemas/InstantNanoPrecision' - name: - type: string - attributes: - additionalProperties: - type: string - description: Set of key/value pairs providing extra contextual information. - Keys are unique. - type: object - required: - - attributes - - name - - timestamp - type: object - SpanLink: - description: "A pointer from the current span to another span in the same trace\ - \ or in a different trace. \nFor example, this can be used in batching operations,\ - \ where a single batch handler processes \nmultiple requests from different\ - \ traces or when the handler receives a request from a different project.\n" - example: - traceId: traceId - spanId: spanId - traceState: traceState - attributes: - key: attributes - properties: - traceId: - type: string - spanId: - type: string - traceState: - type: string - attributes: - additionalProperties: - type: string - description: Set of key/value pairs providing extra contextual information. - Keys are unique. - type: object - required: - - attributes - - spanId - - traceId - type: object TraceApiSpansBadRequest: discriminator: propertyName: _type @@ -11476,112 +11568,308 @@ components: Trace: example: traceId: traceId - spans: - - traceId: traceId - durationNanos: 1 - spanKind: null - scopeName: scopeName - spanAttributes: - key: spanAttributes - spanParentType: null - serviceName: serviceName - parentSpanId: parentSpanId - resourceAttributes: - key: resourceAttributes - statusMessage: statusMessage - spanName: spanName - scopeVersion: scopeVersion - spanId: spanId - traceState: traceState - startTime: - offsetNanos: 602745 - timestamp: 0 - links: - - traceId: traceId - spanId: spanId - traceState: traceState - attributes: - key: attributes - - traceId: traceId - spanId: spanId - traceState: traceState - attributes: - key: attributes - endTime: - offsetNanos: 602745 - timestamp: 0 - events: - - name: name - attributes: - key: attributes - timestamp: - offsetNanos: 602745 - timestamp: 0 - - name: name - attributes: - key: attributes - timestamp: - offsetNanos: 602745 - timestamp: 0 - statusCode: null - - traceId: traceId - durationNanos: 1 - spanKind: null - scopeName: scopeName - spanAttributes: - key: spanAttributes - spanParentType: null - serviceName: serviceName - parentSpanId: parentSpanId - resourceAttributes: - key: resourceAttributes - statusMessage: statusMessage - spanName: spanName - scopeVersion: scopeVersion - spanId: spanId - traceState: traceState - startTime: - offsetNanos: 602745 - timestamp: 0 - links: - - traceId: traceId - spanId: spanId - traceState: traceState - attributes: - key: attributes - - traceId: traceId - spanId: spanId - traceState: traceState - attributes: - key: attributes - endTime: - offsetNanos: 602745 - timestamp: 0 - events: - - name: name - attributes: - key: attributes - timestamp: - offsetNanos: 602745 - timestamp: 0 - - name: name - attributes: - key: attributes - timestamp: - offsetNanos: 602745 - timestamp: 0 - statusCode: null + spans: + - traceId: traceId + durationNanos: 0 + spanKind: null + scopeName: scopeName + spanAttributes: + key: spanAttributes + spanParentType: null + serviceName: serviceName + parentSpanId: parentSpanId + resourceAttributes: + key: resourceAttributes + statusMessage: statusMessage + spanName: spanName + scopeVersion: scopeVersion + spanId: spanId + traceState: traceState + startTime: + offsetNanos: 602745 + timestamp: 0 + links: + - traceId: traceId + spanId: spanId + traceState: traceState + attributes: + key: attributes + - traceId: traceId + spanId: spanId + traceState: traceState + attributes: + key: attributes + endTime: + offsetNanos: 602745 + timestamp: 0 + events: + - name: name + attributes: + key: attributes + timestamp: + offsetNanos: 602745 + timestamp: 0 + - name: name + attributes: + key: attributes + timestamp: + offsetNanos: 602745 + timestamp: 0 + statusCode: null + - traceId: traceId + durationNanos: 0 + spanKind: null + scopeName: scopeName + spanAttributes: + key: spanAttributes + spanParentType: null + serviceName: serviceName + parentSpanId: parentSpanId + resourceAttributes: + key: resourceAttributes + statusMessage: statusMessage + spanName: spanName + scopeVersion: scopeVersion + spanId: spanId + traceState: traceState + startTime: + offsetNanos: 602745 + timestamp: 0 + links: + - traceId: traceId + spanId: spanId + traceState: traceState + attributes: + key: attributes + - traceId: traceId + spanId: spanId + traceState: traceState + attributes: + key: attributes + endTime: + offsetNanos: 602745 + timestamp: 0 + events: + - name: name + attributes: + key: attributes + timestamp: + offsetNanos: 602745 + timestamp: 0 + - name: name + attributes: + key: attributes + timestamp: + offsetNanos: 602745 + timestamp: 0 + statusCode: null + properties: + traceId: + description: The id of the trace + type: string + spans: + description: All spans for the trace + items: + $ref: '#/components/schemas/Span' + type: array + required: + - spans + - traceId + type: object + Span: + example: + traceId: traceId + durationNanos: 0 + spanKind: null + scopeName: scopeName + spanAttributes: + key: spanAttributes + spanParentType: null + serviceName: serviceName + parentSpanId: parentSpanId + resourceAttributes: + key: resourceAttributes + statusMessage: statusMessage + spanName: spanName + scopeVersion: scopeVersion + spanId: spanId + traceState: traceState + startTime: + offsetNanos: 602745 + timestamp: 0 + links: + - traceId: traceId + spanId: spanId + traceState: traceState + attributes: + key: attributes + - traceId: traceId + spanId: spanId + traceState: traceState + attributes: + key: attributes + endTime: + offsetNanos: 602745 + timestamp: 0 + events: + - name: name + attributes: + key: attributes + timestamp: + offsetNanos: 602745 + timestamp: 0 + - name: name + attributes: + key: attributes + timestamp: + offsetNanos: 602745 + timestamp: 0 + statusCode: null + properties: + startTime: + $ref: '#/components/schemas/InstantNanoPrecision' + endTime: + $ref: '#/components/schemas/InstantNanoPrecision' + durationNanos: + description: Duration of the span in nanoseconds + format: int64 + type: integer + traceId: + description: "The unique identifier for the trace, all spans of the same\ + \ trace share the same trace_id" + type: string + spanId: + description: The unique identifier of the span within the trace + type: string + parentSpanId: + description: The id of the parent span of this span. Empty if this is the + root span + type: string + traceState: + description: Can contain vendor specific trace identification information + https://www.w3.org/TR/trace-context/#tracestate-header + type: string + spanName: + description: "A description of the span's operation. For example, the name\ + \ can be a qualified method name or a file name and a line number where\ + \ the operation is called" + type: string + serviceName: + description: Logical name of the service for the span + type: string + spanKind: + $ref: '#/components/schemas/SpanKind' + spanParentType: + $ref: '#/components/schemas/SpanParentType' + resourceAttributes: + additionalProperties: + type: string + description: Set of key/value pairs providing extra contextual information. + Keys are unique. + type: object + spanAttributes: + additionalProperties: + type: string + description: Set of key/value pairs providing extra contextual information. + Keys are unique. + type: object + statusCode: + $ref: '#/components/schemas/StatusCode' + statusMessage: + description: Human readable message for the status + type: string + scopeName: + description: The name of the instrumentation scope for the span https://opentelemetry.io/docs/specs/otel/glossary/#instrumentation-scope + type: string + scopeVersion: + description: The version for the instrumentation scope for the span https://opentelemetry.io/docs/specs/otel/glossary/#instrumentation-scope + type: string + events: + description: Time-stamped annotations on the span providing extra application + context + items: + $ref: '#/components/schemas/SpanEvent' + type: array + links: + description: Links to related spans in the same or in other traces + items: + $ref: '#/components/schemas/SpanLink' + type: array + required: + - durationNanos + - endTime + - events + - links + - resourceAttributes + - serviceName + - spanAttributes + - spanId + - spanKind + - spanName + - spanParentType + - startTime + - statusCode + - traceId + type: object + Attributes: + additionalProperties: + type: string + description: Set of key/value pairs providing extra contextual information. + Keys are unique. + type: object + SpanEvent: + description: "Event is a time-stamped annotation of the span, consisting of\ + \ user-supplied text description and key-value pairs." + example: + name: name + attributes: + key: attributes + timestamp: + offsetNanos: 602745 + timestamp: 0 + properties: + timestamp: + $ref: '#/components/schemas/InstantNanoPrecision' + name: + type: string + attributes: + additionalProperties: + type: string + description: Set of key/value pairs providing extra contextual information. + Keys are unique. + type: object + required: + - attributes + - name + - timestamp + type: object + SpanLink: + description: "A pointer from the current span to another span in the same trace\ + \ or in a different trace. \nFor example, this can be used in batching operations,\ + \ where a single batch handler processes \nmultiple requests from different\ + \ traces or when the handler receives a request from a different project.\n" + example: + traceId: traceId + spanId: spanId + traceState: traceState + attributes: + key: attributes properties: traceId: - description: The id of the trace type: string - spans: - description: All spans for the trace - items: - $ref: '#/components/schemas/Span' - type: array + spanId: + type: string + traceState: + type: string + attributes: + additionalProperties: + type: string + description: Set of key/value pairs providing extra contextual information. + Keys are unique. + type: object required: - - spans + - attributes + - spanId - traceId type: object TraceApiTraceNotFound: @@ -11645,10 +11933,12 @@ components: example: components: - identifier: identifier + healthState: null name: name id: 0 type: type - identifier: identifier + healthState: null name: name id: 0 type: type @@ -11663,6 +11953,7 @@ components: SpanComponent: example: identifier: identifier + healthState: null name: name id: 0 type: type @@ -11676,12 +11967,132 @@ components: type: string type: type: string + healthState: + $ref: '#/components/schemas/HealthStateValue' required: + - healthState - id - identifier - name - type type: object + LayoutList: + example: + layouts: + - null + - null + properties: + layouts: + items: + $ref: '#/components/schemas/LayoutHint' + type: array + required: + - layouts + type: object + LayoutHint: + discriminator: + propertyName: _type + oneOf: + - $ref: '#/components/schemas/MetricPerspectiveTab' + - $ref: '#/components/schemas/MetricPerspectiveSection' + - $ref: '#/components/schemas/ComponentHighlightMetricSection' + MetricPerspectiveTab: + allOf: + - $ref: '#/components/schemas/BaseLayoutHint' + - $ref: '#/components/schemas/MetricPerspectiveTab_allOf' + BaseLayoutHint: + properties: + name: + type: string + weight: + format: float + type: number + required: + - name + - weight + type: object + MetricPerspectiveSection: + allOf: + - $ref: '#/components/schemas/BaseLayoutHint' + - $ref: '#/components/schemas/MetricPerspectiveSection_allOf' + ComponentHighlightMetricSection: + allOf: + - $ref: '#/components/schemas/BaseLayoutHint' + - $ref: '#/components/schemas/ComponentHighlightMetricSection_allOf' + LayoutApiError: + properties: + statusCode: + type: string + message: + type: string + required: + - message + - statusCode + type: object + ComponentIdOrUrn: + pattern: "^urn:.+|[0-9]+$" + type: string + ComponentHealthHistory: + example: + startTime: 6 + id: 0 + endTime: 1 + healthStateChanges: + - newHealth: null + timestamp: 5 + - newHealth: null + timestamp: 5 + properties: + id: + format: int64 + type: integer + startTime: + format: instant + type: integer + endTime: + format: instant + type: integer + healthStateChanges: + description: List of health state changes ordered from most recent to oldest. + items: + $ref: '#/components/schemas/ComponentHealthChange' + type: array + required: + - endTime + - healthStateChanges + - id + - startTime + ComponentHealthChange: + example: + newHealth: null + timestamp: 5 + properties: + timestamp: + format: int64 + type: integer + newHealth: + $ref: '#/components/schemas/HealthStateValue' + required: + - newHealth + - timestamp + ComponentNotFoundError: + discriminator: + propertyName: _type + properties: + _type: + enum: + - ComponentNotFoundError + type: string + componentId: + format: int64 + type: integer + required: + - _type + - componentId + type: object + ComponentId: + format: int64 + type: integer StackElementNotFound: discriminator: propertyName: _type @@ -12201,22 +12612,42 @@ components: - topologyQuery - unit type: object + ViewCheckState: + example: + componentType: componentType + lastUpdateTimestamp: 0 + healthState: null + checkStateId: checkStateId + componentName: componentName + componentIdentifier: componentIdentifier + properties: + checkStateId: + type: string + healthState: + $ref: '#/components/schemas/HealthStateValue' + componentName: + type: string + componentIdentifier: + type: string + componentType: + type: string + lastUpdateTimestamp: + format: int64 + type: integer + required: + - checkStateId + - componentIdentifier + - componentName + - componentType + - healthState + - lastUpdateTimestamp + type: object MessageLevel: enum: - WARN - ERROR - INFO type: string - HealthStateValue: - enum: - - UNINITIALIZED - - UNKNOWN - - CLEAR - - DISABLED - - DEVIATING - - FLAPPING - - CRITICAL - type: string MonitorReferenceId: discriminator: propertyName: _type @@ -12403,6 +12834,36 @@ components: type: number - format: sample_value type: string + MetricPerspectiveTab_allOf: + properties: + _type: + enum: + - MetricPerspectiveTab + type: string + required: + - _type + type: object + MetricPerspectiveSection_allOf: + properties: + _type: + enum: + - MetricPerspectiveSection + type: string + tab: + type: string + required: + - _type + - tab + type: object + ComponentHighlightMetricSection_allOf: + properties: + _type: + enum: + - ComponentHighlightMetricSection + type: string + required: + - _type + type: object securitySchemes: ApiToken: description: | diff --git a/generated/stackstate_api/api_authorize_ingestion_api_key.go b/generated/stackstate_api/api_authorize_ingestion_api_key.go new file mode 100644 index 00000000..571b6909 --- /dev/null +++ b/generated/stackstate_api/api_authorize_ingestion_api_key.go @@ -0,0 +1,241 @@ +/* +StackState API + +This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). + +API version: 5.2.0 +Contact: info@stackstate.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackstate_api + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" +) + +type AuthorizeIngestionApiKeyApi interface { + + /* + AuthorizeIngestionApiKey Check authorization for an Ingestion Api Key + + Checks if an ingestion api key is valid + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthorizeIngestionApiKeyRequest + */ + AuthorizeIngestionApiKey(ctx context.Context) ApiAuthorizeIngestionApiKeyRequest + + // AuthorizeIngestionApiKeyExecute executes the request + AuthorizeIngestionApiKeyExecute(r ApiAuthorizeIngestionApiKeyRequest) (*http.Response, error) +} + +// AuthorizeIngestionApiKeyApiService AuthorizeIngestionApiKeyApi service +type AuthorizeIngestionApiKeyApiService service + +type ApiAuthorizeIngestionApiKeyRequest struct { + ctx context.Context + ApiService AuthorizeIngestionApiKeyApi + authorizeIngestionApiKeyRequest *AuthorizeIngestionApiKeyRequest + withReceiverKey *bool +} + +func (r ApiAuthorizeIngestionApiKeyRequest) AuthorizeIngestionApiKeyRequest(authorizeIngestionApiKeyRequest AuthorizeIngestionApiKeyRequest) ApiAuthorizeIngestionApiKeyRequest { + r.authorizeIngestionApiKeyRequest = &authorizeIngestionApiKeyRequest + return r +} + +// By default, the endpoint uses only Ingestion API Keys, true value - to verify also Receiver API Key +func (r ApiAuthorizeIngestionApiKeyRequest) WithReceiverKey(withReceiverKey bool) ApiAuthorizeIngestionApiKeyRequest { + r.withReceiverKey = &withReceiverKey + return r +} + +func (r ApiAuthorizeIngestionApiKeyRequest) Execute() (*http.Response, error) { + return r.ApiService.AuthorizeIngestionApiKeyExecute(r) +} + +/* +AuthorizeIngestionApiKey Check authorization for an Ingestion Api Key + +Checks if an ingestion api key is valid + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthorizeIngestionApiKeyRequest +*/ +func (a *AuthorizeIngestionApiKeyApiService) AuthorizeIngestionApiKey(ctx context.Context) ApiAuthorizeIngestionApiKeyRequest { + return ApiAuthorizeIngestionApiKeyRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *AuthorizeIngestionApiKeyApiService) AuthorizeIngestionApiKeyExecute(r ApiAuthorizeIngestionApiKeyRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthorizeIngestionApiKeyApiService.AuthorizeIngestionApiKey") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/security/ingestion/authorize" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.authorizeIngestionApiKeyRequest == nil { + return nil, reportError("authorizeIngestionApiKeyRequest is required and must be specified") + } + + if r.withReceiverKey != nil { + localVarQueryParams.Add("withReceiverKey", parameterToString(*r.withReceiverKey, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.authorizeIngestionApiKeyRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiToken"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-Token"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ServiceBearer"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-ServiceBearer"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ServiceToken"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v GenericErrorsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +// --------------------------------------------- +// ------------------ MOCKS -------------------- +// --------------------------------------------- + +type AuthorizeIngestionApiKeyApiMock struct { + AuthorizeIngestionApiKeyCalls *[]AuthorizeIngestionApiKeyCall + AuthorizeIngestionApiKeyResponse AuthorizeIngestionApiKeyMockResponse +} + +func NewAuthorizeIngestionApiKeyApiMock() AuthorizeIngestionApiKeyApiMock { + xAuthorizeIngestionApiKeyCalls := make([]AuthorizeIngestionApiKeyCall, 0) + return AuthorizeIngestionApiKeyApiMock{ + AuthorizeIngestionApiKeyCalls: &xAuthorizeIngestionApiKeyCalls, + } +} + +type AuthorizeIngestionApiKeyMockResponse struct { + Response *http.Response + Error error +} + +type AuthorizeIngestionApiKeyCall struct { + PauthorizeIngestionApiKeyRequest *AuthorizeIngestionApiKeyRequest + PwithReceiverKey *bool +} + +func (mock AuthorizeIngestionApiKeyApiMock) AuthorizeIngestionApiKey(ctx context.Context) ApiAuthorizeIngestionApiKeyRequest { + return ApiAuthorizeIngestionApiKeyRequest{ + ApiService: mock, + ctx: ctx, + } +} + +func (mock AuthorizeIngestionApiKeyApiMock) AuthorizeIngestionApiKeyExecute(r ApiAuthorizeIngestionApiKeyRequest) (*http.Response, error) { + p := AuthorizeIngestionApiKeyCall{ + PauthorizeIngestionApiKeyRequest: r.authorizeIngestionApiKeyRequest, + PwithReceiverKey: r.withReceiverKey, + } + *mock.AuthorizeIngestionApiKeyCalls = append(*mock.AuthorizeIngestionApiKeyCalls, p) + return mock.AuthorizeIngestionApiKeyResponse.Response, mock.AuthorizeIngestionApiKeyResponse.Error +} diff --git a/generated/stackstate_api/api_component.go b/generated/stackstate_api/api_component.go new file mode 100644 index 00000000..39b03374 --- /dev/null +++ b/generated/stackstate_api/api_component.go @@ -0,0 +1,285 @@ +/* +StackState API + +This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). + +API version: 5.2.0 +Contact: info@stackstate.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackstate_api + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +type ComponentApi interface { + + /* + GetComponentHealthHistory Get a component health history + + Get a component health history for a defined period of time by id + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param componentIdOrUrn The id or identifier (urn) of a component + @return ApiGetComponentHealthHistoryRequest + */ + GetComponentHealthHistory(ctx context.Context, componentIdOrUrn string) ApiGetComponentHealthHistoryRequest + + // GetComponentHealthHistoryExecute executes the request + // @return ComponentHealthHistory + GetComponentHealthHistoryExecute(r ApiGetComponentHealthHistoryRequest) (*ComponentHealthHistory, *http.Response, error) +} + +// ComponentApiService ComponentApi service +type ComponentApiService service + +type ApiGetComponentHealthHistoryRequest struct { + ctx context.Context + ApiService ComponentApi + componentIdOrUrn string + startTime *int32 + endTime *int32 + topologyTime *int32 +} + +// The start time of a time range to query resources. +func (r ApiGetComponentHealthHistoryRequest) StartTime(startTime int32) ApiGetComponentHealthHistoryRequest { + r.startTime = &startTime + return r +} + +// The end time of a time range to query resources. If not given the endTime is set to current time. +func (r ApiGetComponentHealthHistoryRequest) EndTime(endTime int32) ApiGetComponentHealthHistoryRequest { + r.endTime = &endTime + return r +} + +// A timestamp at which resources will be queried. If not given the resources are queried at current time. +func (r ApiGetComponentHealthHistoryRequest) TopologyTime(topologyTime int32) ApiGetComponentHealthHistoryRequest { + r.topologyTime = &topologyTime + return r +} + +func (r ApiGetComponentHealthHistoryRequest) Execute() (*ComponentHealthHistory, *http.Response, error) { + return r.ApiService.GetComponentHealthHistoryExecute(r) +} + +/* +GetComponentHealthHistory Get a component health history + +Get a component health history for a defined period of time by id + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param componentIdOrUrn The id or identifier (urn) of a component + @return ApiGetComponentHealthHistoryRequest +*/ +func (a *ComponentApiService) GetComponentHealthHistory(ctx context.Context, componentIdOrUrn string) ApiGetComponentHealthHistoryRequest { + return ApiGetComponentHealthHistoryRequest{ + ApiService: a, + ctx: ctx, + componentIdOrUrn: componentIdOrUrn, + } +} + +// Execute executes the request +// @return ComponentHealthHistory +func (a *ComponentApiService) GetComponentHealthHistoryExecute(r ApiGetComponentHealthHistoryRequest) (*ComponentHealthHistory, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ComponentHealthHistory + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ComponentApiService.GetComponentHealthHistory") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/components/{componentIdOrUrn}/healthHistory" + localVarPath = strings.Replace(localVarPath, "{"+"componentIdOrUrn"+"}", url.PathEscape(parameterToString(r.componentIdOrUrn, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.startTime == nil { + return localVarReturnValue, nil, reportError("startTime is required and must be specified") + } + + localVarQueryParams.Add("startTime", parameterToString(*r.startTime, "")) + if r.endTime != nil { + localVarQueryParams.Add("endTime", parameterToString(*r.endTime, "")) + } + if r.topologyTime != nil { + localVarQueryParams.Add("topologyTime", parameterToString(*r.topologyTime, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiToken"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-Token"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ServiceBearer"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-ServiceBearer"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ServiceToken"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ComponentNotFoundError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v GenericErrorsResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +// --------------------------------------------- +// ------------------ MOCKS -------------------- +// --------------------------------------------- + +type ComponentApiMock struct { + GetComponentHealthHistoryCalls *[]GetComponentHealthHistoryCall + GetComponentHealthHistoryResponse GetComponentHealthHistoryMockResponse +} + +func NewComponentApiMock() ComponentApiMock { + xGetComponentHealthHistoryCalls := make([]GetComponentHealthHistoryCall, 0) + return ComponentApiMock{ + GetComponentHealthHistoryCalls: &xGetComponentHealthHistoryCalls, + } +} + +type GetComponentHealthHistoryMockResponse struct { + Result ComponentHealthHistory + Response *http.Response + Error error +} + +type GetComponentHealthHistoryCall struct { + PcomponentIdOrUrn string + PstartTime *int32 + PendTime *int32 + PtopologyTime *int32 +} + +func (mock ComponentApiMock) GetComponentHealthHistory(ctx context.Context, componentIdOrUrn string) ApiGetComponentHealthHistoryRequest { + return ApiGetComponentHealthHistoryRequest{ + ApiService: mock, + ctx: ctx, + componentIdOrUrn: componentIdOrUrn, + } +} + +func (mock ComponentApiMock) GetComponentHealthHistoryExecute(r ApiGetComponentHealthHistoryRequest) (*ComponentHealthHistory, *http.Response, error) { + p := GetComponentHealthHistoryCall{ + PcomponentIdOrUrn: r.componentIdOrUrn, + PstartTime: r.startTime, + PendTime: r.endTime, + PtopologyTime: r.topologyTime, + } + *mock.GetComponentHealthHistoryCalls = append(*mock.GetComponentHealthHistoryCalls, p) + return &mock.GetComponentHealthHistoryResponse.Result, mock.GetComponentHealthHistoryResponse.Response, mock.GetComponentHealthHistoryResponse.Error +} diff --git a/generated/stackstate_api/api_ingestion_api_key.go b/generated/stackstate_api/api_ingestion_api_key.go index 0fbfd70e..ae1e42b8 100644 --- a/generated/stackstate_api/api_ingestion_api_key.go +++ b/generated/stackstate_api/api_ingestion_api_key.go @@ -22,19 +22,6 @@ import ( type IngestionApiKeyApi interface { - /* - AuthorizeIngestionApiKey Check authorization for an Ingestion Api Key - - Checks if an ingestion api key is valid - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthorizeIngestionApiKeyRequest - */ - AuthorizeIngestionApiKey(ctx context.Context) ApiAuthorizeIngestionApiKeyRequest - - // AuthorizeIngestionApiKeyExecute executes the request - AuthorizeIngestionApiKeyExecute(r ApiAuthorizeIngestionApiKeyRequest) (*http.Response, error) - /* DeleteIngestionApiKey Delete Ingestion Api Key @@ -81,156 +68,6 @@ type IngestionApiKeyApi interface { // IngestionApiKeyApiService IngestionApiKeyApi service type IngestionApiKeyApiService service -type ApiAuthorizeIngestionApiKeyRequest struct { - ctx context.Context - ApiService IngestionApiKeyApi - authorizeIngestionApiKeyRequest *AuthorizeIngestionApiKeyRequest -} - -func (r ApiAuthorizeIngestionApiKeyRequest) AuthorizeIngestionApiKeyRequest(authorizeIngestionApiKeyRequest AuthorizeIngestionApiKeyRequest) ApiAuthorizeIngestionApiKeyRequest { - r.authorizeIngestionApiKeyRequest = &authorizeIngestionApiKeyRequest - return r -} - -func (r ApiAuthorizeIngestionApiKeyRequest) Execute() (*http.Response, error) { - return r.ApiService.AuthorizeIngestionApiKeyExecute(r) -} - -/* -AuthorizeIngestionApiKey Check authorization for an Ingestion Api Key - -Checks if an ingestion api key is valid - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthorizeIngestionApiKeyRequest -*/ -func (a *IngestionApiKeyApiService) AuthorizeIngestionApiKey(ctx context.Context) ApiAuthorizeIngestionApiKeyRequest { - return ApiAuthorizeIngestionApiKeyRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *IngestionApiKeyApiService) AuthorizeIngestionApiKeyExecute(r ApiAuthorizeIngestionApiKeyRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IngestionApiKeyApiService.AuthorizeIngestionApiKey") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/security/ingestion/authorize" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.authorizeIngestionApiKeyRequest == nil { - return nil, reportError("authorizeIngestionApiKeyRequest is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.authorizeIngestionApiKeyRequest - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ApiToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-API-Token"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ServiceBearer"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-API-ServiceBearer"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["ServiceToken"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["X-API-Key"] = key - } - } - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 500 { - var v GenericErrorsResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - type ApiDeleteIngestionApiKeyRequest struct { ctx context.Context ApiService IngestionApiKeyApi @@ -700,51 +537,23 @@ func (a *IngestionApiKeyApiService) GetIngestionApiKeysExecute(r ApiGetIngestion // --------------------------------------------- type IngestionApiKeyApiMock struct { - AuthorizeIngestionApiKeyCalls *[]AuthorizeIngestionApiKeyCall - AuthorizeIngestionApiKeyResponse AuthorizeIngestionApiKeyMockResponse - DeleteIngestionApiKeyCalls *[]DeleteIngestionApiKeyCall - DeleteIngestionApiKeyResponse DeleteIngestionApiKeyMockResponse - GenerateIngestionApiKeyCalls *[]GenerateIngestionApiKeyCall - GenerateIngestionApiKeyResponse GenerateIngestionApiKeyMockResponse - GetIngestionApiKeysCalls *[]GetIngestionApiKeysCall - GetIngestionApiKeysResponse GetIngestionApiKeysMockResponse + DeleteIngestionApiKeyCalls *[]DeleteIngestionApiKeyCall + DeleteIngestionApiKeyResponse DeleteIngestionApiKeyMockResponse + GenerateIngestionApiKeyCalls *[]GenerateIngestionApiKeyCall + GenerateIngestionApiKeyResponse GenerateIngestionApiKeyMockResponse + GetIngestionApiKeysCalls *[]GetIngestionApiKeysCall + GetIngestionApiKeysResponse GetIngestionApiKeysMockResponse } func NewIngestionApiKeyApiMock() IngestionApiKeyApiMock { - xAuthorizeIngestionApiKeyCalls := make([]AuthorizeIngestionApiKeyCall, 0) xDeleteIngestionApiKeyCalls := make([]DeleteIngestionApiKeyCall, 0) xGenerateIngestionApiKeyCalls := make([]GenerateIngestionApiKeyCall, 0) xGetIngestionApiKeysCalls := make([]GetIngestionApiKeysCall, 0) return IngestionApiKeyApiMock{ - AuthorizeIngestionApiKeyCalls: &xAuthorizeIngestionApiKeyCalls, - DeleteIngestionApiKeyCalls: &xDeleteIngestionApiKeyCalls, - GenerateIngestionApiKeyCalls: &xGenerateIngestionApiKeyCalls, - GetIngestionApiKeysCalls: &xGetIngestionApiKeysCalls, - } -} - -type AuthorizeIngestionApiKeyMockResponse struct { - Response *http.Response - Error error -} - -type AuthorizeIngestionApiKeyCall struct { - PauthorizeIngestionApiKeyRequest *AuthorizeIngestionApiKeyRequest -} - -func (mock IngestionApiKeyApiMock) AuthorizeIngestionApiKey(ctx context.Context) ApiAuthorizeIngestionApiKeyRequest { - return ApiAuthorizeIngestionApiKeyRequest{ - ApiService: mock, - ctx: ctx, - } -} - -func (mock IngestionApiKeyApiMock) AuthorizeIngestionApiKeyExecute(r ApiAuthorizeIngestionApiKeyRequest) (*http.Response, error) { - p := AuthorizeIngestionApiKeyCall{ - PauthorizeIngestionApiKeyRequest: r.authorizeIngestionApiKeyRequest, + DeleteIngestionApiKeyCalls: &xDeleteIngestionApiKeyCalls, + GenerateIngestionApiKeyCalls: &xGenerateIngestionApiKeyCalls, + GetIngestionApiKeysCalls: &xGetIngestionApiKeysCalls, } - *mock.AuthorizeIngestionApiKeyCalls = append(*mock.AuthorizeIngestionApiKeyCalls, p) - return mock.AuthorizeIngestionApiKeyResponse.Response, mock.AuthorizeIngestionApiKeyResponse.Error } type DeleteIngestionApiKeyMockResponse struct { diff --git a/generated/stackstate_api/api_layout.go b/generated/stackstate_api/api_layout.go new file mode 100644 index 00000000..034d01b2 --- /dev/null +++ b/generated/stackstate_api/api_layout.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 LayoutApi interface { + + /* + GetAllLayouts List layout hints + + List all available layout hints in the system + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAllLayoutsRequest + */ + GetAllLayouts(ctx context.Context) ApiGetAllLayoutsRequest + + // GetAllLayoutsExecute executes the request + // @return LayoutList + GetAllLayoutsExecute(r ApiGetAllLayoutsRequest) (*LayoutList, *http.Response, error) +} + +// LayoutApiService LayoutApi service +type LayoutApiService service + +type ApiGetAllLayoutsRequest struct { + ctx context.Context + ApiService LayoutApi +} + +func (r ApiGetAllLayoutsRequest) Execute() (*LayoutList, *http.Response, error) { + return r.ApiService.GetAllLayoutsExecute(r) +} + +/* +GetAllLayouts List layout hints + +List all available layout hints in the system + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetAllLayoutsRequest +*/ +func (a *LayoutApiService) GetAllLayouts(ctx context.Context) ApiGetAllLayoutsRequest { + return ApiGetAllLayoutsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return LayoutList +func (a *LayoutApiService) GetAllLayoutsExecute(r ApiGetAllLayoutsRequest) (*LayoutList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LayoutList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LayoutApiService.GetAllLayouts") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/layouts" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiToken"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-Token"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ServiceBearer"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-ServiceBearer"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ServiceToken"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v LayoutApiError + 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 LayoutApiMock struct { + GetAllLayoutsCalls *[]GetAllLayoutsCall + GetAllLayoutsResponse GetAllLayoutsMockResponse +} + +func NewLayoutApiMock() LayoutApiMock { + xGetAllLayoutsCalls := make([]GetAllLayoutsCall, 0) + return LayoutApiMock{ + GetAllLayoutsCalls: &xGetAllLayoutsCalls, + } +} + +type GetAllLayoutsMockResponse struct { + Result LayoutList + Response *http.Response + Error error +} + +type GetAllLayoutsCall struct { +} + +func (mock LayoutApiMock) GetAllLayouts(ctx context.Context) ApiGetAllLayoutsRequest { + return ApiGetAllLayoutsRequest{ + ApiService: mock, + ctx: ctx, + } +} + +func (mock LayoutApiMock) GetAllLayoutsExecute(r ApiGetAllLayoutsRequest) (*LayoutList, *http.Response, error) { + p := GetAllLayoutsCall{} + *mock.GetAllLayoutsCalls = append(*mock.GetAllLayoutsCalls, p) + return &mock.GetAllLayoutsResponse.Result, mock.GetAllLayoutsResponse.Response, mock.GetAllLayoutsResponse.Error +} diff --git a/generated/stackstate_api/api_monitor.go b/generated/stackstate_api/api_monitor.go index 7da08fa7..55728648 100644 --- a/generated/stackstate_api/api_monitor.go +++ b/generated/stackstate_api/api_monitor.go @@ -65,6 +65,21 @@ type MonitorApi interface { // @return Monitor GetMonitorExecute(r ApiGetMonitorRequest) (*Monitor, *http.Response, error) + /* + GetMonitorCheckStates Get the check states for a monitor + + Returns the checkstates that a monitor generated + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param monitorIdOrUrn The id or identifier (urn) of a monitor + @return ApiGetMonitorCheckStatesRequest + */ + GetMonitorCheckStates(ctx context.Context, monitorIdOrUrn string) ApiGetMonitorCheckStatesRequest + + // GetMonitorCheckStatesExecute executes the request + // @return MonitorCheckStates + GetMonitorCheckStatesExecute(r ApiGetMonitorCheckStatesRequest) (*MonitorCheckStates, *http.Response, error) + /* GetMonitorWithStatus Get a monitor with stream information @@ -138,6 +153,21 @@ type MonitorApi interface { // @return MonitorPreviewResult PreviewMonitorExecute(r ApiPreviewMonitorRequest) (*MonitorPreviewResult, *http.Response, error) + /* + PreviewMonitorCheckStates Preview a monitor + + Performs a run of a monitor allowing to test it with new arguments and returns the health states produced + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param monitorIdOrUrn The id or identifier (urn) of a monitor + @return ApiPreviewMonitorCheckStatesRequest + */ + PreviewMonitorCheckStates(ctx context.Context, monitorIdOrUrn string) ApiPreviewMonitorCheckStatesRequest + + // PreviewMonitorCheckStatesExecute executes the request + // @return MonitorCheckStates + PreviewMonitorCheckStatesExecute(r ApiPreviewMonitorCheckStatesRequest) (*MonitorCheckStates, *http.Response, error) + /* PublishHealthStates Post monitor health states @@ -181,6 +211,21 @@ type MonitorApi interface { // TestMonitorFunctionExecute executes the request // @return MonitorPreviewResult TestMonitorFunctionExecute(r ApiTestMonitorFunctionRequest) (*MonitorPreviewResult, *http.Response, error) + + /* + TestMonitorFunctionCheckStates Test a monitor + + Performs a run of a monitor function to test arguments and returns the health states produced + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param monitorFunctionIdOrUrn The id or identifier (urn) of a monitor function + @return ApiTestMonitorFunctionCheckStatesRequest + */ + TestMonitorFunctionCheckStates(ctx context.Context, monitorFunctionIdOrUrn string) ApiTestMonitorFunctionCheckStatesRequest + + // TestMonitorFunctionCheckStatesExecute executes the request + // @return MonitorCheckStates + TestMonitorFunctionCheckStatesExecute(r ApiTestMonitorFunctionCheckStatesRequest) (*MonitorCheckStates, *http.Response, error) } // MonitorApiService MonitorApi service @@ -673,6 +718,199 @@ func (a *MonitorApiService) GetMonitorExecute(r ApiGetMonitorRequest) (*Monitor, return localVarReturnValue, localVarHTTPResponse, nil } +type ApiGetMonitorCheckStatesRequest struct { + ctx context.Context + ApiService MonitorApi + monitorIdOrUrn string + healthState *HealthStateValue + limit *int32 +} + +// Health state of check states +func (r ApiGetMonitorCheckStatesRequest) HealthState(healthState HealthStateValue) ApiGetMonitorCheckStatesRequest { + r.healthState = &healthState + return r +} + +func (r ApiGetMonitorCheckStatesRequest) Limit(limit int32) ApiGetMonitorCheckStatesRequest { + r.limit = &limit + return r +} + +func (r ApiGetMonitorCheckStatesRequest) Execute() (*MonitorCheckStates, *http.Response, error) { + return r.ApiService.GetMonitorCheckStatesExecute(r) +} + +/* +GetMonitorCheckStates Get the check states for a monitor + +Returns the checkstates that a monitor generated + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param monitorIdOrUrn The id or identifier (urn) of a monitor + @return ApiGetMonitorCheckStatesRequest +*/ +func (a *MonitorApiService) GetMonitorCheckStates(ctx context.Context, monitorIdOrUrn string) ApiGetMonitorCheckStatesRequest { + return ApiGetMonitorCheckStatesRequest{ + ApiService: a, + ctx: ctx, + monitorIdOrUrn: monitorIdOrUrn, + } +} + +// Execute executes the request +// @return MonitorCheckStates +func (a *MonitorApiService) GetMonitorCheckStatesExecute(r ApiGetMonitorCheckStatesRequest) (*MonitorCheckStates, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MonitorCheckStates + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MonitorApiService.GetMonitorCheckStates") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/monitors/{monitorIdOrUrn}/checkStates" + localVarPath = strings.Replace(localVarPath, "{"+"monitorIdOrUrn"+"}", url.PathEscape(parameterToString(r.monitorIdOrUrn, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.healthState != nil { + localVarQueryParams.Add("healthState", parameterToString(*r.healthState, "")) + } + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiToken"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-Token"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ServiceBearer"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-ServiceBearer"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ServiceToken"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v InvalidMonitorIdentifierError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v MonitorNotFoundError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v MonitorApiError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiGetMonitorWithStatusRequest struct { ctx context.Context ApiService MonitorApi @@ -1541,34 +1779,47 @@ func (a *MonitorApiService) PreviewMonitorExecute(r ApiPreviewMonitorRequest) (* return localVarReturnValue, localVarHTTPResponse, nil } -type ApiPublishHealthStatesRequest struct { - ctx context.Context - ApiService MonitorApi - monitorIdOrUrn string - monitorSnapshot *MonitorSnapshot +type ApiPreviewMonitorCheckStatesRequest struct { + ctx context.Context + ApiService MonitorApi + monitorIdOrUrn string + monitorPreview *MonitorPreview + healthState *HealthStateValue + limit *int32 } -// Monitor snapshot of health states -func (r ApiPublishHealthStatesRequest) MonitorSnapshot(monitorSnapshot MonitorSnapshot) ApiPublishHealthStatesRequest { - r.monitorSnapshot = &monitorSnapshot +// Monitor overrides in order to run a preview +func (r ApiPreviewMonitorCheckStatesRequest) MonitorPreview(monitorPreview MonitorPreview) ApiPreviewMonitorCheckStatesRequest { + r.monitorPreview = &monitorPreview return r } -func (r ApiPublishHealthStatesRequest) Execute() (*http.Response, error) { - return r.ApiService.PublishHealthStatesExecute(r) +// Health state of check states +func (r ApiPreviewMonitorCheckStatesRequest) HealthState(healthState HealthStateValue) ApiPreviewMonitorCheckStatesRequest { + r.healthState = &healthState + return r +} + +func (r ApiPreviewMonitorCheckStatesRequest) Limit(limit int32) ApiPreviewMonitorCheckStatesRequest { + r.limit = &limit + return r +} + +func (r ApiPreviewMonitorCheckStatesRequest) Execute() (*MonitorCheckStates, *http.Response, error) { + return r.ApiService.PreviewMonitorCheckStatesExecute(r) } /* -PublishHealthStates Post monitor health states +PreviewMonitorCheckStates Preview a monitor -Publish health states for monitor +Performs a run of a monitor allowing to test it with new arguments and returns the health states produced @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param monitorIdOrUrn The id or identifier (urn) of a monitor - @return ApiPublishHealthStatesRequest + @return ApiPreviewMonitorCheckStatesRequest */ -func (a *MonitorApiService) PublishHealthStates(ctx context.Context, monitorIdOrUrn string) ApiPublishHealthStatesRequest { - return ApiPublishHealthStatesRequest{ +func (a *MonitorApiService) PreviewMonitorCheckStates(ctx context.Context, monitorIdOrUrn string) ApiPreviewMonitorCheckStatesRequest { + return ApiPreviewMonitorCheckStatesRequest{ ApiService: a, ctx: ctx, monitorIdOrUrn: monitorIdOrUrn, @@ -1576,28 +1827,36 @@ func (a *MonitorApiService) PublishHealthStates(ctx context.Context, monitorIdOr } // Execute executes the request -func (a *MonitorApiService) PublishHealthStatesExecute(r ApiPublishHealthStatesRequest) (*http.Response, error) { +// @return MonitorCheckStates +func (a *MonitorApiService) PreviewMonitorCheckStatesExecute(r ApiPreviewMonitorCheckStatesRequest) (*MonitorCheckStates, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MonitorCheckStates ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MonitorApiService.PublishHealthStates") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MonitorApiService.PreviewMonitorCheckStates") if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/monitors/{monitorIdOrUrn}/publish" + localVarPath := localBasePath + "/monitors/{monitorIdOrUrn}/preview/checkStates" localVarPath = strings.Replace(localVarPath, "{"+"monitorIdOrUrn"+"}", url.PathEscape(parameterToString(r.monitorIdOrUrn, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.monitorSnapshot == nil { - return nil, reportError("monitorSnapshot is required and must be specified") + if r.monitorPreview == nil { + return localVarReturnValue, nil, reportError("monitorPreview is required and must be specified") } + if r.healthState != nil { + localVarQueryParams.Add("healthState", parameterToString(*r.healthState, "")) + } + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -1616,7 +1875,7 @@ func (a *MonitorApiService) PublishHealthStatesExecute(r ApiPublishHealthStatesR localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.monitorSnapshot + localVarPostBody = r.monitorPreview if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -1661,19 +1920,19 @@ func (a *MonitorApiService) PublishHealthStatesExecute(r ApiPublishHealthStatesR } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { - return nil, err + return localVarReturnValue, nil, err } localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { @@ -1686,31 +1945,215 @@ func (a *MonitorApiService) PublishHealthStatesExecute(r ApiPublishHealthStatesR err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 404 { var v MonitorNotFoundError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 500 { var v MonitorApiError err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v } - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPublishHealthStatesRequest struct { + ctx context.Context + ApiService MonitorApi + monitorIdOrUrn string + monitorSnapshot *MonitorSnapshot +} + +// Monitor snapshot of health states +func (r ApiPublishHealthStatesRequest) MonitorSnapshot(monitorSnapshot MonitorSnapshot) ApiPublishHealthStatesRequest { + r.monitorSnapshot = &monitorSnapshot + return r +} + +func (r ApiPublishHealthStatesRequest) Execute() (*http.Response, error) { + return r.ApiService.PublishHealthStatesExecute(r) +} + +/* +PublishHealthStates Post monitor health states + +Publish health states for monitor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param monitorIdOrUrn The id or identifier (urn) of a monitor + @return ApiPublishHealthStatesRequest +*/ +func (a *MonitorApiService) PublishHealthStates(ctx context.Context, monitorIdOrUrn string) ApiPublishHealthStatesRequest { + return ApiPublishHealthStatesRequest{ + ApiService: a, + ctx: ctx, + monitorIdOrUrn: monitorIdOrUrn, + } +} + +// Execute executes the request +func (a *MonitorApiService) PublishHealthStatesExecute(r ApiPublishHealthStatesRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MonitorApiService.PublishHealthStates") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/monitors/{monitorIdOrUrn}/publish" + localVarPath = strings.Replace(localVarPath, "{"+"monitorIdOrUrn"+"}", url.PathEscape(parameterToString(r.monitorIdOrUrn, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.monitorSnapshot == nil { + return nil, reportError("monitorSnapshot 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.monitorSnapshot + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiToken"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-Token"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ServiceBearer"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-ServiceBearer"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ServiceToken"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v InvalidMonitorIdentifierError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v MonitorNotFoundError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v MonitorApiError + 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 @@ -2086,59 +2529,276 @@ func (a *MonitorApiService) TestMonitorFunctionExecute(r ApiTestMonitorFunctionR return localVarReturnValue, localVarHTTPResponse, nil } +type ApiTestMonitorFunctionCheckStatesRequest struct { + ctx context.Context + ApiService MonitorApi + monitorFunctionIdOrUrn string + monitorFunctionTest *MonitorFunctionTest + healthState *HealthStateValue + limit *int32 +} + +// Monitor function arguments to test +func (r ApiTestMonitorFunctionCheckStatesRequest) MonitorFunctionTest(monitorFunctionTest MonitorFunctionTest) ApiTestMonitorFunctionCheckStatesRequest { + r.monitorFunctionTest = &monitorFunctionTest + return r +} + +// Health state of check states +func (r ApiTestMonitorFunctionCheckStatesRequest) HealthState(healthState HealthStateValue) ApiTestMonitorFunctionCheckStatesRequest { + r.healthState = &healthState + return r +} + +func (r ApiTestMonitorFunctionCheckStatesRequest) Limit(limit int32) ApiTestMonitorFunctionCheckStatesRequest { + r.limit = &limit + return r +} + +func (r ApiTestMonitorFunctionCheckStatesRequest) Execute() (*MonitorCheckStates, *http.Response, error) { + return r.ApiService.TestMonitorFunctionCheckStatesExecute(r) +} + +/* +TestMonitorFunctionCheckStates Test a monitor + +Performs a run of a monitor function to test arguments and returns the health states produced + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param monitorFunctionIdOrUrn The id or identifier (urn) of a monitor function + @return ApiTestMonitorFunctionCheckStatesRequest +*/ +func (a *MonitorApiService) TestMonitorFunctionCheckStates(ctx context.Context, monitorFunctionIdOrUrn string) ApiTestMonitorFunctionCheckStatesRequest { + return ApiTestMonitorFunctionCheckStatesRequest{ + ApiService: a, + ctx: ctx, + monitorFunctionIdOrUrn: monitorFunctionIdOrUrn, + } +} + +// Execute executes the request +// @return MonitorCheckStates +func (a *MonitorApiService) TestMonitorFunctionCheckStatesExecute(r ApiTestMonitorFunctionCheckStatesRequest) (*MonitorCheckStates, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *MonitorCheckStates + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MonitorApiService.TestMonitorFunctionCheckStates") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/monitors/{monitorFunctionIdOrUrn}/test/checkStates" + localVarPath = strings.Replace(localVarPath, "{"+"monitorFunctionIdOrUrn"+"}", url.PathEscape(parameterToString(r.monitorFunctionIdOrUrn, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.monitorFunctionTest == nil { + return localVarReturnValue, nil, reportError("monitorFunctionTest is required and must be specified") + } + + if r.healthState != nil { + localVarQueryParams.Add("healthState", parameterToString(*r.healthState, "")) + } + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + // 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.monitorFunctionTest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ApiToken"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-Token"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ServiceBearer"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-ServiceBearer"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["ServiceToken"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-API-Key"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v InvalidMonitorIdentifierError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v MonitorFunctionNotFoundError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v MonitorApiError + 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 MonitorApiMock struct { - DeleteMonitorCalls *[]DeleteMonitorCall - DeleteMonitorResponse DeleteMonitorMockResponse - GetAllMonitorsCalls *[]GetAllMonitorsCall - GetAllMonitorsResponse GetAllMonitorsMockResponse - GetMonitorCalls *[]GetMonitorCall - GetMonitorResponse GetMonitorMockResponse - GetMonitorWithStatusCalls *[]GetMonitorWithStatusCall - GetMonitorWithStatusResponse GetMonitorWithStatusMockResponse - GetMonitorsOverviewCalls *[]GetMonitorsOverviewCall - GetMonitorsOverviewResponse GetMonitorsOverviewMockResponse - LookupIdentifierCalls *[]LookupIdentifierCall - LookupIdentifierResponse LookupIdentifierMockResponse - PatchMonitorCalls *[]PatchMonitorCall - PatchMonitorResponse PatchMonitorMockResponse - PreviewMonitorCalls *[]PreviewMonitorCall - PreviewMonitorResponse PreviewMonitorMockResponse - PublishHealthStatesCalls *[]PublishHealthStatesCall - PublishHealthStatesResponse PublishHealthStatesMockResponse - RunMonitorCalls *[]RunMonitorCall - RunMonitorResponse RunMonitorMockResponse - TestMonitorFunctionCalls *[]TestMonitorFunctionCall - TestMonitorFunctionResponse TestMonitorFunctionMockResponse + DeleteMonitorCalls *[]DeleteMonitorCall + DeleteMonitorResponse DeleteMonitorMockResponse + GetAllMonitorsCalls *[]GetAllMonitorsCall + GetAllMonitorsResponse GetAllMonitorsMockResponse + GetMonitorCalls *[]GetMonitorCall + GetMonitorResponse GetMonitorMockResponse + GetMonitorCheckStatesCalls *[]GetMonitorCheckStatesCall + GetMonitorCheckStatesResponse GetMonitorCheckStatesMockResponse + GetMonitorWithStatusCalls *[]GetMonitorWithStatusCall + GetMonitorWithStatusResponse GetMonitorWithStatusMockResponse + GetMonitorsOverviewCalls *[]GetMonitorsOverviewCall + GetMonitorsOverviewResponse GetMonitorsOverviewMockResponse + LookupIdentifierCalls *[]LookupIdentifierCall + LookupIdentifierResponse LookupIdentifierMockResponse + PatchMonitorCalls *[]PatchMonitorCall + PatchMonitorResponse PatchMonitorMockResponse + PreviewMonitorCalls *[]PreviewMonitorCall + PreviewMonitorResponse PreviewMonitorMockResponse + PreviewMonitorCheckStatesCalls *[]PreviewMonitorCheckStatesCall + PreviewMonitorCheckStatesResponse PreviewMonitorCheckStatesMockResponse + PublishHealthStatesCalls *[]PublishHealthStatesCall + PublishHealthStatesResponse PublishHealthStatesMockResponse + RunMonitorCalls *[]RunMonitorCall + RunMonitorResponse RunMonitorMockResponse + TestMonitorFunctionCalls *[]TestMonitorFunctionCall + TestMonitorFunctionResponse TestMonitorFunctionMockResponse + TestMonitorFunctionCheckStatesCalls *[]TestMonitorFunctionCheckStatesCall + TestMonitorFunctionCheckStatesResponse TestMonitorFunctionCheckStatesMockResponse } func NewMonitorApiMock() MonitorApiMock { xDeleteMonitorCalls := make([]DeleteMonitorCall, 0) xGetAllMonitorsCalls := make([]GetAllMonitorsCall, 0) xGetMonitorCalls := make([]GetMonitorCall, 0) + xGetMonitorCheckStatesCalls := make([]GetMonitorCheckStatesCall, 0) xGetMonitorWithStatusCalls := make([]GetMonitorWithStatusCall, 0) xGetMonitorsOverviewCalls := make([]GetMonitorsOverviewCall, 0) xLookupIdentifierCalls := make([]LookupIdentifierCall, 0) xPatchMonitorCalls := make([]PatchMonitorCall, 0) xPreviewMonitorCalls := make([]PreviewMonitorCall, 0) + xPreviewMonitorCheckStatesCalls := make([]PreviewMonitorCheckStatesCall, 0) xPublishHealthStatesCalls := make([]PublishHealthStatesCall, 0) xRunMonitorCalls := make([]RunMonitorCall, 0) xTestMonitorFunctionCalls := make([]TestMonitorFunctionCall, 0) + xTestMonitorFunctionCheckStatesCalls := make([]TestMonitorFunctionCheckStatesCall, 0) return MonitorApiMock{ - DeleteMonitorCalls: &xDeleteMonitorCalls, - GetAllMonitorsCalls: &xGetAllMonitorsCalls, - GetMonitorCalls: &xGetMonitorCalls, - GetMonitorWithStatusCalls: &xGetMonitorWithStatusCalls, - GetMonitorsOverviewCalls: &xGetMonitorsOverviewCalls, - LookupIdentifierCalls: &xLookupIdentifierCalls, - PatchMonitorCalls: &xPatchMonitorCalls, - PreviewMonitorCalls: &xPreviewMonitorCalls, - PublishHealthStatesCalls: &xPublishHealthStatesCalls, - RunMonitorCalls: &xRunMonitorCalls, - TestMonitorFunctionCalls: &xTestMonitorFunctionCalls, + DeleteMonitorCalls: &xDeleteMonitorCalls, + GetAllMonitorsCalls: &xGetAllMonitorsCalls, + GetMonitorCalls: &xGetMonitorCalls, + GetMonitorCheckStatesCalls: &xGetMonitorCheckStatesCalls, + GetMonitorWithStatusCalls: &xGetMonitorWithStatusCalls, + GetMonitorsOverviewCalls: &xGetMonitorsOverviewCalls, + LookupIdentifierCalls: &xLookupIdentifierCalls, + PatchMonitorCalls: &xPatchMonitorCalls, + PreviewMonitorCalls: &xPreviewMonitorCalls, + PreviewMonitorCheckStatesCalls: &xPreviewMonitorCheckStatesCalls, + PublishHealthStatesCalls: &xPublishHealthStatesCalls, + RunMonitorCalls: &xRunMonitorCalls, + TestMonitorFunctionCalls: &xTestMonitorFunctionCalls, + TestMonitorFunctionCheckStatesCalls: &xTestMonitorFunctionCheckStatesCalls, } } @@ -2215,6 +2875,36 @@ func (mock MonitorApiMock) GetMonitorExecute(r ApiGetMonitorRequest) (*Monitor, return &mock.GetMonitorResponse.Result, mock.GetMonitorResponse.Response, mock.GetMonitorResponse.Error } +type GetMonitorCheckStatesMockResponse struct { + Result MonitorCheckStates + Response *http.Response + Error error +} + +type GetMonitorCheckStatesCall struct { + PmonitorIdOrUrn string + PhealthState *HealthStateValue + Plimit *int32 +} + +func (mock MonitorApiMock) GetMonitorCheckStates(ctx context.Context, monitorIdOrUrn string) ApiGetMonitorCheckStatesRequest { + return ApiGetMonitorCheckStatesRequest{ + ApiService: mock, + ctx: ctx, + monitorIdOrUrn: monitorIdOrUrn, + } +} + +func (mock MonitorApiMock) GetMonitorCheckStatesExecute(r ApiGetMonitorCheckStatesRequest) (*MonitorCheckStates, *http.Response, error) { + p := GetMonitorCheckStatesCall{ + PmonitorIdOrUrn: r.monitorIdOrUrn, + PhealthState: r.healthState, + Plimit: r.limit, + } + *mock.GetMonitorCheckStatesCalls = append(*mock.GetMonitorCheckStatesCalls, p) + return &mock.GetMonitorCheckStatesResponse.Result, mock.GetMonitorCheckStatesResponse.Response, mock.GetMonitorCheckStatesResponse.Error +} + type GetMonitorWithStatusMockResponse struct { Result MonitorStatus Response *http.Response @@ -2344,6 +3034,38 @@ func (mock MonitorApiMock) PreviewMonitorExecute(r ApiPreviewMonitorRequest) (*M return &mock.PreviewMonitorResponse.Result, mock.PreviewMonitorResponse.Response, mock.PreviewMonitorResponse.Error } +type PreviewMonitorCheckStatesMockResponse struct { + Result MonitorCheckStates + Response *http.Response + Error error +} + +type PreviewMonitorCheckStatesCall struct { + PmonitorIdOrUrn string + PmonitorPreview *MonitorPreview + PhealthState *HealthStateValue + Plimit *int32 +} + +func (mock MonitorApiMock) PreviewMonitorCheckStates(ctx context.Context, monitorIdOrUrn string) ApiPreviewMonitorCheckStatesRequest { + return ApiPreviewMonitorCheckStatesRequest{ + ApiService: mock, + ctx: ctx, + monitorIdOrUrn: monitorIdOrUrn, + } +} + +func (mock MonitorApiMock) PreviewMonitorCheckStatesExecute(r ApiPreviewMonitorCheckStatesRequest) (*MonitorCheckStates, *http.Response, error) { + p := PreviewMonitorCheckStatesCall{ + PmonitorIdOrUrn: r.monitorIdOrUrn, + PmonitorPreview: r.monitorPreview, + PhealthState: r.healthState, + Plimit: r.limit, + } + *mock.PreviewMonitorCheckStatesCalls = append(*mock.PreviewMonitorCheckStatesCalls, p) + return &mock.PreviewMonitorCheckStatesResponse.Result, mock.PreviewMonitorCheckStatesResponse.Response, mock.PreviewMonitorCheckStatesResponse.Error +} + type PublishHealthStatesMockResponse struct { Response *http.Response Error error @@ -2426,3 +3148,35 @@ func (mock MonitorApiMock) TestMonitorFunctionExecute(r ApiTestMonitorFunctionRe *mock.TestMonitorFunctionCalls = append(*mock.TestMonitorFunctionCalls, p) return &mock.TestMonitorFunctionResponse.Result, mock.TestMonitorFunctionResponse.Response, mock.TestMonitorFunctionResponse.Error } + +type TestMonitorFunctionCheckStatesMockResponse struct { + Result MonitorCheckStates + Response *http.Response + Error error +} + +type TestMonitorFunctionCheckStatesCall struct { + PmonitorFunctionIdOrUrn string + PmonitorFunctionTest *MonitorFunctionTest + PhealthState *HealthStateValue + Plimit *int32 +} + +func (mock MonitorApiMock) TestMonitorFunctionCheckStates(ctx context.Context, monitorFunctionIdOrUrn string) ApiTestMonitorFunctionCheckStatesRequest { + return ApiTestMonitorFunctionCheckStatesRequest{ + ApiService: mock, + ctx: ctx, + monitorFunctionIdOrUrn: monitorFunctionIdOrUrn, + } +} + +func (mock MonitorApiMock) TestMonitorFunctionCheckStatesExecute(r ApiTestMonitorFunctionCheckStatesRequest) (*MonitorCheckStates, *http.Response, error) { + p := TestMonitorFunctionCheckStatesCall{ + PmonitorFunctionIdOrUrn: r.monitorFunctionIdOrUrn, + PmonitorFunctionTest: r.monitorFunctionTest, + PhealthState: r.healthState, + Plimit: r.limit, + } + *mock.TestMonitorFunctionCheckStatesCalls = append(*mock.TestMonitorFunctionCheckStatesCalls, p) + return &mock.TestMonitorFunctionCheckStatesResponse.Result, mock.TestMonitorFunctionCheckStatesResponse.Response, mock.TestMonitorFunctionCheckStatesResponse.Error +} diff --git a/generated/stackstate_api/api_monitor_check_status.go b/generated/stackstate_api/api_monitor_check_status.go index ad887eca..510be71c 100644 --- a/generated/stackstate_api/api_monitor_check_status.go +++ b/generated/stackstate_api/api_monitor_check_status.go @@ -38,7 +38,7 @@ type MonitorCheckStatusApi interface { GetMonitorCheckStatusExecute(r ApiGetMonitorCheckStatusRequest) (*MonitorCheckStatus, *http.Response, error) /* - GetMonitorCheckStatusHealthHistory Get a monitor check health hisotry + GetMonitorCheckStatusHealthHistory Get a monitor check health history Get a monitor check status health history for a defined period of time by the check state id @@ -287,7 +287,7 @@ func (r ApiGetMonitorCheckStatusHealthHistoryRequest) Execute() (*MonitorCheckSt } /* -GetMonitorCheckStatusHealthHistory Get a monitor check health hisotry +GetMonitorCheckStatusHealthHistory Get a monitor check health history Get a monitor check status health history for a defined period of time by the check state id diff --git a/generated/stackstate_api/api_topic.go b/generated/stackstate_api/api_topic.go index f2424d70..e7090aa9 100644 --- a/generated/stackstate_api/api_topic.go +++ b/generated/stackstate_api/api_topic.go @@ -60,7 +60,7 @@ type ApiDescribeRequest struct { ApiService TopicApi topic string limit *int32 - offset *int32 + offset *int64 partition *int32 } @@ -69,7 +69,7 @@ func (r ApiDescribeRequest) Limit(limit int32) ApiDescribeRequest { return r } -func (r ApiDescribeRequest) Offset(offset int32) ApiDescribeRequest { +func (r ApiDescribeRequest) Offset(offset int64) ApiDescribeRequest { r.offset = &offset return r } @@ -435,7 +435,7 @@ type DescribeMockResponse struct { type DescribeCall struct { Ptopic string Plimit *int32 - Poffset *int32 + Poffset *int64 Ppartition *int32 } diff --git a/generated/stackstate_api/client.go b/generated/stackstate_api/client.go index 1bba35b2..d3288c02 100644 --- a/generated/stackstate_api/client.go +++ b/generated/stackstate_api/client.go @@ -52,6 +52,10 @@ type APIClient struct { ApiTokenApi ApiTokenApi + AuthorizeIngestionApiKeyApi AuthorizeIngestionApiKeyApi + + ComponentApi ComponentApi + DummyApi DummyApi EventApi EventApi @@ -66,6 +70,8 @@ type APIClient struct { KubernetesLogsApi KubernetesLogsApi + LayoutApi LayoutApi + MetricApi MetricApi MonitorApi MonitorApi @@ -122,6 +128,8 @@ func NewAPIClient(cfg *Configuration) *APIClient { // API Services c.ApiTokenApi = (*ApiTokenApiService)(&c.common) + c.AuthorizeIngestionApiKeyApi = (*AuthorizeIngestionApiKeyApiService)(&c.common) + c.ComponentApi = (*ComponentApiService)(&c.common) c.DummyApi = (*DummyApiService)(&c.common) c.EventApi = (*EventApiService)(&c.common) c.ExportApi = (*ExportApiService)(&c.common) @@ -129,6 +137,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.ImportApi = (*ImportApiService)(&c.common) c.IngestionApiKeyApi = (*IngestionApiKeyApiService)(&c.common) c.KubernetesLogsApi = (*KubernetesLogsApiService)(&c.common) + c.LayoutApi = (*LayoutApiService)(&c.common) c.MetricApi = (*MetricApiService)(&c.common) c.MonitorApi = (*MonitorApiService)(&c.common) c.MonitorCheckStatusApi = (*MonitorCheckStatusApiService)(&c.common) diff --git a/generated/stackstate_api/docs/AuthorizeIngestionApiKeyApi.md b/generated/stackstate_api/docs/AuthorizeIngestionApiKeyApi.md new file mode 100644 index 00000000..a69fe5df --- /dev/null +++ b/generated/stackstate_api/docs/AuthorizeIngestionApiKeyApi.md @@ -0,0 +1,75 @@ +# \AuthorizeIngestionApiKeyApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AuthorizeIngestionApiKey**](AuthorizeIngestionApiKeyApi.md#AuthorizeIngestionApiKey) | **Post** /security/ingestion/authorize | Check authorization for an Ingestion Api Key + + + +## AuthorizeIngestionApiKey + +> AuthorizeIngestionApiKey(ctx).AuthorizeIngestionApiKeyRequest(authorizeIngestionApiKeyRequest).WithReceiverKey(withReceiverKey).Execute() + +Check authorization for an Ingestion Api Key + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + authorizeIngestionApiKeyRequest := *openapiclient.NewAuthorizeIngestionApiKeyRequest("ApiKey_example") // AuthorizeIngestionApiKeyRequest | + withReceiverKey := true // bool | By default, the endpoint uses only Ingestion API Keys, true value - to verify also Receiver API Key (optional) (default to false) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthorizeIngestionApiKeyApi.AuthorizeIngestionApiKey(context.Background()).AuthorizeIngestionApiKeyRequest(authorizeIngestionApiKeyRequest).WithReceiverKey(withReceiverKey).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthorizeIngestionApiKeyApi.AuthorizeIngestionApiKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiAuthorizeIngestionApiKeyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authorizeIngestionApiKeyRequest** | [**AuthorizeIngestionApiKeyRequest**](AuthorizeIngestionApiKeyRequest.md) | | + **withReceiverKey** | **bool** | By default, the endpoint uses only Ingestion API Keys, true value - to verify also Receiver API Key | [default to false] + +### Return type + + (empty response body) + +### Authorization + +[ApiToken](../README.md#ApiToken), [ServiceBearer](../README.md#ServiceBearer), [ServiceToken](../README.md#ServiceToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/generated/stackstate_api/docs/BaseLayoutHint.md b/generated/stackstate_api/docs/BaseLayoutHint.md new file mode 100644 index 00000000..eb055263 --- /dev/null +++ b/generated/stackstate_api/docs/BaseLayoutHint.md @@ -0,0 +1,72 @@ +# BaseLayoutHint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Weight** | **float32** | | + +## Methods + +### NewBaseLayoutHint + +`func NewBaseLayoutHint(name string, weight float32, ) *BaseLayoutHint` + +NewBaseLayoutHint instantiates a new BaseLayoutHint 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 + +### NewBaseLayoutHintWithDefaults + +`func NewBaseLayoutHintWithDefaults() *BaseLayoutHint` + +NewBaseLayoutHintWithDefaults instantiates a new BaseLayoutHint object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *BaseLayoutHint) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *BaseLayoutHint) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *BaseLayoutHint) SetName(v string)` + +SetName sets Name field to given value. + + +### GetWeight + +`func (o *BaseLayoutHint) GetWeight() float32` + +GetWeight returns the Weight field if non-nil, zero value otherwise. + +### GetWeightOk + +`func (o *BaseLayoutHint) GetWeightOk() (*float32, bool)` + +GetWeightOk returns a tuple with the Weight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWeight + +`func (o *BaseLayoutHint) SetWeight(v float32)` + +SetWeight sets Weight 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/ComponentApi.md b/generated/stackstate_api/docs/ComponentApi.md new file mode 100644 index 00000000..2f6bfccc --- /dev/null +++ b/generated/stackstate_api/docs/ComponentApi.md @@ -0,0 +1,85 @@ +# \ComponentApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetComponentHealthHistory**](ComponentApi.md#GetComponentHealthHistory) | **Get** /components/{componentIdOrUrn}/healthHistory | Get a component health history + + + +## GetComponentHealthHistory + +> ComponentHealthHistory GetComponentHealthHistory(ctx, componentIdOrUrn).StartTime(startTime).EndTime(endTime).TopologyTime(topologyTime).Execute() + +Get a component health history + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + componentIdOrUrn := "componentIdOrUrn_example" // string | The id or identifier (urn) of a component + startTime := int32(56) // int32 | The start time of a time range to query resources. + endTime := int32(56) // int32 | The end time of a time range to query resources. If not given the endTime is set to current time. (optional) + topologyTime := int32(56) // int32 | A timestamp at which resources will be queried. If not given the resources are queried at current time. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ComponentApi.GetComponentHealthHistory(context.Background(), componentIdOrUrn).StartTime(startTime).EndTime(endTime).TopologyTime(topologyTime).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ComponentApi.GetComponentHealthHistory``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetComponentHealthHistory`: ComponentHealthHistory + fmt.Fprintf(os.Stdout, "Response from `ComponentApi.GetComponentHealthHistory`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**componentIdOrUrn** | **string** | The id or identifier (urn) of a component | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetComponentHealthHistoryRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **startTime** | **int32** | The start time of a time range to query resources. | + **endTime** | **int32** | The end time of a time range to query resources. If not given the endTime is set to current time. | + **topologyTime** | **int32** | A timestamp at which resources will be queried. If not given the resources are queried at current time. | + +### Return type + +[**ComponentHealthHistory**](ComponentHealthHistory.md) + +### Authorization + +[ApiToken](../README.md#ApiToken), [ServiceBearer](../README.md#ServiceBearer), [ServiceToken](../README.md#ServiceToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/generated/stackstate_api/docs/ComponentHealthChange.md b/generated/stackstate_api/docs/ComponentHealthChange.md new file mode 100644 index 00000000..1802e647 --- /dev/null +++ b/generated/stackstate_api/docs/ComponentHealthChange.md @@ -0,0 +1,72 @@ +# ComponentHealthChange + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Timestamp** | **int64** | | +**NewHealth** | [**HealthStateValue**](HealthStateValue.md) | | + +## Methods + +### NewComponentHealthChange + +`func NewComponentHealthChange(timestamp int64, newHealth HealthStateValue, ) *ComponentHealthChange` + +NewComponentHealthChange instantiates a new ComponentHealthChange 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 + +### NewComponentHealthChangeWithDefaults + +`func NewComponentHealthChangeWithDefaults() *ComponentHealthChange` + +NewComponentHealthChangeWithDefaults instantiates a new ComponentHealthChange 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 + +### GetTimestamp + +`func (o *ComponentHealthChange) GetTimestamp() int64` + +GetTimestamp returns the Timestamp field if non-nil, zero value otherwise. + +### GetTimestampOk + +`func (o *ComponentHealthChange) 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 *ComponentHealthChange) SetTimestamp(v int64)` + +SetTimestamp sets Timestamp field to given value. + + +### GetNewHealth + +`func (o *ComponentHealthChange) GetNewHealth() HealthStateValue` + +GetNewHealth returns the NewHealth field if non-nil, zero value otherwise. + +### GetNewHealthOk + +`func (o *ComponentHealthChange) 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 *ComponentHealthChange) 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/ComponentHealthHistory.md b/generated/stackstate_api/docs/ComponentHealthHistory.md new file mode 100644 index 00000000..97ce9d6b --- /dev/null +++ b/generated/stackstate_api/docs/ComponentHealthHistory.md @@ -0,0 +1,114 @@ +# ComponentHealthHistory + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**StartTime** | **int32** | | +**EndTime** | **int32** | | +**HealthStateChanges** | [**[]ComponentHealthChange**](ComponentHealthChange.md) | List of health state changes ordered from most recent to oldest. | + +## Methods + +### NewComponentHealthHistory + +`func NewComponentHealthHistory(id int64, startTime int32, endTime int32, healthStateChanges []ComponentHealthChange, ) *ComponentHealthHistory` + +NewComponentHealthHistory instantiates a new ComponentHealthHistory 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 + +### NewComponentHealthHistoryWithDefaults + +`func NewComponentHealthHistoryWithDefaults() *ComponentHealthHistory` + +NewComponentHealthHistoryWithDefaults instantiates a new ComponentHealthHistory object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ComponentHealthHistory) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ComponentHealthHistory) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ComponentHealthHistory) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetStartTime + +`func (o *ComponentHealthHistory) GetStartTime() int32` + +GetStartTime returns the StartTime field if non-nil, zero value otherwise. + +### GetStartTimeOk + +`func (o *ComponentHealthHistory) 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 *ComponentHealthHistory) SetStartTime(v int32)` + +SetStartTime sets StartTime field to given value. + + +### GetEndTime + +`func (o *ComponentHealthHistory) GetEndTime() int32` + +GetEndTime returns the EndTime field if non-nil, zero value otherwise. + +### GetEndTimeOk + +`func (o *ComponentHealthHistory) 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 *ComponentHealthHistory) SetEndTime(v int32)` + +SetEndTime sets EndTime field to given value. + + +### GetHealthStateChanges + +`func (o *ComponentHealthHistory) GetHealthStateChanges() []ComponentHealthChange` + +GetHealthStateChanges returns the HealthStateChanges field if non-nil, zero value otherwise. + +### GetHealthStateChangesOk + +`func (o *ComponentHealthHistory) GetHealthStateChangesOk() (*[]ComponentHealthChange, bool)` + +GetHealthStateChangesOk returns a tuple with the HealthStateChanges field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHealthStateChanges + +`func (o *ComponentHealthHistory) SetHealthStateChanges(v []ComponentHealthChange)` + +SetHealthStateChanges sets HealthStateChanges 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/ComponentHighlightMetricSection.md b/generated/stackstate_api/docs/ComponentHighlightMetricSection.md new file mode 100644 index 00000000..b2550fa6 --- /dev/null +++ b/generated/stackstate_api/docs/ComponentHighlightMetricSection.md @@ -0,0 +1,93 @@ +# ComponentHighlightMetricSection + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Weight** | **float32** | | +**Type** | **string** | | + +## Methods + +### NewComponentHighlightMetricSection + +`func NewComponentHighlightMetricSection(name string, weight float32, type_ string, ) *ComponentHighlightMetricSection` + +NewComponentHighlightMetricSection instantiates a new ComponentHighlightMetricSection 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 + +### NewComponentHighlightMetricSectionWithDefaults + +`func NewComponentHighlightMetricSectionWithDefaults() *ComponentHighlightMetricSection` + +NewComponentHighlightMetricSectionWithDefaults instantiates a new ComponentHighlightMetricSection object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ComponentHighlightMetricSection) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ComponentHighlightMetricSection) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ComponentHighlightMetricSection) SetName(v string)` + +SetName sets Name field to given value. + + +### GetWeight + +`func (o *ComponentHighlightMetricSection) GetWeight() float32` + +GetWeight returns the Weight field if non-nil, zero value otherwise. + +### GetWeightOk + +`func (o *ComponentHighlightMetricSection) GetWeightOk() (*float32, bool)` + +GetWeightOk returns a tuple with the Weight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWeight + +`func (o *ComponentHighlightMetricSection) SetWeight(v float32)` + +SetWeight sets Weight field to given value. + + +### GetType + +`func (o *ComponentHighlightMetricSection) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ComponentHighlightMetricSection) 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 *ComponentHighlightMetricSection) SetType(v string)` + +SetType sets Type 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/ComponentHighlightMetricSectionAllOf.md b/generated/stackstate_api/docs/ComponentHighlightMetricSectionAllOf.md new file mode 100644 index 00000000..5ba0aea8 --- /dev/null +++ b/generated/stackstate_api/docs/ComponentHighlightMetricSectionAllOf.md @@ -0,0 +1,51 @@ +# ComponentHighlightMetricSectionAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | + +## Methods + +### NewComponentHighlightMetricSectionAllOf + +`func NewComponentHighlightMetricSectionAllOf(type_ string, ) *ComponentHighlightMetricSectionAllOf` + +NewComponentHighlightMetricSectionAllOf instantiates a new ComponentHighlightMetricSectionAllOf 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 + +### NewComponentHighlightMetricSectionAllOfWithDefaults + +`func NewComponentHighlightMetricSectionAllOfWithDefaults() *ComponentHighlightMetricSectionAllOf` + +NewComponentHighlightMetricSectionAllOfWithDefaults instantiates a new ComponentHighlightMetricSectionAllOf 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 *ComponentHighlightMetricSectionAllOf) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ComponentHighlightMetricSectionAllOf) 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 *ComponentHighlightMetricSectionAllOf) SetType(v string)` + +SetType sets Type 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/ComponentNotFoundError.md b/generated/stackstate_api/docs/ComponentNotFoundError.md new file mode 100644 index 00000000..4cf0943c --- /dev/null +++ b/generated/stackstate_api/docs/ComponentNotFoundError.md @@ -0,0 +1,72 @@ +# ComponentNotFoundError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**ComponentId** | **int64** | | + +## Methods + +### NewComponentNotFoundError + +`func NewComponentNotFoundError(type_ string, componentId int64, ) *ComponentNotFoundError` + +NewComponentNotFoundError instantiates a new ComponentNotFoundError 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 + +### NewComponentNotFoundErrorWithDefaults + +`func NewComponentNotFoundErrorWithDefaults() *ComponentNotFoundError` + +NewComponentNotFoundErrorWithDefaults instantiates a new ComponentNotFoundError 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 *ComponentNotFoundError) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ComponentNotFoundError) 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 *ComponentNotFoundError) SetType(v string)` + +SetType sets Type field to given value. + + +### GetComponentId + +`func (o *ComponentNotFoundError) GetComponentId() int64` + +GetComponentId returns the ComponentId field if non-nil, zero value otherwise. + +### GetComponentIdOk + +`func (o *ComponentNotFoundError) GetComponentIdOk() (*int64, bool)` + +GetComponentIdOk returns a tuple with the ComponentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComponentId + +`func (o *ComponentNotFoundError) SetComponentId(v int64)` + +SetComponentId sets ComponentId field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/stackstate_api/docs/IngestionApiKeyApi.md b/generated/stackstate_api/docs/IngestionApiKeyApi.md index de5743ab..9a5ccb89 100644 --- a/generated/stackstate_api/docs/IngestionApiKeyApi.md +++ b/generated/stackstate_api/docs/IngestionApiKeyApi.md @@ -4,77 +4,12 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AuthorizeIngestionApiKey**](IngestionApiKeyApi.md#AuthorizeIngestionApiKey) | **Post** /security/ingestion/authorize | Check authorization for an Ingestion Api Key [**DeleteIngestionApiKey**](IngestionApiKeyApi.md#DeleteIngestionApiKey) | **Delete** /security/ingestion/api_keys/{ingestionApiKeyId} | Delete Ingestion Api Key [**GenerateIngestionApiKey**](IngestionApiKeyApi.md#GenerateIngestionApiKey) | **Post** /security/ingestion/api_keys | Generate a new Ingestion Api Key [**GetIngestionApiKeys**](IngestionApiKeyApi.md#GetIngestionApiKeys) | **Get** /security/ingestion/api_keys | List Ingestion Api Keys -## AuthorizeIngestionApiKey - -> AuthorizeIngestionApiKey(ctx).AuthorizeIngestionApiKeyRequest(authorizeIngestionApiKeyRequest).Execute() - -Check authorization for an Ingestion Api Key - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "./openapi" -) - -func main() { - authorizeIngestionApiKeyRequest := *openapiclient.NewAuthorizeIngestionApiKeyRequest("ApiKey_example") // AuthorizeIngestionApiKeyRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.IngestionApiKeyApi.AuthorizeIngestionApiKey(context.Background()).AuthorizeIngestionApiKeyRequest(authorizeIngestionApiKeyRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `IngestionApiKeyApi.AuthorizeIngestionApiKey``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiAuthorizeIngestionApiKeyRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorizeIngestionApiKeyRequest** | [**AuthorizeIngestionApiKeyRequest**](AuthorizeIngestionApiKeyRequest.md) | | - -### Return type - - (empty response body) - -### Authorization - -[ApiToken](../README.md#ApiToken), [ServiceBearer](../README.md#ServiceBearer), [ServiceToken](../README.md#ServiceToken) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - ## DeleteIngestionApiKey > DeleteIngestionApiKey(ctx, ingestionApiKeyId).Execute() diff --git a/generated/stackstate_api/docs/LayoutApi.md b/generated/stackstate_api/docs/LayoutApi.md new file mode 100644 index 00000000..f350c04c --- /dev/null +++ b/generated/stackstate_api/docs/LayoutApi.md @@ -0,0 +1,70 @@ +# \LayoutApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetAllLayouts**](LayoutApi.md#GetAllLayouts) | **Get** /layouts | List layout hints + + + +## GetAllLayouts + +> LayoutList GetAllLayouts(ctx).Execute() + +List layout hints + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.LayoutApi.GetAllLayouts(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `LayoutApi.GetAllLayouts``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetAllLayouts`: LayoutList + fmt.Fprintf(os.Stdout, "Response from `LayoutApi.GetAllLayouts`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAllLayoutsRequest struct via the builder pattern + + +### Return type + +[**LayoutList**](LayoutList.md) + +### Authorization + +[ApiToken](../README.md#ApiToken), [ServiceBearer](../README.md#ServiceBearer), [ServiceToken](../README.md#ServiceToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/generated/stackstate_api/docs/LayoutApiError.md b/generated/stackstate_api/docs/LayoutApiError.md new file mode 100644 index 00000000..c6542169 --- /dev/null +++ b/generated/stackstate_api/docs/LayoutApiError.md @@ -0,0 +1,72 @@ +# LayoutApiError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StatusCode** | **string** | | +**Message** | **string** | | + +## Methods + +### NewLayoutApiError + +`func NewLayoutApiError(statusCode string, message string, ) *LayoutApiError` + +NewLayoutApiError instantiates a new LayoutApiError 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 + +### NewLayoutApiErrorWithDefaults + +`func NewLayoutApiErrorWithDefaults() *LayoutApiError` + +NewLayoutApiErrorWithDefaults instantiates a new LayoutApiError 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 + +### GetStatusCode + +`func (o *LayoutApiError) GetStatusCode() string` + +GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. + +### GetStatusCodeOk + +`func (o *LayoutApiError) GetStatusCodeOk() (*string, bool)` + +GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCode + +`func (o *LayoutApiError) SetStatusCode(v string)` + +SetStatusCode sets StatusCode field to given value. + + +### GetMessage + +`func (o *LayoutApiError) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *LayoutApiError) 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 *LayoutApiError) 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/LayoutHint.md b/generated/stackstate_api/docs/LayoutHint.md new file mode 100644 index 00000000..cf12aca9 --- /dev/null +++ b/generated/stackstate_api/docs/LayoutHint.md @@ -0,0 +1,114 @@ +# LayoutHint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Weight** | **float32** | | +**Type** | **string** | | +**Tab** | **string** | | + +## Methods + +### NewLayoutHint + +`func NewLayoutHint(name string, weight float32, type_ string, tab string, ) *LayoutHint` + +NewLayoutHint instantiates a new LayoutHint 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 + +### NewLayoutHintWithDefaults + +`func NewLayoutHintWithDefaults() *LayoutHint` + +NewLayoutHintWithDefaults instantiates a new LayoutHint object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *LayoutHint) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *LayoutHint) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *LayoutHint) SetName(v string)` + +SetName sets Name field to given value. + + +### GetWeight + +`func (o *LayoutHint) GetWeight() float32` + +GetWeight returns the Weight field if non-nil, zero value otherwise. + +### GetWeightOk + +`func (o *LayoutHint) GetWeightOk() (*float32, bool)` + +GetWeightOk returns a tuple with the Weight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWeight + +`func (o *LayoutHint) SetWeight(v float32)` + +SetWeight sets Weight field to given value. + + +### GetType + +`func (o *LayoutHint) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *LayoutHint) 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 *LayoutHint) SetType(v string)` + +SetType sets Type field to given value. + + +### GetTab + +`func (o *LayoutHint) GetTab() string` + +GetTab returns the Tab field if non-nil, zero value otherwise. + +### GetTabOk + +`func (o *LayoutHint) GetTabOk() (*string, bool)` + +GetTabOk returns a tuple with the Tab field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTab + +`func (o *LayoutHint) SetTab(v string)` + +SetTab sets Tab 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/LayoutList.md b/generated/stackstate_api/docs/LayoutList.md new file mode 100644 index 00000000..34042fea --- /dev/null +++ b/generated/stackstate_api/docs/LayoutList.md @@ -0,0 +1,51 @@ +# LayoutList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Layouts** | [**[]LayoutHint**](LayoutHint.md) | | + +## Methods + +### NewLayoutList + +`func NewLayoutList(layouts []LayoutHint, ) *LayoutList` + +NewLayoutList instantiates a new LayoutList 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 + +### NewLayoutListWithDefaults + +`func NewLayoutListWithDefaults() *LayoutList` + +NewLayoutListWithDefaults instantiates a new LayoutList 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 + +### GetLayouts + +`func (o *LayoutList) GetLayouts() []LayoutHint` + +GetLayouts returns the Layouts field if non-nil, zero value otherwise. + +### GetLayoutsOk + +`func (o *LayoutList) GetLayoutsOk() (*[]LayoutHint, bool)` + +GetLayoutsOk returns a tuple with the Layouts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLayouts + +`func (o *LayoutList) SetLayouts(v []LayoutHint)` + +SetLayouts sets Layouts 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/Message.md b/generated/stackstate_api/docs/Message.md index cb7c1fb3..f4c3020d 100644 --- a/generated/stackstate_api/docs/Message.md +++ b/generated/stackstate_api/docs/Message.md @@ -6,14 +6,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Key** | **string** | | **Partition** | **int32** | | -**Offset** | **int32** | | +**Offset** | **int64** | | **Message** | **map[string]interface{}** | | ## Methods ### NewMessage -`func NewMessage(key string, partition int32, offset int32, message map[string]interface{}, ) *Message` +`func NewMessage(key string, partition int32, offset int64, message map[string]interface{}, ) *Message` NewMessage instantiates a new Message object This constructor will assign default values to properties that have it defined, @@ -70,20 +70,20 @@ SetPartition sets Partition field to given value. ### GetOffset -`func (o *Message) GetOffset() int32` +`func (o *Message) GetOffset() int64` GetOffset returns the Offset field if non-nil, zero value otherwise. ### GetOffsetOk -`func (o *Message) GetOffsetOk() (*int32, bool)` +`func (o *Message) GetOffsetOk() (*int64, bool)` GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetOffset -`func (o *Message) SetOffset(v int32)` +`func (o *Message) SetOffset(v int64)` SetOffset sets Offset field to given value. diff --git a/generated/stackstate_api/docs/MetricPerspectiveSection.md b/generated/stackstate_api/docs/MetricPerspectiveSection.md new file mode 100644 index 00000000..9fbaf605 --- /dev/null +++ b/generated/stackstate_api/docs/MetricPerspectiveSection.md @@ -0,0 +1,114 @@ +# MetricPerspectiveSection + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Weight** | **float32** | | +**Type** | **string** | | +**Tab** | **string** | | + +## Methods + +### NewMetricPerspectiveSection + +`func NewMetricPerspectiveSection(name string, weight float32, type_ string, tab string, ) *MetricPerspectiveSection` + +NewMetricPerspectiveSection instantiates a new MetricPerspectiveSection 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 + +### NewMetricPerspectiveSectionWithDefaults + +`func NewMetricPerspectiveSectionWithDefaults() *MetricPerspectiveSection` + +NewMetricPerspectiveSectionWithDefaults instantiates a new MetricPerspectiveSection object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *MetricPerspectiveSection) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *MetricPerspectiveSection) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *MetricPerspectiveSection) SetName(v string)` + +SetName sets Name field to given value. + + +### GetWeight + +`func (o *MetricPerspectiveSection) GetWeight() float32` + +GetWeight returns the Weight field if non-nil, zero value otherwise. + +### GetWeightOk + +`func (o *MetricPerspectiveSection) GetWeightOk() (*float32, bool)` + +GetWeightOk returns a tuple with the Weight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWeight + +`func (o *MetricPerspectiveSection) SetWeight(v float32)` + +SetWeight sets Weight field to given value. + + +### GetType + +`func (o *MetricPerspectiveSection) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *MetricPerspectiveSection) 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 *MetricPerspectiveSection) SetType(v string)` + +SetType sets Type field to given value. + + +### GetTab + +`func (o *MetricPerspectiveSection) GetTab() string` + +GetTab returns the Tab field if non-nil, zero value otherwise. + +### GetTabOk + +`func (o *MetricPerspectiveSection) GetTabOk() (*string, bool)` + +GetTabOk returns a tuple with the Tab field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTab + +`func (o *MetricPerspectiveSection) SetTab(v string)` + +SetTab sets Tab 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/MetricPerspectiveSectionAllOf.md b/generated/stackstate_api/docs/MetricPerspectiveSectionAllOf.md new file mode 100644 index 00000000..6116d3f0 --- /dev/null +++ b/generated/stackstate_api/docs/MetricPerspectiveSectionAllOf.md @@ -0,0 +1,72 @@ +# MetricPerspectiveSectionAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Tab** | **string** | | + +## Methods + +### NewMetricPerspectiveSectionAllOf + +`func NewMetricPerspectiveSectionAllOf(type_ string, tab string, ) *MetricPerspectiveSectionAllOf` + +NewMetricPerspectiveSectionAllOf instantiates a new MetricPerspectiveSectionAllOf 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 + +### NewMetricPerspectiveSectionAllOfWithDefaults + +`func NewMetricPerspectiveSectionAllOfWithDefaults() *MetricPerspectiveSectionAllOf` + +NewMetricPerspectiveSectionAllOfWithDefaults instantiates a new MetricPerspectiveSectionAllOf 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 *MetricPerspectiveSectionAllOf) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *MetricPerspectiveSectionAllOf) 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 *MetricPerspectiveSectionAllOf) SetType(v string)` + +SetType sets Type field to given value. + + +### GetTab + +`func (o *MetricPerspectiveSectionAllOf) GetTab() string` + +GetTab returns the Tab field if non-nil, zero value otherwise. + +### GetTabOk + +`func (o *MetricPerspectiveSectionAllOf) GetTabOk() (*string, bool)` + +GetTabOk returns a tuple with the Tab field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTab + +`func (o *MetricPerspectiveSectionAllOf) SetTab(v string)` + +SetTab sets Tab 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/MetricPerspectiveTab.md b/generated/stackstate_api/docs/MetricPerspectiveTab.md new file mode 100644 index 00000000..a1b05c6a --- /dev/null +++ b/generated/stackstate_api/docs/MetricPerspectiveTab.md @@ -0,0 +1,93 @@ +# MetricPerspectiveTab + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Weight** | **float32** | | +**Type** | **string** | | + +## Methods + +### NewMetricPerspectiveTab + +`func NewMetricPerspectiveTab(name string, weight float32, type_ string, ) *MetricPerspectiveTab` + +NewMetricPerspectiveTab instantiates a new MetricPerspectiveTab 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 + +### NewMetricPerspectiveTabWithDefaults + +`func NewMetricPerspectiveTabWithDefaults() *MetricPerspectiveTab` + +NewMetricPerspectiveTabWithDefaults instantiates a new MetricPerspectiveTab object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *MetricPerspectiveTab) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *MetricPerspectiveTab) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *MetricPerspectiveTab) SetName(v string)` + +SetName sets Name field to given value. + + +### GetWeight + +`func (o *MetricPerspectiveTab) GetWeight() float32` + +GetWeight returns the Weight field if non-nil, zero value otherwise. + +### GetWeightOk + +`func (o *MetricPerspectiveTab) GetWeightOk() (*float32, bool)` + +GetWeightOk returns a tuple with the Weight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWeight + +`func (o *MetricPerspectiveTab) SetWeight(v float32)` + +SetWeight sets Weight field to given value. + + +### GetType + +`func (o *MetricPerspectiveTab) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *MetricPerspectiveTab) 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 *MetricPerspectiveTab) SetType(v string)` + +SetType sets Type 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/MetricPerspectiveTabAllOf.md b/generated/stackstate_api/docs/MetricPerspectiveTabAllOf.md new file mode 100644 index 00000000..8b469fd4 --- /dev/null +++ b/generated/stackstate_api/docs/MetricPerspectiveTabAllOf.md @@ -0,0 +1,51 @@ +# MetricPerspectiveTabAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | + +## Methods + +### NewMetricPerspectiveTabAllOf + +`func NewMetricPerspectiveTabAllOf(type_ string, ) *MetricPerspectiveTabAllOf` + +NewMetricPerspectiveTabAllOf instantiates a new MetricPerspectiveTabAllOf 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 + +### NewMetricPerspectiveTabAllOfWithDefaults + +`func NewMetricPerspectiveTabAllOfWithDefaults() *MetricPerspectiveTabAllOf` + +NewMetricPerspectiveTabAllOfWithDefaults instantiates a new MetricPerspectiveTabAllOf 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 *MetricPerspectiveTabAllOf) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *MetricPerspectiveTabAllOf) 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 *MetricPerspectiveTabAllOf) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/stackstate_api/docs/MonitorApi.md b/generated/stackstate_api/docs/MonitorApi.md index c6696c9d..f0fabebd 100644 --- a/generated/stackstate_api/docs/MonitorApi.md +++ b/generated/stackstate_api/docs/MonitorApi.md @@ -7,14 +7,17 @@ Method | HTTP request | Description [**DeleteMonitor**](MonitorApi.md#DeleteMonitor) | **Delete** /monitors/{monitorIdOrUrn} | Delete a monitor [**GetAllMonitors**](MonitorApi.md#GetAllMonitors) | **Get** /monitors | List monitors [**GetMonitor**](MonitorApi.md#GetMonitor) | **Get** /monitors/{monitorIdOrUrn} | Get a monitor +[**GetMonitorCheckStates**](MonitorApi.md#GetMonitorCheckStates) | **Get** /monitors/{monitorIdOrUrn}/checkStates | Get the check states for a monitor [**GetMonitorWithStatus**](MonitorApi.md#GetMonitorWithStatus) | **Get** /monitors/{monitorIdOrUrn}/status | Get a monitor with stream information [**GetMonitorsOverview**](MonitorApi.md#GetMonitorsOverview) | **Get** /monitors/overview | List monitors overview [**LookupIdentifier**](MonitorApi.md#LookupIdentifier) | **Post** /monitors/identifierLookup | Multiple component identifier lookup [**PatchMonitor**](MonitorApi.md#PatchMonitor) | **Patch** /monitors/{monitorIdOrUrn} | Update some monitor properties [**PreviewMonitor**](MonitorApi.md#PreviewMonitor) | **Post** /monitors/{monitorIdOrUrn}/preview | Preview a monitor +[**PreviewMonitorCheckStates**](MonitorApi.md#PreviewMonitorCheckStates) | **Post** /monitors/{monitorIdOrUrn}/preview/checkStates | Preview a monitor [**PublishHealthStates**](MonitorApi.md#PublishHealthStates) | **Post** /monitors/{monitorIdOrUrn}/publish | Post monitor health states [**RunMonitor**](MonitorApi.md#RunMonitor) | **Post** /monitors/{monitorIdOrUrn}/run | Run a monitor [**TestMonitorFunction**](MonitorApi.md#TestMonitorFunction) | **Post** /monitors/{monitorFunctionIdOrUrn}/test | Test a monitor +[**TestMonitorFunctionCheckStates**](MonitorApi.md#TestMonitorFunctionCheckStates) | **Post** /monitors/{monitorFunctionIdOrUrn}/test/checkStates | Test a monitor @@ -217,6 +220,80 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## GetMonitorCheckStates + +> MonitorCheckStates GetMonitorCheckStates(ctx, monitorIdOrUrn).HealthState(healthState).Limit(limit).Execute() + +Get the check states for a monitor + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + monitorIdOrUrn := "monitorIdOrUrn_example" // string | The id or identifier (urn) of a monitor + healthState := openapiclient.HealthStateValue("UNINITIALIZED") // HealthStateValue | Health state of check states (optional) + limit := int32(56) // int32 | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MonitorApi.GetMonitorCheckStates(context.Background(), monitorIdOrUrn).HealthState(healthState).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MonitorApi.GetMonitorCheckStates``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetMonitorCheckStates`: MonitorCheckStates + fmt.Fprintf(os.Stdout, "Response from `MonitorApi.GetMonitorCheckStates`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**monitorIdOrUrn** | **string** | The id or identifier (urn) of a monitor | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetMonitorCheckStatesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **healthState** | [**HealthStateValue**](HealthStateValue.md) | Health state of check states | + **limit** | **int32** | | + +### Return type + +[**MonitorCheckStates**](MonitorCheckStates.md) + +### Authorization + +[ApiToken](../README.md#ApiToken), [ServiceBearer](../README.md#ServiceBearer), [ServiceToken](../README.md#ServiceToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## GetMonitorWithStatus > MonitorStatus GetMonitorWithStatus(ctx, monitorIdOrUrn).Execute() @@ -558,6 +635,82 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## PreviewMonitorCheckStates + +> MonitorCheckStates PreviewMonitorCheckStates(ctx, monitorIdOrUrn).MonitorPreview(monitorPreview).HealthState(healthState).Limit(limit).Execute() + +Preview a monitor + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + monitorIdOrUrn := "monitorIdOrUrn_example" // string | The id or identifier (urn) of a monitor + monitorPreview := *openapiclient.NewMonitorPreview() // MonitorPreview | Monitor overrides in order to run a preview + healthState := openapiclient.HealthStateValue("UNINITIALIZED") // HealthStateValue | Health state of check states (optional) + limit := int32(56) // int32 | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MonitorApi.PreviewMonitorCheckStates(context.Background(), monitorIdOrUrn).MonitorPreview(monitorPreview).HealthState(healthState).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MonitorApi.PreviewMonitorCheckStates``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PreviewMonitorCheckStates`: MonitorCheckStates + fmt.Fprintf(os.Stdout, "Response from `MonitorApi.PreviewMonitorCheckStates`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**monitorIdOrUrn** | **string** | The id or identifier (urn) of a monitor | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPreviewMonitorCheckStatesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **monitorPreview** | [**MonitorPreview**](MonitorPreview.md) | Monitor overrides in order to run a preview | + **healthState** | [**HealthStateValue**](HealthStateValue.md) | Health state of check states | + **limit** | **int32** | | + +### Return type + +[**MonitorCheckStates**](MonitorCheckStates.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) + + ## PublishHealthStates > PublishHealthStates(ctx, monitorIdOrUrn).MonitorSnapshot(monitorSnapshot).Execute() @@ -771,3 +924,79 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## TestMonitorFunctionCheckStates + +> MonitorCheckStates TestMonitorFunctionCheckStates(ctx, monitorFunctionIdOrUrn).MonitorFunctionTest(monitorFunctionTest).HealthState(healthState).Limit(limit).Execute() + +Test a monitor + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + monitorFunctionIdOrUrn := "monitorFunctionIdOrUrn_example" // string | The id or identifier (urn) of a monitor function + monitorFunctionTest := *openapiclient.NewMonitorFunctionTest([]openapiclient.Argument{openapiclient.Argument{ArgumentBooleanVal: openapiclient.NewArgumentBooleanVal("Type_example", int64(123), false)}}) // MonitorFunctionTest | Monitor function arguments to test + healthState := openapiclient.HealthStateValue("UNINITIALIZED") // HealthStateValue | Health state of check states (optional) + limit := int32(56) // int32 | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MonitorApi.TestMonitorFunctionCheckStates(context.Background(), monitorFunctionIdOrUrn).MonitorFunctionTest(monitorFunctionTest).HealthState(healthState).Limit(limit).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MonitorApi.TestMonitorFunctionCheckStates``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestMonitorFunctionCheckStates`: MonitorCheckStates + fmt.Fprintf(os.Stdout, "Response from `MonitorApi.TestMonitorFunctionCheckStates`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**monitorFunctionIdOrUrn** | **string** | The id or identifier (urn) of a monitor function | + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestMonitorFunctionCheckStatesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **monitorFunctionTest** | [**MonitorFunctionTest**](MonitorFunctionTest.md) | Monitor function arguments to test | + **healthState** | [**HealthStateValue**](HealthStateValue.md) | Health state of check states | + **limit** | **int32** | | + +### Return type + +[**MonitorCheckStates**](MonitorCheckStates.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/MonitorCheckStates.md b/generated/stackstate_api/docs/MonitorCheckStates.md new file mode 100644 index 00000000..21d099a1 --- /dev/null +++ b/generated/stackstate_api/docs/MonitorCheckStates.md @@ -0,0 +1,51 @@ +# MonitorCheckStates + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**States** | [**[]ViewCheckState**](ViewCheckState.md) | | + +## Methods + +### NewMonitorCheckStates + +`func NewMonitorCheckStates(states []ViewCheckState, ) *MonitorCheckStates` + +NewMonitorCheckStates instantiates a new MonitorCheckStates 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 + +### NewMonitorCheckStatesWithDefaults + +`func NewMonitorCheckStatesWithDefaults() *MonitorCheckStates` + +NewMonitorCheckStatesWithDefaults instantiates a new MonitorCheckStates 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 + +### GetStates + +`func (o *MonitorCheckStates) GetStates() []ViewCheckState` + +GetStates returns the States field if non-nil, zero value otherwise. + +### GetStatesOk + +`func (o *MonitorCheckStates) GetStatesOk() (*[]ViewCheckState, bool)` + +GetStatesOk returns a tuple with the States field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStates + +`func (o *MonitorCheckStates) SetStates(v []ViewCheckState)` + +SetStates sets States 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/MonitorCheckStatusApi.md b/generated/stackstate_api/docs/MonitorCheckStatusApi.md index bd06c5d5..d666a0f1 100644 --- a/generated/stackstate_api/docs/MonitorCheckStatusApi.md +++ b/generated/stackstate_api/docs/MonitorCheckStatusApi.md @@ -5,7 +5,7 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- [**GetMonitorCheckStatus**](MonitorCheckStatusApi.md#GetMonitorCheckStatus) | **Get** /monitor/checkStatus/{id} | Get a monitor check status -[**GetMonitorCheckStatusHealthHistory**](MonitorCheckStatusApi.md#GetMonitorCheckStatusHealthHistory) | **Get** /monitor/checkStatus/{id}/healthHistory | Get a monitor check health hisotry +[**GetMonitorCheckStatusHealthHistory**](MonitorCheckStatusApi.md#GetMonitorCheckStatusHealthHistory) | **Get** /monitor/checkStatus/{id}/healthHistory | Get a monitor check health history [**GetMonitorCheckStatusRelatedFailures**](MonitorCheckStatusApi.md#GetMonitorCheckStatusRelatedFailures) | **Get** /monitor/checkStatus/{id}/relatedFailures | Get a monitor check related failures @@ -86,7 +86,7 @@ Name | Type | Description | Notes > MonitorCheckStatusHealthHistory GetMonitorCheckStatusHealthHistory(ctx, id).StartTime(startTime).EndTime(endTime).TopologyTime(topologyTime).Execute() -Get a monitor check health hisotry +Get a monitor check health history diff --git a/generated/stackstate_api/docs/SpanComponent.md b/generated/stackstate_api/docs/SpanComponent.md index 7ec10b36..ce4839fc 100644 --- a/generated/stackstate_api/docs/SpanComponent.md +++ b/generated/stackstate_api/docs/SpanComponent.md @@ -8,12 +8,13 @@ Name | Type | Description | Notes **Identifier** | **string** | | **Name** | **string** | | **Type** | **string** | | +**HealthState** | [**HealthStateValue**](HealthStateValue.md) | | ## Methods ### NewSpanComponent -`func NewSpanComponent(id int64, identifier string, name string, type_ string, ) *SpanComponent` +`func NewSpanComponent(id int64, identifier string, name string, type_ string, healthState HealthStateValue, ) *SpanComponent` NewSpanComponent instantiates a new SpanComponent object This constructor will assign default values to properties that have it defined, @@ -108,6 +109,26 @@ and a boolean to check if the value has been set. SetType sets Type field to given value. +### GetHealthState + +`func (o *SpanComponent) GetHealthState() HealthStateValue` + +GetHealthState returns the HealthState field if non-nil, zero value otherwise. + +### GetHealthStateOk + +`func (o *SpanComponent) GetHealthStateOk() (*HealthStateValue, bool)` + +GetHealthStateOk returns a tuple with the HealthState field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHealthState + +`func (o *SpanComponent) SetHealthState(v HealthStateValue)` + +SetHealthState sets HealthState 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/SpanSummary.md b/generated/stackstate_api/docs/SpanSummary.md new file mode 100644 index 00000000..96456b09 --- /dev/null +++ b/generated/stackstate_api/docs/SpanSummary.md @@ -0,0 +1,224 @@ +# SpanSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StartTime** | [**InstantNanoPrecision**](InstantNanoPrecision.md) | | +**EndTime** | [**InstantNanoPrecision**](InstantNanoPrecision.md) | | +**DurationNanos** | **int64** | Duration of the span in nanoseconds | +**TraceId** | **string** | The unique identifier for the trace, all spans of the same trace share the same trace_id | +**SpanId** | **string** | The unique identifier of the span within the trace | +**ParentSpanId** | Pointer to **string** | The id of the parent span of this span. Empty if this is the root span | [optional] +**SpanName** | **string** | A description of the span's operation. For example, the name can be a qualified method name or a file name and a line number where the operation is called | +**ServiceName** | **string** | Logical name of the service for the span | +**StatusCode** | [**StatusCode**](StatusCode.md) | | + +## Methods + +### NewSpanSummary + +`func NewSpanSummary(startTime InstantNanoPrecision, endTime InstantNanoPrecision, durationNanos int64, traceId string, spanId string, spanName string, serviceName string, statusCode StatusCode, ) *SpanSummary` + +NewSpanSummary instantiates a new SpanSummary 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 + +### NewSpanSummaryWithDefaults + +`func NewSpanSummaryWithDefaults() *SpanSummary` + +NewSpanSummaryWithDefaults instantiates a new SpanSummary 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 + +### GetStartTime + +`func (o *SpanSummary) GetStartTime() InstantNanoPrecision` + +GetStartTime returns the StartTime field if non-nil, zero value otherwise. + +### GetStartTimeOk + +`func (o *SpanSummary) GetStartTimeOk() (*InstantNanoPrecision, 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 *SpanSummary) SetStartTime(v InstantNanoPrecision)` + +SetStartTime sets StartTime field to given value. + + +### GetEndTime + +`func (o *SpanSummary) GetEndTime() InstantNanoPrecision` + +GetEndTime returns the EndTime field if non-nil, zero value otherwise. + +### GetEndTimeOk + +`func (o *SpanSummary) GetEndTimeOk() (*InstantNanoPrecision, 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 *SpanSummary) SetEndTime(v InstantNanoPrecision)` + +SetEndTime sets EndTime field to given value. + + +### GetDurationNanos + +`func (o *SpanSummary) GetDurationNanos() int64` + +GetDurationNanos returns the DurationNanos field if non-nil, zero value otherwise. + +### GetDurationNanosOk + +`func (o *SpanSummary) GetDurationNanosOk() (*int64, bool)` + +GetDurationNanosOk returns a tuple with the DurationNanos field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDurationNanos + +`func (o *SpanSummary) SetDurationNanos(v int64)` + +SetDurationNanos sets DurationNanos field to given value. + + +### GetTraceId + +`func (o *SpanSummary) GetTraceId() string` + +GetTraceId returns the TraceId field if non-nil, zero value otherwise. + +### GetTraceIdOk + +`func (o *SpanSummary) GetTraceIdOk() (*string, bool)` + +GetTraceIdOk returns a tuple with the TraceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTraceId + +`func (o *SpanSummary) SetTraceId(v string)` + +SetTraceId sets TraceId field to given value. + + +### GetSpanId + +`func (o *SpanSummary) GetSpanId() string` + +GetSpanId returns the SpanId field if non-nil, zero value otherwise. + +### GetSpanIdOk + +`func (o *SpanSummary) GetSpanIdOk() (*string, bool)` + +GetSpanIdOk returns a tuple with the SpanId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSpanId + +`func (o *SpanSummary) SetSpanId(v string)` + +SetSpanId sets SpanId field to given value. + + +### GetParentSpanId + +`func (o *SpanSummary) GetParentSpanId() string` + +GetParentSpanId returns the ParentSpanId field if non-nil, zero value otherwise. + +### GetParentSpanIdOk + +`func (o *SpanSummary) GetParentSpanIdOk() (*string, bool)` + +GetParentSpanIdOk returns a tuple with the ParentSpanId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentSpanId + +`func (o *SpanSummary) SetParentSpanId(v string)` + +SetParentSpanId sets ParentSpanId field to given value. + +### HasParentSpanId + +`func (o *SpanSummary) HasParentSpanId() bool` + +HasParentSpanId returns a boolean if a field has been set. + +### GetSpanName + +`func (o *SpanSummary) GetSpanName() string` + +GetSpanName returns the SpanName field if non-nil, zero value otherwise. + +### GetSpanNameOk + +`func (o *SpanSummary) GetSpanNameOk() (*string, bool)` + +GetSpanNameOk returns a tuple with the SpanName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSpanName + +`func (o *SpanSummary) SetSpanName(v string)` + +SetSpanName sets SpanName field to given value. + + +### GetServiceName + +`func (o *SpanSummary) GetServiceName() string` + +GetServiceName returns the ServiceName field if non-nil, zero value otherwise. + +### GetServiceNameOk + +`func (o *SpanSummary) GetServiceNameOk() (*string, bool)` + +GetServiceNameOk returns a tuple with the ServiceName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceName + +`func (o *SpanSummary) SetServiceName(v string)` + +SetServiceName sets ServiceName field to given value. + + +### GetStatusCode + +`func (o *SpanSummary) GetStatusCode() StatusCode` + +GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. + +### GetStatusCodeOk + +`func (o *SpanSummary) GetStatusCodeOk() (*StatusCode, bool)` + +GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCode + +`func (o *SpanSummary) SetStatusCode(v StatusCode)` + +SetStatusCode sets StatusCode 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/Spans.md b/generated/stackstate_api/docs/Spans.md index bc752879..3fa0095a 100644 --- a/generated/stackstate_api/docs/Spans.md +++ b/generated/stackstate_api/docs/Spans.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Spans** | [**[]Span**](Span.md) | List of spans | +**Spans** | [**[]SpanSummary**](SpanSummary.md) | List of spans | **PageSize** | **int32** | Maximum number of the spans in the result. | **Page** | **int32** | The requested page. | **MatchesTotal** | **int64** | The total number of matching spans. | @@ -13,7 +13,7 @@ Name | Type | Description | Notes ### NewSpans -`func NewSpans(spans []Span, pageSize int32, page int32, matchesTotal int64, ) *Spans` +`func NewSpans(spans []SpanSummary, pageSize int32, page int32, matchesTotal int64, ) *Spans` NewSpans instantiates a new Spans object This constructor will assign default values to properties that have it defined, @@ -30,20 +30,20 @@ but it doesn't guarantee that properties required by API are set ### GetSpans -`func (o *Spans) GetSpans() []Span` +`func (o *Spans) GetSpans() []SpanSummary` GetSpans returns the Spans field if non-nil, zero value otherwise. ### GetSpansOk -`func (o *Spans) GetSpansOk() (*[]Span, bool)` +`func (o *Spans) GetSpansOk() (*[]SpanSummary, bool)` GetSpansOk returns a tuple with the Spans field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSpans -`func (o *Spans) SetSpans(v []Span)` +`func (o *Spans) SetSpans(v []SpanSummary)` SetSpans sets Spans field to given value. diff --git a/generated/stackstate_api/docs/TopicApi.md b/generated/stackstate_api/docs/TopicApi.md index 9c0ac71b..12c77e8b 100644 --- a/generated/stackstate_api/docs/TopicApi.md +++ b/generated/stackstate_api/docs/TopicApi.md @@ -32,7 +32,7 @@ import ( func main() { topic := "topic_example" // string | limit := int32(56) // int32 | (optional) - offset := int32(56) // int32 | (optional) + offset := int64(789) // int64 | (optional) partition := int32(56) // int32 | (optional) configuration := openapiclient.NewConfiguration() @@ -64,7 +64,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **limit** | **int32** | | - **offset** | **int32** | | + **offset** | **int64** | | **partition** | **int32** | | ### Return type diff --git a/generated/stackstate_api/docs/ViewCheckState.md b/generated/stackstate_api/docs/ViewCheckState.md new file mode 100644 index 00000000..5e5a56f8 --- /dev/null +++ b/generated/stackstate_api/docs/ViewCheckState.md @@ -0,0 +1,156 @@ +# ViewCheckState + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CheckStateId** | **string** | | +**HealthState** | [**HealthStateValue**](HealthStateValue.md) | | +**ComponentName** | **string** | | +**ComponentIdentifier** | **string** | | +**ComponentType** | **string** | | +**LastUpdateTimestamp** | **int64** | | + +## Methods + +### NewViewCheckState + +`func NewViewCheckState(checkStateId string, healthState HealthStateValue, componentName string, componentIdentifier string, componentType string, lastUpdateTimestamp int64, ) *ViewCheckState` + +NewViewCheckState instantiates a new ViewCheckState 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 + +### NewViewCheckStateWithDefaults + +`func NewViewCheckStateWithDefaults() *ViewCheckState` + +NewViewCheckStateWithDefaults instantiates a new ViewCheckState 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 + +### GetCheckStateId + +`func (o *ViewCheckState) GetCheckStateId() string` + +GetCheckStateId returns the CheckStateId field if non-nil, zero value otherwise. + +### GetCheckStateIdOk + +`func (o *ViewCheckState) GetCheckStateIdOk() (*string, bool)` + +GetCheckStateIdOk returns a tuple with the CheckStateId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCheckStateId + +`func (o *ViewCheckState) SetCheckStateId(v string)` + +SetCheckStateId sets CheckStateId field to given value. + + +### GetHealthState + +`func (o *ViewCheckState) GetHealthState() HealthStateValue` + +GetHealthState returns the HealthState field if non-nil, zero value otherwise. + +### GetHealthStateOk + +`func (o *ViewCheckState) GetHealthStateOk() (*HealthStateValue, bool)` + +GetHealthStateOk returns a tuple with the HealthState field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHealthState + +`func (o *ViewCheckState) SetHealthState(v HealthStateValue)` + +SetHealthState sets HealthState field to given value. + + +### GetComponentName + +`func (o *ViewCheckState) GetComponentName() string` + +GetComponentName returns the ComponentName field if non-nil, zero value otherwise. + +### GetComponentNameOk + +`func (o *ViewCheckState) GetComponentNameOk() (*string, bool)` + +GetComponentNameOk returns a tuple with the ComponentName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComponentName + +`func (o *ViewCheckState) SetComponentName(v string)` + +SetComponentName sets ComponentName field to given value. + + +### GetComponentIdentifier + +`func (o *ViewCheckState) GetComponentIdentifier() string` + +GetComponentIdentifier returns the ComponentIdentifier field if non-nil, zero value otherwise. + +### GetComponentIdentifierOk + +`func (o *ViewCheckState) 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 *ViewCheckState) SetComponentIdentifier(v string)` + +SetComponentIdentifier sets ComponentIdentifier field to given value. + + +### GetComponentType + +`func (o *ViewCheckState) GetComponentType() string` + +GetComponentType returns the ComponentType field if non-nil, zero value otherwise. + +### GetComponentTypeOk + +`func (o *ViewCheckState) GetComponentTypeOk() (*string, bool)` + +GetComponentTypeOk returns a tuple with the ComponentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComponentType + +`func (o *ViewCheckState) SetComponentType(v string)` + +SetComponentType sets ComponentType field to given value. + + +### GetLastUpdateTimestamp + +`func (o *ViewCheckState) GetLastUpdateTimestamp() int64` + +GetLastUpdateTimestamp returns the LastUpdateTimestamp field if non-nil, zero value otherwise. + +### GetLastUpdateTimestampOk + +`func (o *ViewCheckState) GetLastUpdateTimestampOk() (*int64, bool)` + +GetLastUpdateTimestampOk returns a tuple with the LastUpdateTimestamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastUpdateTimestamp + +`func (o *ViewCheckState) SetLastUpdateTimestamp(v int64)` + +SetLastUpdateTimestamp sets LastUpdateTimestamp field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/stackstate_api/model_base_layout_hint.go b/generated/stackstate_api/model_base_layout_hint.go new file mode 100644 index 00000000..a0598eb9 --- /dev/null +++ b/generated/stackstate_api/model_base_layout_hint.go @@ -0,0 +1,136 @@ +/* +StackState API + +This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). + +API version: 5.2.0 +Contact: info@stackstate.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackstate_api + +import ( + "encoding/json" +) + +// BaseLayoutHint struct for BaseLayoutHint +type BaseLayoutHint struct { + Name string `json:"name"` + Weight float32 `json:"weight"` +} + +// NewBaseLayoutHint instantiates a new BaseLayoutHint 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 NewBaseLayoutHint(name string, weight float32) *BaseLayoutHint { + this := BaseLayoutHint{} + this.Name = name + this.Weight = weight + return &this +} + +// NewBaseLayoutHintWithDefaults instantiates a new BaseLayoutHint 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 NewBaseLayoutHintWithDefaults() *BaseLayoutHint { + this := BaseLayoutHint{} + return &this +} + +// GetName returns the Name field value +func (o *BaseLayoutHint) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *BaseLayoutHint) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *BaseLayoutHint) SetName(v string) { + o.Name = v +} + +// GetWeight returns the Weight field value +func (o *BaseLayoutHint) GetWeight() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.Weight +} + +// GetWeightOk returns a tuple with the Weight field value +// and a boolean to check if the value has been set. +func (o *BaseLayoutHint) GetWeightOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.Weight, true +} + +// SetWeight sets field value +func (o *BaseLayoutHint) SetWeight(v float32) { + o.Weight = v +} + +func (o BaseLayoutHint) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["name"] = o.Name + } + if true { + toSerialize["weight"] = o.Weight + } + return json.Marshal(toSerialize) +} + +type NullableBaseLayoutHint struct { + value *BaseLayoutHint + isSet bool +} + +func (v NullableBaseLayoutHint) Get() *BaseLayoutHint { + return v.value +} + +func (v *NullableBaseLayoutHint) Set(val *BaseLayoutHint) { + v.value = val + v.isSet = true +} + +func (v NullableBaseLayoutHint) IsSet() bool { + return v.isSet +} + +func (v *NullableBaseLayoutHint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBaseLayoutHint(val *BaseLayoutHint) *NullableBaseLayoutHint { + return &NullableBaseLayoutHint{value: val, isSet: true} +} + +func (v NullableBaseLayoutHint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBaseLayoutHint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_component_health_change.go b/generated/stackstate_api/model_component_health_change.go new file mode 100644 index 00000000..6384dbfc --- /dev/null +++ b/generated/stackstate_api/model_component_health_change.go @@ -0,0 +1,136 @@ +/* +StackState API + +This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). + +API version: 5.2.0 +Contact: info@stackstate.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackstate_api + +import ( + "encoding/json" +) + +// ComponentHealthChange struct for ComponentHealthChange +type ComponentHealthChange struct { + Timestamp int64 `json:"timestamp"` + NewHealth HealthStateValue `json:"newHealth"` +} + +// NewComponentHealthChange instantiates a new ComponentHealthChange 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 NewComponentHealthChange(timestamp int64, newHealth HealthStateValue) *ComponentHealthChange { + this := ComponentHealthChange{} + this.Timestamp = timestamp + this.NewHealth = newHealth + return &this +} + +// NewComponentHealthChangeWithDefaults instantiates a new ComponentHealthChange 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 NewComponentHealthChangeWithDefaults() *ComponentHealthChange { + this := ComponentHealthChange{} + return &this +} + +// GetTimestamp returns the Timestamp field value +func (o *ComponentHealthChange) 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 *ComponentHealthChange) GetTimestampOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Timestamp, true +} + +// SetTimestamp sets field value +func (o *ComponentHealthChange) SetTimestamp(v int64) { + o.Timestamp = v +} + +// GetNewHealth returns the NewHealth field value +func (o *ComponentHealthChange) 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 *ComponentHealthChange) GetNewHealthOk() (*HealthStateValue, bool) { + if o == nil { + return nil, false + } + return &o.NewHealth, true +} + +// SetNewHealth sets field value +func (o *ComponentHealthChange) SetNewHealth(v HealthStateValue) { + o.NewHealth = v +} + +func (o ComponentHealthChange) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["timestamp"] = o.Timestamp + } + if true { + toSerialize["newHealth"] = o.NewHealth + } + return json.Marshal(toSerialize) +} + +type NullableComponentHealthChange struct { + value *ComponentHealthChange + isSet bool +} + +func (v NullableComponentHealthChange) Get() *ComponentHealthChange { + return v.value +} + +func (v *NullableComponentHealthChange) Set(val *ComponentHealthChange) { + v.value = val + v.isSet = true +} + +func (v NullableComponentHealthChange) IsSet() bool { + return v.isSet +} + +func (v *NullableComponentHealthChange) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableComponentHealthChange(val *ComponentHealthChange) *NullableComponentHealthChange { + return &NullableComponentHealthChange{value: val, isSet: true} +} + +func (v NullableComponentHealthChange) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableComponentHealthChange) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_component_health_history.go b/generated/stackstate_api/model_component_health_history.go new file mode 100644 index 00000000..f84a0aa3 --- /dev/null +++ b/generated/stackstate_api/model_component_health_history.go @@ -0,0 +1,195 @@ +/* +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" +) + +// ComponentHealthHistory struct for ComponentHealthHistory +type ComponentHealthHistory struct { + Id int64 `json:"id"` + StartTime int32 `json:"startTime"` + EndTime int32 `json:"endTime"` + // List of health state changes ordered from most recent to oldest. + HealthStateChanges []ComponentHealthChange `json:"healthStateChanges"` +} + +// NewComponentHealthHistory instantiates a new ComponentHealthHistory 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 NewComponentHealthHistory(id int64, startTime int32, endTime int32, healthStateChanges []ComponentHealthChange) *ComponentHealthHistory { + this := ComponentHealthHistory{} + this.Id = id + this.StartTime = startTime + this.EndTime = endTime + this.HealthStateChanges = healthStateChanges + return &this +} + +// NewComponentHealthHistoryWithDefaults instantiates a new ComponentHealthHistory 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 NewComponentHealthHistoryWithDefaults() *ComponentHealthHistory { + this := ComponentHealthHistory{} + return &this +} + +// GetId returns the Id field value +func (o *ComponentHealthHistory) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ComponentHealthHistory) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ComponentHealthHistory) SetId(v int64) { + o.Id = v +} + +// GetStartTime returns the StartTime field value +func (o *ComponentHealthHistory) 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 *ComponentHealthHistory) GetStartTimeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.StartTime, true +} + +// SetStartTime sets field value +func (o *ComponentHealthHistory) SetStartTime(v int32) { + o.StartTime = v +} + +// GetEndTime returns the EndTime field value +func (o *ComponentHealthHistory) GetEndTime() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.EndTime +} + +// GetEndTimeOk returns a tuple with the EndTime field value +// and a boolean to check if the value has been set. +func (o *ComponentHealthHistory) GetEndTimeOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.EndTime, true +} + +// SetEndTime sets field value +func (o *ComponentHealthHistory) SetEndTime(v int32) { + o.EndTime = v +} + +// GetHealthStateChanges returns the HealthStateChanges field value +func (o *ComponentHealthHistory) GetHealthStateChanges() []ComponentHealthChange { + if o == nil { + var ret []ComponentHealthChange + return ret + } + + return o.HealthStateChanges +} + +// GetHealthStateChangesOk returns a tuple with the HealthStateChanges field value +// and a boolean to check if the value has been set. +func (o *ComponentHealthHistory) GetHealthStateChangesOk() ([]ComponentHealthChange, bool) { + if o == nil { + return nil, false + } + return o.HealthStateChanges, true +} + +// SetHealthStateChanges sets field value +func (o *ComponentHealthHistory) SetHealthStateChanges(v []ComponentHealthChange) { + o.HealthStateChanges = v +} + +func (o ComponentHealthHistory) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["id"] = o.Id + } + if true { + toSerialize["startTime"] = o.StartTime + } + if true { + toSerialize["endTime"] = o.EndTime + } + if true { + toSerialize["healthStateChanges"] = o.HealthStateChanges + } + return json.Marshal(toSerialize) +} + +type NullableComponentHealthHistory struct { + value *ComponentHealthHistory + isSet bool +} + +func (v NullableComponentHealthHistory) Get() *ComponentHealthHistory { + return v.value +} + +func (v *NullableComponentHealthHistory) Set(val *ComponentHealthHistory) { + v.value = val + v.isSet = true +} + +func (v NullableComponentHealthHistory) IsSet() bool { + return v.isSet +} + +func (v *NullableComponentHealthHistory) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableComponentHealthHistory(val *ComponentHealthHistory) *NullableComponentHealthHistory { + return &NullableComponentHealthHistory{value: val, isSet: true} +} + +func (v NullableComponentHealthHistory) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableComponentHealthHistory) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_component_highlight_metric_section.go b/generated/stackstate_api/model_component_highlight_metric_section.go new file mode 100644 index 00000000..676301d1 --- /dev/null +++ b/generated/stackstate_api/model_component_highlight_metric_section.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" +) + +// ComponentHighlightMetricSection struct for ComponentHighlightMetricSection +type ComponentHighlightMetricSection struct { + Name string `json:"name"` + Weight float32 `json:"weight"` + Type string `json:"_type"` +} + +// NewComponentHighlightMetricSection instantiates a new ComponentHighlightMetricSection 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 NewComponentHighlightMetricSection(name string, weight float32, type_ string) *ComponentHighlightMetricSection { + this := ComponentHighlightMetricSection{} + this.Name = name + this.Weight = weight + this.Type = type_ + return &this +} + +// NewComponentHighlightMetricSectionWithDefaults instantiates a new ComponentHighlightMetricSection 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 NewComponentHighlightMetricSectionWithDefaults() *ComponentHighlightMetricSection { + this := ComponentHighlightMetricSection{} + return &this +} + +// GetName returns the Name field value +func (o *ComponentHighlightMetricSection) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ComponentHighlightMetricSection) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ComponentHighlightMetricSection) SetName(v string) { + o.Name = v +} + +// GetWeight returns the Weight field value +func (o *ComponentHighlightMetricSection) GetWeight() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.Weight +} + +// GetWeightOk returns a tuple with the Weight field value +// and a boolean to check if the value has been set. +func (o *ComponentHighlightMetricSection) GetWeightOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.Weight, true +} + +// SetWeight sets field value +func (o *ComponentHighlightMetricSection) SetWeight(v float32) { + o.Weight = v +} + +// GetType returns the Type field value +func (o *ComponentHighlightMetricSection) 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 *ComponentHighlightMetricSection) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ComponentHighlightMetricSection) SetType(v string) { + o.Type = v +} + +func (o ComponentHighlightMetricSection) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["name"] = o.Name + } + if true { + toSerialize["weight"] = o.Weight + } + if true { + toSerialize["_type"] = o.Type + } + return json.Marshal(toSerialize) +} + +type NullableComponentHighlightMetricSection struct { + value *ComponentHighlightMetricSection + isSet bool +} + +func (v NullableComponentHighlightMetricSection) Get() *ComponentHighlightMetricSection { + return v.value +} + +func (v *NullableComponentHighlightMetricSection) Set(val *ComponentHighlightMetricSection) { + v.value = val + v.isSet = true +} + +func (v NullableComponentHighlightMetricSection) IsSet() bool { + return v.isSet +} + +func (v *NullableComponentHighlightMetricSection) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableComponentHighlightMetricSection(val *ComponentHighlightMetricSection) *NullableComponentHighlightMetricSection { + return &NullableComponentHighlightMetricSection{value: val, isSet: true} +} + +func (v NullableComponentHighlightMetricSection) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableComponentHighlightMetricSection) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_component_highlight_metric_section_all_of.go b/generated/stackstate_api/model_component_highlight_metric_section_all_of.go new file mode 100644 index 00000000..87242174 --- /dev/null +++ b/generated/stackstate_api/model_component_highlight_metric_section_all_of.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" +) + +// ComponentHighlightMetricSectionAllOf struct for ComponentHighlightMetricSectionAllOf +type ComponentHighlightMetricSectionAllOf struct { + Type string `json:"_type"` +} + +// NewComponentHighlightMetricSectionAllOf instantiates a new ComponentHighlightMetricSectionAllOf 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 NewComponentHighlightMetricSectionAllOf(type_ string) *ComponentHighlightMetricSectionAllOf { + this := ComponentHighlightMetricSectionAllOf{} + this.Type = type_ + return &this +} + +// NewComponentHighlightMetricSectionAllOfWithDefaults instantiates a new ComponentHighlightMetricSectionAllOf 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 NewComponentHighlightMetricSectionAllOfWithDefaults() *ComponentHighlightMetricSectionAllOf { + this := ComponentHighlightMetricSectionAllOf{} + return &this +} + +// GetType returns the Type field value +func (o *ComponentHighlightMetricSectionAllOf) 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 *ComponentHighlightMetricSectionAllOf) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ComponentHighlightMetricSectionAllOf) SetType(v string) { + o.Type = v +} + +func (o ComponentHighlightMetricSectionAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["_type"] = o.Type + } + return json.Marshal(toSerialize) +} + +type NullableComponentHighlightMetricSectionAllOf struct { + value *ComponentHighlightMetricSectionAllOf + isSet bool +} + +func (v NullableComponentHighlightMetricSectionAllOf) Get() *ComponentHighlightMetricSectionAllOf { + return v.value +} + +func (v *NullableComponentHighlightMetricSectionAllOf) Set(val *ComponentHighlightMetricSectionAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableComponentHighlightMetricSectionAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableComponentHighlightMetricSectionAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableComponentHighlightMetricSectionAllOf(val *ComponentHighlightMetricSectionAllOf) *NullableComponentHighlightMetricSectionAllOf { + return &NullableComponentHighlightMetricSectionAllOf{value: val, isSet: true} +} + +func (v NullableComponentHighlightMetricSectionAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableComponentHighlightMetricSectionAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_component_not_found_error.go b/generated/stackstate_api/model_component_not_found_error.go new file mode 100644 index 00000000..51a24be3 --- /dev/null +++ b/generated/stackstate_api/model_component_not_found_error.go @@ -0,0 +1,136 @@ +/* +StackState API + +This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). + +API version: 5.2.0 +Contact: info@stackstate.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackstate_api + +import ( + "encoding/json" +) + +// ComponentNotFoundError struct for ComponentNotFoundError +type ComponentNotFoundError struct { + Type string `json:"_type"` + ComponentId int64 `json:"componentId"` +} + +// NewComponentNotFoundError instantiates a new ComponentNotFoundError 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 NewComponentNotFoundError(type_ string, componentId int64) *ComponentNotFoundError { + this := ComponentNotFoundError{} + this.Type = type_ + this.ComponentId = componentId + return &this +} + +// NewComponentNotFoundErrorWithDefaults instantiates a new ComponentNotFoundError 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 NewComponentNotFoundErrorWithDefaults() *ComponentNotFoundError { + this := ComponentNotFoundError{} + return &this +} + +// GetType returns the Type field value +func (o *ComponentNotFoundError) 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 *ComponentNotFoundError) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ComponentNotFoundError) SetType(v string) { + o.Type = v +} + +// GetComponentId returns the ComponentId field value +func (o *ComponentNotFoundError) GetComponentId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ComponentId +} + +// GetComponentIdOk returns a tuple with the ComponentId field value +// and a boolean to check if the value has been set. +func (o *ComponentNotFoundError) GetComponentIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ComponentId, true +} + +// SetComponentId sets field value +func (o *ComponentNotFoundError) SetComponentId(v int64) { + o.ComponentId = v +} + +func (o ComponentNotFoundError) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["_type"] = o.Type + } + if true { + toSerialize["componentId"] = o.ComponentId + } + return json.Marshal(toSerialize) +} + +type NullableComponentNotFoundError struct { + value *ComponentNotFoundError + isSet bool +} + +func (v NullableComponentNotFoundError) Get() *ComponentNotFoundError { + return v.value +} + +func (v *NullableComponentNotFoundError) Set(val *ComponentNotFoundError) { + v.value = val + v.isSet = true +} + +func (v NullableComponentNotFoundError) IsSet() bool { + return v.isSet +} + +func (v *NullableComponentNotFoundError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableComponentNotFoundError(val *ComponentNotFoundError) *NullableComponentNotFoundError { + return &NullableComponentNotFoundError{value: val, isSet: true} +} + +func (v NullableComponentNotFoundError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableComponentNotFoundError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_layout_api_error.go b/generated/stackstate_api/model_layout_api_error.go new file mode 100644 index 00000000..db22488d --- /dev/null +++ b/generated/stackstate_api/model_layout_api_error.go @@ -0,0 +1,136 @@ +/* +StackState API + +This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). + +API version: 5.2.0 +Contact: info@stackstate.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackstate_api + +import ( + "encoding/json" +) + +// LayoutApiError struct for LayoutApiError +type LayoutApiError struct { + StatusCode string `json:"statusCode"` + Message string `json:"message"` +} + +// NewLayoutApiError instantiates a new LayoutApiError 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 NewLayoutApiError(statusCode string, message string) *LayoutApiError { + this := LayoutApiError{} + this.StatusCode = statusCode + this.Message = message + return &this +} + +// NewLayoutApiErrorWithDefaults instantiates a new LayoutApiError 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 NewLayoutApiErrorWithDefaults() *LayoutApiError { + this := LayoutApiError{} + return &this +} + +// GetStatusCode returns the StatusCode field value +func (o *LayoutApiError) GetStatusCode() string { + if o == nil { + var ret string + return ret + } + + return o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value +// and a boolean to check if the value has been set. +func (o *LayoutApiError) GetStatusCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StatusCode, true +} + +// SetStatusCode sets field value +func (o *LayoutApiError) SetStatusCode(v string) { + o.StatusCode = v +} + +// GetMessage returns the Message field value +func (o *LayoutApiError) 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 *LayoutApiError) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *LayoutApiError) SetMessage(v string) { + o.Message = v +} + +func (o LayoutApiError) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["statusCode"] = o.StatusCode + } + if true { + toSerialize["message"] = o.Message + } + return json.Marshal(toSerialize) +} + +type NullableLayoutApiError struct { + value *LayoutApiError + isSet bool +} + +func (v NullableLayoutApiError) Get() *LayoutApiError { + return v.value +} + +func (v *NullableLayoutApiError) Set(val *LayoutApiError) { + v.value = val + v.isSet = true +} + +func (v NullableLayoutApiError) IsSet() bool { + return v.isSet +} + +func (v *NullableLayoutApiError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLayoutApiError(val *LayoutApiError) *NullableLayoutApiError { + return &NullableLayoutApiError{value: val, isSet: true} +} + +func (v NullableLayoutApiError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLayoutApiError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_layout_hint.go b/generated/stackstate_api/model_layout_hint.go new file mode 100644 index 00000000..7bf8adfb --- /dev/null +++ b/generated/stackstate_api/model_layout_hint.go @@ -0,0 +1,168 @@ +/* +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" +) + +// LayoutHint - struct for LayoutHint +type LayoutHint struct { + ComponentHighlightMetricSection *ComponentHighlightMetricSection + MetricPerspectiveSection *MetricPerspectiveSection + MetricPerspectiveTab *MetricPerspectiveTab +} + +// ComponentHighlightMetricSectionAsLayoutHint is a convenience function that returns ComponentHighlightMetricSection wrapped in LayoutHint +func ComponentHighlightMetricSectionAsLayoutHint(v *ComponentHighlightMetricSection) LayoutHint { + return LayoutHint{ + ComponentHighlightMetricSection: v, + } +} + +// MetricPerspectiveSectionAsLayoutHint is a convenience function that returns MetricPerspectiveSection wrapped in LayoutHint +func MetricPerspectiveSectionAsLayoutHint(v *MetricPerspectiveSection) LayoutHint { + return LayoutHint{ + MetricPerspectiveSection: v, + } +} + +// MetricPerspectiveTabAsLayoutHint is a convenience function that returns MetricPerspectiveTab wrapped in LayoutHint +func MetricPerspectiveTabAsLayoutHint(v *MetricPerspectiveTab) LayoutHint { + return LayoutHint{ + MetricPerspectiveTab: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *LayoutHint) 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 'ComponentHighlightMetricSection' + if jsonDict["_type"] == "ComponentHighlightMetricSection" { + // try to unmarshal JSON data into ComponentHighlightMetricSection + err = json.Unmarshal(data, &dst.ComponentHighlightMetricSection) + if err == nil { + return nil // data stored in dst.ComponentHighlightMetricSection, return on the first match + } else { + dst.ComponentHighlightMetricSection = nil + return fmt.Errorf("Failed to unmarshal LayoutHint as ComponentHighlightMetricSection: %s", err.Error()) + } + } + + // check if the discriminator value is 'MetricPerspectiveSection' + if jsonDict["_type"] == "MetricPerspectiveSection" { + // try to unmarshal JSON data into MetricPerspectiveSection + err = json.Unmarshal(data, &dst.MetricPerspectiveSection) + if err == nil { + return nil // data stored in dst.MetricPerspectiveSection, return on the first match + } else { + dst.MetricPerspectiveSection = nil + return fmt.Errorf("Failed to unmarshal LayoutHint as MetricPerspectiveSection: %s", err.Error()) + } + } + + // check if the discriminator value is 'MetricPerspectiveTab' + if jsonDict["_type"] == "MetricPerspectiveTab" { + // try to unmarshal JSON data into MetricPerspectiveTab + err = json.Unmarshal(data, &dst.MetricPerspectiveTab) + if err == nil { + return nil // data stored in dst.MetricPerspectiveTab, return on the first match + } else { + dst.MetricPerspectiveTab = nil + return fmt.Errorf("Failed to unmarshal LayoutHint as MetricPerspectiveTab: %s", err.Error()) + } + } + + return nil +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src LayoutHint) MarshalJSON() ([]byte, error) { + if src.ComponentHighlightMetricSection != nil { + return json.Marshal(&src.ComponentHighlightMetricSection) + } + + if src.MetricPerspectiveSection != nil { + return json.Marshal(&src.MetricPerspectiveSection) + } + + if src.MetricPerspectiveTab != nil { + return json.Marshal(&src.MetricPerspectiveTab) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *LayoutHint) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.ComponentHighlightMetricSection != nil { + return obj.ComponentHighlightMetricSection + } + + if obj.MetricPerspectiveSection != nil { + return obj.MetricPerspectiveSection + } + + if obj.MetricPerspectiveTab != nil { + return obj.MetricPerspectiveTab + } + + // all schemas are nil + return nil +} + +type NullableLayoutHint struct { + value *LayoutHint + isSet bool +} + +func (v NullableLayoutHint) Get() *LayoutHint { + return v.value +} + +func (v *NullableLayoutHint) Set(val *LayoutHint) { + v.value = val + v.isSet = true +} + +func (v NullableLayoutHint) IsSet() bool { + return v.isSet +} + +func (v *NullableLayoutHint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLayoutHint(val *LayoutHint) *NullableLayoutHint { + return &NullableLayoutHint{value: val, isSet: true} +} + +func (v NullableLayoutHint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLayoutHint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_layout_list.go b/generated/stackstate_api/model_layout_list.go new file mode 100644 index 00000000..4ca37bc8 --- /dev/null +++ b/generated/stackstate_api/model_layout_list.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" +) + +// LayoutList struct for LayoutList +type LayoutList struct { + Layouts []LayoutHint `json:"layouts"` +} + +// NewLayoutList instantiates a new LayoutList 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 NewLayoutList(layouts []LayoutHint) *LayoutList { + this := LayoutList{} + this.Layouts = layouts + return &this +} + +// NewLayoutListWithDefaults instantiates a new LayoutList 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 NewLayoutListWithDefaults() *LayoutList { + this := LayoutList{} + return &this +} + +// GetLayouts returns the Layouts field value +func (o *LayoutList) GetLayouts() []LayoutHint { + if o == nil { + var ret []LayoutHint + return ret + } + + return o.Layouts +} + +// GetLayoutsOk returns a tuple with the Layouts field value +// and a boolean to check if the value has been set. +func (o *LayoutList) GetLayoutsOk() ([]LayoutHint, bool) { + if o == nil { + return nil, false + } + return o.Layouts, true +} + +// SetLayouts sets field value +func (o *LayoutList) SetLayouts(v []LayoutHint) { + o.Layouts = v +} + +func (o LayoutList) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["layouts"] = o.Layouts + } + return json.Marshal(toSerialize) +} + +type NullableLayoutList struct { + value *LayoutList + isSet bool +} + +func (v NullableLayoutList) Get() *LayoutList { + return v.value +} + +func (v *NullableLayoutList) Set(val *LayoutList) { + v.value = val + v.isSet = true +} + +func (v NullableLayoutList) IsSet() bool { + return v.isSet +} + +func (v *NullableLayoutList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLayoutList(val *LayoutList) *NullableLayoutList { + return &NullableLayoutList{value: val, isSet: true} +} + +func (v NullableLayoutList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLayoutList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_message.go b/generated/stackstate_api/model_message.go index 94aa9c5d..d819c57d 100644 --- a/generated/stackstate_api/model_message.go +++ b/generated/stackstate_api/model_message.go @@ -19,7 +19,7 @@ import ( type Message struct { Key string `json:"key"` Partition int32 `json:"partition"` - Offset int32 `json:"offset"` + Offset int64 `json:"offset"` Message map[string]interface{} `json:"message"` } @@ -27,7 +27,7 @@ type Message struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewMessage(key string, partition int32, offset int32, message map[string]interface{}) *Message { +func NewMessage(key string, partition int32, offset int64, message map[string]interface{}) *Message { this := Message{} this.Key = key this.Partition = partition @@ -93,9 +93,9 @@ func (o *Message) SetPartition(v int32) { } // GetOffset returns the Offset field value -func (o *Message) GetOffset() int32 { +func (o *Message) GetOffset() int64 { if o == nil { - var ret int32 + var ret int64 return ret } @@ -104,7 +104,7 @@ func (o *Message) GetOffset() int32 { // GetOffsetOk returns a tuple with the Offset field value // and a boolean to check if the value has been set. -func (o *Message) GetOffsetOk() (*int32, bool) { +func (o *Message) GetOffsetOk() (*int64, bool) { if o == nil { return nil, false } @@ -112,7 +112,7 @@ func (o *Message) GetOffsetOk() (*int32, bool) { } // SetOffset sets field value -func (o *Message) SetOffset(v int32) { +func (o *Message) SetOffset(v int64) { o.Offset = v } diff --git a/generated/stackstate_api/model_metric_perspective_section.go b/generated/stackstate_api/model_metric_perspective_section.go new file mode 100644 index 00000000..df48b165 --- /dev/null +++ b/generated/stackstate_api/model_metric_perspective_section.go @@ -0,0 +1,194 @@ +/* +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" +) + +// MetricPerspectiveSection struct for MetricPerspectiveSection +type MetricPerspectiveSection struct { + Name string `json:"name"` + Weight float32 `json:"weight"` + Type string `json:"_type"` + Tab string `json:"tab"` +} + +// NewMetricPerspectiveSection instantiates a new MetricPerspectiveSection 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 NewMetricPerspectiveSection(name string, weight float32, type_ string, tab string) *MetricPerspectiveSection { + this := MetricPerspectiveSection{} + this.Name = name + this.Weight = weight + this.Type = type_ + this.Tab = tab + return &this +} + +// NewMetricPerspectiveSectionWithDefaults instantiates a new MetricPerspectiveSection 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 NewMetricPerspectiveSectionWithDefaults() *MetricPerspectiveSection { + this := MetricPerspectiveSection{} + return &this +} + +// GetName returns the Name field value +func (o *MetricPerspectiveSection) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *MetricPerspectiveSection) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *MetricPerspectiveSection) SetName(v string) { + o.Name = v +} + +// GetWeight returns the Weight field value +func (o *MetricPerspectiveSection) GetWeight() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.Weight +} + +// GetWeightOk returns a tuple with the Weight field value +// and a boolean to check if the value has been set. +func (o *MetricPerspectiveSection) GetWeightOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.Weight, true +} + +// SetWeight sets field value +func (o *MetricPerspectiveSection) SetWeight(v float32) { + o.Weight = v +} + +// GetType returns the Type field value +func (o *MetricPerspectiveSection) 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 *MetricPerspectiveSection) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *MetricPerspectiveSection) SetType(v string) { + o.Type = v +} + +// GetTab returns the Tab field value +func (o *MetricPerspectiveSection) GetTab() string { + if o == nil { + var ret string + return ret + } + + return o.Tab +} + +// GetTabOk returns a tuple with the Tab field value +// and a boolean to check if the value has been set. +func (o *MetricPerspectiveSection) GetTabOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Tab, true +} + +// SetTab sets field value +func (o *MetricPerspectiveSection) SetTab(v string) { + o.Tab = v +} + +func (o MetricPerspectiveSection) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["name"] = o.Name + } + if true { + toSerialize["weight"] = o.Weight + } + if true { + toSerialize["_type"] = o.Type + } + if true { + toSerialize["tab"] = o.Tab + } + return json.Marshal(toSerialize) +} + +type NullableMetricPerspectiveSection struct { + value *MetricPerspectiveSection + isSet bool +} + +func (v NullableMetricPerspectiveSection) Get() *MetricPerspectiveSection { + return v.value +} + +func (v *NullableMetricPerspectiveSection) Set(val *MetricPerspectiveSection) { + v.value = val + v.isSet = true +} + +func (v NullableMetricPerspectiveSection) IsSet() bool { + return v.isSet +} + +func (v *NullableMetricPerspectiveSection) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMetricPerspectiveSection(val *MetricPerspectiveSection) *NullableMetricPerspectiveSection { + return &NullableMetricPerspectiveSection{value: val, isSet: true} +} + +func (v NullableMetricPerspectiveSection) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMetricPerspectiveSection) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_metric_perspective_section_all_of.go b/generated/stackstate_api/model_metric_perspective_section_all_of.go new file mode 100644 index 00000000..b6e389c5 --- /dev/null +++ b/generated/stackstate_api/model_metric_perspective_section_all_of.go @@ -0,0 +1,136 @@ +/* +StackState API + +This API documentation page describes the StackState server API. The StackState UI and CLI use the StackState server API to configure and query StackState. You can use the API for similar purposes. Each request sent to the StackState server API must be authenticated using one of the available authentication methods. *Note that the StackState receiver API, used to send topology, telemetry and traces to StackState, is not described on this page and requires a different authentication method.* For more information on StackState, refer to the [StackState documentation](https://docs.stackstate.com). + +API version: 5.2.0 +Contact: info@stackstate.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package stackstate_api + +import ( + "encoding/json" +) + +// MetricPerspectiveSectionAllOf struct for MetricPerspectiveSectionAllOf +type MetricPerspectiveSectionAllOf struct { + Type string `json:"_type"` + Tab string `json:"tab"` +} + +// NewMetricPerspectiveSectionAllOf instantiates a new MetricPerspectiveSectionAllOf 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 NewMetricPerspectiveSectionAllOf(type_ string, tab string) *MetricPerspectiveSectionAllOf { + this := MetricPerspectiveSectionAllOf{} + this.Type = type_ + this.Tab = tab + return &this +} + +// NewMetricPerspectiveSectionAllOfWithDefaults instantiates a new MetricPerspectiveSectionAllOf 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 NewMetricPerspectiveSectionAllOfWithDefaults() *MetricPerspectiveSectionAllOf { + this := MetricPerspectiveSectionAllOf{} + return &this +} + +// GetType returns the Type field value +func (o *MetricPerspectiveSectionAllOf) 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 *MetricPerspectiveSectionAllOf) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *MetricPerspectiveSectionAllOf) SetType(v string) { + o.Type = v +} + +// GetTab returns the Tab field value +func (o *MetricPerspectiveSectionAllOf) GetTab() string { + if o == nil { + var ret string + return ret + } + + return o.Tab +} + +// GetTabOk returns a tuple with the Tab field value +// and a boolean to check if the value has been set. +func (o *MetricPerspectiveSectionAllOf) GetTabOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Tab, true +} + +// SetTab sets field value +func (o *MetricPerspectiveSectionAllOf) SetTab(v string) { + o.Tab = v +} + +func (o MetricPerspectiveSectionAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["_type"] = o.Type + } + if true { + toSerialize["tab"] = o.Tab + } + return json.Marshal(toSerialize) +} + +type NullableMetricPerspectiveSectionAllOf struct { + value *MetricPerspectiveSectionAllOf + isSet bool +} + +func (v NullableMetricPerspectiveSectionAllOf) Get() *MetricPerspectiveSectionAllOf { + return v.value +} + +func (v *NullableMetricPerspectiveSectionAllOf) Set(val *MetricPerspectiveSectionAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableMetricPerspectiveSectionAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableMetricPerspectiveSectionAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMetricPerspectiveSectionAllOf(val *MetricPerspectiveSectionAllOf) *NullableMetricPerspectiveSectionAllOf { + return &NullableMetricPerspectiveSectionAllOf{value: val, isSet: true} +} + +func (v NullableMetricPerspectiveSectionAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMetricPerspectiveSectionAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_metric_perspective_tab.go b/generated/stackstate_api/model_metric_perspective_tab.go new file mode 100644 index 00000000..92678cae --- /dev/null +++ b/generated/stackstate_api/model_metric_perspective_tab.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" +) + +// MetricPerspectiveTab struct for MetricPerspectiveTab +type MetricPerspectiveTab struct { + Name string `json:"name"` + Weight float32 `json:"weight"` + Type string `json:"_type"` +} + +// NewMetricPerspectiveTab instantiates a new MetricPerspectiveTab 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 NewMetricPerspectiveTab(name string, weight float32, type_ string) *MetricPerspectiveTab { + this := MetricPerspectiveTab{} + this.Name = name + this.Weight = weight + this.Type = type_ + return &this +} + +// NewMetricPerspectiveTabWithDefaults instantiates a new MetricPerspectiveTab 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 NewMetricPerspectiveTabWithDefaults() *MetricPerspectiveTab { + this := MetricPerspectiveTab{} + return &this +} + +// GetName returns the Name field value +func (o *MetricPerspectiveTab) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *MetricPerspectiveTab) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *MetricPerspectiveTab) SetName(v string) { + o.Name = v +} + +// GetWeight returns the Weight field value +func (o *MetricPerspectiveTab) GetWeight() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.Weight +} + +// GetWeightOk returns a tuple with the Weight field value +// and a boolean to check if the value has been set. +func (o *MetricPerspectiveTab) GetWeightOk() (*float32, bool) { + if o == nil { + return nil, false + } + return &o.Weight, true +} + +// SetWeight sets field value +func (o *MetricPerspectiveTab) SetWeight(v float32) { + o.Weight = v +} + +// GetType returns the Type field value +func (o *MetricPerspectiveTab) 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 *MetricPerspectiveTab) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *MetricPerspectiveTab) SetType(v string) { + o.Type = v +} + +func (o MetricPerspectiveTab) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["name"] = o.Name + } + if true { + toSerialize["weight"] = o.Weight + } + if true { + toSerialize["_type"] = o.Type + } + return json.Marshal(toSerialize) +} + +type NullableMetricPerspectiveTab struct { + value *MetricPerspectiveTab + isSet bool +} + +func (v NullableMetricPerspectiveTab) Get() *MetricPerspectiveTab { + return v.value +} + +func (v *NullableMetricPerspectiveTab) Set(val *MetricPerspectiveTab) { + v.value = val + v.isSet = true +} + +func (v NullableMetricPerspectiveTab) IsSet() bool { + return v.isSet +} + +func (v *NullableMetricPerspectiveTab) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMetricPerspectiveTab(val *MetricPerspectiveTab) *NullableMetricPerspectiveTab { + return &NullableMetricPerspectiveTab{value: val, isSet: true} +} + +func (v NullableMetricPerspectiveTab) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMetricPerspectiveTab) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_metric_perspective_tab_all_of.go b/generated/stackstate_api/model_metric_perspective_tab_all_of.go new file mode 100644 index 00000000..10e87c79 --- /dev/null +++ b/generated/stackstate_api/model_metric_perspective_tab_all_of.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" +) + +// MetricPerspectiveTabAllOf struct for MetricPerspectiveTabAllOf +type MetricPerspectiveTabAllOf struct { + Type string `json:"_type"` +} + +// NewMetricPerspectiveTabAllOf instantiates a new MetricPerspectiveTabAllOf 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 NewMetricPerspectiveTabAllOf(type_ string) *MetricPerspectiveTabAllOf { + this := MetricPerspectiveTabAllOf{} + this.Type = type_ + return &this +} + +// NewMetricPerspectiveTabAllOfWithDefaults instantiates a new MetricPerspectiveTabAllOf 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 NewMetricPerspectiveTabAllOfWithDefaults() *MetricPerspectiveTabAllOf { + this := MetricPerspectiveTabAllOf{} + return &this +} + +// GetType returns the Type field value +func (o *MetricPerspectiveTabAllOf) 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 *MetricPerspectiveTabAllOf) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *MetricPerspectiveTabAllOf) SetType(v string) { + o.Type = v +} + +func (o MetricPerspectiveTabAllOf) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["_type"] = o.Type + } + return json.Marshal(toSerialize) +} + +type NullableMetricPerspectiveTabAllOf struct { + value *MetricPerspectiveTabAllOf + isSet bool +} + +func (v NullableMetricPerspectiveTabAllOf) Get() *MetricPerspectiveTabAllOf { + return v.value +} + +func (v *NullableMetricPerspectiveTabAllOf) Set(val *MetricPerspectiveTabAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableMetricPerspectiveTabAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableMetricPerspectiveTabAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMetricPerspectiveTabAllOf(val *MetricPerspectiveTabAllOf) *NullableMetricPerspectiveTabAllOf { + return &NullableMetricPerspectiveTabAllOf{value: val, isSet: true} +} + +func (v NullableMetricPerspectiveTabAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMetricPerspectiveTabAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_monitor_check_states.go b/generated/stackstate_api/model_monitor_check_states.go new file mode 100644 index 00000000..6482a3aa --- /dev/null +++ b/generated/stackstate_api/model_monitor_check_states.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" +) + +// MonitorCheckStates struct for MonitorCheckStates +type MonitorCheckStates struct { + States []ViewCheckState `json:"states"` +} + +// NewMonitorCheckStates instantiates a new MonitorCheckStates 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 NewMonitorCheckStates(states []ViewCheckState) *MonitorCheckStates { + this := MonitorCheckStates{} + this.States = states + return &this +} + +// NewMonitorCheckStatesWithDefaults instantiates a new MonitorCheckStates 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 NewMonitorCheckStatesWithDefaults() *MonitorCheckStates { + this := MonitorCheckStates{} + return &this +} + +// GetStates returns the States field value +func (o *MonitorCheckStates) GetStates() []ViewCheckState { + if o == nil { + var ret []ViewCheckState + return ret + } + + return o.States +} + +// GetStatesOk returns a tuple with the States field value +// and a boolean to check if the value has been set. +func (o *MonitorCheckStates) GetStatesOk() ([]ViewCheckState, bool) { + if o == nil { + return nil, false + } + return o.States, true +} + +// SetStates sets field value +func (o *MonitorCheckStates) SetStates(v []ViewCheckState) { + o.States = v +} + +func (o MonitorCheckStates) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["states"] = o.States + } + return json.Marshal(toSerialize) +} + +type NullableMonitorCheckStates struct { + value *MonitorCheckStates + isSet bool +} + +func (v NullableMonitorCheckStates) Get() *MonitorCheckStates { + return v.value +} + +func (v *NullableMonitorCheckStates) Set(val *MonitorCheckStates) { + v.value = val + v.isSet = true +} + +func (v NullableMonitorCheckStates) IsSet() bool { + return v.isSet +} + +func (v *NullableMonitorCheckStates) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMonitorCheckStates(val *MonitorCheckStates) *NullableMonitorCheckStates { + return &NullableMonitorCheckStates{value: val, isSet: true} +} + +func (v NullableMonitorCheckStates) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMonitorCheckStates) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_span_component.go b/generated/stackstate_api/model_span_component.go index c6e293f1..4df578da 100644 --- a/generated/stackstate_api/model_span_component.go +++ b/generated/stackstate_api/model_span_component.go @@ -17,22 +17,24 @@ import ( // SpanComponent struct for SpanComponent type SpanComponent struct { - Id int64 `json:"id"` - Identifier string `json:"identifier"` - Name string `json:"name"` - Type string `json:"type"` + Id int64 `json:"id"` + Identifier string `json:"identifier"` + Name string `json:"name"` + Type string `json:"type"` + HealthState HealthStateValue `json:"healthState"` } // NewSpanComponent instantiates a new SpanComponent 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 NewSpanComponent(id int64, identifier string, name string, type_ string) *SpanComponent { +func NewSpanComponent(id int64, identifier string, name string, type_ string, healthState HealthStateValue) *SpanComponent { this := SpanComponent{} this.Id = id this.Identifier = identifier this.Name = name this.Type = type_ + this.HealthState = healthState return &this } @@ -140,6 +142,30 @@ func (o *SpanComponent) SetType(v string) { o.Type = v } +// GetHealthState returns the HealthState field value +func (o *SpanComponent) GetHealthState() HealthStateValue { + if o == nil { + var ret HealthStateValue + return ret + } + + return o.HealthState +} + +// GetHealthStateOk returns a tuple with the HealthState field value +// and a boolean to check if the value has been set. +func (o *SpanComponent) GetHealthStateOk() (*HealthStateValue, bool) { + if o == nil { + return nil, false + } + return &o.HealthState, true +} + +// SetHealthState sets field value +func (o *SpanComponent) SetHealthState(v HealthStateValue) { + o.HealthState = v +} + func (o SpanComponent) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { @@ -154,6 +180,9 @@ func (o SpanComponent) MarshalJSON() ([]byte, error) { if true { toSerialize["type"] = o.Type } + if true { + toSerialize["healthState"] = o.HealthState + } return json.Marshal(toSerialize) } diff --git a/generated/stackstate_api/model_span_summary.go b/generated/stackstate_api/model_span_summary.go new file mode 100644 index 00000000..d950024a --- /dev/null +++ b/generated/stackstate_api/model_span_summary.go @@ -0,0 +1,352 @@ +/* +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" +) + +// SpanSummary struct for SpanSummary +type SpanSummary struct { + StartTime InstantNanoPrecision `json:"startTime"` + EndTime InstantNanoPrecision `json:"endTime"` + // Duration of the span in nanoseconds + DurationNanos int64 `json:"durationNanos"` + // The unique identifier for the trace, all spans of the same trace share the same trace_id + TraceId string `json:"traceId"` + // The unique identifier of the span within the trace + SpanId string `json:"spanId"` + // The id of the parent span of this span. Empty if this is the root span + ParentSpanId *string `json:"parentSpanId,omitempty"` + // A description of the span's operation. For example, the name can be a qualified method name or a file name and a line number where the operation is called + SpanName string `json:"spanName"` + // Logical name of the service for the span + ServiceName string `json:"serviceName"` + StatusCode StatusCode `json:"statusCode"` +} + +// NewSpanSummary instantiates a new SpanSummary 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 NewSpanSummary(startTime InstantNanoPrecision, endTime InstantNanoPrecision, durationNanos int64, traceId string, spanId string, spanName string, serviceName string, statusCode StatusCode) *SpanSummary { + this := SpanSummary{} + this.StartTime = startTime + this.EndTime = endTime + this.DurationNanos = durationNanos + this.TraceId = traceId + this.SpanId = spanId + this.SpanName = spanName + this.ServiceName = serviceName + this.StatusCode = statusCode + return &this +} + +// NewSpanSummaryWithDefaults instantiates a new SpanSummary 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 NewSpanSummaryWithDefaults() *SpanSummary { + this := SpanSummary{} + return &this +} + +// GetStartTime returns the StartTime field value +func (o *SpanSummary) GetStartTime() InstantNanoPrecision { + if o == nil { + var ret InstantNanoPrecision + 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 *SpanSummary) GetStartTimeOk() (*InstantNanoPrecision, bool) { + if o == nil { + return nil, false + } + return &o.StartTime, true +} + +// SetStartTime sets field value +func (o *SpanSummary) SetStartTime(v InstantNanoPrecision) { + o.StartTime = v +} + +// GetEndTime returns the EndTime field value +func (o *SpanSummary) GetEndTime() InstantNanoPrecision { + if o == nil { + var ret InstantNanoPrecision + return ret + } + + return o.EndTime +} + +// GetEndTimeOk returns a tuple with the EndTime field value +// and a boolean to check if the value has been set. +func (o *SpanSummary) GetEndTimeOk() (*InstantNanoPrecision, bool) { + if o == nil { + return nil, false + } + return &o.EndTime, true +} + +// SetEndTime sets field value +func (o *SpanSummary) SetEndTime(v InstantNanoPrecision) { + o.EndTime = v +} + +// GetDurationNanos returns the DurationNanos field value +func (o *SpanSummary) GetDurationNanos() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.DurationNanos +} + +// GetDurationNanosOk returns a tuple with the DurationNanos field value +// and a boolean to check if the value has been set. +func (o *SpanSummary) GetDurationNanosOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.DurationNanos, true +} + +// SetDurationNanos sets field value +func (o *SpanSummary) SetDurationNanos(v int64) { + o.DurationNanos = v +} + +// GetTraceId returns the TraceId field value +func (o *SpanSummary) GetTraceId() string { + if o == nil { + var ret string + return ret + } + + return o.TraceId +} + +// GetTraceIdOk returns a tuple with the TraceId field value +// and a boolean to check if the value has been set. +func (o *SpanSummary) GetTraceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TraceId, true +} + +// SetTraceId sets field value +func (o *SpanSummary) SetTraceId(v string) { + o.TraceId = v +} + +// GetSpanId returns the SpanId field value +func (o *SpanSummary) GetSpanId() string { + if o == nil { + var ret string + return ret + } + + return o.SpanId +} + +// GetSpanIdOk returns a tuple with the SpanId field value +// and a boolean to check if the value has been set. +func (o *SpanSummary) GetSpanIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SpanId, true +} + +// SetSpanId sets field value +func (o *SpanSummary) SetSpanId(v string) { + o.SpanId = v +} + +// GetParentSpanId returns the ParentSpanId field value if set, zero value otherwise. +func (o *SpanSummary) GetParentSpanId() string { + if o == nil || o.ParentSpanId == nil { + var ret string + return ret + } + return *o.ParentSpanId +} + +// GetParentSpanIdOk returns a tuple with the ParentSpanId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SpanSummary) GetParentSpanIdOk() (*string, bool) { + if o == nil || o.ParentSpanId == nil { + return nil, false + } + return o.ParentSpanId, true +} + +// HasParentSpanId returns a boolean if a field has been set. +func (o *SpanSummary) HasParentSpanId() bool { + if o != nil && o.ParentSpanId != nil { + return true + } + + return false +} + +// SetParentSpanId gets a reference to the given string and assigns it to the ParentSpanId field. +func (o *SpanSummary) SetParentSpanId(v string) { + o.ParentSpanId = &v +} + +// GetSpanName returns the SpanName field value +func (o *SpanSummary) GetSpanName() string { + if o == nil { + var ret string + return ret + } + + return o.SpanName +} + +// GetSpanNameOk returns a tuple with the SpanName field value +// and a boolean to check if the value has been set. +func (o *SpanSummary) GetSpanNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SpanName, true +} + +// SetSpanName sets field value +func (o *SpanSummary) SetSpanName(v string) { + o.SpanName = v +} + +// GetServiceName returns the ServiceName field value +func (o *SpanSummary) GetServiceName() string { + if o == nil { + var ret string + return ret + } + + return o.ServiceName +} + +// GetServiceNameOk returns a tuple with the ServiceName field value +// and a boolean to check if the value has been set. +func (o *SpanSummary) GetServiceNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ServiceName, true +} + +// SetServiceName sets field value +func (o *SpanSummary) SetServiceName(v string) { + o.ServiceName = v +} + +// GetStatusCode returns the StatusCode field value +func (o *SpanSummary) GetStatusCode() StatusCode { + if o == nil { + var ret StatusCode + return ret + } + + return o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value +// and a boolean to check if the value has been set. +func (o *SpanSummary) GetStatusCodeOk() (*StatusCode, bool) { + if o == nil { + return nil, false + } + return &o.StatusCode, true +} + +// SetStatusCode sets field value +func (o *SpanSummary) SetStatusCode(v StatusCode) { + o.StatusCode = v +} + +func (o SpanSummary) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["startTime"] = o.StartTime + } + if true { + toSerialize["endTime"] = o.EndTime + } + if true { + toSerialize["durationNanos"] = o.DurationNanos + } + if true { + toSerialize["traceId"] = o.TraceId + } + if true { + toSerialize["spanId"] = o.SpanId + } + if o.ParentSpanId != nil { + toSerialize["parentSpanId"] = o.ParentSpanId + } + if true { + toSerialize["spanName"] = o.SpanName + } + if true { + toSerialize["serviceName"] = o.ServiceName + } + if true { + toSerialize["statusCode"] = o.StatusCode + } + return json.Marshal(toSerialize) +} + +type NullableSpanSummary struct { + value *SpanSummary + isSet bool +} + +func (v NullableSpanSummary) Get() *SpanSummary { + return v.value +} + +func (v *NullableSpanSummary) Set(val *SpanSummary) { + v.value = val + v.isSet = true +} + +func (v NullableSpanSummary) IsSet() bool { + return v.isSet +} + +func (v *NullableSpanSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSpanSummary(val *SpanSummary) *NullableSpanSummary { + return &NullableSpanSummary{value: val, isSet: true} +} + +func (v NullableSpanSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSpanSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/stackstate_api/model_spans.go b/generated/stackstate_api/model_spans.go index 8e3c04e8..ba51143e 100644 --- a/generated/stackstate_api/model_spans.go +++ b/generated/stackstate_api/model_spans.go @@ -18,7 +18,7 @@ import ( // Spans struct for Spans type Spans struct { // List of spans - Spans []Span `json:"spans"` + Spans []SpanSummary `json:"spans"` // Maximum number of the spans in the result. PageSize int32 `json:"pageSize"` // The requested page. @@ -31,7 +31,7 @@ type Spans struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewSpans(spans []Span, pageSize int32, page int32, matchesTotal int64) *Spans { +func NewSpans(spans []SpanSummary, pageSize int32, page int32, matchesTotal int64) *Spans { this := Spans{} this.Spans = spans this.PageSize = pageSize @@ -49,9 +49,9 @@ func NewSpansWithDefaults() *Spans { } // GetSpans returns the Spans field value -func (o *Spans) GetSpans() []Span { +func (o *Spans) GetSpans() []SpanSummary { if o == nil { - var ret []Span + var ret []SpanSummary return ret } @@ -60,7 +60,7 @@ func (o *Spans) GetSpans() []Span { // GetSpansOk returns a tuple with the Spans field value // and a boolean to check if the value has been set. -func (o *Spans) GetSpansOk() ([]Span, bool) { +func (o *Spans) GetSpansOk() ([]SpanSummary, bool) { if o == nil { return nil, false } @@ -68,7 +68,7 @@ func (o *Spans) GetSpansOk() ([]Span, bool) { } // SetSpans sets field value -func (o *Spans) SetSpans(v []Span) { +func (o *Spans) SetSpans(v []SpanSummary) { o.Spans = v } diff --git a/generated/stackstate_api/model_view_check_state.go b/generated/stackstate_api/model_view_check_state.go new file mode 100644 index 00000000..189ecd98 --- /dev/null +++ b/generated/stackstate_api/model_view_check_state.go @@ -0,0 +1,252 @@ +/* +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" +) + +// ViewCheckState struct for ViewCheckState +type ViewCheckState struct { + CheckStateId string `json:"checkStateId"` + HealthState HealthStateValue `json:"healthState"` + ComponentName string `json:"componentName"` + ComponentIdentifier string `json:"componentIdentifier"` + ComponentType string `json:"componentType"` + LastUpdateTimestamp int64 `json:"lastUpdateTimestamp"` +} + +// NewViewCheckState instantiates a new ViewCheckState 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 NewViewCheckState(checkStateId string, healthState HealthStateValue, componentName string, componentIdentifier string, componentType string, lastUpdateTimestamp int64) *ViewCheckState { + this := ViewCheckState{} + this.CheckStateId = checkStateId + this.HealthState = healthState + this.ComponentName = componentName + this.ComponentIdentifier = componentIdentifier + this.ComponentType = componentType + this.LastUpdateTimestamp = lastUpdateTimestamp + return &this +} + +// NewViewCheckStateWithDefaults instantiates a new ViewCheckState 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 NewViewCheckStateWithDefaults() *ViewCheckState { + this := ViewCheckState{} + return &this +} + +// GetCheckStateId returns the CheckStateId field value +func (o *ViewCheckState) GetCheckStateId() string { + if o == nil { + var ret string + return ret + } + + return o.CheckStateId +} + +// GetCheckStateIdOk returns a tuple with the CheckStateId field value +// and a boolean to check if the value has been set. +func (o *ViewCheckState) GetCheckStateIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CheckStateId, true +} + +// SetCheckStateId sets field value +func (o *ViewCheckState) SetCheckStateId(v string) { + o.CheckStateId = v +} + +// GetHealthState returns the HealthState field value +func (o *ViewCheckState) GetHealthState() HealthStateValue { + if o == nil { + var ret HealthStateValue + return ret + } + + return o.HealthState +} + +// GetHealthStateOk returns a tuple with the HealthState field value +// and a boolean to check if the value has been set. +func (o *ViewCheckState) GetHealthStateOk() (*HealthStateValue, bool) { + if o == nil { + return nil, false + } + return &o.HealthState, true +} + +// SetHealthState sets field value +func (o *ViewCheckState) SetHealthState(v HealthStateValue) { + o.HealthState = v +} + +// GetComponentName returns the ComponentName field value +func (o *ViewCheckState) GetComponentName() string { + if o == nil { + var ret string + return ret + } + + return o.ComponentName +} + +// GetComponentNameOk returns a tuple with the ComponentName field value +// and a boolean to check if the value has been set. +func (o *ViewCheckState) GetComponentNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ComponentName, true +} + +// SetComponentName sets field value +func (o *ViewCheckState) SetComponentName(v string) { + o.ComponentName = v +} + +// GetComponentIdentifier returns the ComponentIdentifier field value +func (o *ViewCheckState) 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 *ViewCheckState) GetComponentIdentifierOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ComponentIdentifier, true +} + +// SetComponentIdentifier sets field value +func (o *ViewCheckState) SetComponentIdentifier(v string) { + o.ComponentIdentifier = v +} + +// GetComponentType returns the ComponentType field value +func (o *ViewCheckState) GetComponentType() string { + if o == nil { + var ret string + return ret + } + + return o.ComponentType +} + +// GetComponentTypeOk returns a tuple with the ComponentType field value +// and a boolean to check if the value has been set. +func (o *ViewCheckState) GetComponentTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ComponentType, true +} + +// SetComponentType sets field value +func (o *ViewCheckState) SetComponentType(v string) { + o.ComponentType = v +} + +// GetLastUpdateTimestamp returns the LastUpdateTimestamp field value +func (o *ViewCheckState) GetLastUpdateTimestamp() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.LastUpdateTimestamp +} + +// GetLastUpdateTimestampOk returns a tuple with the LastUpdateTimestamp field value +// and a boolean to check if the value has been set. +func (o *ViewCheckState) GetLastUpdateTimestampOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.LastUpdateTimestamp, true +} + +// SetLastUpdateTimestamp sets field value +func (o *ViewCheckState) SetLastUpdateTimestamp(v int64) { + o.LastUpdateTimestamp = v +} + +func (o ViewCheckState) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if true { + toSerialize["checkStateId"] = o.CheckStateId + } + if true { + toSerialize["healthState"] = o.HealthState + } + if true { + toSerialize["componentName"] = o.ComponentName + } + if true { + toSerialize["componentIdentifier"] = o.ComponentIdentifier + } + if true { + toSerialize["componentType"] = o.ComponentType + } + if true { + toSerialize["lastUpdateTimestamp"] = o.LastUpdateTimestamp + } + return json.Marshal(toSerialize) +} + +type NullableViewCheckState struct { + value *ViewCheckState + isSet bool +} + +func (v NullableViewCheckState) Get() *ViewCheckState { + return v.value +} + +func (v *NullableViewCheckState) Set(val *ViewCheckState) { + v.value = val + v.isSet = true +} + +func (v NullableViewCheckState) IsSet() bool { + return v.isSet +} + +func (v *NullableViewCheckState) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableViewCheckState(val *ViewCheckState) *NullableViewCheckState { + return &NullableViewCheckState{value: val, isSet: true} +} + +func (v NullableViewCheckState) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableViewCheckState) 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 1ba62d17..9eff3103 100644 --- a/stackstate_openapi/openapi_version +++ b/stackstate_openapi/openapi_version @@ -1 +1 @@ -d0a704d0c61b11c0df739e300052a991e236d47c \ No newline at end of file +578b060b4ea5ceadc705b35475d726d72ddd2c94