From 511f511572d04a882d452980143553ccc50bae99 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 22 Mar 2024 16:36:58 +0000 Subject: [PATCH] Regenerate client from commit 270f7b6b of spec repo --- .apigentools-info | 8 +- .generator/schemas/v1/openapi.yaml | 577 ----- api/datadogV1/api_usage_metering.go | 154 -- api/datadogV1/doc.go | 1 - api/datadogV1/model_usage_attribution_body.go | 332 --- .../model_usage_attribution_metadata.go | 146 -- .../model_usage_attribution_pagination.go | 242 --- .../model_usage_attribution_response.go | 146 -- api/datadogV1/model_usage_attribution_sort.go | 138 -- ...del_usage_attribution_supported_metrics.go | 160 -- .../model_usage_attribution_values.go | 1887 ----------------- .../v1/usage-metering/GetUsageAttribution.go | 30 - tests/scenarios/features/v1/undo.json | 6 - .../features/v1/usage_metering.feature | 10 - 14 files changed, 4 insertions(+), 3833 deletions(-) delete mode 100644 api/datadogV1/model_usage_attribution_body.go delete mode 100644 api/datadogV1/model_usage_attribution_metadata.go delete mode 100644 api/datadogV1/model_usage_attribution_pagination.go delete mode 100644 api/datadogV1/model_usage_attribution_response.go delete mode 100644 api/datadogV1/model_usage_attribution_sort.go delete mode 100644 api/datadogV1/model_usage_attribution_supported_metrics.go delete mode 100644 api/datadogV1/model_usage_attribution_values.go delete mode 100644 examples/v1/usage-metering/GetUsageAttribution.go diff --git a/.apigentools-info b/.apigentools-info index 0628735e9d4..88ba76428c5 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-03-22 15:34:51.697811", - "spec_repo_commit": "24998b49" + "regenerated": "2024-03-22 16:35:22.301249", + "spec_repo_commit": "270f7b6b" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-03-22 15:34:51.715658", - "spec_repo_commit": "24998b49" + "regenerated": "2024-03-22 16:35:22.327553", + "spec_repo_commit": "270f7b6b" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 3cb57f34d07..4d5f1a44af7 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -16819,270 +16819,6 @@ components: format: double type: number type: object - UsageAttributionBody: - description: Usage Summary by tag for a given organization. - properties: - month: - description: 'Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM].' - format: date-time - type: string - org_name: - description: The name of the organization. - type: string - public_id: - description: The organization public ID. - type: string - tag_config_source: - description: The source of the usage attribution tag configuration and the - selected tags in the format `::://////`. - type: string - tags: - $ref: '#/components/schemas/UsageAttributionTagNames' - updated_at: - description: Shows the the most recent hour in the current month for all - organizations for which all usages were calculated. - type: string - values: - $ref: '#/components/schemas/UsageAttributionValues' - type: object - UsageAttributionLimit: - default: 5000 - description: Maximum number of records to be returned. - format: int64 - type: integer - UsageAttributionMetadata: - description: The object containing document metadata. - properties: - aggregates: - $ref: '#/components/schemas/UsageAttributionAggregates' - pagination: - $ref: '#/components/schemas/UsageAttributionPagination' - type: object - UsageAttributionOffset: - default: 0 - description: Number of records to skip before beginning to return. - format: int64 - type: integer - UsageAttributionPagination: - description: The metadata for the current pagination. - properties: - limit: - description: Maximum amount of records to be returned. - format: int64 - type: integer - offset: - description: Records to be skipped before beginning to return. - format: int64 - type: integer - sort_direction: - description: Direction to sort by. - type: string - sort_name: - description: Field to sort by. - type: string - total_number_of_records: - description: Total number of records. - format: int64 - type: integer - type: object - UsageAttributionResponse: - description: Response containing the Usage Summary by tag(s). - properties: - metadata: - $ref: '#/components/schemas/UsageAttributionMetadata' - usage: - description: Get usage summary by tag(s). - items: - $ref: '#/components/schemas/UsageAttributionBody' - type: array - type: object - UsageAttributionSort: - default: custom_timeseries_usage - description: The field to sort by. - enum: - - api_percentage - - snmp_usage - - apm_host_usage - - api_usage - - appsec_usage - - appsec_percentage - - container_usage - - custom_timeseries_percentage - - container_percentage - - apm_host_percentage - - npm_host_percentage - - browser_percentage - - browser_usage - - infra_host_percentage - - snmp_percentage - - npm_host_usage - - infra_host_usage - - custom_timeseries_usage - - lambda_functions_usage - - lambda_functions_percentage - - lambda_invocations_usage - - lambda_invocations_percentage - - estimated_indexed_logs_usage - - estimated_indexed_logs_percentage - - estimated_ingested_logs_usage - - estimated_ingested_logs_percentage - - estimated_indexed_spans_usage - - estimated_indexed_spans_percentage - - estimated_ingested_spans_usage - - estimated_ingested_spans_percentage - - apm_fargate_usage - - apm_fargate_percentage - - appsec_fargate_usage - - appsec_fargate_percentage - - estimated_rum_usage_attribution_usage - - estimated_rum_usage_attribution_percentage - - asm_serverless_traced_invocations_usage - - asm_serverless_traced_invocations_percentage - type: string - x-enum-varnames: - - API_PERCENTAGE - - SNMP_USAGE - - APM_HOST_USAGE - - API_USAGE - - APPSEC_USAGE - - APPSEC_PERCENTAGE - - CONTAINER_USAGE - - CUSTOM_TIMESERIES_PERCENTAGE - - CONTAINER_PERCENTAGE - - APM_HOST_PERCENTAGE - - NPM_HOST_PERCENTAGE - - BROWSER_PERCENTAGE - - BROWSER_USAGE - - INFRA_HOST_PERCENTAGE - - SNMP_PERCENTAGE - - NPM_HOST_USAGE - - INFRA_HOST_USAGE - - CUSTOM_TIMESERIES_USAGE - - LAMBDA_FUNCTIONS_USAGE - - LAMBDA_FUNCTIONS_PERCENTAGE - - LAMBDA_INVOCATIONS_USAGE - - LAMBDA_INVOCATIONS_PERCENTAGE - - ESTIMATED_INDEXED_LOGS_USAGE - - ESTIMATED_INDEXED_LOGS_PERCENTAGE - - ESTIMATED_INGESTED_LOGS_USAGE - - ESTIMATED_INGESTED_LOGS_PERCENTAGE - - ESTIMATED_INDEXED_SPANS_USAGE - - ESTIMATED_INDEXED_SPANS_PERCENTAGE - - ESTIMATED_INGESTED_SPANS_USAGE - - ESTIMATED_INGESTED_SPANS_PERCENTAGE - - APM_FARGATE_USAGE - - APM_FARGATE_PERCENTAGE - - APPSEC_FARGATE_USAGE - - APPSEC_FARGATE_PERCENTAGE - - ESTIMATED_RUM_USAGE_ATTRIBUTION_USAGE - - ESTIMATED_RUM_USAGE_ATTRIBUTION_PERCENTAGE - - ASM_SERVERLESS_TRACED_INVOCATIONS_USAGE - - ASM_SERVERLESS_TRACED_INVOCATIONS_PERCENTAGE - UsageAttributionSupportedMetrics: - description: Supported fields for usage attribution requests (valid requests - contain one or more metrics, or `*` for all). - enum: - - custom_timeseries_usage - - container_usage - - snmp_percentage - - apm_host_usage - - browser_usage - - npm_host_percentage - - infra_host_usage - - custom_timeseries_percentage - - container_percentage - - api_usage - - apm_host_percentage - - infra_host_percentage - - snmp_usage - - browser_percentage - - api_percentage - - npm_host_usage - - lambda_functions_usage - - lambda_functions_percentage - - lambda_invocations_usage - - lambda_invocations_percentage - - fargate_usage - - fargate_percentage - - profiled_host_usage - - profiled_host_percentage - - profiled_container_usage - - profiled_container_percentage - - dbm_hosts_usage - - dbm_hosts_percentage - - dbm_queries_usage - - dbm_queries_percentage - - estimated_indexed_logs_usage - - estimated_indexed_logs_percentage - - estimated_ingested_logs_usage - - estimated_ingested_logs_percentage - - appsec_usage - - appsec_percentage - - estimated_indexed_spans_usage - - estimated_indexed_spans_percentage - - estimated_ingested_spans_usage - - estimated_ingested_spans_percentage - - apm_fargate_usage - - apm_fargate_percentage - - appsec_fargate_usage - - appsec_fargate_percentage - - estimated_rum_usage_attribution_usage - - estimated_rum_usage_attribution_percentage - - asm_serverless_traced_invocations_usage - - asm_serverless_traced_invocations_percentage - - '*' - type: string - x-enum-varnames: - - CUSTOM_TIMESERIES_USAGE - - CONTAINER_USAGE - - SNMP_PERCENTAGE - - APM_HOST_USAGE - - BROWSER_USAGE - - NPM_HOST_PERCENTAGE - - INFRA_HOST_USAGE - - CUSTOM_TIMESERIES_PERCENTAGE - - CONTAINER_PERCENTAGE - - API_USAGE - - APM_HOST_PERCENTAGE - - INFRA_HOST_PERCENTAGE - - SNMP_USAGE - - BROWSER_PERCENTAGE - - API_PERCENTAGE - - NPM_HOST_USAGE - - LAMBDA_FUNCTIONS_USAGE - - LAMBDA_FUNCTIONS_PERCENTAGE - - LAMBDA_INVOCATIONS_USAGE - - LAMBDA_INVOCATIONS_PERCENTAGE - - FARGATE_USAGE - - FARGATE_PERCENTAGE - - PROFILED_HOST_USAGE - - PROFILED_HOST_PERCENTAGE - - PROFILED_CONTAINER_USAGE - - PROFILED_CONTAINER_PERCENTAGE - - DBM_HOSTS_USAGE - - DBM_HOSTS_PERCENTAGE - - DBM_QUERIES_USAGE - - DBM_QUERIES_PERCENTAGE - - ESTIMATED_INDEXED_LOGS_USAGE - - ESTIMATED_INDEXED_LOGS_PERCENTAGE - - ESTIMATED_INGESTED_LOGS_USAGE - - ESTIMATED_INGESTED_LOGS_PERCENTAGE - - APPSEC_USAGE - - APPSEC_PERCENTAGE - - ESTIMATED_INDEXED_SPANS_USAGE - - ESTIMATED_INDEXED_SPANS_PERCENTAGE - - ESTIMATED_INGESTED_SPANS_USAGE - - ESTIMATED_INGESTED_SPANS_PERCENTAGE - - APM_FARGATE_USAGE - - APM_FARGATE_PERCENTAGE - - APPSEC_FARGATE_USAGE - - APPSEC_FARGATE_PERCENTAGE - - ESTIMATED_RUM_USAGE_ATTRIBUTION_USAGE - - ESTIMATED_RUM_USAGE_ATTRIBUTION_PERCENTAGE - - ASM_SERVERLESS_TRACED_INVOCATIONS_USAGE - - ASM_SERVERLESS_TRACED_INVOCATIONS_PERCENTAGE - - ALL UsageAttributionTagNames: additionalProperties: description: 'A list of values that are associated with each tag key. @@ -17112,225 +16848,6 @@ components: 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). - properties: - api_percentage: - description: The percentage of synthetic API test usage by tag(s). - format: double - type: number - api_usage: - description: The synthetic API test usage by tag(s). - format: double - type: number - apm_fargate_percentage: - description: The percentage of APM ECS Fargate task usage by tag(s). - format: double - type: number - apm_fargate_usage: - description: The APM ECS Fargate task usage by tag(s). - format: double - type: number - apm_host_percentage: - description: The percentage of APM host usage by tag(s). - format: double - type: number - apm_host_usage: - description: The APM host usage by tag(s). - format: double - type: number - appsec_fargate_percentage: - description: The percentage of Application Security Monitoring ECS Fargate - task usage by tag(s). - format: double - type: number - appsec_fargate_usage: - description: The Application Security Monitoring ECS Fargate task usage - by tag(s). - format: double - type: number - appsec_percentage: - description: The percentage of Application Security Monitoring host usage - by tag(s). - format: double - type: number - appsec_usage: - description: The Application Security Monitoring host usage by tag(s). - format: double - type: number - browser_percentage: - description: The percentage of synthetic browser test usage by tag(s). - format: double - type: number - browser_usage: - description: The synthetic browser test usage by tag(s). - format: double - type: number - container_percentage: - description: The percentage of container usage by tag(s). - format: double - type: number - container_usage: - description: The container usage by tag(s). - format: double - type: number - cspm_container_percentage: - description: The percentage of Cloud Security Management Pro container usage - by tag(s) - format: double - type: number - cspm_container_usage: - description: The Cloud Security Management Pro container usage by tag(s) - format: double - type: number - cspm_host_percentage: - description: The percentage of Cloud Security Management Pro host usage - by tag(s) - format: double - type: number - cspm_host_usage: - description: The Cloud Security Management Pro host usage by tag(s) - format: double - type: number - custom_timeseries_percentage: - description: The percentage of custom metrics usage by tag(s). - format: double - type: number - custom_timeseries_usage: - description: The custom metrics usage by tag(s). - format: double - type: number - cws_container_percentage: - description: The percentage of Cloud Workload Security container usage by - tag(s) - format: double - type: number - cws_container_usage: - description: The Cloud Workload Security container usage by tag(s) - format: double - type: number - cws_host_percentage: - description: The percentage of Cloud Workload Security host usage by tag(s) - format: double - type: number - cws_host_usage: - description: The Cloud Workload Security host usage by tag(s) - format: double - type: number - dbm_hosts_percentage: - description: The percentage of Database Monitoring host usage by tag(s). - format: double - type: number - dbm_hosts_usage: - description: The Database Monitoring host usage by tag(s). - format: double - type: number - dbm_queries_percentage: - description: The percentage of Database Monitoring normalized queries usage - by tag(s). - format: double - type: number - dbm_queries_usage: - description: The Database Monitoring normalized queries usage by tag(s). - format: double - type: number - estimated_indexed_logs_percentage: - description: The percentage of estimated live indexed logs usage by tag(s). - format: double - type: number - estimated_indexed_logs_usage: - description: The estimated live indexed logs usage by tag(s). - format: double - type: number - estimated_indexed_spans_percentage: - description: The percentage of estimated indexed spans usage by tag(s). - format: double - type: number - estimated_indexed_spans_usage: - description: The estimated indexed spans usage by tag(s). - format: double - type: number - estimated_ingested_logs_percentage: - description: The percentage of estimated live ingested logs usage by tag(s). - format: double - type: number - estimated_ingested_logs_usage: - description: The estimated live ingested logs usage by tag(s). - format: double - type: number - estimated_ingested_spans_percentage: - description: The percentage of estimated ingested spans usage by tag(s). - format: double - type: number - estimated_ingested_spans_usage: - description: The estimated ingested spans usage by tag(s). - format: double - type: number - estimated_rum_sessions_percentage: - description: The percentage of estimated rum sessions usage by tag(s). - format: double - type: number - estimated_rum_sessions_usage: - description: The estimated rum sessions usage by tag(s). - format: double - type: number - infra_host_percentage: - description: The percentage of infrastructure host usage by tag(s). - format: double - type: number - infra_host_usage: - description: The infrastructure host usage by tag(s). - format: double - type: number - lambda_functions_percentage: - description: The percentage of Lambda function usage by tag(s). - format: double - type: number - lambda_functions_usage: - description: The Lambda function usage by tag(s). - format: double - type: number - lambda_invocations_percentage: - description: The percentage of Lambda invocation usage by tag(s). - format: double - type: number - lambda_invocations_usage: - description: The Lambda invocation usage by tag(s). - format: double - type: number - npm_host_percentage: - description: The percentage of network host usage by tag(s). - format: double - type: number - npm_host_usage: - description: The network host usage by tag(s). - format: double - type: number - profiled_container_percentage: - description: The percentage of profiled containers usage by tag(s). - format: double - type: number - profiled_container_usage: - description: The profiled container usage by tag(s). - format: double - type: number - profiled_hosts_percentage: - description: The percentage of profiled hosts usage by tag(s). - format: double - type: number - profiled_hosts_usage: - description: The profiled host usage by tag(s). - format: double - type: number - snmp_percentage: - description: The percentage of network device usage by tag(s). - format: double - type: number - snmp_usage: - description: The network device usage by tag(s). - format: double - type: number - type: object UsageAuditLogsHour: description: Audit logs usage for a given organization for a given hour. properties: @@ -31220,100 +30737,6 @@ paths: summary: Get hourly usage for analyzed logs tags: - Usage Metering - /api/v1/usage/attribution: - get: - deprecated: true - description: 'Get usage attribution. - - **Note:** This endpoint will be fully deprecated on December 1, 2022. - - Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) - for the associated migration guide.' - operationId: GetUsageAttribution - parameters: - - description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` - for usage beginning in this month. - - Maximum of 15 months ago.' - in: query - name: start_month - required: true - schema: - format: date-time - type: string - - description: Comma-separated list of usage types to return, or `*` for all - usage types. - in: query - name: fields - required: true - schema: - $ref: '#/components/schemas/UsageAttributionSupportedMetrics' - - description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` - for usage ending this month.' - in: query - name: end_month - required: false - schema: - format: date-time - type: string - - description: 'The direction to sort by: `[desc, asc]`.' - in: query - name: sort_direction - required: false - schema: - $ref: '#/components/schemas/UsageSortDirection' - - description: The field to sort by. - in: query - name: sort_name - required: false - schema: - $ref: '#/components/schemas/UsageAttributionSort' - - description: Include child org usage in the response. Defaults to false. - in: query - name: include_descendants - required: false - schema: - default: false - type: boolean - - description: Number of records to skip before beginning to return. - in: query - name: offset - required: false - schema: - $ref: '#/components/schemas/UsageAttributionOffset' - - description: Maximum number of records to be returned. - in: query - name: limit - required: false - schema: - $ref: '#/components/schemas/UsageAttributionLimit' - responses: - '200': - content: - application/json;datetime-format=rfc3339: - schema: - $ref: '#/components/schemas/UsageAttributionResponse' - description: OK - '403': - content: - application/json;datetime-format=rfc3339: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Forbidden - User is not authorized - '429': - content: - application/json;datetime-format=rfc3339: - schema: - $ref: '#/components/schemas/APIErrorResponse' - description: Too many requests - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - usage_read - summary: Get usage attribution - tags: - - Usage Metering /api/v1/usage/audit_logs: get: deprecated: true diff --git a/api/datadogV1/api_usage_metering.go b/api/datadogV1/api_usage_metering.go index aca915f3fe4..520ad592e97 100644 --- a/api/datadogV1/api_usage_metering.go +++ b/api/datadogV1/api_usage_metering.go @@ -1044,160 +1044,6 @@ func (a *UsageMeteringApi) GetUsageAnalyzedLogs(ctx _context.Context, startHr ti return localVarReturnValue, localVarHTTPResponse, nil } -// GetUsageAttributionOptionalParameters holds optional parameters for GetUsageAttribution. -type GetUsageAttributionOptionalParameters struct { - EndMonth *time.Time - SortDirection *UsageSortDirection - SortName *UsageAttributionSort - IncludeDescendants *bool - Offset *int64 - Limit *int64 -} - -// NewGetUsageAttributionOptionalParameters creates an empty struct for parameters. -func NewGetUsageAttributionOptionalParameters() *GetUsageAttributionOptionalParameters { - this := GetUsageAttributionOptionalParameters{} - return &this -} - -// WithEndMonth sets the corresponding parameter name and returns the struct. -func (r *GetUsageAttributionOptionalParameters) WithEndMonth(endMonth time.Time) *GetUsageAttributionOptionalParameters { - r.EndMonth = &endMonth - return r -} - -// WithSortDirection sets the corresponding parameter name and returns the struct. -func (r *GetUsageAttributionOptionalParameters) WithSortDirection(sortDirection UsageSortDirection) *GetUsageAttributionOptionalParameters { - r.SortDirection = &sortDirection - return r -} - -// WithSortName sets the corresponding parameter name and returns the struct. -func (r *GetUsageAttributionOptionalParameters) WithSortName(sortName UsageAttributionSort) *GetUsageAttributionOptionalParameters { - r.SortName = &sortName - return r -} - -// WithIncludeDescendants sets the corresponding parameter name and returns the struct. -func (r *GetUsageAttributionOptionalParameters) WithIncludeDescendants(includeDescendants bool) *GetUsageAttributionOptionalParameters { - r.IncludeDescendants = &includeDescendants - return r -} - -// WithOffset sets the corresponding parameter name and returns the struct. -func (r *GetUsageAttributionOptionalParameters) WithOffset(offset int64) *GetUsageAttributionOptionalParameters { - r.Offset = &offset - return r -} - -// WithLimit sets the corresponding parameter name and returns the struct. -func (r *GetUsageAttributionOptionalParameters) WithLimit(limit int64) *GetUsageAttributionOptionalParameters { - r.Limit = &limit - return r -} - -// GetUsageAttribution Get usage attribution. -// Get usage attribution. -// **Note:** This endpoint will be fully deprecated on December 1, 2022. -// Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) for the associated migration guide. -// -// Deprecated: This API is deprecated. -func (a *UsageMeteringApi) GetUsageAttribution(ctx _context.Context, startMonth time.Time, fields UsageAttributionSupportedMetrics, o ...GetUsageAttributionOptionalParameters) (UsageAttributionResponse, *_nethttp.Response, error) { - var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarReturnValue UsageAttributionResponse - optionalParams GetUsageAttributionOptionalParameters - ) - - if len(o) > 1 { - return localVarReturnValue, nil, datadog.ReportError("only one argument of type GetUsageAttributionOptionalParameters is allowed") - } - if len(o) == 1 { - optionalParams = o[0] - } - - localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v1.UsageMeteringApi.GetUsageAttribution") - if err != nil { - return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()} - } - - localVarPath := localBasePath + "/api/v1/usage/attribution" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} - localVarQueryParams.Add("start_month", datadog.ParameterToString(startMonth, "")) - localVarQueryParams.Add("fields", datadog.ParameterToString(fields, "")) - if optionalParams.EndMonth != nil { - localVarQueryParams.Add("end_month", datadog.ParameterToString(*optionalParams.EndMonth, "")) - } - if optionalParams.SortDirection != nil { - localVarQueryParams.Add("sort_direction", datadog.ParameterToString(*optionalParams.SortDirection, "")) - } - if optionalParams.SortName != nil { - localVarQueryParams.Add("sort_name", datadog.ParameterToString(*optionalParams.SortName, "")) - } - if optionalParams.IncludeDescendants != nil { - localVarQueryParams.Add("include_descendants", datadog.ParameterToString(*optionalParams.IncludeDescendants, "")) - } - if optionalParams.Offset != nil { - localVarQueryParams.Add("offset", datadog.ParameterToString(*optionalParams.Offset, "")) - } - if optionalParams.Limit != nil { - localVarQueryParams.Add("limit", datadog.ParameterToString(*optionalParams.Limit, "")) - } - localVarHeaderParams["Accept"] = "application/json;datetime-format=rfc3339" - - datadog.SetAuthKeys( - ctx, - &localVarHeaderParams, - [2]string{"apiKeyAuth", "DD-API-KEY"}, - [2]string{"appKeyAuth", "DD-APPLICATION-KEY"}, - ) - req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.Client.CallAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := datadog.ReadBody(localVarHTTPResponse) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := datadog.GenericOpenAPIError{ - ErrorBody: localVarBody, - ErrorMessage: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 429 { - var v APIErrorResponse - err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.ErrorModel = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := datadog.GenericOpenAPIError{ - ErrorBody: localVarBody, - ErrorMessage: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - // GetUsageAuditLogsOptionalParameters holds optional parameters for GetUsageAuditLogs. type GetUsageAuditLogsOptionalParameters struct { EndHr *time.Time diff --git a/api/datadogV1/doc.go b/api/datadogV1/doc.go index 85245595a3c..9d8b94fbd90 100644 --- a/api/datadogV1/doc.go +++ b/api/datadogV1/doc.go @@ -191,7 +191,6 @@ // - [UsageMeteringApi.GetSpecifiedDailyCustomReports] // - [UsageMeteringApi.GetSpecifiedMonthlyCustomReports] // - [UsageMeteringApi.GetUsageAnalyzedLogs] -// - [UsageMeteringApi.GetUsageAttribution] // - [UsageMeteringApi.GetUsageAuditLogs] // - [UsageMeteringApi.GetUsageBillableSummary] // - [UsageMeteringApi.GetUsageCIApp] diff --git a/api/datadogV1/model_usage_attribution_body.go b/api/datadogV1/model_usage_attribution_body.go deleted file mode 100644 index 05eb659c3c7..00000000000 --- a/api/datadogV1/model_usage_attribution_body.go +++ /dev/null @@ -1,332 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2019-Present Datadog, Inc. - -package datadogV1 - -import ( - "time" - - "github.com/DataDog/datadog-api-client-go/v2/api/datadog" -) - -// UsageAttributionBody Usage Summary by tag for a given organization. -type UsageAttributionBody struct { - // Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM]. - Month *time.Time `json:"month,omitempty"` - // The name of the organization. - OrgName *string `json:"org_name,omitempty"` - // The organization public ID. - PublicId *string `json:"public_id,omitempty"` - // The source of the usage attribution tag configuration and the selected tags in the format `::://////`. - TagConfigSource *string `json:"tag_config_source,omitempty"` - // Tag keys and values. - // - // A `null` value here means that the requested tag breakdown cannot be applied because it does not match the [tags - // 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. - Tags map[string][]string `json:"tags,omitempty"` - // Shows the the most recent hour in the current month for all organizations for which all usages were calculated. - UpdatedAt *string `json:"updated_at,omitempty"` - // Fields in Usage Summary by tag(s). - Values *UsageAttributionValues `json:"values,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{} -} - -// NewUsageAttributionBody instantiates a new UsageAttributionBody object. -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed. -func NewUsageAttributionBody() *UsageAttributionBody { - this := UsageAttributionBody{} - return &this -} - -// NewUsageAttributionBodyWithDefaults instantiates a new UsageAttributionBody object. -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set. -func NewUsageAttributionBodyWithDefaults() *UsageAttributionBody { - this := UsageAttributionBody{} - return &this -} - -// GetMonth returns the Month field value if set, zero value otherwise. -func (o *UsageAttributionBody) GetMonth() time.Time { - if o == nil || o.Month == nil { - var ret time.Time - return ret - } - return *o.Month -} - -// GetMonthOk returns a tuple with the Month field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionBody) GetMonthOk() (*time.Time, bool) { - if o == nil || o.Month == nil { - return nil, false - } - return o.Month, true -} - -// HasMonth returns a boolean if a field has been set. -func (o *UsageAttributionBody) HasMonth() bool { - return o != nil && o.Month != nil -} - -// SetMonth gets a reference to the given time.Time and assigns it to the Month field. -func (o *UsageAttributionBody) SetMonth(v time.Time) { - o.Month = &v -} - -// GetOrgName returns the OrgName field value if set, zero value otherwise. -func (o *UsageAttributionBody) GetOrgName() string { - if o == nil || o.OrgName == nil { - var ret string - return ret - } - return *o.OrgName -} - -// GetOrgNameOk returns a tuple with the OrgName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionBody) GetOrgNameOk() (*string, bool) { - if o == nil || o.OrgName == nil { - return nil, false - } - return o.OrgName, true -} - -// HasOrgName returns a boolean if a field has been set. -func (o *UsageAttributionBody) HasOrgName() bool { - return o != nil && o.OrgName != nil -} - -// SetOrgName gets a reference to the given string and assigns it to the OrgName field. -func (o *UsageAttributionBody) SetOrgName(v string) { - o.OrgName = &v -} - -// GetPublicId returns the PublicId field value if set, zero value otherwise. -func (o *UsageAttributionBody) GetPublicId() string { - if o == nil || o.PublicId == nil { - var ret string - return ret - } - return *o.PublicId -} - -// GetPublicIdOk returns a tuple with the PublicId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionBody) GetPublicIdOk() (*string, bool) { - if o == nil || o.PublicId == nil { - return nil, false - } - return o.PublicId, true -} - -// HasPublicId returns a boolean if a field has been set. -func (o *UsageAttributionBody) HasPublicId() bool { - return o != nil && o.PublicId != nil -} - -// SetPublicId gets a reference to the given string and assigns it to the PublicId field. -func (o *UsageAttributionBody) SetPublicId(v string) { - o.PublicId = &v -} - -// GetTagConfigSource returns the TagConfigSource field value if set, zero value otherwise. -func (o *UsageAttributionBody) GetTagConfigSource() string { - if o == nil || o.TagConfigSource == nil { - var ret string - return ret - } - return *o.TagConfigSource -} - -// GetTagConfigSourceOk returns a tuple with the TagConfigSource field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionBody) GetTagConfigSourceOk() (*string, bool) { - if o == nil || o.TagConfigSource == nil { - return nil, false - } - return o.TagConfigSource, true -} - -// HasTagConfigSource returns a boolean if a field has been set. -func (o *UsageAttributionBody) HasTagConfigSource() bool { - return o != nil && o.TagConfigSource != nil -} - -// SetTagConfigSource gets a reference to the given string and assigns it to the TagConfigSource field. -func (o *UsageAttributionBody) SetTagConfigSource(v string) { - o.TagConfigSource = &v -} - -// 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 { - var ret map[string][]string - return ret - } - return o.Tags -} - -// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise -// and a boolean to check if the value has been set. -// 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 - } - return &o.Tags, true -} - -// HasTags returns a boolean if a field has been set. -func (o *UsageAttributionBody) HasTags() bool { - return o != nil && o.Tags != nil -} - -// SetTags gets a reference to the given map[string][]string and assigns it to the Tags field. -func (o *UsageAttributionBody) SetTags(v map[string][]string) { - o.Tags = v -} - -// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. -func (o *UsageAttributionBody) GetUpdatedAt() string { - if o == nil || o.UpdatedAt == nil { - var ret string - return ret - } - return *o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionBody) GetUpdatedAtOk() (*string, bool) { - if o == nil || o.UpdatedAt == nil { - return nil, false - } - return o.UpdatedAt, true -} - -// HasUpdatedAt returns a boolean if a field has been set. -func (o *UsageAttributionBody) HasUpdatedAt() bool { - return o != nil && o.UpdatedAt != nil -} - -// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. -func (o *UsageAttributionBody) SetUpdatedAt(v string) { - o.UpdatedAt = &v -} - -// GetValues returns the Values field value if set, zero value otherwise. -func (o *UsageAttributionBody) GetValues() UsageAttributionValues { - if o == nil || o.Values == nil { - var ret UsageAttributionValues - return ret - } - return *o.Values -} - -// GetValuesOk returns a tuple with the Values field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionBody) GetValuesOk() (*UsageAttributionValues, bool) { - if o == nil || o.Values == nil { - return nil, false - } - return o.Values, true -} - -// HasValues returns a boolean if a field has been set. -func (o *UsageAttributionBody) HasValues() bool { - return o != nil && o.Values != nil -} - -// SetValues gets a reference to the given UsageAttributionValues and assigns it to the Values field. -func (o *UsageAttributionBody) SetValues(v UsageAttributionValues) { - o.Values = &v -} - -// MarshalJSON serializes the struct using spec logic. -func (o UsageAttributionBody) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.UnparsedObject != nil { - return datadog.Marshal(o.UnparsedObject) - } - if o.Month != nil { - if o.Month.Nanosecond() == 0 { - toSerialize["month"] = o.Month.Format("2006-01-02T15:04:05Z07:00") - } else { - toSerialize["month"] = o.Month.Format("2006-01-02T15:04:05.000Z07:00") - } - } - if o.OrgName != nil { - toSerialize["org_name"] = o.OrgName - } - if o.PublicId != nil { - toSerialize["public_id"] = o.PublicId - } - if o.TagConfigSource != nil { - toSerialize["tag_config_source"] = o.TagConfigSource - } - if o.Tags != nil { - toSerialize["tags"] = o.Tags - } - if o.UpdatedAt != nil { - toSerialize["updated_at"] = o.UpdatedAt - } - if o.Values != nil { - toSerialize["values"] = o.Values - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - return datadog.Marshal(toSerialize) -} - -// UnmarshalJSON deserializes the given payload. -func (o *UsageAttributionBody) UnmarshalJSON(bytes []byte) (err error) { - all := struct { - Month *time.Time `json:"month,omitempty"` - OrgName *string `json:"org_name,omitempty"` - PublicId *string `json:"public_id,omitempty"` - TagConfigSource *string `json:"tag_config_source,omitempty"` - Tags map[string][]string `json:"tags,omitempty"` - UpdatedAt *string `json:"updated_at,omitempty"` - Values *UsageAttributionValues `json:"values,omitempty"` - }{} - if err = datadog.Unmarshal(bytes, &all); err != nil { - return datadog.Unmarshal(bytes, &o.UnparsedObject) - } - additionalProperties := make(map[string]interface{}) - if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"month", "org_name", "public_id", "tag_config_source", "tags", "updated_at", "values"}) - } else { - return err - } - - hasInvalidField := false - o.Month = all.Month - o.OrgName = all.OrgName - o.PublicId = all.PublicId - o.TagConfigSource = all.TagConfigSource - o.Tags = all.Tags - o.UpdatedAt = all.UpdatedAt - if all.Values != nil && all.Values.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } - o.Values = all.Values - - if len(additionalProperties) > 0 { - o.AdditionalProperties = additionalProperties - } - - if hasInvalidField { - return datadog.Unmarshal(bytes, &o.UnparsedObject) - } - - return nil -} diff --git a/api/datadogV1/model_usage_attribution_metadata.go b/api/datadogV1/model_usage_attribution_metadata.go deleted file mode 100644 index 4f064f20db1..00000000000 --- a/api/datadogV1/model_usage_attribution_metadata.go +++ /dev/null @@ -1,146 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2019-Present Datadog, Inc. - -package datadogV1 - -import ( - "github.com/DataDog/datadog-api-client-go/v2/api/datadog" -) - -// UsageAttributionMetadata The object containing document metadata. -type UsageAttributionMetadata struct { - // An array of available aggregates. - Aggregates []UsageAttributionAggregatesBody `json:"aggregates,omitempty"` - // The metadata for the current pagination. - Pagination *UsageAttributionPagination `json:"pagination,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{} -} - -// NewUsageAttributionMetadata instantiates a new UsageAttributionMetadata object. -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed. -func NewUsageAttributionMetadata() *UsageAttributionMetadata { - this := UsageAttributionMetadata{} - return &this -} - -// NewUsageAttributionMetadataWithDefaults instantiates a new UsageAttributionMetadata object. -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set. -func NewUsageAttributionMetadataWithDefaults() *UsageAttributionMetadata { - this := UsageAttributionMetadata{} - return &this -} - -// GetAggregates returns the Aggregates field value if set, zero value otherwise. -func (o *UsageAttributionMetadata) GetAggregates() []UsageAttributionAggregatesBody { - if o == nil || o.Aggregates == nil { - var ret []UsageAttributionAggregatesBody - return ret - } - return o.Aggregates -} - -// GetAggregatesOk returns a tuple with the Aggregates field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionMetadata) GetAggregatesOk() (*[]UsageAttributionAggregatesBody, bool) { - if o == nil || o.Aggregates == nil { - return nil, false - } - return &o.Aggregates, true -} - -// HasAggregates returns a boolean if a field has been set. -func (o *UsageAttributionMetadata) HasAggregates() bool { - return o != nil && o.Aggregates != nil -} - -// SetAggregates gets a reference to the given []UsageAttributionAggregatesBody and assigns it to the Aggregates field. -func (o *UsageAttributionMetadata) SetAggregates(v []UsageAttributionAggregatesBody) { - o.Aggregates = v -} - -// GetPagination returns the Pagination field value if set, zero value otherwise. -func (o *UsageAttributionMetadata) GetPagination() UsageAttributionPagination { - if o == nil || o.Pagination == nil { - var ret UsageAttributionPagination - return ret - } - return *o.Pagination -} - -// GetPaginationOk returns a tuple with the Pagination field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionMetadata) GetPaginationOk() (*UsageAttributionPagination, bool) { - if o == nil || o.Pagination == nil { - return nil, false - } - return o.Pagination, true -} - -// HasPagination returns a boolean if a field has been set. -func (o *UsageAttributionMetadata) HasPagination() bool { - return o != nil && o.Pagination != nil -} - -// SetPagination gets a reference to the given UsageAttributionPagination and assigns it to the Pagination field. -func (o *UsageAttributionMetadata) SetPagination(v UsageAttributionPagination) { - o.Pagination = &v -} - -// MarshalJSON serializes the struct using spec logic. -func (o UsageAttributionMetadata) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.UnparsedObject != nil { - return datadog.Marshal(o.UnparsedObject) - } - if o.Aggregates != nil { - toSerialize["aggregates"] = o.Aggregates - } - if o.Pagination != nil { - toSerialize["pagination"] = o.Pagination - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - return datadog.Marshal(toSerialize) -} - -// UnmarshalJSON deserializes the given payload. -func (o *UsageAttributionMetadata) UnmarshalJSON(bytes []byte) (err error) { - all := struct { - Aggregates []UsageAttributionAggregatesBody `json:"aggregates,omitempty"` - Pagination *UsageAttributionPagination `json:"pagination,omitempty"` - }{} - if err = datadog.Unmarshal(bytes, &all); err != nil { - return datadog.Unmarshal(bytes, &o.UnparsedObject) - } - additionalProperties := make(map[string]interface{}) - if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"aggregates", "pagination"}) - } else { - return err - } - - hasInvalidField := false - o.Aggregates = all.Aggregates - if all.Pagination != nil && all.Pagination.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } - o.Pagination = all.Pagination - - if len(additionalProperties) > 0 { - o.AdditionalProperties = additionalProperties - } - - if hasInvalidField { - return datadog.Unmarshal(bytes, &o.UnparsedObject) - } - - return nil -} diff --git a/api/datadogV1/model_usage_attribution_pagination.go b/api/datadogV1/model_usage_attribution_pagination.go deleted file mode 100644 index 708b1a1aee9..00000000000 --- a/api/datadogV1/model_usage_attribution_pagination.go +++ /dev/null @@ -1,242 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2019-Present Datadog, Inc. - -package datadogV1 - -import ( - "github.com/DataDog/datadog-api-client-go/v2/api/datadog" -) - -// UsageAttributionPagination The metadata for the current pagination. -type UsageAttributionPagination struct { - // Maximum amount of records to be returned. - Limit *int64 `json:"limit,omitempty"` - // Records to be skipped before beginning to return. - Offset *int64 `json:"offset,omitempty"` - // Direction to sort by. - SortDirection *string `json:"sort_direction,omitempty"` - // Field to sort by. - SortName *string `json:"sort_name,omitempty"` - // Total number of records. - TotalNumberOfRecords *int64 `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{} -} - -// NewUsageAttributionPagination instantiates a new UsageAttributionPagination object. -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed. -func NewUsageAttributionPagination() *UsageAttributionPagination { - this := UsageAttributionPagination{} - return &this -} - -// NewUsageAttributionPaginationWithDefaults instantiates a new UsageAttributionPagination object. -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set. -func NewUsageAttributionPaginationWithDefaults() *UsageAttributionPagination { - this := UsageAttributionPagination{} - return &this -} - -// GetLimit returns the Limit field value if set, zero value otherwise. -func (o *UsageAttributionPagination) GetLimit() int64 { - if o == nil || o.Limit == nil { - var ret int64 - return ret - } - return *o.Limit -} - -// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionPagination) GetLimitOk() (*int64, bool) { - if o == nil || o.Limit == nil { - return nil, false - } - return o.Limit, true -} - -// HasLimit returns a boolean if a field has been set. -func (o *UsageAttributionPagination) HasLimit() bool { - return o != nil && o.Limit != nil -} - -// SetLimit gets a reference to the given int64 and assigns it to the Limit field. -func (o *UsageAttributionPagination) SetLimit(v int64) { - o.Limit = &v -} - -// GetOffset returns the Offset field value if set, zero value otherwise. -func (o *UsageAttributionPagination) GetOffset() int64 { - if o == nil || o.Offset == nil { - var ret int64 - return ret - } - return *o.Offset -} - -// GetOffsetOk returns a tuple with the Offset field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionPagination) GetOffsetOk() (*int64, bool) { - if o == nil || o.Offset == nil { - return nil, false - } - return o.Offset, true -} - -// HasOffset returns a boolean if a field has been set. -func (o *UsageAttributionPagination) HasOffset() bool { - return o != nil && o.Offset != nil -} - -// SetOffset gets a reference to the given int64 and assigns it to the Offset field. -func (o *UsageAttributionPagination) SetOffset(v int64) { - o.Offset = &v -} - -// GetSortDirection returns the SortDirection field value if set, zero value otherwise. -func (o *UsageAttributionPagination) GetSortDirection() string { - if o == nil || o.SortDirection == nil { - var ret string - return ret - } - return *o.SortDirection -} - -// GetSortDirectionOk returns a tuple with the SortDirection field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionPagination) GetSortDirectionOk() (*string, bool) { - if o == nil || o.SortDirection == nil { - return nil, false - } - return o.SortDirection, true -} - -// HasSortDirection returns a boolean if a field has been set. -func (o *UsageAttributionPagination) HasSortDirection() bool { - return o != nil && o.SortDirection != nil -} - -// SetSortDirection gets a reference to the given string and assigns it to the SortDirection field. -func (o *UsageAttributionPagination) SetSortDirection(v string) { - o.SortDirection = &v -} - -// GetSortName returns the SortName field value if set, zero value otherwise. -func (o *UsageAttributionPagination) GetSortName() string { - if o == nil || o.SortName == nil { - var ret string - return ret - } - return *o.SortName -} - -// GetSortNameOk returns a tuple with the SortName field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionPagination) GetSortNameOk() (*string, bool) { - if o == nil || o.SortName == nil { - return nil, false - } - return o.SortName, true -} - -// HasSortName returns a boolean if a field has been set. -func (o *UsageAttributionPagination) HasSortName() bool { - return o != nil && o.SortName != nil -} - -// SetSortName gets a reference to the given string and assigns it to the SortName field. -func (o *UsageAttributionPagination) SetSortName(v string) { - o.SortName = &v -} - -// GetTotalNumberOfRecords returns the TotalNumberOfRecords field value if set, zero value otherwise. -func (o *UsageAttributionPagination) GetTotalNumberOfRecords() int64 { - if o == nil || o.TotalNumberOfRecords == nil { - var ret int64 - return ret - } - return *o.TotalNumberOfRecords -} - -// GetTotalNumberOfRecordsOk returns a tuple with the TotalNumberOfRecords field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionPagination) GetTotalNumberOfRecordsOk() (*int64, bool) { - if o == nil || o.TotalNumberOfRecords == nil { - return nil, false - } - return o.TotalNumberOfRecords, true -} - -// HasTotalNumberOfRecords returns a boolean if a field has been set. -func (o *UsageAttributionPagination) HasTotalNumberOfRecords() bool { - return o != nil && o.TotalNumberOfRecords != nil -} - -// SetTotalNumberOfRecords gets a reference to the given int64 and assigns it to the TotalNumberOfRecords field. -func (o *UsageAttributionPagination) SetTotalNumberOfRecords(v int64) { - o.TotalNumberOfRecords = &v -} - -// MarshalJSON serializes the struct using spec logic. -func (o UsageAttributionPagination) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.UnparsedObject != nil { - return datadog.Marshal(o.UnparsedObject) - } - if o.Limit != nil { - toSerialize["limit"] = o.Limit - } - if o.Offset != nil { - toSerialize["offset"] = o.Offset - } - if o.SortDirection != nil { - toSerialize["sort_direction"] = o.SortDirection - } - if o.SortName != nil { - toSerialize["sort_name"] = o.SortName - } - if o.TotalNumberOfRecords != nil { - toSerialize["total_number_of_records"] = o.TotalNumberOfRecords - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - return datadog.Marshal(toSerialize) -} - -// UnmarshalJSON deserializes the given payload. -func (o *UsageAttributionPagination) UnmarshalJSON(bytes []byte) (err error) { - all := struct { - Limit *int64 `json:"limit,omitempty"` - Offset *int64 `json:"offset,omitempty"` - SortDirection *string `json:"sort_direction,omitempty"` - SortName *string `json:"sort_name,omitempty"` - TotalNumberOfRecords *int64 `json:"total_number_of_records,omitempty"` - }{} - if err = datadog.Unmarshal(bytes, &all); err != nil { - return datadog.Unmarshal(bytes, &o.UnparsedObject) - } - additionalProperties := make(map[string]interface{}) - if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"limit", "offset", "sort_direction", "sort_name", "total_number_of_records"}) - } else { - return err - } - o.Limit = all.Limit - o.Offset = all.Offset - o.SortDirection = all.SortDirection - o.SortName = all.SortName - o.TotalNumberOfRecords = all.TotalNumberOfRecords - - if len(additionalProperties) > 0 { - o.AdditionalProperties = additionalProperties - } - - return nil -} diff --git a/api/datadogV1/model_usage_attribution_response.go b/api/datadogV1/model_usage_attribution_response.go deleted file mode 100644 index 677006e3466..00000000000 --- a/api/datadogV1/model_usage_attribution_response.go +++ /dev/null @@ -1,146 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2019-Present Datadog, Inc. - -package datadogV1 - -import ( - "github.com/DataDog/datadog-api-client-go/v2/api/datadog" -) - -// UsageAttributionResponse Response containing the Usage Summary by tag(s). -type UsageAttributionResponse struct { - // The object containing document metadata. - Metadata *UsageAttributionMetadata `json:"metadata,omitempty"` - // Get usage summary by tag(s). - Usage []UsageAttributionBody `json:"usage,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{} -} - -// NewUsageAttributionResponse instantiates a new UsageAttributionResponse object. -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed. -func NewUsageAttributionResponse() *UsageAttributionResponse { - this := UsageAttributionResponse{} - return &this -} - -// NewUsageAttributionResponseWithDefaults instantiates a new UsageAttributionResponse object. -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set. -func NewUsageAttributionResponseWithDefaults() *UsageAttributionResponse { - this := UsageAttributionResponse{} - return &this -} - -// GetMetadata returns the Metadata field value if set, zero value otherwise. -func (o *UsageAttributionResponse) GetMetadata() UsageAttributionMetadata { - if o == nil || o.Metadata == nil { - var ret UsageAttributionMetadata - return ret - } - return *o.Metadata -} - -// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionResponse) GetMetadataOk() (*UsageAttributionMetadata, bool) { - if o == nil || o.Metadata == nil { - return nil, false - } - return o.Metadata, true -} - -// HasMetadata returns a boolean if a field has been set. -func (o *UsageAttributionResponse) HasMetadata() bool { - return o != nil && o.Metadata != nil -} - -// SetMetadata gets a reference to the given UsageAttributionMetadata and assigns it to the Metadata field. -func (o *UsageAttributionResponse) SetMetadata(v UsageAttributionMetadata) { - o.Metadata = &v -} - -// GetUsage returns the Usage field value if set, zero value otherwise. -func (o *UsageAttributionResponse) GetUsage() []UsageAttributionBody { - if o == nil || o.Usage == nil { - var ret []UsageAttributionBody - return ret - } - return o.Usage -} - -// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionResponse) GetUsageOk() (*[]UsageAttributionBody, bool) { - if o == nil || o.Usage == nil { - return nil, false - } - return &o.Usage, true -} - -// HasUsage returns a boolean if a field has been set. -func (o *UsageAttributionResponse) HasUsage() bool { - return o != nil && o.Usage != nil -} - -// SetUsage gets a reference to the given []UsageAttributionBody and assigns it to the Usage field. -func (o *UsageAttributionResponse) SetUsage(v []UsageAttributionBody) { - o.Usage = v -} - -// MarshalJSON serializes the struct using spec logic. -func (o UsageAttributionResponse) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.UnparsedObject != nil { - return datadog.Marshal(o.UnparsedObject) - } - if o.Metadata != nil { - toSerialize["metadata"] = o.Metadata - } - if o.Usage != nil { - toSerialize["usage"] = o.Usage - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - return datadog.Marshal(toSerialize) -} - -// UnmarshalJSON deserializes the given payload. -func (o *UsageAttributionResponse) UnmarshalJSON(bytes []byte) (err error) { - all := struct { - Metadata *UsageAttributionMetadata `json:"metadata,omitempty"` - Usage []UsageAttributionBody `json:"usage,omitempty"` - }{} - if err = datadog.Unmarshal(bytes, &all); err != nil { - return datadog.Unmarshal(bytes, &o.UnparsedObject) - } - additionalProperties := make(map[string]interface{}) - if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"metadata", "usage"}) - } else { - return err - } - - hasInvalidField := false - if all.Metadata != nil && all.Metadata.UnparsedObject != nil && o.UnparsedObject == nil { - hasInvalidField = true - } - o.Metadata = all.Metadata - o.Usage = all.Usage - - if len(additionalProperties) > 0 { - o.AdditionalProperties = additionalProperties - } - - if hasInvalidField { - return datadog.Unmarshal(bytes, &o.UnparsedObject) - } - - return nil -} diff --git a/api/datadogV1/model_usage_attribution_sort.go b/api/datadogV1/model_usage_attribution_sort.go deleted file mode 100644 index 51e769821a1..00000000000 --- a/api/datadogV1/model_usage_attribution_sort.go +++ /dev/null @@ -1,138 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2019-Present Datadog, Inc. - -package datadogV1 - -import ( - "fmt" - - "github.com/DataDog/datadog-api-client-go/v2/api/datadog" -) - -// UsageAttributionSort The field to sort by. -type UsageAttributionSort string - -// List of UsageAttributionSort. -const ( - USAGEATTRIBUTIONSORT_API_PERCENTAGE UsageAttributionSort = "api_percentage" - USAGEATTRIBUTIONSORT_SNMP_USAGE UsageAttributionSort = "snmp_usage" - USAGEATTRIBUTIONSORT_APM_HOST_USAGE UsageAttributionSort = "apm_host_usage" - USAGEATTRIBUTIONSORT_API_USAGE UsageAttributionSort = "api_usage" - USAGEATTRIBUTIONSORT_APPSEC_USAGE UsageAttributionSort = "appsec_usage" - USAGEATTRIBUTIONSORT_APPSEC_PERCENTAGE UsageAttributionSort = "appsec_percentage" - USAGEATTRIBUTIONSORT_CONTAINER_USAGE UsageAttributionSort = "container_usage" - USAGEATTRIBUTIONSORT_CUSTOM_TIMESERIES_PERCENTAGE UsageAttributionSort = "custom_timeseries_percentage" - USAGEATTRIBUTIONSORT_CONTAINER_PERCENTAGE UsageAttributionSort = "container_percentage" - USAGEATTRIBUTIONSORT_APM_HOST_PERCENTAGE UsageAttributionSort = "apm_host_percentage" - USAGEATTRIBUTIONSORT_NPM_HOST_PERCENTAGE UsageAttributionSort = "npm_host_percentage" - USAGEATTRIBUTIONSORT_BROWSER_PERCENTAGE UsageAttributionSort = "browser_percentage" - USAGEATTRIBUTIONSORT_BROWSER_USAGE UsageAttributionSort = "browser_usage" - USAGEATTRIBUTIONSORT_INFRA_HOST_PERCENTAGE UsageAttributionSort = "infra_host_percentage" - USAGEATTRIBUTIONSORT_SNMP_PERCENTAGE UsageAttributionSort = "snmp_percentage" - USAGEATTRIBUTIONSORT_NPM_HOST_USAGE UsageAttributionSort = "npm_host_usage" - USAGEATTRIBUTIONSORT_INFRA_HOST_USAGE UsageAttributionSort = "infra_host_usage" - USAGEATTRIBUTIONSORT_CUSTOM_TIMESERIES_USAGE UsageAttributionSort = "custom_timeseries_usage" - USAGEATTRIBUTIONSORT_LAMBDA_FUNCTIONS_USAGE UsageAttributionSort = "lambda_functions_usage" - USAGEATTRIBUTIONSORT_LAMBDA_FUNCTIONS_PERCENTAGE UsageAttributionSort = "lambda_functions_percentage" - USAGEATTRIBUTIONSORT_LAMBDA_INVOCATIONS_USAGE UsageAttributionSort = "lambda_invocations_usage" - USAGEATTRIBUTIONSORT_LAMBDA_INVOCATIONS_PERCENTAGE UsageAttributionSort = "lambda_invocations_percentage" - USAGEATTRIBUTIONSORT_ESTIMATED_INDEXED_LOGS_USAGE UsageAttributionSort = "estimated_indexed_logs_usage" - USAGEATTRIBUTIONSORT_ESTIMATED_INDEXED_LOGS_PERCENTAGE UsageAttributionSort = "estimated_indexed_logs_percentage" - USAGEATTRIBUTIONSORT_ESTIMATED_INGESTED_LOGS_USAGE UsageAttributionSort = "estimated_ingested_logs_usage" - USAGEATTRIBUTIONSORT_ESTIMATED_INGESTED_LOGS_PERCENTAGE UsageAttributionSort = "estimated_ingested_logs_percentage" - USAGEATTRIBUTIONSORT_ESTIMATED_INDEXED_SPANS_USAGE UsageAttributionSort = "estimated_indexed_spans_usage" - USAGEATTRIBUTIONSORT_ESTIMATED_INDEXED_SPANS_PERCENTAGE UsageAttributionSort = "estimated_indexed_spans_percentage" - USAGEATTRIBUTIONSORT_ESTIMATED_INGESTED_SPANS_USAGE UsageAttributionSort = "estimated_ingested_spans_usage" - USAGEATTRIBUTIONSORT_ESTIMATED_INGESTED_SPANS_PERCENTAGE UsageAttributionSort = "estimated_ingested_spans_percentage" - USAGEATTRIBUTIONSORT_APM_FARGATE_USAGE UsageAttributionSort = "apm_fargate_usage" - USAGEATTRIBUTIONSORT_APM_FARGATE_PERCENTAGE UsageAttributionSort = "apm_fargate_percentage" - USAGEATTRIBUTIONSORT_APPSEC_FARGATE_USAGE UsageAttributionSort = "appsec_fargate_usage" - USAGEATTRIBUTIONSORT_APPSEC_FARGATE_PERCENTAGE UsageAttributionSort = "appsec_fargate_percentage" - USAGEATTRIBUTIONSORT_ESTIMATED_RUM_USAGE_ATTRIBUTION_USAGE UsageAttributionSort = "estimated_rum_usage_attribution_usage" - USAGEATTRIBUTIONSORT_ESTIMATED_RUM_USAGE_ATTRIBUTION_PERCENTAGE UsageAttributionSort = "estimated_rum_usage_attribution_percentage" - USAGEATTRIBUTIONSORT_ASM_SERVERLESS_TRACED_INVOCATIONS_USAGE UsageAttributionSort = "asm_serverless_traced_invocations_usage" - USAGEATTRIBUTIONSORT_ASM_SERVERLESS_TRACED_INVOCATIONS_PERCENTAGE UsageAttributionSort = "asm_serverless_traced_invocations_percentage" -) - -var allowedUsageAttributionSortEnumValues = []UsageAttributionSort{ - USAGEATTRIBUTIONSORT_API_PERCENTAGE, - USAGEATTRIBUTIONSORT_SNMP_USAGE, - USAGEATTRIBUTIONSORT_APM_HOST_USAGE, - USAGEATTRIBUTIONSORT_API_USAGE, - USAGEATTRIBUTIONSORT_APPSEC_USAGE, - USAGEATTRIBUTIONSORT_APPSEC_PERCENTAGE, - USAGEATTRIBUTIONSORT_CONTAINER_USAGE, - USAGEATTRIBUTIONSORT_CUSTOM_TIMESERIES_PERCENTAGE, - USAGEATTRIBUTIONSORT_CONTAINER_PERCENTAGE, - USAGEATTRIBUTIONSORT_APM_HOST_PERCENTAGE, - USAGEATTRIBUTIONSORT_NPM_HOST_PERCENTAGE, - USAGEATTRIBUTIONSORT_BROWSER_PERCENTAGE, - USAGEATTRIBUTIONSORT_BROWSER_USAGE, - USAGEATTRIBUTIONSORT_INFRA_HOST_PERCENTAGE, - USAGEATTRIBUTIONSORT_SNMP_PERCENTAGE, - USAGEATTRIBUTIONSORT_NPM_HOST_USAGE, - USAGEATTRIBUTIONSORT_INFRA_HOST_USAGE, - USAGEATTRIBUTIONSORT_CUSTOM_TIMESERIES_USAGE, - USAGEATTRIBUTIONSORT_LAMBDA_FUNCTIONS_USAGE, - USAGEATTRIBUTIONSORT_LAMBDA_FUNCTIONS_PERCENTAGE, - USAGEATTRIBUTIONSORT_LAMBDA_INVOCATIONS_USAGE, - USAGEATTRIBUTIONSORT_LAMBDA_INVOCATIONS_PERCENTAGE, - USAGEATTRIBUTIONSORT_ESTIMATED_INDEXED_LOGS_USAGE, - USAGEATTRIBUTIONSORT_ESTIMATED_INDEXED_LOGS_PERCENTAGE, - USAGEATTRIBUTIONSORT_ESTIMATED_INGESTED_LOGS_USAGE, - USAGEATTRIBUTIONSORT_ESTIMATED_INGESTED_LOGS_PERCENTAGE, - USAGEATTRIBUTIONSORT_ESTIMATED_INDEXED_SPANS_USAGE, - USAGEATTRIBUTIONSORT_ESTIMATED_INDEXED_SPANS_PERCENTAGE, - USAGEATTRIBUTIONSORT_ESTIMATED_INGESTED_SPANS_USAGE, - USAGEATTRIBUTIONSORT_ESTIMATED_INGESTED_SPANS_PERCENTAGE, - USAGEATTRIBUTIONSORT_APM_FARGATE_USAGE, - USAGEATTRIBUTIONSORT_APM_FARGATE_PERCENTAGE, - USAGEATTRIBUTIONSORT_APPSEC_FARGATE_USAGE, - USAGEATTRIBUTIONSORT_APPSEC_FARGATE_PERCENTAGE, - USAGEATTRIBUTIONSORT_ESTIMATED_RUM_USAGE_ATTRIBUTION_USAGE, - USAGEATTRIBUTIONSORT_ESTIMATED_RUM_USAGE_ATTRIBUTION_PERCENTAGE, - USAGEATTRIBUTIONSORT_ASM_SERVERLESS_TRACED_INVOCATIONS_USAGE, - USAGEATTRIBUTIONSORT_ASM_SERVERLESS_TRACED_INVOCATIONS_PERCENTAGE, -} - -// GetAllowedValues reeturns the list of possible values. -func (v *UsageAttributionSort) GetAllowedValues() []UsageAttributionSort { - return allowedUsageAttributionSortEnumValues -} - -// UnmarshalJSON deserializes the given payload. -func (v *UsageAttributionSort) UnmarshalJSON(src []byte) error { - var value string - err := datadog.Unmarshal(src, &value) - if err != nil { - return err - } - *v = UsageAttributionSort(value) - return nil -} - -// NewUsageAttributionSortFromValue returns a pointer to a valid UsageAttributionSort -// for the value passed as argument, or an error if the value passed is not allowed by the enum. -func NewUsageAttributionSortFromValue(v string) (*UsageAttributionSort, error) { - ev := UsageAttributionSort(v) - if ev.IsValid() { - return &ev, nil - } - return nil, fmt.Errorf("invalid value '%v' for UsageAttributionSort: valid values are %v", v, allowedUsageAttributionSortEnumValues) -} - -// IsValid return true if the value is valid for the enum, false otherwise. -func (v UsageAttributionSort) IsValid() bool { - for _, existing := range allowedUsageAttributionSortEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to UsageAttributionSort value. -func (v UsageAttributionSort) Ptr() *UsageAttributionSort { - return &v -} diff --git a/api/datadogV1/model_usage_attribution_supported_metrics.go b/api/datadogV1/model_usage_attribution_supported_metrics.go deleted file mode 100644 index 60bfc318d15..00000000000 --- a/api/datadogV1/model_usage_attribution_supported_metrics.go +++ /dev/null @@ -1,160 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2019-Present Datadog, Inc. - -package datadogV1 - -import ( - "fmt" - - "github.com/DataDog/datadog-api-client-go/v2/api/datadog" -) - -// UsageAttributionSupportedMetrics Supported fields for usage attribution requests (valid requests contain one or more metrics, or `*` for all). -type UsageAttributionSupportedMetrics string - -// List of UsageAttributionSupportedMetrics. -const ( - USAGEATTRIBUTIONSUPPORTEDMETRICS_CUSTOM_TIMESERIES_USAGE UsageAttributionSupportedMetrics = "custom_timeseries_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_CONTAINER_USAGE UsageAttributionSupportedMetrics = "container_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_SNMP_PERCENTAGE UsageAttributionSupportedMetrics = "snmp_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_APM_HOST_USAGE UsageAttributionSupportedMetrics = "apm_host_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_BROWSER_USAGE UsageAttributionSupportedMetrics = "browser_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_NPM_HOST_PERCENTAGE UsageAttributionSupportedMetrics = "npm_host_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_INFRA_HOST_USAGE UsageAttributionSupportedMetrics = "infra_host_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_CUSTOM_TIMESERIES_PERCENTAGE UsageAttributionSupportedMetrics = "custom_timeseries_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_CONTAINER_PERCENTAGE UsageAttributionSupportedMetrics = "container_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_API_USAGE UsageAttributionSupportedMetrics = "api_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_APM_HOST_PERCENTAGE UsageAttributionSupportedMetrics = "apm_host_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_INFRA_HOST_PERCENTAGE UsageAttributionSupportedMetrics = "infra_host_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_SNMP_USAGE UsageAttributionSupportedMetrics = "snmp_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_BROWSER_PERCENTAGE UsageAttributionSupportedMetrics = "browser_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_API_PERCENTAGE UsageAttributionSupportedMetrics = "api_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_NPM_HOST_USAGE UsageAttributionSupportedMetrics = "npm_host_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_LAMBDA_FUNCTIONS_USAGE UsageAttributionSupportedMetrics = "lambda_functions_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_LAMBDA_FUNCTIONS_PERCENTAGE UsageAttributionSupportedMetrics = "lambda_functions_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_LAMBDA_INVOCATIONS_USAGE UsageAttributionSupportedMetrics = "lambda_invocations_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_LAMBDA_INVOCATIONS_PERCENTAGE UsageAttributionSupportedMetrics = "lambda_invocations_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_FARGATE_USAGE UsageAttributionSupportedMetrics = "fargate_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_FARGATE_PERCENTAGE UsageAttributionSupportedMetrics = "fargate_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_PROFILED_HOST_USAGE UsageAttributionSupportedMetrics = "profiled_host_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_PROFILED_HOST_PERCENTAGE UsageAttributionSupportedMetrics = "profiled_host_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_PROFILED_CONTAINER_USAGE UsageAttributionSupportedMetrics = "profiled_container_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_PROFILED_CONTAINER_PERCENTAGE UsageAttributionSupportedMetrics = "profiled_container_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_DBM_HOSTS_USAGE UsageAttributionSupportedMetrics = "dbm_hosts_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_DBM_HOSTS_PERCENTAGE UsageAttributionSupportedMetrics = "dbm_hosts_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_DBM_QUERIES_USAGE UsageAttributionSupportedMetrics = "dbm_queries_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_DBM_QUERIES_PERCENTAGE UsageAttributionSupportedMetrics = "dbm_queries_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_ESTIMATED_INDEXED_LOGS_USAGE UsageAttributionSupportedMetrics = "estimated_indexed_logs_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_ESTIMATED_INDEXED_LOGS_PERCENTAGE UsageAttributionSupportedMetrics = "estimated_indexed_logs_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_ESTIMATED_INGESTED_LOGS_USAGE UsageAttributionSupportedMetrics = "estimated_ingested_logs_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_ESTIMATED_INGESTED_LOGS_PERCENTAGE UsageAttributionSupportedMetrics = "estimated_ingested_logs_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_APPSEC_USAGE UsageAttributionSupportedMetrics = "appsec_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_APPSEC_PERCENTAGE UsageAttributionSupportedMetrics = "appsec_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_ESTIMATED_INDEXED_SPANS_USAGE UsageAttributionSupportedMetrics = "estimated_indexed_spans_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_ESTIMATED_INDEXED_SPANS_PERCENTAGE UsageAttributionSupportedMetrics = "estimated_indexed_spans_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_ESTIMATED_INGESTED_SPANS_USAGE UsageAttributionSupportedMetrics = "estimated_ingested_spans_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_ESTIMATED_INGESTED_SPANS_PERCENTAGE UsageAttributionSupportedMetrics = "estimated_ingested_spans_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_APM_FARGATE_USAGE UsageAttributionSupportedMetrics = "apm_fargate_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_APM_FARGATE_PERCENTAGE UsageAttributionSupportedMetrics = "apm_fargate_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_APPSEC_FARGATE_USAGE UsageAttributionSupportedMetrics = "appsec_fargate_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_APPSEC_FARGATE_PERCENTAGE UsageAttributionSupportedMetrics = "appsec_fargate_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_ESTIMATED_RUM_USAGE_ATTRIBUTION_USAGE UsageAttributionSupportedMetrics = "estimated_rum_usage_attribution_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_ESTIMATED_RUM_USAGE_ATTRIBUTION_PERCENTAGE UsageAttributionSupportedMetrics = "estimated_rum_usage_attribution_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_ASM_SERVERLESS_TRACED_INVOCATIONS_USAGE UsageAttributionSupportedMetrics = "asm_serverless_traced_invocations_usage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_ASM_SERVERLESS_TRACED_INVOCATIONS_PERCENTAGE UsageAttributionSupportedMetrics = "asm_serverless_traced_invocations_percentage" - USAGEATTRIBUTIONSUPPORTEDMETRICS_ALL UsageAttributionSupportedMetrics = "*" -) - -var allowedUsageAttributionSupportedMetricsEnumValues = []UsageAttributionSupportedMetrics{ - USAGEATTRIBUTIONSUPPORTEDMETRICS_CUSTOM_TIMESERIES_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_CONTAINER_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_SNMP_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_APM_HOST_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_BROWSER_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_NPM_HOST_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_INFRA_HOST_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_CUSTOM_TIMESERIES_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_CONTAINER_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_API_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_APM_HOST_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_INFRA_HOST_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_SNMP_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_BROWSER_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_API_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_NPM_HOST_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_LAMBDA_FUNCTIONS_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_LAMBDA_FUNCTIONS_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_LAMBDA_INVOCATIONS_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_LAMBDA_INVOCATIONS_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_FARGATE_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_FARGATE_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_PROFILED_HOST_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_PROFILED_HOST_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_PROFILED_CONTAINER_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_PROFILED_CONTAINER_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_DBM_HOSTS_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_DBM_HOSTS_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_DBM_QUERIES_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_DBM_QUERIES_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_ESTIMATED_INDEXED_LOGS_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_ESTIMATED_INDEXED_LOGS_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_ESTIMATED_INGESTED_LOGS_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_ESTIMATED_INGESTED_LOGS_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_APPSEC_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_APPSEC_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_ESTIMATED_INDEXED_SPANS_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_ESTIMATED_INDEXED_SPANS_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_ESTIMATED_INGESTED_SPANS_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_ESTIMATED_INGESTED_SPANS_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_APM_FARGATE_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_APM_FARGATE_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_APPSEC_FARGATE_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_APPSEC_FARGATE_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_ESTIMATED_RUM_USAGE_ATTRIBUTION_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_ESTIMATED_RUM_USAGE_ATTRIBUTION_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_ASM_SERVERLESS_TRACED_INVOCATIONS_USAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_ASM_SERVERLESS_TRACED_INVOCATIONS_PERCENTAGE, - USAGEATTRIBUTIONSUPPORTEDMETRICS_ALL, -} - -// GetAllowedValues reeturns the list of possible values. -func (v *UsageAttributionSupportedMetrics) GetAllowedValues() []UsageAttributionSupportedMetrics { - return allowedUsageAttributionSupportedMetricsEnumValues -} - -// UnmarshalJSON deserializes the given payload. -func (v *UsageAttributionSupportedMetrics) UnmarshalJSON(src []byte) error { - var value string - err := datadog.Unmarshal(src, &value) - if err != nil { - return err - } - *v = UsageAttributionSupportedMetrics(value) - return nil -} - -// NewUsageAttributionSupportedMetricsFromValue returns a pointer to a valid UsageAttributionSupportedMetrics -// for the value passed as argument, or an error if the value passed is not allowed by the enum. -func NewUsageAttributionSupportedMetricsFromValue(v string) (*UsageAttributionSupportedMetrics, error) { - ev := UsageAttributionSupportedMetrics(v) - if ev.IsValid() { - return &ev, nil - } - return nil, fmt.Errorf("invalid value '%v' for UsageAttributionSupportedMetrics: valid values are %v", v, allowedUsageAttributionSupportedMetricsEnumValues) -} - -// IsValid return true if the value is valid for the enum, false otherwise. -func (v UsageAttributionSupportedMetrics) IsValid() bool { - for _, existing := range allowedUsageAttributionSupportedMetricsEnumValues { - if existing == v { - return true - } - } - return false -} - -// Ptr returns reference to UsageAttributionSupportedMetrics value. -func (v UsageAttributionSupportedMetrics) Ptr() *UsageAttributionSupportedMetrics { - return &v -} diff --git a/api/datadogV1/model_usage_attribution_values.go b/api/datadogV1/model_usage_attribution_values.go deleted file mode 100644 index 2fc95897251..00000000000 --- a/api/datadogV1/model_usage_attribution_values.go +++ /dev/null @@ -1,1887 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2019-Present Datadog, Inc. - -package datadogV1 - -import ( - "github.com/DataDog/datadog-api-client-go/v2/api/datadog" -) - -// UsageAttributionValues Fields in Usage Summary by tag(s). -type UsageAttributionValues struct { - // The percentage of synthetic API test usage by tag(s). - ApiPercentage *float64 `json:"api_percentage,omitempty"` - // The synthetic API test usage by tag(s). - ApiUsage *float64 `json:"api_usage,omitempty"` - // The percentage of APM ECS Fargate task usage by tag(s). - ApmFargatePercentage *float64 `json:"apm_fargate_percentage,omitempty"` - // The APM ECS Fargate task usage by tag(s). - ApmFargateUsage *float64 `json:"apm_fargate_usage,omitempty"` - // The percentage of APM host usage by tag(s). - ApmHostPercentage *float64 `json:"apm_host_percentage,omitempty"` - // The APM host usage by tag(s). - ApmHostUsage *float64 `json:"apm_host_usage,omitempty"` - // The percentage of Application Security Monitoring ECS Fargate task usage by tag(s). - AppsecFargatePercentage *float64 `json:"appsec_fargate_percentage,omitempty"` - // The Application Security Monitoring ECS Fargate task usage by tag(s). - AppsecFargateUsage *float64 `json:"appsec_fargate_usage,omitempty"` - // The percentage of Application Security Monitoring host usage by tag(s). - AppsecPercentage *float64 `json:"appsec_percentage,omitempty"` - // The Application Security Monitoring host usage by tag(s). - AppsecUsage *float64 `json:"appsec_usage,omitempty"` - // The percentage of synthetic browser test usage by tag(s). - BrowserPercentage *float64 `json:"browser_percentage,omitempty"` - // The synthetic browser test usage by tag(s). - BrowserUsage *float64 `json:"browser_usage,omitempty"` - // The percentage of container usage by tag(s). - ContainerPercentage *float64 `json:"container_percentage,omitempty"` - // The container usage by tag(s). - ContainerUsage *float64 `json:"container_usage,omitempty"` - // The percentage of Cloud Security Management Pro container usage by tag(s) - CspmContainerPercentage *float64 `json:"cspm_container_percentage,omitempty"` - // The Cloud Security Management Pro container usage by tag(s) - CspmContainerUsage *float64 `json:"cspm_container_usage,omitempty"` - // The percentage of Cloud Security Management Pro host usage by tag(s) - CspmHostPercentage *float64 `json:"cspm_host_percentage,omitempty"` - // The Cloud Security Management Pro host usage by tag(s) - CspmHostUsage *float64 `json:"cspm_host_usage,omitempty"` - // The percentage of custom metrics usage by tag(s). - CustomTimeseriesPercentage *float64 `json:"custom_timeseries_percentage,omitempty"` - // The custom metrics usage by tag(s). - CustomTimeseriesUsage *float64 `json:"custom_timeseries_usage,omitempty"` - // The percentage of Cloud Workload Security container usage by tag(s) - CwsContainerPercentage *float64 `json:"cws_container_percentage,omitempty"` - // The Cloud Workload Security container usage by tag(s) - CwsContainerUsage *float64 `json:"cws_container_usage,omitempty"` - // The percentage of Cloud Workload Security host usage by tag(s) - CwsHostPercentage *float64 `json:"cws_host_percentage,omitempty"` - // The Cloud Workload Security host usage by tag(s) - CwsHostUsage *float64 `json:"cws_host_usage,omitempty"` - // The percentage of Database Monitoring host usage by tag(s). - DbmHostsPercentage *float64 `json:"dbm_hosts_percentage,omitempty"` - // The Database Monitoring host usage by tag(s). - DbmHostsUsage *float64 `json:"dbm_hosts_usage,omitempty"` - // The percentage of Database Monitoring normalized queries usage by tag(s). - DbmQueriesPercentage *float64 `json:"dbm_queries_percentage,omitempty"` - // The Database Monitoring normalized queries usage by tag(s). - DbmQueriesUsage *float64 `json:"dbm_queries_usage,omitempty"` - // The percentage of estimated live indexed logs usage by tag(s). - EstimatedIndexedLogsPercentage *float64 `json:"estimated_indexed_logs_percentage,omitempty"` - // The estimated live indexed logs usage by tag(s). - EstimatedIndexedLogsUsage *float64 `json:"estimated_indexed_logs_usage,omitempty"` - // The percentage of estimated indexed spans usage by tag(s). - EstimatedIndexedSpansPercentage *float64 `json:"estimated_indexed_spans_percentage,omitempty"` - // The estimated indexed spans usage by tag(s). - EstimatedIndexedSpansUsage *float64 `json:"estimated_indexed_spans_usage,omitempty"` - // The percentage of estimated live ingested logs usage by tag(s). - EstimatedIngestedLogsPercentage *float64 `json:"estimated_ingested_logs_percentage,omitempty"` - // The estimated live ingested logs usage by tag(s). - EstimatedIngestedLogsUsage *float64 `json:"estimated_ingested_logs_usage,omitempty"` - // The percentage of estimated ingested spans usage by tag(s). - EstimatedIngestedSpansPercentage *float64 `json:"estimated_ingested_spans_percentage,omitempty"` - // The estimated ingested spans usage by tag(s). - EstimatedIngestedSpansUsage *float64 `json:"estimated_ingested_spans_usage,omitempty"` - // The percentage of estimated rum sessions usage by tag(s). - EstimatedRumSessionsPercentage *float64 `json:"estimated_rum_sessions_percentage,omitempty"` - // The estimated rum sessions usage by tag(s). - EstimatedRumSessionsUsage *float64 `json:"estimated_rum_sessions_usage,omitempty"` - // The percentage of infrastructure host usage by tag(s). - InfraHostPercentage *float64 `json:"infra_host_percentage,omitempty"` - // The infrastructure host usage by tag(s). - InfraHostUsage *float64 `json:"infra_host_usage,omitempty"` - // The percentage of Lambda function usage by tag(s). - LambdaFunctionsPercentage *float64 `json:"lambda_functions_percentage,omitempty"` - // The Lambda function usage by tag(s). - LambdaFunctionsUsage *float64 `json:"lambda_functions_usage,omitempty"` - // The percentage of Lambda invocation usage by tag(s). - LambdaInvocationsPercentage *float64 `json:"lambda_invocations_percentage,omitempty"` - // The Lambda invocation usage by tag(s). - LambdaInvocationsUsage *float64 `json:"lambda_invocations_usage,omitempty"` - // The percentage of network host usage by tag(s). - NpmHostPercentage *float64 `json:"npm_host_percentage,omitempty"` - // The network host usage by tag(s). - NpmHostUsage *float64 `json:"npm_host_usage,omitempty"` - // The percentage of profiled containers usage by tag(s). - ProfiledContainerPercentage *float64 `json:"profiled_container_percentage,omitempty"` - // The profiled container usage by tag(s). - ProfiledContainerUsage *float64 `json:"profiled_container_usage,omitempty"` - // The percentage of profiled hosts usage by tag(s). - ProfiledHostsPercentage *float64 `json:"profiled_hosts_percentage,omitempty"` - // The profiled host usage by tag(s). - ProfiledHostsUsage *float64 `json:"profiled_hosts_usage,omitempty"` - // The percentage of network device usage by tag(s). - SnmpPercentage *float64 `json:"snmp_percentage,omitempty"` - // The network device usage by tag(s). - SnmpUsage *float64 `json:"snmp_usage,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{} -} - -// NewUsageAttributionValues instantiates a new UsageAttributionValues object. -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed. -func NewUsageAttributionValues() *UsageAttributionValues { - this := UsageAttributionValues{} - return &this -} - -// NewUsageAttributionValuesWithDefaults instantiates a new UsageAttributionValues object. -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set. -func NewUsageAttributionValuesWithDefaults() *UsageAttributionValues { - this := UsageAttributionValues{} - return &this -} - -// GetApiPercentage returns the ApiPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetApiPercentage() float64 { - if o == nil || o.ApiPercentage == nil { - var ret float64 - return ret - } - return *o.ApiPercentage -} - -// GetApiPercentageOk returns a tuple with the ApiPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetApiPercentageOk() (*float64, bool) { - if o == nil || o.ApiPercentage == nil { - return nil, false - } - return o.ApiPercentage, true -} - -// HasApiPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasApiPercentage() bool { - return o != nil && o.ApiPercentage != nil -} - -// SetApiPercentage gets a reference to the given float64 and assigns it to the ApiPercentage field. -func (o *UsageAttributionValues) SetApiPercentage(v float64) { - o.ApiPercentage = &v -} - -// GetApiUsage returns the ApiUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetApiUsage() float64 { - if o == nil || o.ApiUsage == nil { - var ret float64 - return ret - } - return *o.ApiUsage -} - -// GetApiUsageOk returns a tuple with the ApiUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetApiUsageOk() (*float64, bool) { - if o == nil || o.ApiUsage == nil { - return nil, false - } - return o.ApiUsage, true -} - -// HasApiUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasApiUsage() bool { - return o != nil && o.ApiUsage != nil -} - -// SetApiUsage gets a reference to the given float64 and assigns it to the ApiUsage field. -func (o *UsageAttributionValues) SetApiUsage(v float64) { - o.ApiUsage = &v -} - -// GetApmFargatePercentage returns the ApmFargatePercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetApmFargatePercentage() float64 { - if o == nil || o.ApmFargatePercentage == nil { - var ret float64 - return ret - } - return *o.ApmFargatePercentage -} - -// GetApmFargatePercentageOk returns a tuple with the ApmFargatePercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetApmFargatePercentageOk() (*float64, bool) { - if o == nil || o.ApmFargatePercentage == nil { - return nil, false - } - return o.ApmFargatePercentage, true -} - -// HasApmFargatePercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasApmFargatePercentage() bool { - return o != nil && o.ApmFargatePercentage != nil -} - -// SetApmFargatePercentage gets a reference to the given float64 and assigns it to the ApmFargatePercentage field. -func (o *UsageAttributionValues) SetApmFargatePercentage(v float64) { - o.ApmFargatePercentage = &v -} - -// GetApmFargateUsage returns the ApmFargateUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetApmFargateUsage() float64 { - if o == nil || o.ApmFargateUsage == nil { - var ret float64 - return ret - } - return *o.ApmFargateUsage -} - -// GetApmFargateUsageOk returns a tuple with the ApmFargateUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetApmFargateUsageOk() (*float64, bool) { - if o == nil || o.ApmFargateUsage == nil { - return nil, false - } - return o.ApmFargateUsage, true -} - -// HasApmFargateUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasApmFargateUsage() bool { - return o != nil && o.ApmFargateUsage != nil -} - -// SetApmFargateUsage gets a reference to the given float64 and assigns it to the ApmFargateUsage field. -func (o *UsageAttributionValues) SetApmFargateUsage(v float64) { - o.ApmFargateUsage = &v -} - -// GetApmHostPercentage returns the ApmHostPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetApmHostPercentage() float64 { - if o == nil || o.ApmHostPercentage == nil { - var ret float64 - return ret - } - return *o.ApmHostPercentage -} - -// GetApmHostPercentageOk returns a tuple with the ApmHostPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetApmHostPercentageOk() (*float64, bool) { - if o == nil || o.ApmHostPercentage == nil { - return nil, false - } - return o.ApmHostPercentage, true -} - -// HasApmHostPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasApmHostPercentage() bool { - return o != nil && o.ApmHostPercentage != nil -} - -// SetApmHostPercentage gets a reference to the given float64 and assigns it to the ApmHostPercentage field. -func (o *UsageAttributionValues) SetApmHostPercentage(v float64) { - o.ApmHostPercentage = &v -} - -// GetApmHostUsage returns the ApmHostUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetApmHostUsage() float64 { - if o == nil || o.ApmHostUsage == nil { - var ret float64 - return ret - } - return *o.ApmHostUsage -} - -// GetApmHostUsageOk returns a tuple with the ApmHostUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetApmHostUsageOk() (*float64, bool) { - if o == nil || o.ApmHostUsage == nil { - return nil, false - } - return o.ApmHostUsage, true -} - -// HasApmHostUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasApmHostUsage() bool { - return o != nil && o.ApmHostUsage != nil -} - -// SetApmHostUsage gets a reference to the given float64 and assigns it to the ApmHostUsage field. -func (o *UsageAttributionValues) SetApmHostUsage(v float64) { - o.ApmHostUsage = &v -} - -// GetAppsecFargatePercentage returns the AppsecFargatePercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetAppsecFargatePercentage() float64 { - if o == nil || o.AppsecFargatePercentage == nil { - var ret float64 - return ret - } - return *o.AppsecFargatePercentage -} - -// GetAppsecFargatePercentageOk returns a tuple with the AppsecFargatePercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetAppsecFargatePercentageOk() (*float64, bool) { - if o == nil || o.AppsecFargatePercentage == nil { - return nil, false - } - return o.AppsecFargatePercentage, true -} - -// HasAppsecFargatePercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasAppsecFargatePercentage() bool { - return o != nil && o.AppsecFargatePercentage != nil -} - -// SetAppsecFargatePercentage gets a reference to the given float64 and assigns it to the AppsecFargatePercentage field. -func (o *UsageAttributionValues) SetAppsecFargatePercentage(v float64) { - o.AppsecFargatePercentage = &v -} - -// GetAppsecFargateUsage returns the AppsecFargateUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetAppsecFargateUsage() float64 { - if o == nil || o.AppsecFargateUsage == nil { - var ret float64 - return ret - } - return *o.AppsecFargateUsage -} - -// GetAppsecFargateUsageOk returns a tuple with the AppsecFargateUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetAppsecFargateUsageOk() (*float64, bool) { - if o == nil || o.AppsecFargateUsage == nil { - return nil, false - } - return o.AppsecFargateUsage, true -} - -// HasAppsecFargateUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasAppsecFargateUsage() bool { - return o != nil && o.AppsecFargateUsage != nil -} - -// SetAppsecFargateUsage gets a reference to the given float64 and assigns it to the AppsecFargateUsage field. -func (o *UsageAttributionValues) SetAppsecFargateUsage(v float64) { - o.AppsecFargateUsage = &v -} - -// GetAppsecPercentage returns the AppsecPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetAppsecPercentage() float64 { - if o == nil || o.AppsecPercentage == nil { - var ret float64 - return ret - } - return *o.AppsecPercentage -} - -// GetAppsecPercentageOk returns a tuple with the AppsecPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetAppsecPercentageOk() (*float64, bool) { - if o == nil || o.AppsecPercentage == nil { - return nil, false - } - return o.AppsecPercentage, true -} - -// HasAppsecPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasAppsecPercentage() bool { - return o != nil && o.AppsecPercentage != nil -} - -// SetAppsecPercentage gets a reference to the given float64 and assigns it to the AppsecPercentage field. -func (o *UsageAttributionValues) SetAppsecPercentage(v float64) { - o.AppsecPercentage = &v -} - -// GetAppsecUsage returns the AppsecUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetAppsecUsage() float64 { - if o == nil || o.AppsecUsage == nil { - var ret float64 - return ret - } - return *o.AppsecUsage -} - -// GetAppsecUsageOk returns a tuple with the AppsecUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetAppsecUsageOk() (*float64, bool) { - if o == nil || o.AppsecUsage == nil { - return nil, false - } - return o.AppsecUsage, true -} - -// HasAppsecUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasAppsecUsage() bool { - return o != nil && o.AppsecUsage != nil -} - -// SetAppsecUsage gets a reference to the given float64 and assigns it to the AppsecUsage field. -func (o *UsageAttributionValues) SetAppsecUsage(v float64) { - o.AppsecUsage = &v -} - -// GetBrowserPercentage returns the BrowserPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetBrowserPercentage() float64 { - if o == nil || o.BrowserPercentage == nil { - var ret float64 - return ret - } - return *o.BrowserPercentage -} - -// GetBrowserPercentageOk returns a tuple with the BrowserPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetBrowserPercentageOk() (*float64, bool) { - if o == nil || o.BrowserPercentage == nil { - return nil, false - } - return o.BrowserPercentage, true -} - -// HasBrowserPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasBrowserPercentage() bool { - return o != nil && o.BrowserPercentage != nil -} - -// SetBrowserPercentage gets a reference to the given float64 and assigns it to the BrowserPercentage field. -func (o *UsageAttributionValues) SetBrowserPercentage(v float64) { - o.BrowserPercentage = &v -} - -// GetBrowserUsage returns the BrowserUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetBrowserUsage() float64 { - if o == nil || o.BrowserUsage == nil { - var ret float64 - return ret - } - return *o.BrowserUsage -} - -// GetBrowserUsageOk returns a tuple with the BrowserUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetBrowserUsageOk() (*float64, bool) { - if o == nil || o.BrowserUsage == nil { - return nil, false - } - return o.BrowserUsage, true -} - -// HasBrowserUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasBrowserUsage() bool { - return o != nil && o.BrowserUsage != nil -} - -// SetBrowserUsage gets a reference to the given float64 and assigns it to the BrowserUsage field. -func (o *UsageAttributionValues) SetBrowserUsage(v float64) { - o.BrowserUsage = &v -} - -// GetContainerPercentage returns the ContainerPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetContainerPercentage() float64 { - if o == nil || o.ContainerPercentage == nil { - var ret float64 - return ret - } - return *o.ContainerPercentage -} - -// GetContainerPercentageOk returns a tuple with the ContainerPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetContainerPercentageOk() (*float64, bool) { - if o == nil || o.ContainerPercentage == nil { - return nil, false - } - return o.ContainerPercentage, true -} - -// HasContainerPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasContainerPercentage() bool { - return o != nil && o.ContainerPercentage != nil -} - -// SetContainerPercentage gets a reference to the given float64 and assigns it to the ContainerPercentage field. -func (o *UsageAttributionValues) SetContainerPercentage(v float64) { - o.ContainerPercentage = &v -} - -// GetContainerUsage returns the ContainerUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetContainerUsage() float64 { - if o == nil || o.ContainerUsage == nil { - var ret float64 - return ret - } - return *o.ContainerUsage -} - -// GetContainerUsageOk returns a tuple with the ContainerUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetContainerUsageOk() (*float64, bool) { - if o == nil || o.ContainerUsage == nil { - return nil, false - } - return o.ContainerUsage, true -} - -// HasContainerUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasContainerUsage() bool { - return o != nil && o.ContainerUsage != nil -} - -// SetContainerUsage gets a reference to the given float64 and assigns it to the ContainerUsage field. -func (o *UsageAttributionValues) SetContainerUsage(v float64) { - o.ContainerUsage = &v -} - -// GetCspmContainerPercentage returns the CspmContainerPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetCspmContainerPercentage() float64 { - if o == nil || o.CspmContainerPercentage == nil { - var ret float64 - return ret - } - return *o.CspmContainerPercentage -} - -// GetCspmContainerPercentageOk returns a tuple with the CspmContainerPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetCspmContainerPercentageOk() (*float64, bool) { - if o == nil || o.CspmContainerPercentage == nil { - return nil, false - } - return o.CspmContainerPercentage, true -} - -// HasCspmContainerPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasCspmContainerPercentage() bool { - return o != nil && o.CspmContainerPercentage != nil -} - -// SetCspmContainerPercentage gets a reference to the given float64 and assigns it to the CspmContainerPercentage field. -func (o *UsageAttributionValues) SetCspmContainerPercentage(v float64) { - o.CspmContainerPercentage = &v -} - -// GetCspmContainerUsage returns the CspmContainerUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetCspmContainerUsage() float64 { - if o == nil || o.CspmContainerUsage == nil { - var ret float64 - return ret - } - return *o.CspmContainerUsage -} - -// GetCspmContainerUsageOk returns a tuple with the CspmContainerUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetCspmContainerUsageOk() (*float64, bool) { - if o == nil || o.CspmContainerUsage == nil { - return nil, false - } - return o.CspmContainerUsage, true -} - -// HasCspmContainerUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasCspmContainerUsage() bool { - return o != nil && o.CspmContainerUsage != nil -} - -// SetCspmContainerUsage gets a reference to the given float64 and assigns it to the CspmContainerUsage field. -func (o *UsageAttributionValues) SetCspmContainerUsage(v float64) { - o.CspmContainerUsage = &v -} - -// GetCspmHostPercentage returns the CspmHostPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetCspmHostPercentage() float64 { - if o == nil || o.CspmHostPercentage == nil { - var ret float64 - return ret - } - return *o.CspmHostPercentage -} - -// GetCspmHostPercentageOk returns a tuple with the CspmHostPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetCspmHostPercentageOk() (*float64, bool) { - if o == nil || o.CspmHostPercentage == nil { - return nil, false - } - return o.CspmHostPercentage, true -} - -// HasCspmHostPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasCspmHostPercentage() bool { - return o != nil && o.CspmHostPercentage != nil -} - -// SetCspmHostPercentage gets a reference to the given float64 and assigns it to the CspmHostPercentage field. -func (o *UsageAttributionValues) SetCspmHostPercentage(v float64) { - o.CspmHostPercentage = &v -} - -// GetCspmHostUsage returns the CspmHostUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetCspmHostUsage() float64 { - if o == nil || o.CspmHostUsage == nil { - var ret float64 - return ret - } - return *o.CspmHostUsage -} - -// GetCspmHostUsageOk returns a tuple with the CspmHostUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetCspmHostUsageOk() (*float64, bool) { - if o == nil || o.CspmHostUsage == nil { - return nil, false - } - return o.CspmHostUsage, true -} - -// HasCspmHostUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasCspmHostUsage() bool { - return o != nil && o.CspmHostUsage != nil -} - -// SetCspmHostUsage gets a reference to the given float64 and assigns it to the CspmHostUsage field. -func (o *UsageAttributionValues) SetCspmHostUsage(v float64) { - o.CspmHostUsage = &v -} - -// GetCustomTimeseriesPercentage returns the CustomTimeseriesPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetCustomTimeseriesPercentage() float64 { - if o == nil || o.CustomTimeseriesPercentage == nil { - var ret float64 - return ret - } - return *o.CustomTimeseriesPercentage -} - -// GetCustomTimeseriesPercentageOk returns a tuple with the CustomTimeseriesPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetCustomTimeseriesPercentageOk() (*float64, bool) { - if o == nil || o.CustomTimeseriesPercentage == nil { - return nil, false - } - return o.CustomTimeseriesPercentage, true -} - -// HasCustomTimeseriesPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasCustomTimeseriesPercentage() bool { - return o != nil && o.CustomTimeseriesPercentage != nil -} - -// SetCustomTimeseriesPercentage gets a reference to the given float64 and assigns it to the CustomTimeseriesPercentage field. -func (o *UsageAttributionValues) SetCustomTimeseriesPercentage(v float64) { - o.CustomTimeseriesPercentage = &v -} - -// GetCustomTimeseriesUsage returns the CustomTimeseriesUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetCustomTimeseriesUsage() float64 { - if o == nil || o.CustomTimeseriesUsage == nil { - var ret float64 - return ret - } - return *o.CustomTimeseriesUsage -} - -// GetCustomTimeseriesUsageOk returns a tuple with the CustomTimeseriesUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetCustomTimeseriesUsageOk() (*float64, bool) { - if o == nil || o.CustomTimeseriesUsage == nil { - return nil, false - } - return o.CustomTimeseriesUsage, true -} - -// HasCustomTimeseriesUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasCustomTimeseriesUsage() bool { - return o != nil && o.CustomTimeseriesUsage != nil -} - -// SetCustomTimeseriesUsage gets a reference to the given float64 and assigns it to the CustomTimeseriesUsage field. -func (o *UsageAttributionValues) SetCustomTimeseriesUsage(v float64) { - o.CustomTimeseriesUsage = &v -} - -// GetCwsContainerPercentage returns the CwsContainerPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetCwsContainerPercentage() float64 { - if o == nil || o.CwsContainerPercentage == nil { - var ret float64 - return ret - } - return *o.CwsContainerPercentage -} - -// GetCwsContainerPercentageOk returns a tuple with the CwsContainerPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetCwsContainerPercentageOk() (*float64, bool) { - if o == nil || o.CwsContainerPercentage == nil { - return nil, false - } - return o.CwsContainerPercentage, true -} - -// HasCwsContainerPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasCwsContainerPercentage() bool { - return o != nil && o.CwsContainerPercentage != nil -} - -// SetCwsContainerPercentage gets a reference to the given float64 and assigns it to the CwsContainerPercentage field. -func (o *UsageAttributionValues) SetCwsContainerPercentage(v float64) { - o.CwsContainerPercentage = &v -} - -// GetCwsContainerUsage returns the CwsContainerUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetCwsContainerUsage() float64 { - if o == nil || o.CwsContainerUsage == nil { - var ret float64 - return ret - } - return *o.CwsContainerUsage -} - -// GetCwsContainerUsageOk returns a tuple with the CwsContainerUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetCwsContainerUsageOk() (*float64, bool) { - if o == nil || o.CwsContainerUsage == nil { - return nil, false - } - return o.CwsContainerUsage, true -} - -// HasCwsContainerUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasCwsContainerUsage() bool { - return o != nil && o.CwsContainerUsage != nil -} - -// SetCwsContainerUsage gets a reference to the given float64 and assigns it to the CwsContainerUsage field. -func (o *UsageAttributionValues) SetCwsContainerUsage(v float64) { - o.CwsContainerUsage = &v -} - -// GetCwsHostPercentage returns the CwsHostPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetCwsHostPercentage() float64 { - if o == nil || o.CwsHostPercentage == nil { - var ret float64 - return ret - } - return *o.CwsHostPercentage -} - -// GetCwsHostPercentageOk returns a tuple with the CwsHostPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetCwsHostPercentageOk() (*float64, bool) { - if o == nil || o.CwsHostPercentage == nil { - return nil, false - } - return o.CwsHostPercentage, true -} - -// HasCwsHostPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasCwsHostPercentage() bool { - return o != nil && o.CwsHostPercentage != nil -} - -// SetCwsHostPercentage gets a reference to the given float64 and assigns it to the CwsHostPercentage field. -func (o *UsageAttributionValues) SetCwsHostPercentage(v float64) { - o.CwsHostPercentage = &v -} - -// GetCwsHostUsage returns the CwsHostUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetCwsHostUsage() float64 { - if o == nil || o.CwsHostUsage == nil { - var ret float64 - return ret - } - return *o.CwsHostUsage -} - -// GetCwsHostUsageOk returns a tuple with the CwsHostUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetCwsHostUsageOk() (*float64, bool) { - if o == nil || o.CwsHostUsage == nil { - return nil, false - } - return o.CwsHostUsage, true -} - -// HasCwsHostUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasCwsHostUsage() bool { - return o != nil && o.CwsHostUsage != nil -} - -// SetCwsHostUsage gets a reference to the given float64 and assigns it to the CwsHostUsage field. -func (o *UsageAttributionValues) SetCwsHostUsage(v float64) { - o.CwsHostUsage = &v -} - -// GetDbmHostsPercentage returns the DbmHostsPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetDbmHostsPercentage() float64 { - if o == nil || o.DbmHostsPercentage == nil { - var ret float64 - return ret - } - return *o.DbmHostsPercentage -} - -// GetDbmHostsPercentageOk returns a tuple with the DbmHostsPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetDbmHostsPercentageOk() (*float64, bool) { - if o == nil || o.DbmHostsPercentage == nil { - return nil, false - } - return o.DbmHostsPercentage, true -} - -// HasDbmHostsPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasDbmHostsPercentage() bool { - return o != nil && o.DbmHostsPercentage != nil -} - -// SetDbmHostsPercentage gets a reference to the given float64 and assigns it to the DbmHostsPercentage field. -func (o *UsageAttributionValues) SetDbmHostsPercentage(v float64) { - o.DbmHostsPercentage = &v -} - -// GetDbmHostsUsage returns the DbmHostsUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetDbmHostsUsage() float64 { - if o == nil || o.DbmHostsUsage == nil { - var ret float64 - return ret - } - return *o.DbmHostsUsage -} - -// GetDbmHostsUsageOk returns a tuple with the DbmHostsUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetDbmHostsUsageOk() (*float64, bool) { - if o == nil || o.DbmHostsUsage == nil { - return nil, false - } - return o.DbmHostsUsage, true -} - -// HasDbmHostsUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasDbmHostsUsage() bool { - return o != nil && o.DbmHostsUsage != nil -} - -// SetDbmHostsUsage gets a reference to the given float64 and assigns it to the DbmHostsUsage field. -func (o *UsageAttributionValues) SetDbmHostsUsage(v float64) { - o.DbmHostsUsage = &v -} - -// GetDbmQueriesPercentage returns the DbmQueriesPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetDbmQueriesPercentage() float64 { - if o == nil || o.DbmQueriesPercentage == nil { - var ret float64 - return ret - } - return *o.DbmQueriesPercentage -} - -// GetDbmQueriesPercentageOk returns a tuple with the DbmQueriesPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetDbmQueriesPercentageOk() (*float64, bool) { - if o == nil || o.DbmQueriesPercentage == nil { - return nil, false - } - return o.DbmQueriesPercentage, true -} - -// HasDbmQueriesPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasDbmQueriesPercentage() bool { - return o != nil && o.DbmQueriesPercentage != nil -} - -// SetDbmQueriesPercentage gets a reference to the given float64 and assigns it to the DbmQueriesPercentage field. -func (o *UsageAttributionValues) SetDbmQueriesPercentage(v float64) { - o.DbmQueriesPercentage = &v -} - -// GetDbmQueriesUsage returns the DbmQueriesUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetDbmQueriesUsage() float64 { - if o == nil || o.DbmQueriesUsage == nil { - var ret float64 - return ret - } - return *o.DbmQueriesUsage -} - -// GetDbmQueriesUsageOk returns a tuple with the DbmQueriesUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetDbmQueriesUsageOk() (*float64, bool) { - if o == nil || o.DbmQueriesUsage == nil { - return nil, false - } - return o.DbmQueriesUsage, true -} - -// HasDbmQueriesUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasDbmQueriesUsage() bool { - return o != nil && o.DbmQueriesUsage != nil -} - -// SetDbmQueriesUsage gets a reference to the given float64 and assigns it to the DbmQueriesUsage field. -func (o *UsageAttributionValues) SetDbmQueriesUsage(v float64) { - o.DbmQueriesUsage = &v -} - -// GetEstimatedIndexedLogsPercentage returns the EstimatedIndexedLogsPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetEstimatedIndexedLogsPercentage() float64 { - if o == nil || o.EstimatedIndexedLogsPercentage == nil { - var ret float64 - return ret - } - return *o.EstimatedIndexedLogsPercentage -} - -// GetEstimatedIndexedLogsPercentageOk returns a tuple with the EstimatedIndexedLogsPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetEstimatedIndexedLogsPercentageOk() (*float64, bool) { - if o == nil || o.EstimatedIndexedLogsPercentage == nil { - return nil, false - } - return o.EstimatedIndexedLogsPercentage, true -} - -// HasEstimatedIndexedLogsPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasEstimatedIndexedLogsPercentage() bool { - return o != nil && o.EstimatedIndexedLogsPercentage != nil -} - -// SetEstimatedIndexedLogsPercentage gets a reference to the given float64 and assigns it to the EstimatedIndexedLogsPercentage field. -func (o *UsageAttributionValues) SetEstimatedIndexedLogsPercentage(v float64) { - o.EstimatedIndexedLogsPercentage = &v -} - -// GetEstimatedIndexedLogsUsage returns the EstimatedIndexedLogsUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetEstimatedIndexedLogsUsage() float64 { - if o == nil || o.EstimatedIndexedLogsUsage == nil { - var ret float64 - return ret - } - return *o.EstimatedIndexedLogsUsage -} - -// GetEstimatedIndexedLogsUsageOk returns a tuple with the EstimatedIndexedLogsUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetEstimatedIndexedLogsUsageOk() (*float64, bool) { - if o == nil || o.EstimatedIndexedLogsUsage == nil { - return nil, false - } - return o.EstimatedIndexedLogsUsage, true -} - -// HasEstimatedIndexedLogsUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasEstimatedIndexedLogsUsage() bool { - return o != nil && o.EstimatedIndexedLogsUsage != nil -} - -// SetEstimatedIndexedLogsUsage gets a reference to the given float64 and assigns it to the EstimatedIndexedLogsUsage field. -func (o *UsageAttributionValues) SetEstimatedIndexedLogsUsage(v float64) { - o.EstimatedIndexedLogsUsage = &v -} - -// GetEstimatedIndexedSpansPercentage returns the EstimatedIndexedSpansPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetEstimatedIndexedSpansPercentage() float64 { - if o == nil || o.EstimatedIndexedSpansPercentage == nil { - var ret float64 - return ret - } - return *o.EstimatedIndexedSpansPercentage -} - -// GetEstimatedIndexedSpansPercentageOk returns a tuple with the EstimatedIndexedSpansPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetEstimatedIndexedSpansPercentageOk() (*float64, bool) { - if o == nil || o.EstimatedIndexedSpansPercentage == nil { - return nil, false - } - return o.EstimatedIndexedSpansPercentage, true -} - -// HasEstimatedIndexedSpansPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasEstimatedIndexedSpansPercentage() bool { - return o != nil && o.EstimatedIndexedSpansPercentage != nil -} - -// SetEstimatedIndexedSpansPercentage gets a reference to the given float64 and assigns it to the EstimatedIndexedSpansPercentage field. -func (o *UsageAttributionValues) SetEstimatedIndexedSpansPercentage(v float64) { - o.EstimatedIndexedSpansPercentage = &v -} - -// GetEstimatedIndexedSpansUsage returns the EstimatedIndexedSpansUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetEstimatedIndexedSpansUsage() float64 { - if o == nil || o.EstimatedIndexedSpansUsage == nil { - var ret float64 - return ret - } - return *o.EstimatedIndexedSpansUsage -} - -// GetEstimatedIndexedSpansUsageOk returns a tuple with the EstimatedIndexedSpansUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetEstimatedIndexedSpansUsageOk() (*float64, bool) { - if o == nil || o.EstimatedIndexedSpansUsage == nil { - return nil, false - } - return o.EstimatedIndexedSpansUsage, true -} - -// HasEstimatedIndexedSpansUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasEstimatedIndexedSpansUsage() bool { - return o != nil && o.EstimatedIndexedSpansUsage != nil -} - -// SetEstimatedIndexedSpansUsage gets a reference to the given float64 and assigns it to the EstimatedIndexedSpansUsage field. -func (o *UsageAttributionValues) SetEstimatedIndexedSpansUsage(v float64) { - o.EstimatedIndexedSpansUsage = &v -} - -// GetEstimatedIngestedLogsPercentage returns the EstimatedIngestedLogsPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetEstimatedIngestedLogsPercentage() float64 { - if o == nil || o.EstimatedIngestedLogsPercentage == nil { - var ret float64 - return ret - } - return *o.EstimatedIngestedLogsPercentage -} - -// GetEstimatedIngestedLogsPercentageOk returns a tuple with the EstimatedIngestedLogsPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetEstimatedIngestedLogsPercentageOk() (*float64, bool) { - if o == nil || o.EstimatedIngestedLogsPercentage == nil { - return nil, false - } - return o.EstimatedIngestedLogsPercentage, true -} - -// HasEstimatedIngestedLogsPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasEstimatedIngestedLogsPercentage() bool { - return o != nil && o.EstimatedIngestedLogsPercentage != nil -} - -// SetEstimatedIngestedLogsPercentage gets a reference to the given float64 and assigns it to the EstimatedIngestedLogsPercentage field. -func (o *UsageAttributionValues) SetEstimatedIngestedLogsPercentage(v float64) { - o.EstimatedIngestedLogsPercentage = &v -} - -// GetEstimatedIngestedLogsUsage returns the EstimatedIngestedLogsUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetEstimatedIngestedLogsUsage() float64 { - if o == nil || o.EstimatedIngestedLogsUsage == nil { - var ret float64 - return ret - } - return *o.EstimatedIngestedLogsUsage -} - -// GetEstimatedIngestedLogsUsageOk returns a tuple with the EstimatedIngestedLogsUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetEstimatedIngestedLogsUsageOk() (*float64, bool) { - if o == nil || o.EstimatedIngestedLogsUsage == nil { - return nil, false - } - return o.EstimatedIngestedLogsUsage, true -} - -// HasEstimatedIngestedLogsUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasEstimatedIngestedLogsUsage() bool { - return o != nil && o.EstimatedIngestedLogsUsage != nil -} - -// SetEstimatedIngestedLogsUsage gets a reference to the given float64 and assigns it to the EstimatedIngestedLogsUsage field. -func (o *UsageAttributionValues) SetEstimatedIngestedLogsUsage(v float64) { - o.EstimatedIngestedLogsUsage = &v -} - -// GetEstimatedIngestedSpansPercentage returns the EstimatedIngestedSpansPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetEstimatedIngestedSpansPercentage() float64 { - if o == nil || o.EstimatedIngestedSpansPercentage == nil { - var ret float64 - return ret - } - return *o.EstimatedIngestedSpansPercentage -} - -// GetEstimatedIngestedSpansPercentageOk returns a tuple with the EstimatedIngestedSpansPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetEstimatedIngestedSpansPercentageOk() (*float64, bool) { - if o == nil || o.EstimatedIngestedSpansPercentage == nil { - return nil, false - } - return o.EstimatedIngestedSpansPercentage, true -} - -// HasEstimatedIngestedSpansPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasEstimatedIngestedSpansPercentage() bool { - return o != nil && o.EstimatedIngestedSpansPercentage != nil -} - -// SetEstimatedIngestedSpansPercentage gets a reference to the given float64 and assigns it to the EstimatedIngestedSpansPercentage field. -func (o *UsageAttributionValues) SetEstimatedIngestedSpansPercentage(v float64) { - o.EstimatedIngestedSpansPercentage = &v -} - -// GetEstimatedIngestedSpansUsage returns the EstimatedIngestedSpansUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetEstimatedIngestedSpansUsage() float64 { - if o == nil || o.EstimatedIngestedSpansUsage == nil { - var ret float64 - return ret - } - return *o.EstimatedIngestedSpansUsage -} - -// GetEstimatedIngestedSpansUsageOk returns a tuple with the EstimatedIngestedSpansUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetEstimatedIngestedSpansUsageOk() (*float64, bool) { - if o == nil || o.EstimatedIngestedSpansUsage == nil { - return nil, false - } - return o.EstimatedIngestedSpansUsage, true -} - -// HasEstimatedIngestedSpansUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasEstimatedIngestedSpansUsage() bool { - return o != nil && o.EstimatedIngestedSpansUsage != nil -} - -// SetEstimatedIngestedSpansUsage gets a reference to the given float64 and assigns it to the EstimatedIngestedSpansUsage field. -func (o *UsageAttributionValues) SetEstimatedIngestedSpansUsage(v float64) { - o.EstimatedIngestedSpansUsage = &v -} - -// GetEstimatedRumSessionsPercentage returns the EstimatedRumSessionsPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetEstimatedRumSessionsPercentage() float64 { - if o == nil || o.EstimatedRumSessionsPercentage == nil { - var ret float64 - return ret - } - return *o.EstimatedRumSessionsPercentage -} - -// GetEstimatedRumSessionsPercentageOk returns a tuple with the EstimatedRumSessionsPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetEstimatedRumSessionsPercentageOk() (*float64, bool) { - if o == nil || o.EstimatedRumSessionsPercentage == nil { - return nil, false - } - return o.EstimatedRumSessionsPercentage, true -} - -// HasEstimatedRumSessionsPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasEstimatedRumSessionsPercentage() bool { - return o != nil && o.EstimatedRumSessionsPercentage != nil -} - -// SetEstimatedRumSessionsPercentage gets a reference to the given float64 and assigns it to the EstimatedRumSessionsPercentage field. -func (o *UsageAttributionValues) SetEstimatedRumSessionsPercentage(v float64) { - o.EstimatedRumSessionsPercentage = &v -} - -// GetEstimatedRumSessionsUsage returns the EstimatedRumSessionsUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetEstimatedRumSessionsUsage() float64 { - if o == nil || o.EstimatedRumSessionsUsage == nil { - var ret float64 - return ret - } - return *o.EstimatedRumSessionsUsage -} - -// GetEstimatedRumSessionsUsageOk returns a tuple with the EstimatedRumSessionsUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetEstimatedRumSessionsUsageOk() (*float64, bool) { - if o == nil || o.EstimatedRumSessionsUsage == nil { - return nil, false - } - return o.EstimatedRumSessionsUsage, true -} - -// HasEstimatedRumSessionsUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasEstimatedRumSessionsUsage() bool { - return o != nil && o.EstimatedRumSessionsUsage != nil -} - -// SetEstimatedRumSessionsUsage gets a reference to the given float64 and assigns it to the EstimatedRumSessionsUsage field. -func (o *UsageAttributionValues) SetEstimatedRumSessionsUsage(v float64) { - o.EstimatedRumSessionsUsage = &v -} - -// GetInfraHostPercentage returns the InfraHostPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetInfraHostPercentage() float64 { - if o == nil || o.InfraHostPercentage == nil { - var ret float64 - return ret - } - return *o.InfraHostPercentage -} - -// GetInfraHostPercentageOk returns a tuple with the InfraHostPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetInfraHostPercentageOk() (*float64, bool) { - if o == nil || o.InfraHostPercentage == nil { - return nil, false - } - return o.InfraHostPercentage, true -} - -// HasInfraHostPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasInfraHostPercentage() bool { - return o != nil && o.InfraHostPercentage != nil -} - -// SetInfraHostPercentage gets a reference to the given float64 and assigns it to the InfraHostPercentage field. -func (o *UsageAttributionValues) SetInfraHostPercentage(v float64) { - o.InfraHostPercentage = &v -} - -// GetInfraHostUsage returns the InfraHostUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetInfraHostUsage() float64 { - if o == nil || o.InfraHostUsage == nil { - var ret float64 - return ret - } - return *o.InfraHostUsage -} - -// GetInfraHostUsageOk returns a tuple with the InfraHostUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetInfraHostUsageOk() (*float64, bool) { - if o == nil || o.InfraHostUsage == nil { - return nil, false - } - return o.InfraHostUsage, true -} - -// HasInfraHostUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasInfraHostUsage() bool { - return o != nil && o.InfraHostUsage != nil -} - -// SetInfraHostUsage gets a reference to the given float64 and assigns it to the InfraHostUsage field. -func (o *UsageAttributionValues) SetInfraHostUsage(v float64) { - o.InfraHostUsage = &v -} - -// GetLambdaFunctionsPercentage returns the LambdaFunctionsPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetLambdaFunctionsPercentage() float64 { - if o == nil || o.LambdaFunctionsPercentage == nil { - var ret float64 - return ret - } - return *o.LambdaFunctionsPercentage -} - -// GetLambdaFunctionsPercentageOk returns a tuple with the LambdaFunctionsPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetLambdaFunctionsPercentageOk() (*float64, bool) { - if o == nil || o.LambdaFunctionsPercentage == nil { - return nil, false - } - return o.LambdaFunctionsPercentage, true -} - -// HasLambdaFunctionsPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasLambdaFunctionsPercentage() bool { - return o != nil && o.LambdaFunctionsPercentage != nil -} - -// SetLambdaFunctionsPercentage gets a reference to the given float64 and assigns it to the LambdaFunctionsPercentage field. -func (o *UsageAttributionValues) SetLambdaFunctionsPercentage(v float64) { - o.LambdaFunctionsPercentage = &v -} - -// GetLambdaFunctionsUsage returns the LambdaFunctionsUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetLambdaFunctionsUsage() float64 { - if o == nil || o.LambdaFunctionsUsage == nil { - var ret float64 - return ret - } - return *o.LambdaFunctionsUsage -} - -// GetLambdaFunctionsUsageOk returns a tuple with the LambdaFunctionsUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetLambdaFunctionsUsageOk() (*float64, bool) { - if o == nil || o.LambdaFunctionsUsage == nil { - return nil, false - } - return o.LambdaFunctionsUsage, true -} - -// HasLambdaFunctionsUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasLambdaFunctionsUsage() bool { - return o != nil && o.LambdaFunctionsUsage != nil -} - -// SetLambdaFunctionsUsage gets a reference to the given float64 and assigns it to the LambdaFunctionsUsage field. -func (o *UsageAttributionValues) SetLambdaFunctionsUsage(v float64) { - o.LambdaFunctionsUsage = &v -} - -// GetLambdaInvocationsPercentage returns the LambdaInvocationsPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetLambdaInvocationsPercentage() float64 { - if o == nil || o.LambdaInvocationsPercentage == nil { - var ret float64 - return ret - } - return *o.LambdaInvocationsPercentage -} - -// GetLambdaInvocationsPercentageOk returns a tuple with the LambdaInvocationsPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetLambdaInvocationsPercentageOk() (*float64, bool) { - if o == nil || o.LambdaInvocationsPercentage == nil { - return nil, false - } - return o.LambdaInvocationsPercentage, true -} - -// HasLambdaInvocationsPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasLambdaInvocationsPercentage() bool { - return o != nil && o.LambdaInvocationsPercentage != nil -} - -// SetLambdaInvocationsPercentage gets a reference to the given float64 and assigns it to the LambdaInvocationsPercentage field. -func (o *UsageAttributionValues) SetLambdaInvocationsPercentage(v float64) { - o.LambdaInvocationsPercentage = &v -} - -// GetLambdaInvocationsUsage returns the LambdaInvocationsUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetLambdaInvocationsUsage() float64 { - if o == nil || o.LambdaInvocationsUsage == nil { - var ret float64 - return ret - } - return *o.LambdaInvocationsUsage -} - -// GetLambdaInvocationsUsageOk returns a tuple with the LambdaInvocationsUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetLambdaInvocationsUsageOk() (*float64, bool) { - if o == nil || o.LambdaInvocationsUsage == nil { - return nil, false - } - return o.LambdaInvocationsUsage, true -} - -// HasLambdaInvocationsUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasLambdaInvocationsUsage() bool { - return o != nil && o.LambdaInvocationsUsage != nil -} - -// SetLambdaInvocationsUsage gets a reference to the given float64 and assigns it to the LambdaInvocationsUsage field. -func (o *UsageAttributionValues) SetLambdaInvocationsUsage(v float64) { - o.LambdaInvocationsUsage = &v -} - -// GetNpmHostPercentage returns the NpmHostPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetNpmHostPercentage() float64 { - if o == nil || o.NpmHostPercentage == nil { - var ret float64 - return ret - } - return *o.NpmHostPercentage -} - -// GetNpmHostPercentageOk returns a tuple with the NpmHostPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetNpmHostPercentageOk() (*float64, bool) { - if o == nil || o.NpmHostPercentage == nil { - return nil, false - } - return o.NpmHostPercentage, true -} - -// HasNpmHostPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasNpmHostPercentage() bool { - return o != nil && o.NpmHostPercentage != nil -} - -// SetNpmHostPercentage gets a reference to the given float64 and assigns it to the NpmHostPercentage field. -func (o *UsageAttributionValues) SetNpmHostPercentage(v float64) { - o.NpmHostPercentage = &v -} - -// GetNpmHostUsage returns the NpmHostUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetNpmHostUsage() float64 { - if o == nil || o.NpmHostUsage == nil { - var ret float64 - return ret - } - return *o.NpmHostUsage -} - -// GetNpmHostUsageOk returns a tuple with the NpmHostUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetNpmHostUsageOk() (*float64, bool) { - if o == nil || o.NpmHostUsage == nil { - return nil, false - } - return o.NpmHostUsage, true -} - -// HasNpmHostUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasNpmHostUsage() bool { - return o != nil && o.NpmHostUsage != nil -} - -// SetNpmHostUsage gets a reference to the given float64 and assigns it to the NpmHostUsage field. -func (o *UsageAttributionValues) SetNpmHostUsage(v float64) { - o.NpmHostUsage = &v -} - -// GetProfiledContainerPercentage returns the ProfiledContainerPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetProfiledContainerPercentage() float64 { - if o == nil || o.ProfiledContainerPercentage == nil { - var ret float64 - return ret - } - return *o.ProfiledContainerPercentage -} - -// GetProfiledContainerPercentageOk returns a tuple with the ProfiledContainerPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetProfiledContainerPercentageOk() (*float64, bool) { - if o == nil || o.ProfiledContainerPercentage == nil { - return nil, false - } - return o.ProfiledContainerPercentage, true -} - -// HasProfiledContainerPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasProfiledContainerPercentage() bool { - return o != nil && o.ProfiledContainerPercentage != nil -} - -// SetProfiledContainerPercentage gets a reference to the given float64 and assigns it to the ProfiledContainerPercentage field. -func (o *UsageAttributionValues) SetProfiledContainerPercentage(v float64) { - o.ProfiledContainerPercentage = &v -} - -// GetProfiledContainerUsage returns the ProfiledContainerUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetProfiledContainerUsage() float64 { - if o == nil || o.ProfiledContainerUsage == nil { - var ret float64 - return ret - } - return *o.ProfiledContainerUsage -} - -// GetProfiledContainerUsageOk returns a tuple with the ProfiledContainerUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetProfiledContainerUsageOk() (*float64, bool) { - if o == nil || o.ProfiledContainerUsage == nil { - return nil, false - } - return o.ProfiledContainerUsage, true -} - -// HasProfiledContainerUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasProfiledContainerUsage() bool { - return o != nil && o.ProfiledContainerUsage != nil -} - -// SetProfiledContainerUsage gets a reference to the given float64 and assigns it to the ProfiledContainerUsage field. -func (o *UsageAttributionValues) SetProfiledContainerUsage(v float64) { - o.ProfiledContainerUsage = &v -} - -// GetProfiledHostsPercentage returns the ProfiledHostsPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetProfiledHostsPercentage() float64 { - if o == nil || o.ProfiledHostsPercentage == nil { - var ret float64 - return ret - } - return *o.ProfiledHostsPercentage -} - -// GetProfiledHostsPercentageOk returns a tuple with the ProfiledHostsPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetProfiledHostsPercentageOk() (*float64, bool) { - if o == nil || o.ProfiledHostsPercentage == nil { - return nil, false - } - return o.ProfiledHostsPercentage, true -} - -// HasProfiledHostsPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasProfiledHostsPercentage() bool { - return o != nil && o.ProfiledHostsPercentage != nil -} - -// SetProfiledHostsPercentage gets a reference to the given float64 and assigns it to the ProfiledHostsPercentage field. -func (o *UsageAttributionValues) SetProfiledHostsPercentage(v float64) { - o.ProfiledHostsPercentage = &v -} - -// GetProfiledHostsUsage returns the ProfiledHostsUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetProfiledHostsUsage() float64 { - if o == nil || o.ProfiledHostsUsage == nil { - var ret float64 - return ret - } - return *o.ProfiledHostsUsage -} - -// GetProfiledHostsUsageOk returns a tuple with the ProfiledHostsUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetProfiledHostsUsageOk() (*float64, bool) { - if o == nil || o.ProfiledHostsUsage == nil { - return nil, false - } - return o.ProfiledHostsUsage, true -} - -// HasProfiledHostsUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasProfiledHostsUsage() bool { - return o != nil && o.ProfiledHostsUsage != nil -} - -// SetProfiledHostsUsage gets a reference to the given float64 and assigns it to the ProfiledHostsUsage field. -func (o *UsageAttributionValues) SetProfiledHostsUsage(v float64) { - o.ProfiledHostsUsage = &v -} - -// GetSnmpPercentage returns the SnmpPercentage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetSnmpPercentage() float64 { - if o == nil || o.SnmpPercentage == nil { - var ret float64 - return ret - } - return *o.SnmpPercentage -} - -// GetSnmpPercentageOk returns a tuple with the SnmpPercentage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetSnmpPercentageOk() (*float64, bool) { - if o == nil || o.SnmpPercentage == nil { - return nil, false - } - return o.SnmpPercentage, true -} - -// HasSnmpPercentage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasSnmpPercentage() bool { - return o != nil && o.SnmpPercentage != nil -} - -// SetSnmpPercentage gets a reference to the given float64 and assigns it to the SnmpPercentage field. -func (o *UsageAttributionValues) SetSnmpPercentage(v float64) { - o.SnmpPercentage = &v -} - -// GetSnmpUsage returns the SnmpUsage field value if set, zero value otherwise. -func (o *UsageAttributionValues) GetSnmpUsage() float64 { - if o == nil || o.SnmpUsage == nil { - var ret float64 - return ret - } - return *o.SnmpUsage -} - -// GetSnmpUsageOk returns a tuple with the SnmpUsage field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UsageAttributionValues) GetSnmpUsageOk() (*float64, bool) { - if o == nil || o.SnmpUsage == nil { - return nil, false - } - return o.SnmpUsage, true -} - -// HasSnmpUsage returns a boolean if a field has been set. -func (o *UsageAttributionValues) HasSnmpUsage() bool { - return o != nil && o.SnmpUsage != nil -} - -// SetSnmpUsage gets a reference to the given float64 and assigns it to the SnmpUsage field. -func (o *UsageAttributionValues) SetSnmpUsage(v float64) { - o.SnmpUsage = &v -} - -// MarshalJSON serializes the struct using spec logic. -func (o UsageAttributionValues) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if o.UnparsedObject != nil { - return datadog.Marshal(o.UnparsedObject) - } - if o.ApiPercentage != nil { - toSerialize["api_percentage"] = o.ApiPercentage - } - if o.ApiUsage != nil { - toSerialize["api_usage"] = o.ApiUsage - } - if o.ApmFargatePercentage != nil { - toSerialize["apm_fargate_percentage"] = o.ApmFargatePercentage - } - if o.ApmFargateUsage != nil { - toSerialize["apm_fargate_usage"] = o.ApmFargateUsage - } - if o.ApmHostPercentage != nil { - toSerialize["apm_host_percentage"] = o.ApmHostPercentage - } - if o.ApmHostUsage != nil { - toSerialize["apm_host_usage"] = o.ApmHostUsage - } - if o.AppsecFargatePercentage != nil { - toSerialize["appsec_fargate_percentage"] = o.AppsecFargatePercentage - } - if o.AppsecFargateUsage != nil { - toSerialize["appsec_fargate_usage"] = o.AppsecFargateUsage - } - if o.AppsecPercentage != nil { - toSerialize["appsec_percentage"] = o.AppsecPercentage - } - if o.AppsecUsage != nil { - toSerialize["appsec_usage"] = o.AppsecUsage - } - if o.BrowserPercentage != nil { - toSerialize["browser_percentage"] = o.BrowserPercentage - } - if o.BrowserUsage != nil { - toSerialize["browser_usage"] = o.BrowserUsage - } - if o.ContainerPercentage != nil { - toSerialize["container_percentage"] = o.ContainerPercentage - } - if o.ContainerUsage != nil { - toSerialize["container_usage"] = o.ContainerUsage - } - if o.CspmContainerPercentage != nil { - toSerialize["cspm_container_percentage"] = o.CspmContainerPercentage - } - if o.CspmContainerUsage != nil { - toSerialize["cspm_container_usage"] = o.CspmContainerUsage - } - if o.CspmHostPercentage != nil { - toSerialize["cspm_host_percentage"] = o.CspmHostPercentage - } - if o.CspmHostUsage != nil { - toSerialize["cspm_host_usage"] = o.CspmHostUsage - } - if o.CustomTimeseriesPercentage != nil { - toSerialize["custom_timeseries_percentage"] = o.CustomTimeseriesPercentage - } - if o.CustomTimeseriesUsage != nil { - toSerialize["custom_timeseries_usage"] = o.CustomTimeseriesUsage - } - if o.CwsContainerPercentage != nil { - toSerialize["cws_container_percentage"] = o.CwsContainerPercentage - } - if o.CwsContainerUsage != nil { - toSerialize["cws_container_usage"] = o.CwsContainerUsage - } - if o.CwsHostPercentage != nil { - toSerialize["cws_host_percentage"] = o.CwsHostPercentage - } - if o.CwsHostUsage != nil { - toSerialize["cws_host_usage"] = o.CwsHostUsage - } - if o.DbmHostsPercentage != nil { - toSerialize["dbm_hosts_percentage"] = o.DbmHostsPercentage - } - if o.DbmHostsUsage != nil { - toSerialize["dbm_hosts_usage"] = o.DbmHostsUsage - } - if o.DbmQueriesPercentage != nil { - toSerialize["dbm_queries_percentage"] = o.DbmQueriesPercentage - } - if o.DbmQueriesUsage != nil { - toSerialize["dbm_queries_usage"] = o.DbmQueriesUsage - } - if o.EstimatedIndexedLogsPercentage != nil { - toSerialize["estimated_indexed_logs_percentage"] = o.EstimatedIndexedLogsPercentage - } - if o.EstimatedIndexedLogsUsage != nil { - toSerialize["estimated_indexed_logs_usage"] = o.EstimatedIndexedLogsUsage - } - if o.EstimatedIndexedSpansPercentage != nil { - toSerialize["estimated_indexed_spans_percentage"] = o.EstimatedIndexedSpansPercentage - } - if o.EstimatedIndexedSpansUsage != nil { - toSerialize["estimated_indexed_spans_usage"] = o.EstimatedIndexedSpansUsage - } - if o.EstimatedIngestedLogsPercentage != nil { - toSerialize["estimated_ingested_logs_percentage"] = o.EstimatedIngestedLogsPercentage - } - if o.EstimatedIngestedLogsUsage != nil { - toSerialize["estimated_ingested_logs_usage"] = o.EstimatedIngestedLogsUsage - } - if o.EstimatedIngestedSpansPercentage != nil { - toSerialize["estimated_ingested_spans_percentage"] = o.EstimatedIngestedSpansPercentage - } - if o.EstimatedIngestedSpansUsage != nil { - toSerialize["estimated_ingested_spans_usage"] = o.EstimatedIngestedSpansUsage - } - if o.EstimatedRumSessionsPercentage != nil { - toSerialize["estimated_rum_sessions_percentage"] = o.EstimatedRumSessionsPercentage - } - if o.EstimatedRumSessionsUsage != nil { - toSerialize["estimated_rum_sessions_usage"] = o.EstimatedRumSessionsUsage - } - if o.InfraHostPercentage != nil { - toSerialize["infra_host_percentage"] = o.InfraHostPercentage - } - if o.InfraHostUsage != nil { - toSerialize["infra_host_usage"] = o.InfraHostUsage - } - if o.LambdaFunctionsPercentage != nil { - toSerialize["lambda_functions_percentage"] = o.LambdaFunctionsPercentage - } - if o.LambdaFunctionsUsage != nil { - toSerialize["lambda_functions_usage"] = o.LambdaFunctionsUsage - } - if o.LambdaInvocationsPercentage != nil { - toSerialize["lambda_invocations_percentage"] = o.LambdaInvocationsPercentage - } - if o.LambdaInvocationsUsage != nil { - toSerialize["lambda_invocations_usage"] = o.LambdaInvocationsUsage - } - if o.NpmHostPercentage != nil { - toSerialize["npm_host_percentage"] = o.NpmHostPercentage - } - if o.NpmHostUsage != nil { - toSerialize["npm_host_usage"] = o.NpmHostUsage - } - if o.ProfiledContainerPercentage != nil { - toSerialize["profiled_container_percentage"] = o.ProfiledContainerPercentage - } - if o.ProfiledContainerUsage != nil { - toSerialize["profiled_container_usage"] = o.ProfiledContainerUsage - } - if o.ProfiledHostsPercentage != nil { - toSerialize["profiled_hosts_percentage"] = o.ProfiledHostsPercentage - } - if o.ProfiledHostsUsage != nil { - toSerialize["profiled_hosts_usage"] = o.ProfiledHostsUsage - } - if o.SnmpPercentage != nil { - toSerialize["snmp_percentage"] = o.SnmpPercentage - } - if o.SnmpUsage != nil { - toSerialize["snmp_usage"] = o.SnmpUsage - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - return datadog.Marshal(toSerialize) -} - -// UnmarshalJSON deserializes the given payload. -func (o *UsageAttributionValues) UnmarshalJSON(bytes []byte) (err error) { - all := struct { - ApiPercentage *float64 `json:"api_percentage,omitempty"` - ApiUsage *float64 `json:"api_usage,omitempty"` - ApmFargatePercentage *float64 `json:"apm_fargate_percentage,omitempty"` - ApmFargateUsage *float64 `json:"apm_fargate_usage,omitempty"` - ApmHostPercentage *float64 `json:"apm_host_percentage,omitempty"` - ApmHostUsage *float64 `json:"apm_host_usage,omitempty"` - AppsecFargatePercentage *float64 `json:"appsec_fargate_percentage,omitempty"` - AppsecFargateUsage *float64 `json:"appsec_fargate_usage,omitempty"` - AppsecPercentage *float64 `json:"appsec_percentage,omitempty"` - AppsecUsage *float64 `json:"appsec_usage,omitempty"` - BrowserPercentage *float64 `json:"browser_percentage,omitempty"` - BrowserUsage *float64 `json:"browser_usage,omitempty"` - ContainerPercentage *float64 `json:"container_percentage,omitempty"` - ContainerUsage *float64 `json:"container_usage,omitempty"` - CspmContainerPercentage *float64 `json:"cspm_container_percentage,omitempty"` - CspmContainerUsage *float64 `json:"cspm_container_usage,omitempty"` - CspmHostPercentage *float64 `json:"cspm_host_percentage,omitempty"` - CspmHostUsage *float64 `json:"cspm_host_usage,omitempty"` - CustomTimeseriesPercentage *float64 `json:"custom_timeseries_percentage,omitempty"` - CustomTimeseriesUsage *float64 `json:"custom_timeseries_usage,omitempty"` - CwsContainerPercentage *float64 `json:"cws_container_percentage,omitempty"` - CwsContainerUsage *float64 `json:"cws_container_usage,omitempty"` - CwsHostPercentage *float64 `json:"cws_host_percentage,omitempty"` - CwsHostUsage *float64 `json:"cws_host_usage,omitempty"` - DbmHostsPercentage *float64 `json:"dbm_hosts_percentage,omitempty"` - DbmHostsUsage *float64 `json:"dbm_hosts_usage,omitempty"` - DbmQueriesPercentage *float64 `json:"dbm_queries_percentage,omitempty"` - DbmQueriesUsage *float64 `json:"dbm_queries_usage,omitempty"` - EstimatedIndexedLogsPercentage *float64 `json:"estimated_indexed_logs_percentage,omitempty"` - EstimatedIndexedLogsUsage *float64 `json:"estimated_indexed_logs_usage,omitempty"` - EstimatedIndexedSpansPercentage *float64 `json:"estimated_indexed_spans_percentage,omitempty"` - EstimatedIndexedSpansUsage *float64 `json:"estimated_indexed_spans_usage,omitempty"` - EstimatedIngestedLogsPercentage *float64 `json:"estimated_ingested_logs_percentage,omitempty"` - EstimatedIngestedLogsUsage *float64 `json:"estimated_ingested_logs_usage,omitempty"` - EstimatedIngestedSpansPercentage *float64 `json:"estimated_ingested_spans_percentage,omitempty"` - EstimatedIngestedSpansUsage *float64 `json:"estimated_ingested_spans_usage,omitempty"` - EstimatedRumSessionsPercentage *float64 `json:"estimated_rum_sessions_percentage,omitempty"` - EstimatedRumSessionsUsage *float64 `json:"estimated_rum_sessions_usage,omitempty"` - InfraHostPercentage *float64 `json:"infra_host_percentage,omitempty"` - InfraHostUsage *float64 `json:"infra_host_usage,omitempty"` - LambdaFunctionsPercentage *float64 `json:"lambda_functions_percentage,omitempty"` - LambdaFunctionsUsage *float64 `json:"lambda_functions_usage,omitempty"` - LambdaInvocationsPercentage *float64 `json:"lambda_invocations_percentage,omitempty"` - LambdaInvocationsUsage *float64 `json:"lambda_invocations_usage,omitempty"` - NpmHostPercentage *float64 `json:"npm_host_percentage,omitempty"` - NpmHostUsage *float64 `json:"npm_host_usage,omitempty"` - ProfiledContainerPercentage *float64 `json:"profiled_container_percentage,omitempty"` - ProfiledContainerUsage *float64 `json:"profiled_container_usage,omitempty"` - ProfiledHostsPercentage *float64 `json:"profiled_hosts_percentage,omitempty"` - ProfiledHostsUsage *float64 `json:"profiled_hosts_usage,omitempty"` - SnmpPercentage *float64 `json:"snmp_percentage,omitempty"` - SnmpUsage *float64 `json:"snmp_usage,omitempty"` - }{} - if err = datadog.Unmarshal(bytes, &all); err != nil { - return datadog.Unmarshal(bytes, &o.UnparsedObject) - } - additionalProperties := make(map[string]interface{}) - if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"api_percentage", "api_usage", "apm_fargate_percentage", "apm_fargate_usage", "apm_host_percentage", "apm_host_usage", "appsec_fargate_percentage", "appsec_fargate_usage", "appsec_percentage", "appsec_usage", "browser_percentage", "browser_usage", "container_percentage", "container_usage", "cspm_container_percentage", "cspm_container_usage", "cspm_host_percentage", "cspm_host_usage", "custom_timeseries_percentage", "custom_timeseries_usage", "cws_container_percentage", "cws_container_usage", "cws_host_percentage", "cws_host_usage", "dbm_hosts_percentage", "dbm_hosts_usage", "dbm_queries_percentage", "dbm_queries_usage", "estimated_indexed_logs_percentage", "estimated_indexed_logs_usage", "estimated_indexed_spans_percentage", "estimated_indexed_spans_usage", "estimated_ingested_logs_percentage", "estimated_ingested_logs_usage", "estimated_ingested_spans_percentage", "estimated_ingested_spans_usage", "estimated_rum_sessions_percentage", "estimated_rum_sessions_usage", "infra_host_percentage", "infra_host_usage", "lambda_functions_percentage", "lambda_functions_usage", "lambda_invocations_percentage", "lambda_invocations_usage", "npm_host_percentage", "npm_host_usage", "profiled_container_percentage", "profiled_container_usage", "profiled_hosts_percentage", "profiled_hosts_usage", "snmp_percentage", "snmp_usage"}) - } else { - return err - } - o.ApiPercentage = all.ApiPercentage - o.ApiUsage = all.ApiUsage - o.ApmFargatePercentage = all.ApmFargatePercentage - o.ApmFargateUsage = all.ApmFargateUsage - o.ApmHostPercentage = all.ApmHostPercentage - o.ApmHostUsage = all.ApmHostUsage - o.AppsecFargatePercentage = all.AppsecFargatePercentage - o.AppsecFargateUsage = all.AppsecFargateUsage - o.AppsecPercentage = all.AppsecPercentage - o.AppsecUsage = all.AppsecUsage - o.BrowserPercentage = all.BrowserPercentage - o.BrowserUsage = all.BrowserUsage - o.ContainerPercentage = all.ContainerPercentage - o.ContainerUsage = all.ContainerUsage - o.CspmContainerPercentage = all.CspmContainerPercentage - o.CspmContainerUsage = all.CspmContainerUsage - o.CspmHostPercentage = all.CspmHostPercentage - o.CspmHostUsage = all.CspmHostUsage - o.CustomTimeseriesPercentage = all.CustomTimeseriesPercentage - o.CustomTimeseriesUsage = all.CustomTimeseriesUsage - o.CwsContainerPercentage = all.CwsContainerPercentage - o.CwsContainerUsage = all.CwsContainerUsage - o.CwsHostPercentage = all.CwsHostPercentage - o.CwsHostUsage = all.CwsHostUsage - o.DbmHostsPercentage = all.DbmHostsPercentage - o.DbmHostsUsage = all.DbmHostsUsage - o.DbmQueriesPercentage = all.DbmQueriesPercentage - o.DbmQueriesUsage = all.DbmQueriesUsage - o.EstimatedIndexedLogsPercentage = all.EstimatedIndexedLogsPercentage - o.EstimatedIndexedLogsUsage = all.EstimatedIndexedLogsUsage - o.EstimatedIndexedSpansPercentage = all.EstimatedIndexedSpansPercentage - o.EstimatedIndexedSpansUsage = all.EstimatedIndexedSpansUsage - o.EstimatedIngestedLogsPercentage = all.EstimatedIngestedLogsPercentage - o.EstimatedIngestedLogsUsage = all.EstimatedIngestedLogsUsage - o.EstimatedIngestedSpansPercentage = all.EstimatedIngestedSpansPercentage - o.EstimatedIngestedSpansUsage = all.EstimatedIngestedSpansUsage - o.EstimatedRumSessionsPercentage = all.EstimatedRumSessionsPercentage - o.EstimatedRumSessionsUsage = all.EstimatedRumSessionsUsage - o.InfraHostPercentage = all.InfraHostPercentage - o.InfraHostUsage = all.InfraHostUsage - o.LambdaFunctionsPercentage = all.LambdaFunctionsPercentage - o.LambdaFunctionsUsage = all.LambdaFunctionsUsage - o.LambdaInvocationsPercentage = all.LambdaInvocationsPercentage - o.LambdaInvocationsUsage = all.LambdaInvocationsUsage - o.NpmHostPercentage = all.NpmHostPercentage - o.NpmHostUsage = all.NpmHostUsage - o.ProfiledContainerPercentage = all.ProfiledContainerPercentage - o.ProfiledContainerUsage = all.ProfiledContainerUsage - o.ProfiledHostsPercentage = all.ProfiledHostsPercentage - o.ProfiledHostsUsage = all.ProfiledHostsUsage - o.SnmpPercentage = all.SnmpPercentage - o.SnmpUsage = all.SnmpUsage - - if len(additionalProperties) > 0 { - o.AdditionalProperties = additionalProperties - } - - return nil -} diff --git a/examples/v1/usage-metering/GetUsageAttribution.go b/examples/v1/usage-metering/GetUsageAttribution.go deleted file mode 100644 index 3cdfeb74f94..00000000000 --- a/examples/v1/usage-metering/GetUsageAttribution.go +++ /dev/null @@ -1,30 +0,0 @@ -// Get usage attribution returns "OK" response - -package main - -import ( - "context" - "encoding/json" - "fmt" - "os" - "time" - - "github.com/DataDog/datadog-api-client-go/v2/api/datadog" - "github.com/DataDog/datadog-api-client-go/v2/api/datadogV1" -) - -func main() { - ctx := datadog.NewDefaultContext(context.Background()) - configuration := datadog.NewConfiguration() - apiClient := datadog.NewAPIClient(configuration) - api := datadogV1.NewUsageMeteringApi(apiClient) - resp, r, err := api.GetUsageAttribution(ctx, time.Now().AddDate(0, 0, -3), datadogV1.USAGEATTRIBUTIONSUPPORTEDMETRICS_ALL, *datadogV1.NewGetUsageAttributionOptionalParameters().WithOffset(0).WithLimit(1)) - - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `UsageMeteringApi.GetUsageAttribution`: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - - responseContent, _ := json.MarshalIndent(resp, "", " ") - fmt.Fprintf(os.Stdout, "Response from `UsageMeteringApi.GetUsageAttribution`:\n%s\n", responseContent) -} diff --git a/tests/scenarios/features/v1/undo.json b/tests/scenarios/features/v1/undo.json index c8a2684fb3b..16982e7aa54 100644 --- a/tests/scenarios/features/v1/undo.json +++ b/tests/scenarios/features/v1/undo.json @@ -1322,12 +1322,6 @@ "type": "safe" } }, - "GetUsageAttribution": { - "tag": "Usage Metering", - "undo": { - "type": "safe" - } - }, "GetUsageAuditLogs": { "tag": "Usage Metering", "undo": { diff --git a/tests/scenarios/features/v1/usage_metering.feature b/tests/scenarios/features/v1/usage_metering.feature index 391d674cb0b..324dbe5e386 100644 --- a/tests/scenarios/features/v1/usage_metering.feature +++ b/tests/scenarios/features/v1/usage_metering.feature @@ -701,16 +701,6 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @skip @team:DataDog/red-zone-revenue-query - Scenario: Get usage attribution returns "OK" response - Given new "GetUsageAttribution" request - And request contains "start_month" parameter with value "{{ timeISO('now - 3d') }}" - And request contains "fields" parameter with value "*" - And request contains "offset" parameter with value 0 - And request contains "limit" parameter with value 1 - When the request is sent - Then the response status is 200 OK - @skip @team:DataDog/red-zone-revenue-query Scenario: Paginate monthly usage attribution Given there is a valid "monthly_usage_attribution" response