diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index d26aead775d1..2f09c3944efa 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -62339,7 +62339,8 @@ components: - name type: object LicensesListResponse: - description: The top-level response object returned by the licenses list endpoint, containing the array of supported SPDX licenses. + description: >- + The top-level response object returned by the licenses list endpoint, containing the array of supported SPDX licenses. properties: data: $ref: "#/components/schemas/LicensesListResponseData" @@ -65756,7 +65757,8 @@ components: - attributes type: object McpScanRequestResponseDataAttributes: - description: The attributes returned when a scan request has been accepted, containing the job identifier used to poll for results. + description: >- + The attributes returned when a scan request has been accepted, containing the job identifier used to poll for results. properties: job_id: description: The job identifier assigned to the scan, used to retrieve the scan result. @@ -89639,7 +89641,8 @@ components: $ref: "#/components/schemas/ResolveVulnerableSymbolsRequestData" type: object ResolveVulnerableSymbolsRequestData: - description: The data object in a request to resolve vulnerable symbols, containing the package PURLs and request type. + description: >- + The data object in a request to resolve vulnerable symbols, containing the package PURLs and request type. properties: attributes: $ref: "#/components/schemas/ResolveVulnerableSymbolsRequestDataAttributes" @@ -89652,7 +89655,8 @@ components: - type type: object ResolveVulnerableSymbolsRequestDataAttributes: - description: The attributes of a request to resolve vulnerable symbols, containing the list of package PURLs to check. + description: >- + The attributes of a request to resolve vulnerable symbols, containing the list of package PURLs to check. properties: purls: description: The list of Package URLs (PURLs) for which to resolve vulnerable symbols. @@ -89677,7 +89681,8 @@ components: $ref: "#/components/schemas/ResolveVulnerableSymbolsResponseData" type: object ResolveVulnerableSymbolsResponseData: - description: The data object in a response for resolving vulnerable symbols, containing the result attributes and response type. + description: >- + The data object in a response for resolving vulnerable symbols, containing the result attributes and response type. properties: attributes: $ref: "#/components/schemas/ResolveVulnerableSymbolsResponseDataAttributes" @@ -89711,7 +89716,8 @@ components: description: The result of resolving vulnerable symbols for a specific package, identified by its PURL. properties: purl: - description: The Package URL (PURL) uniquely identifying the package for which vulnerable symbols are resolved. + description: >- + The Package URL (PURL) uniquely identifying the package for which vulnerable symbols are resolved. type: string vulnerable_symbols: description: The list of vulnerable symbol groups found in this package, organized by advisory. @@ -94283,7 +94289,8 @@ components: - type type: object ScaRequestDataAttributes: - description: The attributes of an SCA request, containing dependency graph data, vulnerability information, and repository context. + description: >- + The attributes of an SCA request, containing dependency graph data, vulnerability information, and repository context. properties: commit: $ref: "#/components/schemas/ScaRequestDataAttributesCommit" @@ -94307,14 +94314,13 @@ components: type: array repository: $ref: "#/components/schemas/ScaRequestDataAttributesRepository" + scan_start_timestamp: + $ref: "#/components/schemas/ScaRequestDataAttributesScanStartTimestamp" service: description: The name of the service or application being analyzed. type: string tags: - additionalProperties: - type: string - description: A map of key-value tags providing additional metadata for the SCA scan. - type: object + $ref: "#/components/schemas/ScaRequestDataAttributesTags" vulnerabilities: description: The list of vulnerabilities identified in the dependency graph. items: @@ -94322,7 +94328,8 @@ components: type: array type: object ScaRequestDataAttributesCommit: - description: Metadata about the commit associated with the SCA scan, including author, committer, and branch information. + description: >- + Metadata about the commit associated with the SCA scan, including author, committer, and branch information. properties: author_date: description: The date when the commit was authored. @@ -94357,24 +94364,26 @@ components: type: array group: description: The group or organization namespace of the dependency (e.g., Maven group ID). + nullable: true type: string is_dev: description: Indicates whether this is a development-only dependency not used in production. type: boolean is_direct: description: Indicates whether this is a direct dependency (as opposed to a transitive one). + nullable: true type: boolean language: description: The programming language ecosystem of this dependency (e.g., java, python, javascript). type: string locations: - description: The list of source file locations where this dependency is declared. - items: - $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItems" - type: array + $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocations" name: description: The name of the dependency package. type: string + opaque: + description: Indicates whether dependency details are intentionally opaque. + type: boolean package_manager: description: The package manager responsible for this dependency (e.g., maven, pip, npm). type: string @@ -94386,21 +94395,44 @@ components: items: $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems" type: array + requires_transitive_enrichment: + description: Indicates whether this dependency requires transitive dependency enrichment. + type: boolean + target_frameworks: + description: The target framework identifiers associated with this dependency. + items: + description: A target framework identifier. + type: string + type: array version: description: The version of the dependency. + nullable: true + type: string + version_constraint: + description: Indicates whether the version value represents a version constraint. + type: boolean + version_range: + description: The version range associated with this dependency when a manifest declares a range. type: string type: object + ScaRequestDataAttributesDependenciesItemsLocations: + description: The list of source file locations where this dependency is declared. + items: + $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItems" + nullable: true + type: array ScaRequestDataAttributesDependenciesItemsLocationsItems: - description: The source code location where a dependency is declared, including block, name, namespace, and version positions within the file. + description: >- + The source code location where a dependency is declared, including block, name, namespace, and version positions within the file. properties: block: $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition" name: - $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition" + $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition" namespace: - $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition" + $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition" version: - $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition" + $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition" type: object ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition: description: A range within a file defined by a start and end position, along with the file name. @@ -94410,6 +94442,24 @@ components: file_name: description: The name or path of the file containing this location. type: string + role: + description: The semantic role associated with this file location. + type: string + start: + $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition" + type: object + ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition: + description: A nullable range within a file defined by a start and end position, along with the file name. + nullable: true + properties: + end: + $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition" + file_name: + description: The name or path of the file containing this location. + type: string + role: + description: The semantic role associated with this file location. + type: string start: $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition" type: object @@ -94467,8 +94517,51 @@ components: description: The URL of the repository. type: string type: object + ScaRequestDataAttributesScanStartTimestamp: + additionalProperties: false + description: The time when the SCA scan started. + nullable: true + properties: + nanos: + description: Non-negative fractions of a second at nanosecond resolution. + format: int32 + maximum: 999999999 + minimum: 0 + type: integer + seconds: + description: Seconds of UTC time since Unix epoch. + format: int64 + type: integer + type: object + ScaRequestDataAttributesTags: + additionalProperties: + type: string + description: A map of tags providing additional metadata for the SCA scan. + properties: + tool: + $ref: "#/components/schemas/ScaRequestDataAttributesTagsTool" + type: object + ScaRequestDataAttributesTagsTool: + additionalProperties: false + description: Tool metadata included in SCA tags. + properties: + generator: + $ref: "#/components/schemas/ScaRequestDataAttributesTagsToolGenerator" + type: object + ScaRequestDataAttributesTagsToolGenerator: + additionalProperties: false + description: Metadata about the tool that generated the SCA tags. + properties: + name: + description: The name of the tag generator. + type: string + version: + description: The version of the tag generator. + type: string + type: object ScaRequestDataAttributesVulnerabilitiesItems: - description: A vulnerability entry from the Software Bill of Materials (SBOM), describing a known security issue and the components it affects. + description: >- + A vulnerability entry from the Software Bill of Materials (SBOM), describing a known security issue and the components it affects. properties: affects: description: The list of components affected by this vulnerability. @@ -123100,7 +123193,8 @@ components: apm_api_catalog_write: Add, modify, and delete API catalog definitions. apm_read: Read and query APM and Trace Analytics. apm_service_catalog_read: View service catalog and service definitions. - apm_service_catalog_write: Add, modify, and delete service catalog definitions when those definitions are maintained by Datadog. + apm_service_catalog_write: >- + Add, modify, and delete service catalog definitions when those definitions are maintained by Datadog. appsec_vm_read: View infrastructure, application code, and library vulnerability findings. aws_configurations_manage: Manage AWS integration account configurations and related integration settings. billing_edit: Edit your organization's billing information. @@ -123112,8 +123206,10 @@ components: cases_write: Create and update cases. ci_visibility_pipelines_write: Create CI Visibility pipeline spans using the API. ci_visibility_read: View CI Visibility. - cloud_cost_management_read: View Cloud Cost pages and the cloud cost data source in dashboards and notebooks. For more details, see the Cloud Cost Management docs. - cloud_cost_management_write: Configure cloud cost accounts and global customizations. For more details, see the Cloud Cost Management docs. + cloud_cost_management_read: >- + View Cloud Cost pages and the cloud cost data source in dashboards and notebooks. For more details, see the Cloud Cost Management docs. + cloud_cost_management_write: >- + Configure cloud cost accounts and global customizations. For more details, see the Cloud Cost Management docs. code_analysis_read: View Code Analysis. code_coverage_read: View Code Coverage. continuous_profiler_pgo_read: Read and query Continuous Profiler data for Profile-Guided Optimization (PGO). @@ -123122,7 +123218,8 @@ components: create_webhooks: Create webhooks integrations. dashboards_embed_share: Create, modify, and delete shared dashboards with share type 'embed'. dashboards_invite_share: Create, modify, and delete shared dashboards with share type 'invite'. - dashboards_public_share: Generate public and authenticated links to share dashboards or embeddable graphs externally. + dashboards_public_share: >- + Generate public and authenticated links to share dashboards or embeddable graphs externally. dashboards_read: View dashboards. dashboards_write: Create and change dashboards. data_scanner_read: View Data Scanner configurations. @@ -123146,19 +123243,22 @@ components: logs_read_index_data: Read indexed log data. manage_integrations: Install, uninstall, and configure integrations. metrics_read: View custom metrics. - monitors_downtime: Set downtimes to suppress alerts from any monitor in an organization. Mute and unmute monitors. The ability to write monitors is not required to set downtimes. + monitors_downtime: >- + Set downtimes to suppress alerts from any monitor in an organization. Mute and unmute monitors. The ability to write monitors is not required to set downtimes. monitors_read: View monitors. monitors_write: Edit, delete, and resolve individual monitors. network_connections_read: Read cloud network connections. org_connections_read: Read cross organization connections. org_connections_write: Create, edit, and delete cross organization connections. - org_management: Edit org configurations, including authentication and certain security preferences such as configuring SAML, renaming an org, configuring allowed login methods, creating child orgs, subscribing & unsubscribing from apps in the marketplace, and enabling & disabling Remote Configuration for the entire organization. + org_management: >- + Edit org configurations, including authentication and certain security preferences such as configuring SAML, renaming an org, configuring allowed login methods, creating child orgs, subscribing & unsubscribing from apps in the marketplace, and enabling & disabling Remote Configuration for the entire organization. security_comments_read: Read comments of vulnerabilities. security_monitoring_critical_assets_read: Read Critical Assets. security_monitoring_critical_assets_write: Write Critical Assets. security_monitoring_filters_read: Read Security Filters. security_monitoring_filters_write: Create, edit, and delete Security Filters. - security_monitoring_findings_read: View a list of findings that include both misconfigurations and identity risks. + security_monitoring_findings_read: >- + View a list of findings that include both misconfigurations and identity risks. security_monitoring_rules_read: Read Detection Rules. security_monitoring_rules_write: Create and edit Detection Rules. security_monitoring_signals_read: View Security Signals. @@ -123167,24 +123267,29 @@ components: security_pipelines_read: View Security Pipelines. security_pipelines_write: Create, edit, and delete CSM Security Pipelines. siem_entities_read: View Cloud SIEM entities. - slos_corrections: Apply, edit, and delete SLO status corrections. A user with this permission can make status corrections, even if they do not have permission to edit those SLOs. + slos_corrections: >- + Apply, edit, and delete SLO status corrections. A user with this permission can make status corrections, even if they do not have permission to edit those SLOs. slos_read: View SLOs and status corrections. slos_write: Create, edit, and delete SLOs. synthetics_global_variable_read: View, search, and use Synthetics global variables. synthetics_global_variable_write: Create, edit, and delete global variables for Synthetics. synthetics_private_location_read: View, search, and use Synthetics private locations. - synthetics_private_location_write: Create and delete private locations in addition to having access to the associated installation guidelines. + synthetics_private_location_write: >- + Create and delete private locations in addition to having access to the associated installation guidelines. synthetics_read: List and view configured Synthetic tests and test results. synthetics_write: Create, edit, and delete Synthetic tests. - teams_manage: Manage Teams. Create, delete, rename, and edit metadata of all Teams. To control Team membership across all Teams, use the User Access Manage permission. - teams_read: Read Teams data. A User with this permission can view Team names, metadata, and which Users are on each Team. + teams_manage: >- + Manage Teams. Create, delete, rename, and edit metadata of all Teams. To control Team membership across all Teams, use the User Access Manage permission. + teams_read: >- + Read Teams data. A User with this permission can view Team names, metadata, and which Users are on each Team. test_optimization_read: View Test Optimization. test_optimization_settings_write: Update service settings in Test Optimization. test_optimization_write: Update flaky tests from Flaky Tests Management of Test Optimization. timeseries_query: Query Timeseries data. usage_read: View your organization's usage and usage attribution. user_access_invite: Invite other users to your organization. - user_access_manage: Disable users, manage user roles, manage SAML-to-role mappings, and configure logs restriction queries. + user_access_manage: >- + Disable users, manage user roles, manage SAML-to-role mappings, and configure logs restriction queries. user_access_read: View users and their roles and settings. workflows_read: View workflows. workflows_run: Run workflows. diff --git a/examples/v2/static-analysis/CreateSCAResult.rb b/examples/v2/static-analysis/CreateSCAResult.rb index 1b767022c75d..567322dab18a 100644 --- a/examples/v2/static-analysis/CreateSCAResult.rb +++ b/examples/v2/static-analysis/CreateSCAResult.rb @@ -13,21 +13,23 @@ dependencies: [ DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItems.new({ exclusions: [], + group: nil, + is_direct: nil, locations: [ DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItems.new({ block: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.new({ _end: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}), start: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}), }), - name: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.new({ + name: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition.new({ _end: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}), start: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}), }), - namespace: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.new({ + namespace: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition.new({ _end: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}), start: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}), }), - version: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.new({ + version: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition.new({ _end: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}), start: DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.new({}), }), @@ -36,6 +38,8 @@ reachable_symbol_properties: [ DatadogAPIClient::V2::ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems.new({}), ], + target_frameworks: [], + version: nil, }), ], files: [ @@ -47,6 +51,12 @@ }), ], repository: DatadogAPIClient::V2::ScaRequestDataAttributesRepository.new({}), + scan_start_timestamp: DatadogAPIClient::V2::ScaRequestDataAttributesScanStartTimestamp.new({}), + tags: DatadogAPIClient::V2::ScaRequestDataAttributesTags.new({ + tool: DatadogAPIClient::V2::ScaRequestDataAttributesTagsTool.new({ + generator: DatadogAPIClient::V2::ScaRequestDataAttributesTagsToolGenerator.new({}), + }), + }), vulnerabilities: [ DatadogAPIClient::V2::ScaRequestDataAttributesVulnerabilitiesItems.new({ affects: [ diff --git a/features/v2/static_analysis.feature b/features/v2/static_analysis.feature index 5a662bc9c322..2ecb0c9668c0 100644 --- a/features/v2/static_analysis.feature +++ b/features/v2/static_analysis.feature @@ -581,7 +581,7 @@ Feature: Static Analysis Scenario: Post dependencies for analysis returns "OK" response Given operation "CreateSCAResult" enabled And new "CreateSCAResult" request - And body with value {"data": {"attributes": {"commit": {}, "dependencies": [{"exclusions": [], "locations": [{"block": {"end": {}, "start": {}}, "name": {"end": {}, "start": {}}, "namespace": {"end": {}, "start": {}}, "version": {"end": {}, "start": {}}}], "reachable_symbol_properties": [{}]}], "files": [{}], "relations": [{"depends_on": []}], "repository": {}, "vulnerabilities": [{"affects": [{}]}]}, "type": "scarequests"}} + And body with value {"data": {"attributes": {"commit": {}, "dependencies": [{"exclusions": [], "group": null, "is_direct": null, "locations": [{"block": {"end": {}, "start": {}}, "name": {"end": {}, "start": {}}, "namespace": {"end": {}, "start": {}}, "version": {"end": {}, "start": {}}}], "reachable_symbol_properties": [{}], "target_frameworks": [], "version": null}], "files": [{}], "relations": [{"depends_on": []}], "repository": {}, "scan_start_timestamp": {}, "tags": {"tool": {"generator": {}}}, "vulnerabilities": [{"affects": [{}]}]}, "type": "scarequests"}} When the request is sent Then the response status is 200 OK diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 41423454f75e..b309620f0545 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -6936,11 +6936,16 @@ def overrides "v2.sca_request_data_attributes_dependencies_items" => "ScaRequestDataAttributesDependenciesItems", "v2.sca_request_data_attributes_dependencies_items_locations_items" => "ScaRequestDataAttributesDependenciesItemsLocationsItems", "v2.sca_request_data_attributes_dependencies_items_locations_items_file_position" => "ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition", + "v2.sca_request_data_attributes_dependencies_items_locations_items_nullable_file_position" => "ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition", "v2.sca_request_data_attributes_dependencies_items_locations_items_position" => "ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition", "v2.sca_request_data_attributes_dependencies_items_reachable_symbol_properties_items" => "ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems", "v2.sca_request_data_attributes_files_items" => "ScaRequestDataAttributesFilesItems", "v2.sca_request_data_attributes_relations_items" => "ScaRequestDataAttributesRelationsItems", "v2.sca_request_data_attributes_repository" => "ScaRequestDataAttributesRepository", + "v2.sca_request_data_attributes_scan_start_timestamp" => "ScaRequestDataAttributesScanStartTimestamp", + "v2.sca_request_data_attributes_tags" => "ScaRequestDataAttributesTags", + "v2.sca_request_data_attributes_tags_tool" => "ScaRequestDataAttributesTagsTool", + "v2.sca_request_data_attributes_tags_tool_generator" => "ScaRequestDataAttributesTagsToolGenerator", "v2.sca_request_data_attributes_vulnerabilities_items" => "ScaRequestDataAttributesVulnerabilitiesItems", "v2.sca_request_data_attributes_vulnerabilities_items_affects_items" => "ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems", "v2.sca_request_data_type" => "ScaRequestDataType", diff --git a/lib/datadog_api_client/v2/models/sca_request_data_attributes.rb b/lib/datadog_api_client/v2/models/sca_request_data_attributes.rb index 34352cd0aedf..fa55d710553c 100644 --- a/lib/datadog_api_client/v2/models/sca_request_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/sca_request_data_attributes.rb @@ -39,10 +39,13 @@ class ScaRequestDataAttributes # Information about the source code repository being analyzed. attr_accessor :repository + # The time when the SCA scan started. + attr_accessor :scan_start_timestamp + # The name of the service or application being analyzed. attr_accessor :service - # A map of key-value tags providing additional metadata for the SCA scan. + # A map of tags providing additional metadata for the SCA scan. attr_accessor :tags # The list of vulnerabilities identified in the dependency graph. @@ -60,6 +63,7 @@ def self.attribute_map :'files' => :'files', :'relations' => :'relations', :'repository' => :'repository', + :'scan_start_timestamp' => :'scan_start_timestamp', :'service' => :'service', :'tags' => :'tags', :'vulnerabilities' => :'vulnerabilities' @@ -76,12 +80,21 @@ def self.openapi_types :'files' => :'Array', :'relations' => :'Array', :'repository' => :'ScaRequestDataAttributesRepository', + :'scan_start_timestamp' => :'ScaRequestDataAttributesScanStartTimestamp', :'service' => :'String', - :'tags' => :'Hash', + :'tags' => :'ScaRequestDataAttributesTags', :'vulnerabilities' => :'Array' } end + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'scan_start_timestamp', + ]) + end + # Initializes the object # @param attributes [Hash] Model attributes in the form of hash # @!visibility private @@ -130,6 +143,10 @@ def initialize(attributes = {}) self.repository = attributes[:'repository'] end + if attributes.key?(:'scan_start_timestamp') + self.scan_start_timestamp = attributes[:'scan_start_timestamp'] + end + if attributes.key?(:'service') self.service = attributes[:'service'] end @@ -177,6 +194,7 @@ def ==(o) files == o.files && relations == o.relations && repository == o.repository && + scan_start_timestamp == o.scan_start_timestamp && service == o.service && tags == o.tags && vulnerabilities == o.vulnerabilities && @@ -187,7 +205,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [commit, dependencies, env, files, relations, repository, service, tags, vulnerabilities, additional_properties].hash + [commit, dependencies, env, files, relations, repository, scan_start_timestamp, service, tags, vulnerabilities, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/sca_request_data_attributes_dependencies_items.rb b/lib/datadog_api_client/v2/models/sca_request_data_attributes_dependencies_items.rb index 95b73249a5dd..747d3a11793c 100644 --- a/lib/datadog_api_client/v2/models/sca_request_data_attributes_dependencies_items.rb +++ b/lib/datadog_api_client/v2/models/sca_request_data_attributes_dependencies_items.rb @@ -42,6 +42,9 @@ class ScaRequestDataAttributesDependenciesItems # The name of the dependency package. attr_accessor :name + # Indicates whether dependency details are intentionally opaque. + attr_accessor :opaque + # The package manager responsible for this dependency (e.g., maven, pip, npm). attr_accessor :package_manager @@ -51,9 +54,21 @@ class ScaRequestDataAttributesDependenciesItems # Properties describing symbols from this dependency that are reachable in the application code. attr_accessor :reachable_symbol_properties + # Indicates whether this dependency requires transitive dependency enrichment. + attr_accessor :requires_transitive_enrichment + + # The target framework identifiers associated with this dependency. + attr_accessor :target_frameworks + # The version of the dependency. attr_accessor :version + # Indicates whether the version value represents a version constraint. + attr_accessor :version_constraint + + # The version range associated with this dependency when a manifest declares a range. + attr_accessor :version_range + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. @@ -67,10 +82,15 @@ def self.attribute_map :'language' => :'language', :'locations' => :'locations', :'name' => :'name', + :'opaque' => :'opaque', :'package_manager' => :'package_manager', :'purl' => :'purl', :'reachable_symbol_properties' => :'reachable_symbol_properties', - :'version' => :'version' + :'requires_transitive_enrichment' => :'requires_transitive_enrichment', + :'target_frameworks' => :'target_frameworks', + :'version' => :'version', + :'version_constraint' => :'version_constraint', + :'version_range' => :'version_range' } end @@ -85,13 +105,29 @@ def self.openapi_types :'language' => :'String', :'locations' => :'Array', :'name' => :'String', + :'opaque' => :'Boolean', :'package_manager' => :'String', :'purl' => :'String', :'reachable_symbol_properties' => :'Array', - :'version' => :'String' + :'requires_transitive_enrichment' => :'Boolean', + :'target_frameworks' => :'Array', + :'version' => :'String', + :'version_constraint' => :'Boolean', + :'version_range' => :'String' } end + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'group', + :'is_direct', + :'locations', + :'version', + ]) + end + # Initializes the object # @param attributes [Hash] Model attributes in the form of hash # @!visibility private @@ -142,6 +178,10 @@ def initialize(attributes = {}) self.name = attributes[:'name'] end + if attributes.key?(:'opaque') + self.opaque = attributes[:'opaque'] + end + if attributes.key?(:'package_manager') self.package_manager = attributes[:'package_manager'] end @@ -156,9 +196,27 @@ def initialize(attributes = {}) end end + if attributes.key?(:'requires_transitive_enrichment') + self.requires_transitive_enrichment = attributes[:'requires_transitive_enrichment'] + end + + if attributes.key?(:'target_frameworks') + if (value = attributes[:'target_frameworks']).is_a?(Array) + self.target_frameworks = value + end + end + if attributes.key?(:'version') self.version = attributes[:'version'] end + + if attributes.key?(:'version_constraint') + self.version_constraint = attributes[:'version_constraint'] + end + + if attributes.key?(:'version_range') + self.version_range = attributes[:'version_range'] + end end # Returns the object in the form of hash, with additionalProperties support. @@ -194,10 +252,15 @@ def ==(o) language == o.language && locations == o.locations && name == o.name && + opaque == o.opaque && package_manager == o.package_manager && purl == o.purl && reachable_symbol_properties == o.reachable_symbol_properties && + requires_transitive_enrichment == o.requires_transitive_enrichment && + target_frameworks == o.target_frameworks && version == o.version && + version_constraint == o.version_constraint && + version_range == o.version_range && additional_properties == o.additional_properties end @@ -205,7 +268,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [exclusions, group, is_dev, is_direct, language, locations, name, package_manager, purl, reachable_symbol_properties, version, additional_properties].hash + [exclusions, group, is_dev, is_direct, language, locations, name, opaque, package_manager, purl, reachable_symbol_properties, requires_transitive_enrichment, target_frameworks, version, version_constraint, version_range, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/sca_request_data_attributes_dependencies_items_locations_items.rb b/lib/datadog_api_client/v2/models/sca_request_data_attributes_dependencies_items_locations_items.rb index e04eca02e428..17cc35793e39 100644 --- a/lib/datadog_api_client/v2/models/sca_request_data_attributes_dependencies_items_locations_items.rb +++ b/lib/datadog_api_client/v2/models/sca_request_data_attributes_dependencies_items_locations_items.rb @@ -24,13 +24,13 @@ class ScaRequestDataAttributesDependenciesItemsLocationsItems # A range within a file defined by a start and end position, along with the file name. attr_accessor :block - # A range within a file defined by a start and end position, along with the file name. + # A nullable range within a file defined by a start and end position, along with the file name. attr_accessor :name - # A range within a file defined by a start and end position, along with the file name. + # A nullable range within a file defined by a start and end position, along with the file name. attr_accessor :namespace - # A range within a file defined by a start and end position, along with the file name. + # A nullable range within a file defined by a start and end position, along with the file name. attr_accessor :version attr_accessor :additional_properties @@ -51,12 +51,22 @@ def self.attribute_map def self.openapi_types { :'block' => :'ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition', - :'name' => :'ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition', - :'namespace' => :'ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition', - :'version' => :'ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition' + :'name' => :'ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition', + :'namespace' => :'ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition', + :'version' => :'ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition' } end + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'name', + :'namespace', + :'version', + ]) + end + # Initializes the object # @param attributes [Hash] Model attributes in the form of hash # @!visibility private diff --git a/lib/datadog_api_client/v2/models/sca_request_data_attributes_dependencies_items_locations_items_file_position.rb b/lib/datadog_api_client/v2/models/sca_request_data_attributes_dependencies_items_locations_items_file_position.rb index e7f64a0c3fda..90674d3eb18d 100644 --- a/lib/datadog_api_client/v2/models/sca_request_data_attributes_dependencies_items_locations_items_file_position.rb +++ b/lib/datadog_api_client/v2/models/sca_request_data_attributes_dependencies_items_locations_items_file_position.rb @@ -27,6 +27,9 @@ class ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition # The name or path of the file containing this location. attr_accessor :file_name + # The semantic role associated with this file location. + attr_accessor :role + # A specific position (line and column) within a source file. attr_accessor :start @@ -38,6 +41,7 @@ def self.attribute_map { :'_end' => :'end', :'file_name' => :'file_name', + :'role' => :'role', :'start' => :'start' } end @@ -48,6 +52,7 @@ def self.openapi_types { :'_end' => :'ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition', :'file_name' => :'String', + :'role' => :'String', :'start' => :'ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition' } end @@ -78,6 +83,10 @@ def initialize(attributes = {}) self.file_name = attributes[:'file_name'] end + if attributes.key?(:'role') + self.role = attributes[:'role'] + end + if attributes.key?(:'start') self.start = attributes[:'start'] end @@ -111,6 +120,7 @@ def ==(o) self.class == o.class && _end == o._end && file_name == o.file_name && + role == o.role && start == o.start && additional_properties == o.additional_properties end @@ -119,7 +129,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [_end, file_name, start, additional_properties].hash + [_end, file_name, role, start, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/sca_request_data_attributes_dependencies_items_locations_items_nullable_file_position.rb b/lib/datadog_api_client/v2/models/sca_request_data_attributes_dependencies_items_locations_items_nullable_file_position.rb new file mode 100644 index 000000000000..cf33ea000eee --- /dev/null +++ b/lib/datadog_api_client/v2/models/sca_request_data_attributes_dependencies_items_locations_items_nullable_file_position.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 + # A nullable range within a file defined by a start and end position, along with the file name. + class ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition + include BaseGenericModel + + # A specific position (line and column) within a source file. + attr_accessor :_end + + # The name or path of the file containing this location. + attr_accessor :file_name + + # The semantic role associated with this file location. + attr_accessor :role + + # A specific position (line and column) within a source file. + attr_accessor :start + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'_end' => :'end', + :'file_name' => :'file_name', + :'role' => :'role', + :'start' => :'start' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'_end' => :'ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition', + :'file_name' => :'String', + :'role' => :'String', + :'start' => :'ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition' + } + 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::ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition` 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?(:'_end') + self._end = attributes[:'_end'] + end + + if attributes.key?(:'file_name') + self.file_name = attributes[:'file_name'] + end + + if attributes.key?(:'role') + self.role = attributes[:'role'] + end + + if attributes.key?(:'start') + self.start = attributes[:'start'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _end == o._end && + file_name == o.file_name && + role == o.role && + start == o.start && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [_end, file_name, role, start, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sca_request_data_attributes_scan_start_timestamp.rb b/lib/datadog_api_client/v2/models/sca_request_data_attributes_scan_start_timestamp.rb new file mode 100644 index 000000000000..b468c48244c1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sca_request_data_attributes_scan_start_timestamp.rb @@ -0,0 +1,112 @@ +=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 time when the SCA scan started. + class ScaRequestDataAttributesScanStartTimestamp + include BaseGenericModel + + # Non-negative fractions of a second at nanosecond resolution. + attr_reader :nanos + + # Seconds of UTC time since Unix epoch. + attr_accessor :seconds + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'nanos' => :'nanos', + :'seconds' => :'seconds' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'nanos' => :'Integer', + :'seconds' => :'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::ScaRequestDataAttributesScanStartTimestamp` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ScaRequestDataAttributesScanStartTimestamp`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'nanos') + self.nanos = attributes[:'nanos'] + end + + if attributes.key?(:'seconds') + self.seconds = attributes[:'seconds'] + 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 !@nanos.nil? && @nanos > 999999999 + return false if !@nanos.nil? && @nanos < 0 + true + end + + # Custom attribute writer method with validation + # @param nanos [Object] Object to be assigned + # @!visibility private + def nanos=(nanos) + if !nanos.nil? && nanos > 999999999 + fail ArgumentError, 'invalid value for "nanos", must be smaller than or equal to 999999999.' + end + if !nanos.nil? && nanos < 0 + fail ArgumentError, 'invalid value for "nanos", must be greater than or equal to 0.' + end + @nanos = nanos + 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 && + nanos == o.nanos && + seconds == o.seconds + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [nanos, seconds].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sca_request_data_attributes_tags.rb b/lib/datadog_api_client/v2/models/sca_request_data_attributes_tags.rb new file mode 100644 index 000000000000..63fc2547a3a7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sca_request_data_attributes_tags.rb @@ -0,0 +1,105 @@ +=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 map of tags providing additional metadata for the SCA scan. + class ScaRequestDataAttributesTags + include BaseGenericModel + + # Tool metadata included in SCA tags. + attr_accessor :tool + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'tool' => :'tool' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'tool' => :'ScaRequestDataAttributesTagsTool' + } + 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::ScaRequestDataAttributesTags` 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?(:'tool') + self.tool = attributes[:'tool'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + tool == o.tool && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [tool, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sca_request_data_attributes_tags_tool.rb b/lib/datadog_api_client/v2/models/sca_request_data_attributes_tags_tool.rb new file mode 100644 index 000000000000..00d8af13dca8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sca_request_data_attributes_tags_tool.rb @@ -0,0 +1,80 @@ +=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 + # Tool metadata included in SCA tags. + class ScaRequestDataAttributesTagsTool + include BaseGenericModel + + # Metadata about the tool that generated the SCA tags. + attr_accessor :generator + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'generator' => :'generator' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'generator' => :'ScaRequestDataAttributesTagsToolGenerator' + } + 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::ScaRequestDataAttributesTagsTool` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ScaRequestDataAttributesTagsTool`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'generator') + self.generator = attributes[:'generator'] + end + 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 && + generator == o.generator + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [generator].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sca_request_data_attributes_tags_tool_generator.rb b/lib/datadog_api_client/v2/models/sca_request_data_attributes_tags_tool_generator.rb new file mode 100644 index 000000000000..3b2b59712ea5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sca_request_data_attributes_tags_tool_generator.rb @@ -0,0 +1,90 @@ +=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 + # Metadata about the tool that generated the SCA tags. + class ScaRequestDataAttributesTagsToolGenerator + include BaseGenericModel + + # The name of the tag generator. + attr_accessor :name + + # The version of the tag generator. + attr_accessor :version + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'version' => :'version' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'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::ScaRequestDataAttributesTagsToolGenerator` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ScaRequestDataAttributesTagsToolGenerator`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + 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 && + name == o.name && + version == o.version + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, version].hash + end + end +end