From ecc53a0c69b07b1c61ced1768c80b92195d5353c Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 3 Jun 2026 12:23:02 +0000 Subject: [PATCH] Regenerate client from commit ca3c4ff of spec repo --- .generator/schemas/v2/openapi.yaml | 1570 +++++++++++++++++ features/scenarios_model_mapping.rb | 75 + lib/datadog_api_client/configuration.rb | 5 + lib/datadog_api_client/inflector.rb | 35 + lib/datadog_api_client/v2/api/rum_api.rb | 515 ++++++ .../v2/models/elf_sourcemap_attributes.rb | 245 +++ .../v2/models/elf_sourcemap_data.rb | 165 ++ .../v2/models/flutter_sourcemap_attributes.rb | 205 +++ .../v2/models/flutter_sourcemap_data.rb | 165 ++ .../v2/models/il2_cpp_sourcemap_attributes.rb | 175 ++ .../v2/models/il2_cpp_sourcemap_data.rb | 165 ++ .../v2/models/ios_sourcemap_attributes.rb | 175 ++ .../v2/models/ios_sourcemap_data.rb | 165 ++ .../v2/models/js_sourcemap_attributes.rb | 255 +++ .../v2/models/js_sourcemap_data.rb | 165 ++ .../v2/models/jvm_sourcemap_attributes.rb | 215 +++ .../v2/models/jvm_sourcemap_data.rb | 165 ++ .../v2/models/list_sourcemaps_response.rb | 135 ++ .../v2/models/ndk_sourcemap_attributes.rb | 195 ++ .../v2/models/ndk_sourcemap_data.rb | 165 ++ .../react_native_sourcemap_attributes.rb | 235 +++ .../v2/models/react_native_sourcemap_data.rb | 165 ++ .../service_repository_info_data_type.rb | 26 + .../models/service_repository_info_request.rb | 123 ++ ...vice_repository_info_request_attributes.rb | 144 ++ .../service_repository_info_request_data.rb | 144 ++ .../service_repository_info_response.rb | 123 ++ ...ice_repository_info_response_attributes.rb | 143 ++ .../service_repository_info_response_data.rb | 165 ++ .../models/service_repository_info_status.rb | 30 + .../v2/models/sourcemap_data_type.rb | 26 + .../v2/models/sourcemap_file_attributes.rb | 279 +++ .../v2/models/sourcemap_file_data.rb | 165 ++ .../v2/models/sourcemap_file_data_type.rb | 26 + .../v2/models/sourcemap_file_response.rb | 123 ++ .../v2/models/sourcemap_item.rb | 69 + .../v2/models/sourcemap_map_kind.rb | 33 + .../v2/models/sourcemaps_list_meta.rb | 123 ++ .../v2/models/sourcemaps_list_meta_page.rb | 144 ++ .../v2/models/sourcemaps_response.rb | 125 ++ 40 files changed, 7366 insertions(+) create mode 100644 lib/datadog_api_client/v2/models/elf_sourcemap_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/elf_sourcemap_data.rb create mode 100644 lib/datadog_api_client/v2/models/flutter_sourcemap_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/flutter_sourcemap_data.rb create mode 100644 lib/datadog_api_client/v2/models/il2_cpp_sourcemap_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/il2_cpp_sourcemap_data.rb create mode 100644 lib/datadog_api_client/v2/models/ios_sourcemap_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/ios_sourcemap_data.rb create mode 100644 lib/datadog_api_client/v2/models/js_sourcemap_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/js_sourcemap_data.rb create mode 100644 lib/datadog_api_client/v2/models/jvm_sourcemap_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/jvm_sourcemap_data.rb create mode 100644 lib/datadog_api_client/v2/models/list_sourcemaps_response.rb create mode 100644 lib/datadog_api_client/v2/models/ndk_sourcemap_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/ndk_sourcemap_data.rb create mode 100644 lib/datadog_api_client/v2/models/react_native_sourcemap_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/react_native_sourcemap_data.rb create mode 100644 lib/datadog_api_client/v2/models/service_repository_info_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/service_repository_info_request.rb create mode 100644 lib/datadog_api_client/v2/models/service_repository_info_request_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/service_repository_info_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/service_repository_info_response.rb create mode 100644 lib/datadog_api_client/v2/models/service_repository_info_response_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/service_repository_info_response_data.rb create mode 100644 lib/datadog_api_client/v2/models/service_repository_info_status.rb create mode 100644 lib/datadog_api_client/v2/models/sourcemap_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/sourcemap_file_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/sourcemap_file_data.rb create mode 100644 lib/datadog_api_client/v2/models/sourcemap_file_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/sourcemap_file_response.rb create mode 100644 lib/datadog_api_client/v2/models/sourcemap_item.rb create mode 100644 lib/datadog_api_client/v2/models/sourcemap_map_kind.rb create mode 100644 lib/datadog_api_client/v2/models/sourcemaps_list_meta.rb create mode 100644 lib/datadog_api_client/v2/models/sourcemaps_list_meta_page.rb create mode 100644 lib/datadog_api_client/v2/models/sourcemaps_response.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index c26a927e8357..fad7df50c8a2 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: @@ -51415,6 +51755,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 +57169,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 +70228,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 +84587,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 +85688,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: @@ -163990,6 +164727,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/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index d46be451bcdd..6f441a9fb998 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -4568,6 +4568,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/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 5f4dc57fa534..a93e2c12da8a 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -570,6 +570,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 1a0e8f48d092..48aed4232d52 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", @@ -4532,6 +4545,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 +5341,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 +6314,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 +6385,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/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/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