diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 08de08468e7b..f581e14626df 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -30373,6 +30373,76 @@ components: - type - attributes type: object + ELFSourcemapAttributes: + description: Attributes of an ELF symbol file. + properties: + arch: + description: The target CPU architecture. + example: arm64 + type: string + created_at: + description: The timestamp when the symbol file was created. + example: "2024-01-01T00:00:00Z" + format: date-time + type: string + file_hash: + description: The SHA256 hash of the ELF file. + example: abc123def456 + type: string + file_name: + description: The ELF file name. + example: libmyapp.so + type: string + gnu_build_id: + description: The GNU build ID (UUID format). + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + go_build_id: + description: The Go build ID (UUID format). + example: 550e8400-e29b-41d4-a716-446655440001 + type: string + mapkind: + description: The type of source map. + example: elf + type: string + origin: + description: The origin of the ELF file. + example: debian + type: string + origin_version: + description: The version of the origin package. + example: 1.0.0 + type: string + size: + description: The size of the ELF file in bytes. + example: 16384 + format: int64 + type: integer + symbol_source: + description: The source of the debug symbols. + example: debuginfo + type: string + required: + - mapkind + - size + - created_at + type: object + ELFSourcemapData: + description: ELF symbol file data object. + properties: + attributes: + $ref: "#/components/schemas/ELFSourcemapAttributes" + id: + description: The unique identifier of the source map. + example: "6" + type: string + type: + $ref: "#/components/schemas/SourcemapDataType" + required: + - id + - type + - attributes + type: object EPSS: description: Vulnerability EPSS severity. properties: @@ -36352,6 +36422,60 @@ components: format: int64 type: integer type: object + FlutterSourcemapAttributes: + description: Attributes of a Flutter symbol file. + properties: + arch: + description: The target CPU architecture. + example: arm64 + type: string + created_at: + description: The timestamp when the symbol file was created. + example: "2024-01-01T00:00:00Z" + format: date-time + type: string + mapkind: + description: The type of source map. + example: flutter + type: string + service: + description: The service name associated with the symbol file. + example: my-flutter-app + type: string + size: + description: The size of the symbol file in bytes. + example: 8192 + format: int64 + type: integer + variant: + description: The build variant. + example: release + type: string + version: + description: The version of the service associated with the symbol file. + example: 1.0.0 + type: string + required: + - mapkind + - size + - created_at + type: object + FlutterSourcemapData: + description: Flutter symbol file data object. + properties: + attributes: + $ref: "#/components/schemas/FlutterSourcemapAttributes" + id: + description: The unique identifier of the source map. + example: "12" + type: string + type: + $ref: "#/components/schemas/SourcemapDataType" + required: + - id + - type + - attributes + type: object FormTrigger: description: "Trigger a workflow from a Form." properties: @@ -39819,6 +39943,90 @@ components: description: The ID of a notification rule. example: aaa-bbb-ccc type: string + IL2CPPSourcemapAttributes: + description: Attributes of an IL2CPP mapping file. + properties: + build_id: + description: The build identifier (UUID format). + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + created_at: + description: The timestamp when the mapping file was created. + example: "2024-01-01T00:00:00Z" + format: date-time + type: string + mapkind: + description: The type of source map. + example: il2cpp + type: string + size: + description: The size of the mapping file in bytes. + example: 4096 + format: int64 + type: integer + required: + - mapkind + - size + - created_at + type: object + IL2CPPSourcemapData: + description: IL2CPP mapping file data object. + properties: + attributes: + $ref: "#/components/schemas/IL2CPPSourcemapAttributes" + id: + description: The unique identifier of the source map. + example: "8" + type: string + type: + $ref: "#/components/schemas/SourcemapDataType" + required: + - id + - type + - attributes + type: object + IOSSourcemapAttributes: + description: Attributes of an iOS dSYM source map. + properties: + created_at: + description: The timestamp when the source map was created. + example: "2024-01-01T00:00:00Z" + format: date-time + type: string + mapkind: + description: The type of source map. + example: ios + type: string + size: + description: The size of the dSYM file in bytes. + example: 4096 + format: int64 + type: integer + uuids: + description: The UUID(s) associated with the dSYM file. + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + required: + - mapkind + - size + - created_at + type: object + IOSSourcemapData: + description: iOS dSYM source map data object. + properties: + attributes: + $ref: "#/components/schemas/IOSSourcemapAttributes" + id: + description: The unique identifier of the source map. + example: "11" + type: string + type: + $ref: "#/components/schemas/SourcemapDataType" + required: + - id + - type + - attributes + type: object IPAllowlistAttributes: description: Attributes of the IP allowlist. properties: @@ -44793,6 +45001,138 @@ components: required: - errors type: object + JSSourcemapAttributes: + description: Attributes of a JavaScript source map. + properties: + absolute_path: + description: The absolute path to the minified JavaScript file. + example: /js/bundle.min.js + type: string + blob_storage_sourcemap_path: + description: The path to the source map in blob storage. + example: org123/1.0.0/bundle.min.js.map + type: string + build_id: + description: The build identifier. + example: abc123 + type: string + created_at: + description: The timestamp when the source map was created. + example: "2024-01-01T00:00:00Z" + format: date-time + type: string + domain: + description: The domain associated with the source map. + example: example.com + type: string + file_name: + description: The file name of the minified JavaScript file. + example: bundle.min.js + type: string + mapkind: + description: The type of source map. + example: js + type: string + service: + description: The service name associated with the source map. + example: my-web-service + type: string + size: + description: The size of the source map file in bytes. + example: 1024 + format: int64 + type: integer + variant: + description: The source map variant. + example: release + type: string + version: + description: The version of the service associated with the source map. + example: 1.0.0 + type: string + version_code: + description: The version code. + example: "100" + type: string + required: + - mapkind + - size + - created_at + type: object + JSSourcemapData: + description: JavaScript source map data object. + properties: + attributes: + $ref: "#/components/schemas/JSSourcemapAttributes" + id: + description: The unique identifier of the source map. + example: "5" + type: string + type: + $ref: "#/components/schemas/SourcemapDataType" + required: + - id + - type + - attributes + type: object + JVMSourcemapAttributes: + description: Attributes of a JVM mapping file. + properties: + build_id: + description: The build identifier (UUID format). + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + created_at: + description: The timestamp when the mapping file was created. + example: "2024-01-01T00:00:00Z" + format: date-time + type: string + mapkind: + description: The type of source map. + example: jvm + type: string + service: + description: The service name associated with the mapping file. + example: my-android-app + type: string + size: + description: The size of the mapping file in bytes. + example: 512 + format: int64 + type: integer + variant: + description: The build variant (e.g., `release`, `debug`). + example: release + type: string + version: + description: The version of the service associated with the mapping file. + example: 1.0.0 + type: string + version_code: + description: The version code. + example: "100" + type: string + required: + - mapkind + - size + - created_at + type: object + JVMSourcemapData: + description: JVM (ProGuard/R8) mapping file data object. + properties: + attributes: + $ref: "#/components/schemas/JVMSourcemapAttributes" + id: + description: The unique identifier of the source map. + example: "9" + type: string + type: + $ref: "#/components/schemas/SourcemapDataType" + required: + - id + - type + - attributes + type: object JiraAccountAttributes: description: Attributes of a Jira account properties: @@ -47704,18 +48044,34 @@ components: description: Name of the experiment. example: "My Experiment v1" type: string + parent_experiment_id: + description: Identifier of the parent (baseline) experiment this experiment is run against. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string project_id: description: Identifier of the project this experiment belongs to. example: "a33671aa-24fd-4dcd-9b33-a8ec7dde7751" type: string + run_count: + description: Number of runs configured for this experiment. + format: int32 + maximum: 2147483647 + type: integer required: - project_id - - dataset_id - name type: object LLMObsExperimentDataAttributesResponse: description: Attributes of an LLM Observability experiment. properties: + aggregate_data: + additionalProperties: {} + description: >- + Pre-computed aggregate metrics for this experiment run, including eval score distributions, token costs, and error rates. + nullable: true + type: object + author: + $ref: "#/components/schemas/LLMObsExperimentUser" config: additionalProperties: {} description: Configuration parameters for the experiment. @@ -47730,11 +48086,34 @@ components: description: Identifier of the dataset used in this experiment. example: "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d" type: string + dataset_name: + description: |- + Name of the dataset used in this experiment. + Only present when `include[dataset_names]` is `true`. + nullable: true + type: string + dataset_version: + description: Version of the dataset used in this experiment. + format: int64 + type: integer + deleted_at: + description: Timestamp when the experiment was soft-deleted, if applicable. + format: date-time + nullable: true + type: string description: description: Description of the experiment. example: "" nullable: true type: string + error: + description: Error message describing why the experiment failed, if applicable. + nullable: true + type: string + experiment: + description: Logical name of the experiment, shared across all runs of the same pipeline. + example: "my-pipeline" + type: string metadata: additionalProperties: {} description: Arbitrary metadata associated with the experiment. @@ -47744,10 +48123,22 @@ components: description: Name of the experiment. example: "My Experiment v1" type: string + parent_experiment_id: + description: Identifier of the parent (baseline) experiment this experiment was run against, if any. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + nullable: true + type: string project_id: description: Identifier of the project this experiment belongs to. example: "a33671aa-24fd-4dcd-9b33-a8ec7dde7751" type: string + run_count: + description: Expected number of runs for this experiment. + format: int32 + maximum: 2147483647 + type: integer + status: + $ref: "#/components/schemas/LLMObsExperimentStatus" updated_at: description: Timestamp when the experiment was last updated. example: "2024-01-15T10:30:00Z" @@ -48102,6 +48493,22 @@ components: - duration - status type: object + LLMObsExperimentSpanDataResponse: + description: JSON:API data item wrapping a single experiment span with evaluations. + properties: + attributes: + $ref: "#/components/schemas/LLMObsExperimentSpanWithEvals" + id: + description: Unique identifier of the span. + example: "00000000-0000-0000-0000-000000000001" + type: string + type: + $ref: "#/components/schemas/LLMObsExperimentSpanType" + required: + - id + - type + - attributes + type: object LLMObsExperimentSpanError: description: Error details for an experiment span. properties: @@ -48142,6 +48549,14 @@ components: x-enum-varnames: - OK - ERROR + LLMObsExperimentSpanType: + description: Resource type for a span item in an experiment spans response. + enum: + - experiments + example: experiments + type: string + x-enum-varnames: + - EXPERIMENTS_SPAN LLMObsExperimentSpanWithEvals: description: An experiment span enriched with its associated evaluation metrics. properties: @@ -48199,6 +48614,32 @@ components: example: "abc123def456" type: string type: object + LLMObsExperimentSpansResponse: + description: >- + Response for listing experiment spans (v1). Returns only spans with their evaluation metrics. No summary metrics or pagination are included. Deprecated in favor of `ListLLMObsExperimentEventsV3`. + properties: + data: + description: List of experiment spans with their evaluation metrics. + items: + $ref: "#/components/schemas/LLMObsExperimentSpanDataResponse" + type: array + required: + - data + type: object + LLMObsExperimentStatus: + description: Execution status of an LLM Observability experiment. + enum: + - running + - completed + - failed + - interrupted + example: completed + type: string + x-enum-varnames: + - RUNNING + - COMPLETED + - FAILED + - INTERRUPTED LLMObsExperimentType: description: Resource type of an LLM Observability experiment. enum: @@ -48210,12 +48651,25 @@ components: LLMObsExperimentUpdateDataAttributesRequest: description: Attributes for updating an LLM Observability experiment. properties: + dataset_id: + description: Updated identifier of the dataset used in this experiment. + example: "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d" + type: string description: description: Updated description of the experiment. type: string + error: + description: Error message describing why the experiment failed, if applicable. + type: string + metadata: + additionalProperties: {} + description: Updated arbitrary metadata associated with the experiment. + type: object name: description: Updated name of the experiment. type: string + status: + $ref: "#/components/schemas/LLMObsExperimentStatus" type: object LLMObsExperimentUpdateDataRequest: description: Data object for updating an LLM Observability experiment. @@ -48236,6 +48690,30 @@ components: required: - data type: object + LLMObsExperimentUser: + description: User data for the author of an experiment. Only present when `include[user_data]` is `true`. + properties: + email: + description: Email address of the user. + example: "jane.doe@example.com" + type: string + handle: + description: Username or handle associated with the user's Datadog account. + example: "jane.doe@example.com" + type: string + icon: + description: URL of the user's icon. + example: "https://example.com/icon.png" + type: string + id: + description: Unique identifier of the user. + example: "00000000-0000-0000-0000-000000000010" + type: string + name: + description: Display name of the user. + example: "Jane Doe" + type: string + type: object LLMObsExperimentationAnalyticsAggregate: description: Analytics aggregation parameters. properties: @@ -51415,6 +51893,16 @@ components: meta: $ref: "#/components/schemas/ServiceAccessTokenResponseMeta" type: object + ListSourcemapsResponse: + description: Response containing a paginated list of source maps. + properties: + data: + $ref: "#/components/schemas/SourcemapsData" + meta: + $ref: "#/components/schemas/SourcemapsListMeta" + required: + - data + type: object ListTagsResponse: description: List tags response. properties: @@ -56819,6 +57307,56 @@ components: - type - id type: object + NDKSourcemapAttributes: + description: Attributes of an Android NDK symbol file. + properties: + arch: + description: The target CPU architecture. + example: arm64-v8a + type: string + build_id: + description: The build identifier (UUID format). + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + created_at: + description: The timestamp when the symbol file was created. + example: "2024-01-01T00:00:00Z" + format: date-time + type: string + file_name: + description: The NDK library file name. + example: libmyapp.so + type: string + mapkind: + description: The type of source map. + example: ndk + type: string + size: + description: The size of the symbol file in bytes. + example: 32768 + format: int64 + type: integer + required: + - mapkind + - size + - created_at + type: object + NDKSourcemapData: + description: Android NDK symbol file data object. + properties: + attributes: + $ref: "#/components/schemas/NDKSourcemapAttributes" + id: + description: The unique identifier of the source map. + example: "7" + type: string + type: + $ref: "#/components/schemas/SourcemapDataType" + required: + - id + - type + - attributes + type: object NodeType: additionalProperties: {} description: A tree-sitter node type definition for a given language, describing the node's structure, subtypes, and fields. @@ -69828,6 +70366,72 @@ components: - value - unit type: object + ReactNativeSourcemapAttributes: + description: Attributes of a React Native source map. + properties: + build_number: + description: The build number. + example: "100" + type: string + bundle_name: + description: The bundle name. + example: com.example.app + type: string + bundle_version: + description: The bundle version. + example: "1.0" + type: string + created_at: + description: The timestamp when the source map was created. + example: "2024-01-01T00:00:00Z" + format: date-time + type: string + debug_id: + description: The debug identifier (UUID format). + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + mapkind: + description: The type of source map. + example: react + type: string + platform: + description: The platform the source map was built for (e.g., `ios`, `android`). + example: ios + type: string + service: + description: The service name associated with the source map. + example: my-react-native-app + type: string + size: + description: The size of the source map file in bytes. + example: 2048 + format: int64 + type: integer + version: + description: The version of the service associated with the source map. + example: 1.0.0 + type: string + required: + - mapkind + - size + - created_at + type: object + ReactNativeSourcemapData: + description: React Native source map data object. + properties: + attributes: + $ref: "#/components/schemas/ReactNativeSourcemapAttributes" + id: + description: The unique identifier of the source map. + example: "10" + type: string + type: + $ref: "#/components/schemas/SourcemapDataType" + required: + - id + - type + - attributes + type: object ReadinessGate: description: Used to merge multiple branches into a single branch. properties: @@ -84121,6 +84725,104 @@ components: required: - data type: object + ServiceRepositoryInfoDataType: + description: The resource type for service repository info objects. + enum: + - service_repository_info + example: service_repository_info + type: string + x-enum-varnames: + - SERVICE_REPOSITORY_INFO + ServiceRepositoryInfoRequest: + description: Request body for retrieving service repository information. + properties: + data: + $ref: "#/components/schemas/ServiceRepositoryInfoRequestData" + required: + - data + type: object + ServiceRepositoryInfoRequestAttributes: + description: Attributes for the service repository info request. + properties: + service: + description: The name of the service. + example: my-web-service + type: string + version: + description: The version of the service. + example: 1.0.0 + type: string + required: + - service + - version + type: object + ServiceRepositoryInfoRequestData: + description: Data object for the service repository info request. + properties: + attributes: + $ref: "#/components/schemas/ServiceRepositoryInfoRequestAttributes" + type: + $ref: "#/components/schemas/ServiceRepositoryInfoDataType" + required: + - type + - attributes + type: object + ServiceRepositoryInfoResponse: + description: Response containing service repository information. + properties: + data: + $ref: "#/components/schemas/ServiceRepositoryInfoResponseData" + required: + - data + type: object + ServiceRepositoryInfoResponseAttributes: + description: Attributes of the service repository information. + properties: + commit_sha: + description: The SHA of the commit associated with the service version. + example: abc123def456789 + type: string + repository_url: + description: The URL of the source code repository. + example: https://github.com/my-org/my-repo + type: string + status: + $ref: "#/components/schemas/ServiceRepositoryInfoStatus" + required: + - status + type: object + ServiceRepositoryInfoResponseData: + description: Data object for the service repository info response. + properties: + attributes: + $ref: "#/components/schemas/ServiceRepositoryInfoResponseAttributes" + id: + description: The identifier composed of the service name and version. + example: my-web-service:1.0.0 + type: string + type: + $ref: "#/components/schemas/ServiceRepositoryInfoDataType" + required: + - id + - type + - attributes + type: object + ServiceRepositoryInfoStatus: + description: The status of the service repository info lookup. + enum: + - success + - not_found + - no_repository + - internal_error + - unknown + example: success + type: string + x-enum-varnames: + - SUCCESS + - NOT_FOUND + - NO_REPOSITORY + - INTERNAL_ERROR + - UNKNOWN SessionIdArray: description: A collection of session identifiers used for bulk add or remove operations on a playlist. properties: @@ -85124,6 +85826,179 @@ components: x-enum-varnames: - DESC - ASC + SourcemapDataType: + description: The resource type for source map objects. + enum: + - sourcemaps + example: sourcemaps + type: string + x-enum-varnames: + - SOURCEMAPS + SourcemapFileAttributes: + description: Attributes of a JavaScript source map file. + properties: + file: + description: The name of the minified JavaScript file. + example: bundle.js + type: string + mappings: + description: |- + The Base64 VLQ encoded string that maps positions in the minified + file to positions in the original source files. + example: AAAA,OAAO,CAAC,GAAG + type: string + minifiedLineLengths: + description: List of character counts for each line in the minified file. + example: + - 50 + - 30 + items: + type: integer + type: array + names: + description: List of symbol names referenced in the mappings. + example: + - console + - log + items: {} + type: array + sourceRoot: + description: The root path prepended to source file paths. + example: / + type: string + sources: + description: List of original source file paths. + example: + - src/index.js + - src/utils.js + items: + type: string + type: array + sourcesContent: + description: List of original source file contents corresponding to the paths in `sources`. + example: + - "console.log('index');" + - "export function util() {}" + items: + type: string + type: array + version: + description: The version of the source map format (typically 3). + example: 3 + format: int64 + type: integer + required: + - file + - version + - sourceRoot + - sources + - sourcesContent + - names + - mappings + - minifiedLineLengths + type: object + SourcemapFileData: + description: JavaScript source map file data object. + properties: + attributes: + $ref: "#/components/schemas/SourcemapFileAttributes" + id: + description: The unique identifier of the source map file, typically the path to the file. + example: path/to/sourcemap.js.map + type: string + type: + $ref: "#/components/schemas/SourcemapFileDataType" + required: + - id + - type + - attributes + type: object + SourcemapFileDataType: + description: The resource type for source map file objects. + enum: + - sourcemap_files + example: sourcemap_files + type: string + x-enum-varnames: + - SOURCEMAP_FILES + SourcemapFileResponse: + description: Response containing a JavaScript source map file. + properties: + data: + $ref: "#/components/schemas/SourcemapFileData" + required: + - data + type: object + SourcemapItem: + description: A source map data object representing one of the supported map kinds. + oneOf: + - $ref: "#/components/schemas/JSSourcemapData" + - $ref: "#/components/schemas/ReactNativeSourcemapData" + - $ref: "#/components/schemas/IOSSourcemapData" + - $ref: "#/components/schemas/JVMSourcemapData" + - $ref: "#/components/schemas/FlutterSourcemapData" + - $ref: "#/components/schemas/ELFSourcemapData" + - $ref: "#/components/schemas/NDKSourcemapData" + - $ref: "#/components/schemas/IL2CPPSourcemapData" + SourcemapMapKind: + description: The type of source map. + enum: + - js + - jvm + - ios + - react + - flutter + - elf + - ndk + - il2cpp + example: js + type: string + x-enum-varnames: + - JS + - JVM + - IOS + - REACT + - FLUTTER + - ELF + - NDK + - IL2CPP + SourcemapsData: + description: List of source map data objects. + items: + $ref: "#/components/schemas/SourcemapItem" + type: array + SourcemapsListMeta: + description: Pagination metadata for the source maps list response. + properties: + page: + $ref: "#/components/schemas/SourcemapsListMetaPage" + required: + - page + type: object + SourcemapsListMetaPage: + description: Page information for the source maps list response. + properties: + has_more_results: + description: Whether there are more results available beyond the current page. + example: false + type: boolean + total_filtered_count: + description: Total number of source maps matching the filter criteria. + example: 100 + format: int64 + type: integer + required: + - total_filtered_count + - has_more_results + type: object + SourcemapsResponse: + description: Response containing a list of affected source maps. + properties: + data: + $ref: "#/components/schemas/SourcemapsData" + required: + - data + type: object Span: description: Object description of a spans after being processed and stored by Datadog. properties: @@ -132925,16 +133800,59 @@ paths: name: filter[id] schema: type: string - - description: Use the Pagination cursor to retrieve the next page of results. + - description: Filter experiments by their exact run name. + in: query + name: filter[name] + schema: + type: string + - description: >- + Filter by logical experiment name. This is the `name` field set when creating an experiment through `POST /experiments`. Returns all experiment runs that share the same name, enabling cross-commit and cross-branch comparisons. + in: query + name: filter[experiment] + schema: + type: string + - description: |- + Filter by JSONB metadata containment. Provide a JSON object string where + experiments whose metadata contains all specified key-value pairs are returned. + For example: `{"commit":"abc123","branch":"main"}`. + in: query + name: filter[metadata] + schema: + type: string + - description: >- + Filter experiments by the ID of their parent (baseline) experiment. Returns all experiments that were run against the given baseline. Can be specified multiple times. + in: query + name: filter[parent_experiment_id] + schema: + type: string + - description: When `true`, return only soft-deleted experiments. Defaults to `false`. + in: query + name: filter[is_deleted] + schema: + type: boolean + - description: When `true`, enrich each experiment with its author's user data in the `author` field. + in: query + name: include[user_data] + schema: + type: boolean + - description: When `true`, enrich each experiment with its dataset name in the `dataset_name` field. + in: query + name: include[dataset_names] + schema: + type: boolean + - description: Use the pagination cursor returned in `meta.after` to retrieve the next page of results. in: query name: page[cursor] schema: type: string - - description: Maximum number of results to return per page. + - description: |- + Maximum number of results to return per page. Values above 5000 are clamped + to 5000. Defaults to 5000. in: query name: page[limit] schema: format: int64 + maximum: 5000 type: integer responses: "200": @@ -133205,42 +134123,112 @@ paths: **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/llm-obs/v1/experiments/{experiment_id}/events: - post: - description: Push spans and metrics for an LLM Observability experiment. - operationId: CreateLLMObsExperimentEvents + get: + deprecated: true + description: >- + Retrieve spans with their evaluation metrics for a given experiment. Returns spans only, with no summary metrics and no pagination. Deprecated in favor of `ListLLMObsExperimentEventsV3`. + operationId: ListLLMObsExperimentEventsV1 parameters: - $ref: "#/components/parameters/LLMObsExperimentIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - metrics: - - assessment: pass - label: faithfulness - metric_type: score - span_id: span-7a1b2c3d - timestamp_ms: 1705314600000 - spans: - - dataset_id: 9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d - duration: 1500000000 + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + duration: 1500000000.0 + eval_metrics: [] name: llm_call - project_id: a33671aa-24fd-4dcd-9b33-a8ec7dde7751 span_id: span-7a1b2c3d start_ns: 1705314600000000000 status: ok + tags: [] trace_id: abc123def456 - type: events - schema: - $ref: "#/components/schemas/LLMObsExperimentEventsRequest" - description: Experiment events payload. - required: true - responses: - "202": - description: Accepted + id: 00000000-0000-0000-0000-000000000001 + type: experiments + schema: + $ref: "#/components/schemas/LLMObsExperimentSpansResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List LLM Observability experiment spans (v1) + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Push spans and metrics for an LLM Observability experiment. + operationId: CreateLLMObsExperimentEvents + parameters: + - $ref: "#/components/parameters/LLMObsExperimentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + metrics: + - assessment: pass + label: faithfulness + metric_type: score + span_id: span-7a1b2c3d + timestamp_ms: 1705314600000 + spans: + - dataset_id: 9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d + duration: 1500000000 + name: llm_call + project_id: a33671aa-24fd-4dcd-9b33-a8ec7dde7751 + span_id: span-7a1b2c3d + start_ns: 1705314600000000000 + status: ok + trace_id: abc123def456 + type: events + schema: + $ref: "#/components/schemas/LLMObsExperimentEventsRequest" + description: Experiment events payload. + required: true + responses: + "202": + description: Accepted "400": content: application/json: @@ -135290,6 +136278,80 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/llm-obs/v2/experiments/{experiment_id}/events: + get: + deprecated: true + description: >- + Retrieve spans and experiment-level summary metrics for a given experiment. Returns the full events payload without pagination. Deprecated: use `ListLLMObsExperimentEventsV3` instead. + operationId: ListLLMObsExperimentEventsV2 + parameters: + - $ref: "#/components/parameters/LLMObsExperimentIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + spans: + - duration: 1500000000.0 + eval_metrics: [] + id: 00000000-0000-0000-0000-000000000002 + name: llm_call + span_id: span-7a1b2c3d + start_ns: 1705314600000000000 + status: ok + tags: [] + trace_id: abc123def456 + summary_metrics: [] + id: 00000000-0000-0000-0000-000000000001 + type: experiment_events + schema: + $ref: "#/components/schemas/LLMObsExperimentEventsV2Response" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List LLM Observability experiment events (v2) + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/llm-obs/v2/{project_id}/datasets/{dataset_id}/records/upload: post: description: |- @@ -164051,6 +165113,839 @@ paths: x-unstable: |- **Note**: This endpoint is in public beta and it's subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/sourcemaps: + delete: + description: |- + Deletes source maps matching the specified filter criteria. Supports + dry-run mode to preview which source maps would be deleted without + performing the actual deletion. + operationId: DeleteSourcemaps + parameters: + - description: |- + The type of source map. Valid values are `js`, `jvm`, `ios`, + `react`, `flutter`, `elf`, `ndk`, `il2cpp`. + in: query + name: mapkind + required: true + schema: + $ref: "#/components/schemas/SourcemapMapKind" + - description: |- + When set to `true`, returns the source maps that would be deleted + without performing the actual deletion. When set to `false`, + performs the deletion. + in: query + name: dry_run + required: true + schema: + example: true + type: boolean + - description: |- + Filter by service names (multiple values allowed). Required for + `js`, `jvm`, `react`, and `flutter` map kinds. + explode: true + in: query + name: filter[service] + schema: + example: + - my-web-service + items: + type: string + type: array + style: form + - description: |- + Filter by version values (multiple values allowed, maximum 10). + Required for `js`, `jvm`, `react`, and `flutter` map kinds. + explode: true + in: query + name: filter[version] + schema: + example: + - 1.0.0 + items: + type: string + type: array + style: form + - description: Filter by variant values (multiple values allowed). Supported for `jvm`. + explode: true + in: query + name: filter[variant] + schema: + items: + type: string + type: array + style: form + - description: Filter by source map ID values (multiple values allowed). Supported for all map kinds. + explode: true + in: query + name: filter[id] + schema: + items: + type: string + type: array + style: form + - description: Filter by build ID values (multiple values allowed). Supported for `jvm`, `ndk`, and `il2cpp`. + explode: true + in: query + name: filter[build_id] + schema: + items: + type: string + type: array + style: form + - description: Filter by UUID values (multiple values allowed). Supported for `ios`. + explode: true + in: query + name: filter[uuid] + schema: + items: + type: string + type: array + style: form + - description: Filter by platform values (multiple values allowed). Supported for `react`. + explode: true + in: query + name: filter[platform] + schema: + items: + type: string + type: array + style: form + - description: Filter by build number values (multiple values allowed). Supported for `react`. + explode: true + in: query + name: filter[build_number] + schema: + items: + type: string + type: array + style: form + - description: Filter by bundle name values (multiple values allowed). Supported for `react`. + explode: true + in: query + name: filter[bundle_name] + schema: + items: + type: string + type: array + style: form + - description: |- + Filter by architecture values (multiple values allowed). Supported + for `flutter`, `elf`, and `ndk`. + explode: true + in: query + name: filter[arch] + schema: + items: + type: string + type: array + style: form + - description: Filter by symbol source values (multiple values allowed). Supported for `elf`. + explode: true + in: query + name: filter[symbol_source] + schema: + items: + type: string + type: array + style: form + - description: Filter by origin values (multiple values allowed). Supported for `elf`. + explode: true + in: query + name: filter[origin] + schema: + items: + type: string + type: array + style: form + - description: Filter by origin version values (multiple values allowed). Supported for `elf`. + explode: true + in: query + name: filter[origin_version] + schema: + items: + type: string + type: array + style: form + - description: Filter by filename (single value). Supported for `js`, `elf`, and `ndk`. + in: query + name: filter[filename] + schema: + type: string + - description: Filter by debug ID (single value). Supported for `react`. + in: query + name: filter[debug_id] + schema: + type: string + - description: Filter by GNU build ID (single value). Supported for `elf`. + in: query + name: filter[gnu_build_id] + schema: + type: string + - description: Filter by Go build ID (single value). Supported for `elf`. + in: query + name: filter[go_build_id] + schema: + type: string + - description: Filter by file hash (single value). Supported for `elf`. + in: query + name: filter[file_hash] + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + absolute_path: /js/bundle.min.js + created_at: "2024-01-01T00:00:00Z" + mapkind: js + service: my-web-service + size: 1024 + version: 1.0.0 + id: "5" + type: sourcemaps + schema: + $ref: "#/components/schemas/SourcemapsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: Delete source maps + tags: + - RUM + x-permission: + operator: OR + permissions: + - rum_delete_data + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: |- + Retrieves the content of a specific JavaScript source map file by its + filename, service name, and version. + operationId: GetSourcemaps + parameters: + - description: The path to the source map file. + in: query + name: filename + required: true + schema: + example: js/bundle.min.js.map + type: string + - description: The service name associated with the source map. + in: query + name: service + required: true + schema: + example: my-web-service + type: string + - description: The version of the service associated with the source map. + in: query + name: version + required: true + schema: + example: 1.0.0 + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + file: bundle.js + mappings: AAAA,OAAO,CAAC,GAAG + minifiedLineLengths: + - 50 + - 30 + names: + - console + - log + sourceRoot: / + sources: + - src/index.js + - src/utils.js + sourcesContent: + - "console.log('index');" + - "export function util() {}" + version: 3 + id: path/to/sourcemap.js.map + type: sourcemap_files + schema: + $ref: "#/components/schemas/SourcemapFileResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: Get a JavaScript source map + tags: + - RUM + x-permission: + operator: OR + permissions: + - rum_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/sourcemaps/list: + get: + description: Retrieves a paginated list of source maps matching the specified filter criteria. + operationId: ListSourcemaps + parameters: + - description: The type of source map. Defaults to `js`. + in: query + name: mapkind + schema: + $ref: "#/components/schemas/SourcemapMapKind" + - description: The number of results to return per page. Must be at least 1. + in: query + name: page[size] + schema: + default: 20 + example: 20 + type: integer + - description: The page number to retrieve, starting from 1. + in: query + name: page[number] + schema: + default: 1 + example: 1 + type: integer + - description: |- + Filter by service names (multiple values allowed). Required for + `js`, `jvm`, `react`, and `flutter` map kinds. + explode: true + in: query + name: filter[service] + schema: + example: + - my-web-service + items: + type: string + type: array + style: form + - description: |- + Filter by version values (multiple values allowed). Required for + `js`, `jvm`, `react`, and `flutter` map kinds. + explode: true + in: query + name: filter[version] + schema: + example: + - 1.0.0 + items: + type: string + type: array + style: form + - description: Filter by variant values (multiple values allowed). Supported for `jvm`. + explode: true + in: query + name: filter[variant] + schema: + items: + type: string + type: array + style: form + - description: Filter by source map ID values (multiple values allowed). Supported for all map kinds. + explode: true + in: query + name: filter[id] + schema: + items: + type: string + type: array + style: form + - description: Filter by build ID values (multiple values allowed). Supported for `jvm`, `ndk`, and `il2cpp`. + explode: true + in: query + name: filter[build_id] + schema: + items: + type: string + type: array + style: form + - description: Filter by UUID values (multiple values allowed). Supported for `ios`. + explode: true + in: query + name: filter[uuid] + schema: + items: + type: string + type: array + style: form + - description: Filter by platform values (multiple values allowed). Supported for `react`. + explode: true + in: query + name: filter[platform] + schema: + items: + type: string + type: array + style: form + - description: Filter by build number values (multiple values allowed). Supported for `react`. + explode: true + in: query + name: filter[build_number] + schema: + items: + type: string + type: array + style: form + - description: Filter by bundle name values (multiple values allowed). Supported for `react`. + explode: true + in: query + name: filter[bundle_name] + schema: + items: + type: string + type: array + style: form + - description: |- + Filter by architecture values (multiple values allowed). Supported + for `flutter`, `elf`, and `ndk`. + explode: true + in: query + name: filter[arch] + schema: + items: + type: string + type: array + style: form + - description: Filter by symbol source values (multiple values allowed). Supported for `elf`. + explode: true + in: query + name: filter[symbol_source] + schema: + items: + type: string + type: array + style: form + - description: Filter by origin values (multiple values allowed). Supported for `elf`. + explode: true + in: query + name: filter[origin] + schema: + items: + type: string + type: array + style: form + - description: Filter by origin version values (multiple values allowed). Supported for `elf`. + explode: true + in: query + name: filter[origin_version] + schema: + items: + type: string + type: array + style: form + - description: Filter by filename (single value). Supported for `js`, `elf`, and `ndk`. + in: query + name: filter[filename] + schema: + type: string + - description: Filter by debug ID (single value). Supported for `react`. + in: query + name: filter[debug_id] + schema: + type: string + - description: Filter by GNU build ID (single value). Supported for `elf`. + in: query + name: filter[gnu_build_id] + schema: + type: string + - description: Filter by Go build ID (single value). Supported for `elf`. + in: query + name: filter[go_build_id] + schema: + type: string + - description: Filter by file hash (single value). Supported for `elf`. + in: query + name: filter[file_hash] + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + absolute_path: /js/bundle.min.js + created_at: "2024-01-01T00:00:00Z" + mapkind: js + service: my-web-service + size: 1024 + version: 1.0.0 + id: "5" + type: sourcemaps + meta: + page: + has_more_results: false + total_filtered_count: 1 + schema: + $ref: "#/components/schemas/ListSourcemapsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "413": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Request Entity Too Large + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: List source maps + tags: + - RUM + x-permission: + operator: OR + permissions: + - rum_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/sourcemaps/restore: + patch: + description: |- + Restores previously deleted source maps matching the specified filter + criteria. Supports dry-run mode to preview which source maps would be + restored without performing the actual restoration. + operationId: RestoreSourcemaps + parameters: + - description: |- + The type of source map. Valid values are `js`, `jvm`, `ios`, + `react`, `flutter`, `elf`, `ndk`, `il2cpp`. + in: query + name: mapkind + required: true + schema: + $ref: "#/components/schemas/SourcemapMapKind" + - description: |- + When set to `true`, returns the source maps that would be restored + without performing the actual restoration. When set to `false`, + performs the restoration. + in: query + name: dry_run + required: true + schema: + example: true + type: boolean + - description: |- + Filter by service names (multiple values allowed). Required for + `js`, `jvm`, `react`, and `flutter` map kinds. + explode: true + in: query + name: filter[service] + schema: + example: + - my-web-service + items: + type: string + type: array + style: form + - description: |- + Filter by version values (multiple values allowed, maximum 10). + Required for `js`, `jvm`, `react`, and `flutter` map kinds. + explode: true + in: query + name: filter[version] + schema: + example: + - 1.0.0 + items: + type: string + type: array + style: form + - description: Filter by variant values (multiple values allowed). Supported for `jvm`. + explode: true + in: query + name: filter[variant] + schema: + items: + type: string + type: array + style: form + - description: Filter by source map ID values (multiple values allowed). Supported for all map kinds. + explode: true + in: query + name: filter[id] + schema: + items: + type: string + type: array + style: form + - description: Filter by build ID values (multiple values allowed). Supported for `jvm`, `ndk`, and `il2cpp`. + explode: true + in: query + name: filter[build_id] + schema: + items: + type: string + type: array + style: form + - description: Filter by UUID values (multiple values allowed). Supported for `ios`. + explode: true + in: query + name: filter[uuid] + schema: + items: + type: string + type: array + style: form + - description: Filter by platform values (multiple values allowed). Supported for `react`. + explode: true + in: query + name: filter[platform] + schema: + items: + type: string + type: array + style: form + - description: Filter by build number values (multiple values allowed). Supported for `react`. + explode: true + in: query + name: filter[build_number] + schema: + items: + type: string + type: array + style: form + - description: Filter by bundle name values (multiple values allowed). Supported for `react`. + explode: true + in: query + name: filter[bundle_name] + schema: + items: + type: string + type: array + style: form + - description: |- + Filter by architecture values (multiple values allowed). Supported + for `flutter`, `elf`, and `ndk`. + explode: true + in: query + name: filter[arch] + schema: + items: + type: string + type: array + style: form + - description: Filter by symbol source values (multiple values allowed). Supported for `elf`. + explode: true + in: query + name: filter[symbol_source] + schema: + items: + type: string + type: array + style: form + - description: Filter by origin values (multiple values allowed). Supported for `elf`. + explode: true + in: query + name: filter[origin] + schema: + items: + type: string + type: array + style: form + - description: Filter by origin version values (multiple values allowed). Supported for `elf`. + explode: true + in: query + name: filter[origin_version] + schema: + items: + type: string + type: array + style: form + - description: Filter by filename (single value). Supported for `js`, `elf`, and `ndk`. + in: query + name: filter[filename] + schema: + type: string + - description: Filter by debug ID (single value). Supported for `react`. + in: query + name: filter[debug_id] + schema: + type: string + - description: Filter by GNU build ID (single value). Supported for `elf`. + in: query + name: filter[gnu_build_id] + schema: + type: string + - description: Filter by Go build ID (single value). Supported for `elf`. + in: query + name: filter[go_build_id] + schema: + type: string + - description: Filter by file hash (single value). Supported for `elf`. + in: query + name: filter[file_hash] + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + absolute_path: /js/bundle.min.js + created_at: "2024-01-01T00:00:00Z" + mapkind: js + service: my-web-service + size: 1024 + version: 1.0.0 + id: "5" + type: sourcemaps + schema: + $ref: "#/components/schemas/SourcemapsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: Restore source maps + tags: + - RUM + x-permission: + operator: OR + permissions: + - rum_delete_data + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/sourcemaps/service_repository_info: + post: + description: Returns the repository URL and commit SHA associated with a given service and version. + operationId: GetServiceRepositoryInfo + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + service: my-web-service + version: 1.0.0 + type: service_repository_info + schema: + $ref: "#/components/schemas/ServiceRepositoryInfoRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + commit_sha: abc123def456789 + repository_url: https://github.com/my-org/my-repo + status: success + id: my-web-service:1.0.0 + type: service_repository_info + schema: + $ref: "#/components/schemas/ServiceRepositoryInfoResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: Get service repository information + tags: + - RUM + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - rum_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/spa/recommendations/{service}: get: description: This endpoint is currently experimental and restricted to Datadog internal use only. Retrieve resource recommendations for a Spark job. The caller (Spark Gateway or DJM UI) provides a service name and SPA returns structured recommendations for driver and executor resources. The version with a shard should be preferred, where possible, as it gives more accurate results. diff --git a/examples/v2/llm-observability/CreateLLMObsExperiment.rb b/examples/v2/llm-observability/CreateLLMObsExperiment.rb index d2bdfa15d6d4..49e7eab5a6fa 100644 --- a/examples/v2/llm-observability/CreateLLMObsExperiment.rb +++ b/examples/v2/llm-observability/CreateLLMObsExperiment.rb @@ -11,6 +11,7 @@ attributes: DatadogAPIClient::V2::LLMObsExperimentDataAttributesRequest.new({ dataset_id: "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", name: "My Experiment v1", + parent_experiment_id: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012", project_id: "a33671aa-24fd-4dcd-9b33-a8ec7dde7751", }), type: DatadogAPIClient::V2::LLMObsExperimentType::EXPERIMENTS, diff --git a/examples/v2/llm-observability/ListLLMObsExperimentEventsV1.rb b/examples/v2/llm-observability/ListLLMObsExperimentEventsV1.rb new file mode 100644 index 000000000000..879b89f02735 --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsExperimentEventsV1.rb @@ -0,0 +1,8 @@ +# List LLM Observability experiment spans (v1) returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_llm_obs_experiment_events_v1".to_sym] = true +end +api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new +p api_instance.list_llm_obs_experiment_events_v1("experiment_id") diff --git a/examples/v2/llm-observability/ListLLMObsExperimentEventsV2.rb b/examples/v2/llm-observability/ListLLMObsExperimentEventsV2.rb new file mode 100644 index 000000000000..025e23853b7d --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsExperimentEventsV2.rb @@ -0,0 +1,8 @@ +# List LLM Observability experiment events (v2) returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_llm_obs_experiment_events_v2".to_sym] = true +end +api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new +p api_instance.list_llm_obs_experiment_events_v2("experiment_id") diff --git a/examples/v2/llm-observability/UpdateLLMObsExperiment.rb b/examples/v2/llm-observability/UpdateLLMObsExperiment.rb index ddfbd759c679..6ca2de0640ae 100644 --- a/examples/v2/llm-observability/UpdateLLMObsExperiment.rb +++ b/examples/v2/llm-observability/UpdateLLMObsExperiment.rb @@ -8,7 +8,10 @@ body = DatadogAPIClient::V2::LLMObsExperimentUpdateRequest.new({ data: DatadogAPIClient::V2::LLMObsExperimentUpdateDataRequest.new({ - attributes: DatadogAPIClient::V2::LLMObsExperimentUpdateDataAttributesRequest.new({}), + attributes: DatadogAPIClient::V2::LLMObsExperimentUpdateDataAttributesRequest.new({ + dataset_id: "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", + status: DatadogAPIClient::V2::LLMObsExperimentStatus::COMPLETED, + }), type: DatadogAPIClient::V2::LLMObsExperimentType::EXPERIMENTS, }), }) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index d46be451bcdd..695810922cfc 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -972,6 +972,13 @@ "filter_project_id" => "String", "filter_dataset_id" => "String", "filter_id" => "String", + "filter_name" => "String", + "filter_experiment" => "String", + "filter_metadata" => "String", + "filter_parent_experiment_id" => "String", + "filter_is_deleted" => "Boolean", + "include_user_data" => "Boolean", + "include_dataset_names" => "Boolean", "page_cursor" => "String", "page_limit" => "Integer", }, @@ -985,6 +992,9 @@ "experiment_id" => "String", "body" => "LLMObsExperimentUpdateRequest", }, + "v2.ListLLMObsExperimentEventsV1" => { + "experiment_id" => "String", + }, "v2.CreateLLMObsExperimentEvents" => { "experiment_id" => "String", "body" => "LLMObsExperimentEventsRequest", @@ -1113,6 +1123,9 @@ "project_id" => "String", "dataset_id" => "String", }, + "v2.ListLLMObsExperimentEventsV2" => { + "experiment_id" => "String", + }, "v2.UploadLLMObsDatasetRecordsFile" => { "project_id" => "String", "dataset_id" => "String", @@ -4568,6 +4581,81 @@ "v2.SearchRUMEvents" => { "body" => "RUMSearchEventsRequest", }, + "v2.DeleteSourcemaps" => { + "mapkind" => "SourcemapMapKind", + "dry_run" => "Boolean", + "filter_service" => "Array", + "filter_version" => "Array", + "filter_variant" => "Array", + "filter_id" => "Array", + "filter_build_id" => "Array", + "filter_uuid" => "Array", + "filter_platform" => "Array", + "filter_build_number" => "Array", + "filter_bundle_name" => "Array", + "filter_arch" => "Array", + "filter_symbol_source" => "Array", + "filter_origin" => "Array", + "filter_origin_version" => "Array", + "filter_filename" => "String", + "filter_debug_id" => "String", + "filter_gnu_build_id" => "String", + "filter_go_build_id" => "String", + "filter_file_hash" => "String", + }, + "v2.GetSourcemaps" => { + "filename" => "String", + "service" => "String", + "version" => "String", + }, + "v2.ListSourcemaps" => { + "mapkind" => "SourcemapMapKind", + "page_size" => "Integer", + "page_number" => "Integer", + "filter_service" => "Array", + "filter_version" => "Array", + "filter_variant" => "Array", + "filter_id" => "Array", + "filter_build_id" => "Array", + "filter_uuid" => "Array", + "filter_platform" => "Array", + "filter_build_number" => "Array", + "filter_bundle_name" => "Array", + "filter_arch" => "Array", + "filter_symbol_source" => "Array", + "filter_origin" => "Array", + "filter_origin_version" => "Array", + "filter_filename" => "String", + "filter_debug_id" => "String", + "filter_gnu_build_id" => "String", + "filter_go_build_id" => "String", + "filter_file_hash" => "String", + }, + "v2.RestoreSourcemaps" => { + "mapkind" => "SourcemapMapKind", + "dry_run" => "Boolean", + "filter_service" => "Array", + "filter_version" => "Array", + "filter_variant" => "Array", + "filter_id" => "Array", + "filter_build_id" => "Array", + "filter_uuid" => "Array", + "filter_platform" => "Array", + "filter_build_number" => "Array", + "filter_bundle_name" => "Array", + "filter_arch" => "Array", + "filter_symbol_source" => "Array", + "filter_origin" => "Array", + "filter_origin_version" => "Array", + "filter_filename" => "String", + "filter_debug_id" => "String", + "filter_gnu_build_id" => "String", + "filter_go_build_id" => "String", + "filter_file_hash" => "String", + }, + "v2.GetServiceRepositoryInfo" => { + "body" => "ServiceRepositoryInfoRequest", + }, "v2.ListHardcodedRetentionFilters" => { "app_id" => "String", }, diff --git a/features/v2/llm_observability.feature b/features/v2/llm_observability.feature index ea384fa8ed44..36976da92ebb 100644 --- a/features/v2/llm_observability.feature +++ b/features/v2/llm_observability.feature @@ -235,7 +235,7 @@ Feature: LLM Observability Scenario: Create an LLM Observability experiment returns "Bad Request" response Given operation "CreateLLMObsExperiment" enabled And new "CreateLLMObsExperiment" request - And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "name": "My Experiment v1", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "experiments"}} + And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "name": "My Experiment v1", "parent_experiment_id": "3fd6b5e0-8910-4b1c-a7d0-5b84de329012", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "experiments"}} When the request is sent Then the response status is 400 Bad Request @@ -243,7 +243,7 @@ Feature: LLM Observability Scenario: Create an LLM Observability experiment returns "Created" response Given operation "CreateLLMObsExperiment" enabled And new "CreateLLMObsExperiment" request - And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "name": "My Experiment v1", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "experiments"}} + And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "name": "My Experiment v1", "parent_experiment_id": "3fd6b5e0-8910-4b1c-a7d0-5b84de329012", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "experiments"}} When the request is sent Then the response status is 201 Created @@ -251,7 +251,7 @@ Feature: LLM Observability Scenario: Create an LLM Observability experiment returns "OK" response Given operation "CreateLLMObsExperiment" enabled And new "CreateLLMObsExperiment" request - And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "name": "My Experiment v1", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "experiments"}} + And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "name": "My Experiment v1", "parent_experiment_id": "3fd6b5e0-8910-4b1c-a7d0-5b84de329012", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "experiments"}} When the request is sent Then the response status is 200 OK @@ -713,6 +713,54 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability + Scenario: List LLM Observability experiment events (v2) returns "Bad Request" response + Given operation "ListLLMObsExperimentEventsV2" enabled + And new "ListLLMObsExperimentEventsV2" request + And request contains "experiment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: List LLM Observability experiment events (v2) returns "Not Found" response + Given operation "ListLLMObsExperimentEventsV2" enabled + And new "ListLLMObsExperimentEventsV2" request + And request contains "experiment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: List LLM Observability experiment events (v2) returns "OK" response + Given operation "ListLLMObsExperimentEventsV2" enabled + And new "ListLLMObsExperimentEventsV2" request + And request contains "experiment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: List LLM Observability experiment spans (v1) returns "Bad Request" response + Given operation "ListLLMObsExperimentEventsV1" enabled + And new "ListLLMObsExperimentEventsV1" request + And request contains "experiment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: List LLM Observability experiment spans (v1) returns "Not Found" response + Given operation "ListLLMObsExperimentEventsV1" enabled + And new "ListLLMObsExperimentEventsV1" request + And request contains "experiment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: List LLM Observability experiment spans (v1) returns "OK" response + Given operation "ListLLMObsExperimentEventsV1" enabled + And new "ListLLMObsExperimentEventsV1" request + And request contains "experiment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: List LLM Observability experiments returns "Bad Request" response Given operation "ListLLMObsExperiments" enabled @@ -1092,7 +1140,7 @@ Feature: LLM Observability Given operation "UpdateLLMObsExperiment" enabled And new "UpdateLLMObsExperiment" request And request contains "experiment_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {}, "type": "experiments"}} + And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "status": "completed"}, "type": "experiments"}} When the request is sent Then the response status is 400 Bad Request @@ -1101,7 +1149,7 @@ Feature: LLM Observability Given operation "UpdateLLMObsExperiment" enabled And new "UpdateLLMObsExperiment" request And request contains "experiment_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {}, "type": "experiments"}} + And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "status": "completed"}, "type": "experiments"}} When the request is sent Then the response status is 404 Not Found @@ -1110,7 +1158,7 @@ Feature: LLM Observability Given operation "UpdateLLMObsExperiment" enabled And new "UpdateLLMObsExperiment" request And request contains "experiment_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {}, "type": "experiments"}} + And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "status": "completed"}, "type": "experiments"}} When the request is sent Then the response status is 200 OK diff --git a/features/v2/undo.json b/features/v2/undo.json index 759f88e06cfc..f582e0e3de86 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -4090,6 +4090,12 @@ "type": "idempotent" } }, + "ListLLMObsExperimentEventsV1": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, "CreateLLMObsExperimentEvents": { "tag": "LLM Observability", "undo": { @@ -4270,6 +4276,12 @@ "type": "safe" } }, + "ListLLMObsExperimentEventsV2": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, "UploadLLMObsDatasetRecordsFile": { "tag": "LLM Observability", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 5f4dc57fa534..a6c3dd69f153 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -237,6 +237,8 @@ def initialize "v2.list_llm_obs_datasets": false, "v2.list_llm_obs_dataset_versions": false, "v2.list_llm_obs_experiment_events": false, + "v2.list_llm_obs_experiment_events_v1": false, + "v2.list_llm_obs_experiment_events_v2": false, "v2.list_llm_obs_experiments": false, "v2.list_llm_obs_integration_accounts": false, "v2.list_llm_obs_integration_models": false, @@ -570,6 +572,11 @@ def initialize "v2.update_connection": false, "v2.get_pruned_trace_by_id": false, "v2.get_trace_by_id": false, + "v2.delete_sourcemaps": false, + "v2.get_service_repository_info": false, + "v2.get_sourcemaps": false, + "v2.list_sourcemaps": false, + "v2.restore_sourcemaps": false, "v2.query_aggregated_long_tasks": false, "v2.query_aggregated_signals_problems": false, "v2.query_aggregated_waterfall": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index dc00467fa95c..7e3ed18cdf77 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -2855,6 +2855,8 @@ def overrides "v2.downtime_update_request" => "DowntimeUpdateRequest", "v2.downtime_update_request_attributes" => "DowntimeUpdateRequestAttributes", "v2.downtime_update_request_data" => "DowntimeUpdateRequestData", + "v2.elf_sourcemap_attributes" => "ELFSourcemapAttributes", + "v2.elf_sourcemap_data" => "ELFSourcemapData", "v2.entity_attributes" => "EntityAttributes", "v2.entity_context_entity" => "EntityContextEntity", "v2.entity_context_entity_attributes" => "EntityContextEntityAttributes", @@ -3203,6 +3205,8 @@ def overrides "v2.fleet_tracers_response_data" => "FleetTracersResponseData", "v2.fleet_tracers_response_data_attributes" => "FleetTracersResponseDataAttributes", "v2.fleet_tracers_response_meta" => "FleetTracersResponseMeta", + "v2.flutter_sourcemap_attributes" => "FlutterSourcemapAttributes", + "v2.flutter_sourcemap_data" => "FlutterSourcemapData", "v2.form_trigger" => "FormTrigger", "v2.form_trigger_wrapper" => "FormTriggerWrapper", "v2.formula_limit" => "FormulaLimit", @@ -3449,6 +3453,8 @@ def overrides "v2.http_token_auth_update" => "HTTPTokenAuthUpdate", "v2.http_token_update" => "HTTPTokenUpdate", "v2.idp_metadata_form_data" => "IdPMetadataFormData", + "v2.il2_cpp_sourcemap_attributes" => "IL2CPPSourcemapAttributes", + "v2.il2_cpp_sourcemap_data" => "IL2CPPSourcemapData", "v2.incident_attachment_type" => "IncidentAttachmentType", "v2.incident_create_attributes" => "IncidentCreateAttributes", "v2.incident_create_data" => "IncidentCreateData", @@ -3683,6 +3689,8 @@ def overrides "v2.io_c_score_effect" => "IoCScoreEffect", "v2.io_c_signal_severity_count" => "IoCSignalSeverityCount", "v2.io_c_source" => "IoCSource", + "v2.ios_sourcemap_attributes" => "IOSSourcemapAttributes", + "v2.ios_sourcemap_data" => "IOSSourcemapData", "v2.ip_allowlist_attributes" => "IPAllowlistAttributes", "v2.ip_allowlist_data" => "IPAllowlistData", "v2.ip_allowlist_entry" => "IPAllowlistEntry", @@ -3791,6 +3799,10 @@ def overrides "v2.jsonapi_error_response" => "JSONAPIErrorResponse", "v2.json_patch_operation" => "JsonPatchOperation", "v2.json_patch_operation_op" => "JsonPatchOperationOp", + "v2.js_sourcemap_attributes" => "JSSourcemapAttributes", + "v2.js_sourcemap_data" => "JSSourcemapData", + "v2.jvm_sourcemap_attributes" => "JVMSourcemapAttributes", + "v2.jvm_sourcemap_data" => "JVMSourcemapData", "v2.kind_attributes" => "KindAttributes", "v2.kind_data" => "KindData", "v2.kind_metadata" => "KindMetadata", @@ -3895,6 +3907,7 @@ def overrides "v2.list_scorecards_response" => "ListScorecardsResponse", "v2.list_security_findings_response" => "ListSecurityFindingsResponse", "v2.list_service_access_tokens_response" => "ListServiceAccessTokensResponse", + "v2.list_sourcemaps_response" => "ListSourcemapsResponse", "v2.list_tags_response" => "ListTagsResponse", "v2.list_tags_response_data" => "ListTagsResponseData", "v2.list_tags_response_data_attributes" => "ListTagsResponseDataAttributes", @@ -4102,15 +4115,20 @@ def overrides "v2.llm_obs_experiment_response" => "LLMObsExperimentResponse", "v2.llm_obs_experiment_run_data_response" => "LLMObsExperimentRunDataResponse", "v2.llm_obs_experiment_span" => "LLMObsExperimentSpan", + "v2.llm_obs_experiment_span_data_response" => "LLMObsExperimentSpanDataResponse", "v2.llm_obs_experiment_span_error" => "LLMObsExperimentSpanError", "v2.llm_obs_experiment_span_meta" => "LLMObsExperimentSpanMeta", + "v2.llm_obs_experiment_spans_response" => "LLMObsExperimentSpansResponse", "v2.llm_obs_experiment_span_status" => "LLMObsExperimentSpanStatus", + "v2.llm_obs_experiment_span_type" => "LLMObsExperimentSpanType", "v2.llm_obs_experiment_span_with_evals" => "LLMObsExperimentSpanWithEvals", "v2.llm_obs_experiments_response" => "LLMObsExperimentsResponse", + "v2.llm_obs_experiment_status" => "LLMObsExperimentStatus", "v2.llm_obs_experiment_type" => "LLMObsExperimentType", "v2.llm_obs_experiment_update_data_attributes_request" => "LLMObsExperimentUpdateDataAttributesRequest", "v2.llm_obs_experiment_update_data_request" => "LLMObsExperimentUpdateDataRequest", "v2.llm_obs_experiment_update_request" => "LLMObsExperimentUpdateRequest", + "v2.llm_obs_experiment_user" => "LLMObsExperimentUser", "v2.llm_obs_inference_code" => "LLMObsInferenceCode", "v2.llm_obs_inference_content" => "LLMObsInferenceContent", "v2.llm_obs_inference_content_value" => "LLMObsInferenceContentValue", @@ -4532,6 +4550,8 @@ def overrides "v2.mute_findings_request_data_relationships" => "MuteFindingsRequestDataRelationships", "v2.mute_findings_response" => "MuteFindingsResponse", "v2.mute_findings_response_data" => "MuteFindingsResponseData", + "v2.ndk_sourcemap_attributes" => "NDKSourcemapAttributes", + "v2.ndk_sourcemap_data" => "NDKSourcemapData", "v2.node_types_response" => "NodeTypesResponse", "v2.node_types_response_data" => "NodeTypesResponseData", "v2.node_types_response_data_attributes" => "NodeTypesResponseDataAttributes", @@ -5326,6 +5346,8 @@ def overrides "v2.query_users_request_data_attributes_sort" => "QueryUsersRequestDataAttributesSort", "v2.query_users_request_data_type" => "QueryUsersRequestDataType", "v2.raw_error_budget_remaining" => "RawErrorBudgetRemaining", + "v2.react_native_sourcemap_attributes" => "ReactNativeSourcemapAttributes", + "v2.react_native_sourcemap_data" => "ReactNativeSourcemapData", "v2.readiness_gate" => "ReadinessGate", "v2.readiness_gate_threshold_type" => "ReadinessGateThresholdType", "v2.recommendation_attributes" => "RecommendationAttributes", @@ -6297,6 +6319,14 @@ def overrides "v2.service_now_user_data" => "ServiceNowUserData", "v2.service_now_users_response" => "ServiceNowUsersResponse", "v2.service_now_user_type" => "ServiceNowUserType", + "v2.service_repository_info_data_type" => "ServiceRepositoryInfoDataType", + "v2.service_repository_info_request" => "ServiceRepositoryInfoRequest", + "v2.service_repository_info_request_attributes" => "ServiceRepositoryInfoRequestAttributes", + "v2.service_repository_info_request_data" => "ServiceRepositoryInfoRequestData", + "v2.service_repository_info_response" => "ServiceRepositoryInfoResponse", + "v2.service_repository_info_response_attributes" => "ServiceRepositoryInfoResponseAttributes", + "v2.service_repository_info_response_data" => "ServiceRepositoryInfoResponseData", + "v2.service_repository_info_status" => "ServiceRepositoryInfoStatus", "v2.session_id_array" => "SessionIdArray", "v2.session_id_data" => "SessionIdData", "v2.shift" => "Shift", @@ -6360,6 +6390,16 @@ def overrides "v2.snapshot_update_request_data_type" => "SnapshotUpdateRequestDataType", "v2.software_catalog_trigger_wrapper" => "SoftwareCatalogTriggerWrapper", "v2.sort_direction" => "SortDirection", + "v2.sourcemap_data_type" => "SourcemapDataType", + "v2.sourcemap_file_attributes" => "SourcemapFileAttributes", + "v2.sourcemap_file_data" => "SourcemapFileData", + "v2.sourcemap_file_data_type" => "SourcemapFileDataType", + "v2.sourcemap_file_response" => "SourcemapFileResponse", + "v2.sourcemap_item" => "SourcemapItem", + "v2.sourcemap_map_kind" => "SourcemapMapKind", + "v2.sourcemaps_list_meta" => "SourcemapsListMeta", + "v2.sourcemaps_list_meta_page" => "SourcemapsListMetaPage", + "v2.sourcemaps_response" => "SourcemapsResponse", "v2.span" => "Span", "v2.spans_aggregate_bucket" => "SpansAggregateBucket", "v2.spans_aggregate_bucket_attributes" => "SpansAggregateBucketAttributes", diff --git a/lib/datadog_api_client/v2/api/llm_observability_api.rb b/lib/datadog_api_client/v2/api/llm_observability_api.rb index 4e8a60da520b..daec334b5ba6 100644 --- a/lib/datadog_api_client/v2/api/llm_observability_api.rb +++ b/lib/datadog_api_client/v2/api/llm_observability_api.rb @@ -2350,6 +2350,154 @@ def list_llm_obs_experiment_events_with_http_info(experiment_id, opts = {}) return data, status_code, headers end + # List LLM Observability experiment spans (v1). + # + # @see #list_llm_obs_experiment_events_v1_with_http_info + def list_llm_obs_experiment_events_v1(experiment_id, opts = {}) + data, _status_code, _headers = list_llm_obs_experiment_events_v1_with_http_info(experiment_id, opts) + data + end + + # List LLM Observability experiment spans (v1). + # + # Retrieve spans with their evaluation metrics for a given experiment. Returns spans only, with no summary metrics and no pagination. Deprecated in favor of `ListLLMObsExperimentEventsV3`. + # + # @deprecated This API is deprecated. + # + # @param experiment_id [String] The ID of the LLM Observability experiment. + # @param opts [Hash] the optional parameters + # @return [Array<(LLMObsExperimentSpansResponse, Integer, Hash)>] LLMObsExperimentSpansResponse data, response status code and response headers + def list_llm_obs_experiment_events_v1_with_http_info(experiment_id, opts = {}) + warn "[DEPRECATION] `ListLLMObsExperimentEventsV1` is deprecated." + unstable_enabled = @api_client.config.unstable_operations["v2.list_llm_obs_experiment_events_v1".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_llm_obs_experiment_events_v1") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_llm_obs_experiment_events_v1")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LLMObservabilityAPI.list_llm_obs_experiment_events_v1 ...' + end + # verify the required parameter 'experiment_id' is set + if @api_client.config.client_side_validation && experiment_id.nil? + fail ArgumentError, "Missing the required parameter 'experiment_id' when calling LLMObservabilityAPI.list_llm_obs_experiment_events_v1" + end + # resource path + local_var_path = '/api/v2/llm-obs/v1/experiments/{experiment_id}/events'.sub('{experiment_id}', CGI.escape(experiment_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'LLMObsExperimentSpansResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_llm_obs_experiment_events_v1, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: LLMObservabilityAPI#list_llm_obs_experiment_events_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List LLM Observability experiment events (v2). + # + # @see #list_llm_obs_experiment_events_v2_with_http_info + def list_llm_obs_experiment_events_v2(experiment_id, opts = {}) + data, _status_code, _headers = list_llm_obs_experiment_events_v2_with_http_info(experiment_id, opts) + data + end + + # List LLM Observability experiment events (v2). + # + # Retrieve spans and experiment-level summary metrics for a given experiment. Returns the full events payload without pagination. Deprecated: use `ListLLMObsExperimentEventsV3` instead. + # + # @deprecated This API is deprecated. + # + # @param experiment_id [String] The ID of the LLM Observability experiment. + # @param opts [Hash] the optional parameters + # @return [Array<(LLMObsExperimentEventsV2Response, Integer, Hash)>] LLMObsExperimentEventsV2Response data, response status code and response headers + def list_llm_obs_experiment_events_v2_with_http_info(experiment_id, opts = {}) + warn "[DEPRECATION] `ListLLMObsExperimentEventsV2` is deprecated." + unstable_enabled = @api_client.config.unstable_operations["v2.list_llm_obs_experiment_events_v2".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_llm_obs_experiment_events_v2") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_llm_obs_experiment_events_v2")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LLMObservabilityAPI.list_llm_obs_experiment_events_v2 ...' + end + # verify the required parameter 'experiment_id' is set + if @api_client.config.client_side_validation && experiment_id.nil? + fail ArgumentError, "Missing the required parameter 'experiment_id' when calling LLMObservabilityAPI.list_llm_obs_experiment_events_v2" + end + # resource path + local_var_path = '/api/v2/llm-obs/v2/experiments/{experiment_id}/events'.sub('{experiment_id}', CGI.escape(experiment_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'LLMObsExperimentEventsV2Response' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_llm_obs_experiment_events_v2, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: LLMObservabilityAPI#list_llm_obs_experiment_events_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # List LLM Observability experiments. # # @see #list_llm_obs_experiments_with_http_info @@ -2366,8 +2514,15 @@ def list_llm_obs_experiments(opts = {}) # @option opts [String] :filter_project_id Filter experiments by project ID. Required if `filter[dataset_id]` is not provided. # @option opts [String] :filter_dataset_id Filter experiments by dataset ID. # @option opts [String] :filter_id Filter experiments by experiment ID. Can be specified multiple times. - # @option opts [String] :page_cursor Use the Pagination cursor to retrieve the next page of results. - # @option opts [Integer] :page_limit Maximum number of results to return per page. + # @option opts [String] :filter_name Filter experiments by their exact run name. + # @option opts [String] :filter_experiment Filter by logical experiment name. This is the `name` field set when creating an experiment through `POST /experiments`. Returns all experiment runs that share the same name, enabling cross-commit and cross-branch comparisons. + # @option opts [String] :filter_metadata Filter by JSONB metadata containment. Provide a JSON object string where experiments whose metadata contains all specified key-value pairs are returned. For example: `{"commit":"abc123","branch":"main"}`. + # @option opts [String] :filter_parent_experiment_id Filter experiments by the ID of their parent (baseline) experiment. Returns all experiments that were run against the given baseline. Can be specified multiple times. + # @option opts [Boolean] :filter_is_deleted When `true`, return only soft-deleted experiments. Defaults to `false`. + # @option opts [Boolean] :include_user_data When `true`, enrich each experiment with its author's user data in the `author` field. + # @option opts [Boolean] :include_dataset_names When `true`, enrich each experiment with its dataset name in the `dataset_name` field. + # @option opts [String] :page_cursor Use the pagination cursor returned in `meta.after` to retrieve the next page of results. + # @option opts [Integer] :page_limit Maximum number of results to return per page. Values above 5000 are clamped to 5000. Defaults to 5000. # @return [Array<(LLMObsExperimentsResponse, Integer, Hash)>] LLMObsExperimentsResponse data, response status code and response headers def list_llm_obs_experiments_with_http_info(opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.list_llm_obs_experiments".to_sym] @@ -2380,6 +2535,9 @@ def list_llm_obs_experiments_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LLMObservabilityAPI.list_llm_obs_experiments ...' end + if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] > 5000 + fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling LLMObservabilityAPI.list_llm_obs_experiments, must be smaller than or equal to 5000.' + end # resource path local_var_path = '/api/v2/llm-obs/v1/experiments' @@ -2388,6 +2546,13 @@ def list_llm_obs_experiments_with_http_info(opts = {}) query_params[:'filter[project_id]'] = opts[:'filter_project_id'] if !opts[:'filter_project_id'].nil? query_params[:'filter[dataset_id]'] = opts[:'filter_dataset_id'] if !opts[:'filter_dataset_id'].nil? query_params[:'filter[id]'] = opts[:'filter_id'] if !opts[:'filter_id'].nil? + query_params[:'filter[name]'] = opts[:'filter_name'] if !opts[:'filter_name'].nil? + query_params[:'filter[experiment]'] = opts[:'filter_experiment'] if !opts[:'filter_experiment'].nil? + query_params[:'filter[metadata]'] = opts[:'filter_metadata'] if !opts[:'filter_metadata'].nil? + query_params[:'filter[parent_experiment_id]'] = opts[:'filter_parent_experiment_id'] if !opts[:'filter_parent_experiment_id'].nil? + query_params[:'filter[is_deleted]'] = opts[:'filter_is_deleted'] if !opts[:'filter_is_deleted'].nil? + query_params[:'include[user_data]'] = opts[:'include_user_data'] if !opts[:'include_user_data'].nil? + query_params[:'include[dataset_names]'] = opts[:'include_dataset_names'] if !opts[:'include_dataset_names'].nil? query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil? query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil? diff --git a/lib/datadog_api_client/v2/api/rum_api.rb b/lib/datadog_api_client/v2/api/rum_api.rb index bd3c413cab66..d393fa173b0f 100644 --- a/lib/datadog_api_client/v2/api/rum_api.rb +++ b/lib/datadog_api_client/v2/api/rum_api.rb @@ -222,6 +222,128 @@ def delete_rum_application_with_http_info(id, opts = {}) return data, status_code, headers end + # Delete source maps. + # + # @see #delete_sourcemaps_with_http_info + def delete_sourcemaps(mapkind, dry_run, opts = {}) + data, _status_code, _headers = delete_sourcemaps_with_http_info(mapkind, dry_run, opts) + data + end + + # Delete source maps. + # + # Deletes source maps matching the specified filter criteria. Supports + # dry-run mode to preview which source maps would be deleted without + # performing the actual deletion. + # + # @param mapkind [SourcemapMapKind] The type of source map. Valid values are `js`, `jvm`, `ios`, `react`, `flutter`, `elf`, `ndk`, `il2cpp`. + # @param dry_run [Boolean] When set to `true`, returns the source maps that would be deleted without performing the actual deletion. When set to `false`, performs the deletion. + # @param opts [Hash] the optional parameters + # @option opts [Array] :filter_service Filter by service names (multiple values allowed). Required for `js`, `jvm`, `react`, and `flutter` map kinds. + # @option opts [Array] :filter_version Filter by version values (multiple values allowed, maximum 10). Required for `js`, `jvm`, `react`, and `flutter` map kinds. + # @option opts [Array] :filter_variant Filter by variant values (multiple values allowed). Supported for `jvm`. + # @option opts [Array] :filter_id Filter by source map ID values (multiple values allowed). Supported for all map kinds. + # @option opts [Array] :filter_build_id Filter by build ID values (multiple values allowed). Supported for `jvm`, `ndk`, and `il2cpp`. + # @option opts [Array] :filter_uuid Filter by UUID values (multiple values allowed). Supported for `ios`. + # @option opts [Array] :filter_platform Filter by platform values (multiple values allowed). Supported for `react`. + # @option opts [Array] :filter_build_number Filter by build number values (multiple values allowed). Supported for `react`. + # @option opts [Array] :filter_bundle_name Filter by bundle name values (multiple values allowed). Supported for `react`. + # @option opts [Array] :filter_arch Filter by architecture values (multiple values allowed). Supported for `flutter`, `elf`, and `ndk`. + # @option opts [Array] :filter_symbol_source Filter by symbol source values (multiple values allowed). Supported for `elf`. + # @option opts [Array] :filter_origin Filter by origin values (multiple values allowed). Supported for `elf`. + # @option opts [Array] :filter_origin_version Filter by origin version values (multiple values allowed). Supported for `elf`. + # @option opts [String] :filter_filename Filter by filename (single value). Supported for `js`, `elf`, and `ndk`. + # @option opts [String] :filter_debug_id Filter by debug ID (single value). Supported for `react`. + # @option opts [String] :filter_gnu_build_id Filter by GNU build ID (single value). Supported for `elf`. + # @option opts [String] :filter_go_build_id Filter by Go build ID (single value). Supported for `elf`. + # @option opts [String] :filter_file_hash Filter by file hash (single value). Supported for `elf`. + # @return [Array<(SourcemapsResponse, Integer, Hash)>] SourcemapsResponse data, response status code and response headers + def delete_sourcemaps_with_http_info(mapkind, dry_run, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_sourcemaps".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_sourcemaps") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_sourcemaps")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RUMAPI.delete_sourcemaps ...' + end + # verify the required parameter 'mapkind' is set + if @api_client.config.client_side_validation && mapkind.nil? + fail ArgumentError, "Missing the required parameter 'mapkind' when calling RUMAPI.delete_sourcemaps" + end + # verify enum value + allowable_values = ['js', 'jvm', 'ios', 'react', 'flutter', 'elf', 'ndk', 'il2cpp'] + if @api_client.config.client_side_validation && !allowable_values.include?(mapkind) + fail ArgumentError, "invalid value for \"mapkind\", must be one of #{allowable_values}" + end + # verify the required parameter 'dry_run' is set + if @api_client.config.client_side_validation && dry_run.nil? + fail ArgumentError, "Missing the required parameter 'dry_run' when calling RUMAPI.delete_sourcemaps" + end + # resource path + local_var_path = '/api/v2/sourcemaps' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'mapkind'] = mapkind + query_params[:'dry_run'] = dry_run + query_params[:'filter[service]'] = @api_client.build_collection_param(opts[:'filter_service'], :multi) if !opts[:'filter_service'].nil? + query_params[:'filter[version]'] = @api_client.build_collection_param(opts[:'filter_version'], :multi) if !opts[:'filter_version'].nil? + query_params[:'filter[variant]'] = @api_client.build_collection_param(opts[:'filter_variant'], :multi) if !opts[:'filter_variant'].nil? + query_params[:'filter[id]'] = @api_client.build_collection_param(opts[:'filter_id'], :multi) if !opts[:'filter_id'].nil? + query_params[:'filter[build_id]'] = @api_client.build_collection_param(opts[:'filter_build_id'], :multi) if !opts[:'filter_build_id'].nil? + query_params[:'filter[uuid]'] = @api_client.build_collection_param(opts[:'filter_uuid'], :multi) if !opts[:'filter_uuid'].nil? + query_params[:'filter[platform]'] = @api_client.build_collection_param(opts[:'filter_platform'], :multi) if !opts[:'filter_platform'].nil? + query_params[:'filter[build_number]'] = @api_client.build_collection_param(opts[:'filter_build_number'], :multi) if !opts[:'filter_build_number'].nil? + query_params[:'filter[bundle_name]'] = @api_client.build_collection_param(opts[:'filter_bundle_name'], :multi) if !opts[:'filter_bundle_name'].nil? + query_params[:'filter[arch]'] = @api_client.build_collection_param(opts[:'filter_arch'], :multi) if !opts[:'filter_arch'].nil? + query_params[:'filter[symbol_source]'] = @api_client.build_collection_param(opts[:'filter_symbol_source'], :multi) if !opts[:'filter_symbol_source'].nil? + query_params[:'filter[origin]'] = @api_client.build_collection_param(opts[:'filter_origin'], :multi) if !opts[:'filter_origin'].nil? + query_params[:'filter[origin_version]'] = @api_client.build_collection_param(opts[:'filter_origin_version'], :multi) if !opts[:'filter_origin_version'].nil? + query_params[:'filter[filename]'] = opts[:'filter_filename'] if !opts[:'filter_filename'].nil? + query_params[:'filter[debug_id]'] = opts[:'filter_debug_id'] if !opts[:'filter_debug_id'].nil? + query_params[:'filter[gnu_build_id]'] = opts[:'filter_gnu_build_id'] if !opts[:'filter_gnu_build_id'].nil? + query_params[:'filter[go_build_id]'] = opts[:'filter_go_build_id'] if !opts[:'filter_go_build_id'].nil? + query_params[:'filter[file_hash]'] = opts[:'filter_file_hash'] if !opts[:'filter_file_hash'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SourcemapsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :delete_sourcemaps, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + new_options[:query_string_normalizer] = HTTParty::Request::NON_RAILS_QUERY_STRING_NORMALIZER + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RUMAPI#delete_sourcemaps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get a RUM application. # # @see #get_rum_application_with_http_info @@ -347,6 +469,164 @@ def get_rum_applications_with_http_info(opts = {}) return data, status_code, headers end + # Get service repository information. + # + # @see #get_service_repository_info_with_http_info + def get_service_repository_info(body, opts = {}) + data, _status_code, _headers = get_service_repository_info_with_http_info(body, opts) + data + end + + # Get service repository information. + # + # Returns the repository URL and commit SHA associated with a given service and version. + # + # @param body [ServiceRepositoryInfoRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(ServiceRepositoryInfoResponse, Integer, Hash)>] ServiceRepositoryInfoResponse data, response status code and response headers + def get_service_repository_info_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_service_repository_info".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_service_repository_info") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_service_repository_info")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RUMAPI.get_service_repository_info ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling RUMAPI.get_service_repository_info" + end + # resource path + local_var_path = '/api/v2/sourcemaps/service_repository_info' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'ServiceRepositoryInfoResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_service_repository_info, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RUMAPI#get_service_repository_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a JavaScript source map. + # + # @see #get_sourcemaps_with_http_info + def get_sourcemaps(filename, service, version, opts = {}) + data, _status_code, _headers = get_sourcemaps_with_http_info(filename, service, version, opts) + data + end + + # Get a JavaScript source map. + # + # Retrieves the content of a specific JavaScript source map file by its + # filename, service name, and version. + # + # @param filename [String] The path to the source map file. + # @param service [String] The service name associated with the source map. + # @param version [String] The version of the service associated with the source map. + # @param opts [Hash] the optional parameters + # @return [Array<(SourcemapFileResponse, Integer, Hash)>] SourcemapFileResponse data, response status code and response headers + def get_sourcemaps_with_http_info(filename, service, version, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_sourcemaps".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_sourcemaps") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_sourcemaps")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RUMAPI.get_sourcemaps ...' + end + # verify the required parameter 'filename' is set + if @api_client.config.client_side_validation && filename.nil? + fail ArgumentError, "Missing the required parameter 'filename' when calling RUMAPI.get_sourcemaps" + end + # verify the required parameter 'service' is set + if @api_client.config.client_side_validation && service.nil? + fail ArgumentError, "Missing the required parameter 'service' when calling RUMAPI.get_sourcemaps" + end + # verify the required parameter 'version' is set + if @api_client.config.client_side_validation && version.nil? + fail ArgumentError, "Missing the required parameter 'version' when calling RUMAPI.get_sourcemaps" + end + # resource path + local_var_path = '/api/v2/sourcemaps' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filename'] = filename + query_params[:'service'] = service + query_params[:'version'] = version + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SourcemapFileResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_sourcemaps, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RUMAPI#get_sourcemaps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get a list of RUM events. # # @see #list_rum_events_with_http_info @@ -452,6 +732,241 @@ def list_rum_events_with_pagination(opts = {}) end end + # List source maps. + # + # @see #list_sourcemaps_with_http_info + def list_sourcemaps(opts = {}) + data, _status_code, _headers = list_sourcemaps_with_http_info(opts) + data + end + + # List source maps. + # + # Retrieves a paginated list of source maps matching the specified filter criteria. + # + # @param opts [Hash] the optional parameters + # @option opts [SourcemapMapKind] :mapkind The type of source map. Defaults to `js`. + # @option opts [Integer] :page_size The number of results to return per page. Must be at least 1. + # @option opts [Integer] :page_number The page number to retrieve, starting from 1. + # @option opts [Array] :filter_service Filter by service names (multiple values allowed). Required for `js`, `jvm`, `react`, and `flutter` map kinds. + # @option opts [Array] :filter_version Filter by version values (multiple values allowed). Required for `js`, `jvm`, `react`, and `flutter` map kinds. + # @option opts [Array] :filter_variant Filter by variant values (multiple values allowed). Supported for `jvm`. + # @option opts [Array] :filter_id Filter by source map ID values (multiple values allowed). Supported for all map kinds. + # @option opts [Array] :filter_build_id Filter by build ID values (multiple values allowed). Supported for `jvm`, `ndk`, and `il2cpp`. + # @option opts [Array] :filter_uuid Filter by UUID values (multiple values allowed). Supported for `ios`. + # @option opts [Array] :filter_platform Filter by platform values (multiple values allowed). Supported for `react`. + # @option opts [Array] :filter_build_number Filter by build number values (multiple values allowed). Supported for `react`. + # @option opts [Array] :filter_bundle_name Filter by bundle name values (multiple values allowed). Supported for `react`. + # @option opts [Array] :filter_arch Filter by architecture values (multiple values allowed). Supported for `flutter`, `elf`, and `ndk`. + # @option opts [Array] :filter_symbol_source Filter by symbol source values (multiple values allowed). Supported for `elf`. + # @option opts [Array] :filter_origin Filter by origin values (multiple values allowed). Supported for `elf`. + # @option opts [Array] :filter_origin_version Filter by origin version values (multiple values allowed). Supported for `elf`. + # @option opts [String] :filter_filename Filter by filename (single value). Supported for `js`, `elf`, and `ndk`. + # @option opts [String] :filter_debug_id Filter by debug ID (single value). Supported for `react`. + # @option opts [String] :filter_gnu_build_id Filter by GNU build ID (single value). Supported for `elf`. + # @option opts [String] :filter_go_build_id Filter by Go build ID (single value). Supported for `elf`. + # @option opts [String] :filter_file_hash Filter by file hash (single value). Supported for `elf`. + # @return [Array<(ListSourcemapsResponse, Integer, Hash)>] ListSourcemapsResponse data, response status code and response headers + def list_sourcemaps_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_sourcemaps".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_sourcemaps") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_sourcemaps")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RUMAPI.list_sourcemaps ...' + end + allowable_values = ['js', 'jvm', 'ios', 'react', 'flutter', 'elf', 'ndk', 'il2cpp'] + if @api_client.config.client_side_validation && opts[:'mapkind'] && !allowable_values.include?(opts[:'mapkind']) + fail ArgumentError, "invalid value for \"mapkind\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/api/v2/sourcemaps/list' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'mapkind'] = opts[:'mapkind'] if !opts[:'mapkind'].nil? + query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? + query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? + query_params[:'filter[service]'] = @api_client.build_collection_param(opts[:'filter_service'], :multi) if !opts[:'filter_service'].nil? + query_params[:'filter[version]'] = @api_client.build_collection_param(opts[:'filter_version'], :multi) if !opts[:'filter_version'].nil? + query_params[:'filter[variant]'] = @api_client.build_collection_param(opts[:'filter_variant'], :multi) if !opts[:'filter_variant'].nil? + query_params[:'filter[id]'] = @api_client.build_collection_param(opts[:'filter_id'], :multi) if !opts[:'filter_id'].nil? + query_params[:'filter[build_id]'] = @api_client.build_collection_param(opts[:'filter_build_id'], :multi) if !opts[:'filter_build_id'].nil? + query_params[:'filter[uuid]'] = @api_client.build_collection_param(opts[:'filter_uuid'], :multi) if !opts[:'filter_uuid'].nil? + query_params[:'filter[platform]'] = @api_client.build_collection_param(opts[:'filter_platform'], :multi) if !opts[:'filter_platform'].nil? + query_params[:'filter[build_number]'] = @api_client.build_collection_param(opts[:'filter_build_number'], :multi) if !opts[:'filter_build_number'].nil? + query_params[:'filter[bundle_name]'] = @api_client.build_collection_param(opts[:'filter_bundle_name'], :multi) if !opts[:'filter_bundle_name'].nil? + query_params[:'filter[arch]'] = @api_client.build_collection_param(opts[:'filter_arch'], :multi) if !opts[:'filter_arch'].nil? + query_params[:'filter[symbol_source]'] = @api_client.build_collection_param(opts[:'filter_symbol_source'], :multi) if !opts[:'filter_symbol_source'].nil? + query_params[:'filter[origin]'] = @api_client.build_collection_param(opts[:'filter_origin'], :multi) if !opts[:'filter_origin'].nil? + query_params[:'filter[origin_version]'] = @api_client.build_collection_param(opts[:'filter_origin_version'], :multi) if !opts[:'filter_origin_version'].nil? + query_params[:'filter[filename]'] = opts[:'filter_filename'] if !opts[:'filter_filename'].nil? + query_params[:'filter[debug_id]'] = opts[:'filter_debug_id'] if !opts[:'filter_debug_id'].nil? + query_params[:'filter[gnu_build_id]'] = opts[:'filter_gnu_build_id'] if !opts[:'filter_gnu_build_id'].nil? + query_params[:'filter[go_build_id]'] = opts[:'filter_go_build_id'] if !opts[:'filter_go_build_id'].nil? + query_params[:'filter[file_hash]'] = opts[:'filter_file_hash'] if !opts[:'filter_file_hash'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ListSourcemapsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_sourcemaps, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + new_options[:query_string_normalizer] = HTTParty::Request::NON_RAILS_QUERY_STRING_NORMALIZER + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RUMAPI#list_sourcemaps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Restore source maps. + # + # @see #restore_sourcemaps_with_http_info + def restore_sourcemaps(mapkind, dry_run, opts = {}) + data, _status_code, _headers = restore_sourcemaps_with_http_info(mapkind, dry_run, opts) + data + end + + # Restore source maps. + # + # Restores previously deleted source maps matching the specified filter + # criteria. Supports dry-run mode to preview which source maps would be + # restored without performing the actual restoration. + # + # @param mapkind [SourcemapMapKind] The type of source map. Valid values are `js`, `jvm`, `ios`, `react`, `flutter`, `elf`, `ndk`, `il2cpp`. + # @param dry_run [Boolean] When set to `true`, returns the source maps that would be restored without performing the actual restoration. When set to `false`, performs the restoration. + # @param opts [Hash] the optional parameters + # @option opts [Array] :filter_service Filter by service names (multiple values allowed). Required for `js`, `jvm`, `react`, and `flutter` map kinds. + # @option opts [Array] :filter_version Filter by version values (multiple values allowed, maximum 10). Required for `js`, `jvm`, `react`, and `flutter` map kinds. + # @option opts [Array] :filter_variant Filter by variant values (multiple values allowed). Supported for `jvm`. + # @option opts [Array] :filter_id Filter by source map ID values (multiple values allowed). Supported for all map kinds. + # @option opts [Array] :filter_build_id Filter by build ID values (multiple values allowed). Supported for `jvm`, `ndk`, and `il2cpp`. + # @option opts [Array] :filter_uuid Filter by UUID values (multiple values allowed). Supported for `ios`. + # @option opts [Array] :filter_platform Filter by platform values (multiple values allowed). Supported for `react`. + # @option opts [Array] :filter_build_number Filter by build number values (multiple values allowed). Supported for `react`. + # @option opts [Array] :filter_bundle_name Filter by bundle name values (multiple values allowed). Supported for `react`. + # @option opts [Array] :filter_arch Filter by architecture values (multiple values allowed). Supported for `flutter`, `elf`, and `ndk`. + # @option opts [Array] :filter_symbol_source Filter by symbol source values (multiple values allowed). Supported for `elf`. + # @option opts [Array] :filter_origin Filter by origin values (multiple values allowed). Supported for `elf`. + # @option opts [Array] :filter_origin_version Filter by origin version values (multiple values allowed). Supported for `elf`. + # @option opts [String] :filter_filename Filter by filename (single value). Supported for `js`, `elf`, and `ndk`. + # @option opts [String] :filter_debug_id Filter by debug ID (single value). Supported for `react`. + # @option opts [String] :filter_gnu_build_id Filter by GNU build ID (single value). Supported for `elf`. + # @option opts [String] :filter_go_build_id Filter by Go build ID (single value). Supported for `elf`. + # @option opts [String] :filter_file_hash Filter by file hash (single value). Supported for `elf`. + # @return [Array<(SourcemapsResponse, Integer, Hash)>] SourcemapsResponse data, response status code and response headers + def restore_sourcemaps_with_http_info(mapkind, dry_run, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.restore_sourcemaps".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.restore_sourcemaps") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.restore_sourcemaps")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RUMAPI.restore_sourcemaps ...' + end + # verify the required parameter 'mapkind' is set + if @api_client.config.client_side_validation && mapkind.nil? + fail ArgumentError, "Missing the required parameter 'mapkind' when calling RUMAPI.restore_sourcemaps" + end + # verify enum value + allowable_values = ['js', 'jvm', 'ios', 'react', 'flutter', 'elf', 'ndk', 'il2cpp'] + if @api_client.config.client_side_validation && !allowable_values.include?(mapkind) + fail ArgumentError, "invalid value for \"mapkind\", must be one of #{allowable_values}" + end + # verify the required parameter 'dry_run' is set + if @api_client.config.client_side_validation && dry_run.nil? + fail ArgumentError, "Missing the required parameter 'dry_run' when calling RUMAPI.restore_sourcemaps" + end + # resource path + local_var_path = '/api/v2/sourcemaps/restore' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'mapkind'] = mapkind + query_params[:'dry_run'] = dry_run + query_params[:'filter[service]'] = @api_client.build_collection_param(opts[:'filter_service'], :multi) if !opts[:'filter_service'].nil? + query_params[:'filter[version]'] = @api_client.build_collection_param(opts[:'filter_version'], :multi) if !opts[:'filter_version'].nil? + query_params[:'filter[variant]'] = @api_client.build_collection_param(opts[:'filter_variant'], :multi) if !opts[:'filter_variant'].nil? + query_params[:'filter[id]'] = @api_client.build_collection_param(opts[:'filter_id'], :multi) if !opts[:'filter_id'].nil? + query_params[:'filter[build_id]'] = @api_client.build_collection_param(opts[:'filter_build_id'], :multi) if !opts[:'filter_build_id'].nil? + query_params[:'filter[uuid]'] = @api_client.build_collection_param(opts[:'filter_uuid'], :multi) if !opts[:'filter_uuid'].nil? + query_params[:'filter[platform]'] = @api_client.build_collection_param(opts[:'filter_platform'], :multi) if !opts[:'filter_platform'].nil? + query_params[:'filter[build_number]'] = @api_client.build_collection_param(opts[:'filter_build_number'], :multi) if !opts[:'filter_build_number'].nil? + query_params[:'filter[bundle_name]'] = @api_client.build_collection_param(opts[:'filter_bundle_name'], :multi) if !opts[:'filter_bundle_name'].nil? + query_params[:'filter[arch]'] = @api_client.build_collection_param(opts[:'filter_arch'], :multi) if !opts[:'filter_arch'].nil? + query_params[:'filter[symbol_source]'] = @api_client.build_collection_param(opts[:'filter_symbol_source'], :multi) if !opts[:'filter_symbol_source'].nil? + query_params[:'filter[origin]'] = @api_client.build_collection_param(opts[:'filter_origin'], :multi) if !opts[:'filter_origin'].nil? + query_params[:'filter[origin_version]'] = @api_client.build_collection_param(opts[:'filter_origin_version'], :multi) if !opts[:'filter_origin_version'].nil? + query_params[:'filter[filename]'] = opts[:'filter_filename'] if !opts[:'filter_filename'].nil? + query_params[:'filter[debug_id]'] = opts[:'filter_debug_id'] if !opts[:'filter_debug_id'].nil? + query_params[:'filter[gnu_build_id]'] = opts[:'filter_gnu_build_id'] if !opts[:'filter_gnu_build_id'].nil? + query_params[:'filter[go_build_id]'] = opts[:'filter_go_build_id'] if !opts[:'filter_go_build_id'].nil? + query_params[:'filter[file_hash]'] = opts[:'filter_file_hash'] if !opts[:'filter_file_hash'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SourcemapsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :restore_sourcemaps, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + new_options[:query_string_normalizer] = HTTParty::Request::NON_RAILS_QUERY_STRING_NORMALIZER + + data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: RUMAPI#restore_sourcemaps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Search RUM events. # # @see #search_rum_events_with_http_info diff --git a/lib/datadog_api_client/v2/models/elf_sourcemap_attributes.rb b/lib/datadog_api_client/v2/models/elf_sourcemap_attributes.rb new file mode 100644 index 000000000000..b8d5728b015b --- /dev/null +++ b/lib/datadog_api_client/v2/models/elf_sourcemap_attributes.rb @@ -0,0 +1,245 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of an ELF symbol file. + class ELFSourcemapAttributes + include BaseGenericModel + + # The target CPU architecture. + attr_accessor :arch + + # The timestamp when the symbol file was created. + attr_reader :created_at + + # The SHA256 hash of the ELF file. + attr_accessor :file_hash + + # The ELF file name. + attr_accessor :file_name + + # The GNU build ID (UUID format). + attr_accessor :gnu_build_id + + # The Go build ID (UUID format). + attr_accessor :go_build_id + + # The type of source map. + attr_reader :mapkind + + # The origin of the ELF file. + attr_accessor :origin + + # The version of the origin package. + attr_accessor :origin_version + + # The size of the ELF file in bytes. + attr_reader :size + + # The source of the debug symbols. + attr_accessor :symbol_source + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'arch' => :'arch', + :'created_at' => :'created_at', + :'file_hash' => :'file_hash', + :'file_name' => :'file_name', + :'gnu_build_id' => :'gnu_build_id', + :'go_build_id' => :'go_build_id', + :'mapkind' => :'mapkind', + :'origin' => :'origin', + :'origin_version' => :'origin_version', + :'size' => :'size', + :'symbol_source' => :'symbol_source' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'arch' => :'String', + :'created_at' => :'Time', + :'file_hash' => :'String', + :'file_name' => :'String', + :'gnu_build_id' => :'String', + :'go_build_id' => :'String', + :'mapkind' => :'String', + :'origin' => :'String', + :'origin_version' => :'String', + :'size' => :'Integer', + :'symbol_source' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ELFSourcemapAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'arch') + self.arch = attributes[:'arch'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'file_hash') + self.file_hash = attributes[:'file_hash'] + end + + if attributes.key?(:'file_name') + self.file_name = attributes[:'file_name'] + end + + if attributes.key?(:'gnu_build_id') + self.gnu_build_id = attributes[:'gnu_build_id'] + end + + if attributes.key?(:'go_build_id') + self.go_build_id = attributes[:'go_build_id'] + end + + if attributes.key?(:'mapkind') + self.mapkind = attributes[:'mapkind'] + end + + if attributes.key?(:'origin') + self.origin = attributes[:'origin'] + end + + if attributes.key?(:'origin_version') + self.origin_version = attributes[:'origin_version'] + end + + if attributes.key?(:'size') + self.size = attributes[:'size'] + end + + if attributes.key?(:'symbol_source') + self.symbol_source = attributes[:'symbol_source'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @created_at.nil? + return false if @mapkind.nil? + return false if @size.nil? + true + end + + # Custom attribute writer method with validation + # @param created_at [Object] Object to be assigned + # @!visibility private + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.' + end + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param mapkind [Object] Object to be assigned + # @!visibility private + def mapkind=(mapkind) + if mapkind.nil? + fail ArgumentError, 'invalid value for "mapkind", mapkind cannot be nil.' + end + @mapkind = mapkind + end + + # Custom attribute writer method with validation + # @param size [Object] Object to be assigned + # @!visibility private + def size=(size) + if size.nil? + fail ArgumentError, 'invalid value for "size", size cannot be nil.' + end + @size = size + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + arch == o.arch && + created_at == o.created_at && + file_hash == o.file_hash && + file_name == o.file_name && + gnu_build_id == o.gnu_build_id && + go_build_id == o.go_build_id && + mapkind == o.mapkind && + origin == o.origin && + origin_version == o.origin_version && + size == o.size && + symbol_source == o.symbol_source && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [arch, created_at, file_hash, file_name, gnu_build_id, go_build_id, mapkind, origin, origin_version, size, symbol_source, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elf_sourcemap_data.rb b/lib/datadog_api_client/v2/models/elf_sourcemap_data.rb new file mode 100644 index 000000000000..4adc388cfb0a --- /dev/null +++ b/lib/datadog_api_client/v2/models/elf_sourcemap_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # ELF symbol file data object. + class ELFSourcemapData + include BaseGenericModel + + # Attributes of an ELF symbol file. + attr_reader :attributes + + # The unique identifier of the source map. + attr_reader :id + + # The resource type for source map objects. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ELFSourcemapAttributes', + :'id' => :'String', + :'type' => :'SourcemapDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ELFSourcemapData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/flutter_sourcemap_attributes.rb b/lib/datadog_api_client/v2/models/flutter_sourcemap_attributes.rb new file mode 100644 index 000000000000..a8e9b2e4f896 --- /dev/null +++ b/lib/datadog_api_client/v2/models/flutter_sourcemap_attributes.rb @@ -0,0 +1,205 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a Flutter symbol file. + class FlutterSourcemapAttributes + include BaseGenericModel + + # The target CPU architecture. + attr_accessor :arch + + # The timestamp when the symbol file was created. + attr_reader :created_at + + # The type of source map. + attr_reader :mapkind + + # The service name associated with the symbol file. + attr_accessor :service + + # The size of the symbol file in bytes. + attr_reader :size + + # The build variant. + attr_accessor :variant + + # The version of the service associated with the symbol file. + attr_accessor :version + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'arch' => :'arch', + :'created_at' => :'created_at', + :'mapkind' => :'mapkind', + :'service' => :'service', + :'size' => :'size', + :'variant' => :'variant', + :'version' => :'version' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'arch' => :'String', + :'created_at' => :'Time', + :'mapkind' => :'String', + :'service' => :'String', + :'size' => :'Integer', + :'variant' => :'String', + :'version' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FlutterSourcemapAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'arch') + self.arch = attributes[:'arch'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'mapkind') + self.mapkind = attributes[:'mapkind'] + end + + if attributes.key?(:'service') + self.service = attributes[:'service'] + end + + if attributes.key?(:'size') + self.size = attributes[:'size'] + end + + if attributes.key?(:'variant') + self.variant = attributes[:'variant'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @created_at.nil? + return false if @mapkind.nil? + return false if @size.nil? + true + end + + # Custom attribute writer method with validation + # @param created_at [Object] Object to be assigned + # @!visibility private + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.' + end + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param mapkind [Object] Object to be assigned + # @!visibility private + def mapkind=(mapkind) + if mapkind.nil? + fail ArgumentError, 'invalid value for "mapkind", mapkind cannot be nil.' + end + @mapkind = mapkind + end + + # Custom attribute writer method with validation + # @param size [Object] Object to be assigned + # @!visibility private + def size=(size) + if size.nil? + fail ArgumentError, 'invalid value for "size", size cannot be nil.' + end + @size = size + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + arch == o.arch && + created_at == o.created_at && + mapkind == o.mapkind && + service == o.service && + size == o.size && + variant == o.variant && + version == o.version && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [arch, created_at, mapkind, service, size, variant, version, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/flutter_sourcemap_data.rb b/lib/datadog_api_client/v2/models/flutter_sourcemap_data.rb new file mode 100644 index 000000000000..f482152b782e --- /dev/null +++ b/lib/datadog_api_client/v2/models/flutter_sourcemap_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Flutter symbol file data object. + class FlutterSourcemapData + include BaseGenericModel + + # Attributes of a Flutter symbol file. + attr_reader :attributes + + # The unique identifier of the source map. + attr_reader :id + + # The resource type for source map objects. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'FlutterSourcemapAttributes', + :'id' => :'String', + :'type' => :'SourcemapDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FlutterSourcemapData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/il2_cpp_sourcemap_attributes.rb b/lib/datadog_api_client/v2/models/il2_cpp_sourcemap_attributes.rb new file mode 100644 index 000000000000..e70046e3dac8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/il2_cpp_sourcemap_attributes.rb @@ -0,0 +1,175 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of an IL2CPP mapping file. + class IL2CPPSourcemapAttributes + include BaseGenericModel + + # The build identifier (UUID format). + attr_accessor :build_id + + # The timestamp when the mapping file was created. + attr_reader :created_at + + # The type of source map. + attr_reader :mapkind + + # The size of the mapping file in bytes. + attr_reader :size + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'build_id' => :'build_id', + :'created_at' => :'created_at', + :'mapkind' => :'mapkind', + :'size' => :'size' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'build_id' => :'String', + :'created_at' => :'Time', + :'mapkind' => :'String', + :'size' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IL2CPPSourcemapAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'build_id') + self.build_id = attributes[:'build_id'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'mapkind') + self.mapkind = attributes[:'mapkind'] + end + + if attributes.key?(:'size') + self.size = attributes[:'size'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @created_at.nil? + return false if @mapkind.nil? + return false if @size.nil? + true + end + + # Custom attribute writer method with validation + # @param created_at [Object] Object to be assigned + # @!visibility private + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.' + end + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param mapkind [Object] Object to be assigned + # @!visibility private + def mapkind=(mapkind) + if mapkind.nil? + fail ArgumentError, 'invalid value for "mapkind", mapkind cannot be nil.' + end + @mapkind = mapkind + end + + # Custom attribute writer method with validation + # @param size [Object] Object to be assigned + # @!visibility private + def size=(size) + if size.nil? + fail ArgumentError, 'invalid value for "size", size cannot be nil.' + end + @size = size + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + build_id == o.build_id && + created_at == o.created_at && + mapkind == o.mapkind && + size == o.size && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [build_id, created_at, mapkind, size, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/il2_cpp_sourcemap_data.rb b/lib/datadog_api_client/v2/models/il2_cpp_sourcemap_data.rb new file mode 100644 index 000000000000..79a328a571cc --- /dev/null +++ b/lib/datadog_api_client/v2/models/il2_cpp_sourcemap_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # IL2CPP mapping file data object. + class IL2CPPSourcemapData + include BaseGenericModel + + # Attributes of an IL2CPP mapping file. + attr_reader :attributes + + # The unique identifier of the source map. + attr_reader :id + + # The resource type for source map objects. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'IL2CPPSourcemapAttributes', + :'id' => :'String', + :'type' => :'SourcemapDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IL2CPPSourcemapData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/ios_sourcemap_attributes.rb b/lib/datadog_api_client/v2/models/ios_sourcemap_attributes.rb new file mode 100644 index 000000000000..70a0eecfb98a --- /dev/null +++ b/lib/datadog_api_client/v2/models/ios_sourcemap_attributes.rb @@ -0,0 +1,175 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of an iOS dSYM source map. + class IOSSourcemapAttributes + include BaseGenericModel + + # The timestamp when the source map was created. + attr_reader :created_at + + # The type of source map. + attr_reader :mapkind + + # The size of the dSYM file in bytes. + attr_reader :size + + # The UUID(s) associated with the dSYM file. + attr_accessor :uuids + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_at' => :'created_at', + :'mapkind' => :'mapkind', + :'size' => :'size', + :'uuids' => :'uuids' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_at' => :'Time', + :'mapkind' => :'String', + :'size' => :'Integer', + :'uuids' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IOSSourcemapAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'mapkind') + self.mapkind = attributes[:'mapkind'] + end + + if attributes.key?(:'size') + self.size = attributes[:'size'] + end + + if attributes.key?(:'uuids') + self.uuids = attributes[:'uuids'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @created_at.nil? + return false if @mapkind.nil? + return false if @size.nil? + true + end + + # Custom attribute writer method with validation + # @param created_at [Object] Object to be assigned + # @!visibility private + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.' + end + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param mapkind [Object] Object to be assigned + # @!visibility private + def mapkind=(mapkind) + if mapkind.nil? + fail ArgumentError, 'invalid value for "mapkind", mapkind cannot be nil.' + end + @mapkind = mapkind + end + + # Custom attribute writer method with validation + # @param size [Object] Object to be assigned + # @!visibility private + def size=(size) + if size.nil? + fail ArgumentError, 'invalid value for "size", size cannot be nil.' + end + @size = size + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + created_at == o.created_at && + mapkind == o.mapkind && + size == o.size && + uuids == o.uuids && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created_at, mapkind, size, uuids, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/ios_sourcemap_data.rb b/lib/datadog_api_client/v2/models/ios_sourcemap_data.rb new file mode 100644 index 000000000000..0a29bb1389cf --- /dev/null +++ b/lib/datadog_api_client/v2/models/ios_sourcemap_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # iOS dSYM source map data object. + class IOSSourcemapData + include BaseGenericModel + + # Attributes of an iOS dSYM source map. + attr_reader :attributes + + # The unique identifier of the source map. + attr_reader :id + + # The resource type for source map objects. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'IOSSourcemapAttributes', + :'id' => :'String', + :'type' => :'SourcemapDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IOSSourcemapData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/js_sourcemap_attributes.rb b/lib/datadog_api_client/v2/models/js_sourcemap_attributes.rb new file mode 100644 index 000000000000..6ca64da6e5fe --- /dev/null +++ b/lib/datadog_api_client/v2/models/js_sourcemap_attributes.rb @@ -0,0 +1,255 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a JavaScript source map. + class JSSourcemapAttributes + include BaseGenericModel + + # The absolute path to the minified JavaScript file. + attr_accessor :absolute_path + + # The path to the source map in blob storage. + attr_accessor :blob_storage_sourcemap_path + + # The build identifier. + attr_accessor :build_id + + # The timestamp when the source map was created. + attr_reader :created_at + + # The domain associated with the source map. + attr_accessor :domain + + # The file name of the minified JavaScript file. + attr_accessor :file_name + + # The type of source map. + attr_reader :mapkind + + # The service name associated with the source map. + attr_accessor :service + + # The size of the source map file in bytes. + attr_reader :size + + # The source map variant. + attr_accessor :variant + + # The version of the service associated with the source map. + attr_accessor :version + + # The version code. + attr_accessor :version_code + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'absolute_path' => :'absolute_path', + :'blob_storage_sourcemap_path' => :'blob_storage_sourcemap_path', + :'build_id' => :'build_id', + :'created_at' => :'created_at', + :'domain' => :'domain', + :'file_name' => :'file_name', + :'mapkind' => :'mapkind', + :'service' => :'service', + :'size' => :'size', + :'variant' => :'variant', + :'version' => :'version', + :'version_code' => :'version_code' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'absolute_path' => :'String', + :'blob_storage_sourcemap_path' => :'String', + :'build_id' => :'String', + :'created_at' => :'Time', + :'domain' => :'String', + :'file_name' => :'String', + :'mapkind' => :'String', + :'service' => :'String', + :'size' => :'Integer', + :'variant' => :'String', + :'version' => :'String', + :'version_code' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JSSourcemapAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'absolute_path') + self.absolute_path = attributes[:'absolute_path'] + end + + if attributes.key?(:'blob_storage_sourcemap_path') + self.blob_storage_sourcemap_path = attributes[:'blob_storage_sourcemap_path'] + end + + if attributes.key?(:'build_id') + self.build_id = attributes[:'build_id'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'domain') + self.domain = attributes[:'domain'] + end + + if attributes.key?(:'file_name') + self.file_name = attributes[:'file_name'] + end + + if attributes.key?(:'mapkind') + self.mapkind = attributes[:'mapkind'] + end + + if attributes.key?(:'service') + self.service = attributes[:'service'] + end + + if attributes.key?(:'size') + self.size = attributes[:'size'] + end + + if attributes.key?(:'variant') + self.variant = attributes[:'variant'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + + if attributes.key?(:'version_code') + self.version_code = attributes[:'version_code'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @created_at.nil? + return false if @mapkind.nil? + return false if @size.nil? + true + end + + # Custom attribute writer method with validation + # @param created_at [Object] Object to be assigned + # @!visibility private + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.' + end + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param mapkind [Object] Object to be assigned + # @!visibility private + def mapkind=(mapkind) + if mapkind.nil? + fail ArgumentError, 'invalid value for "mapkind", mapkind cannot be nil.' + end + @mapkind = mapkind + end + + # Custom attribute writer method with validation + # @param size [Object] Object to be assigned + # @!visibility private + def size=(size) + if size.nil? + fail ArgumentError, 'invalid value for "size", size cannot be nil.' + end + @size = size + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + absolute_path == o.absolute_path && + blob_storage_sourcemap_path == o.blob_storage_sourcemap_path && + build_id == o.build_id && + created_at == o.created_at && + domain == o.domain && + file_name == o.file_name && + mapkind == o.mapkind && + service == o.service && + size == o.size && + variant == o.variant && + version == o.version && + version_code == o.version_code && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [absolute_path, blob_storage_sourcemap_path, build_id, created_at, domain, file_name, mapkind, service, size, variant, version, version_code, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/js_sourcemap_data.rb b/lib/datadog_api_client/v2/models/js_sourcemap_data.rb new file mode 100644 index 000000000000..89ff5dc709ab --- /dev/null +++ b/lib/datadog_api_client/v2/models/js_sourcemap_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # JavaScript source map data object. + class JSSourcemapData + include BaseGenericModel + + # Attributes of a JavaScript source map. + attr_reader :attributes + + # The unique identifier of the source map. + attr_reader :id + + # The resource type for source map objects. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'JSSourcemapAttributes', + :'id' => :'String', + :'type' => :'SourcemapDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JSSourcemapData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/jvm_sourcemap_attributes.rb b/lib/datadog_api_client/v2/models/jvm_sourcemap_attributes.rb new file mode 100644 index 000000000000..a639077f875c --- /dev/null +++ b/lib/datadog_api_client/v2/models/jvm_sourcemap_attributes.rb @@ -0,0 +1,215 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a JVM mapping file. + class JVMSourcemapAttributes + include BaseGenericModel + + # The build identifier (UUID format). + attr_accessor :build_id + + # The timestamp when the mapping file was created. + attr_reader :created_at + + # The type of source map. + attr_reader :mapkind + + # The service name associated with the mapping file. + attr_accessor :service + + # The size of the mapping file in bytes. + attr_reader :size + + # The build variant (e.g., `release`, `debug`). + attr_accessor :variant + + # The version of the service associated with the mapping file. + attr_accessor :version + + # The version code. + attr_accessor :version_code + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'build_id' => :'build_id', + :'created_at' => :'created_at', + :'mapkind' => :'mapkind', + :'service' => :'service', + :'size' => :'size', + :'variant' => :'variant', + :'version' => :'version', + :'version_code' => :'version_code' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'build_id' => :'String', + :'created_at' => :'Time', + :'mapkind' => :'String', + :'service' => :'String', + :'size' => :'Integer', + :'variant' => :'String', + :'version' => :'String', + :'version_code' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JVMSourcemapAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'build_id') + self.build_id = attributes[:'build_id'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'mapkind') + self.mapkind = attributes[:'mapkind'] + end + + if attributes.key?(:'service') + self.service = attributes[:'service'] + end + + if attributes.key?(:'size') + self.size = attributes[:'size'] + end + + if attributes.key?(:'variant') + self.variant = attributes[:'variant'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + + if attributes.key?(:'version_code') + self.version_code = attributes[:'version_code'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @created_at.nil? + return false if @mapkind.nil? + return false if @size.nil? + true + end + + # Custom attribute writer method with validation + # @param created_at [Object] Object to be assigned + # @!visibility private + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.' + end + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param mapkind [Object] Object to be assigned + # @!visibility private + def mapkind=(mapkind) + if mapkind.nil? + fail ArgumentError, 'invalid value for "mapkind", mapkind cannot be nil.' + end + @mapkind = mapkind + end + + # Custom attribute writer method with validation + # @param size [Object] Object to be assigned + # @!visibility private + def size=(size) + if size.nil? + fail ArgumentError, 'invalid value for "size", size cannot be nil.' + end + @size = size + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + build_id == o.build_id && + created_at == o.created_at && + mapkind == o.mapkind && + service == o.service && + size == o.size && + variant == o.variant && + version == o.version && + version_code == o.version_code && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [build_id, created_at, mapkind, service, size, variant, version, version_code, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/jvm_sourcemap_data.rb b/lib/datadog_api_client/v2/models/jvm_sourcemap_data.rb new file mode 100644 index 000000000000..56e8f18f5194 --- /dev/null +++ b/lib/datadog_api_client/v2/models/jvm_sourcemap_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # JVM (ProGuard/R8) mapping file data object. + class JVMSourcemapData + include BaseGenericModel + + # Attributes of a JVM mapping file. + attr_reader :attributes + + # The unique identifier of the source map. + attr_reader :id + + # The resource type for source map objects. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'JVMSourcemapAttributes', + :'id' => :'String', + :'type' => :'SourcemapDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::JVMSourcemapData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/list_sourcemaps_response.rb b/lib/datadog_api_client/v2/models/list_sourcemaps_response.rb new file mode 100644 index 000000000000..068e87a4bb88 --- /dev/null +++ b/lib/datadog_api_client/v2/models/list_sourcemaps_response.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response containing a paginated list of source maps. + class ListSourcemapsResponse + include BaseGenericModel + + # List of source map data objects. + attr_reader :data + + # Pagination metadata for the source maps list response. + attr_accessor :meta + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'meta' => :'meta' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array', + :'meta' => :'SourcemapsListMeta' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ListSourcemapsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + meta == o.meta && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, meta, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experiment_data_attributes_request.rb b/lib/datadog_api_client/v2/models/llm_obs_experiment_data_attributes_request.rb index e46de8fd97ce..386751963605 100644 --- a/lib/datadog_api_client/v2/models/llm_obs_experiment_data_attributes_request.rb +++ b/lib/datadog_api_client/v2/models/llm_obs_experiment_data_attributes_request.rb @@ -25,7 +25,7 @@ class LLMObsExperimentDataAttributesRequest attr_accessor :config # Identifier of the dataset used in this experiment. - attr_reader :dataset_id + attr_accessor :dataset_id # Version of the dataset to use. Defaults to the current version if not specified. attr_accessor :dataset_version @@ -42,9 +42,15 @@ class LLMObsExperimentDataAttributesRequest # Name of the experiment. attr_reader :name + # Identifier of the parent (baseline) experiment this experiment is run against. + attr_accessor :parent_experiment_id + # Identifier of the project this experiment belongs to. attr_reader :project_id + # Number of runs configured for this experiment. + attr_reader :run_count + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. @@ -58,7 +64,9 @@ def self.attribute_map :'ensure_unique' => :'ensure_unique', :'metadata' => :'metadata', :'name' => :'name', - :'project_id' => :'project_id' + :'parent_experiment_id' => :'parent_experiment_id', + :'project_id' => :'project_id', + :'run_count' => :'run_count' } end @@ -73,7 +81,9 @@ def self.openapi_types :'ensure_unique' => :'Boolean', :'metadata' => :'Hash', :'name' => :'String', - :'project_id' => :'String' + :'parent_experiment_id' => :'String', + :'project_id' => :'String', + :'run_count' => :'Integer' } end @@ -123,31 +133,29 @@ def initialize(attributes = {}) self.name = attributes[:'name'] end + if attributes.key?(:'parent_experiment_id') + self.parent_experiment_id = attributes[:'parent_experiment_id'] + end + if attributes.key?(:'project_id') self.project_id = attributes[:'project_id'] end + + if attributes.key?(:'run_count') + self.run_count = attributes[:'run_count'] + end end # Check to see if the all the properties in the model are valid # @return true if the model is valid # @!visibility private def valid? - return false if @dataset_id.nil? return false if @name.nil? return false if @project_id.nil? + return false if !@run_count.nil? && @run_count > 2147483647 true end - # Custom attribute writer method with validation - # @param dataset_id [Object] Object to be assigned - # @!visibility private - def dataset_id=(dataset_id) - if dataset_id.nil? - fail ArgumentError, 'invalid value for "dataset_id", dataset_id cannot be nil.' - end - @dataset_id = dataset_id - end - # Custom attribute writer method with validation # @param name [Object] Object to be assigned # @!visibility private @@ -168,6 +176,16 @@ def project_id=(project_id) @project_id = project_id end + # Custom attribute writer method with validation + # @param run_count [Object] Object to be assigned + # @!visibility private + def run_count=(run_count) + if !run_count.nil? && run_count > 2147483647 + fail ArgumentError, 'invalid value for "run_count", must be smaller than or equal to 2147483647.' + end + @run_count = run_count + end + # Returns the object in the form of hash, with additionalProperties support. # @return [Hash] Returns the object in the form of hash # @!visibility private @@ -201,7 +219,9 @@ def ==(o) ensure_unique == o.ensure_unique && metadata == o.metadata && name == o.name && + parent_experiment_id == o.parent_experiment_id && project_id == o.project_id && + run_count == o.run_count && additional_properties == o.additional_properties end @@ -209,7 +229,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [config, dataset_id, dataset_version, description, ensure_unique, metadata, name, project_id, additional_properties].hash + [config, dataset_id, dataset_version, description, ensure_unique, metadata, name, parent_experiment_id, project_id, run_count, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experiment_data_attributes_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experiment_data_attributes_response.rb index 6a3f256b3ce4..12595c04149c 100644 --- a/lib/datadog_api_client/v2/models/llm_obs_experiment_data_attributes_response.rb +++ b/lib/datadog_api_client/v2/models/llm_obs_experiment_data_attributes_response.rb @@ -21,6 +21,12 @@ module DatadogAPIClient::V2 class LLMObsExperimentDataAttributesResponse include BaseGenericModel + # Pre-computed aggregate metrics for this experiment run, including eval score distributions, token costs, and error rates. + attr_accessor :aggregate_data + + # User data for the author of an experiment. Only present when `include[user_data]` is `true`. + attr_accessor :author + # Configuration parameters for the experiment. attr_accessor :config @@ -30,18 +36,43 @@ class LLMObsExperimentDataAttributesResponse # Identifier of the dataset used in this experiment. attr_reader :dataset_id + # Name of the dataset used in this experiment. + # Only present when `include[dataset_names]` is `true`. + attr_accessor :dataset_name + + # Version of the dataset used in this experiment. + attr_accessor :dataset_version + + # Timestamp when the experiment was soft-deleted, if applicable. + attr_accessor :deleted_at + # Description of the experiment. attr_accessor :description + # Error message describing why the experiment failed, if applicable. + attr_accessor :error + + # Logical name of the experiment, shared across all runs of the same pipeline. + attr_accessor :experiment + # Arbitrary metadata associated with the experiment. attr_accessor :metadata # Name of the experiment. attr_reader :name + # Identifier of the parent (baseline) experiment this experiment was run against, if any. + attr_accessor :parent_experiment_id + # Identifier of the project this experiment belongs to. attr_reader :project_id + # Expected number of runs for this experiment. + attr_reader :run_count + + # Execution status of an LLM Observability experiment. + attr_accessor :status + # Timestamp when the experiment was last updated. attr_reader :updated_at @@ -51,13 +82,23 @@ class LLMObsExperimentDataAttributesResponse # @!visibility private def self.attribute_map { + :'aggregate_data' => :'aggregate_data', + :'author' => :'author', :'config' => :'config', :'created_at' => :'created_at', :'dataset_id' => :'dataset_id', + :'dataset_name' => :'dataset_name', + :'dataset_version' => :'dataset_version', + :'deleted_at' => :'deleted_at', :'description' => :'description', + :'error' => :'error', + :'experiment' => :'experiment', :'metadata' => :'metadata', :'name' => :'name', + :'parent_experiment_id' => :'parent_experiment_id', :'project_id' => :'project_id', + :'run_count' => :'run_count', + :'status' => :'status', :'updated_at' => :'updated_at' } end @@ -66,13 +107,23 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'aggregate_data' => :'Hash', + :'author' => :'LLMObsExperimentUser', :'config' => :'Hash', :'created_at' => :'Time', :'dataset_id' => :'String', + :'dataset_name' => :'String', + :'dataset_version' => :'Integer', + :'deleted_at' => :'Time', :'description' => :'String', + :'error' => :'String', + :'experiment' => :'String', :'metadata' => :'Hash', :'name' => :'String', + :'parent_experiment_id' => :'String', :'project_id' => :'String', + :'run_count' => :'Integer', + :'status' => :'LLMObsExperimentStatus', :'updated_at' => :'Time' } end @@ -81,9 +132,14 @@ def self.openapi_types # @!visibility private def self.openapi_nullable Set.new([ + :'aggregate_data', :'config', + :'dataset_name', + :'deleted_at', :'description', + :'error', :'metadata', + :'parent_experiment_id', ]) end @@ -105,6 +161,14 @@ def initialize(attributes = {}) end } + if attributes.key?(:'aggregate_data') + self.aggregate_data = attributes[:'aggregate_data'] + end + + if attributes.key?(:'author') + self.author = attributes[:'author'] + end + if attributes.key?(:'config') self.config = attributes[:'config'] end @@ -117,10 +181,30 @@ def initialize(attributes = {}) self.dataset_id = attributes[:'dataset_id'] end + if attributes.key?(:'dataset_name') + self.dataset_name = attributes[:'dataset_name'] + end + + if attributes.key?(:'dataset_version') + self.dataset_version = attributes[:'dataset_version'] + end + + if attributes.key?(:'deleted_at') + self.deleted_at = attributes[:'deleted_at'] + end + if attributes.key?(:'description') self.description = attributes[:'description'] end + if attributes.key?(:'error') + self.error = attributes[:'error'] + end + + if attributes.key?(:'experiment') + self.experiment = attributes[:'experiment'] + end + if attributes.key?(:'metadata') self.metadata = attributes[:'metadata'] end @@ -129,10 +213,22 @@ def initialize(attributes = {}) self.name = attributes[:'name'] end + if attributes.key?(:'parent_experiment_id') + self.parent_experiment_id = attributes[:'parent_experiment_id'] + end + if attributes.key?(:'project_id') self.project_id = attributes[:'project_id'] end + if attributes.key?(:'run_count') + self.run_count = attributes[:'run_count'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] end @@ -146,6 +242,7 @@ def valid? return false if @dataset_id.nil? return false if @name.nil? return false if @project_id.nil? + return false if !@run_count.nil? && @run_count > 2147483647 return false if @updated_at.nil? true end @@ -190,6 +287,16 @@ def project_id=(project_id) @project_id = project_id end + # Custom attribute writer method with validation + # @param run_count [Object] Object to be assigned + # @!visibility private + def run_count=(run_count) + if !run_count.nil? && run_count > 2147483647 + fail ArgumentError, 'invalid value for "run_count", must be smaller than or equal to 2147483647.' + end + @run_count = run_count + end + # Custom attribute writer method with validation # @param updated_at [Object] Object to be assigned # @!visibility private @@ -226,13 +333,23 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + aggregate_data == o.aggregate_data && + author == o.author && config == o.config && created_at == o.created_at && dataset_id == o.dataset_id && + dataset_name == o.dataset_name && + dataset_version == o.dataset_version && + deleted_at == o.deleted_at && description == o.description && + error == o.error && + experiment == o.experiment && metadata == o.metadata && name == o.name && + parent_experiment_id == o.parent_experiment_id && project_id == o.project_id && + run_count == o.run_count && + status == o.status && updated_at == o.updated_at && additional_properties == o.additional_properties end @@ -241,7 +358,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [config, created_at, dataset_id, description, metadata, name, project_id, updated_at, additional_properties].hash + [aggregate_data, author, config, created_at, dataset_id, dataset_name, dataset_version, deleted_at, description, error, experiment, metadata, name, parent_experiment_id, project_id, run_count, status, updated_at, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experiment_span_data_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experiment_span_data_response.rb new file mode 100644 index 000000000000..bf5f87f6fdd3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experiment_span_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # JSON:API data item wrapping a single experiment span with evaluations. + class LLMObsExperimentSpanDataResponse + include BaseGenericModel + + # An experiment span enriched with its associated evaluation metrics. + attr_reader :attributes + + # Unique identifier of the span. + attr_reader :id + + # Resource type for a span item in an experiment spans response. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'LLMObsExperimentSpanWithEvals', + :'id' => :'String', + :'type' => :'LLMObsExperimentSpanType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LLMObsExperimentSpanDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experiment_span_type.rb b/lib/datadog_api_client/v2/models/llm_obs_experiment_span_type.rb new file mode 100644 index 000000000000..cc1a3c7974cf --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experiment_span_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Resource type for a span item in an experiment spans response. + class LLMObsExperimentSpanType + include BaseEnumModel + + EXPERIMENTS_SPAN = "experiments".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experiment_spans_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experiment_spans_response.rb new file mode 100644 index 000000000000..1dab203af948 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experiment_spans_response.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response for listing experiment spans (v1). Returns only spans with their evaluation metrics. No summary metrics or pagination are included. Deprecated in favor of `ListLLMObsExperimentEventsV3`. + class LLMObsExperimentSpansResponse + include BaseGenericModel + + # List of experiment spans with their evaluation metrics. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LLMObsExperimentSpansResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experiment_status.rb b/lib/datadog_api_client/v2/models/llm_obs_experiment_status.rb new file mode 100644 index 000000000000..06d544977b71 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experiment_status.rb @@ -0,0 +1,29 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Execution status of an LLM Observability experiment. + class LLMObsExperimentStatus + include BaseEnumModel + + RUNNING = "running".freeze + COMPLETED = "completed".freeze + FAILED = "failed".freeze + INTERRUPTED = "interrupted".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experiment_update_data_attributes_request.rb b/lib/datadog_api_client/v2/models/llm_obs_experiment_update_data_attributes_request.rb index 1b3f52147c75..3673d4f596ad 100644 --- a/lib/datadog_api_client/v2/models/llm_obs_experiment_update_data_attributes_request.rb +++ b/lib/datadog_api_client/v2/models/llm_obs_experiment_update_data_attributes_request.rb @@ -21,20 +21,36 @@ module DatadogAPIClient::V2 class LLMObsExperimentUpdateDataAttributesRequest include BaseGenericModel + # Updated identifier of the dataset used in this experiment. + attr_accessor :dataset_id + # Updated description of the experiment. attr_accessor :description + # Error message describing why the experiment failed, if applicable. + attr_accessor :error + + # Updated arbitrary metadata associated with the experiment. + attr_accessor :metadata + # Updated name of the experiment. attr_accessor :name + # Execution status of an LLM Observability experiment. + attr_accessor :status + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map { + :'dataset_id' => :'dataset_id', :'description' => :'description', - :'name' => :'name' + :'error' => :'error', + :'metadata' => :'metadata', + :'name' => :'name', + :'status' => :'status' } end @@ -42,8 +58,12 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'dataset_id' => :'String', :'description' => :'String', - :'name' => :'String' + :'error' => :'String', + :'metadata' => :'Hash', + :'name' => :'String', + :'status' => :'LLMObsExperimentStatus' } end @@ -65,13 +85,29 @@ def initialize(attributes = {}) end } + if attributes.key?(:'dataset_id') + self.dataset_id = attributes[:'dataset_id'] + end + if attributes.key?(:'description') self.description = attributes[:'description'] end + if attributes.key?(:'error') + self.error = attributes[:'error'] + end + + if attributes.key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + if attributes.key?(:'name') self.name = attributes[:'name'] end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end end # Returns the object in the form of hash, with additionalProperties support. @@ -100,8 +136,12 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + dataset_id == o.dataset_id && description == o.description && + error == o.error && + metadata == o.metadata && name == o.name && + status == o.status && additional_properties == o.additional_properties end @@ -109,7 +149,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [description, name, additional_properties].hash + [dataset_id, description, error, metadata, name, status, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experiment_user.rb b/lib/datadog_api_client/v2/models/llm_obs_experiment_user.rb new file mode 100644 index 000000000000..86aa01bca344 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experiment_user.rb @@ -0,0 +1,145 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # User data for the author of an experiment. Only present when `include[user_data]` is `true`. + class LLMObsExperimentUser + include BaseGenericModel + + # Email address of the user. + attr_accessor :email + + # Username or handle associated with the user's Datadog account. + attr_accessor :handle + + # URL of the user's icon. + attr_accessor :icon + + # Unique identifier of the user. + attr_accessor :id + + # Display name of the user. + attr_accessor :name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'email' => :'email', + :'handle' => :'handle', + :'icon' => :'icon', + :'id' => :'id', + :'name' => :'name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'email' => :'String', + :'handle' => :'String', + :'icon' => :'String', + :'id' => :'String', + :'name' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LLMObsExperimentUser` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'handle') + self.handle = attributes[:'handle'] + end + + if attributes.key?(:'icon') + self.icon = attributes[:'icon'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + email == o.email && + handle == o.handle && + icon == o.icon && + id == o.id && + name == o.name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [email, handle, icon, id, name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/ndk_sourcemap_attributes.rb b/lib/datadog_api_client/v2/models/ndk_sourcemap_attributes.rb new file mode 100644 index 000000000000..9f8f4693fb04 --- /dev/null +++ b/lib/datadog_api_client/v2/models/ndk_sourcemap_attributes.rb @@ -0,0 +1,195 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of an Android NDK symbol file. + class NDKSourcemapAttributes + include BaseGenericModel + + # The target CPU architecture. + attr_accessor :arch + + # The build identifier (UUID format). + attr_accessor :build_id + + # The timestamp when the symbol file was created. + attr_reader :created_at + + # The NDK library file name. + attr_accessor :file_name + + # The type of source map. + attr_reader :mapkind + + # The size of the symbol file in bytes. + attr_reader :size + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'arch' => :'arch', + :'build_id' => :'build_id', + :'created_at' => :'created_at', + :'file_name' => :'file_name', + :'mapkind' => :'mapkind', + :'size' => :'size' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'arch' => :'String', + :'build_id' => :'String', + :'created_at' => :'Time', + :'file_name' => :'String', + :'mapkind' => :'String', + :'size' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::NDKSourcemapAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'arch') + self.arch = attributes[:'arch'] + end + + if attributes.key?(:'build_id') + self.build_id = attributes[:'build_id'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'file_name') + self.file_name = attributes[:'file_name'] + end + + if attributes.key?(:'mapkind') + self.mapkind = attributes[:'mapkind'] + end + + if attributes.key?(:'size') + self.size = attributes[:'size'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @created_at.nil? + return false if @mapkind.nil? + return false if @size.nil? + true + end + + # Custom attribute writer method with validation + # @param created_at [Object] Object to be assigned + # @!visibility private + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.' + end + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param mapkind [Object] Object to be assigned + # @!visibility private + def mapkind=(mapkind) + if mapkind.nil? + fail ArgumentError, 'invalid value for "mapkind", mapkind cannot be nil.' + end + @mapkind = mapkind + end + + # Custom attribute writer method with validation + # @param size [Object] Object to be assigned + # @!visibility private + def size=(size) + if size.nil? + fail ArgumentError, 'invalid value for "size", size cannot be nil.' + end + @size = size + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + arch == o.arch && + build_id == o.build_id && + created_at == o.created_at && + file_name == o.file_name && + mapkind == o.mapkind && + size == o.size && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [arch, build_id, created_at, file_name, mapkind, size, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/ndk_sourcemap_data.rb b/lib/datadog_api_client/v2/models/ndk_sourcemap_data.rb new file mode 100644 index 000000000000..98f62c1f638b --- /dev/null +++ b/lib/datadog_api_client/v2/models/ndk_sourcemap_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Android NDK symbol file data object. + class NDKSourcemapData + include BaseGenericModel + + # Attributes of an Android NDK symbol file. + attr_reader :attributes + + # The unique identifier of the source map. + attr_reader :id + + # The resource type for source map objects. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'NDKSourcemapAttributes', + :'id' => :'String', + :'type' => :'SourcemapDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::NDKSourcemapData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/react_native_sourcemap_attributes.rb b/lib/datadog_api_client/v2/models/react_native_sourcemap_attributes.rb new file mode 100644 index 000000000000..7eb3ff051768 --- /dev/null +++ b/lib/datadog_api_client/v2/models/react_native_sourcemap_attributes.rb @@ -0,0 +1,235 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a React Native source map. + class ReactNativeSourcemapAttributes + include BaseGenericModel + + # The build number. + attr_accessor :build_number + + # The bundle name. + attr_accessor :bundle_name + + # The bundle version. + attr_accessor :bundle_version + + # The timestamp when the source map was created. + attr_reader :created_at + + # The debug identifier (UUID format). + attr_accessor :debug_id + + # The type of source map. + attr_reader :mapkind + + # The platform the source map was built for (e.g., `ios`, `android`). + attr_accessor :platform + + # The service name associated with the source map. + attr_accessor :service + + # The size of the source map file in bytes. + attr_reader :size + + # The version of the service associated with the source map. + attr_accessor :version + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'build_number' => :'build_number', + :'bundle_name' => :'bundle_name', + :'bundle_version' => :'bundle_version', + :'created_at' => :'created_at', + :'debug_id' => :'debug_id', + :'mapkind' => :'mapkind', + :'platform' => :'platform', + :'service' => :'service', + :'size' => :'size', + :'version' => :'version' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'build_number' => :'String', + :'bundle_name' => :'String', + :'bundle_version' => :'String', + :'created_at' => :'Time', + :'debug_id' => :'String', + :'mapkind' => :'String', + :'platform' => :'String', + :'service' => :'String', + :'size' => :'Integer', + :'version' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReactNativeSourcemapAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'build_number') + self.build_number = attributes[:'build_number'] + end + + if attributes.key?(:'bundle_name') + self.bundle_name = attributes[:'bundle_name'] + end + + if attributes.key?(:'bundle_version') + self.bundle_version = attributes[:'bundle_version'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'debug_id') + self.debug_id = attributes[:'debug_id'] + end + + if attributes.key?(:'mapkind') + self.mapkind = attributes[:'mapkind'] + end + + if attributes.key?(:'platform') + self.platform = attributes[:'platform'] + end + + if attributes.key?(:'service') + self.service = attributes[:'service'] + end + + if attributes.key?(:'size') + self.size = attributes[:'size'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @created_at.nil? + return false if @mapkind.nil? + return false if @size.nil? + true + end + + # Custom attribute writer method with validation + # @param created_at [Object] Object to be assigned + # @!visibility private + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.' + end + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param mapkind [Object] Object to be assigned + # @!visibility private + def mapkind=(mapkind) + if mapkind.nil? + fail ArgumentError, 'invalid value for "mapkind", mapkind cannot be nil.' + end + @mapkind = mapkind + end + + # Custom attribute writer method with validation + # @param size [Object] Object to be assigned + # @!visibility private + def size=(size) + if size.nil? + fail ArgumentError, 'invalid value for "size", size cannot be nil.' + end + @size = size + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + build_number == o.build_number && + bundle_name == o.bundle_name && + bundle_version == o.bundle_version && + created_at == o.created_at && + debug_id == o.debug_id && + mapkind == o.mapkind && + platform == o.platform && + service == o.service && + size == o.size && + version == o.version && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [build_number, bundle_name, bundle_version, created_at, debug_id, mapkind, platform, service, size, version, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/react_native_sourcemap_data.rb b/lib/datadog_api_client/v2/models/react_native_sourcemap_data.rb new file mode 100644 index 000000000000..808d9b06059d --- /dev/null +++ b/lib/datadog_api_client/v2/models/react_native_sourcemap_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # React Native source map data object. + class ReactNativeSourcemapData + include BaseGenericModel + + # Attributes of a React Native source map. + attr_reader :attributes + + # The unique identifier of the source map. + attr_reader :id + + # The resource type for source map objects. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ReactNativeSourcemapAttributes', + :'id' => :'String', + :'type' => :'SourcemapDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ReactNativeSourcemapData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_repository_info_data_type.rb b/lib/datadog_api_client/v2/models/service_repository_info_data_type.rb new file mode 100644 index 000000000000..c69cda8e0acb --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_repository_info_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The resource type for service repository info objects. + class ServiceRepositoryInfoDataType + include BaseEnumModel + + SERVICE_REPOSITORY_INFO = "service_repository_info".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/service_repository_info_request.rb b/lib/datadog_api_client/v2/models/service_repository_info_request.rb new file mode 100644 index 000000000000..00eccfd68214 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_repository_info_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request body for retrieving service repository information. + class ServiceRepositoryInfoRequest + include BaseGenericModel + + # Data object for the service repository info request. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ServiceRepositoryInfoRequestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceRepositoryInfoRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_repository_info_request_attributes.rb b/lib/datadog_api_client/v2/models/service_repository_info_request_attributes.rb new file mode 100644 index 000000000000..be893e2fb74e --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_repository_info_request_attributes.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for the service repository info request. + class ServiceRepositoryInfoRequestAttributes + include BaseGenericModel + + # The name of the service. + attr_reader :service + + # The version of the service. + attr_reader :version + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'service' => :'service', + :'version' => :'version' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'service' => :'String', + :'version' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceRepositoryInfoRequestAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'service') + self.service = attributes[:'service'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @service.nil? + return false if @version.nil? + true + end + + # Custom attribute writer method with validation + # @param service [Object] Object to be assigned + # @!visibility private + def service=(service) + if service.nil? + fail ArgumentError, 'invalid value for "service", service cannot be nil.' + end + @service = service + end + + # Custom attribute writer method with validation + # @param version [Object] Object to be assigned + # @!visibility private + def version=(version) + if version.nil? + fail ArgumentError, 'invalid value for "version", version cannot be nil.' + end + @version = version + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + service == o.service && + version == o.version && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [service, version, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_repository_info_request_data.rb b/lib/datadog_api_client/v2/models/service_repository_info_request_data.rb new file mode 100644 index 000000000000..2b944d95a7c8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_repository_info_request_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data object for the service repository info request. + class ServiceRepositoryInfoRequestData + include BaseGenericModel + + # Attributes for the service repository info request. + attr_reader :attributes + + # The resource type for service repository info objects. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ServiceRepositoryInfoRequestAttributes', + :'type' => :'ServiceRepositoryInfoDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceRepositoryInfoRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_repository_info_response.rb b/lib/datadog_api_client/v2/models/service_repository_info_response.rb new file mode 100644 index 000000000000..73e340f05f44 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_repository_info_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response containing service repository information. + class ServiceRepositoryInfoResponse + include BaseGenericModel + + # Data object for the service repository info response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ServiceRepositoryInfoResponseData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceRepositoryInfoResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_repository_info_response_attributes.rb b/lib/datadog_api_client/v2/models/service_repository_info_response_attributes.rb new file mode 100644 index 000000000000..630d084f7d9e --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_repository_info_response_attributes.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of the service repository information. + class ServiceRepositoryInfoResponseAttributes + include BaseGenericModel + + # The SHA of the commit associated with the service version. + attr_accessor :commit_sha + + # The URL of the source code repository. + attr_accessor :repository_url + + # The status of the service repository info lookup. + attr_reader :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'commit_sha' => :'commit_sha', + :'repository_url' => :'repository_url', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'commit_sha' => :'String', + :'repository_url' => :'String', + :'status' => :'ServiceRepositoryInfoStatus' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceRepositoryInfoResponseAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'commit_sha') + self.commit_sha = attributes[:'commit_sha'] + end + + if attributes.key?(:'repository_url') + self.repository_url = attributes[:'repository_url'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param status [Object] Object to be assigned + # @!visibility private + def status=(status) + if status.nil? + fail ArgumentError, 'invalid value for "status", status cannot be nil.' + end + @status = status + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + commit_sha == o.commit_sha && + repository_url == o.repository_url && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [commit_sha, repository_url, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_repository_info_response_data.rb b/lib/datadog_api_client/v2/models/service_repository_info_response_data.rb new file mode 100644 index 000000000000..ff4e6278ce1a --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_repository_info_response_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data object for the service repository info response. + class ServiceRepositoryInfoResponseData + include BaseGenericModel + + # Attributes of the service repository information. + attr_reader :attributes + + # The identifier composed of the service name and version. + attr_reader :id + + # The resource type for service repository info objects. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ServiceRepositoryInfoResponseAttributes', + :'id' => :'String', + :'type' => :'ServiceRepositoryInfoDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ServiceRepositoryInfoResponseData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/service_repository_info_status.rb b/lib/datadog_api_client/v2/models/service_repository_info_status.rb new file mode 100644 index 000000000000..ea0e258536b9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/service_repository_info_status.rb @@ -0,0 +1,30 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The status of the service repository info lookup. + class ServiceRepositoryInfoStatus + include BaseEnumModel + + SUCCESS = "success".freeze + NOT_FOUND = "not_found".freeze + NO_REPOSITORY = "no_repository".freeze + INTERNAL_ERROR = "internal_error".freeze + UNKNOWN = "unknown".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/sourcemap_data_type.rb b/lib/datadog_api_client/v2/models/sourcemap_data_type.rb new file mode 100644 index 000000000000..83e2609e05bf --- /dev/null +++ b/lib/datadog_api_client/v2/models/sourcemap_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The resource type for source map objects. + class SourcemapDataType + include BaseEnumModel + + SOURCEMAPS = "sourcemaps".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/sourcemap_file_attributes.rb b/lib/datadog_api_client/v2/models/sourcemap_file_attributes.rb new file mode 100644 index 000000000000..072c9d97419f --- /dev/null +++ b/lib/datadog_api_client/v2/models/sourcemap_file_attributes.rb @@ -0,0 +1,279 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a JavaScript source map file. + class SourcemapFileAttributes + include BaseGenericModel + + # The name of the minified JavaScript file. + attr_reader :file + + # The Base64 VLQ encoded string that maps positions in the minified + # file to positions in the original source files. + attr_reader :mappings + + # List of character counts for each line in the minified file. + attr_reader :minified_line_lengths + + # List of symbol names referenced in the mappings. + attr_reader :names + + # The root path prepended to source file paths. + attr_reader :source_root + + # List of original source file paths. + attr_reader :sources + + # List of original source file contents corresponding to the paths in `sources`. + attr_reader :sources_content + + # The version of the source map format (typically 3). + attr_reader :version + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'file' => :'file', + :'mappings' => :'mappings', + :'minified_line_lengths' => :'minifiedLineLengths', + :'names' => :'names', + :'source_root' => :'sourceRoot', + :'sources' => :'sources', + :'sources_content' => :'sourcesContent', + :'version' => :'version' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'file' => :'String', + :'mappings' => :'String', + :'minified_line_lengths' => :'Array', + :'names' => :'Array', + :'source_root' => :'String', + :'sources' => :'Array', + :'sources_content' => :'Array', + :'version' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SourcemapFileAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'file') + self.file = attributes[:'file'] + end + + if attributes.key?(:'mappings') + self.mappings = attributes[:'mappings'] + end + + if attributes.key?(:'minified_line_lengths') + if (value = attributes[:'minified_line_lengths']).is_a?(Array) + self.minified_line_lengths = value + end + end + + if attributes.key?(:'names') + if (value = attributes[:'names']).is_a?(Array) + self.names = value + end + end + + if attributes.key?(:'source_root') + self.source_root = attributes[:'source_root'] + end + + if attributes.key?(:'sources') + if (value = attributes[:'sources']).is_a?(Array) + self.sources = value + end + end + + if attributes.key?(:'sources_content') + if (value = attributes[:'sources_content']).is_a?(Array) + self.sources_content = value + end + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @file.nil? + return false if @mappings.nil? + return false if @minified_line_lengths.nil? + return false if @names.nil? + return false if @source_root.nil? + return false if @sources.nil? + return false if @sources_content.nil? + return false if @version.nil? + true + end + + # Custom attribute writer method with validation + # @param file [Object] Object to be assigned + # @!visibility private + def file=(file) + if file.nil? + fail ArgumentError, 'invalid value for "file", file cannot be nil.' + end + @file = file + end + + # Custom attribute writer method with validation + # @param mappings [Object] Object to be assigned + # @!visibility private + def mappings=(mappings) + if mappings.nil? + fail ArgumentError, 'invalid value for "mappings", mappings cannot be nil.' + end + @mappings = mappings + end + + # Custom attribute writer method with validation + # @param minified_line_lengths [Object] Object to be assigned + # @!visibility private + def minified_line_lengths=(minified_line_lengths) + if minified_line_lengths.nil? + fail ArgumentError, 'invalid value for "minified_line_lengths", minified_line_lengths cannot be nil.' + end + @minified_line_lengths = minified_line_lengths + end + + # Custom attribute writer method with validation + # @param names [Object] Object to be assigned + # @!visibility private + def names=(names) + if names.nil? + fail ArgumentError, 'invalid value for "names", names cannot be nil.' + end + @names = names + end + + # Custom attribute writer method with validation + # @param source_root [Object] Object to be assigned + # @!visibility private + def source_root=(source_root) + if source_root.nil? + fail ArgumentError, 'invalid value for "source_root", source_root cannot be nil.' + end + @source_root = source_root + end + + # Custom attribute writer method with validation + # @param sources [Object] Object to be assigned + # @!visibility private + def sources=(sources) + if sources.nil? + fail ArgumentError, 'invalid value for "sources", sources cannot be nil.' + end + @sources = sources + end + + # Custom attribute writer method with validation + # @param sources_content [Object] Object to be assigned + # @!visibility private + def sources_content=(sources_content) + if sources_content.nil? + fail ArgumentError, 'invalid value for "sources_content", sources_content cannot be nil.' + end + @sources_content = sources_content + end + + # Custom attribute writer method with validation + # @param version [Object] Object to be assigned + # @!visibility private + def version=(version) + if version.nil? + fail ArgumentError, 'invalid value for "version", version cannot be nil.' + end + @version = version + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + file == o.file && + mappings == o.mappings && + minified_line_lengths == o.minified_line_lengths && + names == o.names && + source_root == o.source_root && + sources == o.sources && + sources_content == o.sources_content && + version == o.version && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [file, mappings, minified_line_lengths, names, source_root, sources, sources_content, version, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sourcemap_file_data.rb b/lib/datadog_api_client/v2/models/sourcemap_file_data.rb new file mode 100644 index 000000000000..2218a184a91d --- /dev/null +++ b/lib/datadog_api_client/v2/models/sourcemap_file_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # JavaScript source map file data object. + class SourcemapFileData + include BaseGenericModel + + # Attributes of a JavaScript source map file. + attr_reader :attributes + + # The unique identifier of the source map file, typically the path to the file. + attr_reader :id + + # The resource type for source map file objects. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'SourcemapFileAttributes', + :'id' => :'String', + :'type' => :'SourcemapFileDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SourcemapFileData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sourcemap_file_data_type.rb b/lib/datadog_api_client/v2/models/sourcemap_file_data_type.rb new file mode 100644 index 000000000000..a2669cff7c26 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sourcemap_file_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The resource type for source map file objects. + class SourcemapFileDataType + include BaseEnumModel + + SOURCEMAP_FILES = "sourcemap_files".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/sourcemap_file_response.rb b/lib/datadog_api_client/v2/models/sourcemap_file_response.rb new file mode 100644 index 000000000000..eaa943d07c50 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sourcemap_file_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response containing a JavaScript source map file. + class SourcemapFileResponse + include BaseGenericModel + + # JavaScript source map file data object. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'SourcemapFileData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SourcemapFileResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sourcemap_item.rb b/lib/datadog_api_client/v2/models/sourcemap_item.rb new file mode 100644 index 000000000000..d4edd76e6370 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sourcemap_item.rb @@ -0,0 +1,69 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A source map data object representing one of the supported map kinds. + module SourcemapItem + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'JSSourcemapData', + :'ReactNativeSourcemapData', + :'IOSSourcemapData', + :'JVMSourcemapData', + :'FlutterSourcemapData', + :'ELFSourcemapData', + :'NDKSourcemapData', + :'IL2CPPSourcemapData' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/sourcemap_map_kind.rb b/lib/datadog_api_client/v2/models/sourcemap_map_kind.rb new file mode 100644 index 000000000000..cda3e7f21e29 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sourcemap_map_kind.rb @@ -0,0 +1,33 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The type of source map. + class SourcemapMapKind + include BaseEnumModel + + JS = "js".freeze + JVM = "jvm".freeze + IOS = "ios".freeze + REACT = "react".freeze + FLUTTER = "flutter".freeze + ELF = "elf".freeze + NDK = "ndk".freeze + IL2CPP = "il2cpp".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/sourcemaps_list_meta.rb b/lib/datadog_api_client/v2/models/sourcemaps_list_meta.rb new file mode 100644 index 000000000000..bcfec923866a --- /dev/null +++ b/lib/datadog_api_client/v2/models/sourcemaps_list_meta.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Pagination metadata for the source maps list response. + class SourcemapsListMeta + include BaseGenericModel + + # Page information for the source maps list response. + attr_reader :page + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'page' => :'page' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'page' => :'SourcemapsListMetaPage' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SourcemapsListMeta` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'page') + self.page = attributes[:'page'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @page.nil? + true + end + + # Custom attribute writer method with validation + # @param page [Object] Object to be assigned + # @!visibility private + def page=(page) + if page.nil? + fail ArgumentError, 'invalid value for "page", page cannot be nil.' + end + @page = page + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + page == o.page && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [page, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sourcemaps_list_meta_page.rb b/lib/datadog_api_client/v2/models/sourcemaps_list_meta_page.rb new file mode 100644 index 000000000000..961f6dbff749 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sourcemaps_list_meta_page.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Page information for the source maps list response. + class SourcemapsListMetaPage + include BaseGenericModel + + # Whether there are more results available beyond the current page. + attr_reader :has_more_results + + # Total number of source maps matching the filter criteria. + attr_reader :total_filtered_count + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'has_more_results' => :'has_more_results', + :'total_filtered_count' => :'total_filtered_count' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'has_more_results' => :'Boolean', + :'total_filtered_count' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SourcemapsListMetaPage` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'has_more_results') + self.has_more_results = attributes[:'has_more_results'] + end + + if attributes.key?(:'total_filtered_count') + self.total_filtered_count = attributes[:'total_filtered_count'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @has_more_results.nil? + return false if @total_filtered_count.nil? + true + end + + # Custom attribute writer method with validation + # @param has_more_results [Object] Object to be assigned + # @!visibility private + def has_more_results=(has_more_results) + if has_more_results.nil? + fail ArgumentError, 'invalid value for "has_more_results", has_more_results cannot be nil.' + end + @has_more_results = has_more_results + end + + # Custom attribute writer method with validation + # @param total_filtered_count [Object] Object to be assigned + # @!visibility private + def total_filtered_count=(total_filtered_count) + if total_filtered_count.nil? + fail ArgumentError, 'invalid value for "total_filtered_count", total_filtered_count cannot be nil.' + end + @total_filtered_count = total_filtered_count + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + has_more_results == o.has_more_results && + total_filtered_count == o.total_filtered_count && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [has_more_results, total_filtered_count, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sourcemaps_response.rb b/lib/datadog_api_client/v2/models/sourcemaps_response.rb new file mode 100644 index 000000000000..098734ea4d6a --- /dev/null +++ b/lib/datadog_api_client/v2/models/sourcemaps_response.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response containing a list of affected source maps. + class SourcemapsResponse + include BaseGenericModel + + # List of source map data objects. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SourcemapsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end