diff --git a/generated/openapitools.json b/generated/openapitools.json new file mode 100644 index 000000000..151c200f7 --- /dev/null +++ b/generated/openapitools.json @@ -0,0 +1,7 @@ +{ + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "7.13.0" + } +} diff --git a/generated/slo-spec.yml b/generated/slo-spec.yml index a1922fa03..bbc2bb684 100644 --- a/generated/slo-spec.yml +++ b/generated/slo-spec.yml @@ -2,25 +2,24 @@ openapi: 3.0.1 info: title: SLOs description: OpenAPI schema for SLOs endpoints - version: '1.0' + version: '1.1' contact: name: Actionable Observability Team license: name: Elastic License 2.0 url: https://www.elastic.co/licensing/elastic-license servers: - - url: http://localhost:5601 - description: local -security: - - basicAuth: [] - - apiKeyAuth: [] + - url: https://{kibana_url} + variables: + kibana_url: + default: localhost:5601 tags: - name: slo description: SLO APIs enable you to define, manage and track service-level objectives paths: /s/{spaceId}/api/observability/slos: post: - summary: Creates an SLO. + summary: Create an SLO operationId: createSloOp description: | You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @@ -66,10 +65,8 @@ paths: application/json: schema: $ref: '#/components/schemas/409_response' - servers: - - url: https://localhost:5601 get: - summary: Retrieves a paginated list of SLOs + summary: Get a paginated list of SLOs operationId: findSlosOp description: | You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @@ -84,16 +81,30 @@ paths: schema: type: string example: 'slo.name:latency* and slo.tags : "prod"' + - name: size + in: query + description: The page size to use for cursor-based pagination, must be greater or equal than 1 + schema: + type: integer + default: 1 + example: 1 + - name: searchAfter + in: query + description: The cursor to use for fetching the results from, when using a cursor-base pagination. + schema: + type: array + items: + type: string - name: page in: query - description: The page number to return + description: The page to use for pagination, must be greater or equal than 1 schema: type: integer default: 1 example: 1 - name: perPage in: query - description: The number of SLOs to return per page + description: Number of SLOs returned by page schema: type: integer default: 25 @@ -121,6 +132,11 @@ paths: - desc default: asc example: asc + - name: hideStale + in: query + description: Hide stale SLOs from the list as defined by stale SLO threshold in SLO settings + schema: + type: boolean responses: '200': description: Successful request @@ -154,7 +170,7 @@ paths: $ref: '#/components/schemas/404_response' /s/{spaceId}/api/observability/slos/{sloId}: get: - summary: Retrieves a SLO + summary: Get an SLO operationId: getSloOp description: | You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @@ -176,7 +192,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/slo_response' + $ref: '#/components/schemas/slo_with_summary_response' '400': description: Bad request content: @@ -202,7 +218,7 @@ paths: schema: $ref: '#/components/schemas/404_response' put: - summary: Updates an SLO + summary: Update an SLO operationId: updateSloOp description: | You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @@ -224,7 +240,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/slo_response' + $ref: '#/components/schemas/slo_definition_response' '400': description: Bad request content: @@ -250,7 +266,7 @@ paths: schema: $ref: '#/components/schemas/404_response' delete: - summary: Deletes an SLO + summary: Delete an SLO operationId: deleteSloOp description: | You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @@ -289,7 +305,7 @@ paths: $ref: '#/components/schemas/404_response' /s/{spaceId}/api/observability/slos/{sloId}/enable: post: - summary: Enables an SLO + summary: Enable an SLO operationId: enableSloOp description: | You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @@ -328,8 +344,47 @@ paths: $ref: '#/components/schemas/404_response' /s/{spaceId}/api/observability/slos/{sloId}/disable: post: - summary: Disables an SLO + summary: Disable an SLO operationId: disableSloOp + description: | + You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. + tags: + - slo + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/space_id' + - $ref: '#/components/parameters/slo_id' + responses: + '204': + description: Successful request + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + '403': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/403_response' + '404': + description: Not found response + content: + application/json: + schema: + $ref: '#/components/schemas/404_response' + /s/{spaceId}/api/observability/slos/{sloId}/_reset: + post: + summary: Reset an SLO + operationId: resetSloOp description: | You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. tags: @@ -341,6 +396,10 @@ paths: responses: '200': description: Successful request + content: + application/json: + schema: + $ref: '#/components/schemas/slo_definition_response' '400': description: Bad request content: @@ -365,12 +424,12 @@ paths: application/json: schema: $ref: '#/components/schemas/404_response' - /s/{spaceId}/internal/observability/slos/_historical_summary: + /s/{spaceId}/api/observability/slos/_bulk_purge_rollup: post: - summary: Retrieves the historical summary for a list of SLOs - operationId: historicalSummaryOp + summary: Batch delete rollup and summary data + operationId: deleteRollupDataOp description: | - You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. + The deletion occurs for the specified list of `sloId`. You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. tags: - slo parameters: @@ -381,14 +440,81 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/historical_summary_request' + $ref: '#/components/schemas/bulk_purge_rollup_request' + responses: + '200': + description: Successful request + content: + application/json: + schema: + $ref: '#/components/schemas/bulk_purge_rollup_response' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + '403': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/403_response' + /s/{spaceId}/internal/observability/slos/_definitions: + get: + summary: Get the SLO definitions + operationId: getDefinitionsOp + description: | + You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. + tags: + - slo + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/space_id' + - name: includeOutdatedOnly + in: query + description: Indicates if the API returns only outdated SLO or all SLO definitions + schema: + type: boolean + example: true + - name: tags + in: query + description: Filters the SLOs by tag + schema: + type: string + - name: search + in: query + description: Filters the SLOs by name + schema: + type: string + example: my service availability + - name: page + in: query + description: The page to use for pagination, must be greater or equal than 1 + schema: + type: number + example: 1 + - name: perPage + in: query + description: Number of SLOs returned by page + schema: + type: integer + default: 100 + maximum: 1000 + example: 100 responses: '200': description: Successful request content: application/json: schema: - $ref: '#/components/schemas/historical_summary_response' + $ref: '#/components/schemas/find_slo_definitions_response' '400': description: Bad request content: @@ -409,10 +535,10 @@ paths: $ref: '#/components/schemas/403_response' /s/{spaceId}/api/observability/slos/_delete_instances: post: - summary: Batch delete rollup and summary data for the matching list of sloId and instanceId + summary: Batch delete rollup and summary data operationId: deleteSloInstancesOp description: | - You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. + The deletion occurs for the specified list of `sloId` and `instanceId`. You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. tags: - slo parameters: @@ -445,18 +571,92 @@ paths: application/json: schema: $ref: '#/components/schemas/403_response' - servers: - - url: https://localhost:5601 + /s/{spaceId}/api/observability/slos/_bulk_delete: + post: + summary: Bulk delete SLO definitions and their associated summary and rollup data. + operationId: bulkDeleteOp + description: | + Bulk delete SLO definitions and their associated summary and rollup data. This endpoint initiates a bulk deletion operation for SLOs, which may take some time to complete. The status of the operation can be checked using the `GET /api/slo/_bulk_delete/{taskId}` endpoint. + tags: + - slo + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/space_id' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/bulk_delete_request' + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/bulk_delete_response' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + '403': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/403_response' + /s/{spaceId}/api/observability/slos/_bulk_delete/{taskId}: + get: + summary: Retrieve the status of the bulk deletion + operationId: bulkDeleteStatusOp + description: | + Retrieve the status of the bulk deletion operation for SLOs. This endpoint returns the status of the bulk deletion operation, including whether it is completed and the results of the operation. + tags: + - slo + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/space_id' + - name: taskId + in: path + description: The task id of the bulk delete operation + required: true + schema: + type: string + example: 8853df00-ae2e-11ed-90af-09bb6422b258 + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/bulk_delete_status_response' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + '403': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/403_response' components: - securitySchemes: - basicAuth: - type: http - scheme: basic - apiKeyAuth: - type: apiKey - in: header - name: Authorization - description: 'e.g. Authorization: ApiKey base64AccessApiKey' parameters: kbn_xsrf: schema: @@ -529,12 +729,96 @@ components: description: The type of indicator. type: string example: sli.apm.transactionDuration + filter_meta: + title: FilterMeta + description: Defines properties for a filter + type: object + properties: + alias: + type: string + nullable: true + disabled: + type: boolean + negate: + type: boolean + controlledBy: + type: string + group: + type: string + index: + type: string + isMultiIndex: + type: boolean + type: + type: string + key: + type: string + params: + type: object + value: + type: string + field: + type: string + filter: + title: Filter + description: Defines properties for a filter + type: object + properties: + query: + type: object + meta: + $ref: '#/components/schemas/filter_meta' + kql_with_filters: + title: KQL with filters + description: Defines properties for a filter + oneOf: + - description: the KQL query to filter the documents with. + type: string + example: 'field.environment : "production" and service.name : "my-service"' + - type: object + properties: + kqlQuery: + type: string + filters: + type: array + items: + $ref: '#/components/schemas/filter' + kql_with_filters_good: + title: KQL query for good events + description: The KQL query used to define the good events. + oneOf: + - description: the KQL query to filter the documents with. + type: string + example: 'request.latency <= 150 and request.status_code : "2xx"' + - type: object + properties: + kqlQuery: + type: string + filters: + type: array + items: + $ref: '#/components/schemas/filter' + kql_with_filters_total: + title: KQL query for all events + description: The KQL query used to define all events. + oneOf: + - description: the KQL query to filter the documents with. + type: string + example: 'field.environment : "production" and service.name : "my-service"' + - type: object + properties: + kqlQuery: + type: string + filters: + type: array + items: + $ref: '#/components/schemas/filter' indicator_properties_custom_kql: - title: Custom KQL + title: Custom Query required: - type - params - description: Defines properties for a custom KQL indicator type + description: Defines properties for a custom query indicator type type: object properties: params: @@ -551,18 +835,16 @@ components: description: The index or index pattern to use type: string example: my-service-* - filter: - description: the KQL query to filter the documents with. + dataViewId: + description: The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries. type: string - example: 'field.environment : "production" and service.name : "my-service"' + example: 03b80ab3-003d-498b-881c-3beedbaf1162 + filter: + $ref: '#/components/schemas/kql_with_filters' good: - description: the KQL query used to define the good events. - type: string - example: 'request.latency <= 150 and request.status_code : "2xx"' + $ref: '#/components/schemas/kql_with_filters_good' total: - description: the KQL query used to define all events. - type: string - example: '' + $ref: '#/components/schemas/kql_with_filters_total' timestampField: description: | The timestamp field used in the source indice. @@ -646,6 +928,10 @@ components: description: The index or index pattern to use type: string example: my-service-* + dataViewId: + description: The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries. + type: string + example: 03b80ab3-003d-498b-881c-3beedbaf1162 filter: description: the KQL query to filter the documents with. type: string @@ -667,31 +953,52 @@ components: description: List of metrics with their name, aggregation type, and field. type: array items: - type: object - required: - - name - - aggregation - - field - properties: - name: - description: The name of the metric. Only valid options are A-Z - type: string - example: A - pattern: ^[A-Z]$ - aggregation: - description: The aggregation type of the metric. Only valid option is "sum" - type: string - example: sum - enum: - - sum - field: - description: The field of the metric. - type: string - example: processor.processed - filter: - description: The filter to apply to the metric. - type: string - example: 'processor.outcome: "success"' + oneOf: + - type: object + required: + - name + - aggregation + - field + properties: + name: + description: The name of the metric. Only valid options are A-Z + type: string + example: A + pattern: ^[A-Z]$ + aggregation: + description: The aggregation type of the metric. + type: string + example: sum + enum: + - sum + field: + description: The field of the metric. + type: string + example: processor.processed + filter: + description: The filter to apply to the metric. + type: string + example: 'processor.outcome: *' + - type: object + required: + - name + - aggregation + properties: + name: + description: The name of the metric. Only valid options are A-Z + type: string + example: A + pattern: ^[A-Z]$ + aggregation: + description: The aggregation type of the metric. + type: string + example: doc_count + enum: + - doc_count + filter: + description: The filter to apply to the metric. + type: string + example: 'processor.outcome: *' equation: description: The equation to calculate the "good" metric. type: string @@ -708,31 +1015,52 @@ components: description: List of metrics with their name, aggregation type, and field. type: array items: - type: object - required: - - name - - aggregation - - field - properties: - name: - description: The name of the metric. Only valid options are A-Z - type: string - example: A - pattern: ^[A-Z]$ - aggregation: - description: The aggregation type of the metric. Only valid option is "sum" - type: string - example: sum - enum: - - sum - field: - description: The field of the metric. - type: string - example: processor.processed - filter: - description: The filter to apply to the metric. - type: string - example: 'processor.outcome: *' + oneOf: + - type: object + required: + - name + - aggregation + - field + properties: + name: + description: The name of the metric. Only valid options are A-Z + type: string + example: A + pattern: ^[A-Z]$ + aggregation: + description: The aggregation type of the metric. + type: string + example: sum + enum: + - sum + field: + description: The field of the metric. + type: string + example: processor.processed + filter: + description: The filter to apply to the metric. + type: string + example: 'processor.outcome: *' + - type: object + required: + - name + - aggregation + properties: + name: + description: The name of the metric. Only valid options are A-Z + type: string + example: A + pattern: ^[A-Z]$ + aggregation: + description: The aggregation type of the metric. + type: string + example: doc_count + enum: + - doc_count + filter: + description: The filter to apply to the metric. + type: string + example: 'processor.outcome: *' equation: description: The equation to calculate the "total" metric. type: string @@ -763,6 +1091,10 @@ components: description: The index or index pattern to use type: string example: my-service-* + dataViewId: + description: The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries. + type: string + example: 03b80ab3-003d-498b-881c-3beedbaf1162 filter: description: the KQL query to filter the documents with. type: string @@ -946,6 +1278,10 @@ components: description: The index or index pattern to use type: string example: my-service-* + dataViewId: + description: The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries. + type: string + example: 03b80ab3-003d-498b-881c-3beedbaf1162 filter: description: the KQL query to filter the documents with. type: string @@ -1031,10 +1367,16 @@ components: target: description: the target objective between 0 and 1 excluded type: number + minimum: 0 + maximum: 100 + exclusiveMinimum: true + exclusiveMaximum: true example: 0.99 timesliceTarget: description: the target objective for each slice when using a timeslices budgeting method type: number + minimum: 0 + maximum: 100 example: 0.995 timesliceWindow: description: the duration of each slice when using a timeslices budgeting method, as {duraton}{unit} @@ -1045,14 +1387,25 @@ components: description: Defines properties for SLO settings. type: object properties: + syncField: + description: The date field that is used to identify new documents in the source. It is strongly recommended to use a field that contains the ingest timestamp. If you use a different field, you might need to set the delay such that it accounts for data transmission delays. When unspecified, we use the indicator timestamp field. + type: string + example: event.ingested syncDelay: - description: The synch delay to apply to the transform. Default 1m + description: The time delay in minutes between the current time and the latest source data time. Increasing the value will delay any alerting. The default value is 1 minute. The minimum value is 1m and the maximum is 359m. It should always be greater then source index refresh interval. type: string + default: 1m example: 5m frequency: - description: Configure how often the transform runs, default 1m + description: The interval between checks for changes in the source data. The minimum value is 1m and the maximum is 59m. The default value is 1 minute. type: string + default: 1m example: 5m + preventInitialBackfill: + description: Start aggregating data from the time the SLO is created, instead of backfilling data from the beginning of the time window. + type: boolean + default: false + example: true summary_status: title: summary status type: string @@ -1103,7 +1456,20 @@ components: example: 0.9836 errorBudget: $ref: '#/components/schemas/error_budget' - slo_response: + group_by: + title: Group by + description: optional group by field or fields to use to generate an SLO per distinct value + example: + - - service.name + - service.name + - - service.name + - service.environment + oneOf: + - type: string + - type: array + items: + type: string + slo_with_summary_response: title: SLO response type: object required: @@ -1123,6 +1489,7 @@ components: - tags - createdAt - updatedAt + - version properties: id: description: The identifier of the SLO. @@ -1172,13 +1539,7 @@ components: type: boolean example: true groupBy: - description: optional group by field to use to generate an SLO per distinct value - oneOf: - - type: string - - type: array - items: - type: string - example: some.field + $ref: '#/components/schemas/group_by' instanceId: description: the value derived from the groupBy field, if present, otherwise '*' type: string @@ -1196,12 +1557,22 @@ components: description: The last update date type: string example: '2023-01-12T10:03:19.000Z' + version: + description: The internal SLO version + type: number + example: 2 find_slo_response: title: Find SLO response description: | A paginated response of SLOs matching the query. type: object properties: + size: + type: number + example: 25 + description: Size provided for cursor based pagination + searchAfter: + type: string page: type: number example: 1 @@ -1214,7 +1585,7 @@ components: results: type: array items: - $ref: '#/components/schemas/slo_response' + $ref: '#/components/schemas/slo_with_summary_response' 400_response: title: Bad request type: object @@ -1323,13 +1694,7 @@ components: settings: $ref: '#/components/schemas/settings' groupBy: - description: optional group by field to use to generate an SLO per distinct value - oneOf: - - type: string - - type: array - items: - type: string - example: some.field + $ref: '#/components/schemas/group_by' tags: description: List of tags type: array @@ -1390,48 +1755,197 @@ components: settings: $ref: '#/components/schemas/settings' groupBy: - description: optional group by field to use to generate an SLO per distinct value + $ref: '#/components/schemas/group_by' + tags: + description: List of tags + type: array + items: + type: string + slo_definition_response: + title: SLO definition response + type: object + required: + - id + - name + - description + - indicator + - timeWindow + - budgetingMethod + - objective + - settings + - revision + - enabled + - groupBy + - tags + - createdAt + - updatedAt + - version + properties: + id: + description: The identifier of the SLO. + type: string + example: 8853df00-ae2e-11ed-90af-09bb6422b258 + name: + description: The name of the SLO. + type: string + example: My Service SLO + description: + description: The description of the SLO. + type: string + example: My SLO description + indicator: + discriminator: + propertyName: type + mapping: + sli.apm.transactionErrorRate: '#/components/schemas/indicator_properties_apm_availability' + sli.kql.custom: '#/components/schemas/indicator_properties_custom_kql' + sli.apm.transactionDuration: '#/components/schemas/indicator_properties_apm_latency' + sli.metric.custom: '#/components/schemas/indicator_properties_custom_metric' + sli.histogram.custom: '#/components/schemas/indicator_properties_histogram' + sli.metric.timeslice: '#/components/schemas/indicator_properties_timeslice_metric' oneOf: - - type: string - - type: array - items: - type: string - example: some.field + - $ref: '#/components/schemas/indicator_properties_custom_kql' + - $ref: '#/components/schemas/indicator_properties_apm_availability' + - $ref: '#/components/schemas/indicator_properties_apm_latency' + - $ref: '#/components/schemas/indicator_properties_custom_metric' + - $ref: '#/components/schemas/indicator_properties_histogram' + - $ref: '#/components/schemas/indicator_properties_timeslice_metric' + timeWindow: + $ref: '#/components/schemas/time_window' + budgetingMethod: + $ref: '#/components/schemas/budgeting_method' + objective: + $ref: '#/components/schemas/objective' + settings: + $ref: '#/components/schemas/settings' + revision: + description: The SLO revision + type: number + example: 2 + enabled: + description: Indicate if the SLO is enabled + type: boolean + example: true + groupBy: + $ref: '#/components/schemas/group_by' tags: description: List of tags type: array items: type: string - historical_summary_request: - title: Historical summary request + createdAt: + description: The creation date + type: string + example: '2023-01-12T10:03:19.000Z' + updatedAt: + description: The last update date + type: string + example: '2023-01-12T10:03:19.000Z' + version: + description: The internal SLO version + type: number + example: 2 + bulk_purge_rollup_request: + title: Bulk Purge Rollup data request + description: | + The bulk purge rollup data request takes a list of SLO ids and a purge policy, then deletes the rollup data according to the purge policy. This API can be used to remove the staled data of an instance SLO that no longer get updated. type: object required: - list + - purgePolicy properties: list: - description: The list of SLO identifiers to get the historical summary for + description: An array of slo ids type: array items: type: string + description: The SLO Definition id example: 8853df00-ae2e-11ed-90af-09bb6422b258 - historical_summary_response: - title: Historical summary response - type: object - additionalProperties: - type: array - items: + purgePolicy: + description: Policy that dictates which SLI documents to purge based on age type: object + oneOf: + - type: object + properties: + purgeType: + type: string + description: Specifies whether documents will be purged based on a specific age or on a timestamp + enum: + - fixed-age + age: + type: string + description: The duration to determine which documents to purge, formatted as {duration}{unit}. This value should be greater than or equal to the time window of every SLO provided. + example: 7d + - type: object + properties: + purgeType: + type: string + description: Specifies whether documents will be purged based on a specific age or on a timestamp + enum: + - fixed-time + timestamp: + type: string + description: The timestamp to determine which documents to purge, formatted in ISO. This value should be older than the applicable time window of every SLO provided. + example: '2024-12-31T00:00:00.000Z' + bulk_purge_rollup_response: + title: Bulk Purge Rollup data response + description: | + The bulk purge rollup data response returns a task id from the elasticsearch deleteByQuery response. + type: object + properties: + taskId: + type: string + description: The task id of the purge operation + example: 8853df00-ae2e-11ed-90af-09bb6422b258 + find_slo_definitions_response: + title: Find SLO definitions response + description: | + A paginated response of SLO definitions matching the query. + type: object + oneOf: + - type: object properties: - date: - type: string - example: '2022-01-01T00:00:00.000Z' - status: - $ref: '#/components/schemas/summary_status' - sliValue: + page: + type: number + example: 1 + perPage: + type: number + example: 25 + total: + type: number + example: 34 + results: + type: array + items: + $ref: '#/components/schemas/slo_with_summary_response' + - type: object + properties: + page: + type: number + default: 1 + description: for backward compability + perPage: type: number - example: 0.9836 - errorBudget: - $ref: '#/components/schemas/error_budget' + example: 25 + description: for backward compability + size: + type: number + example: 25 + searchAfter: + type: array + items: + type: string + example: + - some-slo-id + - other-cursor-id + description: the cursor to provide to get the next paged results + total: + type: number + example: 34 + results: + type: array + items: + $ref: '#/components/schemas/slo_with_summary_response' delete_slo_instances_request: title: Delete SLO instances request description: | @@ -1457,3 +1971,59 @@ components: description: The SLO instance identifier type: string example: 8853df00-ae2e-11ed-90af-09bb6422b258 + bulk_delete_request: + title: Bulk delete SLO request + description: | + The bulk delete SLO request takes a list of SLOs Definition id to delete. + type: object + required: + - list + properties: + list: + description: An array of SLO Definition id + type: array + items: + type: string + example: 8853df00-ae2e-11ed-90af-09bb6422b258 + description: The SLO Definition id + bulk_delete_response: + title: Bulk delete SLO response + description: | + The bulk delete SLO response returns a taskId that can be used to poll for its status + type: object + properties: + taskId: + type: string + example: d08506b7-f0e8-4f8b-a06a-a83940f4db91 + description: The taskId of the bulk delete operation + bulk_delete_status_response: + title: The status of the bulk deletion + description: Indicates if the bulk deletion is completed, with the detailed results of the operation. + type: object + properties: + isDone: + type: boolean + example: true + description: Indicates if the bulk deletion operation is completed + error: + type: string + example: Task not found + description: The error message if the bulk deletion operation failed + results: + description: The results of the bulk deletion operation, including the success status and any errors for each SLO + type: array + items: + type: object + properties: + id: + type: string + example: d08506b7-f0e8-4f8b-a06a-a83940f4db91 + description: The ID of the SLO that was deleted + success: + type: boolean + example: true + description: The result of the deletion operation for this SLO + error: + type: string + example: SLO [d08506b7-f0e8-4f8b-a06a-a83940f4db91] not found + description: The error message if the deletion operation failed for this SLO diff --git a/generated/slo/.openapi-generator/FILES b/generated/slo/.openapi-generator/FILES index 9145efdc6..f5fea0d26 100644 --- a/generated/slo/.openapi-generator/FILES +++ b/generated/slo/.openapi-generator/FILES @@ -7,15 +7,28 @@ api_slo.go client.go configuration.go docs/BudgetingMethod.md +docs/BulkDeleteRequest.md +docs/BulkDeleteResponse.md +docs/BulkDeleteStatusResponse.md +docs/BulkDeleteStatusResponseResultsInner.md +docs/BulkPurgeRollupRequest.md +docs/BulkPurgeRollupRequestPurgePolicy.md +docs/BulkPurgeRollupRequestPurgePolicyOneOf.md +docs/BulkPurgeRollupRequestPurgePolicyOneOf1.md +docs/BulkPurgeRollupResponse.md docs/CreateSloRequest.md docs/CreateSloRequestIndicator.md docs/CreateSloResponse.md docs/DeleteSloInstancesRequest.md docs/DeleteSloInstancesRequestListInner.md docs/ErrorBudget.md +docs/Filter.md +docs/FilterMeta.md +docs/FindSloDefinitionsResponse.md +docs/FindSloDefinitionsResponseOneOf.md +docs/FindSloDefinitionsResponseOneOf1.md docs/FindSloResponse.md -docs/HistoricalSummaryRequest.md -docs/HistoricalSummaryResponseInner.md +docs/GroupBy.md docs/IndicatorPropertiesApmAvailability.md docs/IndicatorPropertiesApmAvailabilityParams.md docs/IndicatorPropertiesApmLatency.md @@ -26,8 +39,9 @@ docs/IndicatorPropertiesCustomMetric.md docs/IndicatorPropertiesCustomMetricParams.md docs/IndicatorPropertiesCustomMetricParamsGood.md docs/IndicatorPropertiesCustomMetricParamsGoodMetricsInner.md +docs/IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf.md +docs/IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1.md docs/IndicatorPropertiesCustomMetricParamsTotal.md -docs/IndicatorPropertiesCustomMetricParamsTotalMetricsInner.md docs/IndicatorPropertiesHistogram.md docs/IndicatorPropertiesHistogramParams.md docs/IndicatorPropertiesHistogramParamsGood.md @@ -36,6 +50,10 @@ docs/IndicatorPropertiesTimesliceMetric.md docs/IndicatorPropertiesTimesliceMetricParams.md docs/IndicatorPropertiesTimesliceMetricParamsMetric.md docs/IndicatorPropertiesTimesliceMetricParamsMetricMetricsInner.md +docs/KqlWithFilters.md +docs/KqlWithFiltersGood.md +docs/KqlWithFiltersOneOf.md +docs/KqlWithFiltersTotal.md docs/Model400Response.md docs/Model401Response.md docs/Model403Response.md @@ -44,9 +62,9 @@ docs/Model409Response.md docs/Objective.md docs/Settings.md docs/SloAPI.md -docs/SloResponse.md -docs/SloResponseGroupBy.md -docs/SloResponseIndicator.md +docs/SloDefinitionResponse.md +docs/SloWithSummaryResponse.md +docs/SloWithSummaryResponseIndicator.md docs/Summary.md docs/SummaryStatus.md docs/TimeWindow.md @@ -63,15 +81,28 @@ model_403_response.go model_404_response.go model_409_response.go model_budgeting_method.go +model_bulk_delete_request.go +model_bulk_delete_response.go +model_bulk_delete_status_response.go +model_bulk_delete_status_response_results_inner.go +model_bulk_purge_rollup_request.go +model_bulk_purge_rollup_request_purge_policy.go +model_bulk_purge_rollup_request_purge_policy_one_of.go +model_bulk_purge_rollup_request_purge_policy_one_of_1.go +model_bulk_purge_rollup_response.go model_create_slo_request.go model_create_slo_request_indicator.go model_create_slo_response.go model_delete_slo_instances_request.go model_delete_slo_instances_request_list_inner.go model_error_budget.go +model_filter.go +model_filter_meta.go +model_find_slo_definitions_response.go +model_find_slo_definitions_response_one_of.go +model_find_slo_definitions_response_one_of_1.go model_find_slo_response.go -model_historical_summary_request.go -model_historical_summary_response_inner.go +model_group_by.go model_indicator_properties_apm_availability.go model_indicator_properties_apm_availability_params.go model_indicator_properties_apm_latency.go @@ -82,8 +113,9 @@ model_indicator_properties_custom_metric.go model_indicator_properties_custom_metric_params.go model_indicator_properties_custom_metric_params_good.go model_indicator_properties_custom_metric_params_good_metrics_inner.go +model_indicator_properties_custom_metric_params_good_metrics_inner_one_of.go +model_indicator_properties_custom_metric_params_good_metrics_inner_one_of_1.go model_indicator_properties_custom_metric_params_total.go -model_indicator_properties_custom_metric_params_total_metrics_inner.go model_indicator_properties_histogram.go model_indicator_properties_histogram_params.go model_indicator_properties_histogram_params_good.go @@ -92,11 +124,15 @@ model_indicator_properties_timeslice_metric.go model_indicator_properties_timeslice_metric_params.go model_indicator_properties_timeslice_metric_params_metric.go model_indicator_properties_timeslice_metric_params_metric_metrics_inner.go +model_kql_with_filters.go +model_kql_with_filters_good.go +model_kql_with_filters_one_of.go +model_kql_with_filters_total.go model_objective.go model_settings.go -model_slo_response.go -model_slo_response_group_by.go -model_slo_response_indicator.go +model_slo_definition_response.go +model_slo_with_summary_response.go +model_slo_with_summary_response_indicator.go model_summary.go model_summary_status.go model_time_window.go diff --git a/generated/slo/README.md b/generated/slo/README.md index 261fc2d0e..39ff76713 100644 --- a/generated/slo/README.md +++ b/generated/slo/README.md @@ -5,7 +5,7 @@ OpenAPI schema for SLOs endpoints ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. -- API version: 1.0 +- API version: 1.1 - Package version: 1.0.0 - Build package: org.openapitools.codegen.languages.GoClientCodegen @@ -73,33 +73,50 @@ ctx = context.WithValue(context.Background(), slo.ContextOperationServerVariable ## Documentation for API Endpoints -All URIs are relative to *http://localhost:5601* +All URIs are relative to *https://localhost:5601* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*SloAPI* | [**CreateSloOp**](docs/SloAPI.md#createsloop) | **Post** /s/{spaceId}/api/observability/slos | Creates an SLO. -*SloAPI* | [**DeleteSloInstancesOp**](docs/SloAPI.md#deletesloinstancesop) | **Post** /s/{spaceId}/api/observability/slos/_delete_instances | Batch delete rollup and summary data for the matching list of sloId and instanceId -*SloAPI* | [**DeleteSloOp**](docs/SloAPI.md#deletesloop) | **Delete** /s/{spaceId}/api/observability/slos/{sloId} | Deletes an SLO -*SloAPI* | [**DisableSloOp**](docs/SloAPI.md#disablesloop) | **Post** /s/{spaceId}/api/observability/slos/{sloId}/disable | Disables an SLO -*SloAPI* | [**EnableSloOp**](docs/SloAPI.md#enablesloop) | **Post** /s/{spaceId}/api/observability/slos/{sloId}/enable | Enables an SLO -*SloAPI* | [**FindSlosOp**](docs/SloAPI.md#findslosop) | **Get** /s/{spaceId}/api/observability/slos | Retrieves a paginated list of SLOs -*SloAPI* | [**GetSloOp**](docs/SloAPI.md#getsloop) | **Get** /s/{spaceId}/api/observability/slos/{sloId} | Retrieves a SLO -*SloAPI* | [**HistoricalSummaryOp**](docs/SloAPI.md#historicalsummaryop) | **Post** /s/{spaceId}/internal/observability/slos/_historical_summary | Retrieves the historical summary for a list of SLOs -*SloAPI* | [**UpdateSloOp**](docs/SloAPI.md#updatesloop) | **Put** /s/{spaceId}/api/observability/slos/{sloId} | Updates an SLO +*SloAPI* | [**BulkDeleteOp**](docs/SloAPI.md#bulkdeleteop) | **Post** /s/{spaceId}/api/observability/slos/_bulk_delete | Bulk delete SLO definitions and their associated summary and rollup data. +*SloAPI* | [**BulkDeleteStatusOp**](docs/SloAPI.md#bulkdeletestatusop) | **Get** /s/{spaceId}/api/observability/slos/_bulk_delete/{taskId} | Retrieve the status of the bulk deletion +*SloAPI* | [**CreateSloOp**](docs/SloAPI.md#createsloop) | **Post** /s/{spaceId}/api/observability/slos | Create an SLO +*SloAPI* | [**DeleteRollupDataOp**](docs/SloAPI.md#deleterollupdataop) | **Post** /s/{spaceId}/api/observability/slos/_bulk_purge_rollup | Batch delete rollup and summary data +*SloAPI* | [**DeleteSloInstancesOp**](docs/SloAPI.md#deletesloinstancesop) | **Post** /s/{spaceId}/api/observability/slos/_delete_instances | Batch delete rollup and summary data +*SloAPI* | [**DeleteSloOp**](docs/SloAPI.md#deletesloop) | **Delete** /s/{spaceId}/api/observability/slos/{sloId} | Delete an SLO +*SloAPI* | [**DisableSloOp**](docs/SloAPI.md#disablesloop) | **Post** /s/{spaceId}/api/observability/slos/{sloId}/disable | Disable an SLO +*SloAPI* | [**EnableSloOp**](docs/SloAPI.md#enablesloop) | **Post** /s/{spaceId}/api/observability/slos/{sloId}/enable | Enable an SLO +*SloAPI* | [**FindSlosOp**](docs/SloAPI.md#findslosop) | **Get** /s/{spaceId}/api/observability/slos | Get a paginated list of SLOs +*SloAPI* | [**GetDefinitionsOp**](docs/SloAPI.md#getdefinitionsop) | **Get** /s/{spaceId}/internal/observability/slos/_definitions | Get the SLO definitions +*SloAPI* | [**GetSloOp**](docs/SloAPI.md#getsloop) | **Get** /s/{spaceId}/api/observability/slos/{sloId} | Get an SLO +*SloAPI* | [**ResetSloOp**](docs/SloAPI.md#resetsloop) | **Post** /s/{spaceId}/api/observability/slos/{sloId}/_reset | Reset an SLO +*SloAPI* | [**UpdateSloOp**](docs/SloAPI.md#updatesloop) | **Put** /s/{spaceId}/api/observability/slos/{sloId} | Update an SLO ## Documentation For Models - [BudgetingMethod](docs/BudgetingMethod.md) + - [BulkDeleteRequest](docs/BulkDeleteRequest.md) + - [BulkDeleteResponse](docs/BulkDeleteResponse.md) + - [BulkDeleteStatusResponse](docs/BulkDeleteStatusResponse.md) + - [BulkDeleteStatusResponseResultsInner](docs/BulkDeleteStatusResponseResultsInner.md) + - [BulkPurgeRollupRequest](docs/BulkPurgeRollupRequest.md) + - [BulkPurgeRollupRequestPurgePolicy](docs/BulkPurgeRollupRequestPurgePolicy.md) + - [BulkPurgeRollupRequestPurgePolicyOneOf](docs/BulkPurgeRollupRequestPurgePolicyOneOf.md) + - [BulkPurgeRollupRequestPurgePolicyOneOf1](docs/BulkPurgeRollupRequestPurgePolicyOneOf1.md) + - [BulkPurgeRollupResponse](docs/BulkPurgeRollupResponse.md) - [CreateSloRequest](docs/CreateSloRequest.md) - [CreateSloRequestIndicator](docs/CreateSloRequestIndicator.md) - [CreateSloResponse](docs/CreateSloResponse.md) - [DeleteSloInstancesRequest](docs/DeleteSloInstancesRequest.md) - [DeleteSloInstancesRequestListInner](docs/DeleteSloInstancesRequestListInner.md) - [ErrorBudget](docs/ErrorBudget.md) + - [Filter](docs/Filter.md) + - [FilterMeta](docs/FilterMeta.md) + - [FindSloDefinitionsResponse](docs/FindSloDefinitionsResponse.md) + - [FindSloDefinitionsResponseOneOf](docs/FindSloDefinitionsResponseOneOf.md) + - [FindSloDefinitionsResponseOneOf1](docs/FindSloDefinitionsResponseOneOf1.md) - [FindSloResponse](docs/FindSloResponse.md) - - [HistoricalSummaryRequest](docs/HistoricalSummaryRequest.md) - - [HistoricalSummaryResponseInner](docs/HistoricalSummaryResponseInner.md) + - [GroupBy](docs/GroupBy.md) - [IndicatorPropertiesApmAvailability](docs/IndicatorPropertiesApmAvailability.md) - [IndicatorPropertiesApmAvailabilityParams](docs/IndicatorPropertiesApmAvailabilityParams.md) - [IndicatorPropertiesApmLatency](docs/IndicatorPropertiesApmLatency.md) @@ -110,8 +127,9 @@ Class | Method | HTTP request | Description - [IndicatorPropertiesCustomMetricParams](docs/IndicatorPropertiesCustomMetricParams.md) - [IndicatorPropertiesCustomMetricParamsGood](docs/IndicatorPropertiesCustomMetricParamsGood.md) - [IndicatorPropertiesCustomMetricParamsGoodMetricsInner](docs/IndicatorPropertiesCustomMetricParamsGoodMetricsInner.md) + - [IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf](docs/IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf.md) + - [IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1](docs/IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1.md) - [IndicatorPropertiesCustomMetricParamsTotal](docs/IndicatorPropertiesCustomMetricParamsTotal.md) - - [IndicatorPropertiesCustomMetricParamsTotalMetricsInner](docs/IndicatorPropertiesCustomMetricParamsTotalMetricsInner.md) - [IndicatorPropertiesHistogram](docs/IndicatorPropertiesHistogram.md) - [IndicatorPropertiesHistogramParams](docs/IndicatorPropertiesHistogramParams.md) - [IndicatorPropertiesHistogramParamsGood](docs/IndicatorPropertiesHistogramParamsGood.md) @@ -120,6 +138,10 @@ Class | Method | HTTP request | Description - [IndicatorPropertiesTimesliceMetricParams](docs/IndicatorPropertiesTimesliceMetricParams.md) - [IndicatorPropertiesTimesliceMetricParamsMetric](docs/IndicatorPropertiesTimesliceMetricParamsMetric.md) - [IndicatorPropertiesTimesliceMetricParamsMetricMetricsInner](docs/IndicatorPropertiesTimesliceMetricParamsMetricMetricsInner.md) + - [KqlWithFilters](docs/KqlWithFilters.md) + - [KqlWithFiltersGood](docs/KqlWithFiltersGood.md) + - [KqlWithFiltersOneOf](docs/KqlWithFiltersOneOf.md) + - [KqlWithFiltersTotal](docs/KqlWithFiltersTotal.md) - [Model400Response](docs/Model400Response.md) - [Model401Response](docs/Model401Response.md) - [Model403Response](docs/Model403Response.md) @@ -127,9 +149,9 @@ Class | Method | HTTP request | Description - [Model409Response](docs/Model409Response.md) - [Objective](docs/Objective.md) - [Settings](docs/Settings.md) - - [SloResponse](docs/SloResponse.md) - - [SloResponseGroupBy](docs/SloResponseGroupBy.md) - - [SloResponseIndicator](docs/SloResponseIndicator.md) + - [SloDefinitionResponse](docs/SloDefinitionResponse.md) + - [SloWithSummaryResponse](docs/SloWithSummaryResponse.md) + - [SloWithSummaryResponseIndicator](docs/SloWithSummaryResponseIndicator.md) - [Summary](docs/Summary.md) - [SummaryStatus](docs/SummaryStatus.md) - [TimeWindow](docs/TimeWindow.md) @@ -141,42 +163,7 @@ Class | Method | HTTP request | Description ## Documentation For Authorization - -Authentication schemes defined for the API: -### basicAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - -### apiKeyAuth - -- **Type**: API key -- **API key parameter name**: Authorization -- **Location**: HTTP header - -Note, each API key must be added to a map of `map[string]APIKey` where the key is: Authorization and passed in as the auth context for each request. - -Example - -```golang -auth := context.WithValue( - context.Background(), - sw.ContextAPIKeys, - map[string]sw.APIKey{ - "Authorization": {Key: "API_KEY_STRING"}, - }, - ) -r, err := client.Service.Operation(auth, args) -``` +Endpoints do not require authorization. ## Documentation for Utility Methods diff --git a/generated/slo/api/openapi.yaml b/generated/slo/api/openapi.yaml index 6533b9907..e91fef9ff 100644 --- a/generated/slo/api/openapi.yaml +++ b/generated/slo/api/openapi.yaml @@ -7,13 +7,12 @@ info: name: Elastic License 2.0 url: https://www.elastic.co/licensing/elastic-license title: SLOs - version: "1.0" + version: "1.1" servers: -- description: local - url: http://localhost:5601 -security: -- basicAuth: [] -- apiKeyAuth: [] +- url: "https://{kibana_url}" + variables: + kibana_url: + default: localhost:5601 tags: - description: "SLO APIs enable you to define, manage and track service-level objectives" name: slo @@ -51,7 +50,30 @@ paths: schema: type: string style: form - - description: The page number to return + - description: "The page size to use for cursor-based pagination, must be greater\ + \ or equal than 1" + example: 1 + explode: true + in: query + name: size + required: false + schema: + default: 1 + type: integer + style: form + - description: "The cursor to use for fetching the results from, when using\ + \ a cursor-base pagination." + explode: true + in: query + name: searchAfter + required: false + schema: + items: + type: string + type: array + style: form + - description: "The page to use for pagination, must be greater or equal than\ + \ 1" example: 1 explode: true in: query @@ -61,7 +83,7 @@ paths: default: 1 type: integer style: form - - description: The number of SLOs to return per page + - description: Number of SLOs returned by page example: 25 explode: true in: query @@ -100,6 +122,15 @@ paths: - desc type: string style: form + - description: Hide stale SLOs from the list as defined by stale SLO threshold + in SLO settings + explode: true + in: query + name: hideStale + required: false + schema: + type: boolean + style: form responses: "200": content: @@ -131,7 +162,7 @@ paths: schema: $ref: '#/components/schemas/404_response' description: Not found response - summary: Retrieves a paginated list of SLOs + summary: Get a paginated list of SLOs tags: - slo post: @@ -194,9 +225,7 @@ paths: schema: $ref: '#/components/schemas/409_response' description: Conflict - The SLO id already exists - servers: - - url: https://localhost:5601 - summary: Creates an SLO. + summary: Create an SLO tags: - slo /s/{spaceId}/api/observability/slos/{sloId}: @@ -259,7 +288,7 @@ paths: schema: $ref: '#/components/schemas/404_response' description: Not found response - summary: Deletes an SLO + summary: Delete an SLO tags: - slo get: @@ -308,7 +337,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/slo_response' + $ref: '#/components/schemas/slo_with_summary_response' description: Successful request "400": content: @@ -334,7 +363,7 @@ paths: schema: $ref: '#/components/schemas/404_response' description: Not found response - summary: Retrieves a SLO + summary: Get an SLO tags: - slo put: @@ -380,7 +409,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/slo_response' + $ref: '#/components/schemas/slo_definition_response' description: Successful request "400": content: @@ -406,7 +435,7 @@ paths: schema: $ref: '#/components/schemas/404_response' description: Not found response - summary: Updates an SLO + summary: Update an SLO tags: - slo /s/{spaceId}/api/observability/slos/{sloId}/enable: @@ -469,7 +498,7 @@ paths: schema: $ref: '#/components/schemas/404_response' description: Not found response - summary: Enables an SLO + summary: Enable an SLO tags: - slo /s/{spaceId}/api/observability/slos/{sloId}/disable: @@ -478,6 +507,69 @@ paths: You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. operationId: disableSloOp parameters: + - description: Cross-site request forgery protection + explode: false + in: header + name: kbn-xsrf + required: true + schema: + type: string + style: simple + - description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." + explode: false + in: path + name: spaceId + required: true + schema: + example: default + type: string + style: simple + - description: An identifier for the slo. + explode: false + in: path + name: sloId + required: true + schema: + example: 9c235211-6834-11ea-a78c-6feb38a34414 + type: string + style: simple + responses: + "204": + description: Successful request + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' + description: Bad request + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + description: Unauthorized response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/403_response' + description: Unauthorized response + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/404_response' + description: Not found response + summary: Disable an SLO + tags: + - slo + /s/{spaceId}/api/observability/slos/{sloId}/_reset: + post: + description: | + You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. + operationId: resetSloOp + parameters: - description: Cross-site request forgery protection explode: false in: header @@ -507,6 +599,10 @@ paths: style: simple responses: "200": + content: + application/json: + schema: + $ref: '#/components/schemas/slo_definition_response' description: Successful request "400": content: @@ -532,14 +628,14 @@ paths: schema: $ref: '#/components/schemas/404_response' description: Not found response - summary: Disables an SLO + summary: Reset an SLO tags: - slo - /s/{spaceId}/internal/observability/slos/_historical_summary: + /s/{spaceId}/api/observability/slos/_bulk_purge_rollup: post: description: | - You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. - operationId: historicalSummaryOp + The deletion occurs for the specified list of `sloId`. You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. + operationId: deleteRollupDataOp parameters: - description: Cross-site request forgery protection explode: false @@ -563,14 +659,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/historical_summary_request' + $ref: '#/components/schemas/bulk_purge_rollup_request' required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/historical_summary_response' + $ref: '#/components/schemas/bulk_purge_rollup_response' description: Successful request "400": content: @@ -590,13 +686,112 @@ paths: schema: $ref: '#/components/schemas/403_response' description: Unauthorized response - summary: Retrieves the historical summary for a list of SLOs + summary: Batch delete rollup and summary data + tags: + - slo + /s/{spaceId}/internal/observability/slos/_definitions: + get: + description: | + You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. + operationId: getDefinitionsOp + parameters: + - description: Cross-site request forgery protection + explode: false + in: header + name: kbn-xsrf + required: true + schema: + type: string + style: simple + - description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." + explode: false + in: path + name: spaceId + required: true + schema: + example: default + type: string + style: simple + - description: Indicates if the API returns only outdated SLO or all SLO definitions + example: true + explode: true + in: query + name: includeOutdatedOnly + required: false + schema: + type: boolean + style: form + - description: Filters the SLOs by tag + explode: true + in: query + name: tags + required: false + schema: + type: string + style: form + - description: Filters the SLOs by name + example: my service availability + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: "The page to use for pagination, must be greater or equal than\ + \ 1" + example: 1 + explode: true + in: query + name: page + required: false + schema: + type: number + style: form + - description: Number of SLOs returned by page + example: 100 + explode: true + in: query + name: perPage + required: false + schema: + default: 100 + maximum: 1000 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/find_slo_definitions_response' + description: Successful request + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' + description: Bad request + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + description: Unauthorized response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/403_response' + description: Unauthorized response + summary: Get the SLO definitions tags: - slo /s/{spaceId}/api/observability/slos/_delete_instances: post: description: | - You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. + The deletion occurs for the specified list of `sloId` and `instanceId`. You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. operationId: deleteSloInstancesOp parameters: - description: Cross-site request forgery protection @@ -644,10 +839,127 @@ paths: schema: $ref: '#/components/schemas/403_response' description: Unauthorized response - servers: - - url: https://localhost:5601 - summary: Batch delete rollup and summary data for the matching list of sloId - and instanceId + summary: Batch delete rollup and summary data + tags: + - slo + /s/{spaceId}/api/observability/slos/_bulk_delete: + post: + description: | + Bulk delete SLO definitions and their associated summary and rollup data. This endpoint initiates a bulk deletion operation for SLOs, which may take some time to complete. The status of the operation can be checked using the `GET /api/slo/_bulk_delete/{taskId}` endpoint. + operationId: bulkDeleteOp + parameters: + - description: Cross-site request forgery protection + explode: false + in: header + name: kbn-xsrf + required: true + schema: + type: string + style: simple + - description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." + explode: false + in: path + name: spaceId + required: true + schema: + example: default + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/bulk_delete_request' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/bulk_delete_response' + description: Successful response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' + description: Bad request + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + description: Unauthorized response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/403_response' + description: Unauthorized response + summary: Bulk delete SLO definitions and their associated summary and rollup + data. + tags: + - slo + /s/{spaceId}/api/observability/slos/_bulk_delete/{taskId}: + get: + description: | + Retrieve the status of the bulk deletion operation for SLOs. This endpoint returns the status of the bulk deletion operation, including whether it is completed and the results of the operation. + operationId: bulkDeleteStatusOp + parameters: + - description: Cross-site request forgery protection + explode: false + in: header + name: kbn-xsrf + required: true + schema: + type: string + style: simple + - description: "An identifier for the space. If `/s/` and the identifier are\ + \ omitted from the path, the default space is used." + explode: false + in: path + name: spaceId + required: true + schema: + example: default + type: string + style: simple + - description: The task id of the bulk delete operation + explode: false + in: path + name: taskId + required: true + schema: + example: 8853df00-ae2e-11ed-90af-09bb6422b258 + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/bulk_delete_status_response' + description: Successful response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/400_response' + description: Bad request + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/401_response' + description: Unauthorized response + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/403_response' + description: Unauthorized response + summary: Retrieve the status of the bulk deletion tags: - slo components: @@ -697,8 +1009,71 @@ components: - type title: APM availability type: object + filter_meta: + description: Defines properties for a filter + properties: + alias: + nullable: true + type: string + disabled: + type: boolean + negate: + type: boolean + controlledBy: + type: string + group: + type: string + index: + type: string + isMultiIndex: + type: boolean + type: + type: string + key: + type: string + params: + type: object + value: + type: string + field: + type: string + title: FilterMeta + type: object + filter: + description: Defines properties for a filter + properties: + query: + type: object + meta: + $ref: '#/components/schemas/filter_meta' + title: Filter + type: object + kql_with_filters: + description: Defines properties for a filter + oneOf: + - description: the KQL query to filter the documents with. + example: "field.environment : \"production\" and service.name : \"my-service\"" + type: string + - $ref: '#/components/schemas/kql_with_filters_oneOf' + title: KQL with filters + kql_with_filters_good: + description: The KQL query used to define the good events. + oneOf: + - description: the KQL query to filter the documents with. + example: "request.latency <= 150 and request.status_code : \"2xx\"" + type: string + - $ref: '#/components/schemas/kql_with_filters_oneOf' + title: KQL query for good events + kql_with_filters_total: + description: The KQL query used to define all events. + oneOf: + - description: the KQL query to filter the documents with. + example: "field.environment : \"production\" and service.name : \"my-service\"" + type: string + - $ref: '#/components/schemas/kql_with_filters_oneOf' + title: KQL query for all events indicator_properties_custom_kql: - description: Defines properties for a custom KQL indicator type + description: Defines properties for a custom query indicator type properties: params: $ref: '#/components/schemas/indicator_properties_custom_kql_params' @@ -709,7 +1084,7 @@ components: required: - params - type - title: Custom KQL + title: Custom Query type: object indicator_properties_apm_latency: description: Defines properties for the APM latency indicator type @@ -897,11 +1272,17 @@ components: target: description: the target objective between 0 and 1 excluded example: 0.99 + exclusiveMaximum: true + exclusiveMinimum: true + maximum: 100 + minimum: 0 type: number timesliceTarget: description: the target objective for each slice when using a timeslices budgeting method example: 0.995 + maximum: 100 + minimum: 0 type: number timesliceWindow: description: "the duration of each slice when using a timeslices budgeting\ @@ -915,17 +1296,40 @@ components: settings: description: Defines properties for SLO settings. example: + syncField: event.ingested + preventInitialBackfill: true syncDelay: 5m frequency: 5m properties: + syncField: + description: "The date field that is used to identify new documents in the\ + \ source. It is strongly recommended to use a field that contains the\ + \ ingest timestamp. If you use a different field, you might need to set\ + \ the delay such that it accounts for data transmission delays. When unspecified,\ + \ we use the indicator timestamp field." + example: event.ingested + type: string syncDelay: - description: The synch delay to apply to the transform. Default 1m + default: 1m + description: The time delay in minutes between the current time and the + latest source data time. Increasing the value will delay any alerting. + The default value is 1 minute. The minimum value is 1m and the maximum + is 359m. It should always be greater then source index refresh interval. example: 5m type: string frequency: - description: "Configure how often the transform runs, default 1m" + default: 1m + description: The interval between checks for changes in the source data. + The minimum value is 1m and the maximum is 59m. The default value is 1 + minute. example: 5m type: string + preventInitialBackfill: + default: false + description: "Start aggregating data from the time the SLO is created, instead\ + \ of backfilling data from the beginning of the time window." + example: true + type: boolean title: Settings type: object summary_status: @@ -994,7 +1398,21 @@ components: - status title: Summary type: object - slo_response: + group_by: + description: optional group by field or fields to use to generate an SLO per + distinct value + example: + - - service.name + - service.name + - - service.name + - service.environment + oneOf: + - type: string + - items: + type: string + type: array + title: Group by + slo_with_summary_response: example: indicator: null summary: @@ -1006,13 +1424,20 @@ components: status: HEALTHY sliValue: 0.9836 settings: + syncField: event.ingested + preventInitialBackfill: true syncDelay: 5m frequency: 5m timeWindow: duration: 30d type: rolling description: My SLO description - groupBy: some.field + groupBy: + - - service.name + - service.name + - - service.name + - service.environment + version: 2 enabled: true objective: timesliceWindow: 5m @@ -1042,7 +1467,7 @@ components: example: My SLO description type: string indicator: - $ref: '#/components/schemas/slo_response_indicator' + $ref: '#/components/schemas/slo_with_summary_response_indicator' timeWindow: $ref: '#/components/schemas/time_window' budgetingMethod: @@ -1062,7 +1487,7 @@ components: example: true type: boolean groupBy: - $ref: '#/components/schemas/slo_response_groupBy' + $ref: '#/components/schemas/group_by' instanceId: description: "the value derived from the groupBy field, if present, otherwise\ \ '*'" @@ -1081,6 +1506,10 @@ components: description: The last update date example: 2023-01-12T10:03:19.000Z type: string + version: + description: The internal SLO version + example: 2 + type: number required: - budgetingMethod - createdAt @@ -1098,6 +1527,7 @@ components: - tags - timeWindow - updatedAt + - version title: SLO response type: object find_slo_response: @@ -1106,6 +1536,8 @@ components: example: total: 34 perPage: 25 + size: 25 + searchAfter: searchAfter page: 1 results: - indicator: null @@ -1118,13 +1550,20 @@ components: status: HEALTHY sliValue: 0.9836 settings: + syncField: event.ingested + preventInitialBackfill: true syncDelay: 5m frequency: 5m timeWindow: duration: 30d type: rolling description: My SLO description - groupBy: some.field + groupBy: + - - service.name + - service.name + - - service.name + - service.environment + version: 2 enabled: true objective: timesliceWindow: 5m @@ -1150,13 +1589,20 @@ components: status: HEALTHY sliValue: 0.9836 settings: + syncField: event.ingested + preventInitialBackfill: true syncDelay: 5m frequency: 5m timeWindow: duration: 30d type: rolling description: My SLO description - groupBy: some.field + groupBy: + - - service.name + - service.name + - - service.name + - service.environment + version: 2 enabled: true objective: timesliceWindow: 5m @@ -1173,6 +1619,12 @@ components: budgetingMethod: occurrences updatedAt: 2023-01-12T10:03:19.000Z properties: + size: + description: Size provided for cursor based pagination + example: 25 + type: number + searchAfter: + type: string page: example: 1 type: number @@ -1184,7 +1636,7 @@ components: type: number results: items: - $ref: '#/components/schemas/slo_response' + $ref: '#/components/schemas/slo_with_summary_response' type: array title: Find SLO response type: object @@ -1286,7 +1738,7 @@ components: settings: $ref: '#/components/schemas/settings' groupBy: - $ref: '#/components/schemas/slo_response_groupBy' + $ref: '#/components/schemas/group_by' tags: description: List of tags items: @@ -1350,7 +1802,7 @@ components: settings: $ref: '#/components/schemas/settings' groupBy: - $ref: '#/components/schemas/slo_response_groupBy' + $ref: '#/components/schemas/group_by' tags: description: List of tags items: @@ -1358,24 +1810,143 @@ components: type: array title: Update SLO request type: object - historical_summary_request: + slo_definition_response: + example: + indicator: null + settings: + syncField: event.ingested + preventInitialBackfill: true + syncDelay: 5m + frequency: 5m + timeWindow: + duration: 30d + type: rolling + description: My SLO description + groupBy: + - - service.name + - service.name + - - service.name + - service.environment + version: 2 + enabled: true + objective: + timesliceWindow: 5m + timesliceTarget: 0.995 + target: 0.99 + revision: 2 + tags: + - tags + - tags + createdAt: 2023-01-12T10:03:19.000Z + name: My Service SLO + id: 8853df00-ae2e-11ed-90af-09bb6422b258 + budgetingMethod: occurrences + updatedAt: 2023-01-12T10:03:19.000Z + properties: + id: + description: The identifier of the SLO. + example: 8853df00-ae2e-11ed-90af-09bb6422b258 + type: string + name: + description: The name of the SLO. + example: My Service SLO + type: string + description: + description: The description of the SLO. + example: My SLO description + type: string + indicator: + $ref: '#/components/schemas/slo_with_summary_response_indicator' + timeWindow: + $ref: '#/components/schemas/time_window' + budgetingMethod: + $ref: '#/components/schemas/budgeting_method' + objective: + $ref: '#/components/schemas/objective' + settings: + $ref: '#/components/schemas/settings' + revision: + description: The SLO revision + example: 2 + type: number + enabled: + description: Indicate if the SLO is enabled + example: true + type: boolean + groupBy: + $ref: '#/components/schemas/group_by' + tags: + description: List of tags + items: + type: string + type: array + createdAt: + description: The creation date + example: 2023-01-12T10:03:19.000Z + type: string + updatedAt: + description: The last update date + example: 2023-01-12T10:03:19.000Z + type: string + version: + description: The internal SLO version + example: 2 + type: number + required: + - budgetingMethod + - createdAt + - description + - enabled + - groupBy + - id + - indicator + - name + - objective + - revision + - settings + - tags + - timeWindow + - updatedAt + - version + title: SLO definition response + type: object + bulk_purge_rollup_request: + description: | + The bulk purge rollup data request takes a list of SLO ids and a purge policy, then deletes the rollup data according to the purge policy. This API can be used to remove the staled data of an instance SLO that no longer get updated. properties: list: - description: The list of SLO identifiers to get the historical summary for + description: An array of slo ids items: + description: The SLO Definition id example: 8853df00-ae2e-11ed-90af-09bb6422b258 type: string type: array + purgePolicy: + $ref: '#/components/schemas/bulk_purge_rollup_request_purgePolicy' required: - list - title: Historical summary request + - purgePolicy + title: Bulk Purge Rollup data request type: object - historical_summary_response: - additionalProperties: - items: - $ref: '#/components/schemas/Historical_summary_response_inner' - type: array - title: Historical summary response + bulk_purge_rollup_response: + description: | + The bulk purge rollup data response returns a task id from the elasticsearch deleteByQuery response. + example: + taskId: 8853df00-ae2e-11ed-90af-09bb6422b258 + properties: + taskId: + description: The task id of the purge operation + example: 8853df00-ae2e-11ed-90af-09bb6422b258 + type: string + title: Bulk Purge Rollup data response + type: object + find_slo_definitions_response: + description: | + A paginated response of SLO definitions matching the query. + oneOf: + - $ref: '#/components/schemas/find_slo_definitions_response_oneOf' + - $ref: '#/components/schemas/find_slo_definitions_response_oneOf_1' + title: Find SLO definitions response type: object delete_slo_instances_request: description: | @@ -1390,6 +1961,63 @@ components: - list title: Delete SLO instances request type: object + bulk_delete_request: + description: | + The bulk delete SLO request takes a list of SLOs Definition id to delete. + properties: + list: + description: An array of SLO Definition id + items: + description: The SLO Definition id + example: 8853df00-ae2e-11ed-90af-09bb6422b258 + type: string + type: array + required: + - list + title: Bulk delete SLO request + type: object + bulk_delete_response: + description: | + The bulk delete SLO response returns a taskId that can be used to poll for its status + example: + taskId: d08506b7-f0e8-4f8b-a06a-a83940f4db91 + properties: + taskId: + description: The taskId of the bulk delete operation + example: d08506b7-f0e8-4f8b-a06a-a83940f4db91 + type: string + title: Bulk delete SLO response + type: object + bulk_delete_status_response: + description: "Indicates if the bulk deletion is completed, with the detailed\ + \ results of the operation." + example: + error: Task not found + isDone: true + results: + - success: true + id: d08506b7-f0e8-4f8b-a06a-a83940f4db91 + error: "SLO [d08506b7-f0e8-4f8b-a06a-a83940f4db91] not found" + - success: true + id: d08506b7-f0e8-4f8b-a06a-a83940f4db91 + error: "SLO [d08506b7-f0e8-4f8b-a06a-a83940f4db91] not found" + properties: + isDone: + description: Indicates if the bulk deletion operation is completed + example: true + type: boolean + error: + description: The error message if the bulk deletion operation failed + example: Task not found + type: string + results: + description: "The results of the bulk deletion operation, including the\ + \ success status and any errors for each SLO" + items: + $ref: '#/components/schemas/bulk_delete_status_response_results_inner' + type: array + title: The status of the bulk deletion + type: object indicator_properties_apm_availability_params: description: An object containing the indicator parameters. nullable: false @@ -1425,6 +2053,15 @@ components: - transactionName - transactionType type: object + kql_with_filters_oneOf: + properties: + kqlQuery: + type: string + filters: + items: + $ref: '#/components/schemas/filter' + type: array + type: object indicator_properties_custom_kql_params: description: An object containing the indicator parameters. nullable: false @@ -1433,18 +2070,19 @@ components: description: The index or index pattern to use example: my-service-* type: string - filter: - description: the KQL query to filter the documents with. - example: "field.environment : \"production\" and service.name : \"my-service\"" + dataViewId: + description: "The kibana data view id to use, primarily used to include\ + \ data view runtime mappings. Make sure to save SLO again if you add/update\ + \ run time fields to the data view and if those fields are being used\ + \ in slo queries." + example: 03b80ab3-003d-498b-881c-3beedbaf1162 type: string + filter: + $ref: '#/components/schemas/kql_with_filters' good: - description: the KQL query used to define the good events. - example: "request.latency <= 150 and request.status_code : \"2xx\"" - type: string + $ref: '#/components/schemas/kql_with_filters_good' total: - description: the KQL query used to define all events. - example: "" - type: string + $ref: '#/components/schemas/kql_with_filters_total' timestampField: description: | The timestamp field used in the source indice. @@ -1496,7 +2134,7 @@ components: - transactionName - transactionType type: object - indicator_properties_custom_metric_params_good_metrics_inner: + indicator_properties_custom_metric_params_good_metrics_inner_oneOf: properties: name: description: The name of the metric. Only valid options are A-Z @@ -1504,7 +2142,7 @@ components: pattern: "^[A-Z]$" type: string aggregation: - description: The aggregation type of the metric. Only valid option is "sum" + description: The aggregation type of the metric. enum: - sum example: sum @@ -1515,31 +2153,14 @@ components: type: string filter: description: The filter to apply to the metric. - example: "processor.outcome: \"success\"" + example: "processor.outcome: *" type: string required: - aggregation - field - name type: object - indicator_properties_custom_metric_params_good: - description: | - An object defining the "good" metrics and equation - properties: - metrics: - description: "List of metrics with their name, aggregation type, and field." - items: - $ref: '#/components/schemas/indicator_properties_custom_metric_params_good_metrics_inner' - type: array - equation: - description: The equation to calculate the "good" metric. - example: A - type: string - required: - - equation - - metrics - type: object - indicator_properties_custom_metric_params_total_metrics_inner: + indicator_properties_custom_metric_params_good_metrics_inner_oneOf_1: properties: name: description: The name of the metric. Only valid options are A-Z @@ -1547,14 +2168,10 @@ components: pattern: "^[A-Z]$" type: string aggregation: - description: The aggregation type of the metric. Only valid option is "sum" + description: The aggregation type of the metric. enum: - - sum - example: sum - type: string - field: - description: The field of the metric. - example: processor.processed + - doc_count + example: doc_count type: string filter: description: The filter to apply to the metric. @@ -1562,9 +2179,29 @@ components: type: string required: - aggregation - - field - name type: object + indicator_properties_custom_metric_params_good_metrics_inner: + oneOf: + - $ref: '#/components/schemas/indicator_properties_custom_metric_params_good_metrics_inner_oneOf' + - $ref: '#/components/schemas/indicator_properties_custom_metric_params_good_metrics_inner_oneOf_1' + indicator_properties_custom_metric_params_good: + description: | + An object defining the "good" metrics and equation + properties: + metrics: + description: "List of metrics with their name, aggregation type, and field." + items: + $ref: '#/components/schemas/indicator_properties_custom_metric_params_good_metrics_inner' + type: array + equation: + description: The equation to calculate the "good" metric. + example: A + type: string + required: + - equation + - metrics + type: object indicator_properties_custom_metric_params_total: description: | An object defining the "total" metrics and equation @@ -1572,7 +2209,7 @@ components: metrics: description: "List of metrics with their name, aggregation type, and field." items: - $ref: '#/components/schemas/indicator_properties_custom_metric_params_total_metrics_inner' + $ref: '#/components/schemas/indicator_properties_custom_metric_params_good_metrics_inner' type: array equation: description: The equation to calculate the "total" metric. @@ -1590,6 +2227,13 @@ components: description: The index or index pattern to use example: my-service-* type: string + dataViewId: + description: "The kibana data view id to use, primarily used to include\ + \ data view runtime mappings. Make sure to save SLO again if you add/update\ + \ run time fields to the data view and if those fields are being used\ + \ in slo queries." + example: 03b80ab3-003d-498b-881c-3beedbaf1162 + type: string filter: description: the KQL query to filter the documents with. example: "field.environment : \"production\" and service.name : \"my-service\"" @@ -1681,6 +2325,13 @@ components: description: The index or index pattern to use example: my-service-* type: string + dataViewId: + description: "The kibana data view id to use, primarily used to include\ + \ data view runtime mappings. Make sure to save SLO again if you add/update\ + \ run time fields to the data view and if those fields are being used\ + \ in slo queries." + example: 03b80ab3-003d-498b-881c-3beedbaf1162 + type: string filter: description: the KQL query to filter the documents with. example: "field.environment : \"production\" and service.name : \"my-service\"" @@ -1746,6 +2397,13 @@ components: description: The index or index pattern to use example: my-service-* type: string + dataViewId: + description: "The kibana data view id to use, primarily used to include\ + \ data view runtime mappings. Make sure to save SLO again if you add/update\ + \ run time fields to the data view and if those fields are being used\ + \ in slo queries." + example: 03b80ab3-003d-498b-881c-3beedbaf1162 + type: string filter: description: the KQL query to filter the documents with. example: "field.environment : \"production\" and service.name : \"my-service\"" @@ -1762,7 +2420,7 @@ components: - metric - timestampField type: object - slo_response_indicator: + slo_with_summary_response_indicator: discriminator: mapping: sli.apm.transactionErrorRate: '#/components/schemas/indicator_properties_apm_availability' @@ -1779,15 +2437,6 @@ components: - $ref: '#/components/schemas/indicator_properties_custom_metric' - $ref: '#/components/schemas/indicator_properties_histogram' - $ref: '#/components/schemas/indicator_properties_timeslice_metric' - slo_response_groupBy: - description: optional group by field to use to generate an SLO per distinct - value - example: some.field - oneOf: - - type: string - - items: - type: string - type: array create_slo_request_indicator: oneOf: - $ref: '#/components/schemas/indicator_properties_custom_kql' @@ -1796,18 +2445,86 @@ components: - $ref: '#/components/schemas/indicator_properties_custom_metric' - $ref: '#/components/schemas/indicator_properties_histogram' - $ref: '#/components/schemas/indicator_properties_timeslice_metric' - Historical_summary_response_inner: + bulk_purge_rollup_request_purgePolicy_oneOf: properties: - date: - example: 2022-01-01T00:00:00.000Z + purgeType: + description: Specifies whether documents will be purged based on a specific + age or on a timestamp + enum: + - fixed-age type: string - status: - $ref: '#/components/schemas/summary_status' - sliValue: - example: 0.9836 + age: + description: "The duration to determine which documents to purge, formatted\ + \ as {duration}{unit}. This value should be greater than or equal to the\ + \ time window of every SLO provided." + example: 7d + type: string + type: object + bulk_purge_rollup_request_purgePolicy_oneOf_1: + properties: + purgeType: + description: Specifies whether documents will be purged based on a specific + age or on a timestamp + enum: + - fixed-time + type: string + timestamp: + description: "The timestamp to determine which documents to purge, formatted\ + \ in ISO. This value should be older than the applicable time window of\ + \ every SLO provided." + example: 2024-12-31T00:00:00.000Z + type: string + type: object + bulk_purge_rollup_request_purgePolicy: + description: Policy that dictates which SLI documents to purge based on age + oneOf: + - $ref: '#/components/schemas/bulk_purge_rollup_request_purgePolicy_oneOf' + - $ref: '#/components/schemas/bulk_purge_rollup_request_purgePolicy_oneOf_1' + type: object + find_slo_definitions_response_oneOf: + properties: + page: + example: 1 type: number - errorBudget: - $ref: '#/components/schemas/error_budget' + perPage: + example: 25 + type: number + total: + example: 34 + type: number + results: + items: + $ref: '#/components/schemas/slo_with_summary_response' + type: array + type: object + find_slo_definitions_response_oneOf_1: + properties: + page: + default: 1 + description: for backward compability + type: number + perPage: + description: for backward compability + example: 25 + type: number + size: + example: 25 + type: number + searchAfter: + description: the cursor to provide to get the next paged results + example: + - some-slo-id + - other-cursor-id + items: + type: string + type: array + total: + example: 34 + type: number + results: + items: + $ref: '#/components/schemas/slo_with_summary_response' + type: array type: object delete_slo_instances_request_list_inner: properties: @@ -1823,12 +2540,23 @@ components: - instanceId - sloId type: object - securitySchemes: - basicAuth: - scheme: basic - type: http - apiKeyAuth: - description: "e.g. Authorization: ApiKey base64AccessApiKey" - in: header - name: Authorization - type: apiKey + bulk_delete_status_response_results_inner: + example: + success: true + id: d08506b7-f0e8-4f8b-a06a-a83940f4db91 + error: "SLO [d08506b7-f0e8-4f8b-a06a-a83940f4db91] not found" + properties: + id: + description: The ID of the SLO that was deleted + example: d08506b7-f0e8-4f8b-a06a-a83940f4db91 + type: string + success: + description: The result of the deletion operation for this SLO + example: true + type: boolean + error: + description: The error message if the deletion operation failed for this + SLO + example: "SLO [d08506b7-f0e8-4f8b-a06a-a83940f4db91] not found" + type: string + type: object diff --git a/generated/slo/api_slo.go b/generated/slo/api_slo.go index d4340c8c7..8c1b0e7b2 100644 --- a/generated/slo/api_slo.go +++ b/generated/slo/api_slo.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -16,13 +16,47 @@ import ( "io" "net/http" "net/url" + "reflect" "strings" ) type SloAPI interface { /* - CreateSloOp Creates an SLO. + BulkDeleteOp Bulk delete SLO definitions and their associated summary and rollup data. + + Bulk delete SLO definitions and their associated summary and rollup data. This endpoint initiates a bulk deletion operation for SLOs, which may take some time to complete. The status of the operation can be checked using the `GET /api/slo/_bulk_delete/{taskId}` endpoint. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiBulkDeleteOpRequest + */ + BulkDeleteOp(ctx context.Context, spaceId string) ApiBulkDeleteOpRequest + + // BulkDeleteOpExecute executes the request + // @return BulkDeleteResponse + BulkDeleteOpExecute(r ApiBulkDeleteOpRequest) (*BulkDeleteResponse, *http.Response, error) + + /* + BulkDeleteStatusOp Retrieve the status of the bulk deletion + + Retrieve the status of the bulk deletion operation for SLOs. This endpoint returns the status of the bulk deletion operation, including whether it is completed and the results of the operation. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @param taskId The task id of the bulk delete operation + @return ApiBulkDeleteStatusOpRequest + */ + BulkDeleteStatusOp(ctx context.Context, spaceId string, taskId string) ApiBulkDeleteStatusOpRequest + + // BulkDeleteStatusOpExecute executes the request + // @return BulkDeleteStatusResponse + BulkDeleteStatusOpExecute(r ApiBulkDeleteStatusOpRequest) (*BulkDeleteStatusResponse, *http.Response, error) + + /* + CreateSloOp Create an SLO You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @@ -38,9 +72,25 @@ type SloAPI interface { CreateSloOpExecute(r ApiCreateSloOpRequest) (*CreateSloResponse, *http.Response, error) /* - DeleteSloInstancesOp Batch delete rollup and summary data for the matching list of sloId and instanceId + DeleteRollupDataOp Batch delete rollup and summary data - You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. + The deletion occurs for the specified list of `sloId`. You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiDeleteRollupDataOpRequest + */ + DeleteRollupDataOp(ctx context.Context, spaceId string) ApiDeleteRollupDataOpRequest + + // DeleteRollupDataOpExecute executes the request + // @return BulkPurgeRollupResponse + DeleteRollupDataOpExecute(r ApiDeleteRollupDataOpRequest) (*BulkPurgeRollupResponse, *http.Response, error) + + /* + DeleteSloInstancesOp Batch delete rollup and summary data + + The deletion occurs for the specified list of `sloId` and `instanceId`. You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -53,7 +103,7 @@ type SloAPI interface { DeleteSloInstancesOpExecute(r ApiDeleteSloInstancesOpRequest) (*http.Response, error) /* - DeleteSloOp Deletes an SLO + DeleteSloOp Delete an SLO You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @@ -69,7 +119,7 @@ type SloAPI interface { DeleteSloOpExecute(r ApiDeleteSloOpRequest) (*http.Response, error) /* - DisableSloOp Disables an SLO + DisableSloOp Disable an SLO You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @@ -85,7 +135,7 @@ type SloAPI interface { DisableSloOpExecute(r ApiDisableSloOpRequest) (*http.Response, error) /* - EnableSloOp Enables an SLO + EnableSloOp Enable an SLO You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @@ -101,7 +151,7 @@ type SloAPI interface { EnableSloOpExecute(r ApiEnableSloOpRequest) (*http.Response, error) /* - FindSlosOp Retrieves a paginated list of SLOs + FindSlosOp Get a paginated list of SLOs You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @@ -117,7 +167,23 @@ type SloAPI interface { FindSlosOpExecute(r ApiFindSlosOpRequest) (*FindSloResponse, *http.Response, error) /* - GetSloOp Retrieves a SLO + GetDefinitionsOp Get the SLO definitions + + You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. + + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiGetDefinitionsOpRequest + */ + GetDefinitionsOp(ctx context.Context, spaceId string) ApiGetDefinitionsOpRequest + + // GetDefinitionsOpExecute executes the request + // @return FindSloDefinitionsResponse + GetDefinitionsOpExecute(r ApiGetDefinitionsOpRequest) (*FindSloDefinitionsResponse, *http.Response, error) + + /* + GetSloOp Get an SLO You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @@ -130,27 +196,28 @@ type SloAPI interface { GetSloOp(ctx context.Context, spaceId string, sloId string) ApiGetSloOpRequest // GetSloOpExecute executes the request - // @return SloResponse - GetSloOpExecute(r ApiGetSloOpRequest) (*SloResponse, *http.Response, error) + // @return SloWithSummaryResponse + GetSloOpExecute(r ApiGetSloOpRequest) (*SloWithSummaryResponse, *http.Response, error) /* - HistoricalSummaryOp Retrieves the historical summary for a list of SLOs + ResetSloOp Reset an SLO - You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. + You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiHistoricalSummaryOpRequest + @param sloId An identifier for the slo. + @return ApiResetSloOpRequest */ - HistoricalSummaryOp(ctx context.Context, spaceId string) ApiHistoricalSummaryOpRequest + ResetSloOp(ctx context.Context, spaceId string, sloId string) ApiResetSloOpRequest - // HistoricalSummaryOpExecute executes the request - // @return map[string][]HistoricalSummaryResponseInner - HistoricalSummaryOpExecute(r ApiHistoricalSummaryOpRequest) (*map[string][]HistoricalSummaryResponseInner, *http.Response, error) + // ResetSloOpExecute executes the request + // @return SloDefinitionResponse + ResetSloOpExecute(r ApiResetSloOpRequest) (*SloDefinitionResponse, *http.Response, error) /* - UpdateSloOp Updates an SLO + UpdateSloOp Update an SLO You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @@ -163,13 +230,322 @@ type SloAPI interface { UpdateSloOp(ctx context.Context, spaceId string, sloId string) ApiUpdateSloOpRequest // UpdateSloOpExecute executes the request - // @return SloResponse - UpdateSloOpExecute(r ApiUpdateSloOpRequest) (*SloResponse, *http.Response, error) + // @return SloDefinitionResponse + UpdateSloOpExecute(r ApiUpdateSloOpRequest) (*SloDefinitionResponse, *http.Response, error) } // SloAPIService SloAPI service type SloAPIService service +type ApiBulkDeleteOpRequest struct { + ctx context.Context + ApiService SloAPI + kbnXsrf *string + spaceId string + bulkDeleteRequest *BulkDeleteRequest +} + +// Cross-site request forgery protection +func (r ApiBulkDeleteOpRequest) KbnXsrf(kbnXsrf string) ApiBulkDeleteOpRequest { + r.kbnXsrf = &kbnXsrf + return r +} + +func (r ApiBulkDeleteOpRequest) BulkDeleteRequest(bulkDeleteRequest BulkDeleteRequest) ApiBulkDeleteOpRequest { + r.bulkDeleteRequest = &bulkDeleteRequest + return r +} + +func (r ApiBulkDeleteOpRequest) Execute() (*BulkDeleteResponse, *http.Response, error) { + return r.ApiService.BulkDeleteOpExecute(r) +} + +/* +BulkDeleteOp Bulk delete SLO definitions and their associated summary and rollup data. + +Bulk delete SLO definitions and their associated summary and rollup data. This endpoint initiates a bulk deletion operation for SLOs, which may take some time to complete. The status of the operation can be checked using the `GET /api/slo/_bulk_delete/{taskId}` endpoint. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiBulkDeleteOpRequest +*/ +func (a *SloAPIService) BulkDeleteOp(ctx context.Context, spaceId string) ApiBulkDeleteOpRequest { + return ApiBulkDeleteOpRequest{ + ApiService: a, + ctx: ctx, + spaceId: spaceId, + } +} + +// Execute executes the request +// +// @return BulkDeleteResponse +func (a *SloAPIService) BulkDeleteOpExecute(r ApiBulkDeleteOpRequest) (*BulkDeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *BulkDeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SloAPIService.BulkDeleteOp") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{spaceId}/api/observability/slos/_bulk_delete" + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.kbnXsrf == nil { + return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified") + } + if r.bulkDeleteRequest == nil { + return localVarReturnValue, nil, reportError("bulkDeleteRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") + // body params + localVarPostBody = r.bulkDeleteRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Model400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Model401Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Model403Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiBulkDeleteStatusOpRequest struct { + ctx context.Context + ApiService SloAPI + kbnXsrf *string + spaceId string + taskId string +} + +// Cross-site request forgery protection +func (r ApiBulkDeleteStatusOpRequest) KbnXsrf(kbnXsrf string) ApiBulkDeleteStatusOpRequest { + r.kbnXsrf = &kbnXsrf + return r +} + +func (r ApiBulkDeleteStatusOpRequest) Execute() (*BulkDeleteStatusResponse, *http.Response, error) { + return r.ApiService.BulkDeleteStatusOpExecute(r) +} + +/* +BulkDeleteStatusOp Retrieve the status of the bulk deletion + +Retrieve the status of the bulk deletion operation for SLOs. This endpoint returns the status of the bulk deletion operation, including whether it is completed and the results of the operation. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @param taskId The task id of the bulk delete operation + @return ApiBulkDeleteStatusOpRequest +*/ +func (a *SloAPIService) BulkDeleteStatusOp(ctx context.Context, spaceId string, taskId string) ApiBulkDeleteStatusOpRequest { + return ApiBulkDeleteStatusOpRequest{ + ApiService: a, + ctx: ctx, + spaceId: spaceId, + taskId: taskId, + } +} + +// Execute executes the request +// +// @return BulkDeleteStatusResponse +func (a *SloAPIService) BulkDeleteStatusOpExecute(r ApiBulkDeleteStatusOpRequest) (*BulkDeleteStatusResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *BulkDeleteStatusResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SloAPIService.BulkDeleteStatusOp") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{spaceId}/api/observability/slos/_bulk_delete/{taskId}" + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"taskId"+"}", url.PathEscape(parameterValueToString(r.taskId, "taskId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.kbnXsrf == nil { + return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Model400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Model401Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Model403Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiCreateSloOpRequest struct { ctx context.Context ApiService SloAPI @@ -184,26 +560,195 @@ func (r ApiCreateSloOpRequest) KbnXsrf(kbnXsrf string) ApiCreateSloOpRequest { return r } -func (r ApiCreateSloOpRequest) CreateSloRequest(createSloRequest CreateSloRequest) ApiCreateSloOpRequest { - r.createSloRequest = &createSloRequest +func (r ApiCreateSloOpRequest) CreateSloRequest(createSloRequest CreateSloRequest) ApiCreateSloOpRequest { + r.createSloRequest = &createSloRequest + return r +} + +func (r ApiCreateSloOpRequest) Execute() (*CreateSloResponse, *http.Response, error) { + return r.ApiService.CreateSloOpExecute(r) +} + +/* +CreateSloOp Create an SLO + +You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiCreateSloOpRequest +*/ +func (a *SloAPIService) CreateSloOp(ctx context.Context, spaceId string) ApiCreateSloOpRequest { + return ApiCreateSloOpRequest{ + ApiService: a, + ctx: ctx, + spaceId: spaceId, + } +} + +// Execute executes the request +// +// @return CreateSloResponse +func (a *SloAPIService) CreateSloOpExecute(r ApiCreateSloOpRequest) (*CreateSloResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateSloResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SloAPIService.CreateSloOp") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{spaceId}/api/observability/slos" + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.kbnXsrf == nil { + return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified") + } + if r.createSloRequest == nil { + return localVarReturnValue, nil, reportError("createSloRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") + // body params + localVarPostBody = r.createSloRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Model400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Model401Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Model403Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v Model409Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteRollupDataOpRequest struct { + ctx context.Context + ApiService SloAPI + kbnXsrf *string + spaceId string + bulkPurgeRollupRequest *BulkPurgeRollupRequest +} + +// Cross-site request forgery protection +func (r ApiDeleteRollupDataOpRequest) KbnXsrf(kbnXsrf string) ApiDeleteRollupDataOpRequest { + r.kbnXsrf = &kbnXsrf + return r +} + +func (r ApiDeleteRollupDataOpRequest) BulkPurgeRollupRequest(bulkPurgeRollupRequest BulkPurgeRollupRequest) ApiDeleteRollupDataOpRequest { + r.bulkPurgeRollupRequest = &bulkPurgeRollupRequest return r } -func (r ApiCreateSloOpRequest) Execute() (*CreateSloResponse, *http.Response, error) { - return r.ApiService.CreateSloOpExecute(r) +func (r ApiDeleteRollupDataOpRequest) Execute() (*BulkPurgeRollupResponse, *http.Response, error) { + return r.ApiService.DeleteRollupDataOpExecute(r) } /* -CreateSloOp Creates an SLO. +DeleteRollupDataOp Batch delete rollup and summary data -You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. +The deletion occurs for the specified list of `sloId`. You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiCreateSloOpRequest + @return ApiDeleteRollupDataOpRequest */ -func (a *SloAPIService) CreateSloOp(ctx context.Context, spaceId string) ApiCreateSloOpRequest { - return ApiCreateSloOpRequest{ +func (a *SloAPIService) DeleteRollupDataOp(ctx context.Context, spaceId string) ApiDeleteRollupDataOpRequest { + return ApiDeleteRollupDataOpRequest{ ApiService: a, ctx: ctx, spaceId: spaceId, @@ -212,21 +757,21 @@ func (a *SloAPIService) CreateSloOp(ctx context.Context, spaceId string) ApiCrea // Execute executes the request // -// @return CreateSloResponse -func (a *SloAPIService) CreateSloOpExecute(r ApiCreateSloOpRequest) (*CreateSloResponse, *http.Response, error) { +// @return BulkPurgeRollupResponse +func (a *SloAPIService) DeleteRollupDataOpExecute(r ApiDeleteRollupDataOpRequest) (*BulkPurgeRollupResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *CreateSloResponse + localVarReturnValue *BulkPurgeRollupResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SloAPIService.CreateSloOp") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SloAPIService.DeleteRollupDataOp") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/s/{spaceId}/api/observability/slos" + localVarPath := localBasePath + "/s/{spaceId}/api/observability/slos/_bulk_purge_rollup" localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) localVarHeaderParams := make(map[string]string) @@ -235,8 +780,8 @@ func (a *SloAPIService) CreateSloOpExecute(r ApiCreateSloOpRequest) (*CreateSloR if r.kbnXsrf == nil { return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified") } - if r.createSloRequest == nil { - return localVarReturnValue, nil, reportError("createSloRequest is required and must be specified") + if r.bulkPurgeRollupRequest == nil { + return localVarReturnValue, nil, reportError("bulkPurgeRollupRequest is required and must be specified") } // to determine the Content-Type header @@ -258,21 +803,7 @@ func (a *SloAPIService) CreateSloOpExecute(r ApiCreateSloOpRequest) (*CreateSloR } parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") // body params - localVarPostBody = r.createSloRequest - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["Authorization"] = key - } - } - } + localVarPostBody = r.bulkPurgeRollupRequest req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -326,17 +857,6 @@ func (a *SloAPIService) CreateSloOpExecute(r ApiCreateSloOpRequest) (*CreateSloR } newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v Model409Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -377,9 +897,9 @@ func (r ApiDeleteSloInstancesOpRequest) Execute() (*http.Response, error) { } /* -DeleteSloInstancesOp Batch delete rollup and summary data for the matching list of sloId and instanceId +DeleteSloInstancesOp Batch delete rollup and summary data -You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. +The deletion occurs for the specified list of `sloId` and `instanceId`. You must have `all` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. @@ -439,20 +959,6 @@ func (a *SloAPIService) DeleteSloInstancesOpExecute(r ApiDeleteSloInstancesOpReq parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") // body params localVarPostBody = r.deleteSloInstancesRequest - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["Authorization"] = key - } - } - } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err @@ -532,7 +1038,7 @@ func (r ApiDeleteSloOpRequest) Execute() (*http.Response, error) { } /* -DeleteSloOp Deletes an SLO +DeleteSloOp Delete an SLO You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @@ -592,20 +1098,6 @@ func (a *SloAPIService) DeleteSloOpExecute(r ApiDeleteSloOpRequest) (*http.Respo localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["Authorization"] = key - } - } - } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err @@ -696,7 +1188,7 @@ func (r ApiDisableSloOpRequest) Execute() (*http.Response, error) { } /* -DisableSloOp Disables an SLO +DisableSloOp Disable an SLO You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @@ -756,20 +1248,6 @@ func (a *SloAPIService) DisableSloOpExecute(r ApiDisableSloOpRequest) (*http.Res localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["Authorization"] = key - } - } - } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err @@ -860,7 +1338,7 @@ func (r ApiEnableSloOpRequest) Execute() (*http.Response, error) { } /* -EnableSloOp Enables an SLO +EnableSloOp Enable an SLO You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @@ -920,20 +1398,6 @@ func (a *SloAPIService) EnableSloOpExecute(r ApiEnableSloOpRequest) (*http.Respo localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["Authorization"] = key - } - } - } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err @@ -1011,10 +1475,13 @@ type ApiFindSlosOpRequest struct { kbnXsrf *string spaceId string kqlQuery *string + size *int32 + searchAfter *[]string page *int32 perPage *int32 sortBy *string sortDirection *string + hideStale *bool } // Cross-site request forgery protection @@ -1029,13 +1496,25 @@ func (r ApiFindSlosOpRequest) KqlQuery(kqlQuery string) ApiFindSlosOpRequest { return r } -// The page number to return +// The page size to use for cursor-based pagination, must be greater or equal than 1 +func (r ApiFindSlosOpRequest) Size(size int32) ApiFindSlosOpRequest { + r.size = &size + return r +} + +// The cursor to use for fetching the results from, when using a cursor-base pagination. +func (r ApiFindSlosOpRequest) SearchAfter(searchAfter []string) ApiFindSlosOpRequest { + r.searchAfter = &searchAfter + return r +} + +// The page to use for pagination, must be greater or equal than 1 func (r ApiFindSlosOpRequest) Page(page int32) ApiFindSlosOpRequest { r.page = &page return r } -// The number of SLOs to return per page +// Number of SLOs returned by page func (r ApiFindSlosOpRequest) PerPage(perPage int32) ApiFindSlosOpRequest { r.perPage = &perPage return r @@ -1053,12 +1532,18 @@ func (r ApiFindSlosOpRequest) SortDirection(sortDirection string) ApiFindSlosOpR return r } +// Hide stale SLOs from the list as defined by stale SLO threshold in SLO settings +func (r ApiFindSlosOpRequest) HideStale(hideStale bool) ApiFindSlosOpRequest { + r.hideStale = &hideStale + return r +} + func (r ApiFindSlosOpRequest) Execute() (*FindSloResponse, *http.Response, error) { return r.ApiService.FindSlosOpExecute(r) } /* -FindSlosOp Retrieves a paginated list of SLOs +FindSlosOp Get a paginated list of SLOs You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @@ -1103,6 +1588,23 @@ func (a *SloAPIService) FindSlosOpExecute(r ApiFindSlosOpRequest) (*FindSloRespo if r.kqlQuery != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "kqlQuery", r.kqlQuery, "") } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "") + } else { + var defaultValue int32 = 1 + r.size = &defaultValue + } + if r.searchAfter != nil { + t := *r.searchAfter + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "searchAfter", s.Index(i).Interface(), "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "searchAfter", t, "multi") + } + } if r.page != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") } else { @@ -1127,6 +1629,9 @@ func (a *SloAPIService) FindSlosOpExecute(r ApiFindSlosOpRequest) (*FindSloRespo var defaultValue string = "asc" r.sortDirection = &defaultValue } + if r.hideStale != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "hideStale", r.hideStale, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1145,20 +1650,6 @@ func (a *SloAPIService) FindSlosOpExecute(r ApiFindSlosOpRequest) (*FindSloRespo localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["Authorization"] = key - } - } - } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1239,6 +1730,206 @@ func (a *SloAPIService) FindSlosOpExecute(r ApiFindSlosOpRequest) (*FindSloRespo return localVarReturnValue, localVarHTTPResponse, nil } +type ApiGetDefinitionsOpRequest struct { + ctx context.Context + ApiService SloAPI + kbnXsrf *string + spaceId string + includeOutdatedOnly *bool + tags *string + search *string + page *float64 + perPage *int32 +} + +// Cross-site request forgery protection +func (r ApiGetDefinitionsOpRequest) KbnXsrf(kbnXsrf string) ApiGetDefinitionsOpRequest { + r.kbnXsrf = &kbnXsrf + return r +} + +// Indicates if the API returns only outdated SLO or all SLO definitions +func (r ApiGetDefinitionsOpRequest) IncludeOutdatedOnly(includeOutdatedOnly bool) ApiGetDefinitionsOpRequest { + r.includeOutdatedOnly = &includeOutdatedOnly + return r +} + +// Filters the SLOs by tag +func (r ApiGetDefinitionsOpRequest) Tags(tags string) ApiGetDefinitionsOpRequest { + r.tags = &tags + return r +} + +// Filters the SLOs by name +func (r ApiGetDefinitionsOpRequest) Search(search string) ApiGetDefinitionsOpRequest { + r.search = &search + return r +} + +// The page to use for pagination, must be greater or equal than 1 +func (r ApiGetDefinitionsOpRequest) Page(page float64) ApiGetDefinitionsOpRequest { + r.page = &page + return r +} + +// Number of SLOs returned by page +func (r ApiGetDefinitionsOpRequest) PerPage(perPage int32) ApiGetDefinitionsOpRequest { + r.perPage = &perPage + return r +} + +func (r ApiGetDefinitionsOpRequest) Execute() (*FindSloDefinitionsResponse, *http.Response, error) { + return r.ApiService.GetDefinitionsOpExecute(r) +} + +/* +GetDefinitionsOp Get the SLO definitions + +You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + @return ApiGetDefinitionsOpRequest +*/ +func (a *SloAPIService) GetDefinitionsOp(ctx context.Context, spaceId string) ApiGetDefinitionsOpRequest { + return ApiGetDefinitionsOpRequest{ + ApiService: a, + ctx: ctx, + spaceId: spaceId, + } +} + +// Execute executes the request +// +// @return FindSloDefinitionsResponse +func (a *SloAPIService) GetDefinitionsOpExecute(r ApiGetDefinitionsOpRequest) (*FindSloDefinitionsResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FindSloDefinitionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SloAPIService.GetDefinitionsOp") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{spaceId}/internal/observability/slos/_definitions" + localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.kbnXsrf == nil { + return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified") + } + + if r.includeOutdatedOnly != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "includeOutdatedOnly", r.includeOutdatedOnly, "") + } + if r.tags != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "tags", r.tags, "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "") + } + if r.perPage != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "perPage", r.perPage, "") + } else { + var defaultValue int32 = 100 + r.perPage = &defaultValue + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Model400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Model401Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v Model403Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiGetSloOpRequest struct { ctx context.Context ApiService SloAPI @@ -1260,12 +1951,12 @@ func (r ApiGetSloOpRequest) InstanceId(instanceId string) ApiGetSloOpRequest { return r } -func (r ApiGetSloOpRequest) Execute() (*SloResponse, *http.Response, error) { +func (r ApiGetSloOpRequest) Execute() (*SloWithSummaryResponse, *http.Response, error) { return r.ApiService.GetSloOpExecute(r) } /* -GetSloOp Retrieves a SLO +GetSloOp Get an SLO You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @@ -1285,13 +1976,13 @@ func (a *SloAPIService) GetSloOp(ctx context.Context, spaceId string, sloId stri // Execute executes the request // -// @return SloResponse -func (a *SloAPIService) GetSloOpExecute(r ApiGetSloOpRequest) (*SloResponse, *http.Response, error) { +// @return SloWithSummaryResponse +func (a *SloAPIService) GetSloOpExecute(r ApiGetSloOpRequest) (*SloWithSummaryResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *SloResponse + localVarReturnValue *SloWithSummaryResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SloAPIService.GetSloOp") @@ -1331,20 +2022,6 @@ func (a *SloAPIService) GetSloOpExecute(r ApiGetSloOpRequest) (*SloResponse, *ht localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["Authorization"] = key - } - } - } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1425,64 +2102,62 @@ func (a *SloAPIService) GetSloOpExecute(r ApiGetSloOpRequest) (*SloResponse, *ht return localVarReturnValue, localVarHTTPResponse, nil } -type ApiHistoricalSummaryOpRequest struct { - ctx context.Context - ApiService SloAPI - kbnXsrf *string - spaceId string - historicalSummaryRequest *HistoricalSummaryRequest +type ApiResetSloOpRequest struct { + ctx context.Context + ApiService SloAPI + kbnXsrf *string + spaceId string + sloId string } // Cross-site request forgery protection -func (r ApiHistoricalSummaryOpRequest) KbnXsrf(kbnXsrf string) ApiHistoricalSummaryOpRequest { +func (r ApiResetSloOpRequest) KbnXsrf(kbnXsrf string) ApiResetSloOpRequest { r.kbnXsrf = &kbnXsrf return r } -func (r ApiHistoricalSummaryOpRequest) HistoricalSummaryRequest(historicalSummaryRequest HistoricalSummaryRequest) ApiHistoricalSummaryOpRequest { - r.historicalSummaryRequest = &historicalSummaryRequest - return r -} - -func (r ApiHistoricalSummaryOpRequest) Execute() (*map[string][]HistoricalSummaryResponseInner, *http.Response, error) { - return r.ApiService.HistoricalSummaryOpExecute(r) +func (r ApiResetSloOpRequest) Execute() (*SloDefinitionResponse, *http.Response, error) { + return r.ApiService.ResetSloOpExecute(r) } /* -HistoricalSummaryOp Retrieves the historical summary for a list of SLOs +ResetSloOp Reset an SLO -You must have the `read` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. +You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param spaceId An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - @return ApiHistoricalSummaryOpRequest + @param sloId An identifier for the slo. + @return ApiResetSloOpRequest */ -func (a *SloAPIService) HistoricalSummaryOp(ctx context.Context, spaceId string) ApiHistoricalSummaryOpRequest { - return ApiHistoricalSummaryOpRequest{ +func (a *SloAPIService) ResetSloOp(ctx context.Context, spaceId string, sloId string) ApiResetSloOpRequest { + return ApiResetSloOpRequest{ ApiService: a, ctx: ctx, spaceId: spaceId, + sloId: sloId, } } // Execute executes the request // -// @return map[string][]HistoricalSummaryResponseInner -func (a *SloAPIService) HistoricalSummaryOpExecute(r ApiHistoricalSummaryOpRequest) (*map[string][]HistoricalSummaryResponseInner, *http.Response, error) { +// @return SloDefinitionResponse +func (a *SloAPIService) ResetSloOpExecute(r ApiResetSloOpRequest) (*SloDefinitionResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *map[string][]HistoricalSummaryResponseInner + localVarReturnValue *SloDefinitionResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SloAPIService.HistoricalSummaryOp") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SloAPIService.ResetSloOp") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/s/{spaceId}/internal/observability/slos/_historical_summary" + localVarPath := localBasePath + "/s/{spaceId}/api/observability/slos/{sloId}/_reset" localVarPath = strings.Replace(localVarPath, "{"+"spaceId"+"}", url.PathEscape(parameterValueToString(r.spaceId, "spaceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"sloId"+"}", url.PathEscape(parameterValueToString(r.sloId, "sloId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1490,12 +2165,9 @@ func (a *SloAPIService) HistoricalSummaryOpExecute(r ApiHistoricalSummaryOpReque if r.kbnXsrf == nil { return localVarReturnValue, nil, reportError("kbnXsrf is required and must be specified") } - if r.historicalSummaryRequest == nil { - return localVarReturnValue, nil, reportError("historicalSummaryRequest is required and must be specified") - } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -1512,22 +2184,6 @@ func (a *SloAPIService) HistoricalSummaryOpExecute(r ApiHistoricalSummaryOpReque localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") - // body params - localVarPostBody = r.historicalSummaryRequest - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["Authorization"] = key - } - } - } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1581,6 +2237,17 @@ func (a *SloAPIService) HistoricalSummaryOpExecute(r ApiHistoricalSummaryOpReque } newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Model404Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -1617,12 +2284,12 @@ func (r ApiUpdateSloOpRequest) UpdateSloRequest(updateSloRequest UpdateSloReques return r } -func (r ApiUpdateSloOpRequest) Execute() (*SloResponse, *http.Response, error) { +func (r ApiUpdateSloOpRequest) Execute() (*SloDefinitionResponse, *http.Response, error) { return r.ApiService.UpdateSloOpExecute(r) } /* -UpdateSloOp Updates an SLO +UpdateSloOp Update an SLO You must have the `write` privileges for the **SLOs** feature in the **Observability** section of the Kibana feature privileges. @@ -1642,13 +2309,13 @@ func (a *SloAPIService) UpdateSloOp(ctx context.Context, spaceId string, sloId s // Execute executes the request // -// @return SloResponse -func (a *SloAPIService) UpdateSloOpExecute(r ApiUpdateSloOpRequest) (*SloResponse, *http.Response, error) { +// @return SloDefinitionResponse +func (a *SloAPIService) UpdateSloOpExecute(r ApiUpdateSloOpRequest) (*SloDefinitionResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *SloResponse + localVarReturnValue *SloDefinitionResponse ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SloAPIService.UpdateSloOp") @@ -1690,20 +2357,6 @@ func (a *SloAPIService) UpdateSloOpExecute(r ApiUpdateSloOpRequest) (*SloRespons parameterAddToHeaderOrQuery(localVarHeaderParams, "kbn-xsrf", r.kbnXsrf, "") // body params localVarPostBody = r.updateSloRequest - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if apiKey, ok := auth["apiKeyAuth"]; ok { - var key string - if apiKey.Prefix != "" { - key = apiKey.Prefix + " " + apiKey.Key - } else { - key = apiKey.Key - } - localVarHeaderParams["Authorization"] = key - } - } - } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/generated/slo/client.go b/generated/slo/client.go index 6a012a56f..5e6cccbae 100644 --- a/generated/slo/client.go +++ b/generated/slo/client.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -40,7 +40,7 @@ var ( queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") ) -// APIClient manages communication with the SLOs API v1.0 +// APIClient manages communication with the SLOs API v1.1 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration @@ -409,11 +409,6 @@ func (c *APIClient) prepareRequest( // Walk through any authentication. - // Basic HTTP Authentication - if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { - localVarRequest.SetBasicAuth(auth.UserName, auth.Password) - } - } for header, value := range c.cfg.DefaultHeader { diff --git a/generated/slo/configuration.go b/generated/slo/configuration.go index 2df8d268c..3064eeeb4 100644 --- a/generated/slo/configuration.go +++ b/generated/slo/configuration.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -28,12 +28,6 @@ func (c contextKey) String() string { } var ( - // ContextBasicAuth takes BasicAuth as authentication for the request. - ContextBasicAuth = contextKey("basic") - - // ContextAPIKeys takes a string apikey as authentication for the request - ContextAPIKeys = contextKey("apiKeys") - // ContextServerIndex uses a server configuration from the index. ContextServerIndex = contextKey("serverIndex") @@ -96,24 +90,17 @@ func NewConfiguration() *Configuration { Debug: false, Servers: ServerConfigurations{ { - URL: "http://localhost:5601", - Description: "local", - }, - }, - OperationServers: map[string]ServerConfigurations{ - "SloAPIService.CreateSloOp": { - { - URL: "https://localhost:5601", - Description: "No description provided", - }, - }, - "SloAPIService.DeleteSloInstancesOp": { - { - URL: "https://localhost:5601", - Description: "No description provided", + URL: "https://{kibana_url}", + Description: "No description provided", + Variables: map[string]ServerVariable{ + "kibana_url": ServerVariable{ + Description: "No description provided", + DefaultValue: "localhost:5601", + }, }, }, }, + OperationServers: map[string]ServerConfigurations{}, } return cfg } diff --git a/generated/slo/docs/HistoricalSummaryRequest.md b/generated/slo/docs/BulkDeleteRequest.md similarity index 57% rename from generated/slo/docs/HistoricalSummaryRequest.md rename to generated/slo/docs/BulkDeleteRequest.md index c63ad83ec..a33e05ad7 100644 --- a/generated/slo/docs/HistoricalSummaryRequest.md +++ b/generated/slo/docs/BulkDeleteRequest.md @@ -1,46 +1,46 @@ -# HistoricalSummaryRequest +# BulkDeleteRequest ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**List** | **[]string** | The list of SLO identifiers to get the historical summary for | +**List** | **[]string** | An array of SLO Definition id | ## Methods -### NewHistoricalSummaryRequest +### NewBulkDeleteRequest -`func NewHistoricalSummaryRequest(list []string, ) *HistoricalSummaryRequest` +`func NewBulkDeleteRequest(list []string, ) *BulkDeleteRequest` -NewHistoricalSummaryRequest instantiates a new HistoricalSummaryRequest object +NewBulkDeleteRequest instantiates a new BulkDeleteRequest 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 -### NewHistoricalSummaryRequestWithDefaults +### NewBulkDeleteRequestWithDefaults -`func NewHistoricalSummaryRequestWithDefaults() *HistoricalSummaryRequest` +`func NewBulkDeleteRequestWithDefaults() *BulkDeleteRequest` -NewHistoricalSummaryRequestWithDefaults instantiates a new HistoricalSummaryRequest object +NewBulkDeleteRequestWithDefaults instantiates a new BulkDeleteRequest 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 ### GetList -`func (o *HistoricalSummaryRequest) GetList() []string` +`func (o *BulkDeleteRequest) GetList() []string` GetList returns the List field if non-nil, zero value otherwise. ### GetListOk -`func (o *HistoricalSummaryRequest) GetListOk() (*[]string, bool)` +`func (o *BulkDeleteRequest) GetListOk() (*[]string, bool)` GetListOk returns a tuple with the List field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetList -`func (o *HistoricalSummaryRequest) SetList(v []string)` +`func (o *BulkDeleteRequest) SetList(v []string)` SetList sets List field to given value. diff --git a/generated/slo/docs/BulkDeleteResponse.md b/generated/slo/docs/BulkDeleteResponse.md new file mode 100644 index 000000000..bdccff897 --- /dev/null +++ b/generated/slo/docs/BulkDeleteResponse.md @@ -0,0 +1,56 @@ +# BulkDeleteResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TaskId** | Pointer to **string** | The taskId of the bulk delete operation | [optional] + +## Methods + +### NewBulkDeleteResponse + +`func NewBulkDeleteResponse() *BulkDeleteResponse` + +NewBulkDeleteResponse instantiates a new BulkDeleteResponse 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 + +### NewBulkDeleteResponseWithDefaults + +`func NewBulkDeleteResponseWithDefaults() *BulkDeleteResponse` + +NewBulkDeleteResponseWithDefaults instantiates a new BulkDeleteResponse 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 + +### GetTaskId + +`func (o *BulkDeleteResponse) GetTaskId() string` + +GetTaskId returns the TaskId field if non-nil, zero value otherwise. + +### GetTaskIdOk + +`func (o *BulkDeleteResponse) GetTaskIdOk() (*string, bool)` + +GetTaskIdOk returns a tuple with the TaskId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTaskId + +`func (o *BulkDeleteResponse) SetTaskId(v string)` + +SetTaskId sets TaskId field to given value. + +### HasTaskId + +`func (o *BulkDeleteResponse) HasTaskId() bool` + +HasTaskId returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/slo/docs/BulkDeleteStatusResponse.md b/generated/slo/docs/BulkDeleteStatusResponse.md new file mode 100644 index 000000000..f17746615 --- /dev/null +++ b/generated/slo/docs/BulkDeleteStatusResponse.md @@ -0,0 +1,108 @@ +# BulkDeleteStatusResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsDone** | Pointer to **bool** | Indicates if the bulk deletion operation is completed | [optional] +**Error** | Pointer to **string** | The error message if the bulk deletion operation failed | [optional] +**Results** | Pointer to [**[]BulkDeleteStatusResponseResultsInner**](BulkDeleteStatusResponseResultsInner.md) | The results of the bulk deletion operation, including the success status and any errors for each SLO | [optional] + +## Methods + +### NewBulkDeleteStatusResponse + +`func NewBulkDeleteStatusResponse() *BulkDeleteStatusResponse` + +NewBulkDeleteStatusResponse instantiates a new BulkDeleteStatusResponse 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 + +### NewBulkDeleteStatusResponseWithDefaults + +`func NewBulkDeleteStatusResponseWithDefaults() *BulkDeleteStatusResponse` + +NewBulkDeleteStatusResponseWithDefaults instantiates a new BulkDeleteStatusResponse 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 + +### GetIsDone + +`func (o *BulkDeleteStatusResponse) GetIsDone() bool` + +GetIsDone returns the IsDone field if non-nil, zero value otherwise. + +### GetIsDoneOk + +`func (o *BulkDeleteStatusResponse) GetIsDoneOk() (*bool, bool)` + +GetIsDoneOk returns a tuple with the IsDone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDone + +`func (o *BulkDeleteStatusResponse) SetIsDone(v bool)` + +SetIsDone sets IsDone field to given value. + +### HasIsDone + +`func (o *BulkDeleteStatusResponse) HasIsDone() bool` + +HasIsDone returns a boolean if a field has been set. + +### GetError + +`func (o *BulkDeleteStatusResponse) GetError() string` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *BulkDeleteStatusResponse) GetErrorOk() (*string, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *BulkDeleteStatusResponse) SetError(v string)` + +SetError sets Error field to given value. + +### HasError + +`func (o *BulkDeleteStatusResponse) HasError() bool` + +HasError returns a boolean if a field has been set. + +### GetResults + +`func (o *BulkDeleteStatusResponse) GetResults() []BulkDeleteStatusResponseResultsInner` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *BulkDeleteStatusResponse) GetResultsOk() (*[]BulkDeleteStatusResponseResultsInner, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *BulkDeleteStatusResponse) SetResults(v []BulkDeleteStatusResponseResultsInner)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *BulkDeleteStatusResponse) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/slo/docs/BulkDeleteStatusResponseResultsInner.md b/generated/slo/docs/BulkDeleteStatusResponseResultsInner.md new file mode 100644 index 000000000..cbd4a3f83 --- /dev/null +++ b/generated/slo/docs/BulkDeleteStatusResponseResultsInner.md @@ -0,0 +1,108 @@ +# BulkDeleteStatusResponseResultsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | The ID of the SLO that was deleted | [optional] +**Success** | Pointer to **bool** | The result of the deletion operation for this SLO | [optional] +**Error** | Pointer to **string** | The error message if the deletion operation failed for this SLO | [optional] + +## Methods + +### NewBulkDeleteStatusResponseResultsInner + +`func NewBulkDeleteStatusResponseResultsInner() *BulkDeleteStatusResponseResultsInner` + +NewBulkDeleteStatusResponseResultsInner instantiates a new BulkDeleteStatusResponseResultsInner 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 + +### NewBulkDeleteStatusResponseResultsInnerWithDefaults + +`func NewBulkDeleteStatusResponseResultsInnerWithDefaults() *BulkDeleteStatusResponseResultsInner` + +NewBulkDeleteStatusResponseResultsInnerWithDefaults instantiates a new BulkDeleteStatusResponseResultsInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *BulkDeleteStatusResponseResultsInner) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *BulkDeleteStatusResponseResultsInner) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *BulkDeleteStatusResponseResultsInner) SetId(v string)` + +SetId sets Id field to given value. + +### HasId + +`func (o *BulkDeleteStatusResponseResultsInner) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetSuccess + +`func (o *BulkDeleteStatusResponseResultsInner) GetSuccess() bool` + +GetSuccess returns the Success field if non-nil, zero value otherwise. + +### GetSuccessOk + +`func (o *BulkDeleteStatusResponseResultsInner) GetSuccessOk() (*bool, bool)` + +GetSuccessOk returns a tuple with the Success field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSuccess + +`func (o *BulkDeleteStatusResponseResultsInner) SetSuccess(v bool)` + +SetSuccess sets Success field to given value. + +### HasSuccess + +`func (o *BulkDeleteStatusResponseResultsInner) HasSuccess() bool` + +HasSuccess returns a boolean if a field has been set. + +### GetError + +`func (o *BulkDeleteStatusResponseResultsInner) GetError() string` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *BulkDeleteStatusResponseResultsInner) GetErrorOk() (*string, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *BulkDeleteStatusResponseResultsInner) SetError(v string)` + +SetError sets Error field to given value. + +### HasError + +`func (o *BulkDeleteStatusResponseResultsInner) HasError() bool` + +HasError returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/slo/docs/BulkPurgeRollupRequest.md b/generated/slo/docs/BulkPurgeRollupRequest.md new file mode 100644 index 000000000..f425aaefa --- /dev/null +++ b/generated/slo/docs/BulkPurgeRollupRequest.md @@ -0,0 +1,72 @@ +# BulkPurgeRollupRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**List** | **[]string** | An array of slo ids | +**PurgePolicy** | [**BulkPurgeRollupRequestPurgePolicy**](BulkPurgeRollupRequestPurgePolicy.md) | | + +## Methods + +### NewBulkPurgeRollupRequest + +`func NewBulkPurgeRollupRequest(list []string, purgePolicy BulkPurgeRollupRequestPurgePolicy, ) *BulkPurgeRollupRequest` + +NewBulkPurgeRollupRequest instantiates a new BulkPurgeRollupRequest 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 + +### NewBulkPurgeRollupRequestWithDefaults + +`func NewBulkPurgeRollupRequestWithDefaults() *BulkPurgeRollupRequest` + +NewBulkPurgeRollupRequestWithDefaults instantiates a new BulkPurgeRollupRequest 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 + +### GetList + +`func (o *BulkPurgeRollupRequest) GetList() []string` + +GetList returns the List field if non-nil, zero value otherwise. + +### GetListOk + +`func (o *BulkPurgeRollupRequest) GetListOk() (*[]string, bool)` + +GetListOk returns a tuple with the List field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetList + +`func (o *BulkPurgeRollupRequest) SetList(v []string)` + +SetList sets List field to given value. + + +### GetPurgePolicy + +`func (o *BulkPurgeRollupRequest) GetPurgePolicy() BulkPurgeRollupRequestPurgePolicy` + +GetPurgePolicy returns the PurgePolicy field if non-nil, zero value otherwise. + +### GetPurgePolicyOk + +`func (o *BulkPurgeRollupRequest) GetPurgePolicyOk() (*BulkPurgeRollupRequestPurgePolicy, bool)` + +GetPurgePolicyOk returns a tuple with the PurgePolicy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPurgePolicy + +`func (o *BulkPurgeRollupRequest) SetPurgePolicy(v BulkPurgeRollupRequestPurgePolicy)` + +SetPurgePolicy sets PurgePolicy field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/slo/docs/BulkPurgeRollupRequestPurgePolicy.md b/generated/slo/docs/BulkPurgeRollupRequestPurgePolicy.md new file mode 100644 index 000000000..b9990c9a9 --- /dev/null +++ b/generated/slo/docs/BulkPurgeRollupRequestPurgePolicy.md @@ -0,0 +1,108 @@ +# BulkPurgeRollupRequestPurgePolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PurgeType** | Pointer to **string** | Specifies whether documents will be purged based on a specific age or on a timestamp | [optional] +**Age** | Pointer to **string** | The duration to determine which documents to purge, formatted as {duration}{unit}. This value should be greater than or equal to the time window of every SLO provided. | [optional] +**Timestamp** | Pointer to **string** | The timestamp to determine which documents to purge, formatted in ISO. This value should be older than the applicable time window of every SLO provided. | [optional] + +## Methods + +### NewBulkPurgeRollupRequestPurgePolicy + +`func NewBulkPurgeRollupRequestPurgePolicy() *BulkPurgeRollupRequestPurgePolicy` + +NewBulkPurgeRollupRequestPurgePolicy instantiates a new BulkPurgeRollupRequestPurgePolicy 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 + +### NewBulkPurgeRollupRequestPurgePolicyWithDefaults + +`func NewBulkPurgeRollupRequestPurgePolicyWithDefaults() *BulkPurgeRollupRequestPurgePolicy` + +NewBulkPurgeRollupRequestPurgePolicyWithDefaults instantiates a new BulkPurgeRollupRequestPurgePolicy 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 + +### GetPurgeType + +`func (o *BulkPurgeRollupRequestPurgePolicy) GetPurgeType() string` + +GetPurgeType returns the PurgeType field if non-nil, zero value otherwise. + +### GetPurgeTypeOk + +`func (o *BulkPurgeRollupRequestPurgePolicy) GetPurgeTypeOk() (*string, bool)` + +GetPurgeTypeOk returns a tuple with the PurgeType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPurgeType + +`func (o *BulkPurgeRollupRequestPurgePolicy) SetPurgeType(v string)` + +SetPurgeType sets PurgeType field to given value. + +### HasPurgeType + +`func (o *BulkPurgeRollupRequestPurgePolicy) HasPurgeType() bool` + +HasPurgeType returns a boolean if a field has been set. + +### GetAge + +`func (o *BulkPurgeRollupRequestPurgePolicy) GetAge() string` + +GetAge returns the Age field if non-nil, zero value otherwise. + +### GetAgeOk + +`func (o *BulkPurgeRollupRequestPurgePolicy) GetAgeOk() (*string, bool)` + +GetAgeOk returns a tuple with the Age field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAge + +`func (o *BulkPurgeRollupRequestPurgePolicy) SetAge(v string)` + +SetAge sets Age field to given value. + +### HasAge + +`func (o *BulkPurgeRollupRequestPurgePolicy) HasAge() bool` + +HasAge returns a boolean if a field has been set. + +### GetTimestamp + +`func (o *BulkPurgeRollupRequestPurgePolicy) GetTimestamp() string` + +GetTimestamp returns the Timestamp field if non-nil, zero value otherwise. + +### GetTimestampOk + +`func (o *BulkPurgeRollupRequestPurgePolicy) GetTimestampOk() (*string, bool)` + +GetTimestampOk returns a tuple with the Timestamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimestamp + +`func (o *BulkPurgeRollupRequestPurgePolicy) SetTimestamp(v string)` + +SetTimestamp sets Timestamp field to given value. + +### HasTimestamp + +`func (o *BulkPurgeRollupRequestPurgePolicy) HasTimestamp() bool` + +HasTimestamp returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/slo/docs/BulkPurgeRollupRequestPurgePolicyOneOf.md b/generated/slo/docs/BulkPurgeRollupRequestPurgePolicyOneOf.md new file mode 100644 index 000000000..3a0f28221 --- /dev/null +++ b/generated/slo/docs/BulkPurgeRollupRequestPurgePolicyOneOf.md @@ -0,0 +1,82 @@ +# BulkPurgeRollupRequestPurgePolicyOneOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PurgeType** | Pointer to **string** | Specifies whether documents will be purged based on a specific age or on a timestamp | [optional] +**Age** | Pointer to **string** | The duration to determine which documents to purge, formatted as {duration}{unit}. This value should be greater than or equal to the time window of every SLO provided. | [optional] + +## Methods + +### NewBulkPurgeRollupRequestPurgePolicyOneOf + +`func NewBulkPurgeRollupRequestPurgePolicyOneOf() *BulkPurgeRollupRequestPurgePolicyOneOf` + +NewBulkPurgeRollupRequestPurgePolicyOneOf instantiates a new BulkPurgeRollupRequestPurgePolicyOneOf 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 + +### NewBulkPurgeRollupRequestPurgePolicyOneOfWithDefaults + +`func NewBulkPurgeRollupRequestPurgePolicyOneOfWithDefaults() *BulkPurgeRollupRequestPurgePolicyOneOf` + +NewBulkPurgeRollupRequestPurgePolicyOneOfWithDefaults instantiates a new BulkPurgeRollupRequestPurgePolicyOneOf 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 + +### GetPurgeType + +`func (o *BulkPurgeRollupRequestPurgePolicyOneOf) GetPurgeType() string` + +GetPurgeType returns the PurgeType field if non-nil, zero value otherwise. + +### GetPurgeTypeOk + +`func (o *BulkPurgeRollupRequestPurgePolicyOneOf) GetPurgeTypeOk() (*string, bool)` + +GetPurgeTypeOk returns a tuple with the PurgeType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPurgeType + +`func (o *BulkPurgeRollupRequestPurgePolicyOneOf) SetPurgeType(v string)` + +SetPurgeType sets PurgeType field to given value. + +### HasPurgeType + +`func (o *BulkPurgeRollupRequestPurgePolicyOneOf) HasPurgeType() bool` + +HasPurgeType returns a boolean if a field has been set. + +### GetAge + +`func (o *BulkPurgeRollupRequestPurgePolicyOneOf) GetAge() string` + +GetAge returns the Age field if non-nil, zero value otherwise. + +### GetAgeOk + +`func (o *BulkPurgeRollupRequestPurgePolicyOneOf) GetAgeOk() (*string, bool)` + +GetAgeOk returns a tuple with the Age field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAge + +`func (o *BulkPurgeRollupRequestPurgePolicyOneOf) SetAge(v string)` + +SetAge sets Age field to given value. + +### HasAge + +`func (o *BulkPurgeRollupRequestPurgePolicyOneOf) HasAge() bool` + +HasAge returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/slo/docs/BulkPurgeRollupRequestPurgePolicyOneOf1.md b/generated/slo/docs/BulkPurgeRollupRequestPurgePolicyOneOf1.md new file mode 100644 index 000000000..1b3bddbff --- /dev/null +++ b/generated/slo/docs/BulkPurgeRollupRequestPurgePolicyOneOf1.md @@ -0,0 +1,82 @@ +# BulkPurgeRollupRequestPurgePolicyOneOf1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PurgeType** | Pointer to **string** | Specifies whether documents will be purged based on a specific age or on a timestamp | [optional] +**Timestamp** | Pointer to **string** | The timestamp to determine which documents to purge, formatted in ISO. This value should be older than the applicable time window of every SLO provided. | [optional] + +## Methods + +### NewBulkPurgeRollupRequestPurgePolicyOneOf1 + +`func NewBulkPurgeRollupRequestPurgePolicyOneOf1() *BulkPurgeRollupRequestPurgePolicyOneOf1` + +NewBulkPurgeRollupRequestPurgePolicyOneOf1 instantiates a new BulkPurgeRollupRequestPurgePolicyOneOf1 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 + +### NewBulkPurgeRollupRequestPurgePolicyOneOf1WithDefaults + +`func NewBulkPurgeRollupRequestPurgePolicyOneOf1WithDefaults() *BulkPurgeRollupRequestPurgePolicyOneOf1` + +NewBulkPurgeRollupRequestPurgePolicyOneOf1WithDefaults instantiates a new BulkPurgeRollupRequestPurgePolicyOneOf1 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 + +### GetPurgeType + +`func (o *BulkPurgeRollupRequestPurgePolicyOneOf1) GetPurgeType() string` + +GetPurgeType returns the PurgeType field if non-nil, zero value otherwise. + +### GetPurgeTypeOk + +`func (o *BulkPurgeRollupRequestPurgePolicyOneOf1) GetPurgeTypeOk() (*string, bool)` + +GetPurgeTypeOk returns a tuple with the PurgeType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPurgeType + +`func (o *BulkPurgeRollupRequestPurgePolicyOneOf1) SetPurgeType(v string)` + +SetPurgeType sets PurgeType field to given value. + +### HasPurgeType + +`func (o *BulkPurgeRollupRequestPurgePolicyOneOf1) HasPurgeType() bool` + +HasPurgeType returns a boolean if a field has been set. + +### GetTimestamp + +`func (o *BulkPurgeRollupRequestPurgePolicyOneOf1) GetTimestamp() string` + +GetTimestamp returns the Timestamp field if non-nil, zero value otherwise. + +### GetTimestampOk + +`func (o *BulkPurgeRollupRequestPurgePolicyOneOf1) GetTimestampOk() (*string, bool)` + +GetTimestampOk returns a tuple with the Timestamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimestamp + +`func (o *BulkPurgeRollupRequestPurgePolicyOneOf1) SetTimestamp(v string)` + +SetTimestamp sets Timestamp field to given value. + +### HasTimestamp + +`func (o *BulkPurgeRollupRequestPurgePolicyOneOf1) HasTimestamp() bool` + +HasTimestamp returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/slo/docs/BulkPurgeRollupResponse.md b/generated/slo/docs/BulkPurgeRollupResponse.md new file mode 100644 index 000000000..862b02df2 --- /dev/null +++ b/generated/slo/docs/BulkPurgeRollupResponse.md @@ -0,0 +1,56 @@ +# BulkPurgeRollupResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TaskId** | Pointer to **string** | The task id of the purge operation | [optional] + +## Methods + +### NewBulkPurgeRollupResponse + +`func NewBulkPurgeRollupResponse() *BulkPurgeRollupResponse` + +NewBulkPurgeRollupResponse instantiates a new BulkPurgeRollupResponse 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 + +### NewBulkPurgeRollupResponseWithDefaults + +`func NewBulkPurgeRollupResponseWithDefaults() *BulkPurgeRollupResponse` + +NewBulkPurgeRollupResponseWithDefaults instantiates a new BulkPurgeRollupResponse 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 + +### GetTaskId + +`func (o *BulkPurgeRollupResponse) GetTaskId() string` + +GetTaskId returns the TaskId field if non-nil, zero value otherwise. + +### GetTaskIdOk + +`func (o *BulkPurgeRollupResponse) GetTaskIdOk() (*string, bool)` + +GetTaskIdOk returns a tuple with the TaskId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTaskId + +`func (o *BulkPurgeRollupResponse) SetTaskId(v string)` + +SetTaskId sets TaskId field to given value. + +### HasTaskId + +`func (o *BulkPurgeRollupResponse) HasTaskId() bool` + +HasTaskId returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/slo/docs/CreateSloRequest.md b/generated/slo/docs/CreateSloRequest.md index e8b5ec1bc..492603b08 100644 --- a/generated/slo/docs/CreateSloRequest.md +++ b/generated/slo/docs/CreateSloRequest.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **BudgetingMethod** | [**BudgetingMethod**](BudgetingMethod.md) | | **Objective** | [**Objective**](Objective.md) | | **Settings** | Pointer to [**Settings**](Settings.md) | | [optional] -**GroupBy** | Pointer to [**SloResponseGroupBy**](SloResponseGroupBy.md) | | [optional] +**GroupBy** | Pointer to [**GroupBy**](GroupBy.md) | | [optional] **Tags** | Pointer to **[]string** | List of tags | [optional] ## Methods @@ -206,20 +206,20 @@ HasSettings returns a boolean if a field has been set. ### GetGroupBy -`func (o *CreateSloRequest) GetGroupBy() SloResponseGroupBy` +`func (o *CreateSloRequest) GetGroupBy() GroupBy` GetGroupBy returns the GroupBy field if non-nil, zero value otherwise. ### GetGroupByOk -`func (o *CreateSloRequest) GetGroupByOk() (*SloResponseGroupBy, bool)` +`func (o *CreateSloRequest) GetGroupByOk() (*GroupBy, bool)` GetGroupByOk returns a tuple with the GroupBy field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetGroupBy -`func (o *CreateSloRequest) SetGroupBy(v SloResponseGroupBy)` +`func (o *CreateSloRequest) SetGroupBy(v GroupBy)` SetGroupBy sets GroupBy field to given value. diff --git a/generated/slo/docs/Filter.md b/generated/slo/docs/Filter.md new file mode 100644 index 000000000..291be3dd6 --- /dev/null +++ b/generated/slo/docs/Filter.md @@ -0,0 +1,82 @@ +# Filter + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Query** | Pointer to **map[string]interface{}** | | [optional] +**Meta** | Pointer to [**FilterMeta**](FilterMeta.md) | | [optional] + +## Methods + +### NewFilter + +`func NewFilter() *Filter` + +NewFilter instantiates a new Filter 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 + +### NewFilterWithDefaults + +`func NewFilterWithDefaults() *Filter` + +NewFilterWithDefaults instantiates a new Filter object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetQuery + +`func (o *Filter) GetQuery() map[string]interface{}` + +GetQuery returns the Query field if non-nil, zero value otherwise. + +### GetQueryOk + +`func (o *Filter) GetQueryOk() (*map[string]interface{}, bool)` + +GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQuery + +`func (o *Filter) SetQuery(v map[string]interface{})` + +SetQuery sets Query field to given value. + +### HasQuery + +`func (o *Filter) HasQuery() bool` + +HasQuery returns a boolean if a field has been set. + +### GetMeta + +`func (o *Filter) GetMeta() FilterMeta` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *Filter) GetMetaOk() (*FilterMeta, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *Filter) SetMeta(v FilterMeta)` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *Filter) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/slo/docs/FilterMeta.md b/generated/slo/docs/FilterMeta.md new file mode 100644 index 000000000..eea21e171 --- /dev/null +++ b/generated/slo/docs/FilterMeta.md @@ -0,0 +1,352 @@ +# FilterMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Alias** | Pointer to **NullableString** | | [optional] +**Disabled** | Pointer to **bool** | | [optional] +**Negate** | Pointer to **bool** | | [optional] +**ControlledBy** | Pointer to **string** | | [optional] +**Group** | Pointer to **string** | | [optional] +**Index** | Pointer to **string** | | [optional] +**IsMultiIndex** | Pointer to **bool** | | [optional] +**Type** | Pointer to **string** | | [optional] +**Key** | Pointer to **string** | | [optional] +**Params** | Pointer to **map[string]interface{}** | | [optional] +**Value** | Pointer to **string** | | [optional] +**Field** | Pointer to **string** | | [optional] + +## Methods + +### NewFilterMeta + +`func NewFilterMeta() *FilterMeta` + +NewFilterMeta instantiates a new FilterMeta 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 + +### NewFilterMetaWithDefaults + +`func NewFilterMetaWithDefaults() *FilterMeta` + +NewFilterMetaWithDefaults instantiates a new FilterMeta 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 + +### GetAlias + +`func (o *FilterMeta) GetAlias() string` + +GetAlias returns the Alias field if non-nil, zero value otherwise. + +### GetAliasOk + +`func (o *FilterMeta) GetAliasOk() (*string, bool)` + +GetAliasOk returns a tuple with the Alias field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAlias + +`func (o *FilterMeta) SetAlias(v string)` + +SetAlias sets Alias field to given value. + +### HasAlias + +`func (o *FilterMeta) HasAlias() bool` + +HasAlias returns a boolean if a field has been set. + +### SetAliasNil + +`func (o *FilterMeta) SetAliasNil(b bool)` + + SetAliasNil sets the value for Alias to be an explicit nil + +### UnsetAlias +`func (o *FilterMeta) UnsetAlias()` + +UnsetAlias ensures that no value is present for Alias, not even an explicit nil +### GetDisabled + +`func (o *FilterMeta) GetDisabled() bool` + +GetDisabled returns the Disabled field if non-nil, zero value otherwise. + +### GetDisabledOk + +`func (o *FilterMeta) GetDisabledOk() (*bool, bool)` + +GetDisabledOk returns a tuple with the Disabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDisabled + +`func (o *FilterMeta) SetDisabled(v bool)` + +SetDisabled sets Disabled field to given value. + +### HasDisabled + +`func (o *FilterMeta) HasDisabled() bool` + +HasDisabled returns a boolean if a field has been set. + +### GetNegate + +`func (o *FilterMeta) GetNegate() bool` + +GetNegate returns the Negate field if non-nil, zero value otherwise. + +### GetNegateOk + +`func (o *FilterMeta) GetNegateOk() (*bool, bool)` + +GetNegateOk returns a tuple with the Negate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNegate + +`func (o *FilterMeta) SetNegate(v bool)` + +SetNegate sets Negate field to given value. + +### HasNegate + +`func (o *FilterMeta) HasNegate() bool` + +HasNegate returns a boolean if a field has been set. + +### GetControlledBy + +`func (o *FilterMeta) GetControlledBy() string` + +GetControlledBy returns the ControlledBy field if non-nil, zero value otherwise. + +### GetControlledByOk + +`func (o *FilterMeta) GetControlledByOk() (*string, bool)` + +GetControlledByOk returns a tuple with the ControlledBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetControlledBy + +`func (o *FilterMeta) SetControlledBy(v string)` + +SetControlledBy sets ControlledBy field to given value. + +### HasControlledBy + +`func (o *FilterMeta) HasControlledBy() bool` + +HasControlledBy returns a boolean if a field has been set. + +### GetGroup + +`func (o *FilterMeta) GetGroup() string` + +GetGroup returns the Group field if non-nil, zero value otherwise. + +### GetGroupOk + +`func (o *FilterMeta) GetGroupOk() (*string, bool)` + +GetGroupOk returns a tuple with the Group field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroup + +`func (o *FilterMeta) SetGroup(v string)` + +SetGroup sets Group field to given value. + +### HasGroup + +`func (o *FilterMeta) HasGroup() bool` + +HasGroup returns a boolean if a field has been set. + +### GetIndex + +`func (o *FilterMeta) GetIndex() string` + +GetIndex returns the Index field if non-nil, zero value otherwise. + +### GetIndexOk + +`func (o *FilterMeta) GetIndexOk() (*string, bool)` + +GetIndexOk returns a tuple with the Index field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIndex + +`func (o *FilterMeta) SetIndex(v string)` + +SetIndex sets Index field to given value. + +### HasIndex + +`func (o *FilterMeta) HasIndex() bool` + +HasIndex returns a boolean if a field has been set. + +### GetIsMultiIndex + +`func (o *FilterMeta) GetIsMultiIndex() bool` + +GetIsMultiIndex returns the IsMultiIndex field if non-nil, zero value otherwise. + +### GetIsMultiIndexOk + +`func (o *FilterMeta) GetIsMultiIndexOk() (*bool, bool)` + +GetIsMultiIndexOk returns a tuple with the IsMultiIndex field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsMultiIndex + +`func (o *FilterMeta) SetIsMultiIndex(v bool)` + +SetIsMultiIndex sets IsMultiIndex field to given value. + +### HasIsMultiIndex + +`func (o *FilterMeta) HasIsMultiIndex() bool` + +HasIsMultiIndex returns a boolean if a field has been set. + +### GetType + +`func (o *FilterMeta) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *FilterMeta) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *FilterMeta) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *FilterMeta) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetKey + +`func (o *FilterMeta) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *FilterMeta) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *FilterMeta) SetKey(v string)` + +SetKey sets Key field to given value. + +### HasKey + +`func (o *FilterMeta) HasKey() bool` + +HasKey returns a boolean if a field has been set. + +### GetParams + +`func (o *FilterMeta) GetParams() map[string]interface{}` + +GetParams returns the Params field if non-nil, zero value otherwise. + +### GetParamsOk + +`func (o *FilterMeta) GetParamsOk() (*map[string]interface{}, bool)` + +GetParamsOk returns a tuple with the Params field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParams + +`func (o *FilterMeta) SetParams(v map[string]interface{})` + +SetParams sets Params field to given value. + +### HasParams + +`func (o *FilterMeta) HasParams() bool` + +HasParams returns a boolean if a field has been set. + +### GetValue + +`func (o *FilterMeta) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *FilterMeta) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *FilterMeta) SetValue(v string)` + +SetValue sets Value field to given value. + +### HasValue + +`func (o *FilterMeta) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### GetField + +`func (o *FilterMeta) GetField() string` + +GetField returns the Field field if non-nil, zero value otherwise. + +### GetFieldOk + +`func (o *FilterMeta) GetFieldOk() (*string, bool)` + +GetFieldOk returns a tuple with the Field field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetField + +`func (o *FilterMeta) SetField(v string)` + +SetField sets Field field to given value. + +### HasField + +`func (o *FilterMeta) HasField() bool` + +HasField returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/slo/docs/FindSloDefinitionsResponse.md b/generated/slo/docs/FindSloDefinitionsResponse.md new file mode 100644 index 000000000..5774f4339 --- /dev/null +++ b/generated/slo/docs/FindSloDefinitionsResponse.md @@ -0,0 +1,186 @@ +# FindSloDefinitionsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Page** | Pointer to **float64** | for backward compability | [optional] [default to 1] +**PerPage** | Pointer to **float64** | for backward compability | [optional] +**Total** | Pointer to **float64** | | [optional] +**Results** | Pointer to [**[]SloWithSummaryResponse**](SloWithSummaryResponse.md) | | [optional] +**Size** | Pointer to **float64** | | [optional] +**SearchAfter** | Pointer to **[]string** | the cursor to provide to get the next paged results | [optional] + +## Methods + +### NewFindSloDefinitionsResponse + +`func NewFindSloDefinitionsResponse() *FindSloDefinitionsResponse` + +NewFindSloDefinitionsResponse instantiates a new FindSloDefinitionsResponse 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 + +### NewFindSloDefinitionsResponseWithDefaults + +`func NewFindSloDefinitionsResponseWithDefaults() *FindSloDefinitionsResponse` + +NewFindSloDefinitionsResponseWithDefaults instantiates a new FindSloDefinitionsResponse 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 + +### GetPage + +`func (o *FindSloDefinitionsResponse) GetPage() float64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *FindSloDefinitionsResponse) GetPageOk() (*float64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *FindSloDefinitionsResponse) SetPage(v float64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *FindSloDefinitionsResponse) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPerPage + +`func (o *FindSloDefinitionsResponse) GetPerPage() float64` + +GetPerPage returns the PerPage field if non-nil, zero value otherwise. + +### GetPerPageOk + +`func (o *FindSloDefinitionsResponse) GetPerPageOk() (*float64, bool)` + +GetPerPageOk returns a tuple with the PerPage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPerPage + +`func (o *FindSloDefinitionsResponse) SetPerPage(v float64)` + +SetPerPage sets PerPage field to given value. + +### HasPerPage + +`func (o *FindSloDefinitionsResponse) HasPerPage() bool` + +HasPerPage returns a boolean if a field has been set. + +### GetTotal + +`func (o *FindSloDefinitionsResponse) GetTotal() float64` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *FindSloDefinitionsResponse) GetTotalOk() (*float64, bool)` + +GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotal + +`func (o *FindSloDefinitionsResponse) SetTotal(v float64)` + +SetTotal sets Total field to given value. + +### HasTotal + +`func (o *FindSloDefinitionsResponse) HasTotal() bool` + +HasTotal returns a boolean if a field has been set. + +### GetResults + +`func (o *FindSloDefinitionsResponse) GetResults() []SloWithSummaryResponse` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *FindSloDefinitionsResponse) GetResultsOk() (*[]SloWithSummaryResponse, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *FindSloDefinitionsResponse) SetResults(v []SloWithSummaryResponse)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *FindSloDefinitionsResponse) HasResults() bool` + +HasResults returns a boolean if a field has been set. + +### GetSize + +`func (o *FindSloDefinitionsResponse) GetSize() float64` + +GetSize returns the Size field if non-nil, zero value otherwise. + +### GetSizeOk + +`func (o *FindSloDefinitionsResponse) GetSizeOk() (*float64, bool)` + +GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSize + +`func (o *FindSloDefinitionsResponse) SetSize(v float64)` + +SetSize sets Size field to given value. + +### HasSize + +`func (o *FindSloDefinitionsResponse) HasSize() bool` + +HasSize returns a boolean if a field has been set. + +### GetSearchAfter + +`func (o *FindSloDefinitionsResponse) GetSearchAfter() []string` + +GetSearchAfter returns the SearchAfter field if non-nil, zero value otherwise. + +### GetSearchAfterOk + +`func (o *FindSloDefinitionsResponse) GetSearchAfterOk() (*[]string, bool)` + +GetSearchAfterOk returns a tuple with the SearchAfter field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSearchAfter + +`func (o *FindSloDefinitionsResponse) SetSearchAfter(v []string)` + +SetSearchAfter sets SearchAfter field to given value. + +### HasSearchAfter + +`func (o *FindSloDefinitionsResponse) HasSearchAfter() bool` + +HasSearchAfter returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/slo/docs/FindSloDefinitionsResponseOneOf.md b/generated/slo/docs/FindSloDefinitionsResponseOneOf.md new file mode 100644 index 000000000..7c10f87c4 --- /dev/null +++ b/generated/slo/docs/FindSloDefinitionsResponseOneOf.md @@ -0,0 +1,134 @@ +# FindSloDefinitionsResponseOneOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Page** | Pointer to **float64** | | [optional] +**PerPage** | Pointer to **float64** | | [optional] +**Total** | Pointer to **float64** | | [optional] +**Results** | Pointer to [**[]SloWithSummaryResponse**](SloWithSummaryResponse.md) | | [optional] + +## Methods + +### NewFindSloDefinitionsResponseOneOf + +`func NewFindSloDefinitionsResponseOneOf() *FindSloDefinitionsResponseOneOf` + +NewFindSloDefinitionsResponseOneOf instantiates a new FindSloDefinitionsResponseOneOf 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 + +### NewFindSloDefinitionsResponseOneOfWithDefaults + +`func NewFindSloDefinitionsResponseOneOfWithDefaults() *FindSloDefinitionsResponseOneOf` + +NewFindSloDefinitionsResponseOneOfWithDefaults instantiates a new FindSloDefinitionsResponseOneOf 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 + +### GetPage + +`func (o *FindSloDefinitionsResponseOneOf) GetPage() float64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *FindSloDefinitionsResponseOneOf) GetPageOk() (*float64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *FindSloDefinitionsResponseOneOf) SetPage(v float64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *FindSloDefinitionsResponseOneOf) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPerPage + +`func (o *FindSloDefinitionsResponseOneOf) GetPerPage() float64` + +GetPerPage returns the PerPage field if non-nil, zero value otherwise. + +### GetPerPageOk + +`func (o *FindSloDefinitionsResponseOneOf) GetPerPageOk() (*float64, bool)` + +GetPerPageOk returns a tuple with the PerPage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPerPage + +`func (o *FindSloDefinitionsResponseOneOf) SetPerPage(v float64)` + +SetPerPage sets PerPage field to given value. + +### HasPerPage + +`func (o *FindSloDefinitionsResponseOneOf) HasPerPage() bool` + +HasPerPage returns a boolean if a field has been set. + +### GetTotal + +`func (o *FindSloDefinitionsResponseOneOf) GetTotal() float64` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *FindSloDefinitionsResponseOneOf) GetTotalOk() (*float64, bool)` + +GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotal + +`func (o *FindSloDefinitionsResponseOneOf) SetTotal(v float64)` + +SetTotal sets Total field to given value. + +### HasTotal + +`func (o *FindSloDefinitionsResponseOneOf) HasTotal() bool` + +HasTotal returns a boolean if a field has been set. + +### GetResults + +`func (o *FindSloDefinitionsResponseOneOf) GetResults() []SloWithSummaryResponse` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *FindSloDefinitionsResponseOneOf) GetResultsOk() (*[]SloWithSummaryResponse, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *FindSloDefinitionsResponseOneOf) SetResults(v []SloWithSummaryResponse)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *FindSloDefinitionsResponseOneOf) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/slo/docs/FindSloDefinitionsResponseOneOf1.md b/generated/slo/docs/FindSloDefinitionsResponseOneOf1.md new file mode 100644 index 000000000..ee6e5ae94 --- /dev/null +++ b/generated/slo/docs/FindSloDefinitionsResponseOneOf1.md @@ -0,0 +1,186 @@ +# FindSloDefinitionsResponseOneOf1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Page** | Pointer to **float64** | for backward compability | [optional] [default to 1] +**PerPage** | Pointer to **float64** | for backward compability | [optional] +**Size** | Pointer to **float64** | | [optional] +**SearchAfter** | Pointer to **[]string** | the cursor to provide to get the next paged results | [optional] +**Total** | Pointer to **float64** | | [optional] +**Results** | Pointer to [**[]SloWithSummaryResponse**](SloWithSummaryResponse.md) | | [optional] + +## Methods + +### NewFindSloDefinitionsResponseOneOf1 + +`func NewFindSloDefinitionsResponseOneOf1() *FindSloDefinitionsResponseOneOf1` + +NewFindSloDefinitionsResponseOneOf1 instantiates a new FindSloDefinitionsResponseOneOf1 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 + +### NewFindSloDefinitionsResponseOneOf1WithDefaults + +`func NewFindSloDefinitionsResponseOneOf1WithDefaults() *FindSloDefinitionsResponseOneOf1` + +NewFindSloDefinitionsResponseOneOf1WithDefaults instantiates a new FindSloDefinitionsResponseOneOf1 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 + +### GetPage + +`func (o *FindSloDefinitionsResponseOneOf1) GetPage() float64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *FindSloDefinitionsResponseOneOf1) GetPageOk() (*float64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *FindSloDefinitionsResponseOneOf1) SetPage(v float64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *FindSloDefinitionsResponseOneOf1) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPerPage + +`func (o *FindSloDefinitionsResponseOneOf1) GetPerPage() float64` + +GetPerPage returns the PerPage field if non-nil, zero value otherwise. + +### GetPerPageOk + +`func (o *FindSloDefinitionsResponseOneOf1) GetPerPageOk() (*float64, bool)` + +GetPerPageOk returns a tuple with the PerPage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPerPage + +`func (o *FindSloDefinitionsResponseOneOf1) SetPerPage(v float64)` + +SetPerPage sets PerPage field to given value. + +### HasPerPage + +`func (o *FindSloDefinitionsResponseOneOf1) HasPerPage() bool` + +HasPerPage returns a boolean if a field has been set. + +### GetSize + +`func (o *FindSloDefinitionsResponseOneOf1) GetSize() float64` + +GetSize returns the Size field if non-nil, zero value otherwise. + +### GetSizeOk + +`func (o *FindSloDefinitionsResponseOneOf1) GetSizeOk() (*float64, bool)` + +GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSize + +`func (o *FindSloDefinitionsResponseOneOf1) SetSize(v float64)` + +SetSize sets Size field to given value. + +### HasSize + +`func (o *FindSloDefinitionsResponseOneOf1) HasSize() bool` + +HasSize returns a boolean if a field has been set. + +### GetSearchAfter + +`func (o *FindSloDefinitionsResponseOneOf1) GetSearchAfter() []string` + +GetSearchAfter returns the SearchAfter field if non-nil, zero value otherwise. + +### GetSearchAfterOk + +`func (o *FindSloDefinitionsResponseOneOf1) GetSearchAfterOk() (*[]string, bool)` + +GetSearchAfterOk returns a tuple with the SearchAfter field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSearchAfter + +`func (o *FindSloDefinitionsResponseOneOf1) SetSearchAfter(v []string)` + +SetSearchAfter sets SearchAfter field to given value. + +### HasSearchAfter + +`func (o *FindSloDefinitionsResponseOneOf1) HasSearchAfter() bool` + +HasSearchAfter returns a boolean if a field has been set. + +### GetTotal + +`func (o *FindSloDefinitionsResponseOneOf1) GetTotal() float64` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *FindSloDefinitionsResponseOneOf1) GetTotalOk() (*float64, bool)` + +GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotal + +`func (o *FindSloDefinitionsResponseOneOf1) SetTotal(v float64)` + +SetTotal sets Total field to given value. + +### HasTotal + +`func (o *FindSloDefinitionsResponseOneOf1) HasTotal() bool` + +HasTotal returns a boolean if a field has been set. + +### GetResults + +`func (o *FindSloDefinitionsResponseOneOf1) GetResults() []SloWithSummaryResponse` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *FindSloDefinitionsResponseOneOf1) GetResultsOk() (*[]SloWithSummaryResponse, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *FindSloDefinitionsResponseOneOf1) SetResults(v []SloWithSummaryResponse)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *FindSloDefinitionsResponseOneOf1) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/slo/docs/FindSloResponse.md b/generated/slo/docs/FindSloResponse.md index f881cfaf7..c807a23cb 100644 --- a/generated/slo/docs/FindSloResponse.md +++ b/generated/slo/docs/FindSloResponse.md @@ -4,10 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**Size** | Pointer to **float64** | Size provided for cursor based pagination | [optional] +**SearchAfter** | Pointer to **string** | | [optional] **Page** | Pointer to **float64** | | [optional] **PerPage** | Pointer to **float64** | | [optional] **Total** | Pointer to **float64** | | [optional] -**Results** | Pointer to [**[]SloResponse**](SloResponse.md) | | [optional] +**Results** | Pointer to [**[]SloWithSummaryResponse**](SloWithSummaryResponse.md) | | [optional] ## Methods @@ -28,6 +30,56 @@ NewFindSloResponseWithDefaults instantiates a new FindSloResponse 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 +### GetSize + +`func (o *FindSloResponse) GetSize() float64` + +GetSize returns the Size field if non-nil, zero value otherwise. + +### GetSizeOk + +`func (o *FindSloResponse) GetSizeOk() (*float64, bool)` + +GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSize + +`func (o *FindSloResponse) SetSize(v float64)` + +SetSize sets Size field to given value. + +### HasSize + +`func (o *FindSloResponse) HasSize() bool` + +HasSize returns a boolean if a field has been set. + +### GetSearchAfter + +`func (o *FindSloResponse) GetSearchAfter() string` + +GetSearchAfter returns the SearchAfter field if non-nil, zero value otherwise. + +### GetSearchAfterOk + +`func (o *FindSloResponse) GetSearchAfterOk() (*string, bool)` + +GetSearchAfterOk returns a tuple with the SearchAfter field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSearchAfter + +`func (o *FindSloResponse) SetSearchAfter(v string)` + +SetSearchAfter sets SearchAfter field to given value. + +### HasSearchAfter + +`func (o *FindSloResponse) HasSearchAfter() bool` + +HasSearchAfter returns a boolean if a field has been set. + ### GetPage `func (o *FindSloResponse) GetPage() float64` @@ -105,20 +157,20 @@ HasTotal returns a boolean if a field has been set. ### GetResults -`func (o *FindSloResponse) GetResults() []SloResponse` +`func (o *FindSloResponse) GetResults() []SloWithSummaryResponse` GetResults returns the Results field if non-nil, zero value otherwise. ### GetResultsOk -`func (o *FindSloResponse) GetResultsOk() (*[]SloResponse, bool)` +`func (o *FindSloResponse) GetResultsOk() (*[]SloWithSummaryResponse, bool)` GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetResults -`func (o *FindSloResponse) SetResults(v []SloResponse)` +`func (o *FindSloResponse) SetResults(v []SloWithSummaryResponse)` SetResults sets Results field to given value. diff --git a/generated/slo/docs/SloResponseGroupBy.md b/generated/slo/docs/GroupBy.md similarity index 65% rename from generated/slo/docs/SloResponseGroupBy.md rename to generated/slo/docs/GroupBy.md index 81a44275f..1d8f878a1 100644 --- a/generated/slo/docs/SloResponseGroupBy.md +++ b/generated/slo/docs/GroupBy.md @@ -1,4 +1,4 @@ -# SloResponseGroupBy +# GroupBy ## Properties @@ -7,20 +7,20 @@ Name | Type | Description | Notes ## Methods -### NewSloResponseGroupBy +### NewGroupBy -`func NewSloResponseGroupBy() *SloResponseGroupBy` +`func NewGroupBy() *GroupBy` -NewSloResponseGroupBy instantiates a new SloResponseGroupBy object +NewGroupBy instantiates a new GroupBy 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 -### NewSloResponseGroupByWithDefaults +### NewGroupByWithDefaults -`func NewSloResponseGroupByWithDefaults() *SloResponseGroupBy` +`func NewGroupByWithDefaults() *GroupBy` -NewSloResponseGroupByWithDefaults instantiates a new SloResponseGroupBy object +NewGroupByWithDefaults instantiates a new GroupBy 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 diff --git a/generated/slo/docs/HistoricalSummaryResponseInner.md b/generated/slo/docs/HistoricalSummaryResponseInner.md deleted file mode 100644 index ea3c738b3..000000000 --- a/generated/slo/docs/HistoricalSummaryResponseInner.md +++ /dev/null @@ -1,134 +0,0 @@ -# HistoricalSummaryResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Date** | Pointer to **string** | | [optional] -**Status** | Pointer to [**SummaryStatus**](SummaryStatus.md) | | [optional] -**SliValue** | Pointer to **float64** | | [optional] -**ErrorBudget** | Pointer to [**ErrorBudget**](ErrorBudget.md) | | [optional] - -## Methods - -### NewHistoricalSummaryResponseInner - -`func NewHistoricalSummaryResponseInner() *HistoricalSummaryResponseInner` - -NewHistoricalSummaryResponseInner instantiates a new HistoricalSummaryResponseInner 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 - -### NewHistoricalSummaryResponseInnerWithDefaults - -`func NewHistoricalSummaryResponseInnerWithDefaults() *HistoricalSummaryResponseInner` - -NewHistoricalSummaryResponseInnerWithDefaults instantiates a new HistoricalSummaryResponseInner 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 - -### GetDate - -`func (o *HistoricalSummaryResponseInner) GetDate() string` - -GetDate returns the Date field if non-nil, zero value otherwise. - -### GetDateOk - -`func (o *HistoricalSummaryResponseInner) GetDateOk() (*string, bool)` - -GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDate - -`func (o *HistoricalSummaryResponseInner) SetDate(v string)` - -SetDate sets Date field to given value. - -### HasDate - -`func (o *HistoricalSummaryResponseInner) HasDate() bool` - -HasDate returns a boolean if a field has been set. - -### GetStatus - -`func (o *HistoricalSummaryResponseInner) GetStatus() SummaryStatus` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *HistoricalSummaryResponseInner) GetStatusOk() (*SummaryStatus, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *HistoricalSummaryResponseInner) SetStatus(v SummaryStatus)` - -SetStatus sets Status field to given value. - -### HasStatus - -`func (o *HistoricalSummaryResponseInner) HasStatus() bool` - -HasStatus returns a boolean if a field has been set. - -### GetSliValue - -`func (o *HistoricalSummaryResponseInner) GetSliValue() float64` - -GetSliValue returns the SliValue field if non-nil, zero value otherwise. - -### GetSliValueOk - -`func (o *HistoricalSummaryResponseInner) GetSliValueOk() (*float64, bool)` - -GetSliValueOk returns a tuple with the SliValue field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSliValue - -`func (o *HistoricalSummaryResponseInner) SetSliValue(v float64)` - -SetSliValue sets SliValue field to given value. - -### HasSliValue - -`func (o *HistoricalSummaryResponseInner) HasSliValue() bool` - -HasSliValue returns a boolean if a field has been set. - -### GetErrorBudget - -`func (o *HistoricalSummaryResponseInner) GetErrorBudget() ErrorBudget` - -GetErrorBudget returns the ErrorBudget field if non-nil, zero value otherwise. - -### GetErrorBudgetOk - -`func (o *HistoricalSummaryResponseInner) GetErrorBudgetOk() (*ErrorBudget, bool)` - -GetErrorBudgetOk returns a tuple with the ErrorBudget field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetErrorBudget - -`func (o *HistoricalSummaryResponseInner) SetErrorBudget(v ErrorBudget)` - -SetErrorBudget sets ErrorBudget field to given value. - -### HasErrorBudget - -`func (o *HistoricalSummaryResponseInner) HasErrorBudget() bool` - -HasErrorBudget returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/generated/slo/docs/IndicatorPropertiesCustomKqlParams.md b/generated/slo/docs/IndicatorPropertiesCustomKqlParams.md index 317db1569..9b044dfbf 100644 --- a/generated/slo/docs/IndicatorPropertiesCustomKqlParams.md +++ b/generated/slo/docs/IndicatorPropertiesCustomKqlParams.md @@ -5,16 +5,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Index** | **string** | The index or index pattern to use | -**Filter** | Pointer to **string** | the KQL query to filter the documents with. | [optional] -**Good** | **string** | the KQL query used to define the good events. | -**Total** | **string** | the KQL query used to define all events. | +**DataViewId** | Pointer to **string** | The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries. | [optional] +**Filter** | Pointer to [**KqlWithFilters**](KqlWithFilters.md) | | [optional] +**Good** | [**KqlWithFiltersGood**](KqlWithFiltersGood.md) | | +**Total** | [**KqlWithFiltersTotal**](KqlWithFiltersTotal.md) | | **TimestampField** | **string** | The timestamp field used in the source indice. | ## Methods ### NewIndicatorPropertiesCustomKqlParams -`func NewIndicatorPropertiesCustomKqlParams(index string, good string, total string, timestampField string, ) *IndicatorPropertiesCustomKqlParams` +`func NewIndicatorPropertiesCustomKqlParams(index string, good KqlWithFiltersGood, total KqlWithFiltersTotal, timestampField string, ) *IndicatorPropertiesCustomKqlParams` NewIndicatorPropertiesCustomKqlParams instantiates a new IndicatorPropertiesCustomKqlParams object This constructor will assign default values to properties that have it defined, @@ -49,22 +50,47 @@ and a boolean to check if the value has been set. SetIndex sets Index field to given value. +### GetDataViewId + +`func (o *IndicatorPropertiesCustomKqlParams) GetDataViewId() string` + +GetDataViewId returns the DataViewId field if non-nil, zero value otherwise. + +### GetDataViewIdOk + +`func (o *IndicatorPropertiesCustomKqlParams) GetDataViewIdOk() (*string, bool)` + +GetDataViewIdOk returns a tuple with the DataViewId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDataViewId + +`func (o *IndicatorPropertiesCustomKqlParams) SetDataViewId(v string)` + +SetDataViewId sets DataViewId field to given value. + +### HasDataViewId + +`func (o *IndicatorPropertiesCustomKqlParams) HasDataViewId() bool` + +HasDataViewId returns a boolean if a field has been set. + ### GetFilter -`func (o *IndicatorPropertiesCustomKqlParams) GetFilter() string` +`func (o *IndicatorPropertiesCustomKqlParams) GetFilter() KqlWithFilters` GetFilter returns the Filter field if non-nil, zero value otherwise. ### GetFilterOk -`func (o *IndicatorPropertiesCustomKqlParams) GetFilterOk() (*string, bool)` +`func (o *IndicatorPropertiesCustomKqlParams) GetFilterOk() (*KqlWithFilters, bool)` GetFilterOk returns a tuple with the Filter field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFilter -`func (o *IndicatorPropertiesCustomKqlParams) SetFilter(v string)` +`func (o *IndicatorPropertiesCustomKqlParams) SetFilter(v KqlWithFilters)` SetFilter sets Filter field to given value. @@ -76,40 +102,40 @@ HasFilter returns a boolean if a field has been set. ### GetGood -`func (o *IndicatorPropertiesCustomKqlParams) GetGood() string` +`func (o *IndicatorPropertiesCustomKqlParams) GetGood() KqlWithFiltersGood` GetGood returns the Good field if non-nil, zero value otherwise. ### GetGoodOk -`func (o *IndicatorPropertiesCustomKqlParams) GetGoodOk() (*string, bool)` +`func (o *IndicatorPropertiesCustomKqlParams) GetGoodOk() (*KqlWithFiltersGood, bool)` GetGoodOk returns a tuple with the Good field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetGood -`func (o *IndicatorPropertiesCustomKqlParams) SetGood(v string)` +`func (o *IndicatorPropertiesCustomKqlParams) SetGood(v KqlWithFiltersGood)` SetGood sets Good field to given value. ### GetTotal -`func (o *IndicatorPropertiesCustomKqlParams) GetTotal() string` +`func (o *IndicatorPropertiesCustomKqlParams) GetTotal() KqlWithFiltersTotal` GetTotal returns the Total field if non-nil, zero value otherwise. ### GetTotalOk -`func (o *IndicatorPropertiesCustomKqlParams) GetTotalOk() (*string, bool)` +`func (o *IndicatorPropertiesCustomKqlParams) GetTotalOk() (*KqlWithFiltersTotal, bool)` GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTotal -`func (o *IndicatorPropertiesCustomKqlParams) SetTotal(v string)` +`func (o *IndicatorPropertiesCustomKqlParams) SetTotal(v KqlWithFiltersTotal)` SetTotal sets Total field to given value. diff --git a/generated/slo/docs/IndicatorPropertiesCustomMetricParams.md b/generated/slo/docs/IndicatorPropertiesCustomMetricParams.md index ea6814410..28532ea6b 100644 --- a/generated/slo/docs/IndicatorPropertiesCustomMetricParams.md +++ b/generated/slo/docs/IndicatorPropertiesCustomMetricParams.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Index** | **string** | The index or index pattern to use | +**DataViewId** | Pointer to **string** | The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries. | [optional] **Filter** | Pointer to **string** | the KQL query to filter the documents with. | [optional] **TimestampField** | **string** | The timestamp field used in the source indice. | **Good** | [**IndicatorPropertiesCustomMetricParamsGood**](IndicatorPropertiesCustomMetricParamsGood.md) | | @@ -49,6 +50,31 @@ and a boolean to check if the value has been set. SetIndex sets Index field to given value. +### GetDataViewId + +`func (o *IndicatorPropertiesCustomMetricParams) GetDataViewId() string` + +GetDataViewId returns the DataViewId field if non-nil, zero value otherwise. + +### GetDataViewIdOk + +`func (o *IndicatorPropertiesCustomMetricParams) GetDataViewIdOk() (*string, bool)` + +GetDataViewIdOk returns a tuple with the DataViewId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDataViewId + +`func (o *IndicatorPropertiesCustomMetricParams) SetDataViewId(v string)` + +SetDataViewId sets DataViewId field to given value. + +### HasDataViewId + +`func (o *IndicatorPropertiesCustomMetricParams) HasDataViewId() bool` + +HasDataViewId returns a boolean if a field has been set. + ### GetFilter `func (o *IndicatorPropertiesCustomMetricParams) GetFilter() string` diff --git a/generated/slo/docs/IndicatorPropertiesCustomMetricParamsGoodMetricsInner.md b/generated/slo/docs/IndicatorPropertiesCustomMetricParamsGoodMetricsInner.md index 3d485fa6c..579856e03 100644 --- a/generated/slo/docs/IndicatorPropertiesCustomMetricParamsGoodMetricsInner.md +++ b/generated/slo/docs/IndicatorPropertiesCustomMetricParamsGoodMetricsInner.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | The name of the metric. Only valid options are A-Z | -**Aggregation** | **string** | The aggregation type of the metric. Only valid option is \"sum\" | +**Aggregation** | **string** | The aggregation type of the metric. | **Field** | **string** | The field of the metric. | **Filter** | Pointer to **string** | The filter to apply to the metric. | [optional] diff --git a/generated/slo/docs/IndicatorPropertiesCustomMetricParamsTotalMetricsInner.md b/generated/slo/docs/IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf.md similarity index 52% rename from generated/slo/docs/IndicatorPropertiesCustomMetricParamsTotalMetricsInner.md rename to generated/slo/docs/IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf.md index 6f528a370..ec617ebd4 100644 --- a/generated/slo/docs/IndicatorPropertiesCustomMetricParamsTotalMetricsInner.md +++ b/generated/slo/docs/IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf.md @@ -1,115 +1,115 @@ -# IndicatorPropertiesCustomMetricParamsTotalMetricsInner +# IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | The name of the metric. Only valid options are A-Z | -**Aggregation** | **string** | The aggregation type of the metric. Only valid option is \"sum\" | +**Aggregation** | **string** | The aggregation type of the metric. | **Field** | **string** | The field of the metric. | **Filter** | Pointer to **string** | The filter to apply to the metric. | [optional] ## Methods -### NewIndicatorPropertiesCustomMetricParamsTotalMetricsInner +### NewIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf -`func NewIndicatorPropertiesCustomMetricParamsTotalMetricsInner(name string, aggregation string, field string, ) *IndicatorPropertiesCustomMetricParamsTotalMetricsInner` +`func NewIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf(name string, aggregation string, field string, ) *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf` -NewIndicatorPropertiesCustomMetricParamsTotalMetricsInner instantiates a new IndicatorPropertiesCustomMetricParamsTotalMetricsInner object +NewIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf instantiates a new IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf 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 -### NewIndicatorPropertiesCustomMetricParamsTotalMetricsInnerWithDefaults +### NewIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOfWithDefaults -`func NewIndicatorPropertiesCustomMetricParamsTotalMetricsInnerWithDefaults() *IndicatorPropertiesCustomMetricParamsTotalMetricsInner` +`func NewIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOfWithDefaults() *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf` -NewIndicatorPropertiesCustomMetricParamsTotalMetricsInnerWithDefaults instantiates a new IndicatorPropertiesCustomMetricParamsTotalMetricsInner object +NewIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOfWithDefaults instantiates a new IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetName -`func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetName() string` +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetNameOk() (*string, bool)` +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName -`func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) SetName(v string)` +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) SetName(v string)` SetName sets Name field to given value. ### GetAggregation -`func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetAggregation() string` +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) GetAggregation() string` GetAggregation returns the Aggregation field if non-nil, zero value otherwise. ### GetAggregationOk -`func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetAggregationOk() (*string, bool)` +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) GetAggregationOk() (*string, bool)` GetAggregationOk returns a tuple with the Aggregation field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetAggregation -`func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) SetAggregation(v string)` +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) SetAggregation(v string)` SetAggregation sets Aggregation field to given value. ### GetField -`func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetField() string` +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) GetField() string` GetField returns the Field field if non-nil, zero value otherwise. ### GetFieldOk -`func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetFieldOk() (*string, bool)` +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) GetFieldOk() (*string, bool)` GetFieldOk returns a tuple with the Field field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetField -`func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) SetField(v string)` +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) SetField(v string)` SetField sets Field field to given value. ### GetFilter -`func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetFilter() string` +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) GetFilter() string` GetFilter returns the Filter field if non-nil, zero value otherwise. ### GetFilterOk -`func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetFilterOk() (*string, bool)` +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) GetFilterOk() (*string, bool)` GetFilterOk returns a tuple with the Filter field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFilter -`func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) SetFilter(v string)` +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) SetFilter(v string)` SetFilter sets Filter field to given value. ### HasFilter -`func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) HasFilter() bool` +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) HasFilter() bool` HasFilter returns a boolean if a field has been set. diff --git a/generated/slo/docs/IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1.md b/generated/slo/docs/IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1.md new file mode 100644 index 000000000..4920938d9 --- /dev/null +++ b/generated/slo/docs/IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1.md @@ -0,0 +1,98 @@ +# IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the metric. Only valid options are A-Z | +**Aggregation** | **string** | The aggregation type of the metric. | +**Filter** | Pointer to **string** | The filter to apply to the metric. | [optional] + +## Methods + +### NewIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 + +`func NewIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1(name string, aggregation string, ) *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1` + +NewIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 instantiates a new IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 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 + +### NewIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1WithDefaults + +`func NewIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1WithDefaults() *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1` + +NewIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1WithDefaults instantiates a new IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) SetName(v string)` + +SetName sets Name field to given value. + + +### GetAggregation + +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) GetAggregation() string` + +GetAggregation returns the Aggregation field if non-nil, zero value otherwise. + +### GetAggregationOk + +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) GetAggregationOk() (*string, bool)` + +GetAggregationOk returns a tuple with the Aggregation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAggregation + +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) SetAggregation(v string)` + +SetAggregation sets Aggregation field to given value. + + +### GetFilter + +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) GetFilter() string` + +GetFilter returns the Filter field if non-nil, zero value otherwise. + +### GetFilterOk + +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) GetFilterOk() (*string, bool)` + +GetFilterOk returns a tuple with the Filter field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFilter + +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) SetFilter(v string)` + +SetFilter sets Filter field to given value. + +### HasFilter + +`func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) HasFilter() bool` + +HasFilter returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/slo/docs/IndicatorPropertiesCustomMetricParamsTotal.md b/generated/slo/docs/IndicatorPropertiesCustomMetricParamsTotal.md index 9b33ee2fe..f0f1df1af 100644 --- a/generated/slo/docs/IndicatorPropertiesCustomMetricParamsTotal.md +++ b/generated/slo/docs/IndicatorPropertiesCustomMetricParamsTotal.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Metrics** | [**[]IndicatorPropertiesCustomMetricParamsTotalMetricsInner**](IndicatorPropertiesCustomMetricParamsTotalMetricsInner.md) | List of metrics with their name, aggregation type, and field. | +**Metrics** | [**[]IndicatorPropertiesCustomMetricParamsGoodMetricsInner**](IndicatorPropertiesCustomMetricParamsGoodMetricsInner.md) | List of metrics with their name, aggregation type, and field. | **Equation** | **string** | The equation to calculate the \"total\" metric. | ## Methods ### NewIndicatorPropertiesCustomMetricParamsTotal -`func NewIndicatorPropertiesCustomMetricParamsTotal(metrics []IndicatorPropertiesCustomMetricParamsTotalMetricsInner, equation string, ) *IndicatorPropertiesCustomMetricParamsTotal` +`func NewIndicatorPropertiesCustomMetricParamsTotal(metrics []IndicatorPropertiesCustomMetricParamsGoodMetricsInner, equation string, ) *IndicatorPropertiesCustomMetricParamsTotal` NewIndicatorPropertiesCustomMetricParamsTotal instantiates a new IndicatorPropertiesCustomMetricParamsTotal object This constructor will assign default values to properties that have it defined, @@ -28,20 +28,20 @@ but it doesn't guarantee that properties required by API are set ### GetMetrics -`func (o *IndicatorPropertiesCustomMetricParamsTotal) GetMetrics() []IndicatorPropertiesCustomMetricParamsTotalMetricsInner` +`func (o *IndicatorPropertiesCustomMetricParamsTotal) GetMetrics() []IndicatorPropertiesCustomMetricParamsGoodMetricsInner` GetMetrics returns the Metrics field if non-nil, zero value otherwise. ### GetMetricsOk -`func (o *IndicatorPropertiesCustomMetricParamsTotal) GetMetricsOk() (*[]IndicatorPropertiesCustomMetricParamsTotalMetricsInner, bool)` +`func (o *IndicatorPropertiesCustomMetricParamsTotal) GetMetricsOk() (*[]IndicatorPropertiesCustomMetricParamsGoodMetricsInner, bool)` GetMetricsOk returns a tuple with the Metrics field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetMetrics -`func (o *IndicatorPropertiesCustomMetricParamsTotal) SetMetrics(v []IndicatorPropertiesCustomMetricParamsTotalMetricsInner)` +`func (o *IndicatorPropertiesCustomMetricParamsTotal) SetMetrics(v []IndicatorPropertiesCustomMetricParamsGoodMetricsInner)` SetMetrics sets Metrics field to given value. diff --git a/generated/slo/docs/IndicatorPropertiesHistogramParams.md b/generated/slo/docs/IndicatorPropertiesHistogramParams.md index 89263c048..f2b432a67 100644 --- a/generated/slo/docs/IndicatorPropertiesHistogramParams.md +++ b/generated/slo/docs/IndicatorPropertiesHistogramParams.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Index** | **string** | The index or index pattern to use | +**DataViewId** | Pointer to **string** | The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries. | [optional] **Filter** | Pointer to **string** | the KQL query to filter the documents with. | [optional] **TimestampField** | **string** | The timestamp field used in the source indice. | **Good** | [**IndicatorPropertiesHistogramParamsGood**](IndicatorPropertiesHistogramParamsGood.md) | | @@ -49,6 +50,31 @@ and a boolean to check if the value has been set. SetIndex sets Index field to given value. +### GetDataViewId + +`func (o *IndicatorPropertiesHistogramParams) GetDataViewId() string` + +GetDataViewId returns the DataViewId field if non-nil, zero value otherwise. + +### GetDataViewIdOk + +`func (o *IndicatorPropertiesHistogramParams) GetDataViewIdOk() (*string, bool)` + +GetDataViewIdOk returns a tuple with the DataViewId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDataViewId + +`func (o *IndicatorPropertiesHistogramParams) SetDataViewId(v string)` + +SetDataViewId sets DataViewId field to given value. + +### HasDataViewId + +`func (o *IndicatorPropertiesHistogramParams) HasDataViewId() bool` + +HasDataViewId returns a boolean if a field has been set. + ### GetFilter `func (o *IndicatorPropertiesHistogramParams) GetFilter() string` diff --git a/generated/slo/docs/IndicatorPropertiesTimesliceMetricParams.md b/generated/slo/docs/IndicatorPropertiesTimesliceMetricParams.md index ad08d9256..89e8825c0 100644 --- a/generated/slo/docs/IndicatorPropertiesTimesliceMetricParams.md +++ b/generated/slo/docs/IndicatorPropertiesTimesliceMetricParams.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Index** | **string** | The index or index pattern to use | +**DataViewId** | Pointer to **string** | The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries. | [optional] **Filter** | Pointer to **string** | the KQL query to filter the documents with. | [optional] **TimestampField** | **string** | The timestamp field used in the source indice. | **Metric** | [**IndicatorPropertiesTimesliceMetricParamsMetric**](IndicatorPropertiesTimesliceMetricParamsMetric.md) | | @@ -48,6 +49,31 @@ and a boolean to check if the value has been set. SetIndex sets Index field to given value. +### GetDataViewId + +`func (o *IndicatorPropertiesTimesliceMetricParams) GetDataViewId() string` + +GetDataViewId returns the DataViewId field if non-nil, zero value otherwise. + +### GetDataViewIdOk + +`func (o *IndicatorPropertiesTimesliceMetricParams) GetDataViewIdOk() (*string, bool)` + +GetDataViewIdOk returns a tuple with the DataViewId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDataViewId + +`func (o *IndicatorPropertiesTimesliceMetricParams) SetDataViewId(v string)` + +SetDataViewId sets DataViewId field to given value. + +### HasDataViewId + +`func (o *IndicatorPropertiesTimesliceMetricParams) HasDataViewId() bool` + +HasDataViewId returns a boolean if a field has been set. + ### GetFilter `func (o *IndicatorPropertiesTimesliceMetricParams) GetFilter() string` diff --git a/generated/slo/docs/KqlWithFilters.md b/generated/slo/docs/KqlWithFilters.md new file mode 100644 index 000000000..bf349231e --- /dev/null +++ b/generated/slo/docs/KqlWithFilters.md @@ -0,0 +1,82 @@ +# KqlWithFilters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**KqlQuery** | Pointer to **string** | | [optional] +**Filters** | Pointer to [**[]Filter**](Filter.md) | | [optional] + +## Methods + +### NewKqlWithFilters + +`func NewKqlWithFilters() *KqlWithFilters` + +NewKqlWithFilters instantiates a new KqlWithFilters 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 + +### NewKqlWithFiltersWithDefaults + +`func NewKqlWithFiltersWithDefaults() *KqlWithFilters` + +NewKqlWithFiltersWithDefaults instantiates a new KqlWithFilters 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 + +### GetKqlQuery + +`func (o *KqlWithFilters) GetKqlQuery() string` + +GetKqlQuery returns the KqlQuery field if non-nil, zero value otherwise. + +### GetKqlQueryOk + +`func (o *KqlWithFilters) GetKqlQueryOk() (*string, bool)` + +GetKqlQueryOk returns a tuple with the KqlQuery field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKqlQuery + +`func (o *KqlWithFilters) SetKqlQuery(v string)` + +SetKqlQuery sets KqlQuery field to given value. + +### HasKqlQuery + +`func (o *KqlWithFilters) HasKqlQuery() bool` + +HasKqlQuery returns a boolean if a field has been set. + +### GetFilters + +`func (o *KqlWithFilters) GetFilters() []Filter` + +GetFilters returns the Filters field if non-nil, zero value otherwise. + +### GetFiltersOk + +`func (o *KqlWithFilters) GetFiltersOk() (*[]Filter, bool)` + +GetFiltersOk returns a tuple with the Filters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFilters + +`func (o *KqlWithFilters) SetFilters(v []Filter)` + +SetFilters sets Filters field to given value. + +### HasFilters + +`func (o *KqlWithFilters) HasFilters() bool` + +HasFilters returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/slo/docs/KqlWithFiltersGood.md b/generated/slo/docs/KqlWithFiltersGood.md new file mode 100644 index 000000000..9fb63f991 --- /dev/null +++ b/generated/slo/docs/KqlWithFiltersGood.md @@ -0,0 +1,82 @@ +# KqlWithFiltersGood + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**KqlQuery** | Pointer to **string** | | [optional] +**Filters** | Pointer to [**[]Filter**](Filter.md) | | [optional] + +## Methods + +### NewKqlWithFiltersGood + +`func NewKqlWithFiltersGood() *KqlWithFiltersGood` + +NewKqlWithFiltersGood instantiates a new KqlWithFiltersGood 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 + +### NewKqlWithFiltersGoodWithDefaults + +`func NewKqlWithFiltersGoodWithDefaults() *KqlWithFiltersGood` + +NewKqlWithFiltersGoodWithDefaults instantiates a new KqlWithFiltersGood 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 + +### GetKqlQuery + +`func (o *KqlWithFiltersGood) GetKqlQuery() string` + +GetKqlQuery returns the KqlQuery field if non-nil, zero value otherwise. + +### GetKqlQueryOk + +`func (o *KqlWithFiltersGood) GetKqlQueryOk() (*string, bool)` + +GetKqlQueryOk returns a tuple with the KqlQuery field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKqlQuery + +`func (o *KqlWithFiltersGood) SetKqlQuery(v string)` + +SetKqlQuery sets KqlQuery field to given value. + +### HasKqlQuery + +`func (o *KqlWithFiltersGood) HasKqlQuery() bool` + +HasKqlQuery returns a boolean if a field has been set. + +### GetFilters + +`func (o *KqlWithFiltersGood) GetFilters() []Filter` + +GetFilters returns the Filters field if non-nil, zero value otherwise. + +### GetFiltersOk + +`func (o *KqlWithFiltersGood) GetFiltersOk() (*[]Filter, bool)` + +GetFiltersOk returns a tuple with the Filters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFilters + +`func (o *KqlWithFiltersGood) SetFilters(v []Filter)` + +SetFilters sets Filters field to given value. + +### HasFilters + +`func (o *KqlWithFiltersGood) HasFilters() bool` + +HasFilters returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/slo/docs/KqlWithFiltersOneOf.md b/generated/slo/docs/KqlWithFiltersOneOf.md new file mode 100644 index 000000000..335fe503a --- /dev/null +++ b/generated/slo/docs/KqlWithFiltersOneOf.md @@ -0,0 +1,82 @@ +# KqlWithFiltersOneOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**KqlQuery** | Pointer to **string** | | [optional] +**Filters** | Pointer to [**[]Filter**](Filter.md) | | [optional] + +## Methods + +### NewKqlWithFiltersOneOf + +`func NewKqlWithFiltersOneOf() *KqlWithFiltersOneOf` + +NewKqlWithFiltersOneOf instantiates a new KqlWithFiltersOneOf 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 + +### NewKqlWithFiltersOneOfWithDefaults + +`func NewKqlWithFiltersOneOfWithDefaults() *KqlWithFiltersOneOf` + +NewKqlWithFiltersOneOfWithDefaults instantiates a new KqlWithFiltersOneOf 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 + +### GetKqlQuery + +`func (o *KqlWithFiltersOneOf) GetKqlQuery() string` + +GetKqlQuery returns the KqlQuery field if non-nil, zero value otherwise. + +### GetKqlQueryOk + +`func (o *KqlWithFiltersOneOf) GetKqlQueryOk() (*string, bool)` + +GetKqlQueryOk returns a tuple with the KqlQuery field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKqlQuery + +`func (o *KqlWithFiltersOneOf) SetKqlQuery(v string)` + +SetKqlQuery sets KqlQuery field to given value. + +### HasKqlQuery + +`func (o *KqlWithFiltersOneOf) HasKqlQuery() bool` + +HasKqlQuery returns a boolean if a field has been set. + +### GetFilters + +`func (o *KqlWithFiltersOneOf) GetFilters() []Filter` + +GetFilters returns the Filters field if non-nil, zero value otherwise. + +### GetFiltersOk + +`func (o *KqlWithFiltersOneOf) GetFiltersOk() (*[]Filter, bool)` + +GetFiltersOk returns a tuple with the Filters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFilters + +`func (o *KqlWithFiltersOneOf) SetFilters(v []Filter)` + +SetFilters sets Filters field to given value. + +### HasFilters + +`func (o *KqlWithFiltersOneOf) HasFilters() bool` + +HasFilters returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/slo/docs/KqlWithFiltersTotal.md b/generated/slo/docs/KqlWithFiltersTotal.md new file mode 100644 index 000000000..afb7e2072 --- /dev/null +++ b/generated/slo/docs/KqlWithFiltersTotal.md @@ -0,0 +1,82 @@ +# KqlWithFiltersTotal + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**KqlQuery** | Pointer to **string** | | [optional] +**Filters** | Pointer to [**[]Filter**](Filter.md) | | [optional] + +## Methods + +### NewKqlWithFiltersTotal + +`func NewKqlWithFiltersTotal() *KqlWithFiltersTotal` + +NewKqlWithFiltersTotal instantiates a new KqlWithFiltersTotal 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 + +### NewKqlWithFiltersTotalWithDefaults + +`func NewKqlWithFiltersTotalWithDefaults() *KqlWithFiltersTotal` + +NewKqlWithFiltersTotalWithDefaults instantiates a new KqlWithFiltersTotal 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 + +### GetKqlQuery + +`func (o *KqlWithFiltersTotal) GetKqlQuery() string` + +GetKqlQuery returns the KqlQuery field if non-nil, zero value otherwise. + +### GetKqlQueryOk + +`func (o *KqlWithFiltersTotal) GetKqlQueryOk() (*string, bool)` + +GetKqlQueryOk returns a tuple with the KqlQuery field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKqlQuery + +`func (o *KqlWithFiltersTotal) SetKqlQuery(v string)` + +SetKqlQuery sets KqlQuery field to given value. + +### HasKqlQuery + +`func (o *KqlWithFiltersTotal) HasKqlQuery() bool` + +HasKqlQuery returns a boolean if a field has been set. + +### GetFilters + +`func (o *KqlWithFiltersTotal) GetFilters() []Filter` + +GetFilters returns the Filters field if non-nil, zero value otherwise. + +### GetFiltersOk + +`func (o *KqlWithFiltersTotal) GetFiltersOk() (*[]Filter, bool)` + +GetFiltersOk returns a tuple with the Filters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFilters + +`func (o *KqlWithFiltersTotal) SetFilters(v []Filter)` + +SetFilters sets Filters field to given value. + +### HasFilters + +`func (o *KqlWithFiltersTotal) HasFilters() bool` + +HasFilters returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/slo/docs/Settings.md b/generated/slo/docs/Settings.md index d501ad1eb..65528a3d1 100644 --- a/generated/slo/docs/Settings.md +++ b/generated/slo/docs/Settings.md @@ -4,8 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SyncDelay** | Pointer to **string** | The synch delay to apply to the transform. Default 1m | [optional] -**Frequency** | Pointer to **string** | Configure how often the transform runs, default 1m | [optional] +**SyncField** | Pointer to **string** | The date field that is used to identify new documents in the source. It is strongly recommended to use a field that contains the ingest timestamp. If you use a different field, you might need to set the delay such that it accounts for data transmission delays. When unspecified, we use the indicator timestamp field. | [optional] +**SyncDelay** | Pointer to **string** | The time delay in minutes between the current time and the latest source data time. Increasing the value will delay any alerting. The default value is 1 minute. The minimum value is 1m and the maximum is 359m. It should always be greater then source index refresh interval. | [optional] [default to "1m"] +**Frequency** | Pointer to **string** | The interval between checks for changes in the source data. The minimum value is 1m and the maximum is 59m. The default value is 1 minute. | [optional] [default to "1m"] +**PreventInitialBackfill** | Pointer to **bool** | Start aggregating data from the time the SLO is created, instead of backfilling data from the beginning of the time window. | [optional] [default to false] ## Methods @@ -26,6 +28,31 @@ NewSettingsWithDefaults instantiates a new Settings 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 +### GetSyncField + +`func (o *Settings) GetSyncField() string` + +GetSyncField returns the SyncField field if non-nil, zero value otherwise. + +### GetSyncFieldOk + +`func (o *Settings) GetSyncFieldOk() (*string, bool)` + +GetSyncFieldOk returns a tuple with the SyncField field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSyncField + +`func (o *Settings) SetSyncField(v string)` + +SetSyncField sets SyncField field to given value. + +### HasSyncField + +`func (o *Settings) HasSyncField() bool` + +HasSyncField returns a boolean if a field has been set. + ### GetSyncDelay `func (o *Settings) GetSyncDelay() string` @@ -76,6 +103,31 @@ SetFrequency sets Frequency field to given value. HasFrequency returns a boolean if a field has been set. +### GetPreventInitialBackfill + +`func (o *Settings) GetPreventInitialBackfill() bool` + +GetPreventInitialBackfill returns the PreventInitialBackfill field if non-nil, zero value otherwise. + +### GetPreventInitialBackfillOk + +`func (o *Settings) GetPreventInitialBackfillOk() (*bool, bool)` + +GetPreventInitialBackfillOk returns a tuple with the PreventInitialBackfill field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreventInitialBackfill + +`func (o *Settings) SetPreventInitialBackfill(v bool)` + +SetPreventInitialBackfill sets PreventInitialBackfill field to given value. + +### HasPreventInitialBackfill + +`func (o *Settings) HasPreventInitialBackfill() bool` + +HasPreventInitialBackfill returns a boolean if a field has been set. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/generated/slo/docs/SloApi.md b/generated/slo/docs/SloApi.md index 7297aeebf..e8b06b702 100644 --- a/generated/slo/docs/SloApi.md +++ b/generated/slo/docs/SloApi.md @@ -1,26 +1,179 @@ # \SloAPI -All URIs are relative to *http://localhost:5601* +All URIs are relative to *https://localhost:5601* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateSloOp**](SloAPI.md#CreateSloOp) | **Post** /s/{spaceId}/api/observability/slos | Creates an SLO. -[**DeleteSloInstancesOp**](SloAPI.md#DeleteSloInstancesOp) | **Post** /s/{spaceId}/api/observability/slos/_delete_instances | Batch delete rollup and summary data for the matching list of sloId and instanceId -[**DeleteSloOp**](SloAPI.md#DeleteSloOp) | **Delete** /s/{spaceId}/api/observability/slos/{sloId} | Deletes an SLO -[**DisableSloOp**](SloAPI.md#DisableSloOp) | **Post** /s/{spaceId}/api/observability/slos/{sloId}/disable | Disables an SLO -[**EnableSloOp**](SloAPI.md#EnableSloOp) | **Post** /s/{spaceId}/api/observability/slos/{sloId}/enable | Enables an SLO -[**FindSlosOp**](SloAPI.md#FindSlosOp) | **Get** /s/{spaceId}/api/observability/slos | Retrieves a paginated list of SLOs -[**GetSloOp**](SloAPI.md#GetSloOp) | **Get** /s/{spaceId}/api/observability/slos/{sloId} | Retrieves a SLO -[**HistoricalSummaryOp**](SloAPI.md#HistoricalSummaryOp) | **Post** /s/{spaceId}/internal/observability/slos/_historical_summary | Retrieves the historical summary for a list of SLOs -[**UpdateSloOp**](SloAPI.md#UpdateSloOp) | **Put** /s/{spaceId}/api/observability/slos/{sloId} | Updates an SLO +[**BulkDeleteOp**](SloAPI.md#BulkDeleteOp) | **Post** /s/{spaceId}/api/observability/slos/_bulk_delete | Bulk delete SLO definitions and their associated summary and rollup data. +[**BulkDeleteStatusOp**](SloAPI.md#BulkDeleteStatusOp) | **Get** /s/{spaceId}/api/observability/slos/_bulk_delete/{taskId} | Retrieve the status of the bulk deletion +[**CreateSloOp**](SloAPI.md#CreateSloOp) | **Post** /s/{spaceId}/api/observability/slos | Create an SLO +[**DeleteRollupDataOp**](SloAPI.md#DeleteRollupDataOp) | **Post** /s/{spaceId}/api/observability/slos/_bulk_purge_rollup | Batch delete rollup and summary data +[**DeleteSloInstancesOp**](SloAPI.md#DeleteSloInstancesOp) | **Post** /s/{spaceId}/api/observability/slos/_delete_instances | Batch delete rollup and summary data +[**DeleteSloOp**](SloAPI.md#DeleteSloOp) | **Delete** /s/{spaceId}/api/observability/slos/{sloId} | Delete an SLO +[**DisableSloOp**](SloAPI.md#DisableSloOp) | **Post** /s/{spaceId}/api/observability/slos/{sloId}/disable | Disable an SLO +[**EnableSloOp**](SloAPI.md#EnableSloOp) | **Post** /s/{spaceId}/api/observability/slos/{sloId}/enable | Enable an SLO +[**FindSlosOp**](SloAPI.md#FindSlosOp) | **Get** /s/{spaceId}/api/observability/slos | Get a paginated list of SLOs +[**GetDefinitionsOp**](SloAPI.md#GetDefinitionsOp) | **Get** /s/{spaceId}/internal/observability/slos/_definitions | Get the SLO definitions +[**GetSloOp**](SloAPI.md#GetSloOp) | **Get** /s/{spaceId}/api/observability/slos/{sloId} | Get an SLO +[**ResetSloOp**](SloAPI.md#ResetSloOp) | **Post** /s/{spaceId}/api/observability/slos/{sloId}/_reset | Reset an SLO +[**UpdateSloOp**](SloAPI.md#UpdateSloOp) | **Put** /s/{spaceId}/api/observability/slos/{sloId} | Update an SLO +## BulkDeleteOp + +> BulkDeleteResponse BulkDeleteOp(ctx, spaceId).KbnXsrf(kbnXsrf).BulkDeleteRequest(bulkDeleteRequest).Execute() + +Bulk delete SLO definitions and their associated summary and rollup data. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/elastic/terraform-provider-elasticstack/slo" +) + +func main() { + kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection + spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + bulkDeleteRequest := *openapiclient.NewBulkDeleteRequest([]string{"8853df00-ae2e-11ed-90af-09bb6422b258"}) // BulkDeleteRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SloAPI.BulkDeleteOp(context.Background(), spaceId).KbnXsrf(kbnXsrf).BulkDeleteRequest(bulkDeleteRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SloAPI.BulkDeleteOp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `BulkDeleteOp`: BulkDeleteResponse + fmt.Fprintf(os.Stdout, "Response from `SloAPI.BulkDeleteOp`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiBulkDeleteOpRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **kbnXsrf** | **string** | Cross-site request forgery protection | + + **bulkDeleteRequest** | [**BulkDeleteRequest**](BulkDeleteRequest.md) | | + +### Return type + +[**BulkDeleteResponse**](BulkDeleteResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## BulkDeleteStatusOp + +> BulkDeleteStatusResponse BulkDeleteStatusOp(ctx, spaceId, taskId).KbnXsrf(kbnXsrf).Execute() + +Retrieve the status of the bulk deletion + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/elastic/terraform-provider-elasticstack/slo" +) + +func main() { + kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection + spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + taskId := "8853df00-ae2e-11ed-90af-09bb6422b258" // string | The task id of the bulk delete operation + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SloAPI.BulkDeleteStatusOp(context.Background(), spaceId, taskId).KbnXsrf(kbnXsrf).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SloAPI.BulkDeleteStatusOp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `BulkDeleteStatusOp`: BulkDeleteStatusResponse + fmt.Fprintf(os.Stdout, "Response from `SloAPI.BulkDeleteStatusOp`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | +**taskId** | **string** | The task id of the bulk delete operation | + +### Other Parameters + +Other parameters are passed through a pointer to a apiBulkDeleteStatusOpRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **kbnXsrf** | **string** | Cross-site request forgery protection | + + + +### Return type + +[**BulkDeleteStatusResponse**](BulkDeleteStatusResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## CreateSloOp > CreateSloResponse CreateSloOp(ctx, spaceId).KbnXsrf(kbnXsrf).CreateSloRequest(createSloRequest).Execute() -Creates an SLO. +Create an SLO @@ -78,7 +231,81 @@ Name | Type | Description | Notes ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRollupDataOp + +> BulkPurgeRollupResponse DeleteRollupDataOp(ctx, spaceId).KbnXsrf(kbnXsrf).BulkPurgeRollupRequest(bulkPurgeRollupRequest).Execute() + +Batch delete rollup and summary data + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/elastic/terraform-provider-elasticstack/slo" +) + +func main() { + kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection + spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + bulkPurgeRollupRequest := *openapiclient.NewBulkPurgeRollupRequest([]string{"8853df00-ae2e-11ed-90af-09bb6422b258"}, openapiclient.bulk_purge_rollup_request_purgePolicy{BulkPurgeRollupRequestPurgePolicyOneOf: openapiclient.NewBulkPurgeRollupRequestPurgePolicyOneOf()}) // BulkPurgeRollupRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SloAPI.DeleteRollupDataOp(context.Background(), spaceId).KbnXsrf(kbnXsrf).BulkPurgeRollupRequest(bulkPurgeRollupRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SloAPI.DeleteRollupDataOp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteRollupDataOp`: BulkPurgeRollupResponse + fmt.Fprintf(os.Stdout, "Response from `SloAPI.DeleteRollupDataOp`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteRollupDataOpRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **kbnXsrf** | **string** | Cross-site request forgery protection | + + **bulkPurgeRollupRequest** | [**BulkPurgeRollupRequest**](BulkPurgeRollupRequest.md) | | + +### Return type + +[**BulkPurgeRollupResponse**](BulkPurgeRollupResponse.md) + +### Authorization + +No authorization required ### HTTP request headers @@ -94,7 +321,7 @@ Name | Type | Description | Notes > DeleteSloInstancesOp(ctx, spaceId).KbnXsrf(kbnXsrf).DeleteSloInstancesRequest(deleteSloInstancesRequest).Execute() -Batch delete rollup and summary data for the matching list of sloId and instanceId +Batch delete rollup and summary data @@ -150,7 +377,7 @@ Name | Type | Description | Notes ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +No authorization required ### HTTP request headers @@ -166,7 +393,7 @@ Name | Type | Description | Notes > DeleteSloOp(ctx, spaceId, sloId).KbnXsrf(kbnXsrf).Execute() -Deletes an SLO +Delete an SLO @@ -223,7 +450,7 @@ Name | Type | Description | Notes ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +No authorization required ### HTTP request headers @@ -239,7 +466,7 @@ Name | Type | Description | Notes > DisableSloOp(ctx, spaceId, sloId).KbnXsrf(kbnXsrf).Execute() -Disables an SLO +Disable an SLO @@ -296,7 +523,7 @@ Name | Type | Description | Notes ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +No authorization required ### HTTP request headers @@ -312,7 +539,7 @@ Name | Type | Description | Notes > EnableSloOp(ctx, spaceId, sloId).KbnXsrf(kbnXsrf).Execute() -Enables an SLO +Enable an SLO @@ -369,7 +596,7 @@ Name | Type | Description | Notes ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +No authorization required ### HTTP request headers @@ -383,9 +610,9 @@ Name | Type | Description | Notes ## FindSlosOp -> FindSloResponse FindSlosOp(ctx, spaceId).KbnXsrf(kbnXsrf).KqlQuery(kqlQuery).Page(page).PerPage(perPage).SortBy(sortBy).SortDirection(sortDirection).Execute() +> FindSloResponse FindSlosOp(ctx, spaceId).KbnXsrf(kbnXsrf).KqlQuery(kqlQuery).Size(size).SearchAfter(searchAfter).Page(page).PerPage(perPage).SortBy(sortBy).SortDirection(sortDirection).HideStale(hideStale).Execute() -Retrieves a paginated list of SLOs +Get a paginated list of SLOs @@ -405,14 +632,17 @@ func main() { kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. kqlQuery := "slo.name:latency* and slo.tags : "prod"" // string | A valid kql query to filter the SLO with (optional) - page := int32(1) // int32 | The page number to return (optional) (default to 1) - perPage := int32(25) // int32 | The number of SLOs to return per page (optional) (default to 25) + size := int32(1) // int32 | The page size to use for cursor-based pagination, must be greater or equal than 1 (optional) (default to 1) + searchAfter := []string{"Inner_example"} // []string | The cursor to use for fetching the results from, when using a cursor-base pagination. (optional) + page := int32(1) // int32 | The page to use for pagination, must be greater or equal than 1 (optional) (default to 1) + perPage := int32(25) // int32 | Number of SLOs returned by page (optional) (default to 25) sortBy := "status" // string | Sort by field (optional) (default to "status") sortDirection := "asc" // string | Sort order (optional) (default to "asc") + hideStale := true // bool | Hide stale SLOs from the list as defined by stale SLO threshold in SLO settings (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SloAPI.FindSlosOp(context.Background(), spaceId).KbnXsrf(kbnXsrf).KqlQuery(kqlQuery).Page(page).PerPage(perPage).SortBy(sortBy).SortDirection(sortDirection).Execute() + resp, r, err := apiClient.SloAPI.FindSlosOp(context.Background(), spaceId).KbnXsrf(kbnXsrf).KqlQuery(kqlQuery).Size(size).SearchAfter(searchAfter).Page(page).PerPage(perPage).SortBy(sortBy).SortDirection(sortDirection).HideStale(hideStale).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SloAPI.FindSlosOp``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -440,10 +670,13 @@ Name | Type | Description | Notes **kbnXsrf** | **string** | Cross-site request forgery protection | **kqlQuery** | **string** | A valid kql query to filter the SLO with | - **page** | **int32** | The page number to return | [default to 1] - **perPage** | **int32** | The number of SLOs to return per page | [default to 25] + **size** | **int32** | The page size to use for cursor-based pagination, must be greater or equal than 1 | [default to 1] + **searchAfter** | **[]string** | The cursor to use for fetching the results from, when using a cursor-base pagination. | + **page** | **int32** | The page to use for pagination, must be greater or equal than 1 | [default to 1] + **perPage** | **int32** | Number of SLOs returned by page | [default to 25] **sortBy** | **string** | Sort by field | [default to "status"] **sortDirection** | **string** | Sort order | [default to "asc"] + **hideStale** | **bool** | Hide stale SLOs from the list as defined by stale SLO threshold in SLO settings | ### Return type @@ -451,7 +684,89 @@ Name | Type | Description | Notes ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## GetDefinitionsOp + +> FindSloDefinitionsResponse GetDefinitionsOp(ctx, spaceId).KbnXsrf(kbnXsrf).IncludeOutdatedOnly(includeOutdatedOnly).Tags(tags).Search(search).Page(page).PerPage(perPage).Execute() + +Get the SLO definitions + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/elastic/terraform-provider-elasticstack/slo" +) + +func main() { + kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection + spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + includeOutdatedOnly := true // bool | Indicates if the API returns only outdated SLO or all SLO definitions (optional) + tags := "tags_example" // string | Filters the SLOs by tag (optional) + search := "my service availability" // string | Filters the SLOs by name (optional) + page := float64(1) // float64 | The page to use for pagination, must be greater or equal than 1 (optional) + perPage := int32(100) // int32 | Number of SLOs returned by page (optional) (default to 100) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SloAPI.GetDefinitionsOp(context.Background(), spaceId).KbnXsrf(kbnXsrf).IncludeOutdatedOnly(includeOutdatedOnly).Tags(tags).Search(search).Page(page).PerPage(perPage).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SloAPI.GetDefinitionsOp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetDefinitionsOp`: FindSloDefinitionsResponse + fmt.Fprintf(os.Stdout, "Response from `SloAPI.GetDefinitionsOp`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetDefinitionsOpRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **kbnXsrf** | **string** | Cross-site request forgery protection | + + **includeOutdatedOnly** | **bool** | Indicates if the API returns only outdated SLO or all SLO definitions | + **tags** | **string** | Filters the SLOs by tag | + **search** | **string** | Filters the SLOs by name | + **page** | **float64** | The page to use for pagination, must be greater or equal than 1 | + **perPage** | **int32** | Number of SLOs returned by page | [default to 100] + +### Return type + +[**FindSloDefinitionsResponse**](FindSloDefinitionsResponse.md) + +### Authorization + +No authorization required ### HTTP request headers @@ -465,9 +780,9 @@ Name | Type | Description | Notes ## GetSloOp -> SloResponse GetSloOp(ctx, spaceId, sloId).KbnXsrf(kbnXsrf).InstanceId(instanceId).Execute() +> SloWithSummaryResponse GetSloOp(ctx, spaceId, sloId).KbnXsrf(kbnXsrf).InstanceId(instanceId).Execute() -Retrieves a SLO +Get an SLO @@ -496,7 +811,7 @@ func main() { fmt.Fprintf(os.Stderr, "Error when calling `SloAPI.GetSloOp``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `GetSloOp`: SloResponse + // response from `GetSloOp`: SloWithSummaryResponse fmt.Fprintf(os.Stdout, "Response from `SloAPI.GetSloOp`: %v\n", resp) } ``` @@ -524,11 +839,11 @@ Name | Type | Description | Notes ### Return type -[**SloResponse**](SloResponse.md) +[**SloWithSummaryResponse**](SloWithSummaryResponse.md) ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +No authorization required ### HTTP request headers @@ -540,11 +855,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## HistoricalSummaryOp +## ResetSloOp -> map[string][]HistoricalSummaryResponseInner HistoricalSummaryOp(ctx, spaceId).KbnXsrf(kbnXsrf).HistoricalSummaryRequest(historicalSummaryRequest).Execute() +> SloDefinitionResponse ResetSloOp(ctx, spaceId, sloId).KbnXsrf(kbnXsrf).Execute() -Retrieves the historical summary for a list of SLOs +Reset an SLO @@ -563,17 +878,17 @@ import ( func main() { kbnXsrf := "kbnXsrf_example" // string | Cross-site request forgery protection spaceId := "default" // string | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - historicalSummaryRequest := *openapiclient.NewHistoricalSummaryRequest([]string{"8853df00-ae2e-11ed-90af-09bb6422b258"}) // HistoricalSummaryRequest | + sloId := "9c235211-6834-11ea-a78c-6feb38a34414" // string | An identifier for the slo. configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SloAPI.HistoricalSummaryOp(context.Background(), spaceId).KbnXsrf(kbnXsrf).HistoricalSummaryRequest(historicalSummaryRequest).Execute() + resp, r, err := apiClient.SloAPI.ResetSloOp(context.Background(), spaceId, sloId).KbnXsrf(kbnXsrf).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SloAPI.HistoricalSummaryOp``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `SloAPI.ResetSloOp``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `HistoricalSummaryOp`: map[string][]HistoricalSummaryResponseInner - fmt.Fprintf(os.Stdout, "Response from `SloAPI.HistoricalSummaryOp`: %v\n", resp) + // response from `ResetSloOp`: SloDefinitionResponse + fmt.Fprintf(os.Stdout, "Response from `SloAPI.ResetSloOp`: %v\n", resp) } ``` @@ -584,29 +899,30 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **spaceId** | **string** | An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. | +**sloId** | **string** | An identifier for the slo. | ### Other Parameters -Other parameters are passed through a pointer to a apiHistoricalSummaryOpRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiResetSloOpRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **kbnXsrf** | **string** | Cross-site request forgery protection | - **historicalSummaryRequest** | [**HistoricalSummaryRequest**](HistoricalSummaryRequest.md) | | + ### Return type -[**map[string][]HistoricalSummaryResponseInner**](array.md) +[**SloDefinitionResponse**](SloDefinitionResponse.md) ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +No authorization required ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -616,9 +932,9 @@ Name | Type | Description | Notes ## UpdateSloOp -> SloResponse UpdateSloOp(ctx, spaceId, sloId).KbnXsrf(kbnXsrf).UpdateSloRequest(updateSloRequest).Execute() +> SloDefinitionResponse UpdateSloOp(ctx, spaceId, sloId).KbnXsrf(kbnXsrf).UpdateSloRequest(updateSloRequest).Execute() -Updates an SLO +Update an SLO @@ -647,7 +963,7 @@ func main() { fmt.Fprintf(os.Stderr, "Error when calling `SloAPI.UpdateSloOp``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `UpdateSloOp`: SloResponse + // response from `UpdateSloOp`: SloDefinitionResponse fmt.Fprintf(os.Stdout, "Response from `SloAPI.UpdateSloOp`: %v\n", resp) } ``` @@ -675,11 +991,11 @@ Name | Type | Description | Notes ### Return type -[**SloResponse**](SloResponse.md) +[**SloDefinitionResponse**](SloDefinitionResponse.md) ### Authorization -[basicAuth](../README.md#basicAuth), [apiKeyAuth](../README.md#apiKeyAuth) +No authorization required ### HTTP request headers diff --git a/generated/slo/docs/SloResponse.md b/generated/slo/docs/SloDefinitionResponse.md similarity index 60% rename from generated/slo/docs/SloResponse.md rename to generated/slo/docs/SloDefinitionResponse.md index 071b3ecd8..5fdaa4081 100644 --- a/generated/slo/docs/SloResponse.md +++ b/generated/slo/docs/SloDefinitionResponse.md @@ -1,4 +1,4 @@ -# SloResponse +# SloDefinitionResponse ## Properties @@ -7,359 +7,338 @@ Name | Type | Description | Notes **Id** | **string** | The identifier of the SLO. | **Name** | **string** | The name of the SLO. | **Description** | **string** | The description of the SLO. | -**Indicator** | [**SloResponseIndicator**](SloResponseIndicator.md) | | +**Indicator** | [**SloWithSummaryResponseIndicator**](SloWithSummaryResponseIndicator.md) | | **TimeWindow** | [**TimeWindow**](TimeWindow.md) | | **BudgetingMethod** | [**BudgetingMethod**](BudgetingMethod.md) | | **Objective** | [**Objective**](Objective.md) | | **Settings** | [**Settings**](Settings.md) | | **Revision** | **float64** | The SLO revision | -**Summary** | [**Summary**](Summary.md) | | **Enabled** | **bool** | Indicate if the SLO is enabled | -**GroupBy** | [**SloResponseGroupBy**](SloResponseGroupBy.md) | | -**InstanceId** | **string** | the value derived from the groupBy field, if present, otherwise '*' | +**GroupBy** | [**GroupBy**](GroupBy.md) | | **Tags** | **[]string** | List of tags | **CreatedAt** | **string** | The creation date | **UpdatedAt** | **string** | The last update date | +**Version** | **float64** | The internal SLO version | ## Methods -### NewSloResponse +### NewSloDefinitionResponse -`func NewSloResponse(id string, name string, description string, indicator SloResponseIndicator, timeWindow TimeWindow, budgetingMethod BudgetingMethod, objective Objective, settings Settings, revision float64, summary Summary, enabled bool, groupBy SloResponseGroupBy, instanceId string, tags []string, createdAt string, updatedAt string, ) *SloResponse` +`func NewSloDefinitionResponse(id string, name string, description string, indicator SloWithSummaryResponseIndicator, timeWindow TimeWindow, budgetingMethod BudgetingMethod, objective Objective, settings Settings, revision float64, enabled bool, groupBy GroupBy, tags []string, createdAt string, updatedAt string, version float64, ) *SloDefinitionResponse` -NewSloResponse instantiates a new SloResponse object +NewSloDefinitionResponse instantiates a new SloDefinitionResponse 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 -### NewSloResponseWithDefaults +### NewSloDefinitionResponseWithDefaults -`func NewSloResponseWithDefaults() *SloResponse` +`func NewSloDefinitionResponseWithDefaults() *SloDefinitionResponse` -NewSloResponseWithDefaults instantiates a new SloResponse object +NewSloDefinitionResponseWithDefaults instantiates a new SloDefinitionResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set ### GetId -`func (o *SloResponse) GetId() string` +`func (o *SloDefinitionResponse) GetId() string` GetId returns the Id field if non-nil, zero value otherwise. ### GetIdOk -`func (o *SloResponse) GetIdOk() (*string, bool)` +`func (o *SloDefinitionResponse) GetIdOk() (*string, bool)` GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetId -`func (o *SloResponse) SetId(v string)` +`func (o *SloDefinitionResponse) SetId(v string)` SetId sets Id field to given value. ### GetName -`func (o *SloResponse) GetName() string` +`func (o *SloDefinitionResponse) GetName() string` GetName returns the Name field if non-nil, zero value otherwise. ### GetNameOk -`func (o *SloResponse) GetNameOk() (*string, bool)` +`func (o *SloDefinitionResponse) GetNameOk() (*string, bool)` GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetName -`func (o *SloResponse) SetName(v string)` +`func (o *SloDefinitionResponse) SetName(v string)` SetName sets Name field to given value. ### GetDescription -`func (o *SloResponse) GetDescription() string` +`func (o *SloDefinitionResponse) GetDescription() string` GetDescription returns the Description field if non-nil, zero value otherwise. ### GetDescriptionOk -`func (o *SloResponse) GetDescriptionOk() (*string, bool)` +`func (o *SloDefinitionResponse) GetDescriptionOk() (*string, bool)` GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetDescription -`func (o *SloResponse) SetDescription(v string)` +`func (o *SloDefinitionResponse) SetDescription(v string)` SetDescription sets Description field to given value. ### GetIndicator -`func (o *SloResponse) GetIndicator() SloResponseIndicator` +`func (o *SloDefinitionResponse) GetIndicator() SloWithSummaryResponseIndicator` GetIndicator returns the Indicator field if non-nil, zero value otherwise. ### GetIndicatorOk -`func (o *SloResponse) GetIndicatorOk() (*SloResponseIndicator, bool)` +`func (o *SloDefinitionResponse) GetIndicatorOk() (*SloWithSummaryResponseIndicator, bool)` GetIndicatorOk returns a tuple with the Indicator field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetIndicator -`func (o *SloResponse) SetIndicator(v SloResponseIndicator)` +`func (o *SloDefinitionResponse) SetIndicator(v SloWithSummaryResponseIndicator)` SetIndicator sets Indicator field to given value. ### GetTimeWindow -`func (o *SloResponse) GetTimeWindow() TimeWindow` +`func (o *SloDefinitionResponse) GetTimeWindow() TimeWindow` GetTimeWindow returns the TimeWindow field if non-nil, zero value otherwise. ### GetTimeWindowOk -`func (o *SloResponse) GetTimeWindowOk() (*TimeWindow, bool)` +`func (o *SloDefinitionResponse) GetTimeWindowOk() (*TimeWindow, bool)` GetTimeWindowOk returns a tuple with the TimeWindow field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTimeWindow -`func (o *SloResponse) SetTimeWindow(v TimeWindow)` +`func (o *SloDefinitionResponse) SetTimeWindow(v TimeWindow)` SetTimeWindow sets TimeWindow field to given value. ### GetBudgetingMethod -`func (o *SloResponse) GetBudgetingMethod() BudgetingMethod` +`func (o *SloDefinitionResponse) GetBudgetingMethod() BudgetingMethod` GetBudgetingMethod returns the BudgetingMethod field if non-nil, zero value otherwise. ### GetBudgetingMethodOk -`func (o *SloResponse) GetBudgetingMethodOk() (*BudgetingMethod, bool)` +`func (o *SloDefinitionResponse) GetBudgetingMethodOk() (*BudgetingMethod, bool)` GetBudgetingMethodOk returns a tuple with the BudgetingMethod field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBudgetingMethod -`func (o *SloResponse) SetBudgetingMethod(v BudgetingMethod)` +`func (o *SloDefinitionResponse) SetBudgetingMethod(v BudgetingMethod)` SetBudgetingMethod sets BudgetingMethod field to given value. ### GetObjective -`func (o *SloResponse) GetObjective() Objective` +`func (o *SloDefinitionResponse) GetObjective() Objective` GetObjective returns the Objective field if non-nil, zero value otherwise. ### GetObjectiveOk -`func (o *SloResponse) GetObjectiveOk() (*Objective, bool)` +`func (o *SloDefinitionResponse) GetObjectiveOk() (*Objective, bool)` GetObjectiveOk returns a tuple with the Objective field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetObjective -`func (o *SloResponse) SetObjective(v Objective)` +`func (o *SloDefinitionResponse) SetObjective(v Objective)` SetObjective sets Objective field to given value. ### GetSettings -`func (o *SloResponse) GetSettings() Settings` +`func (o *SloDefinitionResponse) GetSettings() Settings` GetSettings returns the Settings field if non-nil, zero value otherwise. ### GetSettingsOk -`func (o *SloResponse) GetSettingsOk() (*Settings, bool)` +`func (o *SloDefinitionResponse) GetSettingsOk() (*Settings, bool)` GetSettingsOk returns a tuple with the Settings field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetSettings -`func (o *SloResponse) SetSettings(v Settings)` +`func (o *SloDefinitionResponse) SetSettings(v Settings)` SetSettings sets Settings field to given value. ### GetRevision -`func (o *SloResponse) GetRevision() float64` +`func (o *SloDefinitionResponse) GetRevision() float64` GetRevision returns the Revision field if non-nil, zero value otherwise. ### GetRevisionOk -`func (o *SloResponse) GetRevisionOk() (*float64, bool)` +`func (o *SloDefinitionResponse) GetRevisionOk() (*float64, bool)` GetRevisionOk returns a tuple with the Revision field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetRevision -`func (o *SloResponse) SetRevision(v float64)` +`func (o *SloDefinitionResponse) SetRevision(v float64)` SetRevision sets Revision field to given value. -### GetSummary - -`func (o *SloResponse) GetSummary() Summary` - -GetSummary returns the Summary field if non-nil, zero value otherwise. - -### GetSummaryOk - -`func (o *SloResponse) GetSummaryOk() (*Summary, bool)` - -GetSummaryOk returns a tuple with the Summary field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSummary - -`func (o *SloResponse) SetSummary(v Summary)` - -SetSummary sets Summary field to given value. - - ### GetEnabled -`func (o *SloResponse) GetEnabled() bool` +`func (o *SloDefinitionResponse) GetEnabled() bool` GetEnabled returns the Enabled field if non-nil, zero value otherwise. ### GetEnabledOk -`func (o *SloResponse) GetEnabledOk() (*bool, bool)` +`func (o *SloDefinitionResponse) GetEnabledOk() (*bool, bool)` GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetEnabled -`func (o *SloResponse) SetEnabled(v bool)` +`func (o *SloDefinitionResponse) SetEnabled(v bool)` SetEnabled sets Enabled field to given value. ### GetGroupBy -`func (o *SloResponse) GetGroupBy() SloResponseGroupBy` +`func (o *SloDefinitionResponse) GetGroupBy() GroupBy` GetGroupBy returns the GroupBy field if non-nil, zero value otherwise. ### GetGroupByOk -`func (o *SloResponse) GetGroupByOk() (*SloResponseGroupBy, bool)` +`func (o *SloDefinitionResponse) GetGroupByOk() (*GroupBy, bool)` GetGroupByOk returns a tuple with the GroupBy field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetGroupBy -`func (o *SloResponse) SetGroupBy(v SloResponseGroupBy)` +`func (o *SloDefinitionResponse) SetGroupBy(v GroupBy)` SetGroupBy sets GroupBy field to given value. -### GetInstanceId - -`func (o *SloResponse) GetInstanceId() string` - -GetInstanceId returns the InstanceId field if non-nil, zero value otherwise. - -### GetInstanceIdOk - -`func (o *SloResponse) GetInstanceIdOk() (*string, bool)` - -GetInstanceIdOk returns a tuple with the InstanceId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetInstanceId - -`func (o *SloResponse) SetInstanceId(v string)` - -SetInstanceId sets InstanceId field to given value. - - ### GetTags -`func (o *SloResponse) GetTags() []string` +`func (o *SloDefinitionResponse) GetTags() []string` GetTags returns the Tags field if non-nil, zero value otherwise. ### GetTagsOk -`func (o *SloResponse) GetTagsOk() (*[]string, bool)` +`func (o *SloDefinitionResponse) GetTagsOk() (*[]string, bool)` GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetTags -`func (o *SloResponse) SetTags(v []string)` +`func (o *SloDefinitionResponse) SetTags(v []string)` SetTags sets Tags field to given value. ### GetCreatedAt -`func (o *SloResponse) GetCreatedAt() string` +`func (o *SloDefinitionResponse) GetCreatedAt() string` GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. ### GetCreatedAtOk -`func (o *SloResponse) GetCreatedAtOk() (*string, bool)` +`func (o *SloDefinitionResponse) GetCreatedAtOk() (*string, bool)` GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetCreatedAt -`func (o *SloResponse) SetCreatedAt(v string)` +`func (o *SloDefinitionResponse) SetCreatedAt(v string)` SetCreatedAt sets CreatedAt field to given value. ### GetUpdatedAt -`func (o *SloResponse) GetUpdatedAt() string` +`func (o *SloDefinitionResponse) GetUpdatedAt() string` GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. ### GetUpdatedAtOk -`func (o *SloResponse) GetUpdatedAtOk() (*string, bool)` +`func (o *SloDefinitionResponse) GetUpdatedAtOk() (*string, bool)` GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetUpdatedAt -`func (o *SloResponse) SetUpdatedAt(v string)` +`func (o *SloDefinitionResponse) SetUpdatedAt(v string)` SetUpdatedAt sets UpdatedAt field to given value. +### GetVersion + +`func (o *SloDefinitionResponse) GetVersion() float64` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *SloDefinitionResponse) GetVersionOk() (*float64, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *SloDefinitionResponse) SetVersion(v float64)` + +SetVersion sets Version field to given value. + + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/generated/slo/docs/SloWithSummaryResponse.md b/generated/slo/docs/SloWithSummaryResponse.md new file mode 100644 index 000000000..2a57a3050 --- /dev/null +++ b/generated/slo/docs/SloWithSummaryResponse.md @@ -0,0 +1,387 @@ +# SloWithSummaryResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The identifier of the SLO. | +**Name** | **string** | The name of the SLO. | +**Description** | **string** | The description of the SLO. | +**Indicator** | [**SloWithSummaryResponseIndicator**](SloWithSummaryResponseIndicator.md) | | +**TimeWindow** | [**TimeWindow**](TimeWindow.md) | | +**BudgetingMethod** | [**BudgetingMethod**](BudgetingMethod.md) | | +**Objective** | [**Objective**](Objective.md) | | +**Settings** | [**Settings**](Settings.md) | | +**Revision** | **float64** | The SLO revision | +**Summary** | [**Summary**](Summary.md) | | +**Enabled** | **bool** | Indicate if the SLO is enabled | +**GroupBy** | [**GroupBy**](GroupBy.md) | | +**InstanceId** | **string** | the value derived from the groupBy field, if present, otherwise '*' | +**Tags** | **[]string** | List of tags | +**CreatedAt** | **string** | The creation date | +**UpdatedAt** | **string** | The last update date | +**Version** | **float64** | The internal SLO version | + +## Methods + +### NewSloWithSummaryResponse + +`func NewSloWithSummaryResponse(id string, name string, description string, indicator SloWithSummaryResponseIndicator, timeWindow TimeWindow, budgetingMethod BudgetingMethod, objective Objective, settings Settings, revision float64, summary Summary, enabled bool, groupBy GroupBy, instanceId string, tags []string, createdAt string, updatedAt string, version float64, ) *SloWithSummaryResponse` + +NewSloWithSummaryResponse instantiates a new SloWithSummaryResponse 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 + +### NewSloWithSummaryResponseWithDefaults + +`func NewSloWithSummaryResponseWithDefaults() *SloWithSummaryResponse` + +NewSloWithSummaryResponseWithDefaults instantiates a new SloWithSummaryResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *SloWithSummaryResponse) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *SloWithSummaryResponse) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *SloWithSummaryResponse) SetId(v string)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *SloWithSummaryResponse) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *SloWithSummaryResponse) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *SloWithSummaryResponse) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *SloWithSummaryResponse) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *SloWithSummaryResponse) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *SloWithSummaryResponse) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetIndicator + +`func (o *SloWithSummaryResponse) GetIndicator() SloWithSummaryResponseIndicator` + +GetIndicator returns the Indicator field if non-nil, zero value otherwise. + +### GetIndicatorOk + +`func (o *SloWithSummaryResponse) GetIndicatorOk() (*SloWithSummaryResponseIndicator, bool)` + +GetIndicatorOk returns a tuple with the Indicator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIndicator + +`func (o *SloWithSummaryResponse) SetIndicator(v SloWithSummaryResponseIndicator)` + +SetIndicator sets Indicator field to given value. + + +### GetTimeWindow + +`func (o *SloWithSummaryResponse) GetTimeWindow() TimeWindow` + +GetTimeWindow returns the TimeWindow field if non-nil, zero value otherwise. + +### GetTimeWindowOk + +`func (o *SloWithSummaryResponse) GetTimeWindowOk() (*TimeWindow, bool)` + +GetTimeWindowOk returns a tuple with the TimeWindow field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeWindow + +`func (o *SloWithSummaryResponse) SetTimeWindow(v TimeWindow)` + +SetTimeWindow sets TimeWindow field to given value. + + +### GetBudgetingMethod + +`func (o *SloWithSummaryResponse) GetBudgetingMethod() BudgetingMethod` + +GetBudgetingMethod returns the BudgetingMethod field if non-nil, zero value otherwise. + +### GetBudgetingMethodOk + +`func (o *SloWithSummaryResponse) GetBudgetingMethodOk() (*BudgetingMethod, bool)` + +GetBudgetingMethodOk returns a tuple with the BudgetingMethod field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBudgetingMethod + +`func (o *SloWithSummaryResponse) SetBudgetingMethod(v BudgetingMethod)` + +SetBudgetingMethod sets BudgetingMethod field to given value. + + +### GetObjective + +`func (o *SloWithSummaryResponse) GetObjective() Objective` + +GetObjective returns the Objective field if non-nil, zero value otherwise. + +### GetObjectiveOk + +`func (o *SloWithSummaryResponse) GetObjectiveOk() (*Objective, bool)` + +GetObjectiveOk returns a tuple with the Objective field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObjective + +`func (o *SloWithSummaryResponse) SetObjective(v Objective)` + +SetObjective sets Objective field to given value. + + +### GetSettings + +`func (o *SloWithSummaryResponse) GetSettings() Settings` + +GetSettings returns the Settings field if non-nil, zero value otherwise. + +### GetSettingsOk + +`func (o *SloWithSummaryResponse) GetSettingsOk() (*Settings, bool)` + +GetSettingsOk returns a tuple with the Settings field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSettings + +`func (o *SloWithSummaryResponse) SetSettings(v Settings)` + +SetSettings sets Settings field to given value. + + +### GetRevision + +`func (o *SloWithSummaryResponse) GetRevision() float64` + +GetRevision returns the Revision field if non-nil, zero value otherwise. + +### GetRevisionOk + +`func (o *SloWithSummaryResponse) GetRevisionOk() (*float64, bool)` + +GetRevisionOk returns a tuple with the Revision field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRevision + +`func (o *SloWithSummaryResponse) SetRevision(v float64)` + +SetRevision sets Revision field to given value. + + +### GetSummary + +`func (o *SloWithSummaryResponse) GetSummary() Summary` + +GetSummary returns the Summary field if non-nil, zero value otherwise. + +### GetSummaryOk + +`func (o *SloWithSummaryResponse) GetSummaryOk() (*Summary, bool)` + +GetSummaryOk returns a tuple with the Summary field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSummary + +`func (o *SloWithSummaryResponse) SetSummary(v Summary)` + +SetSummary sets Summary field to given value. + + +### GetEnabled + +`func (o *SloWithSummaryResponse) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *SloWithSummaryResponse) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *SloWithSummaryResponse) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + + +### GetGroupBy + +`func (o *SloWithSummaryResponse) GetGroupBy() GroupBy` + +GetGroupBy returns the GroupBy field if non-nil, zero value otherwise. + +### GetGroupByOk + +`func (o *SloWithSummaryResponse) GetGroupByOk() (*GroupBy, bool)` + +GetGroupByOk returns a tuple with the GroupBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroupBy + +`func (o *SloWithSummaryResponse) SetGroupBy(v GroupBy)` + +SetGroupBy sets GroupBy field to given value. + + +### GetInstanceId + +`func (o *SloWithSummaryResponse) GetInstanceId() string` + +GetInstanceId returns the InstanceId field if non-nil, zero value otherwise. + +### GetInstanceIdOk + +`func (o *SloWithSummaryResponse) GetInstanceIdOk() (*string, bool)` + +GetInstanceIdOk returns a tuple with the InstanceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInstanceId + +`func (o *SloWithSummaryResponse) SetInstanceId(v string)` + +SetInstanceId sets InstanceId field to given value. + + +### GetTags + +`func (o *SloWithSummaryResponse) GetTags() []string` + +GetTags returns the Tags field if non-nil, zero value otherwise. + +### GetTagsOk + +`func (o *SloWithSummaryResponse) GetTagsOk() (*[]string, bool)` + +GetTagsOk returns a tuple with the Tags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTags + +`func (o *SloWithSummaryResponse) SetTags(v []string)` + +SetTags sets Tags field to given value. + + +### GetCreatedAt + +`func (o *SloWithSummaryResponse) GetCreatedAt() string` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *SloWithSummaryResponse) GetCreatedAtOk() (*string, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *SloWithSummaryResponse) SetCreatedAt(v string)` + +SetCreatedAt sets CreatedAt field to given value. + + +### GetUpdatedAt + +`func (o *SloWithSummaryResponse) GetUpdatedAt() string` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *SloWithSummaryResponse) GetUpdatedAtOk() (*string, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *SloWithSummaryResponse) SetUpdatedAt(v string)` + +SetUpdatedAt sets UpdatedAt field to given value. + + +### GetVersion + +`func (o *SloWithSummaryResponse) GetVersion() float64` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *SloWithSummaryResponse) GetVersionOk() (*float64, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *SloWithSummaryResponse) SetVersion(v float64)` + +SetVersion sets Version field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/generated/slo/docs/SloResponseIndicator.md b/generated/slo/docs/SloWithSummaryResponseIndicator.md similarity index 57% rename from generated/slo/docs/SloResponseIndicator.md rename to generated/slo/docs/SloWithSummaryResponseIndicator.md index 0f3ea7851..269441cc0 100644 --- a/generated/slo/docs/SloResponseIndicator.md +++ b/generated/slo/docs/SloWithSummaryResponseIndicator.md @@ -1,4 +1,4 @@ -# SloResponseIndicator +# SloWithSummaryResponseIndicator ## Properties @@ -9,59 +9,59 @@ Name | Type | Description | Notes ## Methods -### NewSloResponseIndicator +### NewSloWithSummaryResponseIndicator -`func NewSloResponseIndicator(params IndicatorPropertiesTimesliceMetricParams, type_ string, ) *SloResponseIndicator` +`func NewSloWithSummaryResponseIndicator(params IndicatorPropertiesTimesliceMetricParams, type_ string, ) *SloWithSummaryResponseIndicator` -NewSloResponseIndicator instantiates a new SloResponseIndicator object +NewSloWithSummaryResponseIndicator instantiates a new SloWithSummaryResponseIndicator 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 -### NewSloResponseIndicatorWithDefaults +### NewSloWithSummaryResponseIndicatorWithDefaults -`func NewSloResponseIndicatorWithDefaults() *SloResponseIndicator` +`func NewSloWithSummaryResponseIndicatorWithDefaults() *SloWithSummaryResponseIndicator` -NewSloResponseIndicatorWithDefaults instantiates a new SloResponseIndicator object +NewSloWithSummaryResponseIndicatorWithDefaults instantiates a new SloWithSummaryResponseIndicator 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 ### GetParams -`func (o *SloResponseIndicator) GetParams() IndicatorPropertiesTimesliceMetricParams` +`func (o *SloWithSummaryResponseIndicator) GetParams() IndicatorPropertiesTimesliceMetricParams` GetParams returns the Params field if non-nil, zero value otherwise. ### GetParamsOk -`func (o *SloResponseIndicator) GetParamsOk() (*IndicatorPropertiesTimesliceMetricParams, bool)` +`func (o *SloWithSummaryResponseIndicator) GetParamsOk() (*IndicatorPropertiesTimesliceMetricParams, bool)` GetParamsOk returns a tuple with the Params field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetParams -`func (o *SloResponseIndicator) SetParams(v IndicatorPropertiesTimesliceMetricParams)` +`func (o *SloWithSummaryResponseIndicator) SetParams(v IndicatorPropertiesTimesliceMetricParams)` SetParams sets Params field to given value. ### GetType -`func (o *SloResponseIndicator) GetType() string` +`func (o *SloWithSummaryResponseIndicator) GetType() string` GetType returns the Type field if non-nil, zero value otherwise. ### GetTypeOk -`func (o *SloResponseIndicator) GetTypeOk() (*string, bool)` +`func (o *SloWithSummaryResponseIndicator) GetTypeOk() (*string, bool)` GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetType -`func (o *SloResponseIndicator) SetType(v string)` +`func (o *SloWithSummaryResponseIndicator) SetType(v string)` SetType sets Type field to given value. diff --git a/generated/slo/docs/UpdateSloRequest.md b/generated/slo/docs/UpdateSloRequest.md index 2a4cdb393..4518217c5 100644 --- a/generated/slo/docs/UpdateSloRequest.md +++ b/generated/slo/docs/UpdateSloRequest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **BudgetingMethod** | Pointer to [**BudgetingMethod**](BudgetingMethod.md) | | [optional] **Objective** | Pointer to [**Objective**](Objective.md) | | [optional] **Settings** | Pointer to [**Settings**](Settings.md) | | [optional] -**GroupBy** | Pointer to [**SloResponseGroupBy**](SloResponseGroupBy.md) | | [optional] +**GroupBy** | Pointer to [**GroupBy**](GroupBy.md) | | [optional] **Tags** | Pointer to **[]string** | List of tags | [optional] ## Methods @@ -210,20 +210,20 @@ HasSettings returns a boolean if a field has been set. ### GetGroupBy -`func (o *UpdateSloRequest) GetGroupBy() SloResponseGroupBy` +`func (o *UpdateSloRequest) GetGroupBy() GroupBy` GetGroupBy returns the GroupBy field if non-nil, zero value otherwise. ### GetGroupByOk -`func (o *UpdateSloRequest) GetGroupByOk() (*SloResponseGroupBy, bool)` +`func (o *UpdateSloRequest) GetGroupByOk() (*GroupBy, bool)` GetGroupByOk returns a tuple with the GroupBy field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetGroupBy -`func (o *UpdateSloRequest) SetGroupBy(v SloResponseGroupBy)` +`func (o *UpdateSloRequest) SetGroupBy(v GroupBy)` SetGroupBy sets GroupBy field to given value. diff --git a/generated/slo/model_400_response.go b/generated/slo/model_400_response.go index 1965ef831..cc5b81cbd 100644 --- a/generated/slo/model_400_response.go +++ b/generated/slo/model_400_response.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_401_response.go b/generated/slo/model_401_response.go index b4f7f83e7..d971daee0 100644 --- a/generated/slo/model_401_response.go +++ b/generated/slo/model_401_response.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_403_response.go b/generated/slo/model_403_response.go index 4ccd57a9a..339e40e7a 100644 --- a/generated/slo/model_403_response.go +++ b/generated/slo/model_403_response.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_404_response.go b/generated/slo/model_404_response.go index a52e5d6e3..f31dc6a5a 100644 --- a/generated/slo/model_404_response.go +++ b/generated/slo/model_404_response.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_409_response.go b/generated/slo/model_409_response.go index 8d3405b68..c9ac7217d 100644 --- a/generated/slo/model_409_response.go +++ b/generated/slo/model_409_response.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_budgeting_method.go b/generated/slo/model_budgeting_method.go index b22d09e1c..f0b471661 100644 --- a/generated/slo/model_budgeting_method.go +++ b/generated/slo/model_budgeting_method.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_bulk_delete_request.go b/generated/slo/model_bulk_delete_request.go new file mode 100644 index 000000000..b6e932a65 --- /dev/null +++ b/generated/slo/model_bulk_delete_request.go @@ -0,0 +1,116 @@ +/* +SLOs + +OpenAPI schema for SLOs endpoints + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package slo + +import ( + "encoding/json" +) + +// checks if the BulkDeleteRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkDeleteRequest{} + +// BulkDeleteRequest The bulk delete SLO request takes a list of SLOs Definition id to delete. +type BulkDeleteRequest struct { + // An array of SLO Definition id + List []string `json:"list"` +} + +// NewBulkDeleteRequest instantiates a new BulkDeleteRequest 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 NewBulkDeleteRequest(list []string) *BulkDeleteRequest { + this := BulkDeleteRequest{} + this.List = list + return &this +} + +// NewBulkDeleteRequestWithDefaults instantiates a new BulkDeleteRequest 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 NewBulkDeleteRequestWithDefaults() *BulkDeleteRequest { + this := BulkDeleteRequest{} + return &this +} + +// GetList returns the List field value +func (o *BulkDeleteRequest) GetList() []string { + if o == nil { + var ret []string + return ret + } + + return o.List +} + +// GetListOk returns a tuple with the List field value +// and a boolean to check if the value has been set. +func (o *BulkDeleteRequest) GetListOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.List, true +} + +// SetList sets field value +func (o *BulkDeleteRequest) SetList(v []string) { + o.List = v +} + +func (o BulkDeleteRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkDeleteRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["list"] = o.List + return toSerialize, nil +} + +type NullableBulkDeleteRequest struct { + value *BulkDeleteRequest + isSet bool +} + +func (v NullableBulkDeleteRequest) Get() *BulkDeleteRequest { + return v.value +} + +func (v *NullableBulkDeleteRequest) Set(val *BulkDeleteRequest) { + v.value = val + v.isSet = true +} + +func (v NullableBulkDeleteRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkDeleteRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkDeleteRequest(val *BulkDeleteRequest) *NullableBulkDeleteRequest { + return &NullableBulkDeleteRequest{value: val, isSet: true} +} + +func (v NullableBulkDeleteRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkDeleteRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/slo/model_bulk_delete_response.go b/generated/slo/model_bulk_delete_response.go new file mode 100644 index 000000000..e00c74fcf --- /dev/null +++ b/generated/slo/model_bulk_delete_response.go @@ -0,0 +1,125 @@ +/* +SLOs + +OpenAPI schema for SLOs endpoints + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package slo + +import ( + "encoding/json" +) + +// checks if the BulkDeleteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkDeleteResponse{} + +// BulkDeleteResponse The bulk delete SLO response returns a taskId that can be used to poll for its status +type BulkDeleteResponse struct { + // The taskId of the bulk delete operation + TaskId *string `json:"taskId,omitempty"` +} + +// NewBulkDeleteResponse instantiates a new BulkDeleteResponse 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 NewBulkDeleteResponse() *BulkDeleteResponse { + this := BulkDeleteResponse{} + return &this +} + +// NewBulkDeleteResponseWithDefaults instantiates a new BulkDeleteResponse 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 NewBulkDeleteResponseWithDefaults() *BulkDeleteResponse { + this := BulkDeleteResponse{} + return &this +} + +// GetTaskId returns the TaskId field value if set, zero value otherwise. +func (o *BulkDeleteResponse) GetTaskId() string { + if o == nil || IsNil(o.TaskId) { + var ret string + return ret + } + return *o.TaskId +} + +// GetTaskIdOk returns a tuple with the TaskId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkDeleteResponse) GetTaskIdOk() (*string, bool) { + if o == nil || IsNil(o.TaskId) { + return nil, false + } + return o.TaskId, true +} + +// HasTaskId returns a boolean if a field has been set. +func (o *BulkDeleteResponse) HasTaskId() bool { + if o != nil && !IsNil(o.TaskId) { + return true + } + + return false +} + +// SetTaskId gets a reference to the given string and assigns it to the TaskId field. +func (o *BulkDeleteResponse) SetTaskId(v string) { + o.TaskId = &v +} + +func (o BulkDeleteResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkDeleteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.TaskId) { + toSerialize["taskId"] = o.TaskId + } + return toSerialize, nil +} + +type NullableBulkDeleteResponse struct { + value *BulkDeleteResponse + isSet bool +} + +func (v NullableBulkDeleteResponse) Get() *BulkDeleteResponse { + return v.value +} + +func (v *NullableBulkDeleteResponse) Set(val *BulkDeleteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableBulkDeleteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkDeleteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkDeleteResponse(val *BulkDeleteResponse) *NullableBulkDeleteResponse { + return &NullableBulkDeleteResponse{value: val, isSet: true} +} + +func (v NullableBulkDeleteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkDeleteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/slo/model_bulk_delete_status_response.go b/generated/slo/model_bulk_delete_status_response.go new file mode 100644 index 000000000..9a3aacbdb --- /dev/null +++ b/generated/slo/model_bulk_delete_status_response.go @@ -0,0 +1,199 @@ +/* +SLOs + +OpenAPI schema for SLOs endpoints + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package slo + +import ( + "encoding/json" +) + +// checks if the BulkDeleteStatusResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkDeleteStatusResponse{} + +// BulkDeleteStatusResponse Indicates if the bulk deletion is completed, with the detailed results of the operation. +type BulkDeleteStatusResponse struct { + // Indicates if the bulk deletion operation is completed + IsDone *bool `json:"isDone,omitempty"` + // The error message if the bulk deletion operation failed + Error *string `json:"error,omitempty"` + // The results of the bulk deletion operation, including the success status and any errors for each SLO + Results []BulkDeleteStatusResponseResultsInner `json:"results,omitempty"` +} + +// NewBulkDeleteStatusResponse instantiates a new BulkDeleteStatusResponse 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 NewBulkDeleteStatusResponse() *BulkDeleteStatusResponse { + this := BulkDeleteStatusResponse{} + return &this +} + +// NewBulkDeleteStatusResponseWithDefaults instantiates a new BulkDeleteStatusResponse 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 NewBulkDeleteStatusResponseWithDefaults() *BulkDeleteStatusResponse { + this := BulkDeleteStatusResponse{} + return &this +} + +// GetIsDone returns the IsDone field value if set, zero value otherwise. +func (o *BulkDeleteStatusResponse) GetIsDone() bool { + if o == nil || IsNil(o.IsDone) { + var ret bool + return ret + } + return *o.IsDone +} + +// GetIsDoneOk returns a tuple with the IsDone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkDeleteStatusResponse) GetIsDoneOk() (*bool, bool) { + if o == nil || IsNil(o.IsDone) { + return nil, false + } + return o.IsDone, true +} + +// HasIsDone returns a boolean if a field has been set. +func (o *BulkDeleteStatusResponse) HasIsDone() bool { + if o != nil && !IsNil(o.IsDone) { + return true + } + + return false +} + +// SetIsDone gets a reference to the given bool and assigns it to the IsDone field. +func (o *BulkDeleteStatusResponse) SetIsDone(v bool) { + o.IsDone = &v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *BulkDeleteStatusResponse) GetError() string { + if o == nil || IsNil(o.Error) { + var ret string + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkDeleteStatusResponse) GetErrorOk() (*string, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *BulkDeleteStatusResponse) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *BulkDeleteStatusResponse) SetError(v string) { + o.Error = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *BulkDeleteStatusResponse) GetResults() []BulkDeleteStatusResponseResultsInner { + if o == nil || IsNil(o.Results) { + var ret []BulkDeleteStatusResponseResultsInner + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkDeleteStatusResponse) GetResultsOk() ([]BulkDeleteStatusResponseResultsInner, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *BulkDeleteStatusResponse) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []BulkDeleteStatusResponseResultsInner and assigns it to the Results field. +func (o *BulkDeleteStatusResponse) SetResults(v []BulkDeleteStatusResponseResultsInner) { + o.Results = v +} + +func (o BulkDeleteStatusResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkDeleteStatusResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.IsDone) { + toSerialize["isDone"] = o.IsDone + } + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullableBulkDeleteStatusResponse struct { + value *BulkDeleteStatusResponse + isSet bool +} + +func (v NullableBulkDeleteStatusResponse) Get() *BulkDeleteStatusResponse { + return v.value +} + +func (v *NullableBulkDeleteStatusResponse) Set(val *BulkDeleteStatusResponse) { + v.value = val + v.isSet = true +} + +func (v NullableBulkDeleteStatusResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkDeleteStatusResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkDeleteStatusResponse(val *BulkDeleteStatusResponse) *NullableBulkDeleteStatusResponse { + return &NullableBulkDeleteStatusResponse{value: val, isSet: true} +} + +func (v NullableBulkDeleteStatusResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkDeleteStatusResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/slo/model_bulk_delete_status_response_results_inner.go b/generated/slo/model_bulk_delete_status_response_results_inner.go new file mode 100644 index 000000000..dca2f3280 --- /dev/null +++ b/generated/slo/model_bulk_delete_status_response_results_inner.go @@ -0,0 +1,199 @@ +/* +SLOs + +OpenAPI schema for SLOs endpoints + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package slo + +import ( + "encoding/json" +) + +// checks if the BulkDeleteStatusResponseResultsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkDeleteStatusResponseResultsInner{} + +// BulkDeleteStatusResponseResultsInner struct for BulkDeleteStatusResponseResultsInner +type BulkDeleteStatusResponseResultsInner struct { + // The ID of the SLO that was deleted + Id *string `json:"id,omitempty"` + // The result of the deletion operation for this SLO + Success *bool `json:"success,omitempty"` + // The error message if the deletion operation failed for this SLO + Error *string `json:"error,omitempty"` +} + +// NewBulkDeleteStatusResponseResultsInner instantiates a new BulkDeleteStatusResponseResultsInner 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 NewBulkDeleteStatusResponseResultsInner() *BulkDeleteStatusResponseResultsInner { + this := BulkDeleteStatusResponseResultsInner{} + return &this +} + +// NewBulkDeleteStatusResponseResultsInnerWithDefaults instantiates a new BulkDeleteStatusResponseResultsInner 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 NewBulkDeleteStatusResponseResultsInnerWithDefaults() *BulkDeleteStatusResponseResultsInner { + this := BulkDeleteStatusResponseResultsInner{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *BulkDeleteStatusResponseResultsInner) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkDeleteStatusResponseResultsInner) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *BulkDeleteStatusResponseResultsInner) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *BulkDeleteStatusResponseResultsInner) SetId(v string) { + o.Id = &v +} + +// GetSuccess returns the Success field value if set, zero value otherwise. +func (o *BulkDeleteStatusResponseResultsInner) GetSuccess() bool { + if o == nil || IsNil(o.Success) { + var ret bool + return ret + } + return *o.Success +} + +// GetSuccessOk returns a tuple with the Success field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkDeleteStatusResponseResultsInner) GetSuccessOk() (*bool, bool) { + if o == nil || IsNil(o.Success) { + return nil, false + } + return o.Success, true +} + +// HasSuccess returns a boolean if a field has been set. +func (o *BulkDeleteStatusResponseResultsInner) HasSuccess() bool { + if o != nil && !IsNil(o.Success) { + return true + } + + return false +} + +// SetSuccess gets a reference to the given bool and assigns it to the Success field. +func (o *BulkDeleteStatusResponseResultsInner) SetSuccess(v bool) { + o.Success = &v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *BulkDeleteStatusResponseResultsInner) GetError() string { + if o == nil || IsNil(o.Error) { + var ret string + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkDeleteStatusResponseResultsInner) GetErrorOk() (*string, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *BulkDeleteStatusResponseResultsInner) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *BulkDeleteStatusResponseResultsInner) SetError(v string) { + o.Error = &v +} + +func (o BulkDeleteStatusResponseResultsInner) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkDeleteStatusResponseResultsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Success) { + toSerialize["success"] = o.Success + } + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + return toSerialize, nil +} + +type NullableBulkDeleteStatusResponseResultsInner struct { + value *BulkDeleteStatusResponseResultsInner + isSet bool +} + +func (v NullableBulkDeleteStatusResponseResultsInner) Get() *BulkDeleteStatusResponseResultsInner { + return v.value +} + +func (v *NullableBulkDeleteStatusResponseResultsInner) Set(val *BulkDeleteStatusResponseResultsInner) { + v.value = val + v.isSet = true +} + +func (v NullableBulkDeleteStatusResponseResultsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkDeleteStatusResponseResultsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkDeleteStatusResponseResultsInner(val *BulkDeleteStatusResponseResultsInner) *NullableBulkDeleteStatusResponseResultsInner { + return &NullableBulkDeleteStatusResponseResultsInner{value: val, isSet: true} +} + +func (v NullableBulkDeleteStatusResponseResultsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkDeleteStatusResponseResultsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/slo/model_bulk_purge_rollup_request.go b/generated/slo/model_bulk_purge_rollup_request.go new file mode 100644 index 000000000..74dbf5f21 --- /dev/null +++ b/generated/slo/model_bulk_purge_rollup_request.go @@ -0,0 +1,143 @@ +/* +SLOs + +OpenAPI schema for SLOs endpoints + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package slo + +import ( + "encoding/json" +) + +// checks if the BulkPurgeRollupRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkPurgeRollupRequest{} + +// BulkPurgeRollupRequest The bulk purge rollup data request takes a list of SLO ids and a purge policy, then deletes the rollup data according to the purge policy. This API can be used to remove the staled data of an instance SLO that no longer get updated. +type BulkPurgeRollupRequest struct { + // An array of slo ids + List []string `json:"list"` + PurgePolicy BulkPurgeRollupRequestPurgePolicy `json:"purgePolicy"` +} + +// NewBulkPurgeRollupRequest instantiates a new BulkPurgeRollupRequest 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 NewBulkPurgeRollupRequest(list []string, purgePolicy BulkPurgeRollupRequestPurgePolicy) *BulkPurgeRollupRequest { + this := BulkPurgeRollupRequest{} + this.List = list + this.PurgePolicy = purgePolicy + return &this +} + +// NewBulkPurgeRollupRequestWithDefaults instantiates a new BulkPurgeRollupRequest 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 NewBulkPurgeRollupRequestWithDefaults() *BulkPurgeRollupRequest { + this := BulkPurgeRollupRequest{} + return &this +} + +// GetList returns the List field value +func (o *BulkPurgeRollupRequest) GetList() []string { + if o == nil { + var ret []string + return ret + } + + return o.List +} + +// GetListOk returns a tuple with the List field value +// and a boolean to check if the value has been set. +func (o *BulkPurgeRollupRequest) GetListOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.List, true +} + +// SetList sets field value +func (o *BulkPurgeRollupRequest) SetList(v []string) { + o.List = v +} + +// GetPurgePolicy returns the PurgePolicy field value +func (o *BulkPurgeRollupRequest) GetPurgePolicy() BulkPurgeRollupRequestPurgePolicy { + if o == nil { + var ret BulkPurgeRollupRequestPurgePolicy + return ret + } + + return o.PurgePolicy +} + +// GetPurgePolicyOk returns a tuple with the PurgePolicy field value +// and a boolean to check if the value has been set. +func (o *BulkPurgeRollupRequest) GetPurgePolicyOk() (*BulkPurgeRollupRequestPurgePolicy, bool) { + if o == nil { + return nil, false + } + return &o.PurgePolicy, true +} + +// SetPurgePolicy sets field value +func (o *BulkPurgeRollupRequest) SetPurgePolicy(v BulkPurgeRollupRequestPurgePolicy) { + o.PurgePolicy = v +} + +func (o BulkPurgeRollupRequest) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkPurgeRollupRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["list"] = o.List + toSerialize["purgePolicy"] = o.PurgePolicy + return toSerialize, nil +} + +type NullableBulkPurgeRollupRequest struct { + value *BulkPurgeRollupRequest + isSet bool +} + +func (v NullableBulkPurgeRollupRequest) Get() *BulkPurgeRollupRequest { + return v.value +} + +func (v *NullableBulkPurgeRollupRequest) Set(val *BulkPurgeRollupRequest) { + v.value = val + v.isSet = true +} + +func (v NullableBulkPurgeRollupRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkPurgeRollupRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkPurgeRollupRequest(val *BulkPurgeRollupRequest) *NullableBulkPurgeRollupRequest { + return &NullableBulkPurgeRollupRequest{value: val, isSet: true} +} + +func (v NullableBulkPurgeRollupRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkPurgeRollupRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/slo/model_bulk_purge_rollup_request_purge_policy.go b/generated/slo/model_bulk_purge_rollup_request_purge_policy.go new file mode 100644 index 000000000..386d9947a --- /dev/null +++ b/generated/slo/model_bulk_purge_rollup_request_purge_policy.go @@ -0,0 +1,145 @@ +/* +SLOs + +OpenAPI schema for SLOs endpoints + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package slo + +import ( + "encoding/json" + "fmt" +) + +// BulkPurgeRollupRequestPurgePolicy - Policy that dictates which SLI documents to purge based on age +type BulkPurgeRollupRequestPurgePolicy struct { + BulkPurgeRollupRequestPurgePolicyOneOf *BulkPurgeRollupRequestPurgePolicyOneOf + BulkPurgeRollupRequestPurgePolicyOneOf1 *BulkPurgeRollupRequestPurgePolicyOneOf1 +} + +// BulkPurgeRollupRequestPurgePolicyOneOfAsBulkPurgeRollupRequestPurgePolicy is a convenience function that returns BulkPurgeRollupRequestPurgePolicyOneOf wrapped in BulkPurgeRollupRequestPurgePolicy +func BulkPurgeRollupRequestPurgePolicyOneOfAsBulkPurgeRollupRequestPurgePolicy(v *BulkPurgeRollupRequestPurgePolicyOneOf) BulkPurgeRollupRequestPurgePolicy { + return BulkPurgeRollupRequestPurgePolicy{ + BulkPurgeRollupRequestPurgePolicyOneOf: v, + } +} + +// BulkPurgeRollupRequestPurgePolicyOneOf1AsBulkPurgeRollupRequestPurgePolicy is a convenience function that returns BulkPurgeRollupRequestPurgePolicyOneOf1 wrapped in BulkPurgeRollupRequestPurgePolicy +func BulkPurgeRollupRequestPurgePolicyOneOf1AsBulkPurgeRollupRequestPurgePolicy(v *BulkPurgeRollupRequestPurgePolicyOneOf1) BulkPurgeRollupRequestPurgePolicy { + return BulkPurgeRollupRequestPurgePolicy{ + BulkPurgeRollupRequestPurgePolicyOneOf1: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *BulkPurgeRollupRequestPurgePolicy) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into BulkPurgeRollupRequestPurgePolicyOneOf + err = json.Unmarshal(data, &dst.BulkPurgeRollupRequestPurgePolicyOneOf) + if err == nil { + jsonBulkPurgeRollupRequestPurgePolicyOneOf, _ := json.Marshal(dst.BulkPurgeRollupRequestPurgePolicyOneOf) + if string(jsonBulkPurgeRollupRequestPurgePolicyOneOf) == "{}" { // empty struct + dst.BulkPurgeRollupRequestPurgePolicyOneOf = nil + } else { + match++ + } + } else { + dst.BulkPurgeRollupRequestPurgePolicyOneOf = nil + } + + // try to unmarshal data into BulkPurgeRollupRequestPurgePolicyOneOf1 + err = json.Unmarshal(data, &dst.BulkPurgeRollupRequestPurgePolicyOneOf1) + if err == nil { + jsonBulkPurgeRollupRequestPurgePolicyOneOf1, _ := json.Marshal(dst.BulkPurgeRollupRequestPurgePolicyOneOf1) + if string(jsonBulkPurgeRollupRequestPurgePolicyOneOf1) == "{}" { // empty struct + dst.BulkPurgeRollupRequestPurgePolicyOneOf1 = nil + } else { + match++ + } + } else { + dst.BulkPurgeRollupRequestPurgePolicyOneOf1 = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.BulkPurgeRollupRequestPurgePolicyOneOf = nil + dst.BulkPurgeRollupRequestPurgePolicyOneOf1 = nil + + return fmt.Errorf("data matches more than one schema in oneOf(BulkPurgeRollupRequestPurgePolicy)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(BulkPurgeRollupRequestPurgePolicy)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src BulkPurgeRollupRequestPurgePolicy) MarshalJSON() ([]byte, error) { + if src.BulkPurgeRollupRequestPurgePolicyOneOf != nil { + return json.Marshal(&src.BulkPurgeRollupRequestPurgePolicyOneOf) + } + + if src.BulkPurgeRollupRequestPurgePolicyOneOf1 != nil { + return json.Marshal(&src.BulkPurgeRollupRequestPurgePolicyOneOf1) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *BulkPurgeRollupRequestPurgePolicy) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.BulkPurgeRollupRequestPurgePolicyOneOf != nil { + return obj.BulkPurgeRollupRequestPurgePolicyOneOf + } + + if obj.BulkPurgeRollupRequestPurgePolicyOneOf1 != nil { + return obj.BulkPurgeRollupRequestPurgePolicyOneOf1 + } + + // all schemas are nil + return nil +} + +type NullableBulkPurgeRollupRequestPurgePolicy struct { + value *BulkPurgeRollupRequestPurgePolicy + isSet bool +} + +func (v NullableBulkPurgeRollupRequestPurgePolicy) Get() *BulkPurgeRollupRequestPurgePolicy { + return v.value +} + +func (v *NullableBulkPurgeRollupRequestPurgePolicy) Set(val *BulkPurgeRollupRequestPurgePolicy) { + v.value = val + v.isSet = true +} + +func (v NullableBulkPurgeRollupRequestPurgePolicy) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkPurgeRollupRequestPurgePolicy) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkPurgeRollupRequestPurgePolicy(val *BulkPurgeRollupRequestPurgePolicy) *NullableBulkPurgeRollupRequestPurgePolicy { + return &NullableBulkPurgeRollupRequestPurgePolicy{value: val, isSet: true} +} + +func (v NullableBulkPurgeRollupRequestPurgePolicy) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkPurgeRollupRequestPurgePolicy) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/slo/model_bulk_purge_rollup_request_purge_policy_one_of.go b/generated/slo/model_bulk_purge_rollup_request_purge_policy_one_of.go new file mode 100644 index 000000000..72fbedf9e --- /dev/null +++ b/generated/slo/model_bulk_purge_rollup_request_purge_policy_one_of.go @@ -0,0 +1,162 @@ +/* +SLOs + +OpenAPI schema for SLOs endpoints + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package slo + +import ( + "encoding/json" +) + +// checks if the BulkPurgeRollupRequestPurgePolicyOneOf type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkPurgeRollupRequestPurgePolicyOneOf{} + +// BulkPurgeRollupRequestPurgePolicyOneOf struct for BulkPurgeRollupRequestPurgePolicyOneOf +type BulkPurgeRollupRequestPurgePolicyOneOf struct { + // Specifies whether documents will be purged based on a specific age or on a timestamp + PurgeType *string `json:"purgeType,omitempty"` + // The duration to determine which documents to purge, formatted as {duration}{unit}. This value should be greater than or equal to the time window of every SLO provided. + Age *string `json:"age,omitempty"` +} + +// NewBulkPurgeRollupRequestPurgePolicyOneOf instantiates a new BulkPurgeRollupRequestPurgePolicyOneOf 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 NewBulkPurgeRollupRequestPurgePolicyOneOf() *BulkPurgeRollupRequestPurgePolicyOneOf { + this := BulkPurgeRollupRequestPurgePolicyOneOf{} + return &this +} + +// NewBulkPurgeRollupRequestPurgePolicyOneOfWithDefaults instantiates a new BulkPurgeRollupRequestPurgePolicyOneOf 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 NewBulkPurgeRollupRequestPurgePolicyOneOfWithDefaults() *BulkPurgeRollupRequestPurgePolicyOneOf { + this := BulkPurgeRollupRequestPurgePolicyOneOf{} + return &this +} + +// GetPurgeType returns the PurgeType field value if set, zero value otherwise. +func (o *BulkPurgeRollupRequestPurgePolicyOneOf) GetPurgeType() string { + if o == nil || IsNil(o.PurgeType) { + var ret string + return ret + } + return *o.PurgeType +} + +// GetPurgeTypeOk returns a tuple with the PurgeType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkPurgeRollupRequestPurgePolicyOneOf) GetPurgeTypeOk() (*string, bool) { + if o == nil || IsNil(o.PurgeType) { + return nil, false + } + return o.PurgeType, true +} + +// HasPurgeType returns a boolean if a field has been set. +func (o *BulkPurgeRollupRequestPurgePolicyOneOf) HasPurgeType() bool { + if o != nil && !IsNil(o.PurgeType) { + return true + } + + return false +} + +// SetPurgeType gets a reference to the given string and assigns it to the PurgeType field. +func (o *BulkPurgeRollupRequestPurgePolicyOneOf) SetPurgeType(v string) { + o.PurgeType = &v +} + +// GetAge returns the Age field value if set, zero value otherwise. +func (o *BulkPurgeRollupRequestPurgePolicyOneOf) GetAge() string { + if o == nil || IsNil(o.Age) { + var ret string + return ret + } + return *o.Age +} + +// GetAgeOk returns a tuple with the Age field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkPurgeRollupRequestPurgePolicyOneOf) GetAgeOk() (*string, bool) { + if o == nil || IsNil(o.Age) { + return nil, false + } + return o.Age, true +} + +// HasAge returns a boolean if a field has been set. +func (o *BulkPurgeRollupRequestPurgePolicyOneOf) HasAge() bool { + if o != nil && !IsNil(o.Age) { + return true + } + + return false +} + +// SetAge gets a reference to the given string and assigns it to the Age field. +func (o *BulkPurgeRollupRequestPurgePolicyOneOf) SetAge(v string) { + o.Age = &v +} + +func (o BulkPurgeRollupRequestPurgePolicyOneOf) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkPurgeRollupRequestPurgePolicyOneOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PurgeType) { + toSerialize["purgeType"] = o.PurgeType + } + if !IsNil(o.Age) { + toSerialize["age"] = o.Age + } + return toSerialize, nil +} + +type NullableBulkPurgeRollupRequestPurgePolicyOneOf struct { + value *BulkPurgeRollupRequestPurgePolicyOneOf + isSet bool +} + +func (v NullableBulkPurgeRollupRequestPurgePolicyOneOf) Get() *BulkPurgeRollupRequestPurgePolicyOneOf { + return v.value +} + +func (v *NullableBulkPurgeRollupRequestPurgePolicyOneOf) Set(val *BulkPurgeRollupRequestPurgePolicyOneOf) { + v.value = val + v.isSet = true +} + +func (v NullableBulkPurgeRollupRequestPurgePolicyOneOf) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkPurgeRollupRequestPurgePolicyOneOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkPurgeRollupRequestPurgePolicyOneOf(val *BulkPurgeRollupRequestPurgePolicyOneOf) *NullableBulkPurgeRollupRequestPurgePolicyOneOf { + return &NullableBulkPurgeRollupRequestPurgePolicyOneOf{value: val, isSet: true} +} + +func (v NullableBulkPurgeRollupRequestPurgePolicyOneOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkPurgeRollupRequestPurgePolicyOneOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/slo/model_bulk_purge_rollup_request_purge_policy_one_of_1.go b/generated/slo/model_bulk_purge_rollup_request_purge_policy_one_of_1.go new file mode 100644 index 000000000..a64138364 --- /dev/null +++ b/generated/slo/model_bulk_purge_rollup_request_purge_policy_one_of_1.go @@ -0,0 +1,162 @@ +/* +SLOs + +OpenAPI schema for SLOs endpoints + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package slo + +import ( + "encoding/json" +) + +// checks if the BulkPurgeRollupRequestPurgePolicyOneOf1 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkPurgeRollupRequestPurgePolicyOneOf1{} + +// BulkPurgeRollupRequestPurgePolicyOneOf1 struct for BulkPurgeRollupRequestPurgePolicyOneOf1 +type BulkPurgeRollupRequestPurgePolicyOneOf1 struct { + // Specifies whether documents will be purged based on a specific age or on a timestamp + PurgeType *string `json:"purgeType,omitempty"` + // The timestamp to determine which documents to purge, formatted in ISO. This value should be older than the applicable time window of every SLO provided. + Timestamp *string `json:"timestamp,omitempty"` +} + +// NewBulkPurgeRollupRequestPurgePolicyOneOf1 instantiates a new BulkPurgeRollupRequestPurgePolicyOneOf1 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 NewBulkPurgeRollupRequestPurgePolicyOneOf1() *BulkPurgeRollupRequestPurgePolicyOneOf1 { + this := BulkPurgeRollupRequestPurgePolicyOneOf1{} + return &this +} + +// NewBulkPurgeRollupRequestPurgePolicyOneOf1WithDefaults instantiates a new BulkPurgeRollupRequestPurgePolicyOneOf1 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 NewBulkPurgeRollupRequestPurgePolicyOneOf1WithDefaults() *BulkPurgeRollupRequestPurgePolicyOneOf1 { + this := BulkPurgeRollupRequestPurgePolicyOneOf1{} + return &this +} + +// GetPurgeType returns the PurgeType field value if set, zero value otherwise. +func (o *BulkPurgeRollupRequestPurgePolicyOneOf1) GetPurgeType() string { + if o == nil || IsNil(o.PurgeType) { + var ret string + return ret + } + return *o.PurgeType +} + +// GetPurgeTypeOk returns a tuple with the PurgeType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkPurgeRollupRequestPurgePolicyOneOf1) GetPurgeTypeOk() (*string, bool) { + if o == nil || IsNil(o.PurgeType) { + return nil, false + } + return o.PurgeType, true +} + +// HasPurgeType returns a boolean if a field has been set. +func (o *BulkPurgeRollupRequestPurgePolicyOneOf1) HasPurgeType() bool { + if o != nil && !IsNil(o.PurgeType) { + return true + } + + return false +} + +// SetPurgeType gets a reference to the given string and assigns it to the PurgeType field. +func (o *BulkPurgeRollupRequestPurgePolicyOneOf1) SetPurgeType(v string) { + o.PurgeType = &v +} + +// GetTimestamp returns the Timestamp field value if set, zero value otherwise. +func (o *BulkPurgeRollupRequestPurgePolicyOneOf1) GetTimestamp() string { + if o == nil || IsNil(o.Timestamp) { + var ret string + return ret + } + return *o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkPurgeRollupRequestPurgePolicyOneOf1) GetTimestampOk() (*string, bool) { + if o == nil || IsNil(o.Timestamp) { + return nil, false + } + return o.Timestamp, true +} + +// HasTimestamp returns a boolean if a field has been set. +func (o *BulkPurgeRollupRequestPurgePolicyOneOf1) HasTimestamp() bool { + if o != nil && !IsNil(o.Timestamp) { + return true + } + + return false +} + +// SetTimestamp gets a reference to the given string and assigns it to the Timestamp field. +func (o *BulkPurgeRollupRequestPurgePolicyOneOf1) SetTimestamp(v string) { + o.Timestamp = &v +} + +func (o BulkPurgeRollupRequestPurgePolicyOneOf1) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkPurgeRollupRequestPurgePolicyOneOf1) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PurgeType) { + toSerialize["purgeType"] = o.PurgeType + } + if !IsNil(o.Timestamp) { + toSerialize["timestamp"] = o.Timestamp + } + return toSerialize, nil +} + +type NullableBulkPurgeRollupRequestPurgePolicyOneOf1 struct { + value *BulkPurgeRollupRequestPurgePolicyOneOf1 + isSet bool +} + +func (v NullableBulkPurgeRollupRequestPurgePolicyOneOf1) Get() *BulkPurgeRollupRequestPurgePolicyOneOf1 { + return v.value +} + +func (v *NullableBulkPurgeRollupRequestPurgePolicyOneOf1) Set(val *BulkPurgeRollupRequestPurgePolicyOneOf1) { + v.value = val + v.isSet = true +} + +func (v NullableBulkPurgeRollupRequestPurgePolicyOneOf1) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkPurgeRollupRequestPurgePolicyOneOf1) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkPurgeRollupRequestPurgePolicyOneOf1(val *BulkPurgeRollupRequestPurgePolicyOneOf1) *NullableBulkPurgeRollupRequestPurgePolicyOneOf1 { + return &NullableBulkPurgeRollupRequestPurgePolicyOneOf1{value: val, isSet: true} +} + +func (v NullableBulkPurgeRollupRequestPurgePolicyOneOf1) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkPurgeRollupRequestPurgePolicyOneOf1) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/slo/model_bulk_purge_rollup_response.go b/generated/slo/model_bulk_purge_rollup_response.go new file mode 100644 index 000000000..91661acb3 --- /dev/null +++ b/generated/slo/model_bulk_purge_rollup_response.go @@ -0,0 +1,125 @@ +/* +SLOs + +OpenAPI schema for SLOs endpoints + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package slo + +import ( + "encoding/json" +) + +// checks if the BulkPurgeRollupResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BulkPurgeRollupResponse{} + +// BulkPurgeRollupResponse The bulk purge rollup data response returns a task id from the elasticsearch deleteByQuery response. +type BulkPurgeRollupResponse struct { + // The task id of the purge operation + TaskId *string `json:"taskId,omitempty"` +} + +// NewBulkPurgeRollupResponse instantiates a new BulkPurgeRollupResponse 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 NewBulkPurgeRollupResponse() *BulkPurgeRollupResponse { + this := BulkPurgeRollupResponse{} + return &this +} + +// NewBulkPurgeRollupResponseWithDefaults instantiates a new BulkPurgeRollupResponse 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 NewBulkPurgeRollupResponseWithDefaults() *BulkPurgeRollupResponse { + this := BulkPurgeRollupResponse{} + return &this +} + +// GetTaskId returns the TaskId field value if set, zero value otherwise. +func (o *BulkPurgeRollupResponse) GetTaskId() string { + if o == nil || IsNil(o.TaskId) { + var ret string + return ret + } + return *o.TaskId +} + +// GetTaskIdOk returns a tuple with the TaskId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BulkPurgeRollupResponse) GetTaskIdOk() (*string, bool) { + if o == nil || IsNil(o.TaskId) { + return nil, false + } + return o.TaskId, true +} + +// HasTaskId returns a boolean if a field has been set. +func (o *BulkPurgeRollupResponse) HasTaskId() bool { + if o != nil && !IsNil(o.TaskId) { + return true + } + + return false +} + +// SetTaskId gets a reference to the given string and assigns it to the TaskId field. +func (o *BulkPurgeRollupResponse) SetTaskId(v string) { + o.TaskId = &v +} + +func (o BulkPurgeRollupResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BulkPurgeRollupResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.TaskId) { + toSerialize["taskId"] = o.TaskId + } + return toSerialize, nil +} + +type NullableBulkPurgeRollupResponse struct { + value *BulkPurgeRollupResponse + isSet bool +} + +func (v NullableBulkPurgeRollupResponse) Get() *BulkPurgeRollupResponse { + return v.value +} + +func (v *NullableBulkPurgeRollupResponse) Set(val *BulkPurgeRollupResponse) { + v.value = val + v.isSet = true +} + +func (v NullableBulkPurgeRollupResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableBulkPurgeRollupResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBulkPurgeRollupResponse(val *BulkPurgeRollupResponse) *NullableBulkPurgeRollupResponse { + return &NullableBulkPurgeRollupResponse{value: val, isSet: true} +} + +func (v NullableBulkPurgeRollupResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBulkPurgeRollupResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/slo/model_create_slo_request.go b/generated/slo/model_create_slo_request.go index 02210deb0..7c2add5b3 100644 --- a/generated/slo/model_create_slo_request.go +++ b/generated/slo/model_create_slo_request.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -30,7 +30,7 @@ type CreateSloRequest struct { BudgetingMethod BudgetingMethod `json:"budgetingMethod"` Objective Objective `json:"objective"` Settings *Settings `json:"settings,omitempty"` - GroupBy *SloResponseGroupBy `json:"groupBy,omitempty"` + GroupBy *GroupBy `json:"groupBy,omitempty"` // List of tags Tags []string `json:"tags,omitempty"` } @@ -267,9 +267,9 @@ func (o *CreateSloRequest) SetSettings(v Settings) { } // GetGroupBy returns the GroupBy field value if set, zero value otherwise. -func (o *CreateSloRequest) GetGroupBy() SloResponseGroupBy { +func (o *CreateSloRequest) GetGroupBy() GroupBy { if o == nil || IsNil(o.GroupBy) { - var ret SloResponseGroupBy + var ret GroupBy return ret } return *o.GroupBy @@ -277,7 +277,7 @@ func (o *CreateSloRequest) GetGroupBy() SloResponseGroupBy { // GetGroupByOk returns a tuple with the GroupBy field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateSloRequest) GetGroupByOk() (*SloResponseGroupBy, bool) { +func (o *CreateSloRequest) GetGroupByOk() (*GroupBy, bool) { if o == nil || IsNil(o.GroupBy) { return nil, false } @@ -293,8 +293,8 @@ func (o *CreateSloRequest) HasGroupBy() bool { return false } -// SetGroupBy gets a reference to the given SloResponseGroupBy and assigns it to the GroupBy field. -func (o *CreateSloRequest) SetGroupBy(v SloResponseGroupBy) { +// SetGroupBy gets a reference to the given GroupBy and assigns it to the GroupBy field. +func (o *CreateSloRequest) SetGroupBy(v GroupBy) { o.GroupBy = &v } diff --git a/generated/slo/model_create_slo_request_indicator.go b/generated/slo/model_create_slo_request_indicator.go index 56c4975b2..8c46f30ed 100644 --- a/generated/slo/model_create_slo_request_indicator.go +++ b/generated/slo/model_create_slo_request_indicator.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_create_slo_response.go b/generated/slo/model_create_slo_response.go index 53d6c95db..793f7a05c 100644 --- a/generated/slo/model_create_slo_response.go +++ b/generated/slo/model_create_slo_response.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_delete_slo_instances_request.go b/generated/slo/model_delete_slo_instances_request.go index a8a4be95f..c9e381a7e 100644 --- a/generated/slo/model_delete_slo_instances_request.go +++ b/generated/slo/model_delete_slo_instances_request.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_delete_slo_instances_request_list_inner.go b/generated/slo/model_delete_slo_instances_request_list_inner.go index 22694c856..1dcc1042a 100644 --- a/generated/slo/model_delete_slo_instances_request_list_inner.go +++ b/generated/slo/model_delete_slo_instances_request_list_inner.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_error_budget.go b/generated/slo/model_error_budget.go index d7d8e6b6d..ff30efc8a 100644 --- a/generated/slo/model_error_budget.go +++ b/generated/slo/model_error_budget.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_filter.go b/generated/slo/model_filter.go new file mode 100644 index 000000000..df99bdb07 --- /dev/null +++ b/generated/slo/model_filter.go @@ -0,0 +1,160 @@ +/* +SLOs + +OpenAPI schema for SLOs endpoints + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package slo + +import ( + "encoding/json" +) + +// checks if the Filter type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Filter{} + +// Filter Defines properties for a filter +type Filter struct { + Query map[string]interface{} `json:"query,omitempty"` + Meta *FilterMeta `json:"meta,omitempty"` +} + +// NewFilter instantiates a new Filter 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 NewFilter() *Filter { + this := Filter{} + return &this +} + +// NewFilterWithDefaults instantiates a new Filter 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 NewFilterWithDefaults() *Filter { + this := Filter{} + return &this +} + +// GetQuery returns the Query field value if set, zero value otherwise. +func (o *Filter) GetQuery() map[string]interface{} { + if o == nil || IsNil(o.Query) { + var ret map[string]interface{} + return ret + } + return o.Query +} + +// GetQueryOk returns a tuple with the Query field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Filter) GetQueryOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Query) { + return map[string]interface{}{}, false + } + return o.Query, true +} + +// HasQuery returns a boolean if a field has been set. +func (o *Filter) HasQuery() bool { + if o != nil && !IsNil(o.Query) { + return true + } + + return false +} + +// SetQuery gets a reference to the given map[string]interface{} and assigns it to the Query field. +func (o *Filter) SetQuery(v map[string]interface{}) { + o.Query = v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *Filter) GetMeta() FilterMeta { + if o == nil || IsNil(o.Meta) { + var ret FilterMeta + return ret + } + return *o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Filter) GetMetaOk() (*FilterMeta, bool) { + if o == nil || IsNil(o.Meta) { + return nil, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *Filter) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given FilterMeta and assigns it to the Meta field. +func (o *Filter) SetMeta(v FilterMeta) { + o.Meta = &v +} + +func (o Filter) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Filter) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Query) { + toSerialize["query"] = o.Query + } + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + return toSerialize, nil +} + +type NullableFilter struct { + value *Filter + isSet bool +} + +func (v NullableFilter) Get() *Filter { + return v.value +} + +func (v *NullableFilter) Set(val *Filter) { + v.value = val + v.isSet = true +} + +func (v NullableFilter) IsSet() bool { + return v.isSet +} + +func (v *NullableFilter) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFilter(val *Filter) *NullableFilter { + return &NullableFilter{value: val, isSet: true} +} + +func (v NullableFilter) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFilter) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/slo/model_filter_meta.go b/generated/slo/model_filter_meta.go new file mode 100644 index 000000000..8565f7ddd --- /dev/null +++ b/generated/slo/model_filter_meta.go @@ -0,0 +1,531 @@ +/* +SLOs + +OpenAPI schema for SLOs endpoints + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package slo + +import ( + "encoding/json" +) + +// checks if the FilterMeta type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FilterMeta{} + +// FilterMeta Defines properties for a filter +type FilterMeta struct { + Alias NullableString `json:"alias,omitempty"` + Disabled *bool `json:"disabled,omitempty"` + Negate *bool `json:"negate,omitempty"` + ControlledBy *string `json:"controlledBy,omitempty"` + Group *string `json:"group,omitempty"` + Index *string `json:"index,omitempty"` + IsMultiIndex *bool `json:"isMultiIndex,omitempty"` + Type *string `json:"type,omitempty"` + Key *string `json:"key,omitempty"` + Params map[string]interface{} `json:"params,omitempty"` + Value *string `json:"value,omitempty"` + Field *string `json:"field,omitempty"` +} + +// NewFilterMeta instantiates a new FilterMeta 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 NewFilterMeta() *FilterMeta { + this := FilterMeta{} + return &this +} + +// NewFilterMetaWithDefaults instantiates a new FilterMeta 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 NewFilterMetaWithDefaults() *FilterMeta { + this := FilterMeta{} + return &this +} + +// GetAlias returns the Alias field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FilterMeta) GetAlias() string { + if o == nil || IsNil(o.Alias.Get()) { + var ret string + return ret + } + return *o.Alias.Get() +} + +// GetAliasOk returns a tuple with the Alias 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 *FilterMeta) GetAliasOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Alias.Get(), o.Alias.IsSet() +} + +// HasAlias returns a boolean if a field has been set. +func (o *FilterMeta) HasAlias() bool { + if o != nil && o.Alias.IsSet() { + return true + } + + return false +} + +// SetAlias gets a reference to the given NullableString and assigns it to the Alias field. +func (o *FilterMeta) SetAlias(v string) { + o.Alias.Set(&v) +} + +// SetAliasNil sets the value for Alias to be an explicit nil +func (o *FilterMeta) SetAliasNil() { + o.Alias.Set(nil) +} + +// UnsetAlias ensures that no value is present for Alias, not even an explicit nil +func (o *FilterMeta) UnsetAlias() { + o.Alias.Unset() +} + +// GetDisabled returns the Disabled field value if set, zero value otherwise. +func (o *FilterMeta) GetDisabled() bool { + if o == nil || IsNil(o.Disabled) { + var ret bool + return ret + } + return *o.Disabled +} + +// GetDisabledOk returns a tuple with the Disabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilterMeta) GetDisabledOk() (*bool, bool) { + if o == nil || IsNil(o.Disabled) { + return nil, false + } + return o.Disabled, true +} + +// HasDisabled returns a boolean if a field has been set. +func (o *FilterMeta) HasDisabled() bool { + if o != nil && !IsNil(o.Disabled) { + return true + } + + return false +} + +// SetDisabled gets a reference to the given bool and assigns it to the Disabled field. +func (o *FilterMeta) SetDisabled(v bool) { + o.Disabled = &v +} + +// GetNegate returns the Negate field value if set, zero value otherwise. +func (o *FilterMeta) GetNegate() bool { + if o == nil || IsNil(o.Negate) { + var ret bool + return ret + } + return *o.Negate +} + +// GetNegateOk returns a tuple with the Negate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilterMeta) GetNegateOk() (*bool, bool) { + if o == nil || IsNil(o.Negate) { + return nil, false + } + return o.Negate, true +} + +// HasNegate returns a boolean if a field has been set. +func (o *FilterMeta) HasNegate() bool { + if o != nil && !IsNil(o.Negate) { + return true + } + + return false +} + +// SetNegate gets a reference to the given bool and assigns it to the Negate field. +func (o *FilterMeta) SetNegate(v bool) { + o.Negate = &v +} + +// GetControlledBy returns the ControlledBy field value if set, zero value otherwise. +func (o *FilterMeta) GetControlledBy() string { + if o == nil || IsNil(o.ControlledBy) { + var ret string + return ret + } + return *o.ControlledBy +} + +// GetControlledByOk returns a tuple with the ControlledBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilterMeta) GetControlledByOk() (*string, bool) { + if o == nil || IsNil(o.ControlledBy) { + return nil, false + } + return o.ControlledBy, true +} + +// HasControlledBy returns a boolean if a field has been set. +func (o *FilterMeta) HasControlledBy() bool { + if o != nil && !IsNil(o.ControlledBy) { + return true + } + + return false +} + +// SetControlledBy gets a reference to the given string and assigns it to the ControlledBy field. +func (o *FilterMeta) SetControlledBy(v string) { + o.ControlledBy = &v +} + +// GetGroup returns the Group field value if set, zero value otherwise. +func (o *FilterMeta) GetGroup() string { + if o == nil || IsNil(o.Group) { + var ret string + return ret + } + return *o.Group +} + +// GetGroupOk returns a tuple with the Group field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilterMeta) GetGroupOk() (*string, bool) { + if o == nil || IsNil(o.Group) { + return nil, false + } + return o.Group, true +} + +// HasGroup returns a boolean if a field has been set. +func (o *FilterMeta) HasGroup() bool { + if o != nil && !IsNil(o.Group) { + return true + } + + return false +} + +// SetGroup gets a reference to the given string and assigns it to the Group field. +func (o *FilterMeta) SetGroup(v string) { + o.Group = &v +} + +// GetIndex returns the Index field value if set, zero value otherwise. +func (o *FilterMeta) GetIndex() string { + if o == nil || IsNil(o.Index) { + var ret string + return ret + } + return *o.Index +} + +// GetIndexOk returns a tuple with the Index field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilterMeta) GetIndexOk() (*string, bool) { + if o == nil || IsNil(o.Index) { + return nil, false + } + return o.Index, true +} + +// HasIndex returns a boolean if a field has been set. +func (o *FilterMeta) HasIndex() bool { + if o != nil && !IsNil(o.Index) { + return true + } + + return false +} + +// SetIndex gets a reference to the given string and assigns it to the Index field. +func (o *FilterMeta) SetIndex(v string) { + o.Index = &v +} + +// GetIsMultiIndex returns the IsMultiIndex field value if set, zero value otherwise. +func (o *FilterMeta) GetIsMultiIndex() bool { + if o == nil || IsNil(o.IsMultiIndex) { + var ret bool + return ret + } + return *o.IsMultiIndex +} + +// GetIsMultiIndexOk returns a tuple with the IsMultiIndex field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilterMeta) GetIsMultiIndexOk() (*bool, bool) { + if o == nil || IsNil(o.IsMultiIndex) { + return nil, false + } + return o.IsMultiIndex, true +} + +// HasIsMultiIndex returns a boolean if a field has been set. +func (o *FilterMeta) HasIsMultiIndex() bool { + if o != nil && !IsNil(o.IsMultiIndex) { + return true + } + + return false +} + +// SetIsMultiIndex gets a reference to the given bool and assigns it to the IsMultiIndex field. +func (o *FilterMeta) SetIsMultiIndex(v bool) { + o.IsMultiIndex = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *FilterMeta) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilterMeta) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *FilterMeta) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *FilterMeta) SetType(v string) { + o.Type = &v +} + +// GetKey returns the Key field value if set, zero value otherwise. +func (o *FilterMeta) GetKey() string { + if o == nil || IsNil(o.Key) { + var ret string + return ret + } + return *o.Key +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilterMeta) GetKeyOk() (*string, bool) { + if o == nil || IsNil(o.Key) { + return nil, false + } + return o.Key, true +} + +// HasKey returns a boolean if a field has been set. +func (o *FilterMeta) HasKey() bool { + if o != nil && !IsNil(o.Key) { + return true + } + + return false +} + +// SetKey gets a reference to the given string and assigns it to the Key field. +func (o *FilterMeta) SetKey(v string) { + o.Key = &v +} + +// GetParams returns the Params field value if set, zero value otherwise. +func (o *FilterMeta) GetParams() map[string]interface{} { + if o == nil || IsNil(o.Params) { + var ret map[string]interface{} + return ret + } + return o.Params +} + +// GetParamsOk returns a tuple with the Params field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilterMeta) GetParamsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Params) { + return map[string]interface{}{}, false + } + return o.Params, true +} + +// HasParams returns a boolean if a field has been set. +func (o *FilterMeta) HasParams() bool { + if o != nil && !IsNil(o.Params) { + return true + } + + return false +} + +// SetParams gets a reference to the given map[string]interface{} and assigns it to the Params field. +func (o *FilterMeta) SetParams(v map[string]interface{}) { + o.Params = v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *FilterMeta) GetValue() string { + if o == nil || IsNil(o.Value) { + var ret string + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilterMeta) GetValueOk() (*string, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *FilterMeta) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given string and assigns it to the Value field. +func (o *FilterMeta) SetValue(v string) { + o.Value = &v +} + +// GetField returns the Field field value if set, zero value otherwise. +func (o *FilterMeta) GetField() string { + if o == nil || IsNil(o.Field) { + var ret string + return ret + } + return *o.Field +} + +// GetFieldOk returns a tuple with the Field field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FilterMeta) GetFieldOk() (*string, bool) { + if o == nil || IsNil(o.Field) { + return nil, false + } + return o.Field, true +} + +// HasField returns a boolean if a field has been set. +func (o *FilterMeta) HasField() bool { + if o != nil && !IsNil(o.Field) { + return true + } + + return false +} + +// SetField gets a reference to the given string and assigns it to the Field field. +func (o *FilterMeta) SetField(v string) { + o.Field = &v +} + +func (o FilterMeta) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FilterMeta) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Alias.IsSet() { + toSerialize["alias"] = o.Alias.Get() + } + if !IsNil(o.Disabled) { + toSerialize["disabled"] = o.Disabled + } + if !IsNil(o.Negate) { + toSerialize["negate"] = o.Negate + } + if !IsNil(o.ControlledBy) { + toSerialize["controlledBy"] = o.ControlledBy + } + if !IsNil(o.Group) { + toSerialize["group"] = o.Group + } + if !IsNil(o.Index) { + toSerialize["index"] = o.Index + } + if !IsNil(o.IsMultiIndex) { + toSerialize["isMultiIndex"] = o.IsMultiIndex + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Key) { + toSerialize["key"] = o.Key + } + if !IsNil(o.Params) { + toSerialize["params"] = o.Params + } + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + if !IsNil(o.Field) { + toSerialize["field"] = o.Field + } + return toSerialize, nil +} + +type NullableFilterMeta struct { + value *FilterMeta + isSet bool +} + +func (v NullableFilterMeta) Get() *FilterMeta { + return v.value +} + +func (v *NullableFilterMeta) Set(val *FilterMeta) { + v.value = val + v.isSet = true +} + +func (v NullableFilterMeta) IsSet() bool { + return v.isSet +} + +func (v *NullableFilterMeta) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFilterMeta(val *FilterMeta) *NullableFilterMeta { + return &NullableFilterMeta{value: val, isSet: true} +} + +func (v NullableFilterMeta) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFilterMeta) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/slo/model_find_slo_definitions_response.go b/generated/slo/model_find_slo_definitions_response.go new file mode 100644 index 000000000..7f10a786b --- /dev/null +++ b/generated/slo/model_find_slo_definitions_response.go @@ -0,0 +1,145 @@ +/* +SLOs + +OpenAPI schema for SLOs endpoints + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package slo + +import ( + "encoding/json" + "fmt" +) + +// FindSloDefinitionsResponse - A paginated response of SLO definitions matching the query. +type FindSloDefinitionsResponse struct { + FindSloDefinitionsResponseOneOf *FindSloDefinitionsResponseOneOf + FindSloDefinitionsResponseOneOf1 *FindSloDefinitionsResponseOneOf1 +} + +// FindSloDefinitionsResponseOneOfAsFindSloDefinitionsResponse is a convenience function that returns FindSloDefinitionsResponseOneOf wrapped in FindSloDefinitionsResponse +func FindSloDefinitionsResponseOneOfAsFindSloDefinitionsResponse(v *FindSloDefinitionsResponseOneOf) FindSloDefinitionsResponse { + return FindSloDefinitionsResponse{ + FindSloDefinitionsResponseOneOf: v, + } +} + +// FindSloDefinitionsResponseOneOf1AsFindSloDefinitionsResponse is a convenience function that returns FindSloDefinitionsResponseOneOf1 wrapped in FindSloDefinitionsResponse +func FindSloDefinitionsResponseOneOf1AsFindSloDefinitionsResponse(v *FindSloDefinitionsResponseOneOf1) FindSloDefinitionsResponse { + return FindSloDefinitionsResponse{ + FindSloDefinitionsResponseOneOf1: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *FindSloDefinitionsResponse) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into FindSloDefinitionsResponseOneOf + err = json.Unmarshal(data, &dst.FindSloDefinitionsResponseOneOf) + if err == nil { + jsonFindSloDefinitionsResponseOneOf, _ := json.Marshal(dst.FindSloDefinitionsResponseOneOf) + if string(jsonFindSloDefinitionsResponseOneOf) == "{}" { // empty struct + dst.FindSloDefinitionsResponseOneOf = nil + } else { + match++ + } + } else { + dst.FindSloDefinitionsResponseOneOf = nil + } + + // try to unmarshal data into FindSloDefinitionsResponseOneOf1 + err = json.Unmarshal(data, &dst.FindSloDefinitionsResponseOneOf1) + if err == nil { + jsonFindSloDefinitionsResponseOneOf1, _ := json.Marshal(dst.FindSloDefinitionsResponseOneOf1) + if string(jsonFindSloDefinitionsResponseOneOf1) == "{}" { // empty struct + dst.FindSloDefinitionsResponseOneOf1 = nil + } else { + match++ + } + } else { + dst.FindSloDefinitionsResponseOneOf1 = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.FindSloDefinitionsResponseOneOf = nil + dst.FindSloDefinitionsResponseOneOf1 = nil + + return fmt.Errorf("data matches more than one schema in oneOf(FindSloDefinitionsResponse)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(FindSloDefinitionsResponse)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src FindSloDefinitionsResponse) MarshalJSON() ([]byte, error) { + if src.FindSloDefinitionsResponseOneOf != nil { + return json.Marshal(&src.FindSloDefinitionsResponseOneOf) + } + + if src.FindSloDefinitionsResponseOneOf1 != nil { + return json.Marshal(&src.FindSloDefinitionsResponseOneOf1) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *FindSloDefinitionsResponse) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.FindSloDefinitionsResponseOneOf != nil { + return obj.FindSloDefinitionsResponseOneOf + } + + if obj.FindSloDefinitionsResponseOneOf1 != nil { + return obj.FindSloDefinitionsResponseOneOf1 + } + + // all schemas are nil + return nil +} + +type NullableFindSloDefinitionsResponse struct { + value *FindSloDefinitionsResponse + isSet bool +} + +func (v NullableFindSloDefinitionsResponse) Get() *FindSloDefinitionsResponse { + return v.value +} + +func (v *NullableFindSloDefinitionsResponse) Set(val *FindSloDefinitionsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFindSloDefinitionsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFindSloDefinitionsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFindSloDefinitionsResponse(val *FindSloDefinitionsResponse) *NullableFindSloDefinitionsResponse { + return &NullableFindSloDefinitionsResponse{value: val, isSet: true} +} + +func (v NullableFindSloDefinitionsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFindSloDefinitionsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/slo/model_find_slo_definitions_response_one_of.go b/generated/slo/model_find_slo_definitions_response_one_of.go new file mode 100644 index 000000000..67ff9551d --- /dev/null +++ b/generated/slo/model_find_slo_definitions_response_one_of.go @@ -0,0 +1,232 @@ +/* +SLOs + +OpenAPI schema for SLOs endpoints + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package slo + +import ( + "encoding/json" +) + +// checks if the FindSloDefinitionsResponseOneOf type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FindSloDefinitionsResponseOneOf{} + +// FindSloDefinitionsResponseOneOf struct for FindSloDefinitionsResponseOneOf +type FindSloDefinitionsResponseOneOf struct { + Page *float64 `json:"page,omitempty"` + PerPage *float64 `json:"perPage,omitempty"` + Total *float64 `json:"total,omitempty"` + Results []SloWithSummaryResponse `json:"results,omitempty"` +} + +// NewFindSloDefinitionsResponseOneOf instantiates a new FindSloDefinitionsResponseOneOf 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 NewFindSloDefinitionsResponseOneOf() *FindSloDefinitionsResponseOneOf { + this := FindSloDefinitionsResponseOneOf{} + return &this +} + +// NewFindSloDefinitionsResponseOneOfWithDefaults instantiates a new FindSloDefinitionsResponseOneOf 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 NewFindSloDefinitionsResponseOneOfWithDefaults() *FindSloDefinitionsResponseOneOf { + this := FindSloDefinitionsResponseOneOf{} + return &this +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *FindSloDefinitionsResponseOneOf) GetPage() float64 { + if o == nil || IsNil(o.Page) { + var ret float64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FindSloDefinitionsResponseOneOf) GetPageOk() (*float64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *FindSloDefinitionsResponseOneOf) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given float64 and assigns it to the Page field. +func (o *FindSloDefinitionsResponseOneOf) SetPage(v float64) { + o.Page = &v +} + +// GetPerPage returns the PerPage field value if set, zero value otherwise. +func (o *FindSloDefinitionsResponseOneOf) GetPerPage() float64 { + if o == nil || IsNil(o.PerPage) { + var ret float64 + return ret + } + return *o.PerPage +} + +// GetPerPageOk returns a tuple with the PerPage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FindSloDefinitionsResponseOneOf) GetPerPageOk() (*float64, bool) { + if o == nil || IsNil(o.PerPage) { + return nil, false + } + return o.PerPage, true +} + +// HasPerPage returns a boolean if a field has been set. +func (o *FindSloDefinitionsResponseOneOf) HasPerPage() bool { + if o != nil && !IsNil(o.PerPage) { + return true + } + + return false +} + +// SetPerPage gets a reference to the given float64 and assigns it to the PerPage field. +func (o *FindSloDefinitionsResponseOneOf) SetPerPage(v float64) { + o.PerPage = &v +} + +// GetTotal returns the Total field value if set, zero value otherwise. +func (o *FindSloDefinitionsResponseOneOf) GetTotal() float64 { + if o == nil || IsNil(o.Total) { + var ret float64 + return ret + } + return *o.Total +} + +// GetTotalOk returns a tuple with the Total field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FindSloDefinitionsResponseOneOf) GetTotalOk() (*float64, bool) { + if o == nil || IsNil(o.Total) { + return nil, false + } + return o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *FindSloDefinitionsResponseOneOf) HasTotal() bool { + if o != nil && !IsNil(o.Total) { + return true + } + + return false +} + +// SetTotal gets a reference to the given float64 and assigns it to the Total field. +func (o *FindSloDefinitionsResponseOneOf) SetTotal(v float64) { + o.Total = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *FindSloDefinitionsResponseOneOf) GetResults() []SloWithSummaryResponse { + if o == nil || IsNil(o.Results) { + var ret []SloWithSummaryResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FindSloDefinitionsResponseOneOf) GetResultsOk() ([]SloWithSummaryResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *FindSloDefinitionsResponseOneOf) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []SloWithSummaryResponse and assigns it to the Results field. +func (o *FindSloDefinitionsResponseOneOf) SetResults(v []SloWithSummaryResponse) { + o.Results = v +} + +func (o FindSloDefinitionsResponseOneOf) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FindSloDefinitionsResponseOneOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PerPage) { + toSerialize["perPage"] = o.PerPage + } + if !IsNil(o.Total) { + toSerialize["total"] = o.Total + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullableFindSloDefinitionsResponseOneOf struct { + value *FindSloDefinitionsResponseOneOf + isSet bool +} + +func (v NullableFindSloDefinitionsResponseOneOf) Get() *FindSloDefinitionsResponseOneOf { + return v.value +} + +func (v *NullableFindSloDefinitionsResponseOneOf) Set(val *FindSloDefinitionsResponseOneOf) { + v.value = val + v.isSet = true +} + +func (v NullableFindSloDefinitionsResponseOneOf) IsSet() bool { + return v.isSet +} + +func (v *NullableFindSloDefinitionsResponseOneOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFindSloDefinitionsResponseOneOf(val *FindSloDefinitionsResponseOneOf) *NullableFindSloDefinitionsResponseOneOf { + return &NullableFindSloDefinitionsResponseOneOf{value: val, isSet: true} +} + +func (v NullableFindSloDefinitionsResponseOneOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFindSloDefinitionsResponseOneOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/slo/model_find_slo_definitions_response_one_of_1.go b/generated/slo/model_find_slo_definitions_response_one_of_1.go new file mode 100644 index 000000000..9476c49af --- /dev/null +++ b/generated/slo/model_find_slo_definitions_response_one_of_1.go @@ -0,0 +1,311 @@ +/* +SLOs + +OpenAPI schema for SLOs endpoints + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package slo + +import ( + "encoding/json" +) + +// checks if the FindSloDefinitionsResponseOneOf1 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FindSloDefinitionsResponseOneOf1{} + +// FindSloDefinitionsResponseOneOf1 struct for FindSloDefinitionsResponseOneOf1 +type FindSloDefinitionsResponseOneOf1 struct { + // for backward compability + Page *float64 `json:"page,omitempty"` + // for backward compability + PerPage *float64 `json:"perPage,omitempty"` + Size *float64 `json:"size,omitempty"` + // the cursor to provide to get the next paged results + SearchAfter []string `json:"searchAfter,omitempty"` + Total *float64 `json:"total,omitempty"` + Results []SloWithSummaryResponse `json:"results,omitempty"` +} + +// NewFindSloDefinitionsResponseOneOf1 instantiates a new FindSloDefinitionsResponseOneOf1 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 NewFindSloDefinitionsResponseOneOf1() *FindSloDefinitionsResponseOneOf1 { + this := FindSloDefinitionsResponseOneOf1{} + var page float64 = 1 + this.Page = &page + return &this +} + +// NewFindSloDefinitionsResponseOneOf1WithDefaults instantiates a new FindSloDefinitionsResponseOneOf1 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 NewFindSloDefinitionsResponseOneOf1WithDefaults() *FindSloDefinitionsResponseOneOf1 { + this := FindSloDefinitionsResponseOneOf1{} + var page float64 = 1 + this.Page = &page + return &this +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *FindSloDefinitionsResponseOneOf1) GetPage() float64 { + if o == nil || IsNil(o.Page) { + var ret float64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FindSloDefinitionsResponseOneOf1) GetPageOk() (*float64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *FindSloDefinitionsResponseOneOf1) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given float64 and assigns it to the Page field. +func (o *FindSloDefinitionsResponseOneOf1) SetPage(v float64) { + o.Page = &v +} + +// GetPerPage returns the PerPage field value if set, zero value otherwise. +func (o *FindSloDefinitionsResponseOneOf1) GetPerPage() float64 { + if o == nil || IsNil(o.PerPage) { + var ret float64 + return ret + } + return *o.PerPage +} + +// GetPerPageOk returns a tuple with the PerPage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FindSloDefinitionsResponseOneOf1) GetPerPageOk() (*float64, bool) { + if o == nil || IsNil(o.PerPage) { + return nil, false + } + return o.PerPage, true +} + +// HasPerPage returns a boolean if a field has been set. +func (o *FindSloDefinitionsResponseOneOf1) HasPerPage() bool { + if o != nil && !IsNil(o.PerPage) { + return true + } + + return false +} + +// SetPerPage gets a reference to the given float64 and assigns it to the PerPage field. +func (o *FindSloDefinitionsResponseOneOf1) SetPerPage(v float64) { + o.PerPage = &v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *FindSloDefinitionsResponseOneOf1) GetSize() float64 { + if o == nil || IsNil(o.Size) { + var ret float64 + return ret + } + return *o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FindSloDefinitionsResponseOneOf1) GetSizeOk() (*float64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *FindSloDefinitionsResponseOneOf1) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given float64 and assigns it to the Size field. +func (o *FindSloDefinitionsResponseOneOf1) SetSize(v float64) { + o.Size = &v +} + +// GetSearchAfter returns the SearchAfter field value if set, zero value otherwise. +func (o *FindSloDefinitionsResponseOneOf1) GetSearchAfter() []string { + if o == nil || IsNil(o.SearchAfter) { + var ret []string + return ret + } + return o.SearchAfter +} + +// GetSearchAfterOk returns a tuple with the SearchAfter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FindSloDefinitionsResponseOneOf1) GetSearchAfterOk() ([]string, bool) { + if o == nil || IsNil(o.SearchAfter) { + return nil, false + } + return o.SearchAfter, true +} + +// HasSearchAfter returns a boolean if a field has been set. +func (o *FindSloDefinitionsResponseOneOf1) HasSearchAfter() bool { + if o != nil && !IsNil(o.SearchAfter) { + return true + } + + return false +} + +// SetSearchAfter gets a reference to the given []string and assigns it to the SearchAfter field. +func (o *FindSloDefinitionsResponseOneOf1) SetSearchAfter(v []string) { + o.SearchAfter = v +} + +// GetTotal returns the Total field value if set, zero value otherwise. +func (o *FindSloDefinitionsResponseOneOf1) GetTotal() float64 { + if o == nil || IsNil(o.Total) { + var ret float64 + return ret + } + return *o.Total +} + +// GetTotalOk returns a tuple with the Total field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FindSloDefinitionsResponseOneOf1) GetTotalOk() (*float64, bool) { + if o == nil || IsNil(o.Total) { + return nil, false + } + return o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *FindSloDefinitionsResponseOneOf1) HasTotal() bool { + if o != nil && !IsNil(o.Total) { + return true + } + + return false +} + +// SetTotal gets a reference to the given float64 and assigns it to the Total field. +func (o *FindSloDefinitionsResponseOneOf1) SetTotal(v float64) { + o.Total = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *FindSloDefinitionsResponseOneOf1) GetResults() []SloWithSummaryResponse { + if o == nil || IsNil(o.Results) { + var ret []SloWithSummaryResponse + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FindSloDefinitionsResponseOneOf1) GetResultsOk() ([]SloWithSummaryResponse, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *FindSloDefinitionsResponseOneOf1) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []SloWithSummaryResponse and assigns it to the Results field. +func (o *FindSloDefinitionsResponseOneOf1) SetResults(v []SloWithSummaryResponse) { + o.Results = v +} + +func (o FindSloDefinitionsResponseOneOf1) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FindSloDefinitionsResponseOneOf1) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PerPage) { + toSerialize["perPage"] = o.PerPage + } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + if !IsNil(o.SearchAfter) { + toSerialize["searchAfter"] = o.SearchAfter + } + if !IsNil(o.Total) { + toSerialize["total"] = o.Total + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullableFindSloDefinitionsResponseOneOf1 struct { + value *FindSloDefinitionsResponseOneOf1 + isSet bool +} + +func (v NullableFindSloDefinitionsResponseOneOf1) Get() *FindSloDefinitionsResponseOneOf1 { + return v.value +} + +func (v *NullableFindSloDefinitionsResponseOneOf1) Set(val *FindSloDefinitionsResponseOneOf1) { + v.value = val + v.isSet = true +} + +func (v NullableFindSloDefinitionsResponseOneOf1) IsSet() bool { + return v.isSet +} + +func (v *NullableFindSloDefinitionsResponseOneOf1) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFindSloDefinitionsResponseOneOf1(val *FindSloDefinitionsResponseOneOf1) *NullableFindSloDefinitionsResponseOneOf1 { + return &NullableFindSloDefinitionsResponseOneOf1{value: val, isSet: true} +} + +func (v NullableFindSloDefinitionsResponseOneOf1) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFindSloDefinitionsResponseOneOf1) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/slo/model_find_slo_response.go b/generated/slo/model_find_slo_response.go index fe90673e2..8937d77c8 100644 --- a/generated/slo/model_find_slo_response.go +++ b/generated/slo/model_find_slo_response.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,10 +19,13 @@ var _ MappedNullable = &FindSloResponse{} // FindSloResponse A paginated response of SLOs matching the query. type FindSloResponse struct { - Page *float64 `json:"page,omitempty"` - PerPage *float64 `json:"perPage,omitempty"` - Total *float64 `json:"total,omitempty"` - Results []SloResponse `json:"results,omitempty"` + // Size provided for cursor based pagination + Size *float64 `json:"size,omitempty"` + SearchAfter *string `json:"searchAfter,omitempty"` + Page *float64 `json:"page,omitempty"` + PerPage *float64 `json:"perPage,omitempty"` + Total *float64 `json:"total,omitempty"` + Results []SloWithSummaryResponse `json:"results,omitempty"` } // NewFindSloResponse instantiates a new FindSloResponse object @@ -42,6 +45,70 @@ func NewFindSloResponseWithDefaults() *FindSloResponse { return &this } +// GetSize returns the Size field value if set, zero value otherwise. +func (o *FindSloResponse) GetSize() float64 { + if o == nil || IsNil(o.Size) { + var ret float64 + return ret + } + return *o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FindSloResponse) GetSizeOk() (*float64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *FindSloResponse) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given float64 and assigns it to the Size field. +func (o *FindSloResponse) SetSize(v float64) { + o.Size = &v +} + +// GetSearchAfter returns the SearchAfter field value if set, zero value otherwise. +func (o *FindSloResponse) GetSearchAfter() string { + if o == nil || IsNil(o.SearchAfter) { + var ret string + return ret + } + return *o.SearchAfter +} + +// GetSearchAfterOk returns a tuple with the SearchAfter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FindSloResponse) GetSearchAfterOk() (*string, bool) { + if o == nil || IsNil(o.SearchAfter) { + return nil, false + } + return o.SearchAfter, true +} + +// HasSearchAfter returns a boolean if a field has been set. +func (o *FindSloResponse) HasSearchAfter() bool { + if o != nil && !IsNil(o.SearchAfter) { + return true + } + + return false +} + +// SetSearchAfter gets a reference to the given string and assigns it to the SearchAfter field. +func (o *FindSloResponse) SetSearchAfter(v string) { + o.SearchAfter = &v +} + // GetPage returns the Page field value if set, zero value otherwise. func (o *FindSloResponse) GetPage() float64 { if o == nil || IsNil(o.Page) { @@ -139,9 +206,9 @@ func (o *FindSloResponse) SetTotal(v float64) { } // GetResults returns the Results field value if set, zero value otherwise. -func (o *FindSloResponse) GetResults() []SloResponse { +func (o *FindSloResponse) GetResults() []SloWithSummaryResponse { if o == nil || IsNil(o.Results) { - var ret []SloResponse + var ret []SloWithSummaryResponse return ret } return o.Results @@ -149,7 +216,7 @@ func (o *FindSloResponse) GetResults() []SloResponse { // GetResultsOk returns a tuple with the Results field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FindSloResponse) GetResultsOk() ([]SloResponse, bool) { +func (o *FindSloResponse) GetResultsOk() ([]SloWithSummaryResponse, bool) { if o == nil || IsNil(o.Results) { return nil, false } @@ -165,8 +232,8 @@ func (o *FindSloResponse) HasResults() bool { return false } -// SetResults gets a reference to the given []SloResponse and assigns it to the Results field. -func (o *FindSloResponse) SetResults(v []SloResponse) { +// SetResults gets a reference to the given []SloWithSummaryResponse and assigns it to the Results field. +func (o *FindSloResponse) SetResults(v []SloWithSummaryResponse) { o.Results = v } @@ -180,6 +247,12 @@ func (o FindSloResponse) MarshalJSON() ([]byte, error) { func (o FindSloResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + if !IsNil(o.SearchAfter) { + toSerialize["searchAfter"] = o.SearchAfter + } if !IsNil(o.Page) { toSerialize["page"] = o.Page } diff --git a/generated/slo/model_slo_response_group_by.go b/generated/slo/model_group_by.go similarity index 56% rename from generated/slo/model_slo_response_group_by.go rename to generated/slo/model_group_by.go index 1c7fd3f9c..1f631e7ec 100644 --- a/generated/slo/model_slo_response_group_by.go +++ b/generated/slo/model_group_by.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,28 +15,29 @@ import ( "fmt" ) -// SloResponseGroupBy - optional group by field to use to generate an SLO per distinct value -type SloResponseGroupBy struct { +// GroupBy - optional group by field or fields to use to generate an SLO per distinct value +type GroupBy struct { ArrayOfString *[]string - String *string + String *string } -// []stringAsSloResponseGroupBy is a convenience function that returns []string wrapped in SloResponseGroupBy -func ArrayOfStringAsSloResponseGroupBy(v *[]string) SloResponseGroupBy { - return SloResponseGroupBy{ +// []stringAsGroupBy is a convenience function that returns []string wrapped in GroupBy +func ArrayOfStringAsGroupBy(v *[]string) GroupBy { + return GroupBy{ ArrayOfString: v, } } -// stringAsSloResponseGroupBy is a convenience function that returns string wrapped in SloResponseGroupBy -func StringAsSloResponseGroupBy(v *string) SloResponseGroupBy { - return SloResponseGroupBy{ +// stringAsGroupBy is a convenience function that returns string wrapped in GroupBy +func StringAsGroupBy(v *string) GroupBy { + return GroupBy{ String: v, } } + // Unmarshal JSON data into one of the pointers in the struct -func (dst *SloResponseGroupBy) UnmarshalJSON(data []byte) error { +func (dst *GroupBy) UnmarshalJSON(data []byte) error { var err error match := 0 // try to unmarshal data into ArrayOfString @@ -70,16 +71,16 @@ func (dst *SloResponseGroupBy) UnmarshalJSON(data []byte) error { dst.ArrayOfString = nil dst.String = nil - return fmt.Errorf("data matches more than one schema in oneOf(SloResponseGroupBy)") + return fmt.Errorf("data matches more than one schema in oneOf(GroupBy)") } else if match == 1 { return nil // exactly one match } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(SloResponseGroupBy)") + return fmt.Errorf("data failed to match schemas in oneOf(GroupBy)") } } // Marshal data from the first non-nil pointers in the struct to JSON -func (src SloResponseGroupBy) MarshalJSON() ([]byte, error) { +func (src GroupBy) MarshalJSON() ([]byte, error) { if src.ArrayOfString != nil { return json.Marshal(&src.ArrayOfString) } @@ -92,7 +93,7 @@ func (src SloResponseGroupBy) MarshalJSON() ([]byte, error) { } // Get the actual instance -func (obj *SloResponseGroupBy) GetActualInstance() interface{} { +func (obj *GroupBy) GetActualInstance() (interface{}) { if obj == nil { return nil } @@ -108,38 +109,40 @@ func (obj *SloResponseGroupBy) GetActualInstance() interface{} { return nil } -type NullableSloResponseGroupBy struct { - value *SloResponseGroupBy +type NullableGroupBy struct { + value *GroupBy isSet bool } -func (v NullableSloResponseGroupBy) Get() *SloResponseGroupBy { +func (v NullableGroupBy) Get() *GroupBy { return v.value } -func (v *NullableSloResponseGroupBy) Set(val *SloResponseGroupBy) { +func (v *NullableGroupBy) Set(val *GroupBy) { v.value = val v.isSet = true } -func (v NullableSloResponseGroupBy) IsSet() bool { +func (v NullableGroupBy) IsSet() bool { return v.isSet } -func (v *NullableSloResponseGroupBy) Unset() { +func (v *NullableGroupBy) Unset() { v.value = nil v.isSet = false } -func NewNullableSloResponseGroupBy(val *SloResponseGroupBy) *NullableSloResponseGroupBy { - return &NullableSloResponseGroupBy{value: val, isSet: true} +func NewNullableGroupBy(val *GroupBy) *NullableGroupBy { + return &NullableGroupBy{value: val, isSet: true} } -func (v NullableSloResponseGroupBy) MarshalJSON() ([]byte, error) { +func (v NullableGroupBy) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableSloResponseGroupBy) UnmarshalJSON(src []byte) error { +func (v *NullableGroupBy) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + diff --git a/generated/slo/model_historical_summary_request.go b/generated/slo/model_historical_summary_request.go deleted file mode 100644 index a06576baa..000000000 --- a/generated/slo/model_historical_summary_request.go +++ /dev/null @@ -1,116 +0,0 @@ -/* -SLOs - -OpenAPI schema for SLOs endpoints - -API version: 1.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package slo - -import ( - "encoding/json" -) - -// checks if the HistoricalSummaryRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HistoricalSummaryRequest{} - -// HistoricalSummaryRequest struct for HistoricalSummaryRequest -type HistoricalSummaryRequest struct { - // The list of SLO identifiers to get the historical summary for - List []string `json:"list"` -} - -// NewHistoricalSummaryRequest instantiates a new HistoricalSummaryRequest 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 NewHistoricalSummaryRequest(list []string) *HistoricalSummaryRequest { - this := HistoricalSummaryRequest{} - this.List = list - return &this -} - -// NewHistoricalSummaryRequestWithDefaults instantiates a new HistoricalSummaryRequest 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 NewHistoricalSummaryRequestWithDefaults() *HistoricalSummaryRequest { - this := HistoricalSummaryRequest{} - return &this -} - -// GetList returns the List field value -func (o *HistoricalSummaryRequest) GetList() []string { - if o == nil { - var ret []string - return ret - } - - return o.List -} - -// GetListOk returns a tuple with the List field value -// and a boolean to check if the value has been set. -func (o *HistoricalSummaryRequest) GetListOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.List, true -} - -// SetList sets field value -func (o *HistoricalSummaryRequest) SetList(v []string) { - o.List = v -} - -func (o HistoricalSummaryRequest) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HistoricalSummaryRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["list"] = o.List - return toSerialize, nil -} - -type NullableHistoricalSummaryRequest struct { - value *HistoricalSummaryRequest - isSet bool -} - -func (v NullableHistoricalSummaryRequest) Get() *HistoricalSummaryRequest { - return v.value -} - -func (v *NullableHistoricalSummaryRequest) Set(val *HistoricalSummaryRequest) { - v.value = val - v.isSet = true -} - -func (v NullableHistoricalSummaryRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableHistoricalSummaryRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHistoricalSummaryRequest(val *HistoricalSummaryRequest) *NullableHistoricalSummaryRequest { - return &NullableHistoricalSummaryRequest{value: val, isSet: true} -} - -func (v NullableHistoricalSummaryRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHistoricalSummaryRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/slo/model_historical_summary_response_inner.go b/generated/slo/model_historical_summary_response_inner.go deleted file mode 100644 index 6a87116d2..000000000 --- a/generated/slo/model_historical_summary_response_inner.go +++ /dev/null @@ -1,232 +0,0 @@ -/* -SLOs - -OpenAPI schema for SLOs endpoints - -API version: 1.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package slo - -import ( - "encoding/json" -) - -// checks if the HistoricalSummaryResponseInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HistoricalSummaryResponseInner{} - -// HistoricalSummaryResponseInner struct for HistoricalSummaryResponseInner -type HistoricalSummaryResponseInner struct { - Date *string `json:"date,omitempty"` - Status *SummaryStatus `json:"status,omitempty"` - SliValue *float64 `json:"sliValue,omitempty"` - ErrorBudget *ErrorBudget `json:"errorBudget,omitempty"` -} - -// NewHistoricalSummaryResponseInner instantiates a new HistoricalSummaryResponseInner 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 NewHistoricalSummaryResponseInner() *HistoricalSummaryResponseInner { - this := HistoricalSummaryResponseInner{} - return &this -} - -// NewHistoricalSummaryResponseInnerWithDefaults instantiates a new HistoricalSummaryResponseInner 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 NewHistoricalSummaryResponseInnerWithDefaults() *HistoricalSummaryResponseInner { - this := HistoricalSummaryResponseInner{} - return &this -} - -// GetDate returns the Date field value if set, zero value otherwise. -func (o *HistoricalSummaryResponseInner) GetDate() string { - if o == nil || IsNil(o.Date) { - var ret string - return ret - } - return *o.Date -} - -// GetDateOk returns a tuple with the Date field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HistoricalSummaryResponseInner) GetDateOk() (*string, bool) { - if o == nil || IsNil(o.Date) { - return nil, false - } - return o.Date, true -} - -// HasDate returns a boolean if a field has been set. -func (o *HistoricalSummaryResponseInner) HasDate() bool { - if o != nil && !IsNil(o.Date) { - return true - } - - return false -} - -// SetDate gets a reference to the given string and assigns it to the Date field. -func (o *HistoricalSummaryResponseInner) SetDate(v string) { - o.Date = &v -} - -// GetStatus returns the Status field value if set, zero value otherwise. -func (o *HistoricalSummaryResponseInner) GetStatus() SummaryStatus { - if o == nil || IsNil(o.Status) { - var ret SummaryStatus - return ret - } - return *o.Status -} - -// GetStatusOk returns a tuple with the Status field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HistoricalSummaryResponseInner) GetStatusOk() (*SummaryStatus, bool) { - if o == nil || IsNil(o.Status) { - return nil, false - } - return o.Status, true -} - -// HasStatus returns a boolean if a field has been set. -func (o *HistoricalSummaryResponseInner) HasStatus() bool { - if o != nil && !IsNil(o.Status) { - return true - } - - return false -} - -// SetStatus gets a reference to the given SummaryStatus and assigns it to the Status field. -func (o *HistoricalSummaryResponseInner) SetStatus(v SummaryStatus) { - o.Status = &v -} - -// GetSliValue returns the SliValue field value if set, zero value otherwise. -func (o *HistoricalSummaryResponseInner) GetSliValue() float64 { - if o == nil || IsNil(o.SliValue) { - var ret float64 - return ret - } - return *o.SliValue -} - -// GetSliValueOk returns a tuple with the SliValue field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HistoricalSummaryResponseInner) GetSliValueOk() (*float64, bool) { - if o == nil || IsNil(o.SliValue) { - return nil, false - } - return o.SliValue, true -} - -// HasSliValue returns a boolean if a field has been set. -func (o *HistoricalSummaryResponseInner) HasSliValue() bool { - if o != nil && !IsNil(o.SliValue) { - return true - } - - return false -} - -// SetSliValue gets a reference to the given float64 and assigns it to the SliValue field. -func (o *HistoricalSummaryResponseInner) SetSliValue(v float64) { - o.SliValue = &v -} - -// GetErrorBudget returns the ErrorBudget field value if set, zero value otherwise. -func (o *HistoricalSummaryResponseInner) GetErrorBudget() ErrorBudget { - if o == nil || IsNil(o.ErrorBudget) { - var ret ErrorBudget - return ret - } - return *o.ErrorBudget -} - -// GetErrorBudgetOk returns a tuple with the ErrorBudget field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HistoricalSummaryResponseInner) GetErrorBudgetOk() (*ErrorBudget, bool) { - if o == nil || IsNil(o.ErrorBudget) { - return nil, false - } - return o.ErrorBudget, true -} - -// HasErrorBudget returns a boolean if a field has been set. -func (o *HistoricalSummaryResponseInner) HasErrorBudget() bool { - if o != nil && !IsNil(o.ErrorBudget) { - return true - } - - return false -} - -// SetErrorBudget gets a reference to the given ErrorBudget and assigns it to the ErrorBudget field. -func (o *HistoricalSummaryResponseInner) SetErrorBudget(v ErrorBudget) { - o.ErrorBudget = &v -} - -func (o HistoricalSummaryResponseInner) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HistoricalSummaryResponseInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Date) { - toSerialize["date"] = o.Date - } - if !IsNil(o.Status) { - toSerialize["status"] = o.Status - } - if !IsNil(o.SliValue) { - toSerialize["sliValue"] = o.SliValue - } - if !IsNil(o.ErrorBudget) { - toSerialize["errorBudget"] = o.ErrorBudget - } - return toSerialize, nil -} - -type NullableHistoricalSummaryResponseInner struct { - value *HistoricalSummaryResponseInner - isSet bool -} - -func (v NullableHistoricalSummaryResponseInner) Get() *HistoricalSummaryResponseInner { - return v.value -} - -func (v *NullableHistoricalSummaryResponseInner) Set(val *HistoricalSummaryResponseInner) { - v.value = val - v.isSet = true -} - -func (v NullableHistoricalSummaryResponseInner) IsSet() bool { - return v.isSet -} - -func (v *NullableHistoricalSummaryResponseInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHistoricalSummaryResponseInner(val *HistoricalSummaryResponseInner) *NullableHistoricalSummaryResponseInner { - return &NullableHistoricalSummaryResponseInner{value: val, isSet: true} -} - -func (v NullableHistoricalSummaryResponseInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHistoricalSummaryResponseInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/slo/model_indicator_properties_apm_availability.go b/generated/slo/model_indicator_properties_apm_availability.go index a449183cc..376e00abb 100644 --- a/generated/slo/model_indicator_properties_apm_availability.go +++ b/generated/slo/model_indicator_properties_apm_availability.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_indicator_properties_apm_availability_params.go b/generated/slo/model_indicator_properties_apm_availability_params.go index 5872135c1..7f6b63959 100644 --- a/generated/slo/model_indicator_properties_apm_availability_params.go +++ b/generated/slo/model_indicator_properties_apm_availability_params.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_indicator_properties_apm_latency.go b/generated/slo/model_indicator_properties_apm_latency.go index 5876d056a..29fe5f4b6 100644 --- a/generated/slo/model_indicator_properties_apm_latency.go +++ b/generated/slo/model_indicator_properties_apm_latency.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_indicator_properties_apm_latency_params.go b/generated/slo/model_indicator_properties_apm_latency_params.go index 74c484f39..00afb00bd 100644 --- a/generated/slo/model_indicator_properties_apm_latency_params.go +++ b/generated/slo/model_indicator_properties_apm_latency_params.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_indicator_properties_custom_kql.go b/generated/slo/model_indicator_properties_custom_kql.go index 657856d3f..c2ca95e32 100644 --- a/generated/slo/model_indicator_properties_custom_kql.go +++ b/generated/slo/model_indicator_properties_custom_kql.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -17,7 +17,7 @@ import ( // checks if the IndicatorPropertiesCustomKql type satisfies the MappedNullable interface at compile time var _ MappedNullable = &IndicatorPropertiesCustomKql{} -// IndicatorPropertiesCustomKql Defines properties for a custom KQL indicator type +// IndicatorPropertiesCustomKql Defines properties for a custom query indicator type type IndicatorPropertiesCustomKql struct { Params IndicatorPropertiesCustomKqlParams `json:"params"` // The type of indicator. diff --git a/generated/slo/model_indicator_properties_custom_kql_params.go b/generated/slo/model_indicator_properties_custom_kql_params.go index e84d0b41d..8920b91b8 100644 --- a/generated/slo/model_indicator_properties_custom_kql_params.go +++ b/generated/slo/model_indicator_properties_custom_kql_params.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -21,12 +21,11 @@ var _ MappedNullable = &IndicatorPropertiesCustomKqlParams{} type IndicatorPropertiesCustomKqlParams struct { // The index or index pattern to use Index string `json:"index"` - // the KQL query to filter the documents with. - Filter *string `json:"filter,omitempty"` - // the KQL query used to define the good events. - Good string `json:"good"` - // the KQL query used to define all events. - Total string `json:"total"` + // The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries. + DataViewId *string `json:"dataViewId,omitempty"` + Filter *KqlWithFilters `json:"filter,omitempty"` + Good KqlWithFiltersGood `json:"good"` + Total KqlWithFiltersTotal `json:"total"` // The timestamp field used in the source indice. TimestampField string `json:"timestampField"` } @@ -35,7 +34,7 @@ type IndicatorPropertiesCustomKqlParams struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewIndicatorPropertiesCustomKqlParams(index string, good string, total string, timestampField string) *IndicatorPropertiesCustomKqlParams { +func NewIndicatorPropertiesCustomKqlParams(index string, good KqlWithFiltersGood, total KqlWithFiltersTotal, timestampField string) *IndicatorPropertiesCustomKqlParams { this := IndicatorPropertiesCustomKqlParams{} this.Index = index this.Good = good @@ -76,10 +75,42 @@ func (o *IndicatorPropertiesCustomKqlParams) SetIndex(v string) { o.Index = v } +// GetDataViewId returns the DataViewId field value if set, zero value otherwise. +func (o *IndicatorPropertiesCustomKqlParams) GetDataViewId() string { + if o == nil || IsNil(o.DataViewId) { + var ret string + return ret + } + return *o.DataViewId +} + +// GetDataViewIdOk returns a tuple with the DataViewId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IndicatorPropertiesCustomKqlParams) GetDataViewIdOk() (*string, bool) { + if o == nil || IsNil(o.DataViewId) { + return nil, false + } + return o.DataViewId, true +} + +// HasDataViewId returns a boolean if a field has been set. +func (o *IndicatorPropertiesCustomKqlParams) HasDataViewId() bool { + if o != nil && !IsNil(o.DataViewId) { + return true + } + + return false +} + +// SetDataViewId gets a reference to the given string and assigns it to the DataViewId field. +func (o *IndicatorPropertiesCustomKqlParams) SetDataViewId(v string) { + o.DataViewId = &v +} + // GetFilter returns the Filter field value if set, zero value otherwise. -func (o *IndicatorPropertiesCustomKqlParams) GetFilter() string { +func (o *IndicatorPropertiesCustomKqlParams) GetFilter() KqlWithFilters { if o == nil || IsNil(o.Filter) { - var ret string + var ret KqlWithFilters return ret } return *o.Filter @@ -87,7 +118,7 @@ func (o *IndicatorPropertiesCustomKqlParams) GetFilter() string { // GetFilterOk returns a tuple with the Filter field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *IndicatorPropertiesCustomKqlParams) GetFilterOk() (*string, bool) { +func (o *IndicatorPropertiesCustomKqlParams) GetFilterOk() (*KqlWithFilters, bool) { if o == nil || IsNil(o.Filter) { return nil, false } @@ -103,15 +134,15 @@ func (o *IndicatorPropertiesCustomKqlParams) HasFilter() bool { return false } -// SetFilter gets a reference to the given string and assigns it to the Filter field. -func (o *IndicatorPropertiesCustomKqlParams) SetFilter(v string) { +// SetFilter gets a reference to the given KqlWithFilters and assigns it to the Filter field. +func (o *IndicatorPropertiesCustomKqlParams) SetFilter(v KqlWithFilters) { o.Filter = &v } // GetGood returns the Good field value -func (o *IndicatorPropertiesCustomKqlParams) GetGood() string { +func (o *IndicatorPropertiesCustomKqlParams) GetGood() KqlWithFiltersGood { if o == nil { - var ret string + var ret KqlWithFiltersGood return ret } @@ -120,7 +151,7 @@ func (o *IndicatorPropertiesCustomKqlParams) GetGood() string { // GetGoodOk returns a tuple with the Good field value // and a boolean to check if the value has been set. -func (o *IndicatorPropertiesCustomKqlParams) GetGoodOk() (*string, bool) { +func (o *IndicatorPropertiesCustomKqlParams) GetGoodOk() (*KqlWithFiltersGood, bool) { if o == nil { return nil, false } @@ -128,14 +159,14 @@ func (o *IndicatorPropertiesCustomKqlParams) GetGoodOk() (*string, bool) { } // SetGood sets field value -func (o *IndicatorPropertiesCustomKqlParams) SetGood(v string) { +func (o *IndicatorPropertiesCustomKqlParams) SetGood(v KqlWithFiltersGood) { o.Good = v } // GetTotal returns the Total field value -func (o *IndicatorPropertiesCustomKqlParams) GetTotal() string { +func (o *IndicatorPropertiesCustomKqlParams) GetTotal() KqlWithFiltersTotal { if o == nil { - var ret string + var ret KqlWithFiltersTotal return ret } @@ -144,7 +175,7 @@ func (o *IndicatorPropertiesCustomKqlParams) GetTotal() string { // GetTotalOk returns a tuple with the Total field value // and a boolean to check if the value has been set. -func (o *IndicatorPropertiesCustomKqlParams) GetTotalOk() (*string, bool) { +func (o *IndicatorPropertiesCustomKqlParams) GetTotalOk() (*KqlWithFiltersTotal, bool) { if o == nil { return nil, false } @@ -152,7 +183,7 @@ func (o *IndicatorPropertiesCustomKqlParams) GetTotalOk() (*string, bool) { } // SetTotal sets field value -func (o *IndicatorPropertiesCustomKqlParams) SetTotal(v string) { +func (o *IndicatorPropertiesCustomKqlParams) SetTotal(v KqlWithFiltersTotal) { o.Total = v } @@ -191,6 +222,9 @@ func (o IndicatorPropertiesCustomKqlParams) MarshalJSON() ([]byte, error) { func (o IndicatorPropertiesCustomKqlParams) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["index"] = o.Index + if !IsNil(o.DataViewId) { + toSerialize["dataViewId"] = o.DataViewId + } if !IsNil(o.Filter) { toSerialize["filter"] = o.Filter } diff --git a/generated/slo/model_indicator_properties_custom_metric.go b/generated/slo/model_indicator_properties_custom_metric.go index 80b194643..0c611620e 100644 --- a/generated/slo/model_indicator_properties_custom_metric.go +++ b/generated/slo/model_indicator_properties_custom_metric.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_indicator_properties_custom_metric_params.go b/generated/slo/model_indicator_properties_custom_metric_params.go index 88f7cc8db..d866a92db 100644 --- a/generated/slo/model_indicator_properties_custom_metric_params.go +++ b/generated/slo/model_indicator_properties_custom_metric_params.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -21,6 +21,8 @@ var _ MappedNullable = &IndicatorPropertiesCustomMetricParams{} type IndicatorPropertiesCustomMetricParams struct { // The index or index pattern to use Index string `json:"index"` + // The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries. + DataViewId *string `json:"dataViewId,omitempty"` // the KQL query to filter the documents with. Filter *string `json:"filter,omitempty"` // The timestamp field used in the source indice. @@ -74,6 +76,38 @@ func (o *IndicatorPropertiesCustomMetricParams) SetIndex(v string) { o.Index = v } +// GetDataViewId returns the DataViewId field value if set, zero value otherwise. +func (o *IndicatorPropertiesCustomMetricParams) GetDataViewId() string { + if o == nil || IsNil(o.DataViewId) { + var ret string + return ret + } + return *o.DataViewId +} + +// GetDataViewIdOk returns a tuple with the DataViewId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IndicatorPropertiesCustomMetricParams) GetDataViewIdOk() (*string, bool) { + if o == nil || IsNil(o.DataViewId) { + return nil, false + } + return o.DataViewId, true +} + +// HasDataViewId returns a boolean if a field has been set. +func (o *IndicatorPropertiesCustomMetricParams) HasDataViewId() bool { + if o != nil && !IsNil(o.DataViewId) { + return true + } + + return false +} + +// SetDataViewId gets a reference to the given string and assigns it to the DataViewId field. +func (o *IndicatorPropertiesCustomMetricParams) SetDataViewId(v string) { + o.DataViewId = &v +} + // GetFilter returns the Filter field value if set, zero value otherwise. func (o *IndicatorPropertiesCustomMetricParams) GetFilter() string { if o == nil || IsNil(o.Filter) { @@ -189,6 +223,9 @@ func (o IndicatorPropertiesCustomMetricParams) MarshalJSON() ([]byte, error) { func (o IndicatorPropertiesCustomMetricParams) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["index"] = o.Index + if !IsNil(o.DataViewId) { + toSerialize["dataViewId"] = o.DataViewId + } if !IsNil(o.Filter) { toSerialize["filter"] = o.Filter } diff --git a/generated/slo/model_indicator_properties_custom_metric_params_good.go b/generated/slo/model_indicator_properties_custom_metric_params_good.go index ada18b405..a3ae2db5f 100644 --- a/generated/slo/model_indicator_properties_custom_metric_params_good.go +++ b/generated/slo/model_indicator_properties_custom_metric_params_good.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_indicator_properties_custom_metric_params_good_metrics_inner.go b/generated/slo/model_indicator_properties_custom_metric_params_good_metrics_inner.go index 59c91d2fb..ce66a415c 100644 --- a/generated/slo/model_indicator_properties_custom_metric_params_good_metrics_inner.go +++ b/generated/slo/model_indicator_properties_custom_metric_params_good_metrics_inner.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -12,164 +12,100 @@ package slo import ( "encoding/json" + "fmt" ) -// checks if the IndicatorPropertiesCustomMetricParamsGoodMetricsInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &IndicatorPropertiesCustomMetricParamsGoodMetricsInner{} - -// IndicatorPropertiesCustomMetricParamsGoodMetricsInner struct for IndicatorPropertiesCustomMetricParamsGoodMetricsInner +// IndicatorPropertiesCustomMetricParamsGoodMetricsInner - struct for IndicatorPropertiesCustomMetricParamsGoodMetricsInner type IndicatorPropertiesCustomMetricParamsGoodMetricsInner struct { - // The name of the metric. Only valid options are A-Z - Name string `json:"name"` - // The aggregation type of the metric. Only valid option is \"sum\" - Aggregation string `json:"aggregation"` - // The field of the metric. - Field string `json:"field"` - // The filter to apply to the metric. - Filter *string `json:"filter,omitempty"` -} - -// NewIndicatorPropertiesCustomMetricParamsGoodMetricsInner instantiates a new IndicatorPropertiesCustomMetricParamsGoodMetricsInner 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 NewIndicatorPropertiesCustomMetricParamsGoodMetricsInner(name string, aggregation string, field string) *IndicatorPropertiesCustomMetricParamsGoodMetricsInner { - this := IndicatorPropertiesCustomMetricParamsGoodMetricsInner{} - this.Name = name - this.Aggregation = aggregation - this.Field = field - return &this + IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf + IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 } -// NewIndicatorPropertiesCustomMetricParamsGoodMetricsInnerWithDefaults instantiates a new IndicatorPropertiesCustomMetricParamsGoodMetricsInner 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 NewIndicatorPropertiesCustomMetricParamsGoodMetricsInnerWithDefaults() *IndicatorPropertiesCustomMetricParamsGoodMetricsInner { - this := IndicatorPropertiesCustomMetricParamsGoodMetricsInner{} - return &this -} - -// GetName returns the Name field value -func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInner) GetName() string { - if o == nil { - var ret string - return ret +// IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOfAsIndicatorPropertiesCustomMetricParamsGoodMetricsInner is a convenience function that returns IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf wrapped in IndicatorPropertiesCustomMetricParamsGoodMetricsInner +func IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOfAsIndicatorPropertiesCustomMetricParamsGoodMetricsInner(v *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) IndicatorPropertiesCustomMetricParamsGoodMetricsInner { + return IndicatorPropertiesCustomMetricParamsGoodMetricsInner{ + IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf: v, } - - return o.Name } -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInner) GetNameOk() (*string, bool) { - if o == nil { - return nil, false +// IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1AsIndicatorPropertiesCustomMetricParamsGoodMetricsInner is a convenience function that returns IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 wrapped in IndicatorPropertiesCustomMetricParamsGoodMetricsInner +func IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1AsIndicatorPropertiesCustomMetricParamsGoodMetricsInner(v *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) IndicatorPropertiesCustomMetricParamsGoodMetricsInner { + return IndicatorPropertiesCustomMetricParamsGoodMetricsInner{ + IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1: v, } - return &o.Name, true } -// SetName sets field value -func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInner) SetName(v string) { - o.Name = v -} - -// GetAggregation returns the Aggregation field value -func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInner) GetAggregation() string { - if o == nil { - var ret string - return ret +// Unmarshal JSON data into one of the pointers in the struct +func (dst *IndicatorPropertiesCustomMetricParamsGoodMetricsInner) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf + err = json.Unmarshal(data, &dst.IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) + if err == nil { + jsonIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf, _ := json.Marshal(dst.IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) + if string(jsonIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) == "{}" { // empty struct + dst.IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf = nil + } else { + match++ + } + } else { + dst.IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf = nil } - return o.Aggregation -} - -// GetAggregationOk returns a tuple with the Aggregation field value -// and a boolean to check if the value has been set. -func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInner) GetAggregationOk() (*string, bool) { - if o == nil { - return nil, false + // try to unmarshal data into IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 + err = json.Unmarshal(data, &dst.IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) + if err == nil { + jsonIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1, _ := json.Marshal(dst.IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) + if string(jsonIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) == "{}" { // empty struct + dst.IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 = nil + } else { + match++ + } + } else { + dst.IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 = nil } - return &o.Aggregation, true -} -// SetAggregation sets field value -func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInner) SetAggregation(v string) { - o.Aggregation = v -} + if match > 1 { // more than 1 match + // reset to nil + dst.IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf = nil + dst.IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 = nil -// GetField returns the Field field value -func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInner) GetField() string { - if o == nil { - var ret string - return ret + return fmt.Errorf("data matches more than one schema in oneOf(IndicatorPropertiesCustomMetricParamsGoodMetricsInner)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(IndicatorPropertiesCustomMetricParamsGoodMetricsInner)") } - - return o.Field } -// GetFieldOk returns a tuple with the Field field value -// and a boolean to check if the value has been set. -func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInner) GetFieldOk() (*string, bool) { - if o == nil { - return nil, false +// Marshal data from the first non-nil pointers in the struct to JSON +func (src IndicatorPropertiesCustomMetricParamsGoodMetricsInner) MarshalJSON() ([]byte, error) { + if src.IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf != nil { + return json.Marshal(&src.IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) } - return &o.Field, true -} - -// SetField sets field value -func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInner) SetField(v string) { - o.Field = v -} -// GetFilter returns the Filter field value if set, zero value otherwise. -func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInner) GetFilter() string { - if o == nil || IsNil(o.Filter) { - var ret string - return ret + if src.IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 != nil { + return json.Marshal(&src.IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) } - return *o.Filter -} -// GetFilterOk returns a tuple with the Filter field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInner) GetFilterOk() (*string, bool) { - if o == nil || IsNil(o.Filter) { - return nil, false - } - return o.Filter, true + return nil, nil // no data in oneOf schemas } -// HasFilter returns a boolean if a field has been set. -func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInner) HasFilter() bool { - if o != nil && !IsNil(o.Filter) { - return true +// Get the actual instance +func (obj *IndicatorPropertiesCustomMetricParamsGoodMetricsInner) GetActualInstance() interface{} { + if obj == nil { + return nil } - - return false -} - -// SetFilter gets a reference to the given string and assigns it to the Filter field. -func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInner) SetFilter(v string) { - o.Filter = &v -} - -func (o IndicatorPropertiesCustomMetricParamsGoodMetricsInner) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err + if obj.IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf != nil { + return obj.IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf } - return json.Marshal(toSerialize) -} -func (o IndicatorPropertiesCustomMetricParamsGoodMetricsInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - toSerialize["aggregation"] = o.Aggregation - toSerialize["field"] = o.Field - if !IsNil(o.Filter) { - toSerialize["filter"] = o.Filter + if obj.IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 != nil { + return obj.IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 } - return toSerialize, nil + + // all schemas are nil + return nil } type NullableIndicatorPropertiesCustomMetricParamsGoodMetricsInner struct { diff --git a/generated/slo/model_indicator_properties_custom_metric_params_good_metrics_inner_one_of.go b/generated/slo/model_indicator_properties_custom_metric_params_good_metrics_inner_one_of.go new file mode 100644 index 000000000..2e2a11c07 --- /dev/null +++ b/generated/slo/model_indicator_properties_custom_metric_params_good_metrics_inner_one_of.go @@ -0,0 +1,209 @@ +/* +SLOs + +OpenAPI schema for SLOs endpoints + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package slo + +import ( + "encoding/json" +) + +// checks if the IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf{} + +// IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf struct for IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf +type IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf struct { + // The name of the metric. Only valid options are A-Z + Name string `json:"name"` + // The aggregation type of the metric. + Aggregation string `json:"aggregation"` + // The field of the metric. + Field string `json:"field"` + // The filter to apply to the metric. + Filter *string `json:"filter,omitempty"` +} + +// NewIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf instantiates a new IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf 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 NewIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf(name string, aggregation string, field string) *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf { + this := IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf{} + this.Name = name + this.Aggregation = aggregation + this.Field = field + return &this +} + +// NewIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOfWithDefaults instantiates a new IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf 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 NewIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOfWithDefaults() *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf { + this := IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf{} + return &this +} + +// GetName returns the Name field value +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) SetName(v string) { + o.Name = v +} + +// GetAggregation returns the Aggregation field value +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) GetAggregation() string { + if o == nil { + var ret string + return ret + } + + return o.Aggregation +} + +// GetAggregationOk returns a tuple with the Aggregation field value +// and a boolean to check if the value has been set. +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) GetAggregationOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Aggregation, true +} + +// SetAggregation sets field value +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) SetAggregation(v string) { + o.Aggregation = v +} + +// GetField returns the Field field value +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) GetField() string { + if o == nil { + var ret string + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) GetFieldOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) SetField(v string) { + o.Field = v +} + +// GetFilter returns the Filter field value if set, zero value otherwise. +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) GetFilter() string { + if o == nil || IsNil(o.Filter) { + var ret string + return ret + } + return *o.Filter +} + +// GetFilterOk returns a tuple with the Filter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) GetFilterOk() (*string, bool) { + if o == nil || IsNil(o.Filter) { + return nil, false + } + return o.Filter, true +} + +// HasFilter returns a boolean if a field has been set. +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) HasFilter() bool { + if o != nil && !IsNil(o.Filter) { + return true + } + + return false +} + +// SetFilter gets a reference to the given string and assigns it to the Filter field. +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) SetFilter(v string) { + o.Filter = &v +} + +func (o IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["aggregation"] = o.Aggregation + toSerialize["field"] = o.Field + if !IsNil(o.Filter) { + toSerialize["filter"] = o.Filter + } + return toSerialize, nil +} + +type NullableIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf struct { + value *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf + isSet bool +} + +func (v NullableIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) Get() *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf { + return v.value +} + +func (v *NullableIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) Set(val *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) { + v.value = val + v.isSet = true +} + +func (v NullableIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) IsSet() bool { + return v.isSet +} + +func (v *NullableIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf(val *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) *NullableIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf { + return &NullableIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf{value: val, isSet: true} +} + +func (v NullableIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/slo/model_indicator_properties_custom_metric_params_good_metrics_inner_one_of_1.go b/generated/slo/model_indicator_properties_custom_metric_params_good_metrics_inner_one_of_1.go new file mode 100644 index 000000000..e5db45989 --- /dev/null +++ b/generated/slo/model_indicator_properties_custom_metric_params_good_metrics_inner_one_of_1.go @@ -0,0 +1,181 @@ +/* +SLOs + +OpenAPI schema for SLOs endpoints + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package slo + +import ( + "encoding/json" +) + +// checks if the IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1{} + +// IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 struct for IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 +type IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 struct { + // The name of the metric. Only valid options are A-Z + Name string `json:"name"` + // The aggregation type of the metric. + Aggregation string `json:"aggregation"` + // The filter to apply to the metric. + Filter *string `json:"filter,omitempty"` +} + +// NewIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 instantiates a new IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 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 NewIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1(name string, aggregation string) *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 { + this := IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1{} + this.Name = name + this.Aggregation = aggregation + return &this +} + +// NewIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1WithDefaults instantiates a new IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 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 NewIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1WithDefaults() *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 { + this := IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1{} + return &this +} + +// GetName returns the Name field value +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) SetName(v string) { + o.Name = v +} + +// GetAggregation returns the Aggregation field value +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) GetAggregation() string { + if o == nil { + var ret string + return ret + } + + return o.Aggregation +} + +// GetAggregationOk returns a tuple with the Aggregation field value +// and a boolean to check if the value has been set. +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) GetAggregationOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Aggregation, true +} + +// SetAggregation sets field value +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) SetAggregation(v string) { + o.Aggregation = v +} + +// GetFilter returns the Filter field value if set, zero value otherwise. +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) GetFilter() string { + if o == nil || IsNil(o.Filter) { + var ret string + return ret + } + return *o.Filter +} + +// GetFilterOk returns a tuple with the Filter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) GetFilterOk() (*string, bool) { + if o == nil || IsNil(o.Filter) { + return nil, false + } + return o.Filter, true +} + +// HasFilter returns a boolean if a field has been set. +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) HasFilter() bool { + if o != nil && !IsNil(o.Filter) { + return true + } + + return false +} + +// SetFilter gets a reference to the given string and assigns it to the Filter field. +func (o *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) SetFilter(v string) { + o.Filter = &v +} + +func (o IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["aggregation"] = o.Aggregation + if !IsNil(o.Filter) { + toSerialize["filter"] = o.Filter + } + return toSerialize, nil +} + +type NullableIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 struct { + value *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 + isSet bool +} + +func (v NullableIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) Get() *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 { + return v.value +} + +func (v *NullableIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) Set(val *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) { + v.value = val + v.isSet = true +} + +func (v NullableIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) IsSet() bool { + return v.isSet +} + +func (v *NullableIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1(val *IndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) *NullableIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1 { + return &NullableIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1{value: val, isSet: true} +} + +func (v NullableIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIndicatorPropertiesCustomMetricParamsGoodMetricsInnerOneOf1) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/slo/model_indicator_properties_custom_metric_params_total.go b/generated/slo/model_indicator_properties_custom_metric_params_total.go index 58d6d255b..5fa26b8ec 100644 --- a/generated/slo/model_indicator_properties_custom_metric_params_total.go +++ b/generated/slo/model_indicator_properties_custom_metric_params_total.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -20,7 +20,7 @@ var _ MappedNullable = &IndicatorPropertiesCustomMetricParamsTotal{} // IndicatorPropertiesCustomMetricParamsTotal An object defining the \"total\" metrics and equation type IndicatorPropertiesCustomMetricParamsTotal struct { // List of metrics with their name, aggregation type, and field. - Metrics []IndicatorPropertiesCustomMetricParamsTotalMetricsInner `json:"metrics"` + Metrics []IndicatorPropertiesCustomMetricParamsGoodMetricsInner `json:"metrics"` // The equation to calculate the \"total\" metric. Equation string `json:"equation"` } @@ -29,7 +29,7 @@ type IndicatorPropertiesCustomMetricParamsTotal struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewIndicatorPropertiesCustomMetricParamsTotal(metrics []IndicatorPropertiesCustomMetricParamsTotalMetricsInner, equation string) *IndicatorPropertiesCustomMetricParamsTotal { +func NewIndicatorPropertiesCustomMetricParamsTotal(metrics []IndicatorPropertiesCustomMetricParamsGoodMetricsInner, equation string) *IndicatorPropertiesCustomMetricParamsTotal { this := IndicatorPropertiesCustomMetricParamsTotal{} this.Metrics = metrics this.Equation = equation @@ -45,9 +45,9 @@ func NewIndicatorPropertiesCustomMetricParamsTotalWithDefaults() *IndicatorPrope } // GetMetrics returns the Metrics field value -func (o *IndicatorPropertiesCustomMetricParamsTotal) GetMetrics() []IndicatorPropertiesCustomMetricParamsTotalMetricsInner { +func (o *IndicatorPropertiesCustomMetricParamsTotal) GetMetrics() []IndicatorPropertiesCustomMetricParamsGoodMetricsInner { if o == nil { - var ret []IndicatorPropertiesCustomMetricParamsTotalMetricsInner + var ret []IndicatorPropertiesCustomMetricParamsGoodMetricsInner return ret } @@ -56,7 +56,7 @@ func (o *IndicatorPropertiesCustomMetricParamsTotal) GetMetrics() []IndicatorPro // GetMetricsOk returns a tuple with the Metrics field value // and a boolean to check if the value has been set. -func (o *IndicatorPropertiesCustomMetricParamsTotal) GetMetricsOk() ([]IndicatorPropertiesCustomMetricParamsTotalMetricsInner, bool) { +func (o *IndicatorPropertiesCustomMetricParamsTotal) GetMetricsOk() ([]IndicatorPropertiesCustomMetricParamsGoodMetricsInner, bool) { if o == nil { return nil, false } @@ -64,7 +64,7 @@ func (o *IndicatorPropertiesCustomMetricParamsTotal) GetMetricsOk() ([]Indicator } // SetMetrics sets field value -func (o *IndicatorPropertiesCustomMetricParamsTotal) SetMetrics(v []IndicatorPropertiesCustomMetricParamsTotalMetricsInner) { +func (o *IndicatorPropertiesCustomMetricParamsTotal) SetMetrics(v []IndicatorPropertiesCustomMetricParamsGoodMetricsInner) { o.Metrics = v } diff --git a/generated/slo/model_indicator_properties_custom_metric_params_total_metrics_inner.go b/generated/slo/model_indicator_properties_custom_metric_params_total_metrics_inner.go deleted file mode 100644 index 59a0aa676..000000000 --- a/generated/slo/model_indicator_properties_custom_metric_params_total_metrics_inner.go +++ /dev/null @@ -1,209 +0,0 @@ -/* -SLOs - -OpenAPI schema for SLOs endpoints - -API version: 1.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package slo - -import ( - "encoding/json" -) - -// checks if the IndicatorPropertiesCustomMetricParamsTotalMetricsInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &IndicatorPropertiesCustomMetricParamsTotalMetricsInner{} - -// IndicatorPropertiesCustomMetricParamsTotalMetricsInner struct for IndicatorPropertiesCustomMetricParamsTotalMetricsInner -type IndicatorPropertiesCustomMetricParamsTotalMetricsInner struct { - // The name of the metric. Only valid options are A-Z - Name string `json:"name"` - // The aggregation type of the metric. Only valid option is \"sum\" - Aggregation string `json:"aggregation"` - // The field of the metric. - Field string `json:"field"` - // The filter to apply to the metric. - Filter *string `json:"filter,omitempty"` -} - -// NewIndicatorPropertiesCustomMetricParamsTotalMetricsInner instantiates a new IndicatorPropertiesCustomMetricParamsTotalMetricsInner 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 NewIndicatorPropertiesCustomMetricParamsTotalMetricsInner(name string, aggregation string, field string) *IndicatorPropertiesCustomMetricParamsTotalMetricsInner { - this := IndicatorPropertiesCustomMetricParamsTotalMetricsInner{} - this.Name = name - this.Aggregation = aggregation - this.Field = field - return &this -} - -// NewIndicatorPropertiesCustomMetricParamsTotalMetricsInnerWithDefaults instantiates a new IndicatorPropertiesCustomMetricParamsTotalMetricsInner 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 NewIndicatorPropertiesCustomMetricParamsTotalMetricsInnerWithDefaults() *IndicatorPropertiesCustomMetricParamsTotalMetricsInner { - this := IndicatorPropertiesCustomMetricParamsTotalMetricsInner{} - return &this -} - -// GetName returns the Name field value -func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) SetName(v string) { - o.Name = v -} - -// GetAggregation returns the Aggregation field value -func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetAggregation() string { - if o == nil { - var ret string - return ret - } - - return o.Aggregation -} - -// GetAggregationOk returns a tuple with the Aggregation field value -// and a boolean to check if the value has been set. -func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetAggregationOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Aggregation, true -} - -// SetAggregation sets field value -func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) SetAggregation(v string) { - o.Aggregation = v -} - -// GetField returns the Field field value -func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetField() string { - if o == nil { - var ret string - return ret - } - - return o.Field -} - -// GetFieldOk returns a tuple with the Field field value -// and a boolean to check if the value has been set. -func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetFieldOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Field, true -} - -// SetField sets field value -func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) SetField(v string) { - o.Field = v -} - -// GetFilter returns the Filter field value if set, zero value otherwise. -func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetFilter() string { - if o == nil || IsNil(o.Filter) { - var ret string - return ret - } - return *o.Filter -} - -// GetFilterOk returns a tuple with the Filter field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) GetFilterOk() (*string, bool) { - if o == nil || IsNil(o.Filter) { - return nil, false - } - return o.Filter, true -} - -// HasFilter returns a boolean if a field has been set. -func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) HasFilter() bool { - if o != nil && !IsNil(o.Filter) { - return true - } - - return false -} - -// SetFilter gets a reference to the given string and assigns it to the Filter field. -func (o *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) SetFilter(v string) { - o.Filter = &v -} - -func (o IndicatorPropertiesCustomMetricParamsTotalMetricsInner) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o IndicatorPropertiesCustomMetricParamsTotalMetricsInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - toSerialize["aggregation"] = o.Aggregation - toSerialize["field"] = o.Field - if !IsNil(o.Filter) { - toSerialize["filter"] = o.Filter - } - return toSerialize, nil -} - -type NullableIndicatorPropertiesCustomMetricParamsTotalMetricsInner struct { - value *IndicatorPropertiesCustomMetricParamsTotalMetricsInner - isSet bool -} - -func (v NullableIndicatorPropertiesCustomMetricParamsTotalMetricsInner) Get() *IndicatorPropertiesCustomMetricParamsTotalMetricsInner { - return v.value -} - -func (v *NullableIndicatorPropertiesCustomMetricParamsTotalMetricsInner) Set(val *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) { - v.value = val - v.isSet = true -} - -func (v NullableIndicatorPropertiesCustomMetricParamsTotalMetricsInner) IsSet() bool { - return v.isSet -} - -func (v *NullableIndicatorPropertiesCustomMetricParamsTotalMetricsInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableIndicatorPropertiesCustomMetricParamsTotalMetricsInner(val *IndicatorPropertiesCustomMetricParamsTotalMetricsInner) *NullableIndicatorPropertiesCustomMetricParamsTotalMetricsInner { - return &NullableIndicatorPropertiesCustomMetricParamsTotalMetricsInner{value: val, isSet: true} -} - -func (v NullableIndicatorPropertiesCustomMetricParamsTotalMetricsInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableIndicatorPropertiesCustomMetricParamsTotalMetricsInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/generated/slo/model_indicator_properties_histogram.go b/generated/slo/model_indicator_properties_histogram.go index 1ac522fc6..e04cc8e51 100644 --- a/generated/slo/model_indicator_properties_histogram.go +++ b/generated/slo/model_indicator_properties_histogram.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_indicator_properties_histogram_params.go b/generated/slo/model_indicator_properties_histogram_params.go index 5d9348681..9c2ca7d15 100644 --- a/generated/slo/model_indicator_properties_histogram_params.go +++ b/generated/slo/model_indicator_properties_histogram_params.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -21,6 +21,8 @@ var _ MappedNullable = &IndicatorPropertiesHistogramParams{} type IndicatorPropertiesHistogramParams struct { // The index or index pattern to use Index string `json:"index"` + // The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries. + DataViewId *string `json:"dataViewId,omitempty"` // the KQL query to filter the documents with. Filter *string `json:"filter,omitempty"` // The timestamp field used in the source indice. @@ -74,6 +76,38 @@ func (o *IndicatorPropertiesHistogramParams) SetIndex(v string) { o.Index = v } +// GetDataViewId returns the DataViewId field value if set, zero value otherwise. +func (o *IndicatorPropertiesHistogramParams) GetDataViewId() string { + if o == nil || IsNil(o.DataViewId) { + var ret string + return ret + } + return *o.DataViewId +} + +// GetDataViewIdOk returns a tuple with the DataViewId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IndicatorPropertiesHistogramParams) GetDataViewIdOk() (*string, bool) { + if o == nil || IsNil(o.DataViewId) { + return nil, false + } + return o.DataViewId, true +} + +// HasDataViewId returns a boolean if a field has been set. +func (o *IndicatorPropertiesHistogramParams) HasDataViewId() bool { + if o != nil && !IsNil(o.DataViewId) { + return true + } + + return false +} + +// SetDataViewId gets a reference to the given string and assigns it to the DataViewId field. +func (o *IndicatorPropertiesHistogramParams) SetDataViewId(v string) { + o.DataViewId = &v +} + // GetFilter returns the Filter field value if set, zero value otherwise. func (o *IndicatorPropertiesHistogramParams) GetFilter() string { if o == nil || IsNil(o.Filter) { @@ -189,6 +223,9 @@ func (o IndicatorPropertiesHistogramParams) MarshalJSON() ([]byte, error) { func (o IndicatorPropertiesHistogramParams) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["index"] = o.Index + if !IsNil(o.DataViewId) { + toSerialize["dataViewId"] = o.DataViewId + } if !IsNil(o.Filter) { toSerialize["filter"] = o.Filter } diff --git a/generated/slo/model_indicator_properties_histogram_params_good.go b/generated/slo/model_indicator_properties_histogram_params_good.go index 2d4f845f6..8a74efd41 100644 --- a/generated/slo/model_indicator_properties_histogram_params_good.go +++ b/generated/slo/model_indicator_properties_histogram_params_good.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_indicator_properties_histogram_params_total.go b/generated/slo/model_indicator_properties_histogram_params_total.go index 7581231f4..acdc4fbc8 100644 --- a/generated/slo/model_indicator_properties_histogram_params_total.go +++ b/generated/slo/model_indicator_properties_histogram_params_total.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_indicator_properties_timeslice_metric.go b/generated/slo/model_indicator_properties_timeslice_metric.go index bd5e6fde0..0b5815036 100644 --- a/generated/slo/model_indicator_properties_timeslice_metric.go +++ b/generated/slo/model_indicator_properties_timeslice_metric.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_indicator_properties_timeslice_metric_params.go b/generated/slo/model_indicator_properties_timeslice_metric_params.go index d702e10b5..686ea523e 100644 --- a/generated/slo/model_indicator_properties_timeslice_metric_params.go +++ b/generated/slo/model_indicator_properties_timeslice_metric_params.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -21,6 +21,8 @@ var _ MappedNullable = &IndicatorPropertiesTimesliceMetricParams{} type IndicatorPropertiesTimesliceMetricParams struct { // The index or index pattern to use Index string `json:"index"` + // The kibana data view id to use, primarily used to include data view runtime mappings. Make sure to save SLO again if you add/update run time fields to the data view and if those fields are being used in slo queries. + DataViewId *string `json:"dataViewId,omitempty"` // the KQL query to filter the documents with. Filter *string `json:"filter,omitempty"` // The timestamp field used in the source indice. @@ -72,6 +74,38 @@ func (o *IndicatorPropertiesTimesliceMetricParams) SetIndex(v string) { o.Index = v } +// GetDataViewId returns the DataViewId field value if set, zero value otherwise. +func (o *IndicatorPropertiesTimesliceMetricParams) GetDataViewId() string { + if o == nil || IsNil(o.DataViewId) { + var ret string + return ret + } + return *o.DataViewId +} + +// GetDataViewIdOk returns a tuple with the DataViewId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *IndicatorPropertiesTimesliceMetricParams) GetDataViewIdOk() (*string, bool) { + if o == nil || IsNil(o.DataViewId) { + return nil, false + } + return o.DataViewId, true +} + +// HasDataViewId returns a boolean if a field has been set. +func (o *IndicatorPropertiesTimesliceMetricParams) HasDataViewId() bool { + if o != nil && !IsNil(o.DataViewId) { + return true + } + + return false +} + +// SetDataViewId gets a reference to the given string and assigns it to the DataViewId field. +func (o *IndicatorPropertiesTimesliceMetricParams) SetDataViewId(v string) { + o.DataViewId = &v +} + // GetFilter returns the Filter field value if set, zero value otherwise. func (o *IndicatorPropertiesTimesliceMetricParams) GetFilter() string { if o == nil || IsNil(o.Filter) { @@ -163,6 +197,9 @@ func (o IndicatorPropertiesTimesliceMetricParams) MarshalJSON() ([]byte, error) func (o IndicatorPropertiesTimesliceMetricParams) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["index"] = o.Index + if !IsNil(o.DataViewId) { + toSerialize["dataViewId"] = o.DataViewId + } if !IsNil(o.Filter) { toSerialize["filter"] = o.Filter } diff --git a/generated/slo/model_indicator_properties_timeslice_metric_params_metric.go b/generated/slo/model_indicator_properties_timeslice_metric_params_metric.go index 89435056d..da0c37817 100644 --- a/generated/slo/model_indicator_properties_timeslice_metric_params_metric.go +++ b/generated/slo/model_indicator_properties_timeslice_metric_params_metric.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_indicator_properties_timeslice_metric_params_metric_metrics_inner.go b/generated/slo/model_indicator_properties_timeslice_metric_params_metric_metrics_inner.go index 828f796ee..aab00b9c0 100644 --- a/generated/slo/model_indicator_properties_timeslice_metric_params_metric_metrics_inner.go +++ b/generated/slo/model_indicator_properties_timeslice_metric_params_metric_metrics_inner.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_kql_with_filters.go b/generated/slo/model_kql_with_filters.go new file mode 100644 index 000000000..b8c17d0f0 --- /dev/null +++ b/generated/slo/model_kql_with_filters.go @@ -0,0 +1,145 @@ +/* +SLOs + +OpenAPI schema for SLOs endpoints + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package slo + +import ( + "encoding/json" + "fmt" +) + +// KqlWithFilters - Defines properties for a filter +type KqlWithFilters struct { + KqlWithFiltersOneOf *KqlWithFiltersOneOf + String *string +} + +// KqlWithFiltersOneOfAsKqlWithFilters is a convenience function that returns KqlWithFiltersOneOf wrapped in KqlWithFilters +func KqlWithFiltersOneOfAsKqlWithFilters(v *KqlWithFiltersOneOf) KqlWithFilters { + return KqlWithFilters{ + KqlWithFiltersOneOf: v, + } +} + +// stringAsKqlWithFilters is a convenience function that returns string wrapped in KqlWithFilters +func StringAsKqlWithFilters(v *string) KqlWithFilters { + return KqlWithFilters{ + String: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *KqlWithFilters) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into KqlWithFiltersOneOf + err = json.Unmarshal(data, &dst.KqlWithFiltersOneOf) + if err == nil { + jsonKqlWithFiltersOneOf, _ := json.Marshal(dst.KqlWithFiltersOneOf) + if string(jsonKqlWithFiltersOneOf) == "{}" { // empty struct + dst.KqlWithFiltersOneOf = nil + } else { + match++ + } + } else { + dst.KqlWithFiltersOneOf = nil + } + + // try to unmarshal data into String + err = json.Unmarshal(data, &dst.String) + if err == nil { + jsonstring, _ := json.Marshal(dst.String) + if string(jsonstring) == "{}" { // empty struct + dst.String = nil + } else { + match++ + } + } else { + dst.String = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.KqlWithFiltersOneOf = nil + dst.String = nil + + return fmt.Errorf("data matches more than one schema in oneOf(KqlWithFilters)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(KqlWithFilters)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src KqlWithFilters) MarshalJSON() ([]byte, error) { + if src.KqlWithFiltersOneOf != nil { + return json.Marshal(&src.KqlWithFiltersOneOf) + } + + if src.String != nil { + return json.Marshal(&src.String) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *KqlWithFilters) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.KqlWithFiltersOneOf != nil { + return obj.KqlWithFiltersOneOf + } + + if obj.String != nil { + return obj.String + } + + // all schemas are nil + return nil +} + +type NullableKqlWithFilters struct { + value *KqlWithFilters + isSet bool +} + +func (v NullableKqlWithFilters) Get() *KqlWithFilters { + return v.value +} + +func (v *NullableKqlWithFilters) Set(val *KqlWithFilters) { + v.value = val + v.isSet = true +} + +func (v NullableKqlWithFilters) IsSet() bool { + return v.isSet +} + +func (v *NullableKqlWithFilters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKqlWithFilters(val *KqlWithFilters) *NullableKqlWithFilters { + return &NullableKqlWithFilters{value: val, isSet: true} +} + +func (v NullableKqlWithFilters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKqlWithFilters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/slo/model_kql_with_filters_good.go b/generated/slo/model_kql_with_filters_good.go new file mode 100644 index 000000000..1f9cda190 --- /dev/null +++ b/generated/slo/model_kql_with_filters_good.go @@ -0,0 +1,145 @@ +/* +SLOs + +OpenAPI schema for SLOs endpoints + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package slo + +import ( + "encoding/json" + "fmt" +) + +// KqlWithFiltersGood - The KQL query used to define the good events. +type KqlWithFiltersGood struct { + KqlWithFiltersOneOf *KqlWithFiltersOneOf + String *string +} + +// KqlWithFiltersOneOfAsKqlWithFiltersGood is a convenience function that returns KqlWithFiltersOneOf wrapped in KqlWithFiltersGood +func KqlWithFiltersOneOfAsKqlWithFiltersGood(v *KqlWithFiltersOneOf) KqlWithFiltersGood { + return KqlWithFiltersGood{ + KqlWithFiltersOneOf: v, + } +} + +// stringAsKqlWithFiltersGood is a convenience function that returns string wrapped in KqlWithFiltersGood +func StringAsKqlWithFiltersGood(v *string) KqlWithFiltersGood { + return KqlWithFiltersGood{ + String: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *KqlWithFiltersGood) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into KqlWithFiltersOneOf + err = json.Unmarshal(data, &dst.KqlWithFiltersOneOf) + if err == nil { + jsonKqlWithFiltersOneOf, _ := json.Marshal(dst.KqlWithFiltersOneOf) + if string(jsonKqlWithFiltersOneOf) == "{}" { // empty struct + dst.KqlWithFiltersOneOf = nil + } else { + match++ + } + } else { + dst.KqlWithFiltersOneOf = nil + } + + // try to unmarshal data into String + err = json.Unmarshal(data, &dst.String) + if err == nil { + jsonstring, _ := json.Marshal(dst.String) + if string(jsonstring) == "{}" { // empty struct + dst.String = nil + } else { + match++ + } + } else { + dst.String = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.KqlWithFiltersOneOf = nil + dst.String = nil + + return fmt.Errorf("data matches more than one schema in oneOf(KqlWithFiltersGood)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(KqlWithFiltersGood)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src KqlWithFiltersGood) MarshalJSON() ([]byte, error) { + if src.KqlWithFiltersOneOf != nil { + return json.Marshal(&src.KqlWithFiltersOneOf) + } + + if src.String != nil { + return json.Marshal(&src.String) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *KqlWithFiltersGood) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.KqlWithFiltersOneOf != nil { + return obj.KqlWithFiltersOneOf + } + + if obj.String != nil { + return obj.String + } + + // all schemas are nil + return nil +} + +type NullableKqlWithFiltersGood struct { + value *KqlWithFiltersGood + isSet bool +} + +func (v NullableKqlWithFiltersGood) Get() *KqlWithFiltersGood { + return v.value +} + +func (v *NullableKqlWithFiltersGood) Set(val *KqlWithFiltersGood) { + v.value = val + v.isSet = true +} + +func (v NullableKqlWithFiltersGood) IsSet() bool { + return v.isSet +} + +func (v *NullableKqlWithFiltersGood) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKqlWithFiltersGood(val *KqlWithFiltersGood) *NullableKqlWithFiltersGood { + return &NullableKqlWithFiltersGood{value: val, isSet: true} +} + +func (v NullableKqlWithFiltersGood) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKqlWithFiltersGood) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/slo/model_kql_with_filters_one_of.go b/generated/slo/model_kql_with_filters_one_of.go new file mode 100644 index 000000000..177edfc0c --- /dev/null +++ b/generated/slo/model_kql_with_filters_one_of.go @@ -0,0 +1,160 @@ +/* +SLOs + +OpenAPI schema for SLOs endpoints + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package slo + +import ( + "encoding/json" +) + +// checks if the KqlWithFiltersOneOf type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &KqlWithFiltersOneOf{} + +// KqlWithFiltersOneOf struct for KqlWithFiltersOneOf +type KqlWithFiltersOneOf struct { + KqlQuery *string `json:"kqlQuery,omitempty"` + Filters []Filter `json:"filters,omitempty"` +} + +// NewKqlWithFiltersOneOf instantiates a new KqlWithFiltersOneOf 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 NewKqlWithFiltersOneOf() *KqlWithFiltersOneOf { + this := KqlWithFiltersOneOf{} + return &this +} + +// NewKqlWithFiltersOneOfWithDefaults instantiates a new KqlWithFiltersOneOf 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 NewKqlWithFiltersOneOfWithDefaults() *KqlWithFiltersOneOf { + this := KqlWithFiltersOneOf{} + return &this +} + +// GetKqlQuery returns the KqlQuery field value if set, zero value otherwise. +func (o *KqlWithFiltersOneOf) GetKqlQuery() string { + if o == nil || IsNil(o.KqlQuery) { + var ret string + return ret + } + return *o.KqlQuery +} + +// GetKqlQueryOk returns a tuple with the KqlQuery field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KqlWithFiltersOneOf) GetKqlQueryOk() (*string, bool) { + if o == nil || IsNil(o.KqlQuery) { + return nil, false + } + return o.KqlQuery, true +} + +// HasKqlQuery returns a boolean if a field has been set. +func (o *KqlWithFiltersOneOf) HasKqlQuery() bool { + if o != nil && !IsNil(o.KqlQuery) { + return true + } + + return false +} + +// SetKqlQuery gets a reference to the given string and assigns it to the KqlQuery field. +func (o *KqlWithFiltersOneOf) SetKqlQuery(v string) { + o.KqlQuery = &v +} + +// GetFilters returns the Filters field value if set, zero value otherwise. +func (o *KqlWithFiltersOneOf) GetFilters() []Filter { + if o == nil || IsNil(o.Filters) { + var ret []Filter + return ret + } + return o.Filters +} + +// GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KqlWithFiltersOneOf) GetFiltersOk() ([]Filter, bool) { + if o == nil || IsNil(o.Filters) { + return nil, false + } + return o.Filters, true +} + +// HasFilters returns a boolean if a field has been set. +func (o *KqlWithFiltersOneOf) HasFilters() bool { + if o != nil && !IsNil(o.Filters) { + return true + } + + return false +} + +// SetFilters gets a reference to the given []Filter and assigns it to the Filters field. +func (o *KqlWithFiltersOneOf) SetFilters(v []Filter) { + o.Filters = v +} + +func (o KqlWithFiltersOneOf) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o KqlWithFiltersOneOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.KqlQuery) { + toSerialize["kqlQuery"] = o.KqlQuery + } + if !IsNil(o.Filters) { + toSerialize["filters"] = o.Filters + } + return toSerialize, nil +} + +type NullableKqlWithFiltersOneOf struct { + value *KqlWithFiltersOneOf + isSet bool +} + +func (v NullableKqlWithFiltersOneOf) Get() *KqlWithFiltersOneOf { + return v.value +} + +func (v *NullableKqlWithFiltersOneOf) Set(val *KqlWithFiltersOneOf) { + v.value = val + v.isSet = true +} + +func (v NullableKqlWithFiltersOneOf) IsSet() bool { + return v.isSet +} + +func (v *NullableKqlWithFiltersOneOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKqlWithFiltersOneOf(val *KqlWithFiltersOneOf) *NullableKqlWithFiltersOneOf { + return &NullableKqlWithFiltersOneOf{value: val, isSet: true} +} + +func (v NullableKqlWithFiltersOneOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKqlWithFiltersOneOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/slo/model_kql_with_filters_total.go b/generated/slo/model_kql_with_filters_total.go new file mode 100644 index 000000000..c33cac612 --- /dev/null +++ b/generated/slo/model_kql_with_filters_total.go @@ -0,0 +1,145 @@ +/* +SLOs + +OpenAPI schema for SLOs endpoints + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package slo + +import ( + "encoding/json" + "fmt" +) + +// KqlWithFiltersTotal - The KQL query used to define all events. +type KqlWithFiltersTotal struct { + KqlWithFiltersOneOf *KqlWithFiltersOneOf + String *string +} + +// KqlWithFiltersOneOfAsKqlWithFiltersTotal is a convenience function that returns KqlWithFiltersOneOf wrapped in KqlWithFiltersTotal +func KqlWithFiltersOneOfAsKqlWithFiltersTotal(v *KqlWithFiltersOneOf) KqlWithFiltersTotal { + return KqlWithFiltersTotal{ + KqlWithFiltersOneOf: v, + } +} + +// stringAsKqlWithFiltersTotal is a convenience function that returns string wrapped in KqlWithFiltersTotal +func StringAsKqlWithFiltersTotal(v *string) KqlWithFiltersTotal { + return KqlWithFiltersTotal{ + String: v, + } +} + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *KqlWithFiltersTotal) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into KqlWithFiltersOneOf + err = json.Unmarshal(data, &dst.KqlWithFiltersOneOf) + if err == nil { + jsonKqlWithFiltersOneOf, _ := json.Marshal(dst.KqlWithFiltersOneOf) + if string(jsonKqlWithFiltersOneOf) == "{}" { // empty struct + dst.KqlWithFiltersOneOf = nil + } else { + match++ + } + } else { + dst.KqlWithFiltersOneOf = nil + } + + // try to unmarshal data into String + err = json.Unmarshal(data, &dst.String) + if err == nil { + jsonstring, _ := json.Marshal(dst.String) + if string(jsonstring) == "{}" { // empty struct + dst.String = nil + } else { + match++ + } + } else { + dst.String = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.KqlWithFiltersOneOf = nil + dst.String = nil + + return fmt.Errorf("data matches more than one schema in oneOf(KqlWithFiltersTotal)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(KqlWithFiltersTotal)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src KqlWithFiltersTotal) MarshalJSON() ([]byte, error) { + if src.KqlWithFiltersOneOf != nil { + return json.Marshal(&src.KqlWithFiltersOneOf) + } + + if src.String != nil { + return json.Marshal(&src.String) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *KqlWithFiltersTotal) GetActualInstance() interface{} { + if obj == nil { + return nil + } + if obj.KqlWithFiltersOneOf != nil { + return obj.KqlWithFiltersOneOf + } + + if obj.String != nil { + return obj.String + } + + // all schemas are nil + return nil +} + +type NullableKqlWithFiltersTotal struct { + value *KqlWithFiltersTotal + isSet bool +} + +func (v NullableKqlWithFiltersTotal) Get() *KqlWithFiltersTotal { + return v.value +} + +func (v *NullableKqlWithFiltersTotal) Set(val *KqlWithFiltersTotal) { + v.value = val + v.isSet = true +} + +func (v NullableKqlWithFiltersTotal) IsSet() bool { + return v.isSet +} + +func (v *NullableKqlWithFiltersTotal) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKqlWithFiltersTotal(val *KqlWithFiltersTotal) *NullableKqlWithFiltersTotal { + return &NullableKqlWithFiltersTotal{value: val, isSet: true} +} + +func (v NullableKqlWithFiltersTotal) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKqlWithFiltersTotal) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/slo/model_objective.go b/generated/slo/model_objective.go index cad95abd2..b9f51f1cd 100644 --- a/generated/slo/model_objective.go +++ b/generated/slo/model_objective.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_settings.go b/generated/slo/model_settings.go index f7cc30ba7..1d8b88ccb 100644 --- a/generated/slo/model_settings.go +++ b/generated/slo/model_settings.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,10 +19,14 @@ var _ MappedNullable = &Settings{} // Settings Defines properties for SLO settings. type Settings struct { - // The synch delay to apply to the transform. Default 1m + // The date field that is used to identify new documents in the source. It is strongly recommended to use a field that contains the ingest timestamp. If you use a different field, you might need to set the delay such that it accounts for data transmission delays. When unspecified, we use the indicator timestamp field. + SyncField *string `json:"syncField,omitempty"` + // The time delay in minutes between the current time and the latest source data time. Increasing the value will delay any alerting. The default value is 1 minute. The minimum value is 1m and the maximum is 359m. It should always be greater then source index refresh interval. SyncDelay *string `json:"syncDelay,omitempty"` - // Configure how often the transform runs, default 1m + // The interval between checks for changes in the source data. The minimum value is 1m and the maximum is 59m. The default value is 1 minute. Frequency *string `json:"frequency,omitempty"` + // Start aggregating data from the time the SLO is created, instead of backfilling data from the beginning of the time window. + PreventInitialBackfill *bool `json:"preventInitialBackfill,omitempty"` } // NewSettings instantiates a new Settings object @@ -31,6 +35,12 @@ type Settings struct { // will change when the set of required properties is changed func NewSettings() *Settings { this := Settings{} + var syncDelay string = "1m" + this.SyncDelay = &syncDelay + var frequency string = "1m" + this.Frequency = &frequency + var preventInitialBackfill bool = false + this.PreventInitialBackfill = &preventInitialBackfill return &this } @@ -39,9 +49,47 @@ func NewSettings() *Settings { // but it doesn't guarantee that properties required by API are set func NewSettingsWithDefaults() *Settings { this := Settings{} + var syncDelay string = "1m" + this.SyncDelay = &syncDelay + var frequency string = "1m" + this.Frequency = &frequency + var preventInitialBackfill bool = false + this.PreventInitialBackfill = &preventInitialBackfill return &this } +// GetSyncField returns the SyncField field value if set, zero value otherwise. +func (o *Settings) GetSyncField() string { + if o == nil || IsNil(o.SyncField) { + var ret string + return ret + } + return *o.SyncField +} + +// GetSyncFieldOk returns a tuple with the SyncField field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Settings) GetSyncFieldOk() (*string, bool) { + if o == nil || IsNil(o.SyncField) { + return nil, false + } + return o.SyncField, true +} + +// HasSyncField returns a boolean if a field has been set. +func (o *Settings) HasSyncField() bool { + if o != nil && !IsNil(o.SyncField) { + return true + } + + return false +} + +// SetSyncField gets a reference to the given string and assigns it to the SyncField field. +func (o *Settings) SetSyncField(v string) { + o.SyncField = &v +} + // GetSyncDelay returns the SyncDelay field value if set, zero value otherwise. func (o *Settings) GetSyncDelay() string { if o == nil || IsNil(o.SyncDelay) { @@ -106,6 +154,38 @@ func (o *Settings) SetFrequency(v string) { o.Frequency = &v } +// GetPreventInitialBackfill returns the PreventInitialBackfill field value if set, zero value otherwise. +func (o *Settings) GetPreventInitialBackfill() bool { + if o == nil || IsNil(o.PreventInitialBackfill) { + var ret bool + return ret + } + return *o.PreventInitialBackfill +} + +// GetPreventInitialBackfillOk returns a tuple with the PreventInitialBackfill field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Settings) GetPreventInitialBackfillOk() (*bool, bool) { + if o == nil || IsNil(o.PreventInitialBackfill) { + return nil, false + } + return o.PreventInitialBackfill, true +} + +// HasPreventInitialBackfill returns a boolean if a field has been set. +func (o *Settings) HasPreventInitialBackfill() bool { + if o != nil && !IsNil(o.PreventInitialBackfill) { + return true + } + + return false +} + +// SetPreventInitialBackfill gets a reference to the given bool and assigns it to the PreventInitialBackfill field. +func (o *Settings) SetPreventInitialBackfill(v bool) { + o.PreventInitialBackfill = &v +} + func (o Settings) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -116,12 +196,18 @@ func (o Settings) MarshalJSON() ([]byte, error) { func (o Settings) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.SyncField) { + toSerialize["syncField"] = o.SyncField + } if !IsNil(o.SyncDelay) { toSerialize["syncDelay"] = o.SyncDelay } if !IsNil(o.Frequency) { toSerialize["frequency"] = o.Frequency } + if !IsNil(o.PreventInitialBackfill) { + toSerialize["preventInitialBackfill"] = o.PreventInitialBackfill + } return toSerialize, nil } diff --git a/generated/slo/model_slo_response.go b/generated/slo/model_slo_definition_response.go similarity index 58% rename from generated/slo/model_slo_response.go rename to generated/slo/model_slo_definition_response.go index 6bb82ce1e..dd9e2aa3d 100644 --- a/generated/slo/model_slo_response.go +++ b/generated/slo/model_slo_definition_response.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,44 +14,43 @@ import ( "encoding/json" ) -// checks if the SloResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SloResponse{} +// checks if the SloDefinitionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SloDefinitionResponse{} -// SloResponse struct for SloResponse -type SloResponse struct { +// SloDefinitionResponse struct for SloDefinitionResponse +type SloDefinitionResponse struct { // The identifier of the SLO. Id string `json:"id"` // The name of the SLO. Name string `json:"name"` // The description of the SLO. - Description string `json:"description"` - Indicator SloResponseIndicator `json:"indicator"` - TimeWindow TimeWindow `json:"timeWindow"` - BudgetingMethod BudgetingMethod `json:"budgetingMethod"` - Objective Objective `json:"objective"` - Settings Settings `json:"settings"` + Description string `json:"description"` + Indicator SloWithSummaryResponseIndicator `json:"indicator"` + TimeWindow TimeWindow `json:"timeWindow"` + BudgetingMethod BudgetingMethod `json:"budgetingMethod"` + Objective Objective `json:"objective"` + Settings Settings `json:"settings"` // The SLO revision Revision float64 `json:"revision"` - Summary Summary `json:"summary"` // Indicate if the SLO is enabled - Enabled bool `json:"enabled"` - GroupBy SloResponseGroupBy `json:"groupBy"` - // the value derived from the groupBy field, if present, otherwise '*' - InstanceId string `json:"instanceId"` + Enabled bool `json:"enabled"` + GroupBy GroupBy `json:"groupBy"` // List of tags Tags []string `json:"tags"` // The creation date CreatedAt string `json:"createdAt"` // The last update date UpdatedAt string `json:"updatedAt"` + // The internal SLO version + Version float64 `json:"version"` } -// NewSloResponse instantiates a new SloResponse object +// NewSloDefinitionResponse instantiates a new SloDefinitionResponse 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 NewSloResponse(id string, name string, description string, indicator SloResponseIndicator, timeWindow TimeWindow, budgetingMethod BudgetingMethod, objective Objective, settings Settings, revision float64, summary Summary, enabled bool, groupBy SloResponseGroupBy, instanceId string, tags []string, createdAt string, updatedAt string) *SloResponse { - this := SloResponse{} +func NewSloDefinitionResponse(id string, name string, description string, indicator SloWithSummaryResponseIndicator, timeWindow TimeWindow, budgetingMethod BudgetingMethod, objective Objective, settings Settings, revision float64, enabled bool, groupBy GroupBy, tags []string, createdAt string, updatedAt string, version float64) *SloDefinitionResponse { + this := SloDefinitionResponse{} this.Id = id this.Name = name this.Description = description @@ -61,26 +60,25 @@ func NewSloResponse(id string, name string, description string, indicator SloRes this.Objective = objective this.Settings = settings this.Revision = revision - this.Summary = summary this.Enabled = enabled this.GroupBy = groupBy - this.InstanceId = instanceId this.Tags = tags this.CreatedAt = createdAt this.UpdatedAt = updatedAt + this.Version = version return &this } -// NewSloResponseWithDefaults instantiates a new SloResponse object +// NewSloDefinitionResponseWithDefaults instantiates a new SloDefinitionResponse 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 NewSloResponseWithDefaults() *SloResponse { - this := SloResponse{} +func NewSloDefinitionResponseWithDefaults() *SloDefinitionResponse { + this := SloDefinitionResponse{} return &this } // GetId returns the Id field value -func (o *SloResponse) GetId() string { +func (o *SloDefinitionResponse) GetId() string { if o == nil { var ret string return ret @@ -91,7 +89,7 @@ func (o *SloResponse) GetId() string { // GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. -func (o *SloResponse) GetIdOk() (*string, bool) { +func (o *SloDefinitionResponse) GetIdOk() (*string, bool) { if o == nil { return nil, false } @@ -99,12 +97,12 @@ func (o *SloResponse) GetIdOk() (*string, bool) { } // SetId sets field value -func (o *SloResponse) SetId(v string) { +func (o *SloDefinitionResponse) SetId(v string) { o.Id = v } // GetName returns the Name field value -func (o *SloResponse) GetName() string { +func (o *SloDefinitionResponse) GetName() string { if o == nil { var ret string return ret @@ -115,7 +113,7 @@ func (o *SloResponse) GetName() string { // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -func (o *SloResponse) GetNameOk() (*string, bool) { +func (o *SloDefinitionResponse) GetNameOk() (*string, bool) { if o == nil { return nil, false } @@ -123,12 +121,12 @@ func (o *SloResponse) GetNameOk() (*string, bool) { } // SetName sets field value -func (o *SloResponse) SetName(v string) { +func (o *SloDefinitionResponse) SetName(v string) { o.Name = v } // GetDescription returns the Description field value -func (o *SloResponse) GetDescription() string { +func (o *SloDefinitionResponse) GetDescription() string { if o == nil { var ret string return ret @@ -139,7 +137,7 @@ func (o *SloResponse) GetDescription() string { // GetDescriptionOk returns a tuple with the Description field value // and a boolean to check if the value has been set. -func (o *SloResponse) GetDescriptionOk() (*string, bool) { +func (o *SloDefinitionResponse) GetDescriptionOk() (*string, bool) { if o == nil { return nil, false } @@ -147,14 +145,14 @@ func (o *SloResponse) GetDescriptionOk() (*string, bool) { } // SetDescription sets field value -func (o *SloResponse) SetDescription(v string) { +func (o *SloDefinitionResponse) SetDescription(v string) { o.Description = v } // GetIndicator returns the Indicator field value -func (o *SloResponse) GetIndicator() SloResponseIndicator { +func (o *SloDefinitionResponse) GetIndicator() SloWithSummaryResponseIndicator { if o == nil { - var ret SloResponseIndicator + var ret SloWithSummaryResponseIndicator return ret } @@ -163,7 +161,7 @@ func (o *SloResponse) GetIndicator() SloResponseIndicator { // GetIndicatorOk returns a tuple with the Indicator field value // and a boolean to check if the value has been set. -func (o *SloResponse) GetIndicatorOk() (*SloResponseIndicator, bool) { +func (o *SloDefinitionResponse) GetIndicatorOk() (*SloWithSummaryResponseIndicator, bool) { if o == nil { return nil, false } @@ -171,12 +169,12 @@ func (o *SloResponse) GetIndicatorOk() (*SloResponseIndicator, bool) { } // SetIndicator sets field value -func (o *SloResponse) SetIndicator(v SloResponseIndicator) { +func (o *SloDefinitionResponse) SetIndicator(v SloWithSummaryResponseIndicator) { o.Indicator = v } // GetTimeWindow returns the TimeWindow field value -func (o *SloResponse) GetTimeWindow() TimeWindow { +func (o *SloDefinitionResponse) GetTimeWindow() TimeWindow { if o == nil { var ret TimeWindow return ret @@ -187,7 +185,7 @@ func (o *SloResponse) GetTimeWindow() TimeWindow { // GetTimeWindowOk returns a tuple with the TimeWindow field value // and a boolean to check if the value has been set. -func (o *SloResponse) GetTimeWindowOk() (*TimeWindow, bool) { +func (o *SloDefinitionResponse) GetTimeWindowOk() (*TimeWindow, bool) { if o == nil { return nil, false } @@ -195,12 +193,12 @@ func (o *SloResponse) GetTimeWindowOk() (*TimeWindow, bool) { } // SetTimeWindow sets field value -func (o *SloResponse) SetTimeWindow(v TimeWindow) { +func (o *SloDefinitionResponse) SetTimeWindow(v TimeWindow) { o.TimeWindow = v } // GetBudgetingMethod returns the BudgetingMethod field value -func (o *SloResponse) GetBudgetingMethod() BudgetingMethod { +func (o *SloDefinitionResponse) GetBudgetingMethod() BudgetingMethod { if o == nil { var ret BudgetingMethod return ret @@ -211,7 +209,7 @@ func (o *SloResponse) GetBudgetingMethod() BudgetingMethod { // GetBudgetingMethodOk returns a tuple with the BudgetingMethod field value // and a boolean to check if the value has been set. -func (o *SloResponse) GetBudgetingMethodOk() (*BudgetingMethod, bool) { +func (o *SloDefinitionResponse) GetBudgetingMethodOk() (*BudgetingMethod, bool) { if o == nil { return nil, false } @@ -219,12 +217,12 @@ func (o *SloResponse) GetBudgetingMethodOk() (*BudgetingMethod, bool) { } // SetBudgetingMethod sets field value -func (o *SloResponse) SetBudgetingMethod(v BudgetingMethod) { +func (o *SloDefinitionResponse) SetBudgetingMethod(v BudgetingMethod) { o.BudgetingMethod = v } // GetObjective returns the Objective field value -func (o *SloResponse) GetObjective() Objective { +func (o *SloDefinitionResponse) GetObjective() Objective { if o == nil { var ret Objective return ret @@ -235,7 +233,7 @@ func (o *SloResponse) GetObjective() Objective { // GetObjectiveOk returns a tuple with the Objective field value // and a boolean to check if the value has been set. -func (o *SloResponse) GetObjectiveOk() (*Objective, bool) { +func (o *SloDefinitionResponse) GetObjectiveOk() (*Objective, bool) { if o == nil { return nil, false } @@ -243,12 +241,12 @@ func (o *SloResponse) GetObjectiveOk() (*Objective, bool) { } // SetObjective sets field value -func (o *SloResponse) SetObjective(v Objective) { +func (o *SloDefinitionResponse) SetObjective(v Objective) { o.Objective = v } // GetSettings returns the Settings field value -func (o *SloResponse) GetSettings() Settings { +func (o *SloDefinitionResponse) GetSettings() Settings { if o == nil { var ret Settings return ret @@ -259,7 +257,7 @@ func (o *SloResponse) GetSettings() Settings { // GetSettingsOk returns a tuple with the Settings field value // and a boolean to check if the value has been set. -func (o *SloResponse) GetSettingsOk() (*Settings, bool) { +func (o *SloDefinitionResponse) GetSettingsOk() (*Settings, bool) { if o == nil { return nil, false } @@ -267,12 +265,12 @@ func (o *SloResponse) GetSettingsOk() (*Settings, bool) { } // SetSettings sets field value -func (o *SloResponse) SetSettings(v Settings) { +func (o *SloDefinitionResponse) SetSettings(v Settings) { o.Settings = v } // GetRevision returns the Revision field value -func (o *SloResponse) GetRevision() float64 { +func (o *SloDefinitionResponse) GetRevision() float64 { if o == nil { var ret float64 return ret @@ -283,7 +281,7 @@ func (o *SloResponse) GetRevision() float64 { // GetRevisionOk returns a tuple with the Revision field value // and a boolean to check if the value has been set. -func (o *SloResponse) GetRevisionOk() (*float64, bool) { +func (o *SloDefinitionResponse) GetRevisionOk() (*float64, bool) { if o == nil { return nil, false } @@ -291,36 +289,12 @@ func (o *SloResponse) GetRevisionOk() (*float64, bool) { } // SetRevision sets field value -func (o *SloResponse) SetRevision(v float64) { +func (o *SloDefinitionResponse) SetRevision(v float64) { o.Revision = v } -// GetSummary returns the Summary field value -func (o *SloResponse) GetSummary() Summary { - if o == nil { - var ret Summary - return ret - } - - return o.Summary -} - -// GetSummaryOk returns a tuple with the Summary field value -// and a boolean to check if the value has been set. -func (o *SloResponse) GetSummaryOk() (*Summary, bool) { - if o == nil { - return nil, false - } - return &o.Summary, true -} - -// SetSummary sets field value -func (o *SloResponse) SetSummary(v Summary) { - o.Summary = v -} - // GetEnabled returns the Enabled field value -func (o *SloResponse) GetEnabled() bool { +func (o *SloDefinitionResponse) GetEnabled() bool { if o == nil { var ret bool return ret @@ -331,7 +305,7 @@ func (o *SloResponse) GetEnabled() bool { // GetEnabledOk returns a tuple with the Enabled field value // and a boolean to check if the value has been set. -func (o *SloResponse) GetEnabledOk() (*bool, bool) { +func (o *SloDefinitionResponse) GetEnabledOk() (*bool, bool) { if o == nil { return nil, false } @@ -339,14 +313,14 @@ func (o *SloResponse) GetEnabledOk() (*bool, bool) { } // SetEnabled sets field value -func (o *SloResponse) SetEnabled(v bool) { +func (o *SloDefinitionResponse) SetEnabled(v bool) { o.Enabled = v } // GetGroupBy returns the GroupBy field value -func (o *SloResponse) GetGroupBy() SloResponseGroupBy { +func (o *SloDefinitionResponse) GetGroupBy() GroupBy { if o == nil { - var ret SloResponseGroupBy + var ret GroupBy return ret } @@ -355,7 +329,7 @@ func (o *SloResponse) GetGroupBy() SloResponseGroupBy { // GetGroupByOk returns a tuple with the GroupBy field value // and a boolean to check if the value has been set. -func (o *SloResponse) GetGroupByOk() (*SloResponseGroupBy, bool) { +func (o *SloDefinitionResponse) GetGroupByOk() (*GroupBy, bool) { if o == nil { return nil, false } @@ -363,36 +337,12 @@ func (o *SloResponse) GetGroupByOk() (*SloResponseGroupBy, bool) { } // SetGroupBy sets field value -func (o *SloResponse) SetGroupBy(v SloResponseGroupBy) { +func (o *SloDefinitionResponse) SetGroupBy(v GroupBy) { o.GroupBy = v } -// GetInstanceId returns the InstanceId field value -func (o *SloResponse) GetInstanceId() string { - if o == nil { - var ret string - return ret - } - - return o.InstanceId -} - -// GetInstanceIdOk returns a tuple with the InstanceId field value -// and a boolean to check if the value has been set. -func (o *SloResponse) GetInstanceIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.InstanceId, true -} - -// SetInstanceId sets field value -func (o *SloResponse) SetInstanceId(v string) { - o.InstanceId = v -} - // GetTags returns the Tags field value -func (o *SloResponse) GetTags() []string { +func (o *SloDefinitionResponse) GetTags() []string { if o == nil { var ret []string return ret @@ -403,7 +353,7 @@ func (o *SloResponse) GetTags() []string { // GetTagsOk returns a tuple with the Tags field value // and a boolean to check if the value has been set. -func (o *SloResponse) GetTagsOk() ([]string, bool) { +func (o *SloDefinitionResponse) GetTagsOk() ([]string, bool) { if o == nil { return nil, false } @@ -411,12 +361,12 @@ func (o *SloResponse) GetTagsOk() ([]string, bool) { } // SetTags sets field value -func (o *SloResponse) SetTags(v []string) { +func (o *SloDefinitionResponse) SetTags(v []string) { o.Tags = v } // GetCreatedAt returns the CreatedAt field value -func (o *SloResponse) GetCreatedAt() string { +func (o *SloDefinitionResponse) GetCreatedAt() string { if o == nil { var ret string return ret @@ -427,7 +377,7 @@ func (o *SloResponse) GetCreatedAt() string { // GetCreatedAtOk returns a tuple with the CreatedAt field value // and a boolean to check if the value has been set. -func (o *SloResponse) GetCreatedAtOk() (*string, bool) { +func (o *SloDefinitionResponse) GetCreatedAtOk() (*string, bool) { if o == nil { return nil, false } @@ -435,12 +385,12 @@ func (o *SloResponse) GetCreatedAtOk() (*string, bool) { } // SetCreatedAt sets field value -func (o *SloResponse) SetCreatedAt(v string) { +func (o *SloDefinitionResponse) SetCreatedAt(v string) { o.CreatedAt = v } // GetUpdatedAt returns the UpdatedAt field value -func (o *SloResponse) GetUpdatedAt() string { +func (o *SloDefinitionResponse) GetUpdatedAt() string { if o == nil { var ret string return ret @@ -451,7 +401,7 @@ func (o *SloResponse) GetUpdatedAt() string { // GetUpdatedAtOk returns a tuple with the UpdatedAt field value // and a boolean to check if the value has been set. -func (o *SloResponse) GetUpdatedAtOk() (*string, bool) { +func (o *SloDefinitionResponse) GetUpdatedAtOk() (*string, bool) { if o == nil { return nil, false } @@ -459,11 +409,35 @@ func (o *SloResponse) GetUpdatedAtOk() (*string, bool) { } // SetUpdatedAt sets field value -func (o *SloResponse) SetUpdatedAt(v string) { +func (o *SloDefinitionResponse) SetUpdatedAt(v string) { o.UpdatedAt = v } -func (o SloResponse) MarshalJSON() ([]byte, error) { +// GetVersion returns the Version field value +func (o *SloDefinitionResponse) GetVersion() float64 { + if o == nil { + var ret float64 + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *SloDefinitionResponse) GetVersionOk() (*float64, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *SloDefinitionResponse) SetVersion(v float64) { + o.Version = v +} + +func (o SloDefinitionResponse) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { return []byte{}, err @@ -471,7 +445,7 @@ func (o SloResponse) MarshalJSON() ([]byte, error) { return json.Marshal(toSerialize) } -func (o SloResponse) ToMap() (map[string]interface{}, error) { +func (o SloDefinitionResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["id"] = o.Id toSerialize["name"] = o.Name @@ -482,48 +456,47 @@ func (o SloResponse) ToMap() (map[string]interface{}, error) { toSerialize["objective"] = o.Objective toSerialize["settings"] = o.Settings toSerialize["revision"] = o.Revision - toSerialize["summary"] = o.Summary toSerialize["enabled"] = o.Enabled toSerialize["groupBy"] = o.GroupBy - toSerialize["instanceId"] = o.InstanceId toSerialize["tags"] = o.Tags toSerialize["createdAt"] = o.CreatedAt toSerialize["updatedAt"] = o.UpdatedAt + toSerialize["version"] = o.Version return toSerialize, nil } -type NullableSloResponse struct { - value *SloResponse +type NullableSloDefinitionResponse struct { + value *SloDefinitionResponse isSet bool } -func (v NullableSloResponse) Get() *SloResponse { +func (v NullableSloDefinitionResponse) Get() *SloDefinitionResponse { return v.value } -func (v *NullableSloResponse) Set(val *SloResponse) { +func (v *NullableSloDefinitionResponse) Set(val *SloDefinitionResponse) { v.value = val v.isSet = true } -func (v NullableSloResponse) IsSet() bool { +func (v NullableSloDefinitionResponse) IsSet() bool { return v.isSet } -func (v *NullableSloResponse) Unset() { +func (v *NullableSloDefinitionResponse) Unset() { v.value = nil v.isSet = false } -func NewNullableSloResponse(val *SloResponse) *NullableSloResponse { - return &NullableSloResponse{value: val, isSet: true} +func NewNullableSloDefinitionResponse(val *SloDefinitionResponse) *NullableSloDefinitionResponse { + return &NullableSloDefinitionResponse{value: val, isSet: true} } -func (v NullableSloResponse) MarshalJSON() ([]byte, error) { +func (v NullableSloDefinitionResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableSloResponse) UnmarshalJSON(src []byte) error { +func (v *NullableSloDefinitionResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/generated/slo/model_slo_with_summary_response.go b/generated/slo/model_slo_with_summary_response.go new file mode 100644 index 000000000..c498dee0f --- /dev/null +++ b/generated/slo/model_slo_with_summary_response.go @@ -0,0 +1,557 @@ +/* +SLOs + +OpenAPI schema for SLOs endpoints + +API version: 1.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package slo + +import ( + "encoding/json" +) + +// checks if the SloWithSummaryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SloWithSummaryResponse{} + +// SloWithSummaryResponse struct for SloWithSummaryResponse +type SloWithSummaryResponse struct { + // The identifier of the SLO. + Id string `json:"id"` + // The name of the SLO. + Name string `json:"name"` + // The description of the SLO. + Description string `json:"description"` + Indicator SloWithSummaryResponseIndicator `json:"indicator"` + TimeWindow TimeWindow `json:"timeWindow"` + BudgetingMethod BudgetingMethod `json:"budgetingMethod"` + Objective Objective `json:"objective"` + Settings Settings `json:"settings"` + // The SLO revision + Revision float64 `json:"revision"` + Summary Summary `json:"summary"` + // Indicate if the SLO is enabled + Enabled bool `json:"enabled"` + GroupBy GroupBy `json:"groupBy"` + // the value derived from the groupBy field, if present, otherwise '*' + InstanceId string `json:"instanceId"` + // List of tags + Tags []string `json:"tags"` + // The creation date + CreatedAt string `json:"createdAt"` + // The last update date + UpdatedAt string `json:"updatedAt"` + // The internal SLO version + Version float64 `json:"version"` +} + +// NewSloWithSummaryResponse instantiates a new SloWithSummaryResponse 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 NewSloWithSummaryResponse(id string, name string, description string, indicator SloWithSummaryResponseIndicator, timeWindow TimeWindow, budgetingMethod BudgetingMethod, objective Objective, settings Settings, revision float64, summary Summary, enabled bool, groupBy GroupBy, instanceId string, tags []string, createdAt string, updatedAt string, version float64) *SloWithSummaryResponse { + this := SloWithSummaryResponse{} + this.Id = id + this.Name = name + this.Description = description + this.Indicator = indicator + this.TimeWindow = timeWindow + this.BudgetingMethod = budgetingMethod + this.Objective = objective + this.Settings = settings + this.Revision = revision + this.Summary = summary + this.Enabled = enabled + this.GroupBy = groupBy + this.InstanceId = instanceId + this.Tags = tags + this.CreatedAt = createdAt + this.UpdatedAt = updatedAt + this.Version = version + return &this +} + +// NewSloWithSummaryResponseWithDefaults instantiates a new SloWithSummaryResponse 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 NewSloWithSummaryResponseWithDefaults() *SloWithSummaryResponse { + this := SloWithSummaryResponse{} + return &this +} + +// GetId returns the Id field value +func (o *SloWithSummaryResponse) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *SloWithSummaryResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *SloWithSummaryResponse) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *SloWithSummaryResponse) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *SloWithSummaryResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *SloWithSummaryResponse) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value +func (o *SloWithSummaryResponse) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *SloWithSummaryResponse) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *SloWithSummaryResponse) SetDescription(v string) { + o.Description = v +} + +// GetIndicator returns the Indicator field value +func (o *SloWithSummaryResponse) GetIndicator() SloWithSummaryResponseIndicator { + if o == nil { + var ret SloWithSummaryResponseIndicator + return ret + } + + return o.Indicator +} + +// GetIndicatorOk returns a tuple with the Indicator field value +// and a boolean to check if the value has been set. +func (o *SloWithSummaryResponse) GetIndicatorOk() (*SloWithSummaryResponseIndicator, bool) { + if o == nil { + return nil, false + } + return &o.Indicator, true +} + +// SetIndicator sets field value +func (o *SloWithSummaryResponse) SetIndicator(v SloWithSummaryResponseIndicator) { + o.Indicator = v +} + +// GetTimeWindow returns the TimeWindow field value +func (o *SloWithSummaryResponse) GetTimeWindow() TimeWindow { + if o == nil { + var ret TimeWindow + return ret + } + + return o.TimeWindow +} + +// GetTimeWindowOk returns a tuple with the TimeWindow field value +// and a boolean to check if the value has been set. +func (o *SloWithSummaryResponse) GetTimeWindowOk() (*TimeWindow, bool) { + if o == nil { + return nil, false + } + return &o.TimeWindow, true +} + +// SetTimeWindow sets field value +func (o *SloWithSummaryResponse) SetTimeWindow(v TimeWindow) { + o.TimeWindow = v +} + +// GetBudgetingMethod returns the BudgetingMethod field value +func (o *SloWithSummaryResponse) GetBudgetingMethod() BudgetingMethod { + if o == nil { + var ret BudgetingMethod + return ret + } + + return o.BudgetingMethod +} + +// GetBudgetingMethodOk returns a tuple with the BudgetingMethod field value +// and a boolean to check if the value has been set. +func (o *SloWithSummaryResponse) GetBudgetingMethodOk() (*BudgetingMethod, bool) { + if o == nil { + return nil, false + } + return &o.BudgetingMethod, true +} + +// SetBudgetingMethod sets field value +func (o *SloWithSummaryResponse) SetBudgetingMethod(v BudgetingMethod) { + o.BudgetingMethod = v +} + +// GetObjective returns the Objective field value +func (o *SloWithSummaryResponse) GetObjective() Objective { + if o == nil { + var ret Objective + return ret + } + + return o.Objective +} + +// GetObjectiveOk returns a tuple with the Objective field value +// and a boolean to check if the value has been set. +func (o *SloWithSummaryResponse) GetObjectiveOk() (*Objective, bool) { + if o == nil { + return nil, false + } + return &o.Objective, true +} + +// SetObjective sets field value +func (o *SloWithSummaryResponse) SetObjective(v Objective) { + o.Objective = v +} + +// GetSettings returns the Settings field value +func (o *SloWithSummaryResponse) GetSettings() Settings { + if o == nil { + var ret Settings + return ret + } + + return o.Settings +} + +// GetSettingsOk returns a tuple with the Settings field value +// and a boolean to check if the value has been set. +func (o *SloWithSummaryResponse) GetSettingsOk() (*Settings, bool) { + if o == nil { + return nil, false + } + return &o.Settings, true +} + +// SetSettings sets field value +func (o *SloWithSummaryResponse) SetSettings(v Settings) { + o.Settings = v +} + +// GetRevision returns the Revision field value +func (o *SloWithSummaryResponse) GetRevision() float64 { + if o == nil { + var ret float64 + return ret + } + + return o.Revision +} + +// GetRevisionOk returns a tuple with the Revision field value +// and a boolean to check if the value has been set. +func (o *SloWithSummaryResponse) GetRevisionOk() (*float64, bool) { + if o == nil { + return nil, false + } + return &o.Revision, true +} + +// SetRevision sets field value +func (o *SloWithSummaryResponse) SetRevision(v float64) { + o.Revision = v +} + +// GetSummary returns the Summary field value +func (o *SloWithSummaryResponse) GetSummary() Summary { + if o == nil { + var ret Summary + return ret + } + + return o.Summary +} + +// GetSummaryOk returns a tuple with the Summary field value +// and a boolean to check if the value has been set. +func (o *SloWithSummaryResponse) GetSummaryOk() (*Summary, bool) { + if o == nil { + return nil, false + } + return &o.Summary, true +} + +// SetSummary sets field value +func (o *SloWithSummaryResponse) SetSummary(v Summary) { + o.Summary = v +} + +// GetEnabled returns the Enabled field value +func (o *SloWithSummaryResponse) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *SloWithSummaryResponse) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *SloWithSummaryResponse) SetEnabled(v bool) { + o.Enabled = v +} + +// GetGroupBy returns the GroupBy field value +func (o *SloWithSummaryResponse) GetGroupBy() GroupBy { + if o == nil { + var ret GroupBy + return ret + } + + return o.GroupBy +} + +// GetGroupByOk returns a tuple with the GroupBy field value +// and a boolean to check if the value has been set. +func (o *SloWithSummaryResponse) GetGroupByOk() (*GroupBy, bool) { + if o == nil { + return nil, false + } + return &o.GroupBy, true +} + +// SetGroupBy sets field value +func (o *SloWithSummaryResponse) SetGroupBy(v GroupBy) { + o.GroupBy = v +} + +// GetInstanceId returns the InstanceId field value +func (o *SloWithSummaryResponse) GetInstanceId() string { + if o == nil { + var ret string + return ret + } + + return o.InstanceId +} + +// GetInstanceIdOk returns a tuple with the InstanceId field value +// and a boolean to check if the value has been set. +func (o *SloWithSummaryResponse) GetInstanceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.InstanceId, true +} + +// SetInstanceId sets field value +func (o *SloWithSummaryResponse) SetInstanceId(v string) { + o.InstanceId = v +} + +// GetTags returns the Tags field value +func (o *SloWithSummaryResponse) GetTags() []string { + if o == nil { + var ret []string + return ret + } + + return o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value +// and a boolean to check if the value has been set. +func (o *SloWithSummaryResponse) GetTagsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Tags, true +} + +// SetTags sets field value +func (o *SloWithSummaryResponse) SetTags(v []string) { + o.Tags = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *SloWithSummaryResponse) GetCreatedAt() string { + if o == nil { + var ret string + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *SloWithSummaryResponse) GetCreatedAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *SloWithSummaryResponse) SetCreatedAt(v string) { + o.CreatedAt = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *SloWithSummaryResponse) GetUpdatedAt() string { + if o == nil { + var ret string + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *SloWithSummaryResponse) GetUpdatedAtOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *SloWithSummaryResponse) SetUpdatedAt(v string) { + o.UpdatedAt = v +} + +// GetVersion returns the Version field value +func (o *SloWithSummaryResponse) GetVersion() float64 { + if o == nil { + var ret float64 + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *SloWithSummaryResponse) GetVersionOk() (*float64, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *SloWithSummaryResponse) SetVersion(v float64) { + o.Version = v +} + +func (o SloWithSummaryResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SloWithSummaryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["description"] = o.Description + toSerialize["indicator"] = o.Indicator + toSerialize["timeWindow"] = o.TimeWindow + toSerialize["budgetingMethod"] = o.BudgetingMethod + toSerialize["objective"] = o.Objective + toSerialize["settings"] = o.Settings + toSerialize["revision"] = o.Revision + toSerialize["summary"] = o.Summary + toSerialize["enabled"] = o.Enabled + toSerialize["groupBy"] = o.GroupBy + toSerialize["instanceId"] = o.InstanceId + toSerialize["tags"] = o.Tags + toSerialize["createdAt"] = o.CreatedAt + toSerialize["updatedAt"] = o.UpdatedAt + toSerialize["version"] = o.Version + return toSerialize, nil +} + +type NullableSloWithSummaryResponse struct { + value *SloWithSummaryResponse + isSet bool +} + +func (v NullableSloWithSummaryResponse) Get() *SloWithSummaryResponse { + return v.value +} + +func (v *NullableSloWithSummaryResponse) Set(val *SloWithSummaryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSloWithSummaryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSloWithSummaryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSloWithSummaryResponse(val *SloWithSummaryResponse) *NullableSloWithSummaryResponse { + return &NullableSloWithSummaryResponse{value: val, isSet: true} +} + +func (v NullableSloWithSummaryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSloWithSummaryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/generated/slo/model_slo_response_indicator.go b/generated/slo/model_slo_with_summary_response_indicator.go similarity index 62% rename from generated/slo/model_slo_response_indicator.go rename to generated/slo/model_slo_with_summary_response_indicator.go index e0147a4dd..4e5fc86e6 100644 --- a/generated/slo/model_slo_response_indicator.go +++ b/generated/slo/model_slo_with_summary_response_indicator.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,8 +15,8 @@ import ( "fmt" ) -// SloResponseIndicator - struct for SloResponseIndicator -type SloResponseIndicator struct { +// SloWithSummaryResponseIndicator - struct for SloWithSummaryResponseIndicator +type SloWithSummaryResponseIndicator struct { IndicatorPropertiesApmAvailability *IndicatorPropertiesApmAvailability IndicatorPropertiesApmLatency *IndicatorPropertiesApmLatency IndicatorPropertiesCustomKql *IndicatorPropertiesCustomKql @@ -25,50 +25,50 @@ type SloResponseIndicator struct { IndicatorPropertiesTimesliceMetric *IndicatorPropertiesTimesliceMetric } -// IndicatorPropertiesApmAvailabilityAsSloResponseIndicator is a convenience function that returns IndicatorPropertiesApmAvailability wrapped in SloResponseIndicator -func IndicatorPropertiesApmAvailabilityAsSloResponseIndicator(v *IndicatorPropertiesApmAvailability) SloResponseIndicator { - return SloResponseIndicator{ +// IndicatorPropertiesApmAvailabilityAsSloWithSummaryResponseIndicator is a convenience function that returns IndicatorPropertiesApmAvailability wrapped in SloWithSummaryResponseIndicator +func IndicatorPropertiesApmAvailabilityAsSloWithSummaryResponseIndicator(v *IndicatorPropertiesApmAvailability) SloWithSummaryResponseIndicator { + return SloWithSummaryResponseIndicator{ IndicatorPropertiesApmAvailability: v, } } -// IndicatorPropertiesApmLatencyAsSloResponseIndicator is a convenience function that returns IndicatorPropertiesApmLatency wrapped in SloResponseIndicator -func IndicatorPropertiesApmLatencyAsSloResponseIndicator(v *IndicatorPropertiesApmLatency) SloResponseIndicator { - return SloResponseIndicator{ +// IndicatorPropertiesApmLatencyAsSloWithSummaryResponseIndicator is a convenience function that returns IndicatorPropertiesApmLatency wrapped in SloWithSummaryResponseIndicator +func IndicatorPropertiesApmLatencyAsSloWithSummaryResponseIndicator(v *IndicatorPropertiesApmLatency) SloWithSummaryResponseIndicator { + return SloWithSummaryResponseIndicator{ IndicatorPropertiesApmLatency: v, } } -// IndicatorPropertiesCustomKqlAsSloResponseIndicator is a convenience function that returns IndicatorPropertiesCustomKql wrapped in SloResponseIndicator -func IndicatorPropertiesCustomKqlAsSloResponseIndicator(v *IndicatorPropertiesCustomKql) SloResponseIndicator { - return SloResponseIndicator{ +// IndicatorPropertiesCustomKqlAsSloWithSummaryResponseIndicator is a convenience function that returns IndicatorPropertiesCustomKql wrapped in SloWithSummaryResponseIndicator +func IndicatorPropertiesCustomKqlAsSloWithSummaryResponseIndicator(v *IndicatorPropertiesCustomKql) SloWithSummaryResponseIndicator { + return SloWithSummaryResponseIndicator{ IndicatorPropertiesCustomKql: v, } } -// IndicatorPropertiesCustomMetricAsSloResponseIndicator is a convenience function that returns IndicatorPropertiesCustomMetric wrapped in SloResponseIndicator -func IndicatorPropertiesCustomMetricAsSloResponseIndicator(v *IndicatorPropertiesCustomMetric) SloResponseIndicator { - return SloResponseIndicator{ +// IndicatorPropertiesCustomMetricAsSloWithSummaryResponseIndicator is a convenience function that returns IndicatorPropertiesCustomMetric wrapped in SloWithSummaryResponseIndicator +func IndicatorPropertiesCustomMetricAsSloWithSummaryResponseIndicator(v *IndicatorPropertiesCustomMetric) SloWithSummaryResponseIndicator { + return SloWithSummaryResponseIndicator{ IndicatorPropertiesCustomMetric: v, } } -// IndicatorPropertiesHistogramAsSloResponseIndicator is a convenience function that returns IndicatorPropertiesHistogram wrapped in SloResponseIndicator -func IndicatorPropertiesHistogramAsSloResponseIndicator(v *IndicatorPropertiesHistogram) SloResponseIndicator { - return SloResponseIndicator{ +// IndicatorPropertiesHistogramAsSloWithSummaryResponseIndicator is a convenience function that returns IndicatorPropertiesHistogram wrapped in SloWithSummaryResponseIndicator +func IndicatorPropertiesHistogramAsSloWithSummaryResponseIndicator(v *IndicatorPropertiesHistogram) SloWithSummaryResponseIndicator { + return SloWithSummaryResponseIndicator{ IndicatorPropertiesHistogram: v, } } -// IndicatorPropertiesTimesliceMetricAsSloResponseIndicator is a convenience function that returns IndicatorPropertiesTimesliceMetric wrapped in SloResponseIndicator -func IndicatorPropertiesTimesliceMetricAsSloResponseIndicator(v *IndicatorPropertiesTimesliceMetric) SloResponseIndicator { - return SloResponseIndicator{ +// IndicatorPropertiesTimesliceMetricAsSloWithSummaryResponseIndicator is a convenience function that returns IndicatorPropertiesTimesliceMetric wrapped in SloWithSummaryResponseIndicator +func IndicatorPropertiesTimesliceMetricAsSloWithSummaryResponseIndicator(v *IndicatorPropertiesTimesliceMetric) SloWithSummaryResponseIndicator { + return SloWithSummaryResponseIndicator{ IndicatorPropertiesTimesliceMetric: v, } } // Unmarshal JSON data into one of the pointers in the struct -func (dst *SloResponseIndicator) UnmarshalJSON(data []byte) error { +func (dst *SloWithSummaryResponseIndicator) UnmarshalJSON(data []byte) error { var err error // use discriminator value to speed up the lookup var jsonDict map[string]interface{} @@ -85,7 +85,7 @@ func (dst *SloResponseIndicator) UnmarshalJSON(data []byte) error { return nil // data stored in dst.IndicatorPropertiesApmAvailability, return on the first match } else { dst.IndicatorPropertiesApmAvailability = nil - return fmt.Errorf("failed to unmarshal SloResponseIndicator as IndicatorPropertiesApmAvailability: %s", err.Error()) + return fmt.Errorf("failed to unmarshal SloWithSummaryResponseIndicator as IndicatorPropertiesApmAvailability: %s", err.Error()) } } @@ -97,7 +97,7 @@ func (dst *SloResponseIndicator) UnmarshalJSON(data []byte) error { return nil // data stored in dst.IndicatorPropertiesApmLatency, return on the first match } else { dst.IndicatorPropertiesApmLatency = nil - return fmt.Errorf("failed to unmarshal SloResponseIndicator as IndicatorPropertiesApmLatency: %s", err.Error()) + return fmt.Errorf("failed to unmarshal SloWithSummaryResponseIndicator as IndicatorPropertiesApmLatency: %s", err.Error()) } } @@ -109,7 +109,7 @@ func (dst *SloResponseIndicator) UnmarshalJSON(data []byte) error { return nil // data stored in dst.IndicatorPropertiesCustomKql, return on the first match } else { dst.IndicatorPropertiesCustomKql = nil - return fmt.Errorf("failed to unmarshal SloResponseIndicator as IndicatorPropertiesCustomKql: %s", err.Error()) + return fmt.Errorf("failed to unmarshal SloWithSummaryResponseIndicator as IndicatorPropertiesCustomKql: %s", err.Error()) } } @@ -121,7 +121,7 @@ func (dst *SloResponseIndicator) UnmarshalJSON(data []byte) error { return nil // data stored in dst.IndicatorPropertiesCustomMetric, return on the first match } else { dst.IndicatorPropertiesCustomMetric = nil - return fmt.Errorf("failed to unmarshal SloResponseIndicator as IndicatorPropertiesCustomMetric: %s", err.Error()) + return fmt.Errorf("failed to unmarshal SloWithSummaryResponseIndicator as IndicatorPropertiesCustomMetric: %s", err.Error()) } } @@ -133,7 +133,7 @@ func (dst *SloResponseIndicator) UnmarshalJSON(data []byte) error { return nil // data stored in dst.IndicatorPropertiesHistogram, return on the first match } else { dst.IndicatorPropertiesHistogram = nil - return fmt.Errorf("failed to unmarshal SloResponseIndicator as IndicatorPropertiesHistogram: %s", err.Error()) + return fmt.Errorf("failed to unmarshal SloWithSummaryResponseIndicator as IndicatorPropertiesHistogram: %s", err.Error()) } } @@ -145,7 +145,7 @@ func (dst *SloResponseIndicator) UnmarshalJSON(data []byte) error { return nil // data stored in dst.IndicatorPropertiesTimesliceMetric, return on the first match } else { dst.IndicatorPropertiesTimesliceMetric = nil - return fmt.Errorf("failed to unmarshal SloResponseIndicator as IndicatorPropertiesTimesliceMetric: %s", err.Error()) + return fmt.Errorf("failed to unmarshal SloWithSummaryResponseIndicator as IndicatorPropertiesTimesliceMetric: %s", err.Error()) } } @@ -157,7 +157,7 @@ func (dst *SloResponseIndicator) UnmarshalJSON(data []byte) error { return nil // data stored in dst.IndicatorPropertiesApmLatency, return on the first match } else { dst.IndicatorPropertiesApmLatency = nil - return fmt.Errorf("failed to unmarshal SloResponseIndicator as IndicatorPropertiesApmLatency: %s", err.Error()) + return fmt.Errorf("failed to unmarshal SloWithSummaryResponseIndicator as IndicatorPropertiesApmLatency: %s", err.Error()) } } @@ -169,7 +169,7 @@ func (dst *SloResponseIndicator) UnmarshalJSON(data []byte) error { return nil // data stored in dst.IndicatorPropertiesApmAvailability, return on the first match } else { dst.IndicatorPropertiesApmAvailability = nil - return fmt.Errorf("failed to unmarshal SloResponseIndicator as IndicatorPropertiesApmAvailability: %s", err.Error()) + return fmt.Errorf("failed to unmarshal SloWithSummaryResponseIndicator as IndicatorPropertiesApmAvailability: %s", err.Error()) } } @@ -181,7 +181,7 @@ func (dst *SloResponseIndicator) UnmarshalJSON(data []byte) error { return nil // data stored in dst.IndicatorPropertiesHistogram, return on the first match } else { dst.IndicatorPropertiesHistogram = nil - return fmt.Errorf("failed to unmarshal SloResponseIndicator as IndicatorPropertiesHistogram: %s", err.Error()) + return fmt.Errorf("failed to unmarshal SloWithSummaryResponseIndicator as IndicatorPropertiesHistogram: %s", err.Error()) } } @@ -193,7 +193,7 @@ func (dst *SloResponseIndicator) UnmarshalJSON(data []byte) error { return nil // data stored in dst.IndicatorPropertiesCustomKql, return on the first match } else { dst.IndicatorPropertiesCustomKql = nil - return fmt.Errorf("failed to unmarshal SloResponseIndicator as IndicatorPropertiesCustomKql: %s", err.Error()) + return fmt.Errorf("failed to unmarshal SloWithSummaryResponseIndicator as IndicatorPropertiesCustomKql: %s", err.Error()) } } @@ -205,7 +205,7 @@ func (dst *SloResponseIndicator) UnmarshalJSON(data []byte) error { return nil // data stored in dst.IndicatorPropertiesCustomMetric, return on the first match } else { dst.IndicatorPropertiesCustomMetric = nil - return fmt.Errorf("failed to unmarshal SloResponseIndicator as IndicatorPropertiesCustomMetric: %s", err.Error()) + return fmt.Errorf("failed to unmarshal SloWithSummaryResponseIndicator as IndicatorPropertiesCustomMetric: %s", err.Error()) } } @@ -217,7 +217,7 @@ func (dst *SloResponseIndicator) UnmarshalJSON(data []byte) error { return nil // data stored in dst.IndicatorPropertiesTimesliceMetric, return on the first match } else { dst.IndicatorPropertiesTimesliceMetric = nil - return fmt.Errorf("failed to unmarshal SloResponseIndicator as IndicatorPropertiesTimesliceMetric: %s", err.Error()) + return fmt.Errorf("failed to unmarshal SloWithSummaryResponseIndicator as IndicatorPropertiesTimesliceMetric: %s", err.Error()) } } @@ -225,7 +225,7 @@ func (dst *SloResponseIndicator) UnmarshalJSON(data []byte) error { } // Marshal data from the first non-nil pointers in the struct to JSON -func (src SloResponseIndicator) MarshalJSON() ([]byte, error) { +func (src SloWithSummaryResponseIndicator) MarshalJSON() ([]byte, error) { if src.IndicatorPropertiesApmAvailability != nil { return json.Marshal(&src.IndicatorPropertiesApmAvailability) } @@ -254,7 +254,7 @@ func (src SloResponseIndicator) MarshalJSON() ([]byte, error) { } // Get the actual instance -func (obj *SloResponseIndicator) GetActualInstance() interface{} { +func (obj *SloWithSummaryResponseIndicator) GetActualInstance() interface{} { if obj == nil { return nil } @@ -286,38 +286,38 @@ func (obj *SloResponseIndicator) GetActualInstance() interface{} { return nil } -type NullableSloResponseIndicator struct { - value *SloResponseIndicator +type NullableSloWithSummaryResponseIndicator struct { + value *SloWithSummaryResponseIndicator isSet bool } -func (v NullableSloResponseIndicator) Get() *SloResponseIndicator { +func (v NullableSloWithSummaryResponseIndicator) Get() *SloWithSummaryResponseIndicator { return v.value } -func (v *NullableSloResponseIndicator) Set(val *SloResponseIndicator) { +func (v *NullableSloWithSummaryResponseIndicator) Set(val *SloWithSummaryResponseIndicator) { v.value = val v.isSet = true } -func (v NullableSloResponseIndicator) IsSet() bool { +func (v NullableSloWithSummaryResponseIndicator) IsSet() bool { return v.isSet } -func (v *NullableSloResponseIndicator) Unset() { +func (v *NullableSloWithSummaryResponseIndicator) Unset() { v.value = nil v.isSet = false } -func NewNullableSloResponseIndicator(val *SloResponseIndicator) *NullableSloResponseIndicator { - return &NullableSloResponseIndicator{value: val, isSet: true} +func NewNullableSloWithSummaryResponseIndicator(val *SloWithSummaryResponseIndicator) *NullableSloWithSummaryResponseIndicator { + return &NullableSloWithSummaryResponseIndicator{value: val, isSet: true} } -func (v NullableSloResponseIndicator) MarshalJSON() ([]byte, error) { +func (v NullableSloWithSummaryResponseIndicator) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } -func (v *NullableSloResponseIndicator) UnmarshalJSON(src []byte) error { +func (v *NullableSloWithSummaryResponseIndicator) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } diff --git a/generated/slo/model_summary.go b/generated/slo/model_summary.go index e04aea289..251539a2e 100644 --- a/generated/slo/model_summary.go +++ b/generated/slo/model_summary.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_summary_status.go b/generated/slo/model_summary_status.go index 4ebe3d0f5..a942168d9 100644 --- a/generated/slo/model_summary_status.go +++ b/generated/slo/model_summary_status.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_time_window.go b/generated/slo/model_time_window.go index e7ca20150..71e713707 100644 --- a/generated/slo/model_time_window.go +++ b/generated/slo/model_time_window.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_timeslice_metric_basic_metric_with_field.go b/generated/slo/model_timeslice_metric_basic_metric_with_field.go index 6f3e23eda..e54d5af2a 100644 --- a/generated/slo/model_timeslice_metric_basic_metric_with_field.go +++ b/generated/slo/model_timeslice_metric_basic_metric_with_field.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_timeslice_metric_doc_count_metric.go b/generated/slo/model_timeslice_metric_doc_count_metric.go index ac35571c3..efcba9abe 100644 --- a/generated/slo/model_timeslice_metric_doc_count_metric.go +++ b/generated/slo/model_timeslice_metric_doc_count_metric.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_timeslice_metric_percentile_metric.go b/generated/slo/model_timeslice_metric_percentile_metric.go index ada902804..0d2844b2c 100644 --- a/generated/slo/model_timeslice_metric_percentile_metric.go +++ b/generated/slo/model_timeslice_metric_percentile_metric.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/model_update_slo_request.go b/generated/slo/model_update_slo_request.go index 242972bca..607c081c8 100644 --- a/generated/slo/model_update_slo_request.go +++ b/generated/slo/model_update_slo_request.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -28,7 +28,7 @@ type UpdateSloRequest struct { BudgetingMethod *BudgetingMethod `json:"budgetingMethod,omitempty"` Objective *Objective `json:"objective,omitempty"` Settings *Settings `json:"settings,omitempty"` - GroupBy *SloResponseGroupBy `json:"groupBy,omitempty"` + GroupBy *GroupBy `json:"groupBy,omitempty"` // List of tags Tags []string `json:"tags,omitempty"` } @@ -275,9 +275,9 @@ func (o *UpdateSloRequest) SetSettings(v Settings) { } // GetGroupBy returns the GroupBy field value if set, zero value otherwise. -func (o *UpdateSloRequest) GetGroupBy() SloResponseGroupBy { +func (o *UpdateSloRequest) GetGroupBy() GroupBy { if o == nil || IsNil(o.GroupBy) { - var ret SloResponseGroupBy + var ret GroupBy return ret } return *o.GroupBy @@ -285,7 +285,7 @@ func (o *UpdateSloRequest) GetGroupBy() SloResponseGroupBy { // GetGroupByOk returns a tuple with the GroupBy field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *UpdateSloRequest) GetGroupByOk() (*SloResponseGroupBy, bool) { +func (o *UpdateSloRequest) GetGroupByOk() (*GroupBy, bool) { if o == nil || IsNil(o.GroupBy) { return nil, false } @@ -301,8 +301,8 @@ func (o *UpdateSloRequest) HasGroupBy() bool { return false } -// SetGroupBy gets a reference to the given SloResponseGroupBy and assigns it to the GroupBy field. -func (o *UpdateSloRequest) SetGroupBy(v SloResponseGroupBy) { +// SetGroupBy gets a reference to the given GroupBy and assigns it to the GroupBy field. +func (o *UpdateSloRequest) SetGroupBy(v GroupBy) { o.GroupBy = &v } diff --git a/generated/slo/response.go b/generated/slo/response.go index 2875928ac..2cb1fb208 100644 --- a/generated/slo/response.go +++ b/generated/slo/response.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/generated/slo/utils.go b/generated/slo/utils.go index 7907b693f..826d18aca 100644 --- a/generated/slo/utils.go +++ b/generated/slo/utils.go @@ -3,7 +3,7 @@ SLOs OpenAPI schema for SLOs endpoints -API version: 1.0 +API version: 1.1 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/internal/kibana/slo.go b/internal/kibana/slo.go index ce8c6bd8c..267c5ed86 100644 --- a/internal/kibana/slo.go +++ b/internal/kibana/slo.go @@ -447,6 +447,11 @@ func getSchema() map[string]*schema.Schema { MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ + "sync_field": { + Type: schema.TypeString, + Optional: true, + Computed: true, + }, "sync_delay": { Type: schema.TypeString, Optional: true, @@ -457,6 +462,11 @@ func getSchema() map[string]*schema.Schema { Optional: true, Computed: true, }, + "prevent_initial_backfill": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, }, }, }, @@ -500,6 +510,14 @@ func getOrNilString(path string, d *schema.ResourceData) *string { return nil } +func getOrNilBool(path string, d *schema.ResourceData) *bool { + if v, ok := d.GetOk(path); ok { + b := v.(bool) + return &b + } + return nil +} + func getOrNilFloat(path string, d *schema.ResourceData) *float64 { if v, ok := d.GetOk(path); ok { f := v.(float64) @@ -650,8 +668,10 @@ func getSloFromResourceData(d *schema.ResourceData) (models.Slo, diag.Diagnostic } settings := slo.Settings{ + SyncField: getOrNilString("settings.0.sync_field", d), SyncDelay: getOrNilString("settings.0.sync_delay", d), Frequency: getOrNilString("settings.0.frequency", d), + PreventInitialBackfill: getOrNilBool("settings.0.prevent_initial_backfill", d), } budgetingMethod := slo.BudgetingMethod(d.Get("budgeting_method").(string)) @@ -904,8 +924,10 @@ func resourceSloRead(ctx context.Context, d *schema.ResourceData, meta interface if err := d.Set("settings", []interface{}{ map[string]interface{}{ + "sync_field": s.Settings.SyncField, "sync_delay": s.Settings.SyncDelay, "frequency": s.Settings.Frequency, + "prevent_initial_backfill": s.Settings.PreventInitialBackfill, }, }); err != nil { return diag.FromErr(err) diff --git a/internal/kibana/slo_test.go b/internal/kibana/slo_test.go index e1523bc7c..b886a241b 100644 --- a/internal/kibana/slo_test.go +++ b/internal/kibana/slo_test.go @@ -56,6 +56,8 @@ func TestAccResourceSlo(t *testing.T) { resource.TestCheckResourceAttr("elasticstack_kibana_slo.test_slo", "objective.0.timeslice_window", "5m"), resource.TestCheckResourceAttr("elasticstack_kibana_slo.test_slo", "settings.0.sync_delay", "1m"), resource.TestCheckResourceAttr("elasticstack_kibana_slo.test_slo", "settings.0.frequency", "1m"), + resource.TestCheckResourceAttr("elasticstack_kibana_slo.test_slo", "settings.0.sync_field", "event.ingested"), + resource.TestCheckResourceAttr("elasticstack_kibana_slo.test_slo", "settings.0.prevent_initial_backfill", "true"), resource.TestCheckResourceAttr("elasticstack_kibana_slo.test_slo", "space_id", "default"), ), }, @@ -75,6 +77,8 @@ func TestAccResourceSlo(t *testing.T) { Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("elasticstack_kibana_slo.test_slo", "settings.0.sync_delay", "5m"), resource.TestCheckResourceAttr("elasticstack_kibana_slo.test_slo", "settings.0.frequency", "5m"), + resource.TestCheckResourceAttr("elasticstack_kibana_slo.test_slo", "settings.0.sync_field", "event.ingested"), + resource.TestCheckResourceAttr("elasticstack_kibana_slo.test_slo", "settings.0.prevent_initial_backfill", "false"), ), }, { @@ -361,6 +365,8 @@ func getSLOConfig(vars sloVars) string { settings { sync_delay = "5m" frequency = "5m" + sync_field = "event.ingested" + prevent_initial_backfill = true } ` } else {