From f349faefe16aaece3a1109d5a20a0e8031673262 Mon Sep 17 00:00:00 2001 From: Sherzod Karimov Date: Fri, 14 Apr 2023 10:47:08 -0400 Subject: [PATCH 1/2] fix failing tests --- tests/api/datadogV1/api_downtimes_test.go | 14 ++++++------- tests/api/datadogV1/api_hosts_test.go | 21 ++++++++++--------- .../api/datadogV2/api_dashboard_lists_test.go | 3 ++- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/tests/api/datadogV1/api_downtimes_test.go b/tests/api/datadogV1/api_downtimes_test.go index fc0d82da97f..b7551a7bcd7 100644 --- a/tests/api/datadogV1/api_downtimes_test.go +++ b/tests/api/datadogV1/api_downtimes_test.go @@ -26,7 +26,7 @@ func TestDowntimeLifecycle(t *testing.T) { start := tests.ClockFromContext(ctx).Now() testDowntime := datadogV1.Downtime{ - Message: tests.UniqueEntityName(ctx, t), + Message: *datadog.NewNullableString(tests.UniqueEntityName(ctx, t)), Start: datadog.PtrInt64(start.Unix()), End: *datadog.NewNullableInt64(datadog.PtrInt64(start.Unix() + 60*60)), Timezone: datadog.PtrString("Etc/UTC"), @@ -55,7 +55,7 @@ func TestDowntimeLifecycle(t *testing.T) { assert.Nil(val) // Edit a downtime - editedDowntime := datadogV1.Downtime{Message: datadog.PtrString(fmt.Sprintf("%s-updated", testDowntime.GetMessage()))} + editedDowntime := datadogV1.Downtime{Message: *datadog.NewNullableString(datadog.PtrString(fmt.Sprintf("%s-updated", testDowntime.GetMessage())))} updatedDowntime, httpresp, err := api.UpdateDowntime(ctx, downtime.GetId(), editedDowntime) if err != nil { t.Errorf("Error updating Downtime %v: Response %s: %v", downtime.GetId(), err.(datadog.GenericOpenAPIError).Body(), err) @@ -119,7 +119,7 @@ func TestMonitorDowntime(t *testing.T) { start := tests.ClockFromContext(ctx).Now() testDowntime := datadogV1.Downtime{ - Message: tests.UniqueEntityName(ctx, t), + Message: *datadog.NewNullableString(tests.UniqueEntityName(ctx, t)), Start: datadog.PtrInt64(start.Unix()), Timezone: datadog.PtrString("Etc/UTC"), Scope: []string{"*"}, @@ -151,17 +151,17 @@ func TestScopedDowntime(t *testing.T) { scopeGo := fmt.Sprintf("test:go-%s-%d", t.Name(), tests.ClockFromContext(ctx).Now().UnixNano()) testDowntimes := []datadogV1.Downtime{{ - Message: tests.UniqueEntityName(ctx, t), + Message: *datadog.NewNullableString(tests.UniqueEntityName(ctx, t)), Start: datadog.PtrInt64(start.Unix()), Timezone: datadog.PtrString("Etc/UTC"), Scope: []string{scopeClient, scopeGo}, }, { - Message: tests.UniqueEntityName(ctx, t), + Message: *datadog.NewNullableString(tests.UniqueEntityName(ctx, t)), Start: datadog.PtrInt64(start.Unix()), Timezone: datadog.PtrString("Etc/UTC"), Scope: []string{scopeGo}, }, { - Message: tests.UniqueEntityName(ctx, t), + Message: *datadog.NewNullableString(tests.UniqueEntityName(ctx, t)), Start: datadog.PtrInt64(start.Unix()), Timezone: datadog.PtrString("Etc/UTC"), Scope: []string{scopeClient}, @@ -271,7 +271,7 @@ func TestDowntimeRecurrence(t *testing.T) { api := datadogV1.NewDowntimesApi(Client(ctx)) testDowntime := datadogV1.Downtime{ - Message: datadog.PtrString(fmt.Sprintf("%s; %s", *tests.UniqueEntityName(ctx, t), name)), + Message: *datadog.NewNullableString(datadog.PtrString(fmt.Sprintf("%s; %s", *tests.UniqueEntityName(ctx, t), name))), Start: datadog.PtrInt64(start.Unix()), End: *datadog.NewNullableInt64(datadog.PtrInt64(start.Unix() + 60*60)), Timezone: datadog.PtrString("Etc/UTC"), diff --git a/tests/api/datadogV1/api_hosts_test.go b/tests/api/datadogV1/api_hosts_test.go index c65175f9170..ba88f6cc2c8 100644 --- a/tests/api/datadogV1/api_hosts_test.go +++ b/tests/api/datadogV1/api_hosts_test.go @@ -12,6 +12,7 @@ import ( "fmt" "os" "path/filepath" + "reflect" "testing" "time" @@ -20,7 +21,6 @@ import ( "github.com/DataDog/datadog-api-client-go/v2/tests" "gopkg.in/h2non/gock.v1" - is "gotest.tools/assert/cmp" ) func TestHosts(t *testing.T) { @@ -135,7 +135,7 @@ func TestHostTotalsMocked(t *testing.T) { t.Errorf("Failed to get host totals: %v", err) } assert.Equal(200, httpresp.StatusCode) - assert.True(is.DeepEqual(expected, hostListResp)().Success()) + assert.True(reflect.DeepEqual(expected, hostListResp)) } func TestHostsSearchMocked(t *testing.T) { @@ -180,7 +180,7 @@ func TestHostsSearchMocked(t *testing.T) { t.Errorf("Failed to get hosts: %v", err) } assert.Equal(200, httpresp.StatusCode) - assert.True(is.DeepEqual(expected, hostListResp)().Success()) + assert.True(reflect.DeepEqual(expected, hostListResp)) } func TestHostsListErrors(t *testing.T) { @@ -358,7 +358,7 @@ func TestHostsSearchMockedIncludeMutedHostsDataFalse(t *testing.T) { t.Errorf("Failed to get hosts: %v", err) } assert.Equal(200, httpresp.StatusCode) - assert.True(is.DeepEqual(expected, hostListResp)().Success()) + assert.True(reflect.DeepEqual(expected, hostListResp)) } func TestHostsSearchMockedIncludeMutedHostsDataTrue(t *testing.T) { @@ -406,7 +406,7 @@ func TestHostsSearchMockedIncludeMutedHostsDataTrue(t *testing.T) { t.Errorf("Failed to get hosts: %v", err) } assert.Equal(200, httpresp.StatusCode) - assert.True(is.DeepEqual(expected, hostListResp)().Success()) + assert.True(reflect.DeepEqual(expected, hostListResp)) } func TestHostsSearchMockedIncludeMutedHostsDataDefault(t *testing.T) { @@ -452,7 +452,7 @@ func TestHostsSearchMockedIncludeMutedHostsDataDefault(t *testing.T) { t.Errorf("Failed to get hosts: %v", err) } assert.Equal(200, httpresp.StatusCode) - assert.True(is.DeepEqual(expected, hostListResp)().Success()) + assert.True(reflect.DeepEqual(expected, hostListResp)) } func TestHostsSearchMockedIncludeHostsMetadataFalse(t *testing.T) { @@ -500,7 +500,7 @@ func TestHostsSearchMockedIncludeHostsMetadataFalse(t *testing.T) { t.Errorf("Failed to get hosts: %v", err) } assert.Equal(200, httpresp.StatusCode) - assert.True(is.DeepEqual(expected, hostListResp)().Success()) + assert.True(reflect.DeepEqual(expected, hostListResp)) } func TestHostsSearchMockedIncludeHostsMetadataTrue(t *testing.T) { @@ -548,7 +548,7 @@ func TestHostsSearchMockedIncludeHostsMetadataTrue(t *testing.T) { t.Errorf("Failed to get hosts: %v", err) } assert.Equal(200, httpresp.StatusCode) - assert.True(is.DeepEqual(expected, hostListResp)().Success()) + assert.True(reflect.DeepEqual(expected, hostListResp)) } func TestHostsSearchMockedIncludeHostsMetadataDefault(t *testing.T) { @@ -593,7 +593,7 @@ func TestHostsSearchMockedIncludeHostsMetadataDefault(t *testing.T) { t.Errorf("Failed to get hosts: %v", err) } assert.Equal(200, httpresp.StatusCode) - assert.True(is.DeepEqual(expected, hostListResp)().Success()) + assert.True(reflect.DeepEqual(expected, hostListResp)) } func TestHostsIncludeMutedHostsDataFunctional(t *testing.T) { @@ -710,5 +710,6 @@ func TestHostsIncludeMutedHostsDataFunctional(t *testing.T) { assert.Equal(int64(1), *hostListResp.TotalReturned) host = hostListResp.HostList[0] assert.False(*host.IsMuted) - assert.Nil(host.MuteTimeout) + muteTimeout, _ := host.GetMuteTimeoutOk() + assert.Nil(muteTimeout) } diff --git a/tests/api/datadogV2/api_dashboard_lists_test.go b/tests/api/datadogV2/api_dashboard_lists_test.go index e2a804d1a08..4223defca3a 100644 --- a/tests/api/datadogV2/api_dashboard_lists_test.go +++ b/tests/api/datadogV2/api_dashboard_lists_test.go @@ -166,7 +166,8 @@ func TestDashboardListItemCRUD(t *testing.T) { assert.NotNil(getResponse.GetDashboards()[0].Author) assert.NotNil(getResponse.GetDashboards()[0].Modified) assert.NotNil(getResponse.GetDashboards()[0].Created) - assert.Nil(getResponse.GetDashboards()[0].Icon) + icon, _ := getResponse.GetDashboards()[0].GetIconOk() + assert.Nil(icon) } func TestDashboardListGetItemsErrors(t *testing.T) { From 9af89f938cec8c56ade63ca9f47e2534ef6f903f Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 17 Apr 2023 18:09:06 +0000 Subject: [PATCH 2/2] Regenerate client from commit 25a92e6d of spec repo --- .apigentools-info | 8 +- .generator/schemas/v1/openapi.yaml | 62 ++ .generator/schemas/v2/openapi.yaml | 10 +- ...model_check_can_delete_monitor_response.go | 5 +- api/datadogV1/model_downtime.go | 35 +- api/datadogV1/model_downtime_child.go | 35 +- api/datadogV1/model_host.go | 63 ++- .../model_hourly_usage_attribution_body.go | 5 +- api/datadogV1/model_logs_list_response.go | 41 +- .../model_monthly_usage_attribution_body.go | 5 +- .../model_shared_dashboard_author.go | 39 +- ...odel_slo_correction_response_attributes.go | 105 ++-- api/datadogV1/model_slo_creator.go | 41 +- api/datadogV1/model_slo_history_monitor.go | 37 +- api/datadogV1/model_slo_history_response.go | 5 +- api/datadogV1/model_slo_history_sli_data.go | 72 ++- api/datadogV1/model_usage_attribution_body.go | 5 +- .../model_usage_ci_visibility_hour.go | 146 +++-- api/datadogV1/model_usage_cws_hour.go | 78 ++- api/datadogV1/model_usage_dbm_hour.go | 78 ++- api/datadogV1/model_usage_fargate_hour.go | 148 +++-- api/datadogV1/model_usage_host_hour.go | 535 ++++++++++++------ .../model_usage_incident_management_hour.go | 43 +- api/datadogV1/model_usage_lambda_hour.go | 78 ++- api/datadogV1/model_usage_logs_hour.go | 288 ++++++---- .../model_usage_online_archive_hour.go | 43 +- api/datadogV1/model_usage_profiling_hour.go | 78 ++- api/datadogV1/model_usage_rum_units_hour.go | 70 ++- api/datadogV1/model_usage_snmp_hour.go | 43 +- .../model_usage_synthetics_api_hour.go | 43 +- .../model_usage_synthetics_browser_hour.go | 43 +- .../model_usage_top_avg_metrics_pagination.go | 35 +- ...guration_rule_compliance_signal_options.go | 44 +- ..._security_agent_rule_creator_attributes.go | 39 +- ..._security_agent_rule_updater_attributes.go | 39 +- api/datadogV2/model_creator.go | 41 +- api/datadogV2/model_dashboard_list_item.go | 59 +- .../model_security_monitoring_triage_user.go | 43 +- api/datadogV2/model_team_attributes.go | 84 ++- examples/v1/downtimes/CreateDowntime.go | 2 +- .../v1/downtimes/CreateDowntime_1393233946.go | 2 +- .../v1/downtimes/CreateDowntime_2908359488.go | 2 +- .../v1/downtimes/CreateDowntime_3059354445.go | 2 +- .../v1/downtimes/CreateDowntime_3355644446.go | 2 +- examples/v1/downtimes/UpdateDowntime.go | 2 +- ...CreateSecurityMonitoringRule_1092490364.go | 2 +- .../UpdateSecurityMonitoringRule_428087276.go | 2 +- ..._details_returns_Not_Found_response.freeze | 2 +- ...es_details_returns_Not_Found_response.yaml | 470 +-------------- ...ing_rule_returns_Not_Found_response.freeze | 2 +- ...sting_rule_returns_Not_Found_response.yaml | 471 +-------------- .../scenarios/features/v1/dashboards.feature | 2 +- tests/scenarios/features/v1/events.feature | 2 +- tests/scenarios/features/v1/hosts.feature | 2 +- tests/scenarios/features/v1/metrics.feature | 2 +- .../features/v1/service_checks.feature | 2 +- .../scenarios/features/v1/synthetics.feature | 2 +- tests/scenarios/features/v2/audit.feature | 4 +- .../v2/ci_visibility_pipelines.feature | 4 +- .../features/v2/ci_visibility_tests.feature | 4 +- tests/scenarios/features/v2/events.feature | 4 +- tests/scenarios/features/v2/incidents.feature | 6 +- tests/scenarios/features/v2/logs.feature | 4 +- tests/scenarios/features/v2/metrics.feature | 16 +- tests/scenarios/features/v2/monitors.feature | 2 +- tests/scenarios/features/v2/processes.feature | 2 +- tests/scenarios/features/v2/rum.feature | 4 +- .../features/v2/security_monitoring.feature | 8 +- .../features/v2/service_definition.feature | 2 +- 69 files changed, 1821 insertions(+), 1883 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index a964caf4c9c..de3799bcceb 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.4", - "regenerated": "2023-04-17 14:56:12.223857", - "spec_repo_commit": "c9aa3e76" + "regenerated": "2023-04-17 18:07:40.313240", + "spec_repo_commit": "25a92e6d" }, "v2": { "apigentools_version": "1.6.4", - "regenerated": "2023-04-17 14:56:12.239075", - "spec_repo_commit": "c9aa3e76" + "regenerated": "2023-04-17 18:07:40.326034", + "spec_repo_commit": "25a92e6d" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index f54eca1bf49..f72f3264fbd 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -830,6 +830,7 @@ components: type: string type: array description: A mapping of Monitor ID to strings denoting where it's used. + nullable: true type: object required: - data @@ -1711,6 +1712,7 @@ components: Email notifications can be sent to specific users by using the same `@username` notation as events.' example: Message on the downtime + nullable: true type: string monitor_id: description: 'A single monitor to which the downtime applies. @@ -1846,6 +1848,7 @@ components: Email notifications can be sent to specific users by using the same `@username` notation as events.' example: Message on the downtime + nullable: true type: string monitor_id: description: 'A single monitor to which the downtime applies. @@ -3326,6 +3329,7 @@ components: mute_timeout: description: Timeout of the mute applied to your host. format: int64 + nullable: true type: integer name: description: The host name. @@ -5156,6 +5160,7 @@ components: description: 'Hash identifier of the next log to return in the list. This parameter is used for the pagination feature.' + nullable: true type: string status: description: Status of the response. @@ -9111,6 +9116,7 @@ components: created_at: description: The epoch timestamp of when the correction was created at. format: int64 + nullable: true type: integer creator: $ref: '#/components/schemas/Creator' @@ -9127,10 +9133,12 @@ components: end: description: Ending time of the correction in epoch seconds. format: int64 + nullable: true type: integer modified_at: description: The epoch timestamp of when the correction was modified at. format: int64 + nullable: true type: integer modifier: $ref: '#/components/schemas/SLOCorrectionResponseAttributesModifier' @@ -9241,6 +9249,7 @@ components: type: integer name: description: Name of the creator. + nullable: true type: string type: object SLODeleteResponse: @@ -9512,6 +9521,7 @@ components: description: The current SLI value of the SLO over the history window. example: 99.99 format: double + nullable: true type: number span_precision: description: The amount of decimal places the SLI value is accurate to for @@ -9536,6 +9546,7 @@ components: level objective. items: $ref: '#/components/schemas/SLOHistoryResponseError' + nullable: true type: array type: object SLOHistoryResponseData: @@ -9696,6 +9707,7 @@ components: description: The current SLI value of the SLO over the history window. example: 99.99 format: double + nullable: true type: number span_precision: description: The amount of decimal places the SLI value is accurate to for @@ -9708,6 +9720,7 @@ components: description: Use `sli_value` instead. example: 99.99 format: double + nullable: true type: number type: object SLOListResponse: @@ -11383,6 +11396,7 @@ components: type: string name: description: Name of the user who shared the dashboard. + nullable: true readOnly: true type: string readOnly: true @@ -15497,6 +15511,7 @@ components: configured for usage attribution](https://docs.datadoghq.com/account_management/billing/usage_attribution/#getting-started). In this scenario the API returns the total usage, not broken down by tags.' + nullable: true type: object UsageAttributionValues: description: Fields in Usage Summary by tag(s). @@ -16006,22 +16021,26 @@ components: ci_pipeline_indexed_spans: description: The number of spans for pipelines in the queried hour. format: int64 + nullable: true type: integer ci_test_indexed_spans: description: The number of spans for tests in the queried hour. format: int64 + nullable: true type: integer ci_visibility_pipeline_committers: description: Shows the total count of all active Git committers for Pipelines in the current month. A committer is active if they commit at least 3 times in a given month. format: int64 + nullable: true type: integer ci_visibility_test_committers: description: The total count of all active Git committers for tests in the current month. A committer is active if they commit at least 3 times in a given month. format: int64 + nullable: true type: integer org_name: description: The organization name. @@ -16047,11 +16066,13 @@ components: description: "The total number of Cloud Workload Security container hours from the start of the given hour\u2019s month until the given hour." format: int64 + nullable: true type: integer cws_host_count: description: "The total number of Cloud Workload Security host hours from the start of the given hour\u2019s month until the given hour." format: int64 + nullable: true type: integer hour: description: The hour for the usage. @@ -16209,11 +16230,13 @@ components: description: "The total number of Database Monitoring host hours from the start of the given hour\u2019s month until the given hour." format: int64 + nullable: true type: integer dbm_queries_count: description: "The total number of normalized Database Monitoring queries from the start of the given hour\u2019s month until the given hour." format: int64 + nullable: true type: integer hour: description: The hour for the usage. @@ -16243,15 +16266,18 @@ components: description: The high-water mark of APM ECS Fargate tasks during the given hour. format: int64 + nullable: true type: integer appsec_fargate_count: description: The Application Security Monitoring ECS Fargate tasks during the given hour. format: int64 + nullable: true type: integer avg_profiled_fargate_tasks: description: The average profiled task count for Fargate Profiling. format: int64 + nullable: true type: integer hour: description: The hour for the usage. @@ -16266,6 +16292,7 @@ components: tasks_count: description: The number of Fargate tasks run. format: int64 + nullable: true type: integer type: object UsageFargateResponse: @@ -16287,6 +16314,7 @@ components: during a given hour that were running the Datadog Agent.' format: int64 + nullable: true type: integer alibaba_host_count: description: 'Contains the total number of hosts that reported through Alibaba @@ -16294,17 +16322,20 @@ components: (and were NOT running the Datadog Agent).' format: int64 + nullable: true type: integer apm_azure_app_service_host_count: description: Contains the total number of Azure App Services hosts using APM. format: int64 + nullable: true type: integer apm_host_count: description: 'Shows the total number of hosts using APM during the hour, these are counted as billable (except during trial periods).' format: int64 + nullable: true type: integer aws_host_count: description: 'Contains the total number of hosts that reported through the @@ -16312,6 +16343,7 @@ components: (and were NOT running the Datadog Agent).' format: int64 + nullable: true type: integer azure_host_count: description: 'Contains the total number of hosts that reported through Azure @@ -16319,11 +16351,13 @@ components: (and were NOT running the Datadog Agent).' format: int64 + nullable: true type: integer container_count: description: Shows the total number of containers reported by the Docker integration during the hour. format: int64 + nullable: true type: integer gcp_host_count: description: 'Contains the total number of hosts that reported through the @@ -16331,11 +16365,13 @@ components: (and were NOT running the Datadog Agent).' format: int64 + nullable: true type: integer heroku_host_count: description: Contains the total number of Heroku dynos reported by the Datadog Agent. format: int64 + nullable: true type: integer host_count: description: 'Contains the total number of billable infrastructure hosts @@ -16343,10 +16379,12 @@ components: This is the sum of `agent_host_count`, `aws_host_count`, and `gcp_host_count`.' format: int64 + nullable: true type: integer hour: description: The hour for the usage. format: date-time + nullable: true type: string infra_azure_app_service: description: 'Contains the total number of hosts that reported through the @@ -16354,16 +16392,19 @@ components: (and were NOT running the Datadog Agent).' format: int64 + nullable: true type: integer opentelemetry_apm_host_count: description: Contains the total number of hosts using APM reported by Datadog exporter for the OpenTelemetry Collector. format: int64 + nullable: true type: integer opentelemetry_host_count: description: Contains the total number of hosts reported by Datadog exporter for the OpenTelemetry Collector. format: int64 + nullable: true type: integer org_name: description: The organization name. @@ -16377,6 +16418,7 @@ components: (and were NOT running the Datadog Agent).' format: int64 + nullable: true type: integer type: object UsageHostsResponse: @@ -16400,6 +16442,7 @@ components: description: Contains the total number monthly active users from the start of the given hour's month until the given hour. format: int64 + nullable: true type: integer org_name: description: The organization name. @@ -16512,6 +16555,7 @@ components: description: Contains the number of different functions for each region and AWS account. format: int64 + nullable: true type: integer hour: description: The hour for the usage. @@ -16520,6 +16564,7 @@ components: invocations_sum: description: Contains the sum of invocations of all functions. format: int64 + nullable: true type: integer org_name: description: The organization name. @@ -16625,6 +16670,7 @@ components: billable_ingested_bytes: description: Contains the number of billable log bytes ingested. format: int64 + nullable: true type: integer hour: description: The hour for the usage. @@ -16633,35 +16679,42 @@ components: indexed_events_count: description: Contains the number of log events indexed. format: int64 + nullable: true type: integer ingested_events_bytes: description: Contains the number of log bytes ingested. format: int64 + nullable: true type: integer logs_forwarding_events_bytes: description: Contains the number of logs forwarded bytes (data available as of April 1st 2023) format: int64 + nullable: true type: integer logs_live_indexed_count: description: Contains the number of live log events indexed (data available as of December 1, 2020). format: int64 + nullable: true type: integer logs_live_ingested_bytes: description: Contains the number of live log bytes ingested (data available as of December 1, 2020). format: int64 + nullable: true type: integer logs_rehydrated_indexed_count: description: Contains the number of rehydrated log events indexed (data available as of December 1, 2020). format: int64 + nullable: true type: integer logs_rehydrated_ingested_bytes: description: Contains the number of rehydrated log bytes ingested (data available as of December 1, 2020). format: int64 + nullable: true type: integer org_name: description: The organization name. @@ -16754,6 +16807,7 @@ components: online_archive_events_count: description: Total count of online archived events within the hour. format: int64 + nullable: true type: integer org_name: description: The organization name. @@ -16777,11 +16831,13 @@ components: avg_container_agent_count: description: Get average number of container agents for that hour. format: int64 + nullable: true type: integer host_count: description: Contains the total number of profiled hosts reporting during a given hour. format: int64 + nullable: true type: integer hour: description: The hour for the usage. @@ -16878,10 +16934,12 @@ components: browser_rum_units: description: The number of browser RUM units. format: int64 + nullable: true type: integer mobile_rum_units: description: The number of mobile RUM units. format: int64 + nullable: true type: integer org_name: description: The organization name. @@ -16976,6 +17034,7 @@ components: snmp_devices: description: Contains the number of SNMP devices. format: int64 + nullable: true type: integer type: object UsageSNMPResponse: @@ -18337,6 +18396,7 @@ components: check_calls_count: description: Contains the number of Synthetics API tests run. format: int64 + nullable: true type: integer hour: description: The hour for the usage. @@ -18366,6 +18426,7 @@ components: browser_check_calls_count: description: Contains the number of Synthetics Browser tests run. format: int64 + nullable: true type: integer hour: description: The hour for the usage. @@ -18503,6 +18564,7 @@ components: total_number_of_records: description: Total number of records. format: int64 + nullable: true type: integer type: object UsageTopAvgMetricsResponse: diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 6de67f4a321..f9461e78be2 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1948,11 +1948,13 @@ components: properties: userActivationStatus: description: Whether signals will be sent. + nullable: true type: boolean userGroupByFields: description: Fields to use to group findings by when sending signals. items: type: string + nullable: true type: array type: object CloudConfigurationRuleCreatePayload: @@ -2125,6 +2127,7 @@ components: name: description: The name of the user. example: Datadog User + nullable: true type: string type: object CloudWorkloadSecurityAgentRuleData: @@ -2200,6 +2203,7 @@ components: name: description: The name of the user. example: Datadog User + nullable: true type: string type: object CloudWorkloadSecurityAgentRulesListResponse: @@ -2698,6 +2702,7 @@ components: type: string name: description: Name of the creator. + nullable: true type: string type: object DashboardListAddItemsRequest: @@ -2748,6 +2753,7 @@ components: type: string icon: description: URL to the icon of the dashboard. + nullable: true readOnly: true type: string id: @@ -11506,6 +11512,7 @@ components: type: integer name: description: The name for this user account. + nullable: true type: string uuid: description: UUID assigned by Datadog to this user account. @@ -13164,6 +13171,7 @@ components: type: string description: description: Free-form markdown description/content for the team's homepage + nullable: true type: string handle: description: The team's identifier @@ -13188,6 +13196,7 @@ components: summary: description: A brief summary of the team, derived from the `description` maxLength: 120 + nullable: true type: string user_count: description: The number of users belonging to the team @@ -14180,7 +14189,6 @@ components: type: $ref: '#/components/schemas/UserTeamType' required: - - id - type type: object UserTeamUpdateRequest: diff --git a/api/datadogV1/model_check_can_delete_monitor_response.go b/api/datadogV1/model_check_can_delete_monitor_response.go index da0898568f0..d18f15e9ffb 100644 --- a/api/datadogV1/model_check_can_delete_monitor_response.go +++ b/api/datadogV1/model_check_can_delete_monitor_response.go @@ -61,9 +61,9 @@ func (o *CheckCanDeleteMonitorResponse) SetData(v CheckCanDeleteMonitorResponseD o.Data = v } -// GetErrors returns the Errors field value if set, zero value otherwise. +// GetErrors returns the Errors field value if set, zero value otherwise (both if not set or set to explicit null). func (o *CheckCanDeleteMonitorResponse) GetErrors() map[string][]string { - if o == nil || o.Errors == nil { + if o == nil { var ret map[string][]string return ret } @@ -72,6 +72,7 @@ func (o *CheckCanDeleteMonitorResponse) GetErrors() map[string][]string { // GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *CheckCanDeleteMonitorResponse) GetErrorsOk() (*map[string][]string, bool) { if o == nil || o.Errors == nil { return nil, false diff --git a/api/datadogV1/model_downtime.go b/api/datadogV1/model_downtime.go index f3216afa36f..72e2bbb9de0 100644 --- a/api/datadogV1/model_downtime.go +++ b/api/datadogV1/model_downtime.go @@ -37,7 +37,7 @@ type Downtime struct { Id *int64 `json:"id,omitempty"` // A message to include with notifications for this downtime. // Email notifications can be sent to specific users by using the same `@username` notation as events. - Message *string `json:"message,omitempty"` + Message datadog.NullableString `json:"message,omitempty"` // A single monitor to which the downtime applies. // If not provided, the downtime applies to all monitors. MonitorId datadog.NullableInt64 `json:"monitor_id,omitempty"` @@ -342,32 +342,43 @@ func (o *Downtime) SetId(v int64) { o.Id = &v } -// GetMessage returns the Message field value if set, zero value otherwise. +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Downtime) GetMessage() string { - if o == nil || o.Message == nil { + if o == nil || o.Message.Get() == nil { var ret string return ret } - return *o.Message + return *o.Message.Get() } // GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *Downtime) GetMessageOk() (*string, bool) { - if o == nil || o.Message == nil { + if o == nil { return nil, false } - return o.Message, true + return o.Message.Get(), o.Message.IsSet() } // HasMessage returns a boolean if a field has been set. func (o *Downtime) HasMessage() bool { - return o != nil && o.Message != nil + return o != nil && o.Message.IsSet() } -// SetMessage gets a reference to the given string and assigns it to the Message field. +// SetMessage gets a reference to the given datadog.NullableString and assigns it to the Message field. func (o *Downtime) SetMessage(v string) { - o.Message = &v + o.Message.Set(&v) +} + +// SetMessageNil sets the value for Message to be an explicit nil. +func (o *Downtime) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil. +func (o *Downtime) UnsetMessage() { + o.Message.Unset() } // GetMonitorId returns the MonitorId field value if set, zero value otherwise (both if not set or set to explicit null). @@ -696,8 +707,8 @@ func (o Downtime) MarshalJSON() ([]byte, error) { if o.Id != nil { toSerialize["id"] = o.Id } - if o.Message != nil { - toSerialize["message"] = o.Message + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() } if o.MonitorId.IsSet() { toSerialize["monitor_id"] = o.MonitorId.Get() @@ -745,7 +756,7 @@ func (o *Downtime) UnmarshalJSON(bytes []byte) (err error) { DowntimeType *int32 `json:"downtime_type,omitempty"` End datadog.NullableInt64 `json:"end,omitempty"` Id *int64 `json:"id,omitempty"` - Message *string `json:"message,omitempty"` + Message datadog.NullableString `json:"message,omitempty"` MonitorId datadog.NullableInt64 `json:"monitor_id,omitempty"` MonitorTags []string `json:"monitor_tags,omitempty"` MuteFirstRecoveryNotification *bool `json:"mute_first_recovery_notification,omitempty"` diff --git a/api/datadogV1/model_downtime_child.go b/api/datadogV1/model_downtime_child.go index cb27a21d822..7435d46d5d2 100644 --- a/api/datadogV1/model_downtime_child.go +++ b/api/datadogV1/model_downtime_child.go @@ -32,7 +32,7 @@ type DowntimeChild struct { Id *int64 `json:"id,omitempty"` // A message to include with notifications for this downtime. // Email notifications can be sent to specific users by using the same `@username` notation as events. - Message *string `json:"message,omitempty"` + Message datadog.NullableString `json:"message,omitempty"` // A single monitor to which the downtime applies. // If not provided, the downtime applies to all monitors. MonitorId datadog.NullableInt64 `json:"monitor_id,omitempty"` @@ -298,32 +298,43 @@ func (o *DowntimeChild) SetId(v int64) { o.Id = &v } -// GetMessage returns the Message field value if set, zero value otherwise. +// GetMessage returns the Message field value if set, zero value otherwise (both if not set or set to explicit null). func (o *DowntimeChild) GetMessage() string { - if o == nil || o.Message == nil { + if o == nil || o.Message.Get() == nil { var ret string return ret } - return *o.Message + return *o.Message.Get() } // GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *DowntimeChild) GetMessageOk() (*string, bool) { - if o == nil || o.Message == nil { + if o == nil { return nil, false } - return o.Message, true + return o.Message.Get(), o.Message.IsSet() } // HasMessage returns a boolean if a field has been set. func (o *DowntimeChild) HasMessage() bool { - return o != nil && o.Message != nil + return o != nil && o.Message.IsSet() } -// SetMessage gets a reference to the given string and assigns it to the Message field. +// SetMessage gets a reference to the given datadog.NullableString and assigns it to the Message field. func (o *DowntimeChild) SetMessage(v string) { - o.Message = &v + o.Message.Set(&v) +} + +// SetMessageNil sets the value for Message to be an explicit nil. +func (o *DowntimeChild) SetMessageNil() { + o.Message.Set(nil) +} + +// UnsetMessage ensures that no value is present for Message, not even an explicit nil. +func (o *DowntimeChild) UnsetMessage() { + o.Message.Unset() } // GetMonitorId returns the MonitorId field value if set, zero value otherwise (both if not set or set to explicit null). @@ -649,8 +660,8 @@ func (o DowntimeChild) MarshalJSON() ([]byte, error) { if o.Id != nil { toSerialize["id"] = o.Id } - if o.Message != nil { - toSerialize["message"] = o.Message + if o.Message.IsSet() { + toSerialize["message"] = o.Message.Get() } if o.MonitorId.IsSet() { toSerialize["monitor_id"] = o.MonitorId.Get() @@ -697,7 +708,7 @@ func (o *DowntimeChild) UnmarshalJSON(bytes []byte) (err error) { DowntimeType *int32 `json:"downtime_type,omitempty"` End datadog.NullableInt64 `json:"end,omitempty"` Id *int64 `json:"id,omitempty"` - Message *string `json:"message,omitempty"` + Message datadog.NullableString `json:"message,omitempty"` MonitorId datadog.NullableInt64 `json:"monitor_id,omitempty"` MonitorTags []string `json:"monitor_tags,omitempty"` MuteFirstRecoveryNotification *bool `json:"mute_first_recovery_notification,omitempty"` diff --git a/api/datadogV1/model_host.go b/api/datadogV1/model_host.go index ee83e9eb1f6..2e3a6859fa3 100644 --- a/api/datadogV1/model_host.go +++ b/api/datadogV1/model_host.go @@ -6,6 +6,8 @@ package datadogV1 import ( "encoding/json" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // Host Object representing a host. @@ -29,7 +31,7 @@ type Host struct { // Host Metrics collected. Metrics *HostMetrics `json:"metrics,omitempty"` // Timeout of the mute applied to your host. - MuteTimeout *int64 `json:"mute_timeout,omitempty"` + MuteTimeout datadog.NullableInt64 `json:"mute_timeout,omitempty"` // The host name. Name *string `json:"name,omitempty"` // Source or cloud provider associated with your host. @@ -312,32 +314,43 @@ func (o *Host) SetMetrics(v HostMetrics) { o.Metrics = &v } -// GetMuteTimeout returns the MuteTimeout field value if set, zero value otherwise. +// GetMuteTimeout returns the MuteTimeout field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Host) GetMuteTimeout() int64 { - if o == nil || o.MuteTimeout == nil { + if o == nil || o.MuteTimeout.Get() == nil { var ret int64 return ret } - return *o.MuteTimeout + return *o.MuteTimeout.Get() } // GetMuteTimeoutOk returns a tuple with the MuteTimeout field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *Host) GetMuteTimeoutOk() (*int64, bool) { - if o == nil || o.MuteTimeout == nil { + if o == nil { return nil, false } - return o.MuteTimeout, true + return o.MuteTimeout.Get(), o.MuteTimeout.IsSet() } // HasMuteTimeout returns a boolean if a field has been set. func (o *Host) HasMuteTimeout() bool { - return o != nil && o.MuteTimeout != nil + return o != nil && o.MuteTimeout.IsSet() } -// SetMuteTimeout gets a reference to the given int64 and assigns it to the MuteTimeout field. +// SetMuteTimeout gets a reference to the given datadog.NullableInt64 and assigns it to the MuteTimeout field. func (o *Host) SetMuteTimeout(v int64) { - o.MuteTimeout = &v + o.MuteTimeout.Set(&v) +} + +// SetMuteTimeoutNil sets the value for MuteTimeout to be an explicit nil. +func (o *Host) SetMuteTimeoutNil() { + o.MuteTimeout.Set(nil) +} + +// UnsetMuteTimeout ensures that no value is present for MuteTimeout, not even an explicit nil. +func (o *Host) UnsetMuteTimeout() { + o.MuteTimeout.Unset() } // GetName returns the Name field value if set, zero value otherwise. @@ -485,8 +498,8 @@ func (o Host) MarshalJSON() ([]byte, error) { if o.Metrics != nil { toSerialize["metrics"] = o.Metrics } - if o.MuteTimeout != nil { - toSerialize["mute_timeout"] = o.MuteTimeout + if o.MuteTimeout.IsSet() { + toSerialize["mute_timeout"] = o.MuteTimeout.Get() } if o.Name != nil { toSerialize["name"] = o.Name @@ -511,20 +524,20 @@ func (o Host) MarshalJSON() ([]byte, error) { func (o *Host) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - Aliases []string `json:"aliases,omitempty"` - Apps []string `json:"apps,omitempty"` - AwsName *string `json:"aws_name,omitempty"` - HostName *string `json:"host_name,omitempty"` - Id *int64 `json:"id,omitempty"` - IsMuted *bool `json:"is_muted,omitempty"` - LastReportedTime *int64 `json:"last_reported_time,omitempty"` - Meta *HostMeta `json:"meta,omitempty"` - Metrics *HostMetrics `json:"metrics,omitempty"` - MuteTimeout *int64 `json:"mute_timeout,omitempty"` - Name *string `json:"name,omitempty"` - Sources []string `json:"sources,omitempty"` - TagsBySource map[string][]string `json:"tags_by_source,omitempty"` - Up *bool `json:"up,omitempty"` + Aliases []string `json:"aliases,omitempty"` + Apps []string `json:"apps,omitempty"` + AwsName *string `json:"aws_name,omitempty"` + HostName *string `json:"host_name,omitempty"` + Id *int64 `json:"id,omitempty"` + IsMuted *bool `json:"is_muted,omitempty"` + LastReportedTime *int64 `json:"last_reported_time,omitempty"` + Meta *HostMeta `json:"meta,omitempty"` + Metrics *HostMetrics `json:"metrics,omitempty"` + MuteTimeout datadog.NullableInt64 `json:"mute_timeout,omitempty"` + Name *string `json:"name,omitempty"` + Sources []string `json:"sources,omitempty"` + TagsBySource map[string][]string `json:"tags_by_source,omitempty"` + Up *bool `json:"up,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV1/model_hourly_usage_attribution_body.go b/api/datadogV1/model_hourly_usage_attribution_body.go index 36f2f819500..356160dc7ce 100644 --- a/api/datadogV1/model_hourly_usage_attribution_body.go +++ b/api/datadogV1/model_hourly_usage_attribution_body.go @@ -195,9 +195,9 @@ func (o *HourlyUsageAttributionBody) SetTagConfigSource(v string) { o.TagConfigSource = &v } -// GetTags returns the Tags field value if set, zero value otherwise. +// GetTags returns the Tags field value if set, zero value otherwise (both if not set or set to explicit null). func (o *HourlyUsageAttributionBody) GetTags() map[string][]string { - if o == nil || o.Tags == nil { + if o == nil { var ret map[string][]string return ret } @@ -206,6 +206,7 @@ func (o *HourlyUsageAttributionBody) GetTags() map[string][]string { // GetTagsOk returns a tuple with the Tags field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *HourlyUsageAttributionBody) GetTagsOk() (*map[string][]string, bool) { if o == nil || o.Tags == nil { return nil, false diff --git a/api/datadogV1/model_logs_list_response.go b/api/datadogV1/model_logs_list_response.go index d78998cf909..e61577e1c34 100644 --- a/api/datadogV1/model_logs_list_response.go +++ b/api/datadogV1/model_logs_list_response.go @@ -6,6 +6,8 @@ package datadogV1 import ( "encoding/json" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // LogsListResponse Response object with all logs matching the request and pagination information. @@ -14,7 +16,7 @@ type LogsListResponse struct { Logs []Log `json:"logs,omitempty"` // Hash identifier of the next log to return in the list. // This parameter is used for the pagination feature. - NextLogId *string `json:"nextLogId,omitempty"` + NextLogId datadog.NullableString `json:"nextLogId,omitempty"` // Status of the response. Status *string `json:"status,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct @@ -67,32 +69,43 @@ func (o *LogsListResponse) SetLogs(v []Log) { o.Logs = v } -// GetNextLogId returns the NextLogId field value if set, zero value otherwise. +// GetNextLogId returns the NextLogId field value if set, zero value otherwise (both if not set or set to explicit null). func (o *LogsListResponse) GetNextLogId() string { - if o == nil || o.NextLogId == nil { + if o == nil || o.NextLogId.Get() == nil { var ret string return ret } - return *o.NextLogId + return *o.NextLogId.Get() } // GetNextLogIdOk returns a tuple with the NextLogId field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *LogsListResponse) GetNextLogIdOk() (*string, bool) { - if o == nil || o.NextLogId == nil { + if o == nil { return nil, false } - return o.NextLogId, true + return o.NextLogId.Get(), o.NextLogId.IsSet() } // HasNextLogId returns a boolean if a field has been set. func (o *LogsListResponse) HasNextLogId() bool { - return o != nil && o.NextLogId != nil + return o != nil && o.NextLogId.IsSet() } -// SetNextLogId gets a reference to the given string and assigns it to the NextLogId field. +// SetNextLogId gets a reference to the given datadog.NullableString and assigns it to the NextLogId field. func (o *LogsListResponse) SetNextLogId(v string) { - o.NextLogId = &v + o.NextLogId.Set(&v) +} + +// SetNextLogIdNil sets the value for NextLogId to be an explicit nil. +func (o *LogsListResponse) SetNextLogIdNil() { + o.NextLogId.Set(nil) +} + +// UnsetNextLogId ensures that no value is present for NextLogId, not even an explicit nil. +func (o *LogsListResponse) UnsetNextLogId() { + o.NextLogId.Unset() } // GetStatus returns the Status field value if set, zero value otherwise. @@ -132,8 +145,8 @@ func (o LogsListResponse) MarshalJSON() ([]byte, error) { if o.Logs != nil { toSerialize["logs"] = o.Logs } - if o.NextLogId != nil { - toSerialize["nextLogId"] = o.NextLogId + if o.NextLogId.IsSet() { + toSerialize["nextLogId"] = o.NextLogId.Get() } if o.Status != nil { toSerialize["status"] = o.Status @@ -149,9 +162,9 @@ func (o LogsListResponse) MarshalJSON() ([]byte, error) { func (o *LogsListResponse) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - Logs []Log `json:"logs,omitempty"` - NextLogId *string `json:"nextLogId,omitempty"` - Status *string `json:"status,omitempty"` + Logs []Log `json:"logs,omitempty"` + NextLogId datadog.NullableString `json:"nextLogId,omitempty"` + Status *string `json:"status,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV1/model_monthly_usage_attribution_body.go b/api/datadogV1/model_monthly_usage_attribution_body.go index e5ab5a670a3..a12e15b6f5a 100644 --- a/api/datadogV1/model_monthly_usage_attribution_body.go +++ b/api/datadogV1/model_monthly_usage_attribution_body.go @@ -193,9 +193,9 @@ func (o *MonthlyUsageAttributionBody) SetTagConfigSource(v string) { o.TagConfigSource = &v } -// GetTags returns the Tags field value if set, zero value otherwise. +// GetTags returns the Tags field value if set, zero value otherwise (both if not set or set to explicit null). func (o *MonthlyUsageAttributionBody) GetTags() map[string][]string { - if o == nil || o.Tags == nil { + if o == nil { var ret map[string][]string return ret } @@ -204,6 +204,7 @@ func (o *MonthlyUsageAttributionBody) GetTags() map[string][]string { // GetTagsOk returns a tuple with the Tags field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *MonthlyUsageAttributionBody) GetTagsOk() (*map[string][]string, bool) { if o == nil || o.Tags == nil { return nil, false diff --git a/api/datadogV1/model_shared_dashboard_author.go b/api/datadogV1/model_shared_dashboard_author.go index 60badec0a55..5f17489ed0c 100644 --- a/api/datadogV1/model_shared_dashboard_author.go +++ b/api/datadogV1/model_shared_dashboard_author.go @@ -6,6 +6,8 @@ package datadogV1 import ( "encoding/json" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // SharedDashboardAuthor User who shared the dashboard. @@ -13,7 +15,7 @@ type SharedDashboardAuthor struct { // Identifier of the user who shared the dashboard. Handle *string `json:"handle,omitempty"` // Name of the user who shared the dashboard. - Name *string `json:"name,omitempty"` + Name datadog.NullableString `json:"name,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} @@ -64,32 +66,43 @@ func (o *SharedDashboardAuthor) SetHandle(v string) { o.Handle = &v } -// GetName returns the Name field value if set, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SharedDashboardAuthor) GetName() string { - if o == nil || o.Name == nil { + if o == nil || o.Name.Get() == nil { var ret string return ret } - return *o.Name + return *o.Name.Get() } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *SharedDashboardAuthor) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil { return nil, false } - return o.Name, true + return o.Name.Get(), o.Name.IsSet() } // HasName returns a boolean if a field has been set. func (o *SharedDashboardAuthor) HasName() bool { - return o != nil && o.Name != nil + return o != nil && o.Name.IsSet() } -// SetName gets a reference to the given string and assigns it to the Name field. +// SetName gets a reference to the given datadog.NullableString and assigns it to the Name field. func (o *SharedDashboardAuthor) SetName(v string) { - o.Name = &v + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil. +func (o *SharedDashboardAuthor) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil. +func (o *SharedDashboardAuthor) UnsetName() { + o.Name.Unset() } // MarshalJSON serializes the struct using spec logic. @@ -101,8 +114,8 @@ func (o SharedDashboardAuthor) MarshalJSON() ([]byte, error) { if o.Handle != nil { toSerialize["handle"] = o.Handle } - if o.Name != nil { - toSerialize["name"] = o.Name + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() } for key, value := range o.AdditionalProperties { @@ -115,8 +128,8 @@ func (o SharedDashboardAuthor) MarshalJSON() ([]byte, error) { func (o *SharedDashboardAuthor) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - Handle *string `json:"handle,omitempty"` - Name *string `json:"name,omitempty"` + Handle *string `json:"handle,omitempty"` + Name datadog.NullableString `json:"name,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV1/model_slo_correction_response_attributes.go b/api/datadogV1/model_slo_correction_response_attributes.go index 528e5626d48..630d3cca1a9 100644 --- a/api/datadogV1/model_slo_correction_response_attributes.go +++ b/api/datadogV1/model_slo_correction_response_attributes.go @@ -15,7 +15,7 @@ type SLOCorrectionResponseAttributes struct { // Category the SLO correction belongs to. Category *SLOCorrectionCategory `json:"category,omitempty"` // The epoch timestamp of when the correction was created at. - CreatedAt *int64 `json:"created_at,omitempty"` + CreatedAt datadog.NullableInt64 `json:"created_at,omitempty"` // Object describing the creator of the shared element. Creator *Creator `json:"creator,omitempty"` // Description of the correction being made. @@ -23,9 +23,9 @@ type SLOCorrectionResponseAttributes struct { // Length of time (in seconds) for a specified `rrule` recurring SLO correction. Duration datadog.NullableInt64 `json:"duration,omitempty"` // Ending time of the correction in epoch seconds. - End *int64 `json:"end,omitempty"` + End datadog.NullableInt64 `json:"end,omitempty"` // The epoch timestamp of when the correction was modified at. - ModifiedAt *int64 `json:"modified_at,omitempty"` + ModifiedAt datadog.NullableInt64 `json:"modified_at,omitempty"` // Modifier of the object. Modifier NullableSLOCorrectionResponseAttributesModifier `json:"modifier,omitempty"` // The recurrence rules as defined in the iCalendar RFC 5545. The supported rules for SLO corrections @@ -87,32 +87,43 @@ func (o *SLOCorrectionResponseAttributes) SetCategory(v SLOCorrectionCategory) { o.Category = &v } -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SLOCorrectionResponseAttributes) GetCreatedAt() int64 { - if o == nil || o.CreatedAt == nil { + if o == nil || o.CreatedAt.Get() == nil { var ret int64 return ret } - return *o.CreatedAt + return *o.CreatedAt.Get() } // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *SLOCorrectionResponseAttributes) GetCreatedAtOk() (*int64, bool) { - if o == nil || o.CreatedAt == nil { + if o == nil { return nil, false } - return o.CreatedAt, true + return o.CreatedAt.Get(), o.CreatedAt.IsSet() } // HasCreatedAt returns a boolean if a field has been set. func (o *SLOCorrectionResponseAttributes) HasCreatedAt() bool { - return o != nil && o.CreatedAt != nil + return o != nil && o.CreatedAt.IsSet() } -// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field. +// SetCreatedAt gets a reference to the given datadog.NullableInt64 and assigns it to the CreatedAt field. func (o *SLOCorrectionResponseAttributes) SetCreatedAt(v int64) { - o.CreatedAt = &v + o.CreatedAt.Set(&v) +} + +// SetCreatedAtNil sets the value for CreatedAt to be an explicit nil. +func (o *SLOCorrectionResponseAttributes) SetCreatedAtNil() { + o.CreatedAt.Set(nil) +} + +// UnsetCreatedAt ensures that no value is present for CreatedAt, not even an explicit nil. +func (o *SLOCorrectionResponseAttributes) UnsetCreatedAt() { + o.CreatedAt.Unset() } // GetCreator returns the Creator field value if set, zero value otherwise. @@ -210,60 +221,82 @@ func (o *SLOCorrectionResponseAttributes) UnsetDuration() { o.Duration.Unset() } -// GetEnd returns the End field value if set, zero value otherwise. +// GetEnd returns the End field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SLOCorrectionResponseAttributes) GetEnd() int64 { - if o == nil || o.End == nil { + if o == nil || o.End.Get() == nil { var ret int64 return ret } - return *o.End + return *o.End.Get() } // GetEndOk returns a tuple with the End field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *SLOCorrectionResponseAttributes) GetEndOk() (*int64, bool) { - if o == nil || o.End == nil { + if o == nil { return nil, false } - return o.End, true + return o.End.Get(), o.End.IsSet() } // HasEnd returns a boolean if a field has been set. func (o *SLOCorrectionResponseAttributes) HasEnd() bool { - return o != nil && o.End != nil + return o != nil && o.End.IsSet() } -// SetEnd gets a reference to the given int64 and assigns it to the End field. +// SetEnd gets a reference to the given datadog.NullableInt64 and assigns it to the End field. func (o *SLOCorrectionResponseAttributes) SetEnd(v int64) { - o.End = &v + o.End.Set(&v) +} + +// SetEndNil sets the value for End to be an explicit nil. +func (o *SLOCorrectionResponseAttributes) SetEndNil() { + o.End.Set(nil) +} + +// UnsetEnd ensures that no value is present for End, not even an explicit nil. +func (o *SLOCorrectionResponseAttributes) UnsetEnd() { + o.End.Unset() } -// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise. +// GetModifiedAt returns the ModifiedAt field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SLOCorrectionResponseAttributes) GetModifiedAt() int64 { - if o == nil || o.ModifiedAt == nil { + if o == nil || o.ModifiedAt.Get() == nil { var ret int64 return ret } - return *o.ModifiedAt + return *o.ModifiedAt.Get() } // GetModifiedAtOk returns a tuple with the ModifiedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *SLOCorrectionResponseAttributes) GetModifiedAtOk() (*int64, bool) { - if o == nil || o.ModifiedAt == nil { + if o == nil { return nil, false } - return o.ModifiedAt, true + return o.ModifiedAt.Get(), o.ModifiedAt.IsSet() } // HasModifiedAt returns a boolean if a field has been set. func (o *SLOCorrectionResponseAttributes) HasModifiedAt() bool { - return o != nil && o.ModifiedAt != nil + return o != nil && o.ModifiedAt.IsSet() } -// SetModifiedAt gets a reference to the given int64 and assigns it to the ModifiedAt field. +// SetModifiedAt gets a reference to the given datadog.NullableInt64 and assigns it to the ModifiedAt field. func (o *SLOCorrectionResponseAttributes) SetModifiedAt(v int64) { - o.ModifiedAt = &v + o.ModifiedAt.Set(&v) +} + +// SetModifiedAtNil sets the value for ModifiedAt to be an explicit nil. +func (o *SLOCorrectionResponseAttributes) SetModifiedAtNil() { + o.ModifiedAt.Set(nil) +} + +// UnsetModifiedAt ensures that no value is present for ModifiedAt, not even an explicit nil. +func (o *SLOCorrectionResponseAttributes) UnsetModifiedAt() { + o.ModifiedAt.Unset() } // GetModifier returns the Modifier field value if set, zero value otherwise (both if not set or set to explicit null). @@ -437,8 +470,8 @@ func (o SLOCorrectionResponseAttributes) MarshalJSON() ([]byte, error) { if o.Category != nil { toSerialize["category"] = o.Category } - if o.CreatedAt != nil { - toSerialize["created_at"] = o.CreatedAt + if o.CreatedAt.IsSet() { + toSerialize["created_at"] = o.CreatedAt.Get() } if o.Creator != nil { toSerialize["creator"] = o.Creator @@ -449,11 +482,11 @@ func (o SLOCorrectionResponseAttributes) MarshalJSON() ([]byte, error) { if o.Duration.IsSet() { toSerialize["duration"] = o.Duration.Get() } - if o.End != nil { - toSerialize["end"] = o.End + if o.End.IsSet() { + toSerialize["end"] = o.End.Get() } - if o.ModifiedAt != nil { - toSerialize["modified_at"] = o.ModifiedAt + if o.ModifiedAt.IsSet() { + toSerialize["modified_at"] = o.ModifiedAt.Get() } if o.Modifier.IsSet() { toSerialize["modifier"] = o.Modifier.Get() @@ -482,12 +515,12 @@ func (o *SLOCorrectionResponseAttributes) UnmarshalJSON(bytes []byte) (err error raw := map[string]interface{}{} all := struct { Category *SLOCorrectionCategory `json:"category,omitempty"` - CreatedAt *int64 `json:"created_at,omitempty"` + CreatedAt datadog.NullableInt64 `json:"created_at,omitempty"` Creator *Creator `json:"creator,omitempty"` Description *string `json:"description,omitempty"` Duration datadog.NullableInt64 `json:"duration,omitempty"` - End *int64 `json:"end,omitempty"` - ModifiedAt *int64 `json:"modified_at,omitempty"` + End datadog.NullableInt64 `json:"end,omitempty"` + ModifiedAt datadog.NullableInt64 `json:"modified_at,omitempty"` Modifier NullableSLOCorrectionResponseAttributesModifier `json:"modifier,omitempty"` Rrule datadog.NullableString `json:"rrule,omitempty"` SloId *string `json:"slo_id,omitempty"` diff --git a/api/datadogV1/model_slo_creator.go b/api/datadogV1/model_slo_creator.go index a08f2e56a7f..bbe5856cad5 100644 --- a/api/datadogV1/model_slo_creator.go +++ b/api/datadogV1/model_slo_creator.go @@ -6,6 +6,8 @@ package datadogV1 import ( "encoding/json" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // SLOCreator The creator of the SLO @@ -15,7 +17,7 @@ type SLOCreator struct { // User ID of the creator. Id *int64 `json:"id,omitempty"` // Name of the creator. - Name *string `json:"name,omitempty"` + Name datadog.NullableString `json:"name,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} @@ -94,32 +96,43 @@ func (o *SLOCreator) SetId(v int64) { o.Id = &v } -// GetName returns the Name field value if set, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SLOCreator) GetName() string { - if o == nil || o.Name == nil { + if o == nil || o.Name.Get() == nil { var ret string return ret } - return *o.Name + return *o.Name.Get() } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *SLOCreator) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil { return nil, false } - return o.Name, true + return o.Name.Get(), o.Name.IsSet() } // HasName returns a boolean if a field has been set. func (o *SLOCreator) HasName() bool { - return o != nil && o.Name != nil + return o != nil && o.Name.IsSet() } -// SetName gets a reference to the given string and assigns it to the Name field. +// SetName gets a reference to the given datadog.NullableString and assigns it to the Name field. func (o *SLOCreator) SetName(v string) { - o.Name = &v + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil. +func (o *SLOCreator) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil. +func (o *SLOCreator) UnsetName() { + o.Name.Unset() } // MarshalJSON serializes the struct using spec logic. @@ -134,8 +147,8 @@ func (o SLOCreator) MarshalJSON() ([]byte, error) { if o.Id != nil { toSerialize["id"] = o.Id } - if o.Name != nil { - toSerialize["name"] = o.Name + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() } for key, value := range o.AdditionalProperties { @@ -148,9 +161,9 @@ func (o SLOCreator) MarshalJSON() ([]byte, error) { func (o *SLOCreator) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - Email *string `json:"email,omitempty"` - Id *int64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` + Email *string `json:"email,omitempty"` + Id *int64 `json:"id,omitempty"` + Name datadog.NullableString `json:"name,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV1/model_slo_history_monitor.go b/api/datadogV1/model_slo_history_monitor.go index 60aca089e91..0dc30d5e21e 100644 --- a/api/datadogV1/model_slo_history_monitor.go +++ b/api/datadogV1/model_slo_history_monitor.go @@ -6,6 +6,8 @@ package datadogV1 import ( "encoding/json" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // SLOHistoryMonitor An object that holds an SLI value and its associated data. It can represent an SLO's overall SLI value. @@ -32,7 +34,7 @@ type SLOHistoryMonitor struct { // calculation. Preview *bool `json:"preview,omitempty"` // The current SLI value of the SLO over the history window. - SliValue *float64 `json:"sli_value,omitempty"` + SliValue datadog.NullableFloat64 `json:"sli_value,omitempty"` // The amount of decimal places the SLI value is accurate to for the given from `&&` to timestamp. SpanPrecision *float64 `json:"span_precision,omitempty"` // Use `sli_value` instead. @@ -315,32 +317,43 @@ func (o *SLOHistoryMonitor) SetPreview(v bool) { o.Preview = &v } -// GetSliValue returns the SliValue field value if set, zero value otherwise. +// GetSliValue returns the SliValue field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SLOHistoryMonitor) GetSliValue() float64 { - if o == nil || o.SliValue == nil { + if o == nil || o.SliValue.Get() == nil { var ret float64 return ret } - return *o.SliValue + return *o.SliValue.Get() } // GetSliValueOk returns a tuple with the SliValue field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *SLOHistoryMonitor) GetSliValueOk() (*float64, bool) { - if o == nil || o.SliValue == nil { + if o == nil { return nil, false } - return o.SliValue, true + return o.SliValue.Get(), o.SliValue.IsSet() } // HasSliValue returns a boolean if a field has been set. func (o *SLOHistoryMonitor) HasSliValue() bool { - return o != nil && o.SliValue != nil + return o != nil && o.SliValue.IsSet() } -// SetSliValue gets a reference to the given float64 and assigns it to the SliValue field. +// SetSliValue gets a reference to the given datadog.NullableFloat64 and assigns it to the SliValue field. func (o *SLOHistoryMonitor) SetSliValue(v float64) { - o.SliValue = &v + o.SliValue.Set(&v) +} + +// SetSliValueNil sets the value for SliValue to be an explicit nil. +func (o *SLOHistoryMonitor) SetSliValueNil() { + o.SliValue.Set(nil) +} + +// UnsetSliValue ensures that no value is present for SliValue, not even an explicit nil. +func (o *SLOHistoryMonitor) UnsetSliValue() { + o.SliValue.Unset() } // GetSpanPrecision returns the SpanPrecision field value if set, zero value otherwise. @@ -435,8 +448,8 @@ func (o SLOHistoryMonitor) MarshalJSON() ([]byte, error) { if o.Preview != nil { toSerialize["preview"] = o.Preview } - if o.SliValue != nil { - toSerialize["sli_value"] = o.SliValue + if o.SliValue.IsSet() { + toSerialize["sli_value"] = o.SliValue.Get() } if o.SpanPrecision != nil { toSerialize["span_precision"] = o.SpanPrecision @@ -464,7 +477,7 @@ func (o *SLOHistoryMonitor) UnmarshalJSON(bytes []byte) (err error) { Name *string `json:"name,omitempty"` Precision *float64 `json:"precision,omitempty"` Preview *bool `json:"preview,omitempty"` - SliValue *float64 `json:"sli_value,omitempty"` + SliValue datadog.NullableFloat64 `json:"sli_value,omitempty"` SpanPrecision *float64 `json:"span_precision,omitempty"` Uptime *float64 `json:"uptime,omitempty"` }{} diff --git a/api/datadogV1/model_slo_history_response.go b/api/datadogV1/model_slo_history_response.go index 7be8065ddbf..e03e0d2cf43 100644 --- a/api/datadogV1/model_slo_history_response.go +++ b/api/datadogV1/model_slo_history_response.go @@ -64,9 +64,9 @@ func (o *SLOHistoryResponse) SetData(v SLOHistoryResponseData) { o.Data = &v } -// GetErrors returns the Errors field value if set, zero value otherwise. +// GetErrors returns the Errors field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SLOHistoryResponse) GetErrors() []SLOHistoryResponseError { - if o == nil || o.Errors == nil { + if o == nil { var ret []SLOHistoryResponseError return ret } @@ -75,6 +75,7 @@ func (o *SLOHistoryResponse) GetErrors() []SLOHistoryResponseError { // GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *SLOHistoryResponse) GetErrorsOk() (*[]SLOHistoryResponseError, bool) { if o == nil || o.Errors == nil { return nil, false diff --git a/api/datadogV1/model_slo_history_sli_data.go b/api/datadogV1/model_slo_history_sli_data.go index c503dc6cdaa..d4dbddec3ed 100644 --- a/api/datadogV1/model_slo_history_sli_data.go +++ b/api/datadogV1/model_slo_history_sli_data.go @@ -6,6 +6,8 @@ package datadogV1 import ( "encoding/json" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // SLOHistorySLIData An object that holds an SLI value and its associated data. It can represent an SLO's overall SLI value. @@ -31,12 +33,12 @@ type SLOHistorySLIData struct { // calculation. Preview *bool `json:"preview,omitempty"` // The current SLI value of the SLO over the history window. - SliValue *float64 `json:"sli_value,omitempty"` + SliValue datadog.NullableFloat64 `json:"sli_value,omitempty"` // The amount of decimal places the SLI value is accurate to for the given from `&&` to timestamp. SpanPrecision *float64 `json:"span_precision,omitempty"` // Use `sli_value` instead. // Deprecated - Uptime *float64 `json:"uptime,omitempty"` + Uptime datadog.NullableFloat64 `json:"uptime,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} @@ -311,32 +313,43 @@ func (o *SLOHistorySLIData) SetPreview(v bool) { o.Preview = &v } -// GetSliValue returns the SliValue field value if set, zero value otherwise. +// GetSliValue returns the SliValue field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SLOHistorySLIData) GetSliValue() float64 { - if o == nil || o.SliValue == nil { + if o == nil || o.SliValue.Get() == nil { var ret float64 return ret } - return *o.SliValue + return *o.SliValue.Get() } // GetSliValueOk returns a tuple with the SliValue field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *SLOHistorySLIData) GetSliValueOk() (*float64, bool) { - if o == nil || o.SliValue == nil { + if o == nil { return nil, false } - return o.SliValue, true + return o.SliValue.Get(), o.SliValue.IsSet() } // HasSliValue returns a boolean if a field has been set. func (o *SLOHistorySLIData) HasSliValue() bool { - return o != nil && o.SliValue != nil + return o != nil && o.SliValue.IsSet() } -// SetSliValue gets a reference to the given float64 and assigns it to the SliValue field. +// SetSliValue gets a reference to the given datadog.NullableFloat64 and assigns it to the SliValue field. func (o *SLOHistorySLIData) SetSliValue(v float64) { - o.SliValue = &v + o.SliValue.Set(&v) +} + +// SetSliValueNil sets the value for SliValue to be an explicit nil. +func (o *SLOHistorySLIData) SetSliValueNil() { + o.SliValue.Set(nil) +} + +// UnsetSliValue ensures that no value is present for SliValue, not even an explicit nil. +func (o *SLOHistorySLIData) UnsetSliValue() { + o.SliValue.Unset() } // GetSpanPrecision returns the SpanPrecision field value if set, zero value otherwise. @@ -367,35 +380,46 @@ func (o *SLOHistorySLIData) SetSpanPrecision(v float64) { o.SpanPrecision = &v } -// GetUptime returns the Uptime field value if set, zero value otherwise. +// GetUptime returns the Uptime field value if set, zero value otherwise (both if not set or set to explicit null). // Deprecated func (o *SLOHistorySLIData) GetUptime() float64 { - if o == nil || o.Uptime == nil { + if o == nil || o.Uptime.Get() == nil { var ret float64 return ret } - return *o.Uptime + return *o.Uptime.Get() } // GetUptimeOk returns a tuple with the Uptime field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. // Deprecated func (o *SLOHistorySLIData) GetUptimeOk() (*float64, bool) { - if o == nil || o.Uptime == nil { + if o == nil { return nil, false } - return o.Uptime, true + return o.Uptime.Get(), o.Uptime.IsSet() } // HasUptime returns a boolean if a field has been set. func (o *SLOHistorySLIData) HasUptime() bool { - return o != nil && o.Uptime != nil + return o != nil && o.Uptime.IsSet() } -// SetUptime gets a reference to the given float64 and assigns it to the Uptime field. +// SetUptime gets a reference to the given datadog.NullableFloat64 and assigns it to the Uptime field. // Deprecated func (o *SLOHistorySLIData) SetUptime(v float64) { - o.Uptime = &v + o.Uptime.Set(&v) +} + +// SetUptimeNil sets the value for Uptime to be an explicit nil. +func (o *SLOHistorySLIData) SetUptimeNil() { + o.Uptime.Set(nil) +} + +// UnsetUptime ensures that no value is present for Uptime, not even an explicit nil. +func (o *SLOHistorySLIData) UnsetUptime() { + o.Uptime.Unset() } // MarshalJSON serializes the struct using spec logic. @@ -431,14 +455,14 @@ func (o SLOHistorySLIData) MarshalJSON() ([]byte, error) { if o.Preview != nil { toSerialize["preview"] = o.Preview } - if o.SliValue != nil { - toSerialize["sli_value"] = o.SliValue + if o.SliValue.IsSet() { + toSerialize["sli_value"] = o.SliValue.Get() } if o.SpanPrecision != nil { toSerialize["span_precision"] = o.SpanPrecision } - if o.Uptime != nil { - toSerialize["uptime"] = o.Uptime + if o.Uptime.IsSet() { + toSerialize["uptime"] = o.Uptime.Get() } for key, value := range o.AdditionalProperties { @@ -460,9 +484,9 @@ func (o *SLOHistorySLIData) UnmarshalJSON(bytes []byte) (err error) { Name *string `json:"name,omitempty"` Precision map[string]float64 `json:"precision,omitempty"` Preview *bool `json:"preview,omitempty"` - SliValue *float64 `json:"sli_value,omitempty"` + SliValue datadog.NullableFloat64 `json:"sli_value,omitempty"` SpanPrecision *float64 `json:"span_precision,omitempty"` - Uptime *float64 `json:"uptime,omitempty"` + Uptime datadog.NullableFloat64 `json:"uptime,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV1/model_usage_attribution_body.go b/api/datadogV1/model_usage_attribution_body.go index d33fcd972cd..4345c349fae 100644 --- a/api/datadogV1/model_usage_attribution_body.go +++ b/api/datadogV1/model_usage_attribution_body.go @@ -163,9 +163,9 @@ func (o *UsageAttributionBody) SetTagConfigSource(v string) { o.TagConfigSource = &v } -// GetTags returns the Tags field value if set, zero value otherwise. +// GetTags returns the Tags field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageAttributionBody) GetTags() map[string][]string { - if o == nil || o.Tags == nil { + if o == nil { var ret map[string][]string return ret } @@ -174,6 +174,7 @@ func (o *UsageAttributionBody) GetTags() map[string][]string { // GetTagsOk returns a tuple with the Tags field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageAttributionBody) GetTagsOk() (*map[string][]string, bool) { if o == nil || o.Tags == nil { return nil, false diff --git a/api/datadogV1/model_usage_ci_visibility_hour.go b/api/datadogV1/model_usage_ci_visibility_hour.go index da74ecf8885..5d5ddec387d 100644 --- a/api/datadogV1/model_usage_ci_visibility_hour.go +++ b/api/datadogV1/model_usage_ci_visibility_hour.go @@ -6,18 +6,20 @@ package datadogV1 import ( "encoding/json" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // UsageCIVisibilityHour CI visibility usage in a given hour. type UsageCIVisibilityHour struct { // The number of spans for pipelines in the queried hour. - CiPipelineIndexedSpans *int64 `json:"ci_pipeline_indexed_spans,omitempty"` + CiPipelineIndexedSpans datadog.NullableInt64 `json:"ci_pipeline_indexed_spans,omitempty"` // The number of spans for tests in the queried hour. - CiTestIndexedSpans *int64 `json:"ci_test_indexed_spans,omitempty"` + CiTestIndexedSpans datadog.NullableInt64 `json:"ci_test_indexed_spans,omitempty"` // Shows the total count of all active Git committers for Pipelines in the current month. A committer is active if they commit at least 3 times in a given month. - CiVisibilityPipelineCommitters *int64 `json:"ci_visibility_pipeline_committers,omitempty"` + CiVisibilityPipelineCommitters datadog.NullableInt64 `json:"ci_visibility_pipeline_committers,omitempty"` // The total count of all active Git committers for tests in the current month. A committer is active if they commit at least 3 times in a given month. - CiVisibilityTestCommitters *int64 `json:"ci_visibility_test_committers,omitempty"` + CiVisibilityTestCommitters datadog.NullableInt64 `json:"ci_visibility_test_committers,omitempty"` // The organization name. OrgName *string `json:"org_name,omitempty"` // The organization public ID. @@ -44,116 +46,160 @@ func NewUsageCIVisibilityHourWithDefaults() *UsageCIVisibilityHour { return &this } -// GetCiPipelineIndexedSpans returns the CiPipelineIndexedSpans field value if set, zero value otherwise. +// GetCiPipelineIndexedSpans returns the CiPipelineIndexedSpans field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageCIVisibilityHour) GetCiPipelineIndexedSpans() int64 { - if o == nil || o.CiPipelineIndexedSpans == nil { + if o == nil || o.CiPipelineIndexedSpans.Get() == nil { var ret int64 return ret } - return *o.CiPipelineIndexedSpans + return *o.CiPipelineIndexedSpans.Get() } // GetCiPipelineIndexedSpansOk returns a tuple with the CiPipelineIndexedSpans field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageCIVisibilityHour) GetCiPipelineIndexedSpansOk() (*int64, bool) { - if o == nil || o.CiPipelineIndexedSpans == nil { + if o == nil { return nil, false } - return o.CiPipelineIndexedSpans, true + return o.CiPipelineIndexedSpans.Get(), o.CiPipelineIndexedSpans.IsSet() } // HasCiPipelineIndexedSpans returns a boolean if a field has been set. func (o *UsageCIVisibilityHour) HasCiPipelineIndexedSpans() bool { - return o != nil && o.CiPipelineIndexedSpans != nil + return o != nil && o.CiPipelineIndexedSpans.IsSet() } -// SetCiPipelineIndexedSpans gets a reference to the given int64 and assigns it to the CiPipelineIndexedSpans field. +// SetCiPipelineIndexedSpans gets a reference to the given datadog.NullableInt64 and assigns it to the CiPipelineIndexedSpans field. func (o *UsageCIVisibilityHour) SetCiPipelineIndexedSpans(v int64) { - o.CiPipelineIndexedSpans = &v + o.CiPipelineIndexedSpans.Set(&v) +} + +// SetCiPipelineIndexedSpansNil sets the value for CiPipelineIndexedSpans to be an explicit nil. +func (o *UsageCIVisibilityHour) SetCiPipelineIndexedSpansNil() { + o.CiPipelineIndexedSpans.Set(nil) +} + +// UnsetCiPipelineIndexedSpans ensures that no value is present for CiPipelineIndexedSpans, not even an explicit nil. +func (o *UsageCIVisibilityHour) UnsetCiPipelineIndexedSpans() { + o.CiPipelineIndexedSpans.Unset() } -// GetCiTestIndexedSpans returns the CiTestIndexedSpans field value if set, zero value otherwise. +// GetCiTestIndexedSpans returns the CiTestIndexedSpans field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageCIVisibilityHour) GetCiTestIndexedSpans() int64 { - if o == nil || o.CiTestIndexedSpans == nil { + if o == nil || o.CiTestIndexedSpans.Get() == nil { var ret int64 return ret } - return *o.CiTestIndexedSpans + return *o.CiTestIndexedSpans.Get() } // GetCiTestIndexedSpansOk returns a tuple with the CiTestIndexedSpans field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageCIVisibilityHour) GetCiTestIndexedSpansOk() (*int64, bool) { - if o == nil || o.CiTestIndexedSpans == nil { + if o == nil { return nil, false } - return o.CiTestIndexedSpans, true + return o.CiTestIndexedSpans.Get(), o.CiTestIndexedSpans.IsSet() } // HasCiTestIndexedSpans returns a boolean if a field has been set. func (o *UsageCIVisibilityHour) HasCiTestIndexedSpans() bool { - return o != nil && o.CiTestIndexedSpans != nil + return o != nil && o.CiTestIndexedSpans.IsSet() } -// SetCiTestIndexedSpans gets a reference to the given int64 and assigns it to the CiTestIndexedSpans field. +// SetCiTestIndexedSpans gets a reference to the given datadog.NullableInt64 and assigns it to the CiTestIndexedSpans field. func (o *UsageCIVisibilityHour) SetCiTestIndexedSpans(v int64) { - o.CiTestIndexedSpans = &v + o.CiTestIndexedSpans.Set(&v) +} + +// SetCiTestIndexedSpansNil sets the value for CiTestIndexedSpans to be an explicit nil. +func (o *UsageCIVisibilityHour) SetCiTestIndexedSpansNil() { + o.CiTestIndexedSpans.Set(nil) +} + +// UnsetCiTestIndexedSpans ensures that no value is present for CiTestIndexedSpans, not even an explicit nil. +func (o *UsageCIVisibilityHour) UnsetCiTestIndexedSpans() { + o.CiTestIndexedSpans.Unset() } -// GetCiVisibilityPipelineCommitters returns the CiVisibilityPipelineCommitters field value if set, zero value otherwise. +// GetCiVisibilityPipelineCommitters returns the CiVisibilityPipelineCommitters field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageCIVisibilityHour) GetCiVisibilityPipelineCommitters() int64 { - if o == nil || o.CiVisibilityPipelineCommitters == nil { + if o == nil || o.CiVisibilityPipelineCommitters.Get() == nil { var ret int64 return ret } - return *o.CiVisibilityPipelineCommitters + return *o.CiVisibilityPipelineCommitters.Get() } // GetCiVisibilityPipelineCommittersOk returns a tuple with the CiVisibilityPipelineCommitters field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageCIVisibilityHour) GetCiVisibilityPipelineCommittersOk() (*int64, bool) { - if o == nil || o.CiVisibilityPipelineCommitters == nil { + if o == nil { return nil, false } - return o.CiVisibilityPipelineCommitters, true + return o.CiVisibilityPipelineCommitters.Get(), o.CiVisibilityPipelineCommitters.IsSet() } // HasCiVisibilityPipelineCommitters returns a boolean if a field has been set. func (o *UsageCIVisibilityHour) HasCiVisibilityPipelineCommitters() bool { - return o != nil && o.CiVisibilityPipelineCommitters != nil + return o != nil && o.CiVisibilityPipelineCommitters.IsSet() } -// SetCiVisibilityPipelineCommitters gets a reference to the given int64 and assigns it to the CiVisibilityPipelineCommitters field. +// SetCiVisibilityPipelineCommitters gets a reference to the given datadog.NullableInt64 and assigns it to the CiVisibilityPipelineCommitters field. func (o *UsageCIVisibilityHour) SetCiVisibilityPipelineCommitters(v int64) { - o.CiVisibilityPipelineCommitters = &v + o.CiVisibilityPipelineCommitters.Set(&v) } -// GetCiVisibilityTestCommitters returns the CiVisibilityTestCommitters field value if set, zero value otherwise. +// SetCiVisibilityPipelineCommittersNil sets the value for CiVisibilityPipelineCommitters to be an explicit nil. +func (o *UsageCIVisibilityHour) SetCiVisibilityPipelineCommittersNil() { + o.CiVisibilityPipelineCommitters.Set(nil) +} + +// UnsetCiVisibilityPipelineCommitters ensures that no value is present for CiVisibilityPipelineCommitters, not even an explicit nil. +func (o *UsageCIVisibilityHour) UnsetCiVisibilityPipelineCommitters() { + o.CiVisibilityPipelineCommitters.Unset() +} + +// GetCiVisibilityTestCommitters returns the CiVisibilityTestCommitters field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageCIVisibilityHour) GetCiVisibilityTestCommitters() int64 { - if o == nil || o.CiVisibilityTestCommitters == nil { + if o == nil || o.CiVisibilityTestCommitters.Get() == nil { var ret int64 return ret } - return *o.CiVisibilityTestCommitters + return *o.CiVisibilityTestCommitters.Get() } // GetCiVisibilityTestCommittersOk returns a tuple with the CiVisibilityTestCommitters field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageCIVisibilityHour) GetCiVisibilityTestCommittersOk() (*int64, bool) { - if o == nil || o.CiVisibilityTestCommitters == nil { + if o == nil { return nil, false } - return o.CiVisibilityTestCommitters, true + return o.CiVisibilityTestCommitters.Get(), o.CiVisibilityTestCommitters.IsSet() } // HasCiVisibilityTestCommitters returns a boolean if a field has been set. func (o *UsageCIVisibilityHour) HasCiVisibilityTestCommitters() bool { - return o != nil && o.CiVisibilityTestCommitters != nil + return o != nil && o.CiVisibilityTestCommitters.IsSet() } -// SetCiVisibilityTestCommitters gets a reference to the given int64 and assigns it to the CiVisibilityTestCommitters field. +// SetCiVisibilityTestCommitters gets a reference to the given datadog.NullableInt64 and assigns it to the CiVisibilityTestCommitters field. func (o *UsageCIVisibilityHour) SetCiVisibilityTestCommitters(v int64) { - o.CiVisibilityTestCommitters = &v + o.CiVisibilityTestCommitters.Set(&v) +} + +// SetCiVisibilityTestCommittersNil sets the value for CiVisibilityTestCommitters to be an explicit nil. +func (o *UsageCIVisibilityHour) SetCiVisibilityTestCommittersNil() { + o.CiVisibilityTestCommitters.Set(nil) +} + +// UnsetCiVisibilityTestCommitters ensures that no value is present for CiVisibilityTestCommitters, not even an explicit nil. +func (o *UsageCIVisibilityHour) UnsetCiVisibilityTestCommitters() { + o.CiVisibilityTestCommitters.Unset() } // GetOrgName returns the OrgName field value if set, zero value otherwise. @@ -218,17 +264,17 @@ func (o UsageCIVisibilityHour) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return json.Marshal(o.UnparsedObject) } - if o.CiPipelineIndexedSpans != nil { - toSerialize["ci_pipeline_indexed_spans"] = o.CiPipelineIndexedSpans + if o.CiPipelineIndexedSpans.IsSet() { + toSerialize["ci_pipeline_indexed_spans"] = o.CiPipelineIndexedSpans.Get() } - if o.CiTestIndexedSpans != nil { - toSerialize["ci_test_indexed_spans"] = o.CiTestIndexedSpans + if o.CiTestIndexedSpans.IsSet() { + toSerialize["ci_test_indexed_spans"] = o.CiTestIndexedSpans.Get() } - if o.CiVisibilityPipelineCommitters != nil { - toSerialize["ci_visibility_pipeline_committers"] = o.CiVisibilityPipelineCommitters + if o.CiVisibilityPipelineCommitters.IsSet() { + toSerialize["ci_visibility_pipeline_committers"] = o.CiVisibilityPipelineCommitters.Get() } - if o.CiVisibilityTestCommitters != nil { - toSerialize["ci_visibility_test_committers"] = o.CiVisibilityTestCommitters + if o.CiVisibilityTestCommitters.IsSet() { + toSerialize["ci_visibility_test_committers"] = o.CiVisibilityTestCommitters.Get() } if o.OrgName != nil { toSerialize["org_name"] = o.OrgName @@ -247,12 +293,12 @@ func (o UsageCIVisibilityHour) MarshalJSON() ([]byte, error) { func (o *UsageCIVisibilityHour) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - CiPipelineIndexedSpans *int64 `json:"ci_pipeline_indexed_spans,omitempty"` - CiTestIndexedSpans *int64 `json:"ci_test_indexed_spans,omitempty"` - CiVisibilityPipelineCommitters *int64 `json:"ci_visibility_pipeline_committers,omitempty"` - CiVisibilityTestCommitters *int64 `json:"ci_visibility_test_committers,omitempty"` - OrgName *string `json:"org_name,omitempty"` - PublicId *string `json:"public_id,omitempty"` + CiPipelineIndexedSpans datadog.NullableInt64 `json:"ci_pipeline_indexed_spans,omitempty"` + CiTestIndexedSpans datadog.NullableInt64 `json:"ci_test_indexed_spans,omitempty"` + CiVisibilityPipelineCommitters datadog.NullableInt64 `json:"ci_visibility_pipeline_committers,omitempty"` + CiVisibilityTestCommitters datadog.NullableInt64 `json:"ci_visibility_test_committers,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV1/model_usage_cws_hour.go b/api/datadogV1/model_usage_cws_hour.go index 69a5745d972..910d8535795 100644 --- a/api/datadogV1/model_usage_cws_hour.go +++ b/api/datadogV1/model_usage_cws_hour.go @@ -7,14 +7,16 @@ package datadogV1 import ( "encoding/json" "time" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // UsageCWSHour Cloud Workload Security usage for a given organization for a given hour. type UsageCWSHour struct { // The total number of Cloud Workload Security container hours from the start of the given hour’s month until the given hour. - CwsContainerCount *int64 `json:"cws_container_count,omitempty"` + CwsContainerCount datadog.NullableInt64 `json:"cws_container_count,omitempty"` // The total number of Cloud Workload Security host hours from the start of the given hour’s month until the given hour. - CwsHostCount *int64 `json:"cws_host_count,omitempty"` + CwsHostCount datadog.NullableInt64 `json:"cws_host_count,omitempty"` // The hour for the usage. Hour *time.Time `json:"hour,omitempty"` // The organization name. @@ -43,60 +45,82 @@ func NewUsageCWSHourWithDefaults() *UsageCWSHour { return &this } -// GetCwsContainerCount returns the CwsContainerCount field value if set, zero value otherwise. +// GetCwsContainerCount returns the CwsContainerCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageCWSHour) GetCwsContainerCount() int64 { - if o == nil || o.CwsContainerCount == nil { + if o == nil || o.CwsContainerCount.Get() == nil { var ret int64 return ret } - return *o.CwsContainerCount + return *o.CwsContainerCount.Get() } // GetCwsContainerCountOk returns a tuple with the CwsContainerCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageCWSHour) GetCwsContainerCountOk() (*int64, bool) { - if o == nil || o.CwsContainerCount == nil { + if o == nil { return nil, false } - return o.CwsContainerCount, true + return o.CwsContainerCount.Get(), o.CwsContainerCount.IsSet() } // HasCwsContainerCount returns a boolean if a field has been set. func (o *UsageCWSHour) HasCwsContainerCount() bool { - return o != nil && o.CwsContainerCount != nil + return o != nil && o.CwsContainerCount.IsSet() } -// SetCwsContainerCount gets a reference to the given int64 and assigns it to the CwsContainerCount field. +// SetCwsContainerCount gets a reference to the given datadog.NullableInt64 and assigns it to the CwsContainerCount field. func (o *UsageCWSHour) SetCwsContainerCount(v int64) { - o.CwsContainerCount = &v + o.CwsContainerCount.Set(&v) +} + +// SetCwsContainerCountNil sets the value for CwsContainerCount to be an explicit nil. +func (o *UsageCWSHour) SetCwsContainerCountNil() { + o.CwsContainerCount.Set(nil) +} + +// UnsetCwsContainerCount ensures that no value is present for CwsContainerCount, not even an explicit nil. +func (o *UsageCWSHour) UnsetCwsContainerCount() { + o.CwsContainerCount.Unset() } -// GetCwsHostCount returns the CwsHostCount field value if set, zero value otherwise. +// GetCwsHostCount returns the CwsHostCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageCWSHour) GetCwsHostCount() int64 { - if o == nil || o.CwsHostCount == nil { + if o == nil || o.CwsHostCount.Get() == nil { var ret int64 return ret } - return *o.CwsHostCount + return *o.CwsHostCount.Get() } // GetCwsHostCountOk returns a tuple with the CwsHostCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageCWSHour) GetCwsHostCountOk() (*int64, bool) { - if o == nil || o.CwsHostCount == nil { + if o == nil { return nil, false } - return o.CwsHostCount, true + return o.CwsHostCount.Get(), o.CwsHostCount.IsSet() } // HasCwsHostCount returns a boolean if a field has been set. func (o *UsageCWSHour) HasCwsHostCount() bool { - return o != nil && o.CwsHostCount != nil + return o != nil && o.CwsHostCount.IsSet() } -// SetCwsHostCount gets a reference to the given int64 and assigns it to the CwsHostCount field. +// SetCwsHostCount gets a reference to the given datadog.NullableInt64 and assigns it to the CwsHostCount field. func (o *UsageCWSHour) SetCwsHostCount(v int64) { - o.CwsHostCount = &v + o.CwsHostCount.Set(&v) +} + +// SetCwsHostCountNil sets the value for CwsHostCount to be an explicit nil. +func (o *UsageCWSHour) SetCwsHostCountNil() { + o.CwsHostCount.Set(nil) +} + +// UnsetCwsHostCount ensures that no value is present for CwsHostCount, not even an explicit nil. +func (o *UsageCWSHour) UnsetCwsHostCount() { + o.CwsHostCount.Unset() } // GetHour returns the Hour field value if set, zero value otherwise. @@ -189,11 +213,11 @@ func (o UsageCWSHour) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return json.Marshal(o.UnparsedObject) } - if o.CwsContainerCount != nil { - toSerialize["cws_container_count"] = o.CwsContainerCount + if o.CwsContainerCount.IsSet() { + toSerialize["cws_container_count"] = o.CwsContainerCount.Get() } - if o.CwsHostCount != nil { - toSerialize["cws_host_count"] = o.CwsHostCount + if o.CwsHostCount.IsSet() { + toSerialize["cws_host_count"] = o.CwsHostCount.Get() } if o.Hour != nil { if o.Hour.Nanosecond() == 0 { @@ -219,11 +243,11 @@ func (o UsageCWSHour) MarshalJSON() ([]byte, error) { func (o *UsageCWSHour) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - CwsContainerCount *int64 `json:"cws_container_count,omitempty"` - CwsHostCount *int64 `json:"cws_host_count,omitempty"` - Hour *time.Time `json:"hour,omitempty"` - OrgName *string `json:"org_name,omitempty"` - PublicId *string `json:"public_id,omitempty"` + CwsContainerCount datadog.NullableInt64 `json:"cws_container_count,omitempty"` + CwsHostCount datadog.NullableInt64 `json:"cws_host_count,omitempty"` + Hour *time.Time `json:"hour,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV1/model_usage_dbm_hour.go b/api/datadogV1/model_usage_dbm_hour.go index c2c98564fa1..22ee487b1c6 100644 --- a/api/datadogV1/model_usage_dbm_hour.go +++ b/api/datadogV1/model_usage_dbm_hour.go @@ -7,14 +7,16 @@ package datadogV1 import ( "encoding/json" "time" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // UsageDBMHour Database Monitoring usage for a given organization for a given hour. type UsageDBMHour struct { // The total number of Database Monitoring host hours from the start of the given hour’s month until the given hour. - DbmHostCount *int64 `json:"dbm_host_count,omitempty"` + DbmHostCount datadog.NullableInt64 `json:"dbm_host_count,omitempty"` // The total number of normalized Database Monitoring queries from the start of the given hour’s month until the given hour. - DbmQueriesCount *int64 `json:"dbm_queries_count,omitempty"` + DbmQueriesCount datadog.NullableInt64 `json:"dbm_queries_count,omitempty"` // The hour for the usage. Hour *time.Time `json:"hour,omitempty"` // The organization name. @@ -43,60 +45,82 @@ func NewUsageDBMHourWithDefaults() *UsageDBMHour { return &this } -// GetDbmHostCount returns the DbmHostCount field value if set, zero value otherwise. +// GetDbmHostCount returns the DbmHostCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageDBMHour) GetDbmHostCount() int64 { - if o == nil || o.DbmHostCount == nil { + if o == nil || o.DbmHostCount.Get() == nil { var ret int64 return ret } - return *o.DbmHostCount + return *o.DbmHostCount.Get() } // GetDbmHostCountOk returns a tuple with the DbmHostCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageDBMHour) GetDbmHostCountOk() (*int64, bool) { - if o == nil || o.DbmHostCount == nil { + if o == nil { return nil, false } - return o.DbmHostCount, true + return o.DbmHostCount.Get(), o.DbmHostCount.IsSet() } // HasDbmHostCount returns a boolean if a field has been set. func (o *UsageDBMHour) HasDbmHostCount() bool { - return o != nil && o.DbmHostCount != nil + return o != nil && o.DbmHostCount.IsSet() } -// SetDbmHostCount gets a reference to the given int64 and assigns it to the DbmHostCount field. +// SetDbmHostCount gets a reference to the given datadog.NullableInt64 and assigns it to the DbmHostCount field. func (o *UsageDBMHour) SetDbmHostCount(v int64) { - o.DbmHostCount = &v + o.DbmHostCount.Set(&v) +} + +// SetDbmHostCountNil sets the value for DbmHostCount to be an explicit nil. +func (o *UsageDBMHour) SetDbmHostCountNil() { + o.DbmHostCount.Set(nil) +} + +// UnsetDbmHostCount ensures that no value is present for DbmHostCount, not even an explicit nil. +func (o *UsageDBMHour) UnsetDbmHostCount() { + o.DbmHostCount.Unset() } -// GetDbmQueriesCount returns the DbmQueriesCount field value if set, zero value otherwise. +// GetDbmQueriesCount returns the DbmQueriesCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageDBMHour) GetDbmQueriesCount() int64 { - if o == nil || o.DbmQueriesCount == nil { + if o == nil || o.DbmQueriesCount.Get() == nil { var ret int64 return ret } - return *o.DbmQueriesCount + return *o.DbmQueriesCount.Get() } // GetDbmQueriesCountOk returns a tuple with the DbmQueriesCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageDBMHour) GetDbmQueriesCountOk() (*int64, bool) { - if o == nil || o.DbmQueriesCount == nil { + if o == nil { return nil, false } - return o.DbmQueriesCount, true + return o.DbmQueriesCount.Get(), o.DbmQueriesCount.IsSet() } // HasDbmQueriesCount returns a boolean if a field has been set. func (o *UsageDBMHour) HasDbmQueriesCount() bool { - return o != nil && o.DbmQueriesCount != nil + return o != nil && o.DbmQueriesCount.IsSet() } -// SetDbmQueriesCount gets a reference to the given int64 and assigns it to the DbmQueriesCount field. +// SetDbmQueriesCount gets a reference to the given datadog.NullableInt64 and assigns it to the DbmQueriesCount field. func (o *UsageDBMHour) SetDbmQueriesCount(v int64) { - o.DbmQueriesCount = &v + o.DbmQueriesCount.Set(&v) +} + +// SetDbmQueriesCountNil sets the value for DbmQueriesCount to be an explicit nil. +func (o *UsageDBMHour) SetDbmQueriesCountNil() { + o.DbmQueriesCount.Set(nil) +} + +// UnsetDbmQueriesCount ensures that no value is present for DbmQueriesCount, not even an explicit nil. +func (o *UsageDBMHour) UnsetDbmQueriesCount() { + o.DbmQueriesCount.Unset() } // GetHour returns the Hour field value if set, zero value otherwise. @@ -189,11 +213,11 @@ func (o UsageDBMHour) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return json.Marshal(o.UnparsedObject) } - if o.DbmHostCount != nil { - toSerialize["dbm_host_count"] = o.DbmHostCount + if o.DbmHostCount.IsSet() { + toSerialize["dbm_host_count"] = o.DbmHostCount.Get() } - if o.DbmQueriesCount != nil { - toSerialize["dbm_queries_count"] = o.DbmQueriesCount + if o.DbmQueriesCount.IsSet() { + toSerialize["dbm_queries_count"] = o.DbmQueriesCount.Get() } if o.Hour != nil { if o.Hour.Nanosecond() == 0 { @@ -219,11 +243,11 @@ func (o UsageDBMHour) MarshalJSON() ([]byte, error) { func (o *UsageDBMHour) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - DbmHostCount *int64 `json:"dbm_host_count,omitempty"` - DbmQueriesCount *int64 `json:"dbm_queries_count,omitempty"` - Hour *time.Time `json:"hour,omitempty"` - OrgName *string `json:"org_name,omitempty"` - PublicId *string `json:"public_id,omitempty"` + DbmHostCount datadog.NullableInt64 `json:"dbm_host_count,omitempty"` + DbmQueriesCount datadog.NullableInt64 `json:"dbm_queries_count,omitempty"` + Hour *time.Time `json:"hour,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV1/model_usage_fargate_hour.go b/api/datadogV1/model_usage_fargate_hour.go index dcf80bdaeae..cb195a2f42a 100644 --- a/api/datadogV1/model_usage_fargate_hour.go +++ b/api/datadogV1/model_usage_fargate_hour.go @@ -7,16 +7,18 @@ package datadogV1 import ( "encoding/json" "time" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // UsageFargateHour Number of Fargate tasks run and hourly usage. type UsageFargateHour struct { // The high-water mark of APM ECS Fargate tasks during the given hour. - ApmFargateCount *int64 `json:"apm_fargate_count,omitempty"` + ApmFargateCount datadog.NullableInt64 `json:"apm_fargate_count,omitempty"` // The Application Security Monitoring ECS Fargate tasks during the given hour. - AppsecFargateCount *int64 `json:"appsec_fargate_count,omitempty"` + AppsecFargateCount datadog.NullableInt64 `json:"appsec_fargate_count,omitempty"` // The average profiled task count for Fargate Profiling. - AvgProfiledFargateTasks *int64 `json:"avg_profiled_fargate_tasks,omitempty"` + AvgProfiledFargateTasks datadog.NullableInt64 `json:"avg_profiled_fargate_tasks,omitempty"` // The hour for the usage. Hour *time.Time `json:"hour,omitempty"` // The organization name. @@ -24,7 +26,7 @@ type UsageFargateHour struct { // The organization public ID. PublicId *string `json:"public_id,omitempty"` // The number of Fargate tasks run. - TasksCount *int64 `json:"tasks_count,omitempty"` + TasksCount datadog.NullableInt64 `json:"tasks_count,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} @@ -47,88 +49,121 @@ func NewUsageFargateHourWithDefaults() *UsageFargateHour { return &this } -// GetApmFargateCount returns the ApmFargateCount field value if set, zero value otherwise. +// GetApmFargateCount returns the ApmFargateCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageFargateHour) GetApmFargateCount() int64 { - if o == nil || o.ApmFargateCount == nil { + if o == nil || o.ApmFargateCount.Get() == nil { var ret int64 return ret } - return *o.ApmFargateCount + return *o.ApmFargateCount.Get() } // GetApmFargateCountOk returns a tuple with the ApmFargateCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageFargateHour) GetApmFargateCountOk() (*int64, bool) { - if o == nil || o.ApmFargateCount == nil { + if o == nil { return nil, false } - return o.ApmFargateCount, true + return o.ApmFargateCount.Get(), o.ApmFargateCount.IsSet() } // HasApmFargateCount returns a boolean if a field has been set. func (o *UsageFargateHour) HasApmFargateCount() bool { - return o != nil && o.ApmFargateCount != nil + return o != nil && o.ApmFargateCount.IsSet() } -// SetApmFargateCount gets a reference to the given int64 and assigns it to the ApmFargateCount field. +// SetApmFargateCount gets a reference to the given datadog.NullableInt64 and assigns it to the ApmFargateCount field. func (o *UsageFargateHour) SetApmFargateCount(v int64) { - o.ApmFargateCount = &v + o.ApmFargateCount.Set(&v) +} + +// SetApmFargateCountNil sets the value for ApmFargateCount to be an explicit nil. +func (o *UsageFargateHour) SetApmFargateCountNil() { + o.ApmFargateCount.Set(nil) +} + +// UnsetApmFargateCount ensures that no value is present for ApmFargateCount, not even an explicit nil. +func (o *UsageFargateHour) UnsetApmFargateCount() { + o.ApmFargateCount.Unset() } -// GetAppsecFargateCount returns the AppsecFargateCount field value if set, zero value otherwise. +// GetAppsecFargateCount returns the AppsecFargateCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageFargateHour) GetAppsecFargateCount() int64 { - if o == nil || o.AppsecFargateCount == nil { + if o == nil || o.AppsecFargateCount.Get() == nil { var ret int64 return ret } - return *o.AppsecFargateCount + return *o.AppsecFargateCount.Get() } // GetAppsecFargateCountOk returns a tuple with the AppsecFargateCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageFargateHour) GetAppsecFargateCountOk() (*int64, bool) { - if o == nil || o.AppsecFargateCount == nil { + if o == nil { return nil, false } - return o.AppsecFargateCount, true + return o.AppsecFargateCount.Get(), o.AppsecFargateCount.IsSet() } // HasAppsecFargateCount returns a boolean if a field has been set. func (o *UsageFargateHour) HasAppsecFargateCount() bool { - return o != nil && o.AppsecFargateCount != nil + return o != nil && o.AppsecFargateCount.IsSet() } -// SetAppsecFargateCount gets a reference to the given int64 and assigns it to the AppsecFargateCount field. +// SetAppsecFargateCount gets a reference to the given datadog.NullableInt64 and assigns it to the AppsecFargateCount field. func (o *UsageFargateHour) SetAppsecFargateCount(v int64) { - o.AppsecFargateCount = &v + o.AppsecFargateCount.Set(&v) +} + +// SetAppsecFargateCountNil sets the value for AppsecFargateCount to be an explicit nil. +func (o *UsageFargateHour) SetAppsecFargateCountNil() { + o.AppsecFargateCount.Set(nil) +} + +// UnsetAppsecFargateCount ensures that no value is present for AppsecFargateCount, not even an explicit nil. +func (o *UsageFargateHour) UnsetAppsecFargateCount() { + o.AppsecFargateCount.Unset() } -// GetAvgProfiledFargateTasks returns the AvgProfiledFargateTasks field value if set, zero value otherwise. +// GetAvgProfiledFargateTasks returns the AvgProfiledFargateTasks field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageFargateHour) GetAvgProfiledFargateTasks() int64 { - if o == nil || o.AvgProfiledFargateTasks == nil { + if o == nil || o.AvgProfiledFargateTasks.Get() == nil { var ret int64 return ret } - return *o.AvgProfiledFargateTasks + return *o.AvgProfiledFargateTasks.Get() } // GetAvgProfiledFargateTasksOk returns a tuple with the AvgProfiledFargateTasks field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageFargateHour) GetAvgProfiledFargateTasksOk() (*int64, bool) { - if o == nil || o.AvgProfiledFargateTasks == nil { + if o == nil { return nil, false } - return o.AvgProfiledFargateTasks, true + return o.AvgProfiledFargateTasks.Get(), o.AvgProfiledFargateTasks.IsSet() } // HasAvgProfiledFargateTasks returns a boolean if a field has been set. func (o *UsageFargateHour) HasAvgProfiledFargateTasks() bool { - return o != nil && o.AvgProfiledFargateTasks != nil + return o != nil && o.AvgProfiledFargateTasks.IsSet() } -// SetAvgProfiledFargateTasks gets a reference to the given int64 and assigns it to the AvgProfiledFargateTasks field. +// SetAvgProfiledFargateTasks gets a reference to the given datadog.NullableInt64 and assigns it to the AvgProfiledFargateTasks field. func (o *UsageFargateHour) SetAvgProfiledFargateTasks(v int64) { - o.AvgProfiledFargateTasks = &v + o.AvgProfiledFargateTasks.Set(&v) +} + +// SetAvgProfiledFargateTasksNil sets the value for AvgProfiledFargateTasks to be an explicit nil. +func (o *UsageFargateHour) SetAvgProfiledFargateTasksNil() { + o.AvgProfiledFargateTasks.Set(nil) +} + +// UnsetAvgProfiledFargateTasks ensures that no value is present for AvgProfiledFargateTasks, not even an explicit nil. +func (o *UsageFargateHour) UnsetAvgProfiledFargateTasks() { + o.AvgProfiledFargateTasks.Unset() } // GetHour returns the Hour field value if set, zero value otherwise. @@ -215,32 +250,43 @@ func (o *UsageFargateHour) SetPublicId(v string) { o.PublicId = &v } -// GetTasksCount returns the TasksCount field value if set, zero value otherwise. +// GetTasksCount returns the TasksCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageFargateHour) GetTasksCount() int64 { - if o == nil || o.TasksCount == nil { + if o == nil || o.TasksCount.Get() == nil { var ret int64 return ret } - return *o.TasksCount + return *o.TasksCount.Get() } // GetTasksCountOk returns a tuple with the TasksCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageFargateHour) GetTasksCountOk() (*int64, bool) { - if o == nil || o.TasksCount == nil { + if o == nil { return nil, false } - return o.TasksCount, true + return o.TasksCount.Get(), o.TasksCount.IsSet() } // HasTasksCount returns a boolean if a field has been set. func (o *UsageFargateHour) HasTasksCount() bool { - return o != nil && o.TasksCount != nil + return o != nil && o.TasksCount.IsSet() } -// SetTasksCount gets a reference to the given int64 and assigns it to the TasksCount field. +// SetTasksCount gets a reference to the given datadog.NullableInt64 and assigns it to the TasksCount field. func (o *UsageFargateHour) SetTasksCount(v int64) { - o.TasksCount = &v + o.TasksCount.Set(&v) +} + +// SetTasksCountNil sets the value for TasksCount to be an explicit nil. +func (o *UsageFargateHour) SetTasksCountNil() { + o.TasksCount.Set(nil) +} + +// UnsetTasksCount ensures that no value is present for TasksCount, not even an explicit nil. +func (o *UsageFargateHour) UnsetTasksCount() { + o.TasksCount.Unset() } // MarshalJSON serializes the struct using spec logic. @@ -249,14 +295,14 @@ func (o UsageFargateHour) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return json.Marshal(o.UnparsedObject) } - if o.ApmFargateCount != nil { - toSerialize["apm_fargate_count"] = o.ApmFargateCount + if o.ApmFargateCount.IsSet() { + toSerialize["apm_fargate_count"] = o.ApmFargateCount.Get() } - if o.AppsecFargateCount != nil { - toSerialize["appsec_fargate_count"] = o.AppsecFargateCount + if o.AppsecFargateCount.IsSet() { + toSerialize["appsec_fargate_count"] = o.AppsecFargateCount.Get() } - if o.AvgProfiledFargateTasks != nil { - toSerialize["avg_profiled_fargate_tasks"] = o.AvgProfiledFargateTasks + if o.AvgProfiledFargateTasks.IsSet() { + toSerialize["avg_profiled_fargate_tasks"] = o.AvgProfiledFargateTasks.Get() } if o.Hour != nil { if o.Hour.Nanosecond() == 0 { @@ -271,8 +317,8 @@ func (o UsageFargateHour) MarshalJSON() ([]byte, error) { if o.PublicId != nil { toSerialize["public_id"] = o.PublicId } - if o.TasksCount != nil { - toSerialize["tasks_count"] = o.TasksCount + if o.TasksCount.IsSet() { + toSerialize["tasks_count"] = o.TasksCount.Get() } for key, value := range o.AdditionalProperties { @@ -285,13 +331,13 @@ func (o UsageFargateHour) MarshalJSON() ([]byte, error) { func (o *UsageFargateHour) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - ApmFargateCount *int64 `json:"apm_fargate_count,omitempty"` - AppsecFargateCount *int64 `json:"appsec_fargate_count,omitempty"` - AvgProfiledFargateTasks *int64 `json:"avg_profiled_fargate_tasks,omitempty"` - Hour *time.Time `json:"hour,omitempty"` - OrgName *string `json:"org_name,omitempty"` - PublicId *string `json:"public_id,omitempty"` - TasksCount *int64 `json:"tasks_count,omitempty"` + ApmFargateCount datadog.NullableInt64 `json:"apm_fargate_count,omitempty"` + AppsecFargateCount datadog.NullableInt64 `json:"appsec_fargate_count,omitempty"` + AvgProfiledFargateTasks datadog.NullableInt64 `json:"avg_profiled_fargate_tasks,omitempty"` + Hour *time.Time `json:"hour,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` + TasksCount datadog.NullableInt64 `json:"tasks_count,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV1/model_usage_host_hour.go b/api/datadogV1/model_usage_host_hour.go index fd2f8c1a19d..bfd285b8ab3 100644 --- a/api/datadogV1/model_usage_host_hour.go +++ b/api/datadogV1/model_usage_host_hour.go @@ -7,53 +7,55 @@ package datadogV1 import ( "encoding/json" "time" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // UsageHostHour Number of hosts/containers recorded for each hour for a given organization. type UsageHostHour struct { // Contains the total number of infrastructure hosts reporting // during a given hour that were running the Datadog Agent. - AgentHostCount *int64 `json:"agent_host_count,omitempty"` + AgentHostCount datadog.NullableInt64 `json:"agent_host_count,omitempty"` // Contains the total number of hosts that reported through Alibaba integration // (and were NOT running the Datadog Agent). - AlibabaHostCount *int64 `json:"alibaba_host_count,omitempty"` + AlibabaHostCount datadog.NullableInt64 `json:"alibaba_host_count,omitempty"` // Contains the total number of Azure App Services hosts using APM. - ApmAzureAppServiceHostCount *int64 `json:"apm_azure_app_service_host_count,omitempty"` + ApmAzureAppServiceHostCount datadog.NullableInt64 `json:"apm_azure_app_service_host_count,omitempty"` // Shows the total number of hosts using APM during the hour, // these are counted as billable (except during trial periods). - ApmHostCount *int64 `json:"apm_host_count,omitempty"` + ApmHostCount datadog.NullableInt64 `json:"apm_host_count,omitempty"` // Contains the total number of hosts that reported through the AWS integration // (and were NOT running the Datadog Agent). - AwsHostCount *int64 `json:"aws_host_count,omitempty"` + AwsHostCount datadog.NullableInt64 `json:"aws_host_count,omitempty"` // Contains the total number of hosts that reported through Azure integration // (and were NOT running the Datadog Agent). - AzureHostCount *int64 `json:"azure_host_count,omitempty"` + AzureHostCount datadog.NullableInt64 `json:"azure_host_count,omitempty"` // Shows the total number of containers reported by the Docker integration during the hour. - ContainerCount *int64 `json:"container_count,omitempty"` + ContainerCount datadog.NullableInt64 `json:"container_count,omitempty"` // Contains the total number of hosts that reported through the Google Cloud integration // (and were NOT running the Datadog Agent). - GcpHostCount *int64 `json:"gcp_host_count,omitempty"` + GcpHostCount datadog.NullableInt64 `json:"gcp_host_count,omitempty"` // Contains the total number of Heroku dynos reported by the Datadog Agent. - HerokuHostCount *int64 `json:"heroku_host_count,omitempty"` + HerokuHostCount datadog.NullableInt64 `json:"heroku_host_count,omitempty"` // Contains the total number of billable infrastructure hosts reporting during a given hour. // This is the sum of `agent_host_count`, `aws_host_count`, and `gcp_host_count`. - HostCount *int64 `json:"host_count,omitempty"` + HostCount datadog.NullableInt64 `json:"host_count,omitempty"` // The hour for the usage. - Hour *time.Time `json:"hour,omitempty"` + Hour datadog.NullableTime `json:"hour,omitempty"` // Contains the total number of hosts that reported through the Azure App Services integration // (and were NOT running the Datadog Agent). - InfraAzureAppService *int64 `json:"infra_azure_app_service,omitempty"` + InfraAzureAppService datadog.NullableInt64 `json:"infra_azure_app_service,omitempty"` // Contains the total number of hosts using APM reported by Datadog exporter for the OpenTelemetry Collector. - OpentelemetryApmHostCount *int64 `json:"opentelemetry_apm_host_count,omitempty"` + OpentelemetryApmHostCount datadog.NullableInt64 `json:"opentelemetry_apm_host_count,omitempty"` // Contains the total number of hosts reported by Datadog exporter for the OpenTelemetry Collector. - OpentelemetryHostCount *int64 `json:"opentelemetry_host_count,omitempty"` + OpentelemetryHostCount datadog.NullableInt64 `json:"opentelemetry_host_count,omitempty"` // The organization name. OrgName *string `json:"org_name,omitempty"` // The organization public ID. PublicId *string `json:"public_id,omitempty"` // Contains the total number of hosts that reported through vSphere integration // (and were NOT running the Datadog Agent). - VsphereHostCount *int64 `json:"vsphere_host_count,omitempty"` + VsphereHostCount datadog.NullableInt64 `json:"vsphere_host_count,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} @@ -76,396 +78,550 @@ func NewUsageHostHourWithDefaults() *UsageHostHour { return &this } -// GetAgentHostCount returns the AgentHostCount field value if set, zero value otherwise. +// GetAgentHostCount returns the AgentHostCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageHostHour) GetAgentHostCount() int64 { - if o == nil || o.AgentHostCount == nil { + if o == nil || o.AgentHostCount.Get() == nil { var ret int64 return ret } - return *o.AgentHostCount + return *o.AgentHostCount.Get() } // GetAgentHostCountOk returns a tuple with the AgentHostCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageHostHour) GetAgentHostCountOk() (*int64, bool) { - if o == nil || o.AgentHostCount == nil { + if o == nil { return nil, false } - return o.AgentHostCount, true + return o.AgentHostCount.Get(), o.AgentHostCount.IsSet() } // HasAgentHostCount returns a boolean if a field has been set. func (o *UsageHostHour) HasAgentHostCount() bool { - return o != nil && o.AgentHostCount != nil + return o != nil && o.AgentHostCount.IsSet() } -// SetAgentHostCount gets a reference to the given int64 and assigns it to the AgentHostCount field. +// SetAgentHostCount gets a reference to the given datadog.NullableInt64 and assigns it to the AgentHostCount field. func (o *UsageHostHour) SetAgentHostCount(v int64) { - o.AgentHostCount = &v + o.AgentHostCount.Set(&v) +} + +// SetAgentHostCountNil sets the value for AgentHostCount to be an explicit nil. +func (o *UsageHostHour) SetAgentHostCountNil() { + o.AgentHostCount.Set(nil) +} + +// UnsetAgentHostCount ensures that no value is present for AgentHostCount, not even an explicit nil. +func (o *UsageHostHour) UnsetAgentHostCount() { + o.AgentHostCount.Unset() } -// GetAlibabaHostCount returns the AlibabaHostCount field value if set, zero value otherwise. +// GetAlibabaHostCount returns the AlibabaHostCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageHostHour) GetAlibabaHostCount() int64 { - if o == nil || o.AlibabaHostCount == nil { + if o == nil || o.AlibabaHostCount.Get() == nil { var ret int64 return ret } - return *o.AlibabaHostCount + return *o.AlibabaHostCount.Get() } // GetAlibabaHostCountOk returns a tuple with the AlibabaHostCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageHostHour) GetAlibabaHostCountOk() (*int64, bool) { - if o == nil || o.AlibabaHostCount == nil { + if o == nil { return nil, false } - return o.AlibabaHostCount, true + return o.AlibabaHostCount.Get(), o.AlibabaHostCount.IsSet() } // HasAlibabaHostCount returns a boolean if a field has been set. func (o *UsageHostHour) HasAlibabaHostCount() bool { - return o != nil && o.AlibabaHostCount != nil + return o != nil && o.AlibabaHostCount.IsSet() } -// SetAlibabaHostCount gets a reference to the given int64 and assigns it to the AlibabaHostCount field. +// SetAlibabaHostCount gets a reference to the given datadog.NullableInt64 and assigns it to the AlibabaHostCount field. func (o *UsageHostHour) SetAlibabaHostCount(v int64) { - o.AlibabaHostCount = &v + o.AlibabaHostCount.Set(&v) +} + +// SetAlibabaHostCountNil sets the value for AlibabaHostCount to be an explicit nil. +func (o *UsageHostHour) SetAlibabaHostCountNil() { + o.AlibabaHostCount.Set(nil) +} + +// UnsetAlibabaHostCount ensures that no value is present for AlibabaHostCount, not even an explicit nil. +func (o *UsageHostHour) UnsetAlibabaHostCount() { + o.AlibabaHostCount.Unset() } -// GetApmAzureAppServiceHostCount returns the ApmAzureAppServiceHostCount field value if set, zero value otherwise. +// GetApmAzureAppServiceHostCount returns the ApmAzureAppServiceHostCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageHostHour) GetApmAzureAppServiceHostCount() int64 { - if o == nil || o.ApmAzureAppServiceHostCount == nil { + if o == nil || o.ApmAzureAppServiceHostCount.Get() == nil { var ret int64 return ret } - return *o.ApmAzureAppServiceHostCount + return *o.ApmAzureAppServiceHostCount.Get() } // GetApmAzureAppServiceHostCountOk returns a tuple with the ApmAzureAppServiceHostCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageHostHour) GetApmAzureAppServiceHostCountOk() (*int64, bool) { - if o == nil || o.ApmAzureAppServiceHostCount == nil { + if o == nil { return nil, false } - return o.ApmAzureAppServiceHostCount, true + return o.ApmAzureAppServiceHostCount.Get(), o.ApmAzureAppServiceHostCount.IsSet() } // HasApmAzureAppServiceHostCount returns a boolean if a field has been set. func (o *UsageHostHour) HasApmAzureAppServiceHostCount() bool { - return o != nil && o.ApmAzureAppServiceHostCount != nil + return o != nil && o.ApmAzureAppServiceHostCount.IsSet() } -// SetApmAzureAppServiceHostCount gets a reference to the given int64 and assigns it to the ApmAzureAppServiceHostCount field. +// SetApmAzureAppServiceHostCount gets a reference to the given datadog.NullableInt64 and assigns it to the ApmAzureAppServiceHostCount field. func (o *UsageHostHour) SetApmAzureAppServiceHostCount(v int64) { - o.ApmAzureAppServiceHostCount = &v + o.ApmAzureAppServiceHostCount.Set(&v) +} + +// SetApmAzureAppServiceHostCountNil sets the value for ApmAzureAppServiceHostCount to be an explicit nil. +func (o *UsageHostHour) SetApmAzureAppServiceHostCountNil() { + o.ApmAzureAppServiceHostCount.Set(nil) +} + +// UnsetApmAzureAppServiceHostCount ensures that no value is present for ApmAzureAppServiceHostCount, not even an explicit nil. +func (o *UsageHostHour) UnsetApmAzureAppServiceHostCount() { + o.ApmAzureAppServiceHostCount.Unset() } -// GetApmHostCount returns the ApmHostCount field value if set, zero value otherwise. +// GetApmHostCount returns the ApmHostCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageHostHour) GetApmHostCount() int64 { - if o == nil || o.ApmHostCount == nil { + if o == nil || o.ApmHostCount.Get() == nil { var ret int64 return ret } - return *o.ApmHostCount + return *o.ApmHostCount.Get() } // GetApmHostCountOk returns a tuple with the ApmHostCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageHostHour) GetApmHostCountOk() (*int64, bool) { - if o == nil || o.ApmHostCount == nil { + if o == nil { return nil, false } - return o.ApmHostCount, true + return o.ApmHostCount.Get(), o.ApmHostCount.IsSet() } // HasApmHostCount returns a boolean if a field has been set. func (o *UsageHostHour) HasApmHostCount() bool { - return o != nil && o.ApmHostCount != nil + return o != nil && o.ApmHostCount.IsSet() } -// SetApmHostCount gets a reference to the given int64 and assigns it to the ApmHostCount field. +// SetApmHostCount gets a reference to the given datadog.NullableInt64 and assigns it to the ApmHostCount field. func (o *UsageHostHour) SetApmHostCount(v int64) { - o.ApmHostCount = &v + o.ApmHostCount.Set(&v) +} + +// SetApmHostCountNil sets the value for ApmHostCount to be an explicit nil. +func (o *UsageHostHour) SetApmHostCountNil() { + o.ApmHostCount.Set(nil) } -// GetAwsHostCount returns the AwsHostCount field value if set, zero value otherwise. +// UnsetApmHostCount ensures that no value is present for ApmHostCount, not even an explicit nil. +func (o *UsageHostHour) UnsetApmHostCount() { + o.ApmHostCount.Unset() +} + +// GetAwsHostCount returns the AwsHostCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageHostHour) GetAwsHostCount() int64 { - if o == nil || o.AwsHostCount == nil { + if o == nil || o.AwsHostCount.Get() == nil { var ret int64 return ret } - return *o.AwsHostCount + return *o.AwsHostCount.Get() } // GetAwsHostCountOk returns a tuple with the AwsHostCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageHostHour) GetAwsHostCountOk() (*int64, bool) { - if o == nil || o.AwsHostCount == nil { + if o == nil { return nil, false } - return o.AwsHostCount, true + return o.AwsHostCount.Get(), o.AwsHostCount.IsSet() } // HasAwsHostCount returns a boolean if a field has been set. func (o *UsageHostHour) HasAwsHostCount() bool { - return o != nil && o.AwsHostCount != nil + return o != nil && o.AwsHostCount.IsSet() } -// SetAwsHostCount gets a reference to the given int64 and assigns it to the AwsHostCount field. +// SetAwsHostCount gets a reference to the given datadog.NullableInt64 and assigns it to the AwsHostCount field. func (o *UsageHostHour) SetAwsHostCount(v int64) { - o.AwsHostCount = &v + o.AwsHostCount.Set(&v) +} + +// SetAwsHostCountNil sets the value for AwsHostCount to be an explicit nil. +func (o *UsageHostHour) SetAwsHostCountNil() { + o.AwsHostCount.Set(nil) +} + +// UnsetAwsHostCount ensures that no value is present for AwsHostCount, not even an explicit nil. +func (o *UsageHostHour) UnsetAwsHostCount() { + o.AwsHostCount.Unset() } -// GetAzureHostCount returns the AzureHostCount field value if set, zero value otherwise. +// GetAzureHostCount returns the AzureHostCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageHostHour) GetAzureHostCount() int64 { - if o == nil || o.AzureHostCount == nil { + if o == nil || o.AzureHostCount.Get() == nil { var ret int64 return ret } - return *o.AzureHostCount + return *o.AzureHostCount.Get() } // GetAzureHostCountOk returns a tuple with the AzureHostCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageHostHour) GetAzureHostCountOk() (*int64, bool) { - if o == nil || o.AzureHostCount == nil { + if o == nil { return nil, false } - return o.AzureHostCount, true + return o.AzureHostCount.Get(), o.AzureHostCount.IsSet() } // HasAzureHostCount returns a boolean if a field has been set. func (o *UsageHostHour) HasAzureHostCount() bool { - return o != nil && o.AzureHostCount != nil + return o != nil && o.AzureHostCount.IsSet() } -// SetAzureHostCount gets a reference to the given int64 and assigns it to the AzureHostCount field. +// SetAzureHostCount gets a reference to the given datadog.NullableInt64 and assigns it to the AzureHostCount field. func (o *UsageHostHour) SetAzureHostCount(v int64) { - o.AzureHostCount = &v + o.AzureHostCount.Set(&v) +} + +// SetAzureHostCountNil sets the value for AzureHostCount to be an explicit nil. +func (o *UsageHostHour) SetAzureHostCountNil() { + o.AzureHostCount.Set(nil) } -// GetContainerCount returns the ContainerCount field value if set, zero value otherwise. +// UnsetAzureHostCount ensures that no value is present for AzureHostCount, not even an explicit nil. +func (o *UsageHostHour) UnsetAzureHostCount() { + o.AzureHostCount.Unset() +} + +// GetContainerCount returns the ContainerCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageHostHour) GetContainerCount() int64 { - if o == nil || o.ContainerCount == nil { + if o == nil || o.ContainerCount.Get() == nil { var ret int64 return ret } - return *o.ContainerCount + return *o.ContainerCount.Get() } // GetContainerCountOk returns a tuple with the ContainerCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageHostHour) GetContainerCountOk() (*int64, bool) { - if o == nil || o.ContainerCount == nil { + if o == nil { return nil, false } - return o.ContainerCount, true + return o.ContainerCount.Get(), o.ContainerCount.IsSet() } // HasContainerCount returns a boolean if a field has been set. func (o *UsageHostHour) HasContainerCount() bool { - return o != nil && o.ContainerCount != nil + return o != nil && o.ContainerCount.IsSet() } -// SetContainerCount gets a reference to the given int64 and assigns it to the ContainerCount field. +// SetContainerCount gets a reference to the given datadog.NullableInt64 and assigns it to the ContainerCount field. func (o *UsageHostHour) SetContainerCount(v int64) { - o.ContainerCount = &v + o.ContainerCount.Set(&v) +} + +// SetContainerCountNil sets the value for ContainerCount to be an explicit nil. +func (o *UsageHostHour) SetContainerCountNil() { + o.ContainerCount.Set(nil) } -// GetGcpHostCount returns the GcpHostCount field value if set, zero value otherwise. +// UnsetContainerCount ensures that no value is present for ContainerCount, not even an explicit nil. +func (o *UsageHostHour) UnsetContainerCount() { + o.ContainerCount.Unset() +} + +// GetGcpHostCount returns the GcpHostCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageHostHour) GetGcpHostCount() int64 { - if o == nil || o.GcpHostCount == nil { + if o == nil || o.GcpHostCount.Get() == nil { var ret int64 return ret } - return *o.GcpHostCount + return *o.GcpHostCount.Get() } // GetGcpHostCountOk returns a tuple with the GcpHostCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageHostHour) GetGcpHostCountOk() (*int64, bool) { - if o == nil || o.GcpHostCount == nil { + if o == nil { return nil, false } - return o.GcpHostCount, true + return o.GcpHostCount.Get(), o.GcpHostCount.IsSet() } // HasGcpHostCount returns a boolean if a field has been set. func (o *UsageHostHour) HasGcpHostCount() bool { - return o != nil && o.GcpHostCount != nil + return o != nil && o.GcpHostCount.IsSet() } -// SetGcpHostCount gets a reference to the given int64 and assigns it to the GcpHostCount field. +// SetGcpHostCount gets a reference to the given datadog.NullableInt64 and assigns it to the GcpHostCount field. func (o *UsageHostHour) SetGcpHostCount(v int64) { - o.GcpHostCount = &v + o.GcpHostCount.Set(&v) +} + +// SetGcpHostCountNil sets the value for GcpHostCount to be an explicit nil. +func (o *UsageHostHour) SetGcpHostCountNil() { + o.GcpHostCount.Set(nil) } -// GetHerokuHostCount returns the HerokuHostCount field value if set, zero value otherwise. +// UnsetGcpHostCount ensures that no value is present for GcpHostCount, not even an explicit nil. +func (o *UsageHostHour) UnsetGcpHostCount() { + o.GcpHostCount.Unset() +} + +// GetHerokuHostCount returns the HerokuHostCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageHostHour) GetHerokuHostCount() int64 { - if o == nil || o.HerokuHostCount == nil { + if o == nil || o.HerokuHostCount.Get() == nil { var ret int64 return ret } - return *o.HerokuHostCount + return *o.HerokuHostCount.Get() } // GetHerokuHostCountOk returns a tuple with the HerokuHostCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageHostHour) GetHerokuHostCountOk() (*int64, bool) { - if o == nil || o.HerokuHostCount == nil { + if o == nil { return nil, false } - return o.HerokuHostCount, true + return o.HerokuHostCount.Get(), o.HerokuHostCount.IsSet() } // HasHerokuHostCount returns a boolean if a field has been set. func (o *UsageHostHour) HasHerokuHostCount() bool { - return o != nil && o.HerokuHostCount != nil + return o != nil && o.HerokuHostCount.IsSet() } -// SetHerokuHostCount gets a reference to the given int64 and assigns it to the HerokuHostCount field. +// SetHerokuHostCount gets a reference to the given datadog.NullableInt64 and assigns it to the HerokuHostCount field. func (o *UsageHostHour) SetHerokuHostCount(v int64) { - o.HerokuHostCount = &v + o.HerokuHostCount.Set(&v) +} + +// SetHerokuHostCountNil sets the value for HerokuHostCount to be an explicit nil. +func (o *UsageHostHour) SetHerokuHostCountNil() { + o.HerokuHostCount.Set(nil) } -// GetHostCount returns the HostCount field value if set, zero value otherwise. +// UnsetHerokuHostCount ensures that no value is present for HerokuHostCount, not even an explicit nil. +func (o *UsageHostHour) UnsetHerokuHostCount() { + o.HerokuHostCount.Unset() +} + +// GetHostCount returns the HostCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageHostHour) GetHostCount() int64 { - if o == nil || o.HostCount == nil { + if o == nil || o.HostCount.Get() == nil { var ret int64 return ret } - return *o.HostCount + return *o.HostCount.Get() } // GetHostCountOk returns a tuple with the HostCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageHostHour) GetHostCountOk() (*int64, bool) { - if o == nil || o.HostCount == nil { + if o == nil { return nil, false } - return o.HostCount, true + return o.HostCount.Get(), o.HostCount.IsSet() } // HasHostCount returns a boolean if a field has been set. func (o *UsageHostHour) HasHostCount() bool { - return o != nil && o.HostCount != nil + return o != nil && o.HostCount.IsSet() } -// SetHostCount gets a reference to the given int64 and assigns it to the HostCount field. +// SetHostCount gets a reference to the given datadog.NullableInt64 and assigns it to the HostCount field. func (o *UsageHostHour) SetHostCount(v int64) { - o.HostCount = &v + o.HostCount.Set(&v) +} + +// SetHostCountNil sets the value for HostCount to be an explicit nil. +func (o *UsageHostHour) SetHostCountNil() { + o.HostCount.Set(nil) } -// GetHour returns the Hour field value if set, zero value otherwise. +// UnsetHostCount ensures that no value is present for HostCount, not even an explicit nil. +func (o *UsageHostHour) UnsetHostCount() { + o.HostCount.Unset() +} + +// GetHour returns the Hour field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageHostHour) GetHour() time.Time { - if o == nil || o.Hour == nil { + if o == nil || o.Hour.Get() == nil { var ret time.Time return ret } - return *o.Hour + return *o.Hour.Get() } // GetHourOk returns a tuple with the Hour field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageHostHour) GetHourOk() (*time.Time, bool) { - if o == nil || o.Hour == nil { + if o == nil { return nil, false } - return o.Hour, true + return o.Hour.Get(), o.Hour.IsSet() } // HasHour returns a boolean if a field has been set. func (o *UsageHostHour) HasHour() bool { - return o != nil && o.Hour != nil + return o != nil && o.Hour.IsSet() } -// SetHour gets a reference to the given time.Time and assigns it to the Hour field. +// SetHour gets a reference to the given datadog.NullableTime and assigns it to the Hour field. func (o *UsageHostHour) SetHour(v time.Time) { - o.Hour = &v + o.Hour.Set(&v) +} + +// SetHourNil sets the value for Hour to be an explicit nil. +func (o *UsageHostHour) SetHourNil() { + o.Hour.Set(nil) } -// GetInfraAzureAppService returns the InfraAzureAppService field value if set, zero value otherwise. +// UnsetHour ensures that no value is present for Hour, not even an explicit nil. +func (o *UsageHostHour) UnsetHour() { + o.Hour.Unset() +} + +// GetInfraAzureAppService returns the InfraAzureAppService field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageHostHour) GetInfraAzureAppService() int64 { - if o == nil || o.InfraAzureAppService == nil { + if o == nil || o.InfraAzureAppService.Get() == nil { var ret int64 return ret } - return *o.InfraAzureAppService + return *o.InfraAzureAppService.Get() } // GetInfraAzureAppServiceOk returns a tuple with the InfraAzureAppService field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageHostHour) GetInfraAzureAppServiceOk() (*int64, bool) { - if o == nil || o.InfraAzureAppService == nil { + if o == nil { return nil, false } - return o.InfraAzureAppService, true + return o.InfraAzureAppService.Get(), o.InfraAzureAppService.IsSet() } // HasInfraAzureAppService returns a boolean if a field has been set. func (o *UsageHostHour) HasInfraAzureAppService() bool { - return o != nil && o.InfraAzureAppService != nil + return o != nil && o.InfraAzureAppService.IsSet() } -// SetInfraAzureAppService gets a reference to the given int64 and assigns it to the InfraAzureAppService field. +// SetInfraAzureAppService gets a reference to the given datadog.NullableInt64 and assigns it to the InfraAzureAppService field. func (o *UsageHostHour) SetInfraAzureAppService(v int64) { - o.InfraAzureAppService = &v + o.InfraAzureAppService.Set(&v) +} + +// SetInfraAzureAppServiceNil sets the value for InfraAzureAppService to be an explicit nil. +func (o *UsageHostHour) SetInfraAzureAppServiceNil() { + o.InfraAzureAppService.Set(nil) } -// GetOpentelemetryApmHostCount returns the OpentelemetryApmHostCount field value if set, zero value otherwise. +// UnsetInfraAzureAppService ensures that no value is present for InfraAzureAppService, not even an explicit nil. +func (o *UsageHostHour) UnsetInfraAzureAppService() { + o.InfraAzureAppService.Unset() +} + +// GetOpentelemetryApmHostCount returns the OpentelemetryApmHostCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageHostHour) GetOpentelemetryApmHostCount() int64 { - if o == nil || o.OpentelemetryApmHostCount == nil { + if o == nil || o.OpentelemetryApmHostCount.Get() == nil { var ret int64 return ret } - return *o.OpentelemetryApmHostCount + return *o.OpentelemetryApmHostCount.Get() } // GetOpentelemetryApmHostCountOk returns a tuple with the OpentelemetryApmHostCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageHostHour) GetOpentelemetryApmHostCountOk() (*int64, bool) { - if o == nil || o.OpentelemetryApmHostCount == nil { + if o == nil { return nil, false } - return o.OpentelemetryApmHostCount, true + return o.OpentelemetryApmHostCount.Get(), o.OpentelemetryApmHostCount.IsSet() } // HasOpentelemetryApmHostCount returns a boolean if a field has been set. func (o *UsageHostHour) HasOpentelemetryApmHostCount() bool { - return o != nil && o.OpentelemetryApmHostCount != nil + return o != nil && o.OpentelemetryApmHostCount.IsSet() } -// SetOpentelemetryApmHostCount gets a reference to the given int64 and assigns it to the OpentelemetryApmHostCount field. +// SetOpentelemetryApmHostCount gets a reference to the given datadog.NullableInt64 and assigns it to the OpentelemetryApmHostCount field. func (o *UsageHostHour) SetOpentelemetryApmHostCount(v int64) { - o.OpentelemetryApmHostCount = &v + o.OpentelemetryApmHostCount.Set(&v) +} + +// SetOpentelemetryApmHostCountNil sets the value for OpentelemetryApmHostCount to be an explicit nil. +func (o *UsageHostHour) SetOpentelemetryApmHostCountNil() { + o.OpentelemetryApmHostCount.Set(nil) } -// GetOpentelemetryHostCount returns the OpentelemetryHostCount field value if set, zero value otherwise. +// UnsetOpentelemetryApmHostCount ensures that no value is present for OpentelemetryApmHostCount, not even an explicit nil. +func (o *UsageHostHour) UnsetOpentelemetryApmHostCount() { + o.OpentelemetryApmHostCount.Unset() +} + +// GetOpentelemetryHostCount returns the OpentelemetryHostCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageHostHour) GetOpentelemetryHostCount() int64 { - if o == nil || o.OpentelemetryHostCount == nil { + if o == nil || o.OpentelemetryHostCount.Get() == nil { var ret int64 return ret } - return *o.OpentelemetryHostCount + return *o.OpentelemetryHostCount.Get() } // GetOpentelemetryHostCountOk returns a tuple with the OpentelemetryHostCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageHostHour) GetOpentelemetryHostCountOk() (*int64, bool) { - if o == nil || o.OpentelemetryHostCount == nil { + if o == nil { return nil, false } - return o.OpentelemetryHostCount, true + return o.OpentelemetryHostCount.Get(), o.OpentelemetryHostCount.IsSet() } // HasOpentelemetryHostCount returns a boolean if a field has been set. func (o *UsageHostHour) HasOpentelemetryHostCount() bool { - return o != nil && o.OpentelemetryHostCount != nil + return o != nil && o.OpentelemetryHostCount.IsSet() } -// SetOpentelemetryHostCount gets a reference to the given int64 and assigns it to the OpentelemetryHostCount field. +// SetOpentelemetryHostCount gets a reference to the given datadog.NullableInt64 and assigns it to the OpentelemetryHostCount field. func (o *UsageHostHour) SetOpentelemetryHostCount(v int64) { - o.OpentelemetryHostCount = &v + o.OpentelemetryHostCount.Set(&v) +} + +// SetOpentelemetryHostCountNil sets the value for OpentelemetryHostCount to be an explicit nil. +func (o *UsageHostHour) SetOpentelemetryHostCountNil() { + o.OpentelemetryHostCount.Set(nil) +} + +// UnsetOpentelemetryHostCount ensures that no value is present for OpentelemetryHostCount, not even an explicit nil. +func (o *UsageHostHour) UnsetOpentelemetryHostCount() { + o.OpentelemetryHostCount.Unset() } // GetOrgName returns the OrgName field value if set, zero value otherwise. @@ -524,32 +680,43 @@ func (o *UsageHostHour) SetPublicId(v string) { o.PublicId = &v } -// GetVsphereHostCount returns the VsphereHostCount field value if set, zero value otherwise. +// GetVsphereHostCount returns the VsphereHostCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageHostHour) GetVsphereHostCount() int64 { - if o == nil || o.VsphereHostCount == nil { + if o == nil || o.VsphereHostCount.Get() == nil { var ret int64 return ret } - return *o.VsphereHostCount + return *o.VsphereHostCount.Get() } // GetVsphereHostCountOk returns a tuple with the VsphereHostCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageHostHour) GetVsphereHostCountOk() (*int64, bool) { - if o == nil || o.VsphereHostCount == nil { + if o == nil { return nil, false } - return o.VsphereHostCount, true + return o.VsphereHostCount.Get(), o.VsphereHostCount.IsSet() } // HasVsphereHostCount returns a boolean if a field has been set. func (o *UsageHostHour) HasVsphereHostCount() bool { - return o != nil && o.VsphereHostCount != nil + return o != nil && o.VsphereHostCount.IsSet() } -// SetVsphereHostCount gets a reference to the given int64 and assigns it to the VsphereHostCount field. +// SetVsphereHostCount gets a reference to the given datadog.NullableInt64 and assigns it to the VsphereHostCount field. func (o *UsageHostHour) SetVsphereHostCount(v int64) { - o.VsphereHostCount = &v + o.VsphereHostCount.Set(&v) +} + +// SetVsphereHostCountNil sets the value for VsphereHostCount to be an explicit nil. +func (o *UsageHostHour) SetVsphereHostCountNil() { + o.VsphereHostCount.Set(nil) +} + +// UnsetVsphereHostCount ensures that no value is present for VsphereHostCount, not even an explicit nil. +func (o *UsageHostHour) UnsetVsphereHostCount() { + o.VsphereHostCount.Unset() } // MarshalJSON serializes the struct using spec logic. @@ -558,51 +725,47 @@ func (o UsageHostHour) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return json.Marshal(o.UnparsedObject) } - if o.AgentHostCount != nil { - toSerialize["agent_host_count"] = o.AgentHostCount + if o.AgentHostCount.IsSet() { + toSerialize["agent_host_count"] = o.AgentHostCount.Get() } - if o.AlibabaHostCount != nil { - toSerialize["alibaba_host_count"] = o.AlibabaHostCount + if o.AlibabaHostCount.IsSet() { + toSerialize["alibaba_host_count"] = o.AlibabaHostCount.Get() } - if o.ApmAzureAppServiceHostCount != nil { - toSerialize["apm_azure_app_service_host_count"] = o.ApmAzureAppServiceHostCount + if o.ApmAzureAppServiceHostCount.IsSet() { + toSerialize["apm_azure_app_service_host_count"] = o.ApmAzureAppServiceHostCount.Get() } - if o.ApmHostCount != nil { - toSerialize["apm_host_count"] = o.ApmHostCount + if o.ApmHostCount.IsSet() { + toSerialize["apm_host_count"] = o.ApmHostCount.Get() } - if o.AwsHostCount != nil { - toSerialize["aws_host_count"] = o.AwsHostCount + if o.AwsHostCount.IsSet() { + toSerialize["aws_host_count"] = o.AwsHostCount.Get() } - if o.AzureHostCount != nil { - toSerialize["azure_host_count"] = o.AzureHostCount + if o.AzureHostCount.IsSet() { + toSerialize["azure_host_count"] = o.AzureHostCount.Get() } - if o.ContainerCount != nil { - toSerialize["container_count"] = o.ContainerCount + if o.ContainerCount.IsSet() { + toSerialize["container_count"] = o.ContainerCount.Get() } - if o.GcpHostCount != nil { - toSerialize["gcp_host_count"] = o.GcpHostCount + if o.GcpHostCount.IsSet() { + toSerialize["gcp_host_count"] = o.GcpHostCount.Get() } - if o.HerokuHostCount != nil { - toSerialize["heroku_host_count"] = o.HerokuHostCount + if o.HerokuHostCount.IsSet() { + toSerialize["heroku_host_count"] = o.HerokuHostCount.Get() } - if o.HostCount != nil { - toSerialize["host_count"] = o.HostCount + if o.HostCount.IsSet() { + toSerialize["host_count"] = o.HostCount.Get() } - if o.Hour != nil { - if o.Hour.Nanosecond() == 0 { - toSerialize["hour"] = o.Hour.Format("2006-01-02T15:04:05Z07:00") - } else { - toSerialize["hour"] = o.Hour.Format("2006-01-02T15:04:05.000Z07:00") - } + if o.Hour.IsSet() { + toSerialize["hour"] = o.Hour.Get() } - if o.InfraAzureAppService != nil { - toSerialize["infra_azure_app_service"] = o.InfraAzureAppService + if o.InfraAzureAppService.IsSet() { + toSerialize["infra_azure_app_service"] = o.InfraAzureAppService.Get() } - if o.OpentelemetryApmHostCount != nil { - toSerialize["opentelemetry_apm_host_count"] = o.OpentelemetryApmHostCount + if o.OpentelemetryApmHostCount.IsSet() { + toSerialize["opentelemetry_apm_host_count"] = o.OpentelemetryApmHostCount.Get() } - if o.OpentelemetryHostCount != nil { - toSerialize["opentelemetry_host_count"] = o.OpentelemetryHostCount + if o.OpentelemetryHostCount.IsSet() { + toSerialize["opentelemetry_host_count"] = o.OpentelemetryHostCount.Get() } if o.OrgName != nil { toSerialize["org_name"] = o.OrgName @@ -610,8 +773,8 @@ func (o UsageHostHour) MarshalJSON() ([]byte, error) { if o.PublicId != nil { toSerialize["public_id"] = o.PublicId } - if o.VsphereHostCount != nil { - toSerialize["vsphere_host_count"] = o.VsphereHostCount + if o.VsphereHostCount.IsSet() { + toSerialize["vsphere_host_count"] = o.VsphereHostCount.Get() } for key, value := range o.AdditionalProperties { @@ -624,23 +787,23 @@ func (o UsageHostHour) MarshalJSON() ([]byte, error) { func (o *UsageHostHour) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - AgentHostCount *int64 `json:"agent_host_count,omitempty"` - AlibabaHostCount *int64 `json:"alibaba_host_count,omitempty"` - ApmAzureAppServiceHostCount *int64 `json:"apm_azure_app_service_host_count,omitempty"` - ApmHostCount *int64 `json:"apm_host_count,omitempty"` - AwsHostCount *int64 `json:"aws_host_count,omitempty"` - AzureHostCount *int64 `json:"azure_host_count,omitempty"` - ContainerCount *int64 `json:"container_count,omitempty"` - GcpHostCount *int64 `json:"gcp_host_count,omitempty"` - HerokuHostCount *int64 `json:"heroku_host_count,omitempty"` - HostCount *int64 `json:"host_count,omitempty"` - Hour *time.Time `json:"hour,omitempty"` - InfraAzureAppService *int64 `json:"infra_azure_app_service,omitempty"` - OpentelemetryApmHostCount *int64 `json:"opentelemetry_apm_host_count,omitempty"` - OpentelemetryHostCount *int64 `json:"opentelemetry_host_count,omitempty"` - OrgName *string `json:"org_name,omitempty"` - PublicId *string `json:"public_id,omitempty"` - VsphereHostCount *int64 `json:"vsphere_host_count,omitempty"` + AgentHostCount datadog.NullableInt64 `json:"agent_host_count,omitempty"` + AlibabaHostCount datadog.NullableInt64 `json:"alibaba_host_count,omitempty"` + ApmAzureAppServiceHostCount datadog.NullableInt64 `json:"apm_azure_app_service_host_count,omitempty"` + ApmHostCount datadog.NullableInt64 `json:"apm_host_count,omitempty"` + AwsHostCount datadog.NullableInt64 `json:"aws_host_count,omitempty"` + AzureHostCount datadog.NullableInt64 `json:"azure_host_count,omitempty"` + ContainerCount datadog.NullableInt64 `json:"container_count,omitempty"` + GcpHostCount datadog.NullableInt64 `json:"gcp_host_count,omitempty"` + HerokuHostCount datadog.NullableInt64 `json:"heroku_host_count,omitempty"` + HostCount datadog.NullableInt64 `json:"host_count,omitempty"` + Hour datadog.NullableTime `json:"hour,omitempty"` + InfraAzureAppService datadog.NullableInt64 `json:"infra_azure_app_service,omitempty"` + OpentelemetryApmHostCount datadog.NullableInt64 `json:"opentelemetry_apm_host_count,omitempty"` + OpentelemetryHostCount datadog.NullableInt64 `json:"opentelemetry_host_count,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` + VsphereHostCount datadog.NullableInt64 `json:"vsphere_host_count,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV1/model_usage_incident_management_hour.go b/api/datadogV1/model_usage_incident_management_hour.go index e6e7919a21e..d56b7412fc9 100644 --- a/api/datadogV1/model_usage_incident_management_hour.go +++ b/api/datadogV1/model_usage_incident_management_hour.go @@ -7,6 +7,8 @@ package datadogV1 import ( "encoding/json" "time" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // UsageIncidentManagementHour Incident management usage for a given organization for a given hour. @@ -14,7 +16,7 @@ type UsageIncidentManagementHour struct { // The hour for the usage. Hour *time.Time `json:"hour,omitempty"` // Contains the total number monthly active users from the start of the given hour's month until the given hour. - MonthlyActiveUsers *int64 `json:"monthly_active_users,omitempty"` + MonthlyActiveUsers datadog.NullableInt64 `json:"monthly_active_users,omitempty"` // The organization name. OrgName *string `json:"org_name,omitempty"` // The organization public ID. @@ -69,32 +71,43 @@ func (o *UsageIncidentManagementHour) SetHour(v time.Time) { o.Hour = &v } -// GetMonthlyActiveUsers returns the MonthlyActiveUsers field value if set, zero value otherwise. +// GetMonthlyActiveUsers returns the MonthlyActiveUsers field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageIncidentManagementHour) GetMonthlyActiveUsers() int64 { - if o == nil || o.MonthlyActiveUsers == nil { + if o == nil || o.MonthlyActiveUsers.Get() == nil { var ret int64 return ret } - return *o.MonthlyActiveUsers + return *o.MonthlyActiveUsers.Get() } // GetMonthlyActiveUsersOk returns a tuple with the MonthlyActiveUsers field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageIncidentManagementHour) GetMonthlyActiveUsersOk() (*int64, bool) { - if o == nil || o.MonthlyActiveUsers == nil { + if o == nil { return nil, false } - return o.MonthlyActiveUsers, true + return o.MonthlyActiveUsers.Get(), o.MonthlyActiveUsers.IsSet() } // HasMonthlyActiveUsers returns a boolean if a field has been set. func (o *UsageIncidentManagementHour) HasMonthlyActiveUsers() bool { - return o != nil && o.MonthlyActiveUsers != nil + return o != nil && o.MonthlyActiveUsers.IsSet() } -// SetMonthlyActiveUsers gets a reference to the given int64 and assigns it to the MonthlyActiveUsers field. +// SetMonthlyActiveUsers gets a reference to the given datadog.NullableInt64 and assigns it to the MonthlyActiveUsers field. func (o *UsageIncidentManagementHour) SetMonthlyActiveUsers(v int64) { - o.MonthlyActiveUsers = &v + o.MonthlyActiveUsers.Set(&v) +} + +// SetMonthlyActiveUsersNil sets the value for MonthlyActiveUsers to be an explicit nil. +func (o *UsageIncidentManagementHour) SetMonthlyActiveUsersNil() { + o.MonthlyActiveUsers.Set(nil) +} + +// UnsetMonthlyActiveUsers ensures that no value is present for MonthlyActiveUsers, not even an explicit nil. +func (o *UsageIncidentManagementHour) UnsetMonthlyActiveUsers() { + o.MonthlyActiveUsers.Unset() } // GetOrgName returns the OrgName field value if set, zero value otherwise. @@ -166,8 +179,8 @@ func (o UsageIncidentManagementHour) MarshalJSON() ([]byte, error) { toSerialize["hour"] = o.Hour.Format("2006-01-02T15:04:05.000Z07:00") } } - if o.MonthlyActiveUsers != nil { - toSerialize["monthly_active_users"] = o.MonthlyActiveUsers + if o.MonthlyActiveUsers.IsSet() { + toSerialize["monthly_active_users"] = o.MonthlyActiveUsers.Get() } if o.OrgName != nil { toSerialize["org_name"] = o.OrgName @@ -186,10 +199,10 @@ func (o UsageIncidentManagementHour) MarshalJSON() ([]byte, error) { func (o *UsageIncidentManagementHour) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - Hour *time.Time `json:"hour,omitempty"` - MonthlyActiveUsers *int64 `json:"monthly_active_users,omitempty"` - OrgName *string `json:"org_name,omitempty"` - PublicId *string `json:"public_id,omitempty"` + Hour *time.Time `json:"hour,omitempty"` + MonthlyActiveUsers datadog.NullableInt64 `json:"monthly_active_users,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV1/model_usage_lambda_hour.go b/api/datadogV1/model_usage_lambda_hour.go index f3aeacdd44a..4fa261cff3f 100644 --- a/api/datadogV1/model_usage_lambda_hour.go +++ b/api/datadogV1/model_usage_lambda_hour.go @@ -7,17 +7,19 @@ package datadogV1 import ( "encoding/json" "time" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // UsageLambdaHour Number of lambda functions and sum of the invocations of all lambda functions // for each hour for a given organization. type UsageLambdaHour struct { // Contains the number of different functions for each region and AWS account. - FuncCount *int64 `json:"func_count,omitempty"` + FuncCount datadog.NullableInt64 `json:"func_count,omitempty"` // The hour for the usage. Hour *time.Time `json:"hour,omitempty"` // Contains the sum of invocations of all functions. - InvocationsSum *int64 `json:"invocations_sum,omitempty"` + InvocationsSum datadog.NullableInt64 `json:"invocations_sum,omitempty"` // The organization name. OrgName *string `json:"org_name,omitempty"` // The organization public ID. @@ -44,32 +46,43 @@ func NewUsageLambdaHourWithDefaults() *UsageLambdaHour { return &this } -// GetFuncCount returns the FuncCount field value if set, zero value otherwise. +// GetFuncCount returns the FuncCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageLambdaHour) GetFuncCount() int64 { - if o == nil || o.FuncCount == nil { + if o == nil || o.FuncCount.Get() == nil { var ret int64 return ret } - return *o.FuncCount + return *o.FuncCount.Get() } // GetFuncCountOk returns a tuple with the FuncCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageLambdaHour) GetFuncCountOk() (*int64, bool) { - if o == nil || o.FuncCount == nil { + if o == nil { return nil, false } - return o.FuncCount, true + return o.FuncCount.Get(), o.FuncCount.IsSet() } // HasFuncCount returns a boolean if a field has been set. func (o *UsageLambdaHour) HasFuncCount() bool { - return o != nil && o.FuncCount != nil + return o != nil && o.FuncCount.IsSet() } -// SetFuncCount gets a reference to the given int64 and assigns it to the FuncCount field. +// SetFuncCount gets a reference to the given datadog.NullableInt64 and assigns it to the FuncCount field. func (o *UsageLambdaHour) SetFuncCount(v int64) { - o.FuncCount = &v + o.FuncCount.Set(&v) +} + +// SetFuncCountNil sets the value for FuncCount to be an explicit nil. +func (o *UsageLambdaHour) SetFuncCountNil() { + o.FuncCount.Set(nil) +} + +// UnsetFuncCount ensures that no value is present for FuncCount, not even an explicit nil. +func (o *UsageLambdaHour) UnsetFuncCount() { + o.FuncCount.Unset() } // GetHour returns the Hour field value if set, zero value otherwise. @@ -100,32 +113,43 @@ func (o *UsageLambdaHour) SetHour(v time.Time) { o.Hour = &v } -// GetInvocationsSum returns the InvocationsSum field value if set, zero value otherwise. +// GetInvocationsSum returns the InvocationsSum field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageLambdaHour) GetInvocationsSum() int64 { - if o == nil || o.InvocationsSum == nil { + if o == nil || o.InvocationsSum.Get() == nil { var ret int64 return ret } - return *o.InvocationsSum + return *o.InvocationsSum.Get() } // GetInvocationsSumOk returns a tuple with the InvocationsSum field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageLambdaHour) GetInvocationsSumOk() (*int64, bool) { - if o == nil || o.InvocationsSum == nil { + if o == nil { return nil, false } - return o.InvocationsSum, true + return o.InvocationsSum.Get(), o.InvocationsSum.IsSet() } // HasInvocationsSum returns a boolean if a field has been set. func (o *UsageLambdaHour) HasInvocationsSum() bool { - return o != nil && o.InvocationsSum != nil + return o != nil && o.InvocationsSum.IsSet() } -// SetInvocationsSum gets a reference to the given int64 and assigns it to the InvocationsSum field. +// SetInvocationsSum gets a reference to the given datadog.NullableInt64 and assigns it to the InvocationsSum field. func (o *UsageLambdaHour) SetInvocationsSum(v int64) { - o.InvocationsSum = &v + o.InvocationsSum.Set(&v) +} + +// SetInvocationsSumNil sets the value for InvocationsSum to be an explicit nil. +func (o *UsageLambdaHour) SetInvocationsSumNil() { + o.InvocationsSum.Set(nil) +} + +// UnsetInvocationsSum ensures that no value is present for InvocationsSum, not even an explicit nil. +func (o *UsageLambdaHour) UnsetInvocationsSum() { + o.InvocationsSum.Unset() } // GetOrgName returns the OrgName field value if set, zero value otherwise. @@ -190,8 +214,8 @@ func (o UsageLambdaHour) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return json.Marshal(o.UnparsedObject) } - if o.FuncCount != nil { - toSerialize["func_count"] = o.FuncCount + if o.FuncCount.IsSet() { + toSerialize["func_count"] = o.FuncCount.Get() } if o.Hour != nil { if o.Hour.Nanosecond() == 0 { @@ -200,8 +224,8 @@ func (o UsageLambdaHour) MarshalJSON() ([]byte, error) { toSerialize["hour"] = o.Hour.Format("2006-01-02T15:04:05.000Z07:00") } } - if o.InvocationsSum != nil { - toSerialize["invocations_sum"] = o.InvocationsSum + if o.InvocationsSum.IsSet() { + toSerialize["invocations_sum"] = o.InvocationsSum.Get() } if o.OrgName != nil { toSerialize["org_name"] = o.OrgName @@ -220,11 +244,11 @@ func (o UsageLambdaHour) MarshalJSON() ([]byte, error) { func (o *UsageLambdaHour) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - FuncCount *int64 `json:"func_count,omitempty"` - Hour *time.Time `json:"hour,omitempty"` - InvocationsSum *int64 `json:"invocations_sum,omitempty"` - OrgName *string `json:"org_name,omitempty"` - PublicId *string `json:"public_id,omitempty"` + FuncCount datadog.NullableInt64 `json:"func_count,omitempty"` + Hour *time.Time `json:"hour,omitempty"` + InvocationsSum datadog.NullableInt64 `json:"invocations_sum,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV1/model_usage_logs_hour.go b/api/datadogV1/model_usage_logs_hour.go index 9e76e599af6..82b1a242239 100644 --- a/api/datadogV1/model_usage_logs_hour.go +++ b/api/datadogV1/model_usage_logs_hour.go @@ -7,28 +7,30 @@ package datadogV1 import ( "encoding/json" "time" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // UsageLogsHour Hour usage for logs. type UsageLogsHour struct { // Contains the number of billable log bytes ingested. - BillableIngestedBytes *int64 `json:"billable_ingested_bytes,omitempty"` + BillableIngestedBytes datadog.NullableInt64 `json:"billable_ingested_bytes,omitempty"` // The hour for the usage. Hour *time.Time `json:"hour,omitempty"` // Contains the number of log events indexed. - IndexedEventsCount *int64 `json:"indexed_events_count,omitempty"` + IndexedEventsCount datadog.NullableInt64 `json:"indexed_events_count,omitempty"` // Contains the number of log bytes ingested. - IngestedEventsBytes *int64 `json:"ingested_events_bytes,omitempty"` + IngestedEventsBytes datadog.NullableInt64 `json:"ingested_events_bytes,omitempty"` // Contains the number of logs forwarded bytes (data available as of April 1st 2023) - LogsForwardingEventsBytes *int64 `json:"logs_forwarding_events_bytes,omitempty"` + LogsForwardingEventsBytes datadog.NullableInt64 `json:"logs_forwarding_events_bytes,omitempty"` // Contains the number of live log events indexed (data available as of December 1, 2020). - LogsLiveIndexedCount *int64 `json:"logs_live_indexed_count,omitempty"` + LogsLiveIndexedCount datadog.NullableInt64 `json:"logs_live_indexed_count,omitempty"` // Contains the number of live log bytes ingested (data available as of December 1, 2020). - LogsLiveIngestedBytes *int64 `json:"logs_live_ingested_bytes,omitempty"` + LogsLiveIngestedBytes datadog.NullableInt64 `json:"logs_live_ingested_bytes,omitempty"` // Contains the number of rehydrated log events indexed (data available as of December 1, 2020). - LogsRehydratedIndexedCount *int64 `json:"logs_rehydrated_indexed_count,omitempty"` + LogsRehydratedIndexedCount datadog.NullableInt64 `json:"logs_rehydrated_indexed_count,omitempty"` // Contains the number of rehydrated log bytes ingested (data available as of December 1, 2020). - LogsRehydratedIngestedBytes *int64 `json:"logs_rehydrated_ingested_bytes,omitempty"` + LogsRehydratedIngestedBytes datadog.NullableInt64 `json:"logs_rehydrated_ingested_bytes,omitempty"` // The organization name. OrgName *string `json:"org_name,omitempty"` // The organization public ID. @@ -55,32 +57,43 @@ func NewUsageLogsHourWithDefaults() *UsageLogsHour { return &this } -// GetBillableIngestedBytes returns the BillableIngestedBytes field value if set, zero value otherwise. +// GetBillableIngestedBytes returns the BillableIngestedBytes field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageLogsHour) GetBillableIngestedBytes() int64 { - if o == nil || o.BillableIngestedBytes == nil { + if o == nil || o.BillableIngestedBytes.Get() == nil { var ret int64 return ret } - return *o.BillableIngestedBytes + return *o.BillableIngestedBytes.Get() } // GetBillableIngestedBytesOk returns a tuple with the BillableIngestedBytes field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageLogsHour) GetBillableIngestedBytesOk() (*int64, bool) { - if o == nil || o.BillableIngestedBytes == nil { + if o == nil { return nil, false } - return o.BillableIngestedBytes, true + return o.BillableIngestedBytes.Get(), o.BillableIngestedBytes.IsSet() } // HasBillableIngestedBytes returns a boolean if a field has been set. func (o *UsageLogsHour) HasBillableIngestedBytes() bool { - return o != nil && o.BillableIngestedBytes != nil + return o != nil && o.BillableIngestedBytes.IsSet() } -// SetBillableIngestedBytes gets a reference to the given int64 and assigns it to the BillableIngestedBytes field. +// SetBillableIngestedBytes gets a reference to the given datadog.NullableInt64 and assigns it to the BillableIngestedBytes field. func (o *UsageLogsHour) SetBillableIngestedBytes(v int64) { - o.BillableIngestedBytes = &v + o.BillableIngestedBytes.Set(&v) +} + +// SetBillableIngestedBytesNil sets the value for BillableIngestedBytes to be an explicit nil. +func (o *UsageLogsHour) SetBillableIngestedBytesNil() { + o.BillableIngestedBytes.Set(nil) +} + +// UnsetBillableIngestedBytes ensures that no value is present for BillableIngestedBytes, not even an explicit nil. +func (o *UsageLogsHour) UnsetBillableIngestedBytes() { + o.BillableIngestedBytes.Unset() } // GetHour returns the Hour field value if set, zero value otherwise. @@ -111,200 +124,277 @@ func (o *UsageLogsHour) SetHour(v time.Time) { o.Hour = &v } -// GetIndexedEventsCount returns the IndexedEventsCount field value if set, zero value otherwise. +// GetIndexedEventsCount returns the IndexedEventsCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageLogsHour) GetIndexedEventsCount() int64 { - if o == nil || o.IndexedEventsCount == nil { + if o == nil || o.IndexedEventsCount.Get() == nil { var ret int64 return ret } - return *o.IndexedEventsCount + return *o.IndexedEventsCount.Get() } // GetIndexedEventsCountOk returns a tuple with the IndexedEventsCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageLogsHour) GetIndexedEventsCountOk() (*int64, bool) { - if o == nil || o.IndexedEventsCount == nil { + if o == nil { return nil, false } - return o.IndexedEventsCount, true + return o.IndexedEventsCount.Get(), o.IndexedEventsCount.IsSet() } // HasIndexedEventsCount returns a boolean if a field has been set. func (o *UsageLogsHour) HasIndexedEventsCount() bool { - return o != nil && o.IndexedEventsCount != nil + return o != nil && o.IndexedEventsCount.IsSet() } -// SetIndexedEventsCount gets a reference to the given int64 and assigns it to the IndexedEventsCount field. +// SetIndexedEventsCount gets a reference to the given datadog.NullableInt64 and assigns it to the IndexedEventsCount field. func (o *UsageLogsHour) SetIndexedEventsCount(v int64) { - o.IndexedEventsCount = &v + o.IndexedEventsCount.Set(&v) +} + +// SetIndexedEventsCountNil sets the value for IndexedEventsCount to be an explicit nil. +func (o *UsageLogsHour) SetIndexedEventsCountNil() { + o.IndexedEventsCount.Set(nil) +} + +// UnsetIndexedEventsCount ensures that no value is present for IndexedEventsCount, not even an explicit nil. +func (o *UsageLogsHour) UnsetIndexedEventsCount() { + o.IndexedEventsCount.Unset() } -// GetIngestedEventsBytes returns the IngestedEventsBytes field value if set, zero value otherwise. +// GetIngestedEventsBytes returns the IngestedEventsBytes field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageLogsHour) GetIngestedEventsBytes() int64 { - if o == nil || o.IngestedEventsBytes == nil { + if o == nil || o.IngestedEventsBytes.Get() == nil { var ret int64 return ret } - return *o.IngestedEventsBytes + return *o.IngestedEventsBytes.Get() } // GetIngestedEventsBytesOk returns a tuple with the IngestedEventsBytes field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageLogsHour) GetIngestedEventsBytesOk() (*int64, bool) { - if o == nil || o.IngestedEventsBytes == nil { + if o == nil { return nil, false } - return o.IngestedEventsBytes, true + return o.IngestedEventsBytes.Get(), o.IngestedEventsBytes.IsSet() } // HasIngestedEventsBytes returns a boolean if a field has been set. func (o *UsageLogsHour) HasIngestedEventsBytes() bool { - return o != nil && o.IngestedEventsBytes != nil + return o != nil && o.IngestedEventsBytes.IsSet() } -// SetIngestedEventsBytes gets a reference to the given int64 and assigns it to the IngestedEventsBytes field. +// SetIngestedEventsBytes gets a reference to the given datadog.NullableInt64 and assigns it to the IngestedEventsBytes field. func (o *UsageLogsHour) SetIngestedEventsBytes(v int64) { - o.IngestedEventsBytes = &v + o.IngestedEventsBytes.Set(&v) } -// GetLogsForwardingEventsBytes returns the LogsForwardingEventsBytes field value if set, zero value otherwise. +// SetIngestedEventsBytesNil sets the value for IngestedEventsBytes to be an explicit nil. +func (o *UsageLogsHour) SetIngestedEventsBytesNil() { + o.IngestedEventsBytes.Set(nil) +} + +// UnsetIngestedEventsBytes ensures that no value is present for IngestedEventsBytes, not even an explicit nil. +func (o *UsageLogsHour) UnsetIngestedEventsBytes() { + o.IngestedEventsBytes.Unset() +} + +// GetLogsForwardingEventsBytes returns the LogsForwardingEventsBytes field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageLogsHour) GetLogsForwardingEventsBytes() int64 { - if o == nil || o.LogsForwardingEventsBytes == nil { + if o == nil || o.LogsForwardingEventsBytes.Get() == nil { var ret int64 return ret } - return *o.LogsForwardingEventsBytes + return *o.LogsForwardingEventsBytes.Get() } // GetLogsForwardingEventsBytesOk returns a tuple with the LogsForwardingEventsBytes field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageLogsHour) GetLogsForwardingEventsBytesOk() (*int64, bool) { - if o == nil || o.LogsForwardingEventsBytes == nil { + if o == nil { return nil, false } - return o.LogsForwardingEventsBytes, true + return o.LogsForwardingEventsBytes.Get(), o.LogsForwardingEventsBytes.IsSet() } // HasLogsForwardingEventsBytes returns a boolean if a field has been set. func (o *UsageLogsHour) HasLogsForwardingEventsBytes() bool { - return o != nil && o.LogsForwardingEventsBytes != nil + return o != nil && o.LogsForwardingEventsBytes.IsSet() } -// SetLogsForwardingEventsBytes gets a reference to the given int64 and assigns it to the LogsForwardingEventsBytes field. +// SetLogsForwardingEventsBytes gets a reference to the given datadog.NullableInt64 and assigns it to the LogsForwardingEventsBytes field. func (o *UsageLogsHour) SetLogsForwardingEventsBytes(v int64) { - o.LogsForwardingEventsBytes = &v + o.LogsForwardingEventsBytes.Set(&v) +} + +// SetLogsForwardingEventsBytesNil sets the value for LogsForwardingEventsBytes to be an explicit nil. +func (o *UsageLogsHour) SetLogsForwardingEventsBytesNil() { + o.LogsForwardingEventsBytes.Set(nil) +} + +// UnsetLogsForwardingEventsBytes ensures that no value is present for LogsForwardingEventsBytes, not even an explicit nil. +func (o *UsageLogsHour) UnsetLogsForwardingEventsBytes() { + o.LogsForwardingEventsBytes.Unset() } -// GetLogsLiveIndexedCount returns the LogsLiveIndexedCount field value if set, zero value otherwise. +// GetLogsLiveIndexedCount returns the LogsLiveIndexedCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageLogsHour) GetLogsLiveIndexedCount() int64 { - if o == nil || o.LogsLiveIndexedCount == nil { + if o == nil || o.LogsLiveIndexedCount.Get() == nil { var ret int64 return ret } - return *o.LogsLiveIndexedCount + return *o.LogsLiveIndexedCount.Get() } // GetLogsLiveIndexedCountOk returns a tuple with the LogsLiveIndexedCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageLogsHour) GetLogsLiveIndexedCountOk() (*int64, bool) { - if o == nil || o.LogsLiveIndexedCount == nil { + if o == nil { return nil, false } - return o.LogsLiveIndexedCount, true + return o.LogsLiveIndexedCount.Get(), o.LogsLiveIndexedCount.IsSet() } // HasLogsLiveIndexedCount returns a boolean if a field has been set. func (o *UsageLogsHour) HasLogsLiveIndexedCount() bool { - return o != nil && o.LogsLiveIndexedCount != nil + return o != nil && o.LogsLiveIndexedCount.IsSet() } -// SetLogsLiveIndexedCount gets a reference to the given int64 and assigns it to the LogsLiveIndexedCount field. +// SetLogsLiveIndexedCount gets a reference to the given datadog.NullableInt64 and assigns it to the LogsLiveIndexedCount field. func (o *UsageLogsHour) SetLogsLiveIndexedCount(v int64) { - o.LogsLiveIndexedCount = &v + o.LogsLiveIndexedCount.Set(&v) } -// GetLogsLiveIngestedBytes returns the LogsLiveIngestedBytes field value if set, zero value otherwise. +// SetLogsLiveIndexedCountNil sets the value for LogsLiveIndexedCount to be an explicit nil. +func (o *UsageLogsHour) SetLogsLiveIndexedCountNil() { + o.LogsLiveIndexedCount.Set(nil) +} + +// UnsetLogsLiveIndexedCount ensures that no value is present for LogsLiveIndexedCount, not even an explicit nil. +func (o *UsageLogsHour) UnsetLogsLiveIndexedCount() { + o.LogsLiveIndexedCount.Unset() +} + +// GetLogsLiveIngestedBytes returns the LogsLiveIngestedBytes field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageLogsHour) GetLogsLiveIngestedBytes() int64 { - if o == nil || o.LogsLiveIngestedBytes == nil { + if o == nil || o.LogsLiveIngestedBytes.Get() == nil { var ret int64 return ret } - return *o.LogsLiveIngestedBytes + return *o.LogsLiveIngestedBytes.Get() } // GetLogsLiveIngestedBytesOk returns a tuple with the LogsLiveIngestedBytes field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageLogsHour) GetLogsLiveIngestedBytesOk() (*int64, bool) { - if o == nil || o.LogsLiveIngestedBytes == nil { + if o == nil { return nil, false } - return o.LogsLiveIngestedBytes, true + return o.LogsLiveIngestedBytes.Get(), o.LogsLiveIngestedBytes.IsSet() } // HasLogsLiveIngestedBytes returns a boolean if a field has been set. func (o *UsageLogsHour) HasLogsLiveIngestedBytes() bool { - return o != nil && o.LogsLiveIngestedBytes != nil + return o != nil && o.LogsLiveIngestedBytes.IsSet() } -// SetLogsLiveIngestedBytes gets a reference to the given int64 and assigns it to the LogsLiveIngestedBytes field. +// SetLogsLiveIngestedBytes gets a reference to the given datadog.NullableInt64 and assigns it to the LogsLiveIngestedBytes field. func (o *UsageLogsHour) SetLogsLiveIngestedBytes(v int64) { - o.LogsLiveIngestedBytes = &v + o.LogsLiveIngestedBytes.Set(&v) +} + +// SetLogsLiveIngestedBytesNil sets the value for LogsLiveIngestedBytes to be an explicit nil. +func (o *UsageLogsHour) SetLogsLiveIngestedBytesNil() { + o.LogsLiveIngestedBytes.Set(nil) +} + +// UnsetLogsLiveIngestedBytes ensures that no value is present for LogsLiveIngestedBytes, not even an explicit nil. +func (o *UsageLogsHour) UnsetLogsLiveIngestedBytes() { + o.LogsLiveIngestedBytes.Unset() } -// GetLogsRehydratedIndexedCount returns the LogsRehydratedIndexedCount field value if set, zero value otherwise. +// GetLogsRehydratedIndexedCount returns the LogsRehydratedIndexedCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageLogsHour) GetLogsRehydratedIndexedCount() int64 { - if o == nil || o.LogsRehydratedIndexedCount == nil { + if o == nil || o.LogsRehydratedIndexedCount.Get() == nil { var ret int64 return ret } - return *o.LogsRehydratedIndexedCount + return *o.LogsRehydratedIndexedCount.Get() } // GetLogsRehydratedIndexedCountOk returns a tuple with the LogsRehydratedIndexedCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageLogsHour) GetLogsRehydratedIndexedCountOk() (*int64, bool) { - if o == nil || o.LogsRehydratedIndexedCount == nil { + if o == nil { return nil, false } - return o.LogsRehydratedIndexedCount, true + return o.LogsRehydratedIndexedCount.Get(), o.LogsRehydratedIndexedCount.IsSet() } // HasLogsRehydratedIndexedCount returns a boolean if a field has been set. func (o *UsageLogsHour) HasLogsRehydratedIndexedCount() bool { - return o != nil && o.LogsRehydratedIndexedCount != nil + return o != nil && o.LogsRehydratedIndexedCount.IsSet() } -// SetLogsRehydratedIndexedCount gets a reference to the given int64 and assigns it to the LogsRehydratedIndexedCount field. +// SetLogsRehydratedIndexedCount gets a reference to the given datadog.NullableInt64 and assigns it to the LogsRehydratedIndexedCount field. func (o *UsageLogsHour) SetLogsRehydratedIndexedCount(v int64) { - o.LogsRehydratedIndexedCount = &v + o.LogsRehydratedIndexedCount.Set(&v) } -// GetLogsRehydratedIngestedBytes returns the LogsRehydratedIngestedBytes field value if set, zero value otherwise. +// SetLogsRehydratedIndexedCountNil sets the value for LogsRehydratedIndexedCount to be an explicit nil. +func (o *UsageLogsHour) SetLogsRehydratedIndexedCountNil() { + o.LogsRehydratedIndexedCount.Set(nil) +} + +// UnsetLogsRehydratedIndexedCount ensures that no value is present for LogsRehydratedIndexedCount, not even an explicit nil. +func (o *UsageLogsHour) UnsetLogsRehydratedIndexedCount() { + o.LogsRehydratedIndexedCount.Unset() +} + +// GetLogsRehydratedIngestedBytes returns the LogsRehydratedIngestedBytes field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageLogsHour) GetLogsRehydratedIngestedBytes() int64 { - if o == nil || o.LogsRehydratedIngestedBytes == nil { + if o == nil || o.LogsRehydratedIngestedBytes.Get() == nil { var ret int64 return ret } - return *o.LogsRehydratedIngestedBytes + return *o.LogsRehydratedIngestedBytes.Get() } // GetLogsRehydratedIngestedBytesOk returns a tuple with the LogsRehydratedIngestedBytes field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageLogsHour) GetLogsRehydratedIngestedBytesOk() (*int64, bool) { - if o == nil || o.LogsRehydratedIngestedBytes == nil { + if o == nil { return nil, false } - return o.LogsRehydratedIngestedBytes, true + return o.LogsRehydratedIngestedBytes.Get(), o.LogsRehydratedIngestedBytes.IsSet() } // HasLogsRehydratedIngestedBytes returns a boolean if a field has been set. func (o *UsageLogsHour) HasLogsRehydratedIngestedBytes() bool { - return o != nil && o.LogsRehydratedIngestedBytes != nil + return o != nil && o.LogsRehydratedIngestedBytes.IsSet() } -// SetLogsRehydratedIngestedBytes gets a reference to the given int64 and assigns it to the LogsRehydratedIngestedBytes field. +// SetLogsRehydratedIngestedBytes gets a reference to the given datadog.NullableInt64 and assigns it to the LogsRehydratedIngestedBytes field. func (o *UsageLogsHour) SetLogsRehydratedIngestedBytes(v int64) { - o.LogsRehydratedIngestedBytes = &v + o.LogsRehydratedIngestedBytes.Set(&v) +} + +// SetLogsRehydratedIngestedBytesNil sets the value for LogsRehydratedIngestedBytes to be an explicit nil. +func (o *UsageLogsHour) SetLogsRehydratedIngestedBytesNil() { + o.LogsRehydratedIngestedBytes.Set(nil) +} + +// UnsetLogsRehydratedIngestedBytes ensures that no value is present for LogsRehydratedIngestedBytes, not even an explicit nil. +func (o *UsageLogsHour) UnsetLogsRehydratedIngestedBytes() { + o.LogsRehydratedIngestedBytes.Unset() } // GetOrgName returns the OrgName field value if set, zero value otherwise. @@ -369,8 +459,8 @@ func (o UsageLogsHour) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return json.Marshal(o.UnparsedObject) } - if o.BillableIngestedBytes != nil { - toSerialize["billable_ingested_bytes"] = o.BillableIngestedBytes + if o.BillableIngestedBytes.IsSet() { + toSerialize["billable_ingested_bytes"] = o.BillableIngestedBytes.Get() } if o.Hour != nil { if o.Hour.Nanosecond() == 0 { @@ -379,26 +469,26 @@ func (o UsageLogsHour) MarshalJSON() ([]byte, error) { toSerialize["hour"] = o.Hour.Format("2006-01-02T15:04:05.000Z07:00") } } - if o.IndexedEventsCount != nil { - toSerialize["indexed_events_count"] = o.IndexedEventsCount + if o.IndexedEventsCount.IsSet() { + toSerialize["indexed_events_count"] = o.IndexedEventsCount.Get() } - if o.IngestedEventsBytes != nil { - toSerialize["ingested_events_bytes"] = o.IngestedEventsBytes + if o.IngestedEventsBytes.IsSet() { + toSerialize["ingested_events_bytes"] = o.IngestedEventsBytes.Get() } - if o.LogsForwardingEventsBytes != nil { - toSerialize["logs_forwarding_events_bytes"] = o.LogsForwardingEventsBytes + if o.LogsForwardingEventsBytes.IsSet() { + toSerialize["logs_forwarding_events_bytes"] = o.LogsForwardingEventsBytes.Get() } - if o.LogsLiveIndexedCount != nil { - toSerialize["logs_live_indexed_count"] = o.LogsLiveIndexedCount + if o.LogsLiveIndexedCount.IsSet() { + toSerialize["logs_live_indexed_count"] = o.LogsLiveIndexedCount.Get() } - if o.LogsLiveIngestedBytes != nil { - toSerialize["logs_live_ingested_bytes"] = o.LogsLiveIngestedBytes + if o.LogsLiveIngestedBytes.IsSet() { + toSerialize["logs_live_ingested_bytes"] = o.LogsLiveIngestedBytes.Get() } - if o.LogsRehydratedIndexedCount != nil { - toSerialize["logs_rehydrated_indexed_count"] = o.LogsRehydratedIndexedCount + if o.LogsRehydratedIndexedCount.IsSet() { + toSerialize["logs_rehydrated_indexed_count"] = o.LogsRehydratedIndexedCount.Get() } - if o.LogsRehydratedIngestedBytes != nil { - toSerialize["logs_rehydrated_ingested_bytes"] = o.LogsRehydratedIngestedBytes + if o.LogsRehydratedIngestedBytes.IsSet() { + toSerialize["logs_rehydrated_ingested_bytes"] = o.LogsRehydratedIngestedBytes.Get() } if o.OrgName != nil { toSerialize["org_name"] = o.OrgName @@ -417,17 +507,17 @@ func (o UsageLogsHour) MarshalJSON() ([]byte, error) { func (o *UsageLogsHour) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - BillableIngestedBytes *int64 `json:"billable_ingested_bytes,omitempty"` - Hour *time.Time `json:"hour,omitempty"` - IndexedEventsCount *int64 `json:"indexed_events_count,omitempty"` - IngestedEventsBytes *int64 `json:"ingested_events_bytes,omitempty"` - LogsForwardingEventsBytes *int64 `json:"logs_forwarding_events_bytes,omitempty"` - LogsLiveIndexedCount *int64 `json:"logs_live_indexed_count,omitempty"` - LogsLiveIngestedBytes *int64 `json:"logs_live_ingested_bytes,omitempty"` - LogsRehydratedIndexedCount *int64 `json:"logs_rehydrated_indexed_count,omitempty"` - LogsRehydratedIngestedBytes *int64 `json:"logs_rehydrated_ingested_bytes,omitempty"` - OrgName *string `json:"org_name,omitempty"` - PublicId *string `json:"public_id,omitempty"` + BillableIngestedBytes datadog.NullableInt64 `json:"billable_ingested_bytes,omitempty"` + Hour *time.Time `json:"hour,omitempty"` + IndexedEventsCount datadog.NullableInt64 `json:"indexed_events_count,omitempty"` + IngestedEventsBytes datadog.NullableInt64 `json:"ingested_events_bytes,omitempty"` + LogsForwardingEventsBytes datadog.NullableInt64 `json:"logs_forwarding_events_bytes,omitempty"` + LogsLiveIndexedCount datadog.NullableInt64 `json:"logs_live_indexed_count,omitempty"` + LogsLiveIngestedBytes datadog.NullableInt64 `json:"logs_live_ingested_bytes,omitempty"` + LogsRehydratedIndexedCount datadog.NullableInt64 `json:"logs_rehydrated_indexed_count,omitempty"` + LogsRehydratedIngestedBytes datadog.NullableInt64 `json:"logs_rehydrated_ingested_bytes,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV1/model_usage_online_archive_hour.go b/api/datadogV1/model_usage_online_archive_hour.go index 03a5411f830..6aa21ba40b3 100644 --- a/api/datadogV1/model_usage_online_archive_hour.go +++ b/api/datadogV1/model_usage_online_archive_hour.go @@ -7,6 +7,8 @@ package datadogV1 import ( "encoding/json" "time" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // UsageOnlineArchiveHour Online Archive usage in a given hour. @@ -14,7 +16,7 @@ type UsageOnlineArchiveHour struct { // The hour for the usage. Hour *time.Time `json:"hour,omitempty"` // Total count of online archived events within the hour. - OnlineArchiveEventsCount *int64 `json:"online_archive_events_count,omitempty"` + OnlineArchiveEventsCount datadog.NullableInt64 `json:"online_archive_events_count,omitempty"` // The organization name. OrgName *string `json:"org_name,omitempty"` // The organization public ID. @@ -69,32 +71,43 @@ func (o *UsageOnlineArchiveHour) SetHour(v time.Time) { o.Hour = &v } -// GetOnlineArchiveEventsCount returns the OnlineArchiveEventsCount field value if set, zero value otherwise. +// GetOnlineArchiveEventsCount returns the OnlineArchiveEventsCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageOnlineArchiveHour) GetOnlineArchiveEventsCount() int64 { - if o == nil || o.OnlineArchiveEventsCount == nil { + if o == nil || o.OnlineArchiveEventsCount.Get() == nil { var ret int64 return ret } - return *o.OnlineArchiveEventsCount + return *o.OnlineArchiveEventsCount.Get() } // GetOnlineArchiveEventsCountOk returns a tuple with the OnlineArchiveEventsCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageOnlineArchiveHour) GetOnlineArchiveEventsCountOk() (*int64, bool) { - if o == nil || o.OnlineArchiveEventsCount == nil { + if o == nil { return nil, false } - return o.OnlineArchiveEventsCount, true + return o.OnlineArchiveEventsCount.Get(), o.OnlineArchiveEventsCount.IsSet() } // HasOnlineArchiveEventsCount returns a boolean if a field has been set. func (o *UsageOnlineArchiveHour) HasOnlineArchiveEventsCount() bool { - return o != nil && o.OnlineArchiveEventsCount != nil + return o != nil && o.OnlineArchiveEventsCount.IsSet() } -// SetOnlineArchiveEventsCount gets a reference to the given int64 and assigns it to the OnlineArchiveEventsCount field. +// SetOnlineArchiveEventsCount gets a reference to the given datadog.NullableInt64 and assigns it to the OnlineArchiveEventsCount field. func (o *UsageOnlineArchiveHour) SetOnlineArchiveEventsCount(v int64) { - o.OnlineArchiveEventsCount = &v + o.OnlineArchiveEventsCount.Set(&v) +} + +// SetOnlineArchiveEventsCountNil sets the value for OnlineArchiveEventsCount to be an explicit nil. +func (o *UsageOnlineArchiveHour) SetOnlineArchiveEventsCountNil() { + o.OnlineArchiveEventsCount.Set(nil) +} + +// UnsetOnlineArchiveEventsCount ensures that no value is present for OnlineArchiveEventsCount, not even an explicit nil. +func (o *UsageOnlineArchiveHour) UnsetOnlineArchiveEventsCount() { + o.OnlineArchiveEventsCount.Unset() } // GetOrgName returns the OrgName field value if set, zero value otherwise. @@ -166,8 +179,8 @@ func (o UsageOnlineArchiveHour) MarshalJSON() ([]byte, error) { toSerialize["hour"] = o.Hour.Format("2006-01-02T15:04:05.000Z07:00") } } - if o.OnlineArchiveEventsCount != nil { - toSerialize["online_archive_events_count"] = o.OnlineArchiveEventsCount + if o.OnlineArchiveEventsCount.IsSet() { + toSerialize["online_archive_events_count"] = o.OnlineArchiveEventsCount.Get() } if o.OrgName != nil { toSerialize["org_name"] = o.OrgName @@ -186,10 +199,10 @@ func (o UsageOnlineArchiveHour) MarshalJSON() ([]byte, error) { func (o *UsageOnlineArchiveHour) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - Hour *time.Time `json:"hour,omitempty"` - OnlineArchiveEventsCount *int64 `json:"online_archive_events_count,omitempty"` - OrgName *string `json:"org_name,omitempty"` - PublicId *string `json:"public_id,omitempty"` + Hour *time.Time `json:"hour,omitempty"` + OnlineArchiveEventsCount datadog.NullableInt64 `json:"online_archive_events_count,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV1/model_usage_profiling_hour.go b/api/datadogV1/model_usage_profiling_hour.go index 57adcb6bbe5..fa0ff5c6183 100644 --- a/api/datadogV1/model_usage_profiling_hour.go +++ b/api/datadogV1/model_usage_profiling_hour.go @@ -7,14 +7,16 @@ package datadogV1 import ( "encoding/json" "time" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // UsageProfilingHour The number of profiled hosts for each hour for a given organization. type UsageProfilingHour struct { // Get average number of container agents for that hour. - AvgContainerAgentCount *int64 `json:"avg_container_agent_count,omitempty"` + AvgContainerAgentCount datadog.NullableInt64 `json:"avg_container_agent_count,omitempty"` // Contains the total number of profiled hosts reporting during a given hour. - HostCount *int64 `json:"host_count,omitempty"` + HostCount datadog.NullableInt64 `json:"host_count,omitempty"` // The hour for the usage. Hour *time.Time `json:"hour,omitempty"` // The organization name. @@ -43,60 +45,82 @@ func NewUsageProfilingHourWithDefaults() *UsageProfilingHour { return &this } -// GetAvgContainerAgentCount returns the AvgContainerAgentCount field value if set, zero value otherwise. +// GetAvgContainerAgentCount returns the AvgContainerAgentCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageProfilingHour) GetAvgContainerAgentCount() int64 { - if o == nil || o.AvgContainerAgentCount == nil { + if o == nil || o.AvgContainerAgentCount.Get() == nil { var ret int64 return ret } - return *o.AvgContainerAgentCount + return *o.AvgContainerAgentCount.Get() } // GetAvgContainerAgentCountOk returns a tuple with the AvgContainerAgentCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageProfilingHour) GetAvgContainerAgentCountOk() (*int64, bool) { - if o == nil || o.AvgContainerAgentCount == nil { + if o == nil { return nil, false } - return o.AvgContainerAgentCount, true + return o.AvgContainerAgentCount.Get(), o.AvgContainerAgentCount.IsSet() } // HasAvgContainerAgentCount returns a boolean if a field has been set. func (o *UsageProfilingHour) HasAvgContainerAgentCount() bool { - return o != nil && o.AvgContainerAgentCount != nil + return o != nil && o.AvgContainerAgentCount.IsSet() } -// SetAvgContainerAgentCount gets a reference to the given int64 and assigns it to the AvgContainerAgentCount field. +// SetAvgContainerAgentCount gets a reference to the given datadog.NullableInt64 and assigns it to the AvgContainerAgentCount field. func (o *UsageProfilingHour) SetAvgContainerAgentCount(v int64) { - o.AvgContainerAgentCount = &v + o.AvgContainerAgentCount.Set(&v) +} + +// SetAvgContainerAgentCountNil sets the value for AvgContainerAgentCount to be an explicit nil. +func (o *UsageProfilingHour) SetAvgContainerAgentCountNil() { + o.AvgContainerAgentCount.Set(nil) +} + +// UnsetAvgContainerAgentCount ensures that no value is present for AvgContainerAgentCount, not even an explicit nil. +func (o *UsageProfilingHour) UnsetAvgContainerAgentCount() { + o.AvgContainerAgentCount.Unset() } -// GetHostCount returns the HostCount field value if set, zero value otherwise. +// GetHostCount returns the HostCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageProfilingHour) GetHostCount() int64 { - if o == nil || o.HostCount == nil { + if o == nil || o.HostCount.Get() == nil { var ret int64 return ret } - return *o.HostCount + return *o.HostCount.Get() } // GetHostCountOk returns a tuple with the HostCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageProfilingHour) GetHostCountOk() (*int64, bool) { - if o == nil || o.HostCount == nil { + if o == nil { return nil, false } - return o.HostCount, true + return o.HostCount.Get(), o.HostCount.IsSet() } // HasHostCount returns a boolean if a field has been set. func (o *UsageProfilingHour) HasHostCount() bool { - return o != nil && o.HostCount != nil + return o != nil && o.HostCount.IsSet() } -// SetHostCount gets a reference to the given int64 and assigns it to the HostCount field. +// SetHostCount gets a reference to the given datadog.NullableInt64 and assigns it to the HostCount field. func (o *UsageProfilingHour) SetHostCount(v int64) { - o.HostCount = &v + o.HostCount.Set(&v) +} + +// SetHostCountNil sets the value for HostCount to be an explicit nil. +func (o *UsageProfilingHour) SetHostCountNil() { + o.HostCount.Set(nil) +} + +// UnsetHostCount ensures that no value is present for HostCount, not even an explicit nil. +func (o *UsageProfilingHour) UnsetHostCount() { + o.HostCount.Unset() } // GetHour returns the Hour field value if set, zero value otherwise. @@ -189,11 +213,11 @@ func (o UsageProfilingHour) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return json.Marshal(o.UnparsedObject) } - if o.AvgContainerAgentCount != nil { - toSerialize["avg_container_agent_count"] = o.AvgContainerAgentCount + if o.AvgContainerAgentCount.IsSet() { + toSerialize["avg_container_agent_count"] = o.AvgContainerAgentCount.Get() } - if o.HostCount != nil { - toSerialize["host_count"] = o.HostCount + if o.HostCount.IsSet() { + toSerialize["host_count"] = o.HostCount.Get() } if o.Hour != nil { if o.Hour.Nanosecond() == 0 { @@ -219,11 +243,11 @@ func (o UsageProfilingHour) MarshalJSON() ([]byte, error) { func (o *UsageProfilingHour) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - AvgContainerAgentCount *int64 `json:"avg_container_agent_count,omitempty"` - HostCount *int64 `json:"host_count,omitempty"` - Hour *time.Time `json:"hour,omitempty"` - OrgName *string `json:"org_name,omitempty"` - PublicId *string `json:"public_id,omitempty"` + AvgContainerAgentCount datadog.NullableInt64 `json:"avg_container_agent_count,omitempty"` + HostCount datadog.NullableInt64 `json:"host_count,omitempty"` + Hour *time.Time `json:"hour,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV1/model_usage_rum_units_hour.go b/api/datadogV1/model_usage_rum_units_hour.go index 8e00213a570..64f0eb99448 100644 --- a/api/datadogV1/model_usage_rum_units_hour.go +++ b/api/datadogV1/model_usage_rum_units_hour.go @@ -13,9 +13,9 @@ import ( // UsageRumUnitsHour Number of RUM Units used for each hour for a given organization (data available as of November 1, 2021). type UsageRumUnitsHour struct { // The number of browser RUM units. - BrowserRumUnits *int64 `json:"browser_rum_units,omitempty"` + BrowserRumUnits datadog.NullableInt64 `json:"browser_rum_units,omitempty"` // The number of mobile RUM units. - MobileRumUnits *int64 `json:"mobile_rum_units,omitempty"` + MobileRumUnits datadog.NullableInt64 `json:"mobile_rum_units,omitempty"` // The organization name. OrgName *string `json:"org_name,omitempty"` // The organization public ID. @@ -44,60 +44,82 @@ func NewUsageRumUnitsHourWithDefaults() *UsageRumUnitsHour { return &this } -// GetBrowserRumUnits returns the BrowserRumUnits field value if set, zero value otherwise. +// GetBrowserRumUnits returns the BrowserRumUnits field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageRumUnitsHour) GetBrowserRumUnits() int64 { - if o == nil || o.BrowserRumUnits == nil { + if o == nil || o.BrowserRumUnits.Get() == nil { var ret int64 return ret } - return *o.BrowserRumUnits + return *o.BrowserRumUnits.Get() } // GetBrowserRumUnitsOk returns a tuple with the BrowserRumUnits field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageRumUnitsHour) GetBrowserRumUnitsOk() (*int64, bool) { - if o == nil || o.BrowserRumUnits == nil { + if o == nil { return nil, false } - return o.BrowserRumUnits, true + return o.BrowserRumUnits.Get(), o.BrowserRumUnits.IsSet() } // HasBrowserRumUnits returns a boolean if a field has been set. func (o *UsageRumUnitsHour) HasBrowserRumUnits() bool { - return o != nil && o.BrowserRumUnits != nil + return o != nil && o.BrowserRumUnits.IsSet() } -// SetBrowserRumUnits gets a reference to the given int64 and assigns it to the BrowserRumUnits field. +// SetBrowserRumUnits gets a reference to the given datadog.NullableInt64 and assigns it to the BrowserRumUnits field. func (o *UsageRumUnitsHour) SetBrowserRumUnits(v int64) { - o.BrowserRumUnits = &v + o.BrowserRumUnits.Set(&v) +} + +// SetBrowserRumUnitsNil sets the value for BrowserRumUnits to be an explicit nil. +func (o *UsageRumUnitsHour) SetBrowserRumUnitsNil() { + o.BrowserRumUnits.Set(nil) +} + +// UnsetBrowserRumUnits ensures that no value is present for BrowserRumUnits, not even an explicit nil. +func (o *UsageRumUnitsHour) UnsetBrowserRumUnits() { + o.BrowserRumUnits.Unset() } -// GetMobileRumUnits returns the MobileRumUnits field value if set, zero value otherwise. +// GetMobileRumUnits returns the MobileRumUnits field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageRumUnitsHour) GetMobileRumUnits() int64 { - if o == nil || o.MobileRumUnits == nil { + if o == nil || o.MobileRumUnits.Get() == nil { var ret int64 return ret } - return *o.MobileRumUnits + return *o.MobileRumUnits.Get() } // GetMobileRumUnitsOk returns a tuple with the MobileRumUnits field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageRumUnitsHour) GetMobileRumUnitsOk() (*int64, bool) { - if o == nil || o.MobileRumUnits == nil { + if o == nil { return nil, false } - return o.MobileRumUnits, true + return o.MobileRumUnits.Get(), o.MobileRumUnits.IsSet() } // HasMobileRumUnits returns a boolean if a field has been set. func (o *UsageRumUnitsHour) HasMobileRumUnits() bool { - return o != nil && o.MobileRumUnits != nil + return o != nil && o.MobileRumUnits.IsSet() } -// SetMobileRumUnits gets a reference to the given int64 and assigns it to the MobileRumUnits field. +// SetMobileRumUnits gets a reference to the given datadog.NullableInt64 and assigns it to the MobileRumUnits field. func (o *UsageRumUnitsHour) SetMobileRumUnits(v int64) { - o.MobileRumUnits = &v + o.MobileRumUnits.Set(&v) +} + +// SetMobileRumUnitsNil sets the value for MobileRumUnits to be an explicit nil. +func (o *UsageRumUnitsHour) SetMobileRumUnitsNil() { + o.MobileRumUnits.Set(nil) +} + +// UnsetMobileRumUnits ensures that no value is present for MobileRumUnits, not even an explicit nil. +func (o *UsageRumUnitsHour) UnsetMobileRumUnits() { + o.MobileRumUnits.Unset() } // GetOrgName returns the OrgName field value if set, zero value otherwise. @@ -201,11 +223,11 @@ func (o UsageRumUnitsHour) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return json.Marshal(o.UnparsedObject) } - if o.BrowserRumUnits != nil { - toSerialize["browser_rum_units"] = o.BrowserRumUnits + if o.BrowserRumUnits.IsSet() { + toSerialize["browser_rum_units"] = o.BrowserRumUnits.Get() } - if o.MobileRumUnits != nil { - toSerialize["mobile_rum_units"] = o.MobileRumUnits + if o.MobileRumUnits.IsSet() { + toSerialize["mobile_rum_units"] = o.MobileRumUnits.Get() } if o.OrgName != nil { toSerialize["org_name"] = o.OrgName @@ -227,8 +249,8 @@ func (o UsageRumUnitsHour) MarshalJSON() ([]byte, error) { func (o *UsageRumUnitsHour) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - BrowserRumUnits *int64 `json:"browser_rum_units,omitempty"` - MobileRumUnits *int64 `json:"mobile_rum_units,omitempty"` + BrowserRumUnits datadog.NullableInt64 `json:"browser_rum_units,omitempty"` + MobileRumUnits datadog.NullableInt64 `json:"mobile_rum_units,omitempty"` OrgName *string `json:"org_name,omitempty"` PublicId *string `json:"public_id,omitempty"` RumUnits datadog.NullableInt64 `json:"rum_units,omitempty"` diff --git a/api/datadogV1/model_usage_snmp_hour.go b/api/datadogV1/model_usage_snmp_hour.go index f0a9d57a088..916d07e162c 100644 --- a/api/datadogV1/model_usage_snmp_hour.go +++ b/api/datadogV1/model_usage_snmp_hour.go @@ -7,6 +7,8 @@ package datadogV1 import ( "encoding/json" "time" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // UsageSNMPHour The number of SNMP devices for each hour for a given organization. @@ -18,7 +20,7 @@ type UsageSNMPHour struct { // The organization public ID. PublicId *string `json:"public_id,omitempty"` // Contains the number of SNMP devices. - SnmpDevices *int64 `json:"snmp_devices,omitempty"` + SnmpDevices datadog.NullableInt64 `json:"snmp_devices,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} @@ -125,32 +127,43 @@ func (o *UsageSNMPHour) SetPublicId(v string) { o.PublicId = &v } -// GetSnmpDevices returns the SnmpDevices field value if set, zero value otherwise. +// GetSnmpDevices returns the SnmpDevices field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageSNMPHour) GetSnmpDevices() int64 { - if o == nil || o.SnmpDevices == nil { + if o == nil || o.SnmpDevices.Get() == nil { var ret int64 return ret } - return *o.SnmpDevices + return *o.SnmpDevices.Get() } // GetSnmpDevicesOk returns a tuple with the SnmpDevices field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageSNMPHour) GetSnmpDevicesOk() (*int64, bool) { - if o == nil || o.SnmpDevices == nil { + if o == nil { return nil, false } - return o.SnmpDevices, true + return o.SnmpDevices.Get(), o.SnmpDevices.IsSet() } // HasSnmpDevices returns a boolean if a field has been set. func (o *UsageSNMPHour) HasSnmpDevices() bool { - return o != nil && o.SnmpDevices != nil + return o != nil && o.SnmpDevices.IsSet() } -// SetSnmpDevices gets a reference to the given int64 and assigns it to the SnmpDevices field. +// SetSnmpDevices gets a reference to the given datadog.NullableInt64 and assigns it to the SnmpDevices field. func (o *UsageSNMPHour) SetSnmpDevices(v int64) { - o.SnmpDevices = &v + o.SnmpDevices.Set(&v) +} + +// SetSnmpDevicesNil sets the value for SnmpDevices to be an explicit nil. +func (o *UsageSNMPHour) SetSnmpDevicesNil() { + o.SnmpDevices.Set(nil) +} + +// UnsetSnmpDevices ensures that no value is present for SnmpDevices, not even an explicit nil. +func (o *UsageSNMPHour) UnsetSnmpDevices() { + o.SnmpDevices.Unset() } // MarshalJSON serializes the struct using spec logic. @@ -172,8 +185,8 @@ func (o UsageSNMPHour) MarshalJSON() ([]byte, error) { if o.PublicId != nil { toSerialize["public_id"] = o.PublicId } - if o.SnmpDevices != nil { - toSerialize["snmp_devices"] = o.SnmpDevices + if o.SnmpDevices.IsSet() { + toSerialize["snmp_devices"] = o.SnmpDevices.Get() } for key, value := range o.AdditionalProperties { @@ -186,10 +199,10 @@ func (o UsageSNMPHour) MarshalJSON() ([]byte, error) { func (o *UsageSNMPHour) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - Hour *time.Time `json:"hour,omitempty"` - OrgName *string `json:"org_name,omitempty"` - PublicId *string `json:"public_id,omitempty"` - SnmpDevices *int64 `json:"snmp_devices,omitempty"` + Hour *time.Time `json:"hour,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` + SnmpDevices datadog.NullableInt64 `json:"snmp_devices,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV1/model_usage_synthetics_api_hour.go b/api/datadogV1/model_usage_synthetics_api_hour.go index 73dd085bed8..efd7c46026f 100644 --- a/api/datadogV1/model_usage_synthetics_api_hour.go +++ b/api/datadogV1/model_usage_synthetics_api_hour.go @@ -7,12 +7,14 @@ package datadogV1 import ( "encoding/json" "time" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // UsageSyntheticsAPIHour Number of Synthetics API tests run for each hour for a given organization. type UsageSyntheticsAPIHour struct { // Contains the number of Synthetics API tests run. - CheckCallsCount *int64 `json:"check_calls_count,omitempty"` + CheckCallsCount datadog.NullableInt64 `json:"check_calls_count,omitempty"` // The hour for the usage. Hour *time.Time `json:"hour,omitempty"` // The organization name. @@ -41,32 +43,43 @@ func NewUsageSyntheticsAPIHourWithDefaults() *UsageSyntheticsAPIHour { return &this } -// GetCheckCallsCount returns the CheckCallsCount field value if set, zero value otherwise. +// GetCheckCallsCount returns the CheckCallsCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageSyntheticsAPIHour) GetCheckCallsCount() int64 { - if o == nil || o.CheckCallsCount == nil { + if o == nil || o.CheckCallsCount.Get() == nil { var ret int64 return ret } - return *o.CheckCallsCount + return *o.CheckCallsCount.Get() } // GetCheckCallsCountOk returns a tuple with the CheckCallsCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageSyntheticsAPIHour) GetCheckCallsCountOk() (*int64, bool) { - if o == nil || o.CheckCallsCount == nil { + if o == nil { return nil, false } - return o.CheckCallsCount, true + return o.CheckCallsCount.Get(), o.CheckCallsCount.IsSet() } // HasCheckCallsCount returns a boolean if a field has been set. func (o *UsageSyntheticsAPIHour) HasCheckCallsCount() bool { - return o != nil && o.CheckCallsCount != nil + return o != nil && o.CheckCallsCount.IsSet() } -// SetCheckCallsCount gets a reference to the given int64 and assigns it to the CheckCallsCount field. +// SetCheckCallsCount gets a reference to the given datadog.NullableInt64 and assigns it to the CheckCallsCount field. func (o *UsageSyntheticsAPIHour) SetCheckCallsCount(v int64) { - o.CheckCallsCount = &v + o.CheckCallsCount.Set(&v) +} + +// SetCheckCallsCountNil sets the value for CheckCallsCount to be an explicit nil. +func (o *UsageSyntheticsAPIHour) SetCheckCallsCountNil() { + o.CheckCallsCount.Set(nil) +} + +// UnsetCheckCallsCount ensures that no value is present for CheckCallsCount, not even an explicit nil. +func (o *UsageSyntheticsAPIHour) UnsetCheckCallsCount() { + o.CheckCallsCount.Unset() } // GetHour returns the Hour field value if set, zero value otherwise. @@ -159,8 +172,8 @@ func (o UsageSyntheticsAPIHour) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return json.Marshal(o.UnparsedObject) } - if o.CheckCallsCount != nil { - toSerialize["check_calls_count"] = o.CheckCallsCount + if o.CheckCallsCount.IsSet() { + toSerialize["check_calls_count"] = o.CheckCallsCount.Get() } if o.Hour != nil { if o.Hour.Nanosecond() == 0 { @@ -186,10 +199,10 @@ func (o UsageSyntheticsAPIHour) MarshalJSON() ([]byte, error) { func (o *UsageSyntheticsAPIHour) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - CheckCallsCount *int64 `json:"check_calls_count,omitempty"` - Hour *time.Time `json:"hour,omitempty"` - OrgName *string `json:"org_name,omitempty"` - PublicId *string `json:"public_id,omitempty"` + CheckCallsCount datadog.NullableInt64 `json:"check_calls_count,omitempty"` + Hour *time.Time `json:"hour,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV1/model_usage_synthetics_browser_hour.go b/api/datadogV1/model_usage_synthetics_browser_hour.go index cfed240f1ce..741bf12b617 100644 --- a/api/datadogV1/model_usage_synthetics_browser_hour.go +++ b/api/datadogV1/model_usage_synthetics_browser_hour.go @@ -7,12 +7,14 @@ package datadogV1 import ( "encoding/json" "time" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // UsageSyntheticsBrowserHour Number of Synthetics Browser tests run for each hour for a given organization. type UsageSyntheticsBrowserHour struct { // Contains the number of Synthetics Browser tests run. - BrowserCheckCallsCount *int64 `json:"browser_check_calls_count,omitempty"` + BrowserCheckCallsCount datadog.NullableInt64 `json:"browser_check_calls_count,omitempty"` // The hour for the usage. Hour *time.Time `json:"hour,omitempty"` // The organization name. @@ -41,32 +43,43 @@ func NewUsageSyntheticsBrowserHourWithDefaults() *UsageSyntheticsBrowserHour { return &this } -// GetBrowserCheckCallsCount returns the BrowserCheckCallsCount field value if set, zero value otherwise. +// GetBrowserCheckCallsCount returns the BrowserCheckCallsCount field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageSyntheticsBrowserHour) GetBrowserCheckCallsCount() int64 { - if o == nil || o.BrowserCheckCallsCount == nil { + if o == nil || o.BrowserCheckCallsCount.Get() == nil { var ret int64 return ret } - return *o.BrowserCheckCallsCount + return *o.BrowserCheckCallsCount.Get() } // GetBrowserCheckCallsCountOk returns a tuple with the BrowserCheckCallsCount field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageSyntheticsBrowserHour) GetBrowserCheckCallsCountOk() (*int64, bool) { - if o == nil || o.BrowserCheckCallsCount == nil { + if o == nil { return nil, false } - return o.BrowserCheckCallsCount, true + return o.BrowserCheckCallsCount.Get(), o.BrowserCheckCallsCount.IsSet() } // HasBrowserCheckCallsCount returns a boolean if a field has been set. func (o *UsageSyntheticsBrowserHour) HasBrowserCheckCallsCount() bool { - return o != nil && o.BrowserCheckCallsCount != nil + return o != nil && o.BrowserCheckCallsCount.IsSet() } -// SetBrowserCheckCallsCount gets a reference to the given int64 and assigns it to the BrowserCheckCallsCount field. +// SetBrowserCheckCallsCount gets a reference to the given datadog.NullableInt64 and assigns it to the BrowserCheckCallsCount field. func (o *UsageSyntheticsBrowserHour) SetBrowserCheckCallsCount(v int64) { - o.BrowserCheckCallsCount = &v + o.BrowserCheckCallsCount.Set(&v) +} + +// SetBrowserCheckCallsCountNil sets the value for BrowserCheckCallsCount to be an explicit nil. +func (o *UsageSyntheticsBrowserHour) SetBrowserCheckCallsCountNil() { + o.BrowserCheckCallsCount.Set(nil) +} + +// UnsetBrowserCheckCallsCount ensures that no value is present for BrowserCheckCallsCount, not even an explicit nil. +func (o *UsageSyntheticsBrowserHour) UnsetBrowserCheckCallsCount() { + o.BrowserCheckCallsCount.Unset() } // GetHour returns the Hour field value if set, zero value otherwise. @@ -159,8 +172,8 @@ func (o UsageSyntheticsBrowserHour) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return json.Marshal(o.UnparsedObject) } - if o.BrowserCheckCallsCount != nil { - toSerialize["browser_check_calls_count"] = o.BrowserCheckCallsCount + if o.BrowserCheckCallsCount.IsSet() { + toSerialize["browser_check_calls_count"] = o.BrowserCheckCallsCount.Get() } if o.Hour != nil { if o.Hour.Nanosecond() == 0 { @@ -186,10 +199,10 @@ func (o UsageSyntheticsBrowserHour) MarshalJSON() ([]byte, error) { func (o *UsageSyntheticsBrowserHour) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - BrowserCheckCallsCount *int64 `json:"browser_check_calls_count,omitempty"` - Hour *time.Time `json:"hour,omitempty"` - OrgName *string `json:"org_name,omitempty"` - PublicId *string `json:"public_id,omitempty"` + BrowserCheckCallsCount datadog.NullableInt64 `json:"browser_check_calls_count,omitempty"` + Hour *time.Time `json:"hour,omitempty"` + OrgName *string `json:"org_name,omitempty"` + PublicId *string `json:"public_id,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV1/model_usage_top_avg_metrics_pagination.go b/api/datadogV1/model_usage_top_avg_metrics_pagination.go index 21b9742fead..df853a770e3 100644 --- a/api/datadogV1/model_usage_top_avg_metrics_pagination.go +++ b/api/datadogV1/model_usage_top_avg_metrics_pagination.go @@ -17,7 +17,7 @@ type UsageTopAvgMetricsPagination struct { // The cursor to get the next results (if any). To make the next request, use the same parameters and add `next_record_id`. NextRecordId datadog.NullableString `json:"next_record_id,omitempty"` // Total number of records. - TotalNumberOfRecords *int64 `json:"total_number_of_records,omitempty"` + TotalNumberOfRecords datadog.NullableInt64 `json:"total_number_of_records,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} @@ -107,32 +107,43 @@ func (o *UsageTopAvgMetricsPagination) UnsetNextRecordId() { o.NextRecordId.Unset() } -// GetTotalNumberOfRecords returns the TotalNumberOfRecords field value if set, zero value otherwise. +// GetTotalNumberOfRecords returns the TotalNumberOfRecords field value if set, zero value otherwise (both if not set or set to explicit null). func (o *UsageTopAvgMetricsPagination) GetTotalNumberOfRecords() int64 { - if o == nil || o.TotalNumberOfRecords == nil { + if o == nil || o.TotalNumberOfRecords.Get() == nil { var ret int64 return ret } - return *o.TotalNumberOfRecords + return *o.TotalNumberOfRecords.Get() } // GetTotalNumberOfRecordsOk returns a tuple with the TotalNumberOfRecords field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *UsageTopAvgMetricsPagination) GetTotalNumberOfRecordsOk() (*int64, bool) { - if o == nil || o.TotalNumberOfRecords == nil { + if o == nil { return nil, false } - return o.TotalNumberOfRecords, true + return o.TotalNumberOfRecords.Get(), o.TotalNumberOfRecords.IsSet() } // HasTotalNumberOfRecords returns a boolean if a field has been set. func (o *UsageTopAvgMetricsPagination) HasTotalNumberOfRecords() bool { - return o != nil && o.TotalNumberOfRecords != nil + return o != nil && o.TotalNumberOfRecords.IsSet() } -// SetTotalNumberOfRecords gets a reference to the given int64 and assigns it to the TotalNumberOfRecords field. +// SetTotalNumberOfRecords gets a reference to the given datadog.NullableInt64 and assigns it to the TotalNumberOfRecords field. func (o *UsageTopAvgMetricsPagination) SetTotalNumberOfRecords(v int64) { - o.TotalNumberOfRecords = &v + o.TotalNumberOfRecords.Set(&v) +} + +// SetTotalNumberOfRecordsNil sets the value for TotalNumberOfRecords to be an explicit nil. +func (o *UsageTopAvgMetricsPagination) SetTotalNumberOfRecordsNil() { + o.TotalNumberOfRecords.Set(nil) +} + +// UnsetTotalNumberOfRecords ensures that no value is present for TotalNumberOfRecords, not even an explicit nil. +func (o *UsageTopAvgMetricsPagination) UnsetTotalNumberOfRecords() { + o.TotalNumberOfRecords.Unset() } // MarshalJSON serializes the struct using spec logic. @@ -147,8 +158,8 @@ func (o UsageTopAvgMetricsPagination) MarshalJSON() ([]byte, error) { if o.NextRecordId.IsSet() { toSerialize["next_record_id"] = o.NextRecordId.Get() } - if o.TotalNumberOfRecords != nil { - toSerialize["total_number_of_records"] = o.TotalNumberOfRecords + if o.TotalNumberOfRecords.IsSet() { + toSerialize["total_number_of_records"] = o.TotalNumberOfRecords.Get() } for key, value := range o.AdditionalProperties { @@ -163,7 +174,7 @@ func (o *UsageTopAvgMetricsPagination) UnmarshalJSON(bytes []byte) (err error) { all := struct { Limit *int64 `json:"limit,omitempty"` NextRecordId datadog.NullableString `json:"next_record_id,omitempty"` - TotalNumberOfRecords *int64 `json:"total_number_of_records,omitempty"` + TotalNumberOfRecords datadog.NullableInt64 `json:"total_number_of_records,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV2/model_cloud_configuration_rule_compliance_signal_options.go b/api/datadogV2/model_cloud_configuration_rule_compliance_signal_options.go index dd5e3dbe0f7..e21ee6a2bf8 100644 --- a/api/datadogV2/model_cloud_configuration_rule_compliance_signal_options.go +++ b/api/datadogV2/model_cloud_configuration_rule_compliance_signal_options.go @@ -6,12 +6,14 @@ package datadogV2 import ( "encoding/json" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // CloudConfigurationRuleComplianceSignalOptions How to generate compliance signals. Useful for cloud_configuration rules only. type CloudConfigurationRuleComplianceSignalOptions struct { // Whether signals will be sent. - UserActivationStatus *bool `json:"userActivationStatus,omitempty"` + UserActivationStatus datadog.NullableBool `json:"userActivationStatus,omitempty"` // Fields to use to group findings by when sending signals. UserGroupByFields []string `json:"userGroupByFields,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct @@ -36,37 +38,48 @@ func NewCloudConfigurationRuleComplianceSignalOptionsWithDefaults() *CloudConfig return &this } -// GetUserActivationStatus returns the UserActivationStatus field value if set, zero value otherwise. +// GetUserActivationStatus returns the UserActivationStatus field value if set, zero value otherwise (both if not set or set to explicit null). func (o *CloudConfigurationRuleComplianceSignalOptions) GetUserActivationStatus() bool { - if o == nil || o.UserActivationStatus == nil { + if o == nil || o.UserActivationStatus.Get() == nil { var ret bool return ret } - return *o.UserActivationStatus + return *o.UserActivationStatus.Get() } // GetUserActivationStatusOk returns a tuple with the UserActivationStatus field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *CloudConfigurationRuleComplianceSignalOptions) GetUserActivationStatusOk() (*bool, bool) { - if o == nil || o.UserActivationStatus == nil { + if o == nil { return nil, false } - return o.UserActivationStatus, true + return o.UserActivationStatus.Get(), o.UserActivationStatus.IsSet() } // HasUserActivationStatus returns a boolean if a field has been set. func (o *CloudConfigurationRuleComplianceSignalOptions) HasUserActivationStatus() bool { - return o != nil && o.UserActivationStatus != nil + return o != nil && o.UserActivationStatus.IsSet() } -// SetUserActivationStatus gets a reference to the given bool and assigns it to the UserActivationStatus field. +// SetUserActivationStatus gets a reference to the given datadog.NullableBool and assigns it to the UserActivationStatus field. func (o *CloudConfigurationRuleComplianceSignalOptions) SetUserActivationStatus(v bool) { - o.UserActivationStatus = &v + o.UserActivationStatus.Set(&v) +} + +// SetUserActivationStatusNil sets the value for UserActivationStatus to be an explicit nil. +func (o *CloudConfigurationRuleComplianceSignalOptions) SetUserActivationStatusNil() { + o.UserActivationStatus.Set(nil) } -// GetUserGroupByFields returns the UserGroupByFields field value if set, zero value otherwise. +// UnsetUserActivationStatus ensures that no value is present for UserActivationStatus, not even an explicit nil. +func (o *CloudConfigurationRuleComplianceSignalOptions) UnsetUserActivationStatus() { + o.UserActivationStatus.Unset() +} + +// GetUserGroupByFields returns the UserGroupByFields field value if set, zero value otherwise (both if not set or set to explicit null). func (o *CloudConfigurationRuleComplianceSignalOptions) GetUserGroupByFields() []string { - if o == nil || o.UserGroupByFields == nil { + if o == nil { var ret []string return ret } @@ -75,6 +88,7 @@ func (o *CloudConfigurationRuleComplianceSignalOptions) GetUserGroupByFields() [ // GetUserGroupByFieldsOk returns a tuple with the UserGroupByFields field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *CloudConfigurationRuleComplianceSignalOptions) GetUserGroupByFieldsOk() (*[]string, bool) { if o == nil || o.UserGroupByFields == nil { return nil, false @@ -98,8 +112,8 @@ func (o CloudConfigurationRuleComplianceSignalOptions) MarshalJSON() ([]byte, er if o.UnparsedObject != nil { return json.Marshal(o.UnparsedObject) } - if o.UserActivationStatus != nil { - toSerialize["userActivationStatus"] = o.UserActivationStatus + if o.UserActivationStatus.IsSet() { + toSerialize["userActivationStatus"] = o.UserActivationStatus.Get() } if o.UserGroupByFields != nil { toSerialize["userGroupByFields"] = o.UserGroupByFields @@ -115,8 +129,8 @@ func (o CloudConfigurationRuleComplianceSignalOptions) MarshalJSON() ([]byte, er func (o *CloudConfigurationRuleComplianceSignalOptions) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - UserActivationStatus *bool `json:"userActivationStatus,omitempty"` - UserGroupByFields []string `json:"userGroupByFields,omitempty"` + UserActivationStatus datadog.NullableBool `json:"userActivationStatus,omitempty"` + UserGroupByFields []string `json:"userGroupByFields,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV2/model_cloud_workload_security_agent_rule_creator_attributes.go b/api/datadogV2/model_cloud_workload_security_agent_rule_creator_attributes.go index a761b641a87..226d25d006e 100644 --- a/api/datadogV2/model_cloud_workload_security_agent_rule_creator_attributes.go +++ b/api/datadogV2/model_cloud_workload_security_agent_rule_creator_attributes.go @@ -6,6 +6,8 @@ package datadogV2 import ( "encoding/json" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // CloudWorkloadSecurityAgentRuleCreatorAttributes The attributes of the user who created the Agent rule. @@ -13,7 +15,7 @@ type CloudWorkloadSecurityAgentRuleCreatorAttributes struct { // The handle of the user. Handle *string `json:"handle,omitempty"` // The name of the user. - Name *string `json:"name,omitempty"` + Name datadog.NullableString `json:"name,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} @@ -64,32 +66,43 @@ func (o *CloudWorkloadSecurityAgentRuleCreatorAttributes) SetHandle(v string) { o.Handle = &v } -// GetName returns the Name field value if set, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). func (o *CloudWorkloadSecurityAgentRuleCreatorAttributes) GetName() string { - if o == nil || o.Name == nil { + if o == nil || o.Name.Get() == nil { var ret string return ret } - return *o.Name + return *o.Name.Get() } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *CloudWorkloadSecurityAgentRuleCreatorAttributes) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil { return nil, false } - return o.Name, true + return o.Name.Get(), o.Name.IsSet() } // HasName returns a boolean if a field has been set. func (o *CloudWorkloadSecurityAgentRuleCreatorAttributes) HasName() bool { - return o != nil && o.Name != nil + return o != nil && o.Name.IsSet() } -// SetName gets a reference to the given string and assigns it to the Name field. +// SetName gets a reference to the given datadog.NullableString and assigns it to the Name field. func (o *CloudWorkloadSecurityAgentRuleCreatorAttributes) SetName(v string) { - o.Name = &v + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil. +func (o *CloudWorkloadSecurityAgentRuleCreatorAttributes) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil. +func (o *CloudWorkloadSecurityAgentRuleCreatorAttributes) UnsetName() { + o.Name.Unset() } // MarshalJSON serializes the struct using spec logic. @@ -101,8 +114,8 @@ func (o CloudWorkloadSecurityAgentRuleCreatorAttributes) MarshalJSON() ([]byte, if o.Handle != nil { toSerialize["handle"] = o.Handle } - if o.Name != nil { - toSerialize["name"] = o.Name + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() } for key, value := range o.AdditionalProperties { @@ -115,8 +128,8 @@ func (o CloudWorkloadSecurityAgentRuleCreatorAttributes) MarshalJSON() ([]byte, func (o *CloudWorkloadSecurityAgentRuleCreatorAttributes) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - Handle *string `json:"handle,omitempty"` - Name *string `json:"name,omitempty"` + Handle *string `json:"handle,omitempty"` + Name datadog.NullableString `json:"name,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV2/model_cloud_workload_security_agent_rule_updater_attributes.go b/api/datadogV2/model_cloud_workload_security_agent_rule_updater_attributes.go index 304c83ec9da..6adbc8c7b21 100644 --- a/api/datadogV2/model_cloud_workload_security_agent_rule_updater_attributes.go +++ b/api/datadogV2/model_cloud_workload_security_agent_rule_updater_attributes.go @@ -6,6 +6,8 @@ package datadogV2 import ( "encoding/json" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // CloudWorkloadSecurityAgentRuleUpdaterAttributes The attributes of the user who last updated the Agent rule. @@ -13,7 +15,7 @@ type CloudWorkloadSecurityAgentRuleUpdaterAttributes struct { // The handle of the user. Handle *string `json:"handle,omitempty"` // The name of the user. - Name *string `json:"name,omitempty"` + Name datadog.NullableString `json:"name,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} @@ -64,32 +66,43 @@ func (o *CloudWorkloadSecurityAgentRuleUpdaterAttributes) SetHandle(v string) { o.Handle = &v } -// GetName returns the Name field value if set, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). func (o *CloudWorkloadSecurityAgentRuleUpdaterAttributes) GetName() string { - if o == nil || o.Name == nil { + if o == nil || o.Name.Get() == nil { var ret string return ret } - return *o.Name + return *o.Name.Get() } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *CloudWorkloadSecurityAgentRuleUpdaterAttributes) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil { return nil, false } - return o.Name, true + return o.Name.Get(), o.Name.IsSet() } // HasName returns a boolean if a field has been set. func (o *CloudWorkloadSecurityAgentRuleUpdaterAttributes) HasName() bool { - return o != nil && o.Name != nil + return o != nil && o.Name.IsSet() } -// SetName gets a reference to the given string and assigns it to the Name field. +// SetName gets a reference to the given datadog.NullableString and assigns it to the Name field. func (o *CloudWorkloadSecurityAgentRuleUpdaterAttributes) SetName(v string) { - o.Name = &v + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil. +func (o *CloudWorkloadSecurityAgentRuleUpdaterAttributes) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil. +func (o *CloudWorkloadSecurityAgentRuleUpdaterAttributes) UnsetName() { + o.Name.Unset() } // MarshalJSON serializes the struct using spec logic. @@ -101,8 +114,8 @@ func (o CloudWorkloadSecurityAgentRuleUpdaterAttributes) MarshalJSON() ([]byte, if o.Handle != nil { toSerialize["handle"] = o.Handle } - if o.Name != nil { - toSerialize["name"] = o.Name + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() } for key, value := range o.AdditionalProperties { @@ -115,8 +128,8 @@ func (o CloudWorkloadSecurityAgentRuleUpdaterAttributes) MarshalJSON() ([]byte, func (o *CloudWorkloadSecurityAgentRuleUpdaterAttributes) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - Handle *string `json:"handle,omitempty"` - Name *string `json:"name,omitempty"` + Handle *string `json:"handle,omitempty"` + Name datadog.NullableString `json:"name,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV2/model_creator.go b/api/datadogV2/model_creator.go index 913dca9f06b..5df453c080a 100644 --- a/api/datadogV2/model_creator.go +++ b/api/datadogV2/model_creator.go @@ -6,6 +6,8 @@ package datadogV2 import ( "encoding/json" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // Creator Creator of the object. @@ -15,7 +17,7 @@ type Creator struct { // Handle of the creator. Handle *string `json:"handle,omitempty"` // Name of the creator. - Name *string `json:"name,omitempty"` + Name datadog.NullableString `json:"name,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct UnparsedObject map[string]interface{} `json:"-"` AdditionalProperties map[string]interface{} @@ -94,32 +96,43 @@ func (o *Creator) SetHandle(v string) { o.Handle = &v } -// GetName returns the Name field value if set, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). func (o *Creator) GetName() string { - if o == nil || o.Name == nil { + if o == nil || o.Name.Get() == nil { var ret string return ret } - return *o.Name + return *o.Name.Get() } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *Creator) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil { return nil, false } - return o.Name, true + return o.Name.Get(), o.Name.IsSet() } // HasName returns a boolean if a field has been set. func (o *Creator) HasName() bool { - return o != nil && o.Name != nil + return o != nil && o.Name.IsSet() } -// SetName gets a reference to the given string and assigns it to the Name field. +// SetName gets a reference to the given datadog.NullableString and assigns it to the Name field. func (o *Creator) SetName(v string) { - o.Name = &v + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil. +func (o *Creator) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil. +func (o *Creator) UnsetName() { + o.Name.Unset() } // MarshalJSON serializes the struct using spec logic. @@ -134,8 +147,8 @@ func (o Creator) MarshalJSON() ([]byte, error) { if o.Handle != nil { toSerialize["handle"] = o.Handle } - if o.Name != nil { - toSerialize["name"] = o.Name + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() } for key, value := range o.AdditionalProperties { @@ -148,9 +161,9 @@ func (o Creator) MarshalJSON() ([]byte, error) { func (o *Creator) UnmarshalJSON(bytes []byte) (err error) { raw := map[string]interface{}{} all := struct { - Email *string `json:"email,omitempty"` - Handle *string `json:"handle,omitempty"` - Name *string `json:"name,omitempty"` + Email *string `json:"email,omitempty"` + Handle *string `json:"handle,omitempty"` + Name datadog.NullableString `json:"name,omitempty"` }{} err = json.Unmarshal(bytes, &all) if err != nil { diff --git a/api/datadogV2/model_dashboard_list_item.go b/api/datadogV2/model_dashboard_list_item.go index 87a4c87f128..1f4b2765b6c 100644 --- a/api/datadogV2/model_dashboard_list_item.go +++ b/api/datadogV2/model_dashboard_list_item.go @@ -8,6 +8,8 @@ import ( "encoding/json" "fmt" "time" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // DashboardListItem A dashboard within a list. @@ -17,7 +19,7 @@ type DashboardListItem struct { // Date of creation of the dashboard. Created *time.Time `json:"created,omitempty"` // URL to the icon of the dashboard. - Icon *string `json:"icon,omitempty"` + Icon datadog.NullableString `json:"icon,omitempty"` // ID of the dashboard. Id string `json:"id"` // Whether or not the dashboard is in the favorites. @@ -116,32 +118,43 @@ func (o *DashboardListItem) SetCreated(v time.Time) { o.Created = &v } -// GetIcon returns the Icon field value if set, zero value otherwise. +// GetIcon returns the Icon field value if set, zero value otherwise (both if not set or set to explicit null). func (o *DashboardListItem) GetIcon() string { - if o == nil || o.Icon == nil { + if o == nil || o.Icon.Get() == nil { var ret string return ret } - return *o.Icon + return *o.Icon.Get() } // GetIconOk returns a tuple with the Icon field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *DashboardListItem) GetIconOk() (*string, bool) { - if o == nil || o.Icon == nil { + if o == nil { return nil, false } - return o.Icon, true + return o.Icon.Get(), o.Icon.IsSet() } // HasIcon returns a boolean if a field has been set. func (o *DashboardListItem) HasIcon() bool { - return o != nil && o.Icon != nil + return o != nil && o.Icon.IsSet() } -// SetIcon gets a reference to the given string and assigns it to the Icon field. +// SetIcon gets a reference to the given datadog.NullableString and assigns it to the Icon field. func (o *DashboardListItem) SetIcon(v string) { - o.Icon = &v + o.Icon.Set(&v) +} + +// SetIconNil sets the value for Icon to be an explicit nil. +func (o *DashboardListItem) SetIconNil() { + o.Icon.Set(nil) +} + +// UnsetIcon ensures that no value is present for Icon, not even an explicit nil. +func (o *DashboardListItem) UnsetIcon() { + o.Icon.Unset() } // GetId returns the Id field value. @@ -402,8 +415,8 @@ func (o DashboardListItem) MarshalJSON() ([]byte, error) { toSerialize["created"] = o.Created.Format("2006-01-02T15:04:05.000Z07:00") } } - if o.Icon != nil { - toSerialize["icon"] = o.Icon + if o.Icon.IsSet() { + toSerialize["icon"] = o.Icon.Get() } toSerialize["id"] = o.Id if o.IsFavorite != nil { @@ -447,18 +460,18 @@ func (o *DashboardListItem) UnmarshalJSON(bytes []byte) (err error) { Type *DashboardType `json:"type"` }{} all := struct { - Author *Creator `json:"author,omitempty"` - Created *time.Time `json:"created,omitempty"` - Icon *string `json:"icon,omitempty"` - Id string `json:"id"` - IsFavorite *bool `json:"is_favorite,omitempty"` - IsReadOnly *bool `json:"is_read_only,omitempty"` - IsShared *bool `json:"is_shared,omitempty"` - Modified *time.Time `json:"modified,omitempty"` - Popularity *int32 `json:"popularity,omitempty"` - Title *string `json:"title,omitempty"` - Type DashboardType `json:"type"` - Url *string `json:"url,omitempty"` + Author *Creator `json:"author,omitempty"` + Created *time.Time `json:"created,omitempty"` + Icon datadog.NullableString `json:"icon,omitempty"` + Id string `json:"id"` + IsFavorite *bool `json:"is_favorite,omitempty"` + IsReadOnly *bool `json:"is_read_only,omitempty"` + IsShared *bool `json:"is_shared,omitempty"` + Modified *time.Time `json:"modified,omitempty"` + Popularity *int32 `json:"popularity,omitempty"` + Title *string `json:"title,omitempty"` + Type DashboardType `json:"type"` + Url *string `json:"url,omitempty"` }{} err = json.Unmarshal(bytes, &required) if err != nil { diff --git a/api/datadogV2/model_security_monitoring_triage_user.go b/api/datadogV2/model_security_monitoring_triage_user.go index 20cfd01bd9c..5ab37d14049 100644 --- a/api/datadogV2/model_security_monitoring_triage_user.go +++ b/api/datadogV2/model_security_monitoring_triage_user.go @@ -7,6 +7,8 @@ package datadogV2 import ( "encoding/json" "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // SecurityMonitoringTriageUser Object representing a given user entity. @@ -16,7 +18,7 @@ type SecurityMonitoringTriageUser struct { // Numerical ID assigned by Datadog to this user account. Id *int64 `json:"id,omitempty"` // The name for this user account. - Name *string `json:"name,omitempty"` + Name datadog.NullableString `json:"name,omitempty"` // UUID assigned by Datadog to this user account. Uuid string `json:"uuid"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct @@ -98,32 +100,43 @@ func (o *SecurityMonitoringTriageUser) SetId(v int64) { o.Id = &v } -// GetName returns the Name field value if set, zero value otherwise. +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). func (o *SecurityMonitoringTriageUser) GetName() string { - if o == nil || o.Name == nil { + if o == nil || o.Name.Get() == nil { var ret string return ret } - return *o.Name + return *o.Name.Get() } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *SecurityMonitoringTriageUser) GetNameOk() (*string, bool) { - if o == nil || o.Name == nil { + if o == nil { return nil, false } - return o.Name, true + return o.Name.Get(), o.Name.IsSet() } // HasName returns a boolean if a field has been set. func (o *SecurityMonitoringTriageUser) HasName() bool { - return o != nil && o.Name != nil + return o != nil && o.Name.IsSet() } -// SetName gets a reference to the given string and assigns it to the Name field. +// SetName gets a reference to the given datadog.NullableString and assigns it to the Name field. func (o *SecurityMonitoringTriageUser) SetName(v string) { - o.Name = &v + o.Name.Set(&v) +} + +// SetNameNil sets the value for Name to be an explicit nil. +func (o *SecurityMonitoringTriageUser) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil. +func (o *SecurityMonitoringTriageUser) UnsetName() { + o.Name.Unset() } // GetUuid returns the Uuid field value. @@ -161,8 +174,8 @@ func (o SecurityMonitoringTriageUser) MarshalJSON() ([]byte, error) { if o.Id != nil { toSerialize["id"] = o.Id } - if o.Name != nil { - toSerialize["name"] = o.Name + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() } toSerialize["uuid"] = o.Uuid @@ -179,10 +192,10 @@ func (o *SecurityMonitoringTriageUser) UnmarshalJSON(bytes []byte) (err error) { Uuid *string `json:"uuid"` }{} all := struct { - Handle *string `json:"handle,omitempty"` - Id *int64 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Uuid string `json:"uuid"` + Handle *string `json:"handle,omitempty"` + Id *int64 `json:"id,omitempty"` + Name datadog.NullableString `json:"name,omitempty"` + Uuid string `json:"uuid"` }{} err = json.Unmarshal(bytes, &required) if err != nil { diff --git a/api/datadogV2/model_team_attributes.go b/api/datadogV2/model_team_attributes.go index 7a28d7e9bc2..8d8cefa88c4 100644 --- a/api/datadogV2/model_team_attributes.go +++ b/api/datadogV2/model_team_attributes.go @@ -8,6 +8,8 @@ import ( "encoding/json" "fmt" "time" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" ) // TeamAttributes Team attributes @@ -15,7 +17,7 @@ type TeamAttributes struct { // Creation date of the team CreatedAt *time.Time `json:"created_at,omitempty"` // Free-form markdown description/content for the team's homepage - Description *string `json:"description,omitempty"` + Description datadog.NullableString `json:"description,omitempty"` // The team's identifier Handle string `json:"handle"` // The number of links belonging to the team @@ -25,7 +27,7 @@ type TeamAttributes struct { // The name of the team Name string `json:"name"` // A brief summary of the team, derived from the `description` - Summary *string `json:"summary,omitempty"` + Summary datadog.NullableString `json:"summary,omitempty"` // The number of users belonging to the team UserCount *int32 `json:"user_count,omitempty"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct @@ -80,32 +82,43 @@ func (o *TeamAttributes) SetCreatedAt(v time.Time) { o.CreatedAt = &v } -// GetDescription returns the Description field value if set, zero value otherwise. +// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). func (o *TeamAttributes) GetDescription() string { - if o == nil || o.Description == nil { + if o == nil || o.Description.Get() == nil { var ret string return ret } - return *o.Description + return *o.Description.Get() } // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *TeamAttributes) GetDescriptionOk() (*string, bool) { - if o == nil || o.Description == nil { + if o == nil { return nil, false } - return o.Description, true + return o.Description.Get(), o.Description.IsSet() } // HasDescription returns a boolean if a field has been set. func (o *TeamAttributes) HasDescription() bool { - return o != nil && o.Description != nil + return o != nil && o.Description.IsSet() } -// SetDescription gets a reference to the given string and assigns it to the Description field. +// SetDescription gets a reference to the given datadog.NullableString and assigns it to the Description field. func (o *TeamAttributes) SetDescription(v string) { - o.Description = &v + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil. +func (o *TeamAttributes) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil. +func (o *TeamAttributes) UnsetDescription() { + o.Description.Unset() } // GetHandle returns the Handle field value. @@ -210,32 +223,43 @@ func (o *TeamAttributes) SetName(v string) { o.Name = v } -// GetSummary returns the Summary field value if set, zero value otherwise. +// GetSummary returns the Summary field value if set, zero value otherwise (both if not set or set to explicit null). func (o *TeamAttributes) GetSummary() string { - if o == nil || o.Summary == nil { + if o == nil || o.Summary.Get() == nil { var ret string return ret } - return *o.Summary + return *o.Summary.Get() } // GetSummaryOk returns a tuple with the Summary field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned. func (o *TeamAttributes) GetSummaryOk() (*string, bool) { - if o == nil || o.Summary == nil { + if o == nil { return nil, false } - return o.Summary, true + return o.Summary.Get(), o.Summary.IsSet() } // HasSummary returns a boolean if a field has been set. func (o *TeamAttributes) HasSummary() bool { - return o != nil && o.Summary != nil + return o != nil && o.Summary.IsSet() } -// SetSummary gets a reference to the given string and assigns it to the Summary field. +// SetSummary gets a reference to the given datadog.NullableString and assigns it to the Summary field. func (o *TeamAttributes) SetSummary(v string) { - o.Summary = &v + o.Summary.Set(&v) +} + +// SetSummaryNil sets the value for Summary to be an explicit nil. +func (o *TeamAttributes) SetSummaryNil() { + o.Summary.Set(nil) +} + +// UnsetSummary ensures that no value is present for Summary, not even an explicit nil. +func (o *TeamAttributes) UnsetSummary() { + o.Summary.Unset() } // GetUserCount returns the UserCount field value if set, zero value otherwise. @@ -279,8 +303,8 @@ func (o TeamAttributes) MarshalJSON() ([]byte, error) { toSerialize["created_at"] = o.CreatedAt.Format("2006-01-02T15:04:05.000Z07:00") } } - if o.Description != nil { - toSerialize["description"] = o.Description + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() } toSerialize["handle"] = o.Handle if o.LinkCount != nil { @@ -294,8 +318,8 @@ func (o TeamAttributes) MarshalJSON() ([]byte, error) { } } toSerialize["name"] = o.Name - if o.Summary != nil { - toSerialize["summary"] = o.Summary + if o.Summary.IsSet() { + toSerialize["summary"] = o.Summary.Get() } if o.UserCount != nil { toSerialize["user_count"] = o.UserCount @@ -315,14 +339,14 @@ func (o *TeamAttributes) UnmarshalJSON(bytes []byte) (err error) { Name *string `json:"name"` }{} all := struct { - CreatedAt *time.Time `json:"created_at,omitempty"` - Description *string `json:"description,omitempty"` - Handle string `json:"handle"` - LinkCount *int32 `json:"link_count,omitempty"` - ModifiedAt *time.Time `json:"modified_at,omitempty"` - Name string `json:"name"` - Summary *string `json:"summary,omitempty"` - UserCount *int32 `json:"user_count,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + Description datadog.NullableString `json:"description,omitempty"` + Handle string `json:"handle"` + LinkCount *int32 `json:"link_count,omitempty"` + ModifiedAt *time.Time `json:"modified_at,omitempty"` + Name string `json:"name"` + Summary datadog.NullableString `json:"summary,omitempty"` + UserCount *int32 `json:"user_count,omitempty"` }{} err = json.Unmarshal(bytes, &required) if err != nil { diff --git a/examples/v1/downtimes/CreateDowntime.go b/examples/v1/downtimes/CreateDowntime.go index ac8906e16b4..577e99f4998 100644 --- a/examples/v1/downtimes/CreateDowntime.go +++ b/examples/v1/downtimes/CreateDowntime.go @@ -15,7 +15,7 @@ import ( func main() { body := datadogV1.Downtime{ - Message: datadog.PtrString("Example-Downtime"), + Message: *datadog.NewNullableString(datadog.PtrString("Example-Downtime")), Start: datadog.PtrInt64(time.Now().Unix()), Timezone: datadog.PtrString("Etc/UTC"), Scope: []string{ diff --git a/examples/v1/downtimes/CreateDowntime_1393233946.go b/examples/v1/downtimes/CreateDowntime_1393233946.go index 39f061d9a53..bf02219622f 100644 --- a/examples/v1/downtimes/CreateDowntime_1393233946.go +++ b/examples/v1/downtimes/CreateDowntime_1393233946.go @@ -15,7 +15,7 @@ import ( func main() { body := datadogV1.Downtime{ - Message: datadog.PtrString("Example-Downtime"), + Message: *datadog.NewNullableString(datadog.PtrString("Example-Downtime")), Recurrence: *datadogV1.NewNullableDowntimeRecurrence(&datadogV1.DowntimeRecurrence{ Period: datadog.PtrInt32(1), Type: datadog.PtrString("weeks"), diff --git a/examples/v1/downtimes/CreateDowntime_2908359488.go b/examples/v1/downtimes/CreateDowntime_2908359488.go index 27b55cfe1b1..3e8905ef535 100644 --- a/examples/v1/downtimes/CreateDowntime_2908359488.go +++ b/examples/v1/downtimes/CreateDowntime_2908359488.go @@ -15,7 +15,7 @@ import ( func main() { body := datadogV1.Downtime{ - Message: datadog.PtrString("Example-Downtime"), + Message: *datadog.NewNullableString(datadog.PtrString("Example-Downtime")), Recurrence: *datadogV1.NewNullableDowntimeRecurrence(&datadogV1.DowntimeRecurrence{ Period: datadog.PtrInt32(1), Type: datadog.PtrString("weeks"), diff --git a/examples/v1/downtimes/CreateDowntime_3059354445.go b/examples/v1/downtimes/CreateDowntime_3059354445.go index e9bf1b2c375..e9a25da4b00 100644 --- a/examples/v1/downtimes/CreateDowntime_3059354445.go +++ b/examples/v1/downtimes/CreateDowntime_3059354445.go @@ -15,7 +15,7 @@ import ( func main() { body := datadogV1.Downtime{ - Message: datadog.PtrString("Example-Downtime"), + Message: *datadog.NewNullableString(datadog.PtrString("Example-Downtime")), Recurrence: *datadogV1.NewNullableDowntimeRecurrence(&datadogV1.DowntimeRecurrence{ Period: datadog.PtrInt32(1), Type: datadog.PtrString("years"), diff --git a/examples/v1/downtimes/CreateDowntime_3355644446.go b/examples/v1/downtimes/CreateDowntime_3355644446.go index 1702203f3b5..2e457ca7668 100644 --- a/examples/v1/downtimes/CreateDowntime_3355644446.go +++ b/examples/v1/downtimes/CreateDowntime_3355644446.go @@ -19,7 +19,7 @@ func main() { MonitorID, _ := strconv.ParseInt(os.Getenv("MONITOR_ID"), 10, 64) body := datadogV1.Downtime{ - Message: datadog.PtrString("Example-Downtime"), + Message: *datadog.NewNullableString(datadog.PtrString("Example-Downtime")), Start: datadog.PtrInt64(time.Now().Unix()), Timezone: datadog.PtrString("Etc/UTC"), Scope: []string{ diff --git a/examples/v1/downtimes/UpdateDowntime.go b/examples/v1/downtimes/UpdateDowntime.go index 20f1d15fd51..39d4892201b 100644 --- a/examples/v1/downtimes/UpdateDowntime.go +++ b/examples/v1/downtimes/UpdateDowntime.go @@ -18,7 +18,7 @@ func main() { DowntimeID, _ := strconv.ParseInt(os.Getenv("DOWNTIME_ID"), 10, 64) body := datadogV1.Downtime{ - Message: datadog.PtrString("Example-Downtime-updated"), + Message: *datadog.NewNullableString(datadog.PtrString("Example-Downtime-updated")), MuteFirstRecoveryNotification: datadog.PtrBool(true), } ctx := datadog.NewDefaultContext(context.Background()) diff --git a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1092490364.go b/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1092490364.go index 152e429eb00..15437916878 100644 --- a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1092490364.go +++ b/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1092490364.go @@ -44,7 +44,7 @@ func main() { "my:tag", }, ComplianceSignalOptions: datadogV2.CloudConfigurationRuleComplianceSignalOptions{ - UserActivationStatus: datadog.PtrBool(true), + UserActivationStatus: *datadog.NewNullableBool(datadog.PtrBool(true)), UserGroupByFields: []string{ "@account_id", }, diff --git a/examples/v2/security-monitoring/UpdateSecurityMonitoringRule_428087276.go b/examples/v2/security-monitoring/UpdateSecurityMonitoringRule_428087276.go index 7d30b5474ee..eaeac55f2fd 100644 --- a/examples/v2/security-monitoring/UpdateSecurityMonitoringRule_428087276.go +++ b/examples/v2/security-monitoring/UpdateSecurityMonitoringRule_428087276.go @@ -40,7 +40,7 @@ func main() { Message: datadog.PtrString("ddd"), Tags: []string{}, ComplianceSignalOptions: &datadogV2.CloudConfigurationRuleComplianceSignalOptions{ - UserActivationStatus: datadog.PtrBool(false), + UserActivationStatus: *datadog.NewNullableBool(datadog.PtrBool(false)), UserGroupByFields: []string{}, }, } diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Security_Monitoring/Scenario_Get_a_rules_details_returns_Not_Found_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Security_Monitoring/Scenario_Get_a_rules_details_returns_Not_Found_response.freeze index eb9a5a34733..65538a3ba64 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Security_Monitoring/Scenario_Get_a_rules_details_returns_Not_Found_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Security_Monitoring/Scenario_Get_a_rules_details_returns_Not_Found_response.freeze @@ -1 +1 @@ -2022-10-24T20:38:11.940Z \ No newline at end of file +2023-04-07T18:18:58.426Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Security_Monitoring/Scenario_Get_a_rules_details_returns_Not_Found_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Security_Monitoring/Scenario_Get_a_rules_details_returns_Not_Found_response.yaml index c026a50b35b..60212630755 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Security_Monitoring/Scenario_Get_a_rules_details_returns_Not_Found_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Security_Monitoring/Scenario_Get_a_rules_details_returns_Not_Found_response.yaml @@ -8,475 +8,13 @@ interactions: method: GET url: https://api.datadoghq.com/api/v2/security_monitoring/rules/abcde-12345 response: - body: "\n\n\n\n\n\n \n \n \n\ - \ \n \n Error 404 | Datadog\n |\n Datadog\n \ - \ \n \n \n \ - \ \n \n \n \n \n \n\n\ - \n\n\n\n\ -
\n
\n \n \"Sad\n \"Sad\n \n
\n
\n

Arf.

\n \ - \

404 NOT FOUND

\n \n
\n
\n\n\n\ - \n\n\n\n\n \n\n \n\n\n\n
\n
\n\n \n\n\n \n\ - \n \n\n \n\n" + body: '{"errors":["Not found"]} + + ' code: 404 duration: '' headers: Content-Type: - - text/html; charset=utf-8 + - application/json status: 404 Not Found version: 1 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Security_Monitoring/Scenario_Update_an_existing_rule_returns_Not_Found_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Security_Monitoring/Scenario_Update_an_existing_rule_returns_Not_Found_response.freeze index 164314c39fc..3560a1a9194 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Security_Monitoring/Scenario_Update_an_existing_rule_returns_Not_Found_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Security_Monitoring/Scenario_Update_an_existing_rule_returns_Not_Found_response.freeze @@ -1 +1 @@ -2022-10-24T21:07:24.645Z \ No newline at end of file +2023-04-07T18:12:00.967Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Security_Monitoring/Scenario_Update_an_existing_rule_returns_Not_Found_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Security_Monitoring/Scenario_Update_an_existing_rule_returns_Not_Found_response.yaml index 2fa972c0e33..13859e36b37 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Security_Monitoring/Scenario_Update_an_existing_rule_returns_Not_Found_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Security_Monitoring/Scenario_Update_an_existing_rule_returns_Not_Found_response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"cases":[{"condition":"a \u003e 0","name":"","notifications":[],"status":"info"}],"filters":[],"isEnabled":true,"message":"Test rule","name":"Test-Update_an_existing_rule_returns_Not_Found_response-1666645644-NotFound","options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"queries":[{"aggregation":"count","distinctFields":[],"groupByFields":[],"metrics":[],"query":"@test:true"}],"tags":[]} + {"cases":[{"condition":"a \u003e 0","name":"","notifications":[],"status":"info"}],"filters":[],"isEnabled":true,"message":"Test rule","name":"Test-Update_an_existing_rule_returns_Not_Found_response-1680891120-NotFound","options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"queries":[{"aggregation":"count","distinctFields":[],"groupByFields":[],"metrics":[],"query":"@test:true"}],"tags":[]} form: {} headers: Accept: @@ -11,474 +11,13 @@ interactions: method: PUT url: https://api.datadoghq.com/api/v2/security_monitoring/rules/abcde-12345 response: - body: "\n\n\n\n\n\n \n \n \n\ - \ \n \n Error 404 | Datadog\n |\n Datadog\n \ - \ \n \n \n \ - \ \n \n \n \n \n \n\n\ - \n\n\n\n\ -
\n
\n \n \"Sad\n \"Sad\n \n
\n
\n

Arf.

\n \ - \

404 NOT FOUND

\n \n
\n
\n\n\n\ - \n\n\n\n\n \n\n \n\n\n\n
\n
\n\n \n\n\n \n\ - \n \n\n \n\n" + body: '{"errors":["Not found"]} + + ' code: 404 duration: '' headers: Content-Type: - - text/html; charset=utf-8 + - application/json status: 404 Not Found version: 1 diff --git a/tests/scenarios/features/v1/dashboards.feature b/tests/scenarios/features/v1/dashboards.feature index 49cc532dbe2..b00fe078ffd 100644 --- a/tests/scenarios/features/v1/dashboards.feature +++ b/tests/scenarios/features/v1/dashboards.feature @@ -572,7 +572,7 @@ Feature: Dashboards And the response "template_variables[0].available_values[0]" is equal to "my-host" And the response "template_variables[0].defaults[0]" is equal to "my-host" - @team:DataDog/dashboards + @skip-validation @team:DataDog/dashboards Scenario: Create a new dashboard with template variable defaults whose value has no length returns "Bad Request" response Given new "CreateDashboard" request And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [], "reflow_type": "auto", "restricted_roles": [], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "defaults": [""], "name": "host1", "prefix": "host"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "avg:system.cpu.user{*}"}}, "type": "hostmap"}}]} diff --git a/tests/scenarios/features/v1/events.feature b/tests/scenarios/features/v1/events.feature index be176baf903..d9faefb4374 100644 --- a/tests/scenarios/features/v1/events.feature +++ b/tests/scenarios/features/v1/events.feature @@ -43,7 +43,7 @@ Feature: Events When the request is sent Then the response status is 200 OK - @team:DataDog/monitors-evaluation + @skip-validation @team:DataDog/monitors-evaluation Scenario: Post an event in the past returns "Bad Request" response Given new "CreateEvent" request And body with value {"title": "{{ unique }}", "text": "A text message.", "date_happened": 1, "tags": ["test:{{ unique_alnum }}"]} diff --git a/tests/scenarios/features/v1/hosts.feature b/tests/scenarios/features/v1/hosts.feature index 266957780a6..2a6838923bb 100644 --- a/tests/scenarios/features/v1/hosts.feature +++ b/tests/scenarios/features/v1/hosts.feature @@ -33,7 +33,7 @@ Feature: Hosts And the response "host_list[0].meta.agent_checks[0]" is equal to ["ntp","ntp","ntp:d884b5186b651429","OK","",""] And the response "host_list[0].meta.gohai" is equal to "{\"cpu\":{\"cache_size\":\"8192 KB\",\"cpu_cores\":\"1\",\"cpu_logical_processors\":\"1\",\"family\":\"6\",\"mhz\":\"2711.998\",\"model\":\"142\",\"model_name\":\"Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz\",\"stepping\":\"10\",\"vendor_id\":\"GenuineIntel\"},\"filesystem\":[{\"kb_size\":\"3966892\",\"mounted_on\":\"/dev\",\"name\":\"udev\"},{\"kb_size\":\"797396\",\"mounted_on\":\"/run\",\"name\":\"tmpfs\"},{\"kb_size\":\"64800356\",\"mounted_on\":\"/\",\"name\":\"/dev/mapper/vagrant--vg-root\"},{\"kb_size\":\"3986968\",\"mounted_on\":\"/dev/shm\",\"name\":\"tmpfs\"},{\"kb_size\":\"5120\",\"mounted_on\":\"/run/lock\",\"name\":\"tmpfs\"},{\"kb_size\":\"3986968\",\"mounted_on\":\"/sys/fs/cgroup\",\"name\":\"tmpfs\"},{\"kb_size\":\"488245288\",\"mounted_on\":\"/vagrant\",\"name\":\"/vagrant\"},{\"kb_size\":\"797392\",\"mounted_on\":\"/run/user/1000\",\"name\":\"tmpfs\"}],\"memory\":{\"swap_total\":\"1003516kB\",\"total\":\"7973940kB\"},\"network\":{\"interfaces\":[{\"ipv4\":\"10.0.2.15\",\"ipv4-network\":\"10.0.2.0/24\",\"ipv6\":\"fe80::a00:27ff:fec2:be11\",\"ipv6-network\":\"fe80::/64\",\"macaddress\":\"08:00:27:c2:be:11\",\"name\":\"eth0\"},{\"ipv4\":\"192.168.122.1\",\"ipv4-network\":\"192.168.122.0/24\",\"macaddress\":\"52:54:00:6f:1c:bf\",\"name\":\"virbr0\"}],\"ipaddress\":\"10.0.2.15\",\"ipaddressv6\":\"fe80::a00:27ff:fec2:be11\",\"macaddress\":\"08:00:27:c2:be:11\"},\"platform\":{\"GOOARCH\":\"amd64\",\"GOOS\":\"linux\",\"goV\":\"1.16.7\",\"hardware_platform\":\"x86_64\",\"hostname\":\"vagrant\",\"kernel_name\":\"Linux\",\"kernel_release\":\"4.15.0-29-generic\",\"kernel_version\":\"#31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018\",\"machine\":\"x86_64\",\"os\":\"GNU/Linux\",\"processor\":\"x86_64\",\"pythonV\":\"2.7.15rc1\"}}" - @team:DataDog/core-index + @skip-validation @team:DataDog/core-index Scenario: Get all hosts with metadata for your organization returns "OK" response Given new "ListHosts" request And request contains "include_hosts_metadata" parameter with value true diff --git a/tests/scenarios/features/v1/metrics.feature b/tests/scenarios/features/v1/metrics.feature index 578f073ad10..c1ac08aa1e1 100644 --- a/tests/scenarios/features/v1/metrics.feature +++ b/tests/scenarios/features/v1/metrics.feature @@ -161,7 +161,7 @@ Feature: Metrics When the request is sent Then the response status is 400 Bad Request - @team:DataDog/metrics-intake @team:DataDog/metrics-query + @skip-validation @team:DataDog/metrics-intake @team:DataDog/metrics-query Scenario: Submit metrics returns "Payload accepted" response Given new "SubmitMetrics" request And body with value {"series": [{"metric": "system.load.1", "type": "gauge", "points": [[{{ timestamp("now") }}, 1.1]], "tags": ["test:{{ unique_alnum }}"]}]} diff --git a/tests/scenarios/features/v1/service_checks.feature b/tests/scenarios/features/v1/service_checks.feature index a0bf3c20392..3244e3781dd 100644 --- a/tests/scenarios/features/v1/service_checks.feature +++ b/tests/scenarios/features/v1/service_checks.feature @@ -27,7 +27,7 @@ Feature: Service Checks When the request is sent Then the response status is 400 Bad Request - @team:DataDog/monitors-evaluation + @skip-validation @team:DataDog/monitors-evaluation Scenario: Submit a Service Check returns "Payload accepted" response Given body with value [{"check": "app.ok", "host_name": "host", "status": 0, "tags": ["test:{{ unique_alnum }}"]}] When the request is sent diff --git a/tests/scenarios/features/v1/synthetics.feature b/tests/scenarios/features/v1/synthetics.feature index 1430b8edde8..73b9a3443e3 100644 --- a/tests/scenarios/features/v1/synthetics.feature +++ b/tests/scenarios/features/v1/synthetics.feature @@ -15,7 +15,7 @@ Feature: Synthetics And a valid "appKeyAuth" key in the system And an instance of "Synthetics" API - @replay-only @team:DataDog/synthetics-app + @replay-only @skip-validation @team:DataDog/synthetics-app Scenario: Client is resilient to enum and oneOf deserialization errors Given new "ListTests" request When the request is sent diff --git a/tests/scenarios/features/v2/audit.feature b/tests/scenarios/features/v2/audit.feature index 9419f2460b8..e8f507e1c07 100644 --- a/tests/scenarios/features/v2/audit.feature +++ b/tests/scenarios/features/v2/audit.feature @@ -19,7 +19,7 @@ Feature: Audit When the request is sent Then the response status is 200 OK - @replay-only @team:DataDog/team-aaa @with-pagination + @replay-only @skip-validation @team:DataDog/team-aaa @with-pagination Scenario: Get a list of Audit Logs events returns "OK" response with pagination Given new "ListAuditLogs" request And request contains "page[limit]" parameter with value 2 @@ -41,7 +41,7 @@ Feature: Audit When the request is sent Then the response status is 200 OK - @replay-only @team:DataDog/team-aaa @with-pagination + @replay-only @skip-validation @team:DataDog/team-aaa @with-pagination Scenario: Search Audit Logs events returns "OK" response with pagination Given new "SearchAuditLogs" request And body with value {"filter": {"from": "now-15m", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"limit": 2}, "sort": "timestamp"} diff --git a/tests/scenarios/features/v2/ci_visibility_pipelines.feature b/tests/scenarios/features/v2/ci_visibility_pipelines.feature index 6b590399030..6f9935603c5 100644 --- a/tests/scenarios/features/v2/ci_visibility_pipelines.feature +++ b/tests/scenarios/features/v2/ci_visibility_pipelines.feature @@ -38,7 +38,7 @@ Feature: CI Visibility Pipelines When the request is sent Then the response status is 200 OK - @replay-only @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries @with-pagination + @replay-only @skip-validation @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries @with-pagination Scenario: Get a list of pipelines events returns "OK" response with pagination Given new "ListCIAppPipelineEvents" request And request contains "filter[from]" parameter with value "{{ timeISO('now - 30s') }}" @@ -62,7 +62,7 @@ Feature: CI Visibility Pipelines When the request is sent Then the response status is 200 OK - @replay-only @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries @with-pagination + @replay-only @skip-validation @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries @with-pagination Scenario: Search pipelines events returns "OK" response with pagination Given new "SearchCIAppPipelineEvents" request And body with value {"filter": {"from": "now-30s", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"limit": 2}, "sort": "timestamp"} diff --git a/tests/scenarios/features/v2/ci_visibility_tests.feature b/tests/scenarios/features/v2/ci_visibility_tests.feature index f5ff00069cc..3152496cf75 100644 --- a/tests/scenarios/features/v2/ci_visibility_tests.feature +++ b/tests/scenarios/features/v2/ci_visibility_tests.feature @@ -38,7 +38,7 @@ Feature: CI Visibility Tests When the request is sent Then the response status is 200 OK - @replay-only @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries @with-pagination + @replay-only @skip-validation @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries @with-pagination Scenario: Get a list of tests events returns "OK" response with pagination Given new "ListCIAppTestEvents" request And request contains "filter[from]" parameter with value "{{ timeISO('now - 30s') }}" @@ -62,7 +62,7 @@ Feature: CI Visibility Tests When the request is sent Then the response status is 200 OK - @replay-only @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries @with-pagination + @replay-only @skip-validation @team:Datadog/ci-app-backend @team:Datadog/integrations-tools-and-libraries @with-pagination Scenario: Search tests events returns "OK" response with pagination Given new "SearchCIAppTestEvents" request And body with value {"filter": {"from": "now-15m", "query": "@test.status:pass AND -@language:python", "to": "now"}, "page": {"limit": 2}, "sort": "timestamp"} diff --git a/tests/scenarios/features/v2/events.feature b/tests/scenarios/features/v2/events.feature index 6fb2a31f24e..1b663f4fd99 100644 --- a/tests/scenarios/features/v2/events.feature +++ b/tests/scenarios/features/v2/events.feature @@ -24,7 +24,7 @@ Feature: Events When the request is sent Then the response status is 200 OK - @replay-only @team:DataDog/event-management @with-pagination + @replay-only @skip-validation @team:DataDog/event-management @with-pagination Scenario: Get a list of events returns "OK" response with pagination Given operation "ListEvents" enabled And new "ListEvents" request @@ -64,7 +64,7 @@ Feature: Events Then the response status is 200 OK And the response "data" has length 0 - @replay-only @team:DataDog/event-management @with-pagination + @replay-only @skip-validation @team:DataDog/event-management @with-pagination Scenario: Search events returns "OK" response with pagination Given operation "SearchEvents" enabled And new "SearchEvents" request diff --git a/tests/scenarios/features/v2/incidents.feature b/tests/scenarios/features/v2/incidents.feature index 5be7c16be1b..3e70df63734 100644 --- a/tests/scenarios/features/v2/incidents.feature +++ b/tests/scenarios/features/v2/incidents.feature @@ -332,7 +332,7 @@ Feature: Incidents Then the response status is 200 OK And the response "data[0].type" is equal to "incidents" - @replay-only @team:DataDog/incident-app @with-pagination + @replay-only @skip-validation @team:DataDog/incident-app @with-pagination Scenario: Get a list of incidents returns "OK" response with pagination Given operation "ListIncidents" enabled And new "ListIncidents" request @@ -468,7 +468,7 @@ Feature: Incidents When the request is sent Then the response status is 404 Not Found - @team:DataDog/incident-app + @skip-validation @team:DataDog/incident-app Scenario: Search for incidents returns "OK" response Given operation "SearchIncidents" enabled And there is a valid "incident" in the system @@ -479,7 +479,7 @@ Feature: Incidents And the response "data.type" is equal to "incidents_search_results" And the response "data.attributes.incidents[0].data.type" is equal to "incidents" - @replay-only @team:DataDog/incident-app @with-pagination + @replay-only @skip-validation @team:DataDog/incident-app @with-pagination Scenario: Search for incidents returns "OK" response with pagination Given operation "SearchIncidents" enabled And new "SearchIncidents" request diff --git a/tests/scenarios/features/v2/logs.feature b/tests/scenarios/features/v2/logs.feature index dc4dcbcfcd2..7fe62d9173c 100644 --- a/tests/scenarios/features/v2/logs.feature +++ b/tests/scenarios/features/v2/logs.feature @@ -55,7 +55,7 @@ Feature: Logs When the request is sent Then the response status is 200 OK - @replay-only @team:DataDog/logs-app @with-pagination + @replay-only @skip-validation @team:DataDog/logs-app @with-pagination Scenario: Get a list of logs returns "OK" response with pagination Given a valid "appKeyAuth" key in the system And new "ListLogsGet" request @@ -94,7 +94,7 @@ Feature: Logs Then the response status is 200 OK And the response "data" has length 0 - @replay-only @team:DataDog/logs-app @with-pagination + @replay-only @skip-validation @team:DataDog/logs-app @with-pagination Scenario: Search logs returns "OK" response with pagination Given a valid "appKeyAuth" key in the system And new "ListLogs" request diff --git a/tests/scenarios/features/v2/metrics.feature b/tests/scenarios/features/v2/metrics.feature index 5fad316de1b..ff1b750c8f1 100644 --- a/tests/scenarios/features/v2/metrics.feature +++ b/tests/scenarios/features/v2/metrics.feature @@ -56,7 +56,7 @@ Feature: Metrics When the request is sent Then the response status is 409 Conflict - @replay-only @team:DataDog/points-aggregation + @replay-only @skip-validation @team:DataDog/points-aggregation Scenario: Create a tag configuration returns "Created" response Given a valid "appKeyAuth" key in the system And new "CreateTagConfiguration" request @@ -66,7 +66,7 @@ Feature: Metrics When the request is sent Then the response status is 201 Created - @replay-only @team:DataDog/points-aggregation + @replay-only @skip-validation @team:DataDog/points-aggregation Scenario: Delete a tag configuration returns "No Content" response Given there is a valid "metric" in the system And there is a valid "metric_tag_configuration" in the system @@ -133,7 +133,7 @@ Feature: Metrics When the request is sent Then the response status is 404 Not Found - @team:DataDog/points-aggregation + @skip-validation @team:DataDog/points-aggregation Scenario: List active tags and aggregations returns "Success" response Given a valid "appKeyAuth" key in the system And there is a valid "metric" in the system @@ -159,7 +159,7 @@ Feature: Metrics When the request is sent Then the response status is 404 Not Found - @team:DataDog/points-aggregation + @skip-validation @team:DataDog/points-aggregation Scenario: List distinct metric volumes by metric name returns "Success" response Given a valid "appKeyAuth" key in the system And there is a valid "metric" in the system @@ -178,7 +178,7 @@ Feature: Metrics When the request is sent Then the response status is 404 Not Found - @replay-only @team:DataDog/points-aggregation + @replay-only @skip-validation @team:DataDog/points-aggregation Scenario: List tag configuration by name returns "Success" response Given a valid "appKeyAuth" key in the system And there is a valid "metric" in the system @@ -205,7 +205,7 @@ Feature: Metrics When the request is sent Then the response status is 404 Not Found - @replay-only @team:DataDog/points-aggregation + @replay-only @skip-validation @team:DataDog/points-aggregation Scenario: List tags by metric name returns "Success" response Given a valid "appKeyAuth" key in the system And there is a valid "metric" in the system @@ -326,7 +326,7 @@ Feature: Metrics When the request is sent Then the response status is 200 Success - @team:DataDog/metrics-query + @skip-validation @team:DataDog/metrics-query Scenario: Timeseries cross product query returns "Bad Request" response Given a valid "appKeyAuth" key in the system And operation "QueryTimeseriesData" enabled @@ -355,7 +355,7 @@ Feature: Metrics When the request is sent Then the response status is 400 Bad Request - @replay-only @team:DataDog/points-aggregation + @replay-only @skip-validation @team:DataDog/points-aggregation Scenario: Update a tag configuration returns "OK" response Given a valid "appKeyAuth" key in the system And there is a valid "metric" in the system diff --git a/tests/scenarios/features/v2/monitors.feature b/tests/scenarios/features/v2/monitors.feature index 46297e1ae4e..7f98218f9a3 100644 --- a/tests/scenarios/features/v2/monitors.feature +++ b/tests/scenarios/features/v2/monitors.feature @@ -11,7 +11,7 @@ Feature: Monitors And a valid "appKeyAuth" key in the system And an instance of "Monitors" API - @team:DataDog/monitor-app + @skip-validation @team:DataDog/monitor-app Scenario: Create a monitor configuration policy returns "Bad Request" response Given new "CreateMonitorConfigPolicy" request And body with value {"data": {"attributes": {"policy_type": "INVALID", "policy": {"tag_key": "datacenter", "tag_key_required": true, "valid_tag_values": ["prod", "staging"]}}, "type": "monitor-config-policy"}} diff --git a/tests/scenarios/features/v2/processes.feature b/tests/scenarios/features/v2/processes.feature index 998a4309278..b8aa114a509 100644 --- a/tests/scenarios/features/v2/processes.feature +++ b/tests/scenarios/features/v2/processes.feature @@ -22,7 +22,7 @@ Feature: Processes When the request is sent Then the response status is 200 OK - @replay-only @team:DataDog/processes @with-pagination + @replay-only @skip-validation @team:DataDog/processes @with-pagination Scenario: Get all processes returns "OK" response with pagination Given request contains "page[limit]" parameter with value 2 When the request with pagination is sent diff --git a/tests/scenarios/features/v2/rum.feature b/tests/scenarios/features/v2/rum.feature index 711806381f4..3bcead89906 100644 --- a/tests/scenarios/features/v2/rum.feature +++ b/tests/scenarios/features/v2/rum.feature @@ -85,7 +85,7 @@ Feature: RUM When the request is sent Then the response status is 200 OK - @replay-only @team:DataDog/rum-backend @with-pagination + @replay-only @skip-validation @team:DataDog/rum-backend @with-pagination Scenario: Get a list of RUM events returns "OK" response with pagination Given new "ListRUMEvents" request And request contains "page[limit]" parameter with value 2 @@ -119,7 +119,7 @@ Feature: RUM When the request is sent Then the response status is 200 OK - @replay-only @team:DataDog/rum-backend @with-pagination + @replay-only @skip-validation @team:DataDog/rum-backend @with-pagination Scenario: Search RUM events returns "OK" response with pagination Given new "SearchRUMEvents" request And body with value {"filter": {"from": "now-15m", "query": "@type:session AND @session.type:user", "to": "now"}, "options": {"time_offset": 0, "timezone": "GMT"}, "page": {"limit": 2}, "sort": "timestamp"} diff --git a/tests/scenarios/features/v2/security_monitoring.feature b/tests/scenarios/features/v2/security_monitoring.feature index 276ac3d42ec..e91b7382e7d 100644 --- a/tests/scenarios/features/v2/security_monitoring.feature +++ b/tests/scenarios/features/v2/security_monitoring.feature @@ -212,7 +212,7 @@ Feature: Security Monitoring When the request is sent Then the response status is 200 OK - @replay-only @team:DataDog/k9-cloud-security-platform @with-pagination + @replay-only @skip-validation @team:DataDog/k9-cloud-security-platform @with-pagination Scenario: Get a list of security signals returns "OK" response with pagination Given new "SearchSecurityMonitoringSignals" request And body with value {"filter": {"from": "{{ timeISO("now-15m") }}", "query": "security:attack status:high", "to": "{{ timeISO("now") }}"}, "page": {"limit": 2}, "sort": "timestamp"} @@ -232,7 +232,7 @@ Feature: Security Monitoring When the request is sent Then the response status is 200 OK - @replay-only @team:DataDog/k9-cloud-security-platform @with-pagination + @replay-only @skip-validation @team:DataDog/k9-cloud-security-platform @with-pagination Scenario: Get a quick list of security signals returns "OK" response with pagination Given new "ListSecurityMonitoringSignals" request And request contains "page[limit]" parameter with value 2 @@ -313,7 +313,7 @@ Feature: Security Monitoring Scenario: Modify the triage assignee of a security signal returns "Bad Request" response Given new "EditSecurityMonitoringSignalAssignee" request And request contains "signal_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"assignee": {"uuid": "773b045d-ccf8-4808-bd3b-955ef6a8c940"}}}} + And body with value {"data": {"attributes": {"assignee": {"name": null, "uuid": "773b045d-ccf8-4808-bd3b-955ef6a8c940"}}}} When the request is sent Then the response status is 400 Bad Request @@ -321,7 +321,7 @@ Feature: Security Monitoring Scenario: Modify the triage assignee of a security signal returns "Not Found" response Given new "EditSecurityMonitoringSignalAssignee" request And request contains "signal_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"assignee": {"uuid": "773b045d-ccf8-4808-bd3b-955ef6a8c940"}}}} + And body with value {"data": {"attributes": {"assignee": {"name": null, "uuid": "773b045d-ccf8-4808-bd3b-955ef6a8c940"}}}} When the request is sent Then the response status is 404 Not Found diff --git a/tests/scenarios/features/v2/service_definition.feature b/tests/scenarios/features/v2/service_definition.feature index ed4999b578c..6083dacfe75 100644 --- a/tests/scenarios/features/v2/service_definition.feature +++ b/tests/scenarios/features/v2/service_definition.feature @@ -106,7 +106,7 @@ Feature: Service Definition Then the response status is 200 OK And the response "data[0].attributes.meta.ingestion-source" is equal to "api" - @replay-only @team:DataDog/service-catalog @with-pagination + @replay-only @skip-validation @team:DataDog/service-catalog @with-pagination Scenario: Get all service definitions returns "OK" response with pagination Given new "ListServiceDefinitions" request And request contains "page[size]" parameter with value 2