From 30f93c702f04e9999e789815e263b1466f64f65b Mon Sep 17 00:00:00 2001 From: Jakub Frejlach Date: Tue, 10 Oct 2023 16:01:59 +0200 Subject: [PATCH 1/5] Add standalone script for schema download --- Makefile | 6 ++++++ scripts/download_schema.sh | 6 ++++++ scripts/helpers.sh | 4 ++-- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100755 scripts/download_schema.sh diff --git a/Makefile b/Makefile index e310d71..6c8502d 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ pc=`which pip-compile` ps=`which pip-sync` package_dir=osidb_bindings/ bindings_dir=$(package_dir)bindings/ +ref=master ############################################################################ @@ -37,10 +38,15 @@ compile-deps: $(pc) --generate-hashes --allow-unsafe devel-requirements.in [ -f local-requirements.in ] && $(pc) --generate-hashes --allow-unsafe local-requirements.in || true + sync-deps: @echo ">synchronizing python dependencies" $(ps) requirements.txt devel-requirements.txt $$([ -f local-requirements.txt ] && echo 'local-requirements.txt') +download-schema: + @echo ">downloading OSIDB OpenAPI schema for ref \"$(ref)\"" + scripts/download_schema.sh $(ref) + patch-release: @echo ">preparing patch release" scripts/patch_release.sh diff --git a/scripts/download_schema.sh b/scripts/download_schema.sh new file mode 100755 index 0000000..20f26e3 --- /dev/null +++ b/scripts/download_schema.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +# download OpenAPI schema file from specified ref + +source scripts/helpers.sh + +get_schema ${1} diff --git a/scripts/helpers.sh b/scripts/helpers.sh index 21df3e3..d31fe6e 100644 --- a/scripts/helpers.sh +++ b/scripts/helpers.sh @@ -166,9 +166,9 @@ commit_bindings_changes() { } # Get OpenAPI schema from github API -# $1: version +# $1: version (defaults to "master") get_schema() { - local version=$1 + local version=${1:-master} echo "Downloading OSIDB schema version " local response=$(curl -s "https://raw.githubusercontent.com/RedHatProductSecurity/osidb/${version}/openapi.yml" \ From 9a49ecbb8908af753a665ff1cdb1d40fcd4c942f Mon Sep 17 00:00:00 2001 From: Jakub Frejlach Date: Tue, 10 Oct 2023 16:04:53 +0200 Subject: [PATCH 2/5] Update schema for OSIDB 3.5.0 --- osidb_bindings/openapi_schema.yml | 3382 ++++++++++++++++++++++++----- 1 file changed, 2812 insertions(+), 570 deletions(-) diff --git a/osidb_bindings/openapi_schema.yml b/osidb_bindings/openapi_schema.yml index 4a7f976..a224b44 100644 --- a/osidb_bindings/openapi_schema.yml +++ b/osidb_bindings/openapi_schema.yml @@ -1,7 +1,7 @@ openapi: 3.0.3 info: title: OSIDB API - version: 3.4.0 + version: 3.5.0 description: REST API autogenerated docs for the OSIDB and its components paths: /auth/token: @@ -213,6 +213,8 @@ paths: nullable: true is_complete: type: boolean + is_up2date: + type: bool data_models: type: array items: @@ -741,11 +743,13 @@ paths: name: cvss2 schema: type: string + deprecated: true - in: query name: cvss2_score schema: type: number format: float + deprecated: true - in: query name: cvss2_score__gt schema: @@ -770,11 +774,13 @@ paths: name: cvss3 schema: type: string + deprecated: true - in: query name: cvss3_score schema: type: number format: float + deprecated: true - in: query name: cvss3_score__gt schema: @@ -795,6 +801,115 @@ paths: schema: type: number format: float + - in: query + name: cvss_scores__comment + schema: + type: string + - in: query + name: cvss_scores__created_dt + schema: + type: string + format: date-time + - in: query + name: cvss_scores__created_dt__date + schema: + type: string + format: date + - in: query + name: cvss_scores__created_dt__date__gte + schema: + type: string + format: date + - in: query + name: cvss_scores__created_dt__date__lte + schema: + type: string + format: date + - in: query + name: cvss_scores__created_dt__gt + schema: + type: string + format: date-time + - in: query + name: cvss_scores__created_dt__gte + schema: + type: string + format: date-time + - in: query + name: cvss_scores__created_dt__lt + schema: + type: string + format: date-time + - in: query + name: cvss_scores__created_dt__lte + schema: + type: string + format: date-time + - in: query + name: cvss_scores__cvss_version + schema: + type: string + - in: query + name: cvss_scores__issuer + schema: + type: string + enum: + - NIST + - RH + - in: query + name: cvss_scores__score + schema: + type: number + format: float + - in: query + name: cvss_scores__updated_dt + schema: + type: string + format: date-time + - in: query + name: cvss_scores__updated_dt__date + schema: + type: string + format: date + - in: query + name: cvss_scores__updated_dt__date__gte + schema: + type: string + format: date + - in: query + name: cvss_scores__updated_dt__date__lte + schema: + type: string + format: date + - in: query + name: cvss_scores__updated_dt__gt + schema: + type: string + format: date-time + - in: query + name: cvss_scores__updated_dt__gte + schema: + type: string + format: date-time + - in: query + name: cvss_scores__updated_dt__lt + schema: + type: string + format: date-time + - in: query + name: cvss_scores__updated_dt__lte + schema: + type: string + format: date-time + - in: query + name: cvss_scores__uuid + schema: + type: string + format: uuid + - in: query + name: cvss_scores__vector + schema: + type: string - in: query name: embargoed schema: @@ -1190,6 +1305,13 @@ paths: - -cvss2_score - -cvss3 - -cvss3_score + - -cvss_scores__comment + - -cvss_scores__created_dt + - -cvss_scores__issuer + - -cvss_scores__score + - -cvss_scores__updated_dt + - -cvss_scores__uuid + - -cvss_scores__vector - -flaw__component - -flaw__created_dt - -flaw__cve_id @@ -1228,6 +1350,13 @@ paths: - cvss2_score - cvss3 - cvss3_score + - cvss_scores__comment + - cvss_scores__created_dt + - cvss_scores__issuer + - cvss_scores__score + - cvss_scores__updated_dt + - cvss_scores__uuid + - cvss_scores__vector - flaw__component - flaw__created_dt - flaw__cve_id @@ -1472,6 +1601,13 @@ paths: description: '' post: operationId: osidb_api_v1_affects_create + parameters: + - in: header + name: Bugzilla-Api-Key + schema: + type: string + description: User generated api key for Bugzilla authentication. + required: true tags: - osidb requestBody: @@ -1507,10 +1643,64 @@ paths: version: type: string description: '' - /osidb/api/v1/affects/{uuid}: + /osidb/api/v1/affects/{affect_id}/cvss_scores: get: - operationId: osidb_api_v1_affects_retrieve + operationId: osidb_api_v1_affects_cvss_scores_list parameters: + - in: path + name: affect_id + schema: + type: string + format: uuid + required: true + - in: query + name: comment + schema: + type: string + - in: query + name: created_dt + schema: + type: string + format: date-time + - in: query + name: created_dt__date + schema: + type: string + format: date + - in: query + name: created_dt__date__gte + schema: + type: string + format: date + - in: query + name: created_dt__date__lte + schema: + type: string + format: date + - in: query + name: created_dt__gt + schema: + type: string + format: date-time + - in: query + name: created_dt__gte + schema: + type: string + format: date-time + - in: query + name: created_dt__lt + schema: + type: string + format: date-time + - in: query + name: created_dt__lte + schema: + type: string + format: date-time + - in: query + name: cvss_version + schema: + type: string - in: query name: exclude_fields schema: @@ -1530,24 +1720,78 @@ paths: may be separated by commas. Dot notation can be used to filter on related model fields. Example: `include_fields=field,related_model_field.field`' - in: query - name: include_meta_attr + name: issuer schema: - type: array - items: - type: string - description: 'Specify which keys from meta_attr field should be retrieved, - multiple values may be separated by commas. Dot notation can be used to - specify meta_attr keys on related models. Example: `include_meta_attr=key,related_model.key`Use - wildcards eg. `include_meta_attr=*,related_model.*` for retrieving all the - keys from meta_attr. Omit this parameter to not include meta_attr fields - at all. ' - - in: path + type: string + enum: + - NIST + - RH + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: query + name: score + schema: + type: number + format: float + - in: query + name: updated_dt + schema: + type: string + format: date-time + - in: query + name: updated_dt__date + schema: + type: string + format: date + - in: query + name: updated_dt__date__gte + schema: + type: string + format: date + - in: query + name: updated_dt__date__lte + schema: + type: string + format: date + - in: query + name: updated_dt__gt + schema: + type: string + format: date-time + - in: query + name: updated_dt__gte + schema: + type: string + format: date-time + - in: query + name: updated_dt__lt + schema: + type: string + format: date-time + - in: query + name: updated_dt__lte + schema: + type: string + format: date-time + - in: query name: uuid schema: type: string format: uuid - description: A UUID string identifying this Affect. - required: true + - in: query + name: vector + schema: + type: string tags: - osidb security: @@ -1559,7 +1803,7 @@ paths: application/json: schema: allOf: - - $ref: '#/components/schemas/Affect' + - $ref: '#/components/schemas/PaginatedAffectCVSSList' - type: object properties: dt: @@ -1572,15 +1816,14 @@ paths: version: type: string description: '' - put: - operationId: osidb_api_v1_affects_update + post: + operationId: osidb_api_v1_affects_cvss_scores_create parameters: - in: path - name: uuid + name: affect_id schema: type: string format: uuid - description: A UUID string identifying this Affect. required: true tags: - osidb @@ -1588,23 +1831,23 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Affect' + $ref: '#/components/schemas/AffectCVSSPost' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/Affect' + $ref: '#/components/schemas/AffectCVSSPost' multipart/form-data: schema: - $ref: '#/components/schemas/Affect' + $ref: '#/components/schemas/AffectCVSSPost' required: true security: - OsidbTokenAuthentication: [] responses: - '200': + '201': content: application/json: schema: allOf: - - $ref: '#/components/schemas/Affect' + - $ref: '#/components/schemas/AffectCVSS' - type: object properties: dt: @@ -1617,144 +1860,403 @@ paths: version: type: string description: '' - delete: - operationId: osidb_api_v1_affects_destroy + /osidb/api/v1/affects/{affect_id}/cvss_scores/{id}: + get: + operationId: osidb_api_v1_affects_cvss_scores_retrieve parameters: - in: path - name: uuid + name: affect_id schema: type: string format: uuid - description: A UUID string identifying this Affect. required: true - tags: - - osidb - security: - - OsidbTokenAuthentication: [] - responses: - '204': - content: - application/json: - schema: - type: object - properties: - dt: - type: string - format: date-time - env: - type: string - revision: - type: string - version: - type: string - description: '' - /osidb/api/v1/flaws: - get: - operationId: osidb_api_v1_flaws_list - parameters: - - in: query - name: acknowledgments__affiliation - schema: - type: string - - in: query - name: acknowledgments__created_dt - schema: - type: string - format: date-time - - in: query - name: acknowledgments__created_dt__date - schema: - type: string - format: date - - in: query - name: acknowledgments__created_dt__date__gte - schema: - type: string - format: date - - in: query - name: acknowledgments__created_dt__date__lte - schema: - type: string - format: date - in: query - name: acknowledgments__created_dt__gt - schema: - type: string - format: date-time - - in: query - name: acknowledgments__created_dt__gte - schema: - type: string - format: date-time - - in: query - name: acknowledgments__created_dt__lt + name: exclude_fields schema: - type: string - format: date-time - - in: query - name: acknowledgments__created_dt__lte + type: array + items: + type: string + description: 'Exclude specified fields from the response. Multiple values + may be separated by commas. Dot notation can be used to filter on related + model fields. Example: `exclude_fields=field,related_model_field.field`' + - in: path + name: id schema: type: string - format: date-time + required: true - in: query - name: acknowledgments__from_upstream + name: include_fields schema: - type: boolean - - in: query - name: acknowledgments__name + type: array + items: + type: string + description: 'Include only specified fields in the response. Multiple values + may be separated by commas. Dot notation can be used to filter on related + model fields. Example: `include_fields=field,related_model_field.field`' + tags: + - osidb + security: + - OsidbTokenAuthentication: [] + - {} + responses: + '200': + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/AffectCVSS' + - type: object + properties: + dt: + type: string + format: date-time + env: + type: string + revision: + type: string + version: + type: string + description: '' + put: + operationId: osidb_api_v1_affects_cvss_scores_update + parameters: + - in: path + name: affect_id schema: type: string - - in: query - name: acknowledgments__updated_dt + format: uuid + required: true + - in: path + name: id schema: type: string - format: date-time - - in: query - name: acknowledgments__updated_dt__date + required: true + tags: + - osidb + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AffectCVSSPut' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/AffectCVSSPut' + multipart/form-data: + schema: + $ref: '#/components/schemas/AffectCVSSPut' + required: true + security: + - OsidbTokenAuthentication: [] + responses: + '200': + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/AffectCVSS' + - type: object + properties: + dt: + type: string + format: date-time + env: + type: string + revision: + type: string + version: + type: string + description: '' + delete: + operationId: osidb_api_v1_affects_cvss_scores_destroy + description: Destroy the instance and proxy the delete to Bugzilla. + parameters: + - in: path + name: affect_id schema: type: string - format: date - - in: query - name: acknowledgments__updated_dt__date__gte + format: uuid + required: true + - in: path + name: id schema: type: string - format: date + required: true + tags: + - osidb + security: + - OsidbTokenAuthentication: [] + responses: + '204': + content: + application/json: + schema: + type: object + properties: + dt: + type: string + format: date-time + env: + type: string + revision: + type: string + version: + type: string + description: '' + /osidb/api/v1/affects/{uuid}: + get: + operationId: osidb_api_v1_affects_retrieve + parameters: - in: query - name: acknowledgments__updated_dt__date__lte + name: exclude_fields schema: - type: string - format: date + type: array + items: + type: string + description: 'Exclude specified fields from the response. Multiple values + may be separated by commas. Dot notation can be used to filter on related + model fields. Example: `exclude_fields=field,related_model_field.field`' - in: query - name: acknowledgments__updated_dt__gt + name: include_fields schema: - type: string - format: date-time + type: array + items: + type: string + description: 'Include only specified fields in the response. Multiple values + may be separated by commas. Dot notation can be used to filter on related + model fields. Example: `include_fields=field,related_model_field.field`' - in: query - name: acknowledgments__updated_dt__gte + name: include_meta_attr schema: - type: string - format: date-time - - in: query - name: acknowledgments__updated_dt__lt + type: array + items: + type: string + description: 'Specify which keys from meta_attr field should be retrieved, + multiple values may be separated by commas. Dot notation can be used to + specify meta_attr keys on related models. Example: `include_meta_attr=key,related_model.key`Use + wildcards eg. `include_meta_attr=*,related_model.*` for retrieving all the + keys from meta_attr. Omit this parameter to not include meta_attr fields + at all. ' + - in: path + name: uuid schema: type: string - format: date-time - - in: query - name: acknowledgments__updated_dt__lte + format: uuid + description: A UUID string identifying this Affect. + required: true + tags: + - osidb + security: + - OsidbTokenAuthentication: [] + - {} + responses: + '200': + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/Affect' + - type: object + properties: + dt: + type: string + format: date-time + env: + type: string + revision: + type: string + version: + type: string + description: '' + put: + operationId: osidb_api_v1_affects_update + parameters: + - in: header + name: Bugzilla-Api-Key schema: type: string - format: date-time - - in: query - name: acknowledgments__uuid + description: User generated api key for Bugzilla authentication. + required: true + - in: path + name: uuid schema: type: string format: uuid - - in: query - name: affects__affectedness - schema: - type: string - enum: - - '' + description: A UUID string identifying this Affect. + required: true + tags: + - osidb + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Affect' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Affect' + multipart/form-data: + schema: + $ref: '#/components/schemas/Affect' + required: true + security: + - OsidbTokenAuthentication: [] + responses: + '200': + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/Affect' + - type: object + properties: + dt: + type: string + format: date-time + env: + type: string + revision: + type: string + version: + type: string + description: '' + delete: + operationId: osidb_api_v1_affects_destroy + description: Destroy the instance and proxy the delete to Bugzilla + parameters: + - in: path + name: uuid + schema: + type: string + format: uuid + description: A UUID string identifying this Affect. + required: true + tags: + - osidb + security: + - OsidbTokenAuthentication: [] + responses: + '200': + content: + application/json: + schema: + type: object + properties: + dt: + type: string + format: date-time + env: + type: string + revision: + type: string + version: + type: string + description: '' + /osidb/api/v1/flaws: + get: + operationId: osidb_api_v1_flaws_list + parameters: + - in: query + name: acknowledgments__affiliation + schema: + type: string + - in: query + name: acknowledgments__created_dt + schema: + type: string + format: date-time + - in: query + name: acknowledgments__created_dt__date + schema: + type: string + format: date + - in: query + name: acknowledgments__created_dt__date__gte + schema: + type: string + format: date + - in: query + name: acknowledgments__created_dt__date__lte + schema: + type: string + format: date + - in: query + name: acknowledgments__created_dt__gt + schema: + type: string + format: date-time + - in: query + name: acknowledgments__created_dt__gte + schema: + type: string + format: date-time + - in: query + name: acknowledgments__created_dt__lt + schema: + type: string + format: date-time + - in: query + name: acknowledgments__created_dt__lte + schema: + type: string + format: date-time + - in: query + name: acknowledgments__from_upstream + schema: + type: boolean + - in: query + name: acknowledgments__name + schema: + type: string + - in: query + name: acknowledgments__updated_dt + schema: + type: string + format: date-time + - in: query + name: acknowledgments__updated_dt__date + schema: + type: string + format: date + - in: query + name: acknowledgments__updated_dt__date__gte + schema: + type: string + format: date + - in: query + name: acknowledgments__updated_dt__date__lte + schema: + type: string + format: date + - in: query + name: acknowledgments__updated_dt__gt + schema: + type: string + format: date-time + - in: query + name: acknowledgments__updated_dt__gte + schema: + type: string + format: date-time + - in: query + name: acknowledgments__updated_dt__lt + schema: + type: string + format: date-time + - in: query + name: acknowledgments__updated_dt__lte + schema: + type: string + format: date-time + - in: query + name: acknowledgments__uuid + schema: + type: string + format: uuid + - in: query + name: affects__affectedness + schema: + type: string + enum: + - '' - AFFECTED - NEW - NOTAFFECTED @@ -1938,6 +2440,50 @@ paths: name: affects__trackers__errata__advisory_name schema: type: string + - in: query + name: affects__trackers__errata__et_id + schema: + type: integer + - in: query + name: affects__trackers__errata__shipped_dt + schema: + type: string + format: date-time + - in: query + name: affects__trackers__errata__shipped_dt__date + schema: + type: string + format: date + - in: query + name: affects__trackers__errata__shipped_dt__date__gte + schema: + type: string + format: date + - in: query + name: affects__trackers__errata__shipped_dt__date__lte + schema: + type: string + format: date + - in: query + name: affects__trackers__errata__shipped_dt__gt + schema: + type: string + format: date-time + - in: query + name: affects__trackers__errata__shipped_dt__gte + schema: + type: string + format: date-time + - in: query + name: affects__trackers__errata__shipped_dt__lt + schema: + type: string + format: date-time + - in: query + name: affects__trackers__errata__shipped_dt__lte + schema: + type: string + format: date-time - in: query name: affects__trackers__external_system_id schema: @@ -2128,11 +2674,13 @@ paths: name: cvss2 schema: type: string + deprecated: true - in: query name: cvss2_score schema: type: number format: float + deprecated: true - in: query name: cvss2_score__gt schema: @@ -2157,11 +2705,13 @@ paths: name: cvss3 schema: type: string + deprecated: true - in: query name: cvss3_score schema: type: number format: float + deprecated: true - in: query name: cvss3_score__gt schema: @@ -2183,55 +2733,164 @@ paths: type: number format: float - in: query - name: cwe_id + name: cvss_scores__comment schema: type: string - in: query - name: description + name: cvss_scores__created_dt schema: type: string + format: date-time - in: query - name: embargoed + name: cvss_scores__created_dt__date schema: - type: boolean + type: string + format: date - in: query - name: exclude_fields + name: cvss_scores__created_dt__date__gte schema: - type: array - items: - type: string - description: 'Exclude specified fields from the response. Multiple values - may be separated by commas. Dot notation can be used to filter on related - model fields. Example: `exclude_fields=field,related_model_field.field`' + type: string + format: date - in: query - name: flaw_meta_type + name: cvss_scores__created_dt__date__lte schema: - type: array - items: - type: string - description: 'Include flaw metas with specified type only, multiple values - may be separated by commas. ' + type: string + format: date - in: query - name: impact + name: cvss_scores__created_dt__gt schema: type: string - enum: - - '' - - CRITICAL - - IMPORTANT - - LOW - - MODERATE + format: date-time - in: query - name: include_fields + name: cvss_scores__created_dt__gte schema: - type: array - items: - type: string - description: 'Include only specified fields in the response. Multiple values - may be separated by commas. Dot notation can be used to filter on related - model fields. Example: `include_fields=field,related_model_field.field`' + type: string + format: date-time - in: query - name: include_meta_attr + name: cvss_scores__created_dt__lt + schema: + type: string + format: date-time + - in: query + name: cvss_scores__created_dt__lte + schema: + type: string + format: date-time + - in: query + name: cvss_scores__cvss_version + schema: + type: string + - in: query + name: cvss_scores__issuer + schema: + type: string + enum: + - NIST + - RH + - in: query + name: cvss_scores__score + schema: + type: number + format: float + - in: query + name: cvss_scores__updated_dt + schema: + type: string + format: date-time + - in: query + name: cvss_scores__updated_dt__date + schema: + type: string + format: date + - in: query + name: cvss_scores__updated_dt__date__gte + schema: + type: string + format: date + - in: query + name: cvss_scores__updated_dt__date__lte + schema: + type: string + format: date + - in: query + name: cvss_scores__updated_dt__gt + schema: + type: string + format: date-time + - in: query + name: cvss_scores__updated_dt__gte + schema: + type: string + format: date-time + - in: query + name: cvss_scores__updated_dt__lt + schema: + type: string + format: date-time + - in: query + name: cvss_scores__updated_dt__lte + schema: + type: string + format: date-time + - in: query + name: cvss_scores__uuid + schema: + type: string + format: uuid + - in: query + name: cvss_scores__vector + schema: + type: string + - in: query + name: cwe_id + schema: + type: string + - in: query + name: description + schema: + type: string + - in: query + name: embargoed + schema: + type: boolean + - in: query + name: exclude_fields + schema: + type: array + items: + type: string + description: 'Exclude specified fields from the response. Multiple values + may be separated by commas. Dot notation can be used to filter on related + model fields. Example: `exclude_fields=field,related_model_field.field`' + - in: query + name: flaw_meta_type + schema: + type: array + items: + type: string + description: 'Include flaw metas with specified type only, multiple values + may be separated by commas. ' + - in: query + name: impact + schema: + type: string + enum: + - '' + - CRITICAL + - IMPORTANT + - LOW + - MODERATE + - in: query + name: include_fields + schema: + type: array + items: + type: string + description: 'Include only specified fields in the response. Multiple values + may be separated by commas. Dot notation can be used to filter on related + model fields. Example: `include_fields=field,related_model_field.field`' + - in: query + name: include_meta_attr schema: type: array items: @@ -2277,10 +2936,12 @@ paths: name: nvd_cvss2 schema: type: string + deprecated: true - in: query name: nvd_cvss3 schema: type: string + deprecated: true - name: offset required: false in: query @@ -2312,6 +2973,8 @@ paths: - -affects__resolution - -affects__trackers__created_dt - -affects__trackers__errata__advisory_name + - -affects__trackers__errata__et_id + - -affects__trackers__errata__shipped_dt - -affects__trackers__external_system_id - -affects__trackers__ps_update_stream - -affects__trackers__resolution @@ -2329,12 +2992,25 @@ paths: - -cvss2_score - -cvss3 - -cvss3_score + - -cvss_scores__comment + - -cvss_scores__created_dt + - -cvss_scores__issuer + - -cvss_scores__score + - -cvss_scores__updated_dt + - -cvss_scores__uuid + - -cvss_scores__vector - -cwe_id - -impact - -major_incident_state - -nist_cvss_validation - -nvd_cvss2 - -nvd_cvss3 + - -references__created_dt + - -references__description + - -references__type + - -references__updated_dt + - -references__url + - -references__uuid - -reported_dt - -requires_summary - -source @@ -2360,6 +3036,8 @@ paths: - affects__resolution - affects__trackers__created_dt - affects__trackers__errata__advisory_name + - affects__trackers__errata__et_id + - affects__trackers__errata__shipped_dt - affects__trackers__external_system_id - affects__trackers__ps_update_stream - affects__trackers__resolution @@ -2377,12 +3055,25 @@ paths: - cvss2_score - cvss3 - cvss3_score + - cvss_scores__comment + - cvss_scores__created_dt + - cvss_scores__issuer + - cvss_scores__score + - cvss_scores__updated_dt + - cvss_scores__uuid + - cvss_scores__vector - cwe_id - impact - major_incident_state - nist_cvss_validation - nvd_cvss2 - nvd_cvss3 + - references__created_dt + - references__description + - references__type + - references__updated_dt + - references__url + - references__uuid - reported_dt - requires_summary - source @@ -2393,6 +3084,106 @@ paths: description: Ordering explode: false style: form + - in: query + name: references__created_dt + schema: + type: string + format: date-time + - in: query + name: references__created_dt__date + schema: + type: string + format: date + - in: query + name: references__created_dt__date__gte + schema: + type: string + format: date + - in: query + name: references__created_dt__date__lte + schema: + type: string + format: date + - in: query + name: references__created_dt__gt + schema: + type: string + format: date-time + - in: query + name: references__created_dt__gte + schema: + type: string + format: date-time + - in: query + name: references__created_dt__lt + schema: + type: string + format: date-time + - in: query + name: references__created_dt__lte + schema: + type: string + format: date-time + - in: query + name: references__description + schema: + type: string + - in: query + name: references__type + schema: + type: string + enum: + - ARTICLE + - EXTERNAL + - in: query + name: references__updated_dt + schema: + type: string + format: date-time + - in: query + name: references__updated_dt__date + schema: + type: string + format: date + - in: query + name: references__updated_dt__date__gte + schema: + type: string + format: date + - in: query + name: references__updated_dt__date__lte + schema: + type: string + format: date + - in: query + name: references__updated_dt__gt + schema: + type: string + format: date-time + - in: query + name: references__updated_dt__gte + schema: + type: string + format: date-time + - in: query + name: references__updated_dt__lt + schema: + type: string + format: date-time + - in: query + name: references__updated_dt__lte + schema: + type: string + format: date-time + - in: query + name: references__url + schema: + type: string + - in: query + name: references__uuid + schema: + type: string + format: uuid - in: query name: reported_dt schema: @@ -2539,38 +3330,846 @@ paths: - XEN - XPDF - in: query - name: statement + name: statement + schema: + type: string + - in: query + name: summary + schema: + type: string + - in: query + name: title + schema: + type: string + - in: query + name: tracker_ids + schema: + type: array + items: + type: string + description: Filter only Flaws which are related to specified Trackers (through + Affects). Multiple tracker IDs may be separated by commas. Also only Affects + that have the specified Trackers related will be shown. + - in: query + name: type + schema: + type: string + enum: + - VULNERABILITY + - WEAKNESS + - in: query + name: unembargo_dt + schema: + type: string + format: date-time + - in: query + name: updated_dt + schema: + type: string + format: date-time + - in: query + name: updated_dt__date + schema: + type: string + format: date + - in: query + name: updated_dt__date__gte + schema: + type: string + format: date + - in: query + name: updated_dt__date__lte + schema: + type: string + format: date + - in: query + name: updated_dt__gt + schema: + type: string + format: date-time + - in: query + name: updated_dt__gte + schema: + type: string + format: date-time + - in: query + name: updated_dt__lt + schema: + type: string + format: date-time + - in: query + name: updated_dt__lte + schema: + type: string + format: date-time + - in: query + name: uuid + schema: + type: string + format: uuid + tags: + - osidb + security: + - OsidbTokenAuthentication: [] + - {} + responses: + '200': + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PaginatedFlawList' + - type: object + properties: + dt: + type: string + format: date-time + env: + type: string + revision: + type: string + version: + type: string + description: '' + post: + operationId: osidb_api_v1_flaws_create + parameters: + - in: header + name: Bugzilla-Api-Key + schema: + type: string + description: User generated api key for Bugzilla authentication. + required: true + - in: header + name: Jira-Api-Key + schema: + type: string + description: User generated api key for Jira authentication. + required: true + tags: + - osidb + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FlawPost' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/FlawPost' + multipart/form-data: + schema: + $ref: '#/components/schemas/FlawPost' + required: true + security: + - OsidbTokenAuthentication: [] + responses: + '201': + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/Flaw' + - type: object + properties: + dt: + type: string + format: date-time + env: + type: string + revision: + type: string + version: + type: string + description: '' + /osidb/api/v1/flaws/{flaw_id}/acknowledgments: + get: + operationId: osidb_api_v1_flaws_acknowledgments_list + parameters: + - in: query + name: affiliation + schema: + type: string + - in: query + name: created_dt + schema: + type: string + format: date-time + - in: query + name: created_dt__date + schema: + type: string + format: date + - in: query + name: created_dt__date__gte + schema: + type: string + format: date + - in: query + name: created_dt__date__lte + schema: + type: string + format: date + - in: query + name: created_dt__gt + schema: + type: string + format: date-time + - in: query + name: created_dt__gte + schema: + type: string + format: date-time + - in: query + name: created_dt__lt + schema: + type: string + format: date-time + - in: query + name: created_dt__lte + schema: + type: string + format: date-time + - in: query + name: exclude_fields + schema: + type: array + items: + type: string + description: 'Exclude specified fields from the response. Multiple values + may be separated by commas. Dot notation can be used to filter on related + model fields. Example: `exclude_fields=field,related_model_field.field`' + - in: path + name: flaw_id + schema: + type: string + format: uuid + required: true + - in: query + name: from_upstream + schema: + type: boolean + - in: query + name: include_fields + schema: + type: array + items: + type: string + description: 'Include only specified fields in the response. Multiple values + may be separated by commas. Dot notation can be used to filter on related + model fields. Example: `include_fields=field,related_model_field.field`' + - in: query + name: include_meta_attr + schema: + type: array + items: + type: string + description: 'Specify which keys from meta_attr field should be retrieved, + multiple values may be separated by commas. Dot notation can be used to + specify meta_attr keys on related models. Example: `include_meta_attr=key,related_model.key`Use + wildcards eg. `include_meta_attr=*,related_model.*` for retrieving all the + keys from meta_attr. Omit this parameter to not include meta_attr fields + at all. ' + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - in: query + name: name + schema: + type: string + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: query + name: updated_dt + schema: + type: string + format: date-time + - in: query + name: updated_dt__date + schema: + type: string + format: date + - in: query + name: updated_dt__date__gte + schema: + type: string + format: date + - in: query + name: updated_dt__date__lte + schema: + type: string + format: date + - in: query + name: updated_dt__gt + schema: + type: string + format: date-time + - in: query + name: updated_dt__gte + schema: + type: string + format: date-time + - in: query + name: updated_dt__lt + schema: + type: string + format: date-time + - in: query + name: updated_dt__lte + schema: + type: string + format: date-time + - in: query + name: uuid + schema: + type: string + format: uuid + tags: + - osidb + security: + - OsidbTokenAuthentication: [] + - {} + responses: + '200': + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PaginatedFlawAcknowledgmentList' + - type: object + properties: + dt: + type: string + format: date-time + env: + type: string + revision: + type: string + version: + type: string + description: '' + post: + operationId: osidb_api_v1_flaws_acknowledgments_create + parameters: + - in: path + name: flaw_id + schema: + type: string + format: uuid + required: true + tags: + - osidb + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FlawAcknowledgmentPost' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/FlawAcknowledgmentPost' + multipart/form-data: + schema: + $ref: '#/components/schemas/FlawAcknowledgmentPost' + required: true + security: + - OsidbTokenAuthentication: [] + responses: + '201': + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/FlawAcknowledgment' + - type: object + properties: + dt: + type: string + format: date-time + env: + type: string + revision: + type: string + version: + type: string + description: '' + /osidb/api/v1/flaws/{flaw_id}/acknowledgments/{id}: + get: + operationId: osidb_api_v1_flaws_acknowledgments_retrieve + parameters: + - in: query + name: exclude_fields + schema: + type: array + items: + type: string + description: 'Exclude specified fields from the response. Multiple values + may be separated by commas. Dot notation can be used to filter on related + model fields. Example: `exclude_fields=field,related_model_field.field`' + - in: path + name: flaw_id + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + required: true + - in: query + name: include_fields + schema: + type: array + items: + type: string + description: 'Include only specified fields in the response. Multiple values + may be separated by commas. Dot notation can be used to filter on related + model fields. Example: `include_fields=field,related_model_field.field`' + - in: query + name: include_meta_attr + schema: + type: array + items: + type: string + description: 'Specify which keys from meta_attr field should be retrieved, + multiple values may be separated by commas. Dot notation can be used to + specify meta_attr keys on related models. Example: `include_meta_attr=key,related_model.key`Use + wildcards eg. `include_meta_attr=*,related_model.*` for retrieving all the + keys from meta_attr. Omit this parameter to not include meta_attr fields + at all. ' + tags: + - osidb + security: + - OsidbTokenAuthentication: [] + - {} + responses: + '200': + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/FlawAcknowledgment' + - type: object + properties: + dt: + type: string + format: date-time + env: + type: string + revision: + type: string + version: + type: string + description: '' + put: + operationId: osidb_api_v1_flaws_acknowledgments_update + parameters: + - in: path + name: flaw_id + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + required: true + tags: + - osidb + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FlawAcknowledgmentPut' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/FlawAcknowledgmentPut' + multipart/form-data: + schema: + $ref: '#/components/schemas/FlawAcknowledgmentPut' + required: true + security: + - OsidbTokenAuthentication: [] + responses: + '200': + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/FlawAcknowledgment' + - type: object + properties: + dt: + type: string + format: date-time + env: + type: string + revision: + type: string + version: + type: string + description: '' + delete: + operationId: osidb_api_v1_flaws_acknowledgments_destroy + description: Destroy the instance and proxy the delete to Bugzilla + parameters: + - in: path + name: flaw_id + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + required: true + tags: + - osidb + security: + - OsidbTokenAuthentication: [] + responses: + '200': + content: + application/json: + schema: + type: object + properties: + dt: + type: string + format: date-time + env: + type: string + revision: + type: string + version: + type: string + description: '' + /osidb/api/v1/flaws/{flaw_id}/comments: + get: + operationId: osidb_api_v1_flaws_comments_list + description: List existing comments for a given flaw. Beware that freshly created + comments are not guaranteed to keep their original UUIDs, especially if multiple + comments are created simultaneously. + parameters: + - in: query + name: exclude_fields + schema: + type: array + items: + type: string + description: 'Exclude specified fields from the response. Multiple values + may be separated by commas. Dot notation can be used to filter on related + model fields. Example: `exclude_fields=field,related_model_field.field`' + - in: query + name: external_system_id + schema: + type: string + - in: path + name: flaw_id + schema: + type: string + description: A string representing either the internal OSIDB UUID of the Flaw + resource or the CVE number corresponding to a Flaw + required: true + - in: query + name: include_fields + schema: + type: array + items: + type: string + description: 'Include only specified fields in the response. Multiple values + may be separated by commas. Dot notation can be used to filter on related + model fields. Example: `include_fields=field,related_model_field.field`' + - in: query + name: include_meta_attr + schema: + type: array + items: + type: string + description: 'Specify which keys from meta_attr field should be retrieved, + multiple values may be separated by commas. Dot notation can be used to + specify meta_attr keys on related models. Example: `include_meta_attr=key,related_model.key`Use + wildcards eg. `include_meta_attr=*,related_model.*` for retrieving all the + keys from meta_attr. Omit this parameter to not include meta_attr fields + at all. ' + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer + - in: query + name: order + schema: + type: integer + description: Retrieve only FlawComment resource with the specified order number. + Regular flaw comments are numbered from 1 up. + - in: query + name: uuid + schema: + type: string + format: uuid + tags: + - osidb + security: + - OsidbTokenAuthentication: [] + - {} + responses: + '200': + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/PaginatedFlawCommentList' + - type: object + properties: + dt: + type: string + format: date-time + env: + type: string + revision: + type: string + version: + type: string + description: '' + post: + operationId: osidb_api_v1_flaws_comments_create + description: Create a new comment for a given flaw. Beware that freshly created + comments are not guaranteed to keep their original UUIDs, especially if multiple + comments are created simultaneously. + parameters: + - in: path + name: flaw_id + schema: + type: string + description: A string representing either the internal OSIDB UUID of the Flaw + resource or the CVE number corresponding to a Flaw + required: true + tags: + - osidb + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FlawCommentPost' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/FlawCommentPost' + multipart/form-data: + schema: + $ref: '#/components/schemas/FlawCommentPost' + required: true + security: + - OsidbTokenAuthentication: [] + responses: + '201': + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/FlawComment' + - type: object + properties: + dt: + type: string + format: date-time + env: + type: string + revision: + type: string + version: + type: string + description: '' + /osidb/api/v1/flaws/{flaw_id}/comments/{comment_id}: + get: + operationId: osidb_api_v1_flaws_comments_retrieve + description: Retrieve a single existing comments for a given flaw. Beware that + freshly created comments are not guaranteed to keep their original UUIDs, + especially if multiple comments are created simultaneously. + parameters: + - in: path + name: comment_id + schema: + type: string + description: A string representing the internal OSIDB UUID of the FlawComment + resource. + required: true + - in: query + name: exclude_fields + schema: + type: array + items: + type: string + description: 'Exclude specified fields from the response. Multiple values + may be separated by commas. Dot notation can be used to filter on related + model fields. Example: `exclude_fields=field,related_model_field.field`' + - in: path + name: flaw_id + schema: + type: string + description: A string representing either the internal OSIDB UUID of the Flaw + resource or the CVE number corresponding to a Flaw + required: true + - in: query + name: include_fields + schema: + type: array + items: + type: string + description: 'Include only specified fields in the response. Multiple values + may be separated by commas. Dot notation can be used to filter on related + model fields. Example: `include_fields=field,related_model_field.field`' + - in: query + name: include_meta_attr + schema: + type: array + items: + type: string + description: 'Specify which keys from meta_attr field should be retrieved, + multiple values may be separated by commas. Dot notation can be used to + specify meta_attr keys on related models. Example: `include_meta_attr=key,related_model.key`Use + wildcards eg. `include_meta_attr=*,related_model.*` for retrieving all the + keys from meta_attr. Omit this parameter to not include meta_attr fields + at all. ' + tags: + - osidb + security: + - OsidbTokenAuthentication: [] + - {} + responses: + '200': + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/FlawComment' + - type: object + properties: + dt: + type: string + format: date-time + env: + type: string + revision: + type: string + version: + type: string + description: '' + /osidb/api/v1/flaws/{flaw_id}/cvss_scores: + get: + operationId: osidb_api_v1_flaws_cvss_scores_list + parameters: + - in: query + name: comment schema: type: string - in: query - name: summary + name: created_dt schema: type: string + format: date-time - in: query - name: title + name: created_dt__date schema: type: string + format: date - in: query - name: tracker_ids + name: created_dt__date__gte + schema: + type: string + format: date + - in: query + name: created_dt__date__lte + schema: + type: string + format: date + - in: query + name: created_dt__gt + schema: + type: string + format: date-time + - in: query + name: created_dt__gte + schema: + type: string + format: date-time + - in: query + name: created_dt__lt + schema: + type: string + format: date-time + - in: query + name: created_dt__lte + schema: + type: string + format: date-time + - in: query + name: cvss_version + schema: + type: string + - in: query + name: exclude_fields schema: type: array items: type: string - description: Filter only Flaws which are related to specified Trackers (through - Affects). Multiple tracker IDs may be separated by commas. Also only Affects - that have the specified Trackers related will be shown. + description: 'Exclude specified fields from the response. Multiple values + may be separated by commas. Dot notation can be used to filter on related + model fields. Example: `exclude_fields=field,related_model_field.field`' + - in: path + name: flaw_id + schema: + type: string + format: uuid + required: true - in: query - name: type + name: include_fields + schema: + type: array + items: + type: string + description: 'Include only specified fields in the response. Multiple values + may be separated by commas. Dot notation can be used to filter on related + model fields. Example: `include_fields=field,related_model_field.field`' + - in: query + name: issuer schema: type: string enum: - - VULNERABILITY - - WEAKNESS + - NIST + - RH + - name: limit + required: false + in: query + description: Number of results to return per page. + schema: + type: integer + - name: offset + required: false + in: query + description: The initial index from which to return the results. + schema: + type: integer - in: query - name: unembargo_dt + name: score schema: - type: string - format: date-time + type: number + format: float - in: query name: updated_dt schema: @@ -2616,6 +4215,10 @@ paths: schema: type: string format: uuid + - in: query + name: vector + schema: + type: string tags: - osidb security: @@ -2627,7 +4230,7 @@ paths: application/json: schema: allOf: - - $ref: '#/components/schemas/PaginatedFlawList' + - $ref: '#/components/schemas/PaginatedFlawCVSSList' - type: object properties: dt: @@ -2641,20 +4244,27 @@ paths: type: string description: '' post: - operationId: osidb_api_v1_flaws_create + operationId: osidb_api_v1_flaws_cvss_scores_create + parameters: + - in: path + name: flaw_id + schema: + type: string + format: uuid + required: true tags: - osidb requestBody: content: application/json: schema: - $ref: '#/components/schemas/FlawPost' + $ref: '#/components/schemas/FlawCVSSPost' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/FlawPost' + $ref: '#/components/schemas/FlawCVSSPost' multipart/form-data: schema: - $ref: '#/components/schemas/FlawPost' + $ref: '#/components/schemas/FlawCVSSPost' required: true security: - OsidbTokenAuthentication: [] @@ -2664,7 +4274,7 @@ paths: application/json: schema: allOf: - - $ref: '#/components/schemas/Flaw' + - $ref: '#/components/schemas/FlawCVSS' - type: object properties: dt: @@ -2677,14 +4287,152 @@ paths: version: type: string description: '' - /osidb/api/v1/flaws/{flaw_id}/acknowledgments: + /osidb/api/v1/flaws/{flaw_id}/cvss_scores/{id}: get: - operationId: osidb_api_v1_flaws_acknowledgments_list + operationId: osidb_api_v1_flaws_cvss_scores_retrieve parameters: - in: query - name: affiliation + name: exclude_fields + schema: + type: array + items: + type: string + description: 'Exclude specified fields from the response. Multiple values + may be separated by commas. Dot notation can be used to filter on related + model fields. Example: `exclude_fields=field,related_model_field.field`' + - in: path + name: flaw_id + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + required: true + - in: query + name: include_fields + schema: + type: array + items: + type: string + description: 'Include only specified fields in the response. Multiple values + may be separated by commas. Dot notation can be used to filter on related + model fields. Example: `include_fields=field,related_model_field.field`' + tags: + - osidb + security: + - OsidbTokenAuthentication: [] + - {} + responses: + '200': + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/FlawCVSS' + - type: object + properties: + dt: + type: string + format: date-time + env: + type: string + revision: + type: string + version: + type: string + description: '' + put: + operationId: osidb_api_v1_flaws_cvss_scores_update + parameters: + - in: path + name: flaw_id + schema: + type: string + format: uuid + required: true + - in: path + name: id + schema: + type: string + required: true + tags: + - osidb + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FlawCVSSPut' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/FlawCVSSPut' + multipart/form-data: + schema: + $ref: '#/components/schemas/FlawCVSSPut' + required: true + security: + - OsidbTokenAuthentication: [] + responses: + '200': + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/FlawCVSS' + - type: object + properties: + dt: + type: string + format: date-time + env: + type: string + revision: + type: string + version: + type: string + description: '' + delete: + operationId: osidb_api_v1_flaws_cvss_scores_destroy + description: Destroy the instance and proxy the delete to Bugzilla + parameters: + - in: path + name: flaw_id + schema: + type: string + format: uuid + required: true + - in: path + name: id schema: type: string + required: true + tags: + - osidb + security: + - OsidbTokenAuthentication: [] + responses: + '200': + content: + application/json: + schema: + type: object + properties: + dt: + type: string + format: date-time + env: + type: string + revision: + type: string + version: + type: string + description: '' + /osidb/api/v1/flaws/{flaw_id}/package_versions: + get: + operationId: osidb_api_v1_flaws_package_versions_list + parameters: - in: query name: created_dt schema: @@ -2740,10 +4488,6 @@ paths: type: string format: uuid required: true - - in: query - name: from_upstream - schema: - type: boolean - in: query name: include_fields schema: @@ -2753,34 +4497,22 @@ paths: description: 'Include only specified fields in the response. Multiple values may be separated by commas. Dot notation can be used to filter on related model fields. Example: `include_fields=field,related_model_field.field`' - - in: query - name: include_meta_attr - schema: - type: array - items: - type: string - description: 'Specify which keys from meta_attr field should be retrieved, - multiple values may be separated by commas. Dot notation can be used to - specify meta_attr keys on related models. Example: `include_meta_attr=key,related_model.key`Use - wildcards eg. `include_meta_attr=*,related_model.*` for retrieving all the - keys from meta_attr. Omit this parameter to not include meta_attr fields - at all. ' - name: limit required: false in: query - description: Number of results to return per page. - schema: - type: integer - - in: query - name: name + description: Number of results to return per page. schema: - type: string + type: integer - name: offset required: false in: query description: The initial index from which to return the results. schema: type: integer + - in: query + name: package + schema: + type: string - in: query name: updated_dt schema: @@ -2826,6 +4558,10 @@ paths: schema: type: string format: uuid + - in: query + name: versions__version + schema: + type: string tags: - osidb security: @@ -2837,7 +4573,7 @@ paths: application/json: schema: allOf: - - $ref: '#/components/schemas/PaginatedFlawAcknowledgmentList' + - $ref: '#/components/schemas/PaginatedFlawPackageVersionList' - type: object properties: dt: @@ -2851,7 +4587,7 @@ paths: type: string description: '' post: - operationId: osidb_api_v1_flaws_acknowledgments_create + operationId: osidb_api_v1_flaws_package_versions_create parameters: - in: path name: flaw_id @@ -2865,13 +4601,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FlawAcknowledgmentPost' + $ref: '#/components/schemas/FlawPackageVersionPost' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/FlawAcknowledgmentPost' + $ref: '#/components/schemas/FlawPackageVersionPost' multipart/form-data: schema: - $ref: '#/components/schemas/FlawAcknowledgmentPost' + $ref: '#/components/schemas/FlawPackageVersionPost' required: true security: - OsidbTokenAuthentication: [] @@ -2881,7 +4617,7 @@ paths: application/json: schema: allOf: - - $ref: '#/components/schemas/FlawAcknowledgment' + - $ref: '#/components/schemas/FlawPackageVersion' - type: object properties: dt: @@ -2894,9 +4630,9 @@ paths: version: type: string description: '' - /osidb/api/v1/flaws/{flaw_id}/acknowledgments/{id}: + /osidb/api/v1/flaws/{flaw_id}/package_versions/{id}: get: - operationId: osidb_api_v1_flaws_acknowledgments_retrieve + operationId: osidb_api_v1_flaws_package_versions_retrieve parameters: - in: query name: exclude_fields @@ -2927,18 +4663,6 @@ paths: description: 'Include only specified fields in the response. Multiple values may be separated by commas. Dot notation can be used to filter on related model fields. Example: `include_fields=field,related_model_field.field`' - - in: query - name: include_meta_attr - schema: - type: array - items: - type: string - description: 'Specify which keys from meta_attr field should be retrieved, - multiple values may be separated by commas. Dot notation can be used to - specify meta_attr keys on related models. Example: `include_meta_attr=key,related_model.key`Use - wildcards eg. `include_meta_attr=*,related_model.*` for retrieving all the - keys from meta_attr. Omit this parameter to not include meta_attr fields - at all. ' tags: - osidb security: @@ -2950,7 +4674,7 @@ paths: application/json: schema: allOf: - - $ref: '#/components/schemas/FlawAcknowledgment' + - $ref: '#/components/schemas/FlawPackageVersion' - type: object properties: dt: @@ -2964,7 +4688,7 @@ paths: type: string description: '' put: - operationId: osidb_api_v1_flaws_acknowledgments_update + operationId: osidb_api_v1_flaws_package_versions_update parameters: - in: path name: flaw_id @@ -2983,13 +4707,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FlawAcknowledgmentPut' + $ref: '#/components/schemas/FlawPackageVersionPut' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/FlawAcknowledgmentPut' + $ref: '#/components/schemas/FlawPackageVersionPut' multipart/form-data: schema: - $ref: '#/components/schemas/FlawAcknowledgmentPut' + $ref: '#/components/schemas/FlawPackageVersionPut' required: true security: - OsidbTokenAuthentication: [] @@ -2999,7 +4723,7 @@ paths: application/json: schema: allOf: - - $ref: '#/components/schemas/FlawAcknowledgment' + - $ref: '#/components/schemas/FlawPackageVersion' - type: object properties: dt: @@ -3013,7 +4737,8 @@ paths: type: string description: '' delete: - operationId: osidb_api_v1_flaws_acknowledgments_destroy + operationId: osidb_api_v1_flaws_package_versions_destroy + description: Destroy the instance and proxy the delete to Bugzilla parameters: - in: path name: flaw_id @@ -3031,7 +4756,7 @@ paths: security: - OsidbTokenAuthentication: [] responses: - '204': + '200': content: application/json: schema: @@ -3047,228 +4772,54 @@ paths: version: type: string description: '' - /osidb/api/v1/flaws/{flaw_id}/comments: + /osidb/api/v1/flaws/{flaw_id}/references: get: - operationId: osidb_api_v1_flaws_comments_list - description: List existing comments for a given flaw. Beware that freshly created - comments are not guaranteed to keep their original UUIDs, especially if multiple - comments are created simultaneously. + operationId: osidb_api_v1_flaws_references_list parameters: - in: query - name: exclude_fields - schema: - type: array - items: - type: string - description: 'Exclude specified fields from the response. Multiple values - may be separated by commas. Dot notation can be used to filter on related - model fields. Example: `exclude_fields=field,related_model_field.field`' - - in: query - name: external_system_id - schema: - type: string - - in: path - name: flaw_id + name: created_dt schema: type: string - description: A string representing either the internal OSIDB UUID of the Flaw - resource or the CVE number corresponding to a Flaw - required: true - - in: query - name: include_fields - schema: - type: array - items: - type: string - description: 'Include only specified fields in the response. Multiple values - may be separated by commas. Dot notation can be used to filter on related - model fields. Example: `include_fields=field,related_model_field.field`' - - in: query - name: include_meta_attr - schema: - type: array - items: - type: string - description: 'Specify which keys from meta_attr field should be retrieved, - multiple values may be separated by commas. Dot notation can be used to - specify meta_attr keys on related models. Example: `include_meta_attr=key,related_model.key`Use - wildcards eg. `include_meta_attr=*,related_model.*` for retrieving all the - keys from meta_attr. Omit this parameter to not include meta_attr fields - at all. ' - - name: limit - required: false - in: query - description: Number of results to return per page. - schema: - type: integer - - name: offset - required: false - in: query - description: The initial index from which to return the results. - schema: - type: integer - - in: query - name: order - schema: - type: integer - description: Retrieve only FlawComment resource with the specified order number. - Regular flaw comments are numbered from 1 up. + format: date-time - in: query - name: uuid - schema: - type: string - format: uuid - tags: - - osidb - security: - - OsidbTokenAuthentication: [] - - {} - responses: - '200': - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/PaginatedFlawCommentList' - - type: object - properties: - dt: - type: string - format: date-time - env: - type: string - revision: - type: string - version: - type: string - description: '' - post: - operationId: osidb_api_v1_flaws_comments_create - description: Create a new comment for a given flaw. Beware that freshly created - comments are not guaranteed to keep their original UUIDs, especially if multiple - comments are created simultaneously. - parameters: - - in: path - name: flaw_id - schema: - type: string - description: A string representing either the internal OSIDB UUID of the Flaw - resource or the CVE number corresponding to a Flaw - required: true - tags: - - osidb - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/FlawCommentPost' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/FlawCommentPost' - multipart/form-data: - schema: - $ref: '#/components/schemas/FlawCommentPost' - required: true - security: - - OsidbTokenAuthentication: [] - responses: - '201': - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/FlawComment' - - type: object - properties: - dt: - type: string - format: date-time - env: - type: string - revision: - type: string - version: - type: string - description: '' - /osidb/api/v1/flaws/{flaw_id}/comments/{comment_id}: - get: - operationId: osidb_api_v1_flaws_comments_retrieve - description: Retrieve a single existing comments for a given flaw. Beware that - freshly created comments are not guaranteed to keep their original UUIDs, - especially if multiple comments are created simultaneously. - parameters: - - in: path - name: comment_id + name: created_dt__date schema: type: string - description: A string representing the internal OSIDB UUID of the FlawComment - resource. - required: true + format: date - in: query - name: exclude_fields - schema: - type: array - items: - type: string - description: 'Exclude specified fields from the response. Multiple values - may be separated by commas. Dot notation can be used to filter on related - model fields. Example: `exclude_fields=field,related_model_field.field`' - - in: path - name: flaw_id + name: created_dt__date__gte + schema: + type: string + format: date + - in: query + name: created_dt__date__lte + schema: + type: string + format: date + - in: query + name: created_dt__gt + schema: + type: string + format: date-time + - in: query + name: created_dt__gte + schema: + type: string + format: date-time + - in: query + name: created_dt__lt + schema: + type: string + format: date-time + - in: query + name: created_dt__lte + schema: + type: string + format: date-time + - in: query + name: description schema: type: string - description: A string representing either the internal OSIDB UUID of the Flaw - resource or the CVE number corresponding to a Flaw - required: true - - in: query - name: include_fields - schema: - type: array - items: - type: string - description: 'Include only specified fields in the response. Multiple values - may be separated by commas. Dot notation can be used to filter on related - model fields. Example: `include_fields=field,related_model_field.field`' - - in: query - name: include_meta_attr - schema: - type: array - items: - type: string - description: 'Specify which keys from meta_attr field should be retrieved, - multiple values may be separated by commas. Dot notation can be used to - specify meta_attr keys on related models. Example: `include_meta_attr=key,related_model.key`Use - wildcards eg. `include_meta_attr=*,related_model.*` for retrieving all the - keys from meta_attr. Omit this parameter to not include meta_attr fields - at all. ' - tags: - - osidb - security: - - OsidbTokenAuthentication: [] - - {} - responses: - '200': - content: - application/json: - schema: - allOf: - - $ref: '#/components/schemas/FlawComment' - - type: object - properties: - dt: - type: string - format: date-time - env: - type: string - revision: - type: string - version: - type: string - description: '' - /osidb/api/v1/flaws/{flaw_id}/references: - get: - operationId: osidb_api_v1_flaws_references_list - parameters: - in: query name: exclude_fields schema: @@ -3282,6 +4833,7 @@ paths: name: flaw_id schema: type: string + format: uuid required: true - in: query name: include_fields @@ -3316,6 +4868,62 @@ paths: description: The initial index from which to return the results. schema: type: integer + - in: query + name: type + schema: + type: string + enum: + - ARTICLE + - EXTERNAL + - in: query + name: updated_dt + schema: + type: string + format: date-time + - in: query + name: updated_dt__date + schema: + type: string + format: date + - in: query + name: updated_dt__date__gte + schema: + type: string + format: date + - in: query + name: updated_dt__date__lte + schema: + type: string + format: date + - in: query + name: updated_dt__gt + schema: + type: string + format: date-time + - in: query + name: updated_dt__gte + schema: + type: string + format: date-time + - in: query + name: updated_dt__lt + schema: + type: string + format: date-time + - in: query + name: updated_dt__lte + schema: + type: string + format: date-time + - in: query + name: url + schema: + type: string + - in: query + name: uuid + schema: + type: string + format: uuid tags: - osidb security: @@ -3347,6 +4955,7 @@ paths: name: flaw_id schema: type: string + format: uuid required: true tags: - osidb @@ -3400,6 +5009,7 @@ paths: name: flaw_id schema: type: string + format: uuid required: true - in: path name: id @@ -3458,6 +5068,7 @@ paths: name: flaw_id schema: type: string + format: uuid required: true - in: path name: id @@ -3470,13 +5081,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/FlawReference' + $ref: '#/components/schemas/FlawReferencePut' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/FlawReference' + $ref: '#/components/schemas/FlawReferencePut' multipart/form-data: schema: - $ref: '#/components/schemas/FlawReference' + $ref: '#/components/schemas/FlawReferencePut' required: true security: - OsidbTokenAuthentication: [] @@ -3501,11 +5112,13 @@ paths: description: '' delete: operationId: osidb_api_v1_flaws_references_destroy + description: Destroy the instance and proxy the delete to Bugzilla parameters: - in: path name: flaw_id schema: type: string + format: uuid required: true - in: path name: id @@ -3517,7 +5130,7 @@ paths: security: - OsidbTokenAuthentication: [] responses: - '204': + '200': content: application/json: schema: @@ -3618,6 +5231,18 @@ paths: put: operationId: osidb_api_v1_flaws_update parameters: + - in: header + name: Bugzilla-Api-Key + schema: + type: string + description: User generated api key for Bugzilla authentication. + required: true + - in: header + name: Jira-Api-Key + schema: + type: string + description: User generated api key for Jira authentication. + required: true - in: path name: id schema: @@ -4955,7 +6580,7 @@ paths: description: Create a new group of tasks parameters: - in: header - name: JiraAuthentication + name: Jira-Api-Key schema: type: string description: User generated token for Jira authentication. @@ -4998,7 +6623,7 @@ paths: description: Get a list of tasks from a group parameters: - in: header - name: JiraAuthentication + name: Jira-Api-Key schema: type: string description: User generated token for Jira authentication. @@ -5036,7 +6661,7 @@ paths: description: Add a task into a group parameters: - in: header - name: JiraAuthentication + name: Jira-Api-Key schema: type: string description: User generated token for Jira authentication. @@ -5078,7 +6703,7 @@ paths: description: Get a task from Jira given a task key parameters: - in: header - name: JiraAuthentication + name: Jira-Api-Key schema: type: string description: User generated token for Jira authentication. @@ -5117,7 +6742,7 @@ paths: description: Create a new comment in a task parameters: - in: header - name: JiraAuthentication + name: Jira-Api-Key schema: type: string description: User generated token for Jira authentication. @@ -5161,7 +6786,7 @@ paths: description: Edit a comment in a task parameters: - in: header - name: JiraAuthentication + name: Jira-Api-Key schema: type: string description: User generated token for Jira authentication. @@ -5210,7 +6835,7 @@ paths: description: Change a task workflow status parameters: - in: header - name: JiraAuthentication + name: Jira-Api-Key schema: type: string description: User generated token for Jira authentication. @@ -5283,7 +6908,7 @@ paths: description: Get a list of tasks from a user parameters: - in: header - name: JiraAuthentication + name: Jira-Api-Key schema: type: string description: User generated token for Jira authentication. @@ -5321,7 +6946,7 @@ paths: description: Assign a task to a user parameters: - in: header - name: JiraAuthentication + name: Jira-Api-Key schema: type: string description: User generated token for Jira authentication. @@ -5363,7 +6988,7 @@ paths: description: Get a task from Jira given a Flaw uuid parameters: - in: header - name: JiraAuthentication + name: Jira-Api-Key schema: type: string description: User generated token for Jira authentication. @@ -5401,7 +7026,7 @@ paths: description: Create a task in Jira from a Flaw parameters: - in: header - name: JiraAuthentication + name: Jira-Api-Key schema: type: string description: User generated token for Jira authentication. @@ -5437,7 +7062,7 @@ paths: description: Update a task in Jira from a Flaw parameters: - in: header - name: JiraAuthentication + name: Jira-Api-Key schema: type: string description: User generated token for Jira authentication. @@ -5474,7 +7099,7 @@ paths: description: Get a list of tasks without an user assigned parameters: - in: header - name: JiraAuthentication + name: Jira-Api-Key schema: type: string description: User generated token for Jira authentication. @@ -5528,6 +7153,46 @@ paths: version: type: string description: '' + /trackers/api/v1/file: + post: + operationId: trackers_api_v1_file_create + description: Given a list of flaws, generates a list of suggested trackers to + file. + tags: + - trackers + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FlawUUIDList' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/FlawUUIDList' + multipart/form-data: + schema: + $ref: '#/components/schemas/FlawUUIDList' + required: true + security: + - OsidbTokenAuthentication: [] + responses: + '200': + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/TrackerSuggestion' + properties: + dt: + type: string + format: date-time + env: + type: string + revision: + type: string + version: + type: string + description: '' components: schemas: Affect: @@ -5565,49 +7230,185 @@ components: cvss2: type: string maxLength: 100 + deprecated: true cvss2_score: type: number format: float nullable: true + deprecated: true cvss3: type: string maxLength: 100 + deprecated: true cvss3_score: type: number format: float - nullable: true - trackers: - type: array - items: - $ref: '#/components/schemas/Tracker' - readOnly: true - meta_attr: - type: object - properties: - affectedness: - type: string - component: - type: string - cvss2: - type: string - cvss3: - type: string - impact: - type: string - module_name: - type: string - module_stream: - type: string - ps_component: - type: string - ps_module: - type: string - resolution: - type: string - readOnly: true - delegated_resolution: + nullable: true + deprecated: true + trackers: + type: array + items: + $ref: '#/components/schemas/Tracker' + readOnly: true + meta_attr: + type: object + properties: + affectedness: + type: string + component: + type: string + cvss2: + type: string + cvss3: + type: string + impact: + type: string + module_name: + type: string + module_stream: + type: string + ps_component: + type: string + ps_module: + type: string + resolution: + type: string + readOnly: true + delegated_resolution: + type: string + readOnly: true + cvss_scores: + type: array + items: + $ref: '#/components/schemas/AffectCVSS' + readOnly: true + embargoed: + type: boolean + description: The embargoed boolean attribute is technically read-only as + it just indirectly modifies the ACLs but is mandatory as it controls the + access to the resource. + created_dt: + type: string + format: date-time + readOnly: true + updated_dt: + type: string + format: date-time + description: The updated_dt timestamp attribute is mandatory on update as + it is used to detect mit-air collisions. + required: + - created_dt + - cvss_scores + - delegated_resolution + - embargoed + - flaw + - meta_attr + - ps_component + - ps_module + - trackers + - updated_dt + - uuid + AffectCVSS: + type: object + description: AffectCVSS serializer + properties: + affect: + type: string + format: uuid + comment: + type: string + cvss_version: + type: string + issuer: + $ref: '#/components/schemas/IssuerEnum' + score: + type: number + format: float + uuid: + type: string + format: uuid + readOnly: true + vector: + type: string + maxLength: 100 + embargoed: + type: boolean + description: The embargoed boolean attribute is technically read-only as + it just indirectly modifies the ACLs but is mandatory as it controls the + access to the resource. + created_dt: + type: string + format: date-time + readOnly: true + updated_dt: + type: string + format: date-time + description: The updated_dt timestamp attribute is mandatory on update as + it is used to detect mit-air collisions. + required: + - created_dt + - cvss_version + - embargoed + - issuer + - updated_dt + - uuid + - vector + AffectCVSSPost: + type: object + description: AffectCVSS serializer + properties: + comment: + type: string + cvss_version: + type: string + issuer: + $ref: '#/components/schemas/IssuerEnum' + score: + type: number + format: float + uuid: + type: string + format: uuid + readOnly: true + vector: + type: string + maxLength: 100 + embargoed: + type: boolean + description: The embargoed boolean attribute is technically read-only as + it just indirectly modifies the ACLs but is mandatory as it controls the + access to the resource. + created_dt: + type: string + format: date-time + readOnly: true + required: + - created_dt + - cvss_version + - embargoed + - issuer + - uuid + - vector + AffectCVSSPut: + type: object + description: AffectCVSS serializer + properties: + comment: + type: string + cvss_version: + type: string + issuer: + $ref: '#/components/schemas/IssuerEnum' + score: + type: number + format: float + uuid: type: string + format: uuid readOnly: true + vector: + type: string + maxLength: 100 embargoed: type: boolean description: The embargoed boolean attribute is technically read-only as @@ -5624,15 +7425,12 @@ components: it is used to detect mit-air collisions. required: - created_dt - - delegated_resolution + - cvss_version - embargoed - - flaw - - meta_attr - - ps_component - - ps_module - - trackers + - issuer - updated_dt - uuid + - vector AffectPost: type: object description: Affect serializer @@ -5668,17 +7466,21 @@ components: cvss2: type: string maxLength: 100 + deprecated: true cvss2_score: type: number format: float nullable: true + deprecated: true cvss3: type: string maxLength: 100 + deprecated: true cvss3_score: type: number format: float nullable: true + deprecated: true trackers: type: array items: @@ -5711,6 +7513,11 @@ components: delegated_resolution: type: string readOnly: true + cvss_scores: + type: array + items: + $ref: '#/components/schemas/AffectCVSS' + readOnly: true embargoed: type: boolean description: The embargoed boolean attribute is technically read-only as @@ -5722,6 +7529,7 @@ components: readOnly: true required: - created_dt + - cvss_scores - delegated_resolution - embargoed - flaw @@ -5767,32 +7575,6 @@ components: BlankEnum: enum: - '' - CVEv5PackageVersions: - type: object - description: CVEv5 package versions serializer - properties: - package: - type: string - maxLength: 2058 - versions: - type: array - items: - $ref: '#/components/schemas/CVEv5Versions' - required: - - package - - versions - CVEv5Versions: - type: object - description: CVEv5 Package Version Serializer - properties: - version: - type: string - maxLength: 1024 - status: - $ref: '#/components/schemas/StatusEnum' - required: - - status - - version Comment: type: object description: FlawComment serializer for use by FlawSerializer @@ -5851,6 +7633,10 @@ components: advisory_name: type: string readOnly: true + shipped_dt: + type: string + format: date-time + readOnly: true created_dt: type: string format: date-time @@ -5864,6 +7650,7 @@ components: - advisory_name - created_dt - et_id + - shipped_dt - updated_dt ExploitOnlyReportData: type: object @@ -5963,23 +7750,29 @@ components: cvss2: type: string maxLength: 100 + deprecated: true cvss2_score: type: number format: float nullable: true + deprecated: true nvd_cvss2: type: string maxLength: 100 + deprecated: true cvss3: type: string maxLength: 100 + deprecated: true cvss3_score: type: number format: float nullable: true + deprecated: true nvd_cvss3: type: string maxLength: 100 + deprecated: true is_major_incident: type: boolean deprecated: true @@ -6073,7 +7866,7 @@ components: package_versions: type: array items: - $ref: '#/components/schemas/CVEv5PackageVersions' + $ref: '#/components/schemas/Package' readOnly: true acknowledgments: type: array @@ -6085,6 +7878,11 @@ components: items: $ref: '#/components/schemas/FlawReference' readOnly: true + cvss_scores: + type: array + items: + $ref: '#/components/schemas/FlawCVSS' + readOnly: true embargoed: type: boolean description: The embargoed boolean attribute is technically read-only as @@ -6120,6 +7918,7 @@ components: - classification - comments - created_dt + - cvss_scores - description - embargoed - meta @@ -6244,6 +8043,129 @@ components: - name - updated_dt - uuid + FlawCVSS: + type: object + description: FlawCVSS serializer + properties: + comment: + type: string + cvss_version: + type: string + flaw: + type: string + format: uuid + issuer: + $ref: '#/components/schemas/IssuerEnum' + score: + type: number + format: float + uuid: + type: string + format: uuid + readOnly: true + vector: + type: string + maxLength: 100 + embargoed: + type: boolean + description: The embargoed boolean attribute is technically read-only as + it just indirectly modifies the ACLs but is mandatory as it controls the + access to the resource. + created_dt: + type: string + format: date-time + readOnly: true + updated_dt: + type: string + format: date-time + description: The updated_dt timestamp attribute is mandatory on update as + it is used to detect mit-air collisions. + required: + - created_dt + - cvss_version + - embargoed + - issuer + - updated_dt + - uuid + - vector + FlawCVSSPost: + type: object + description: FlawCVSS serializer + properties: + comment: + type: string + cvss_version: + type: string + issuer: + $ref: '#/components/schemas/IssuerEnum' + score: + type: number + format: float + uuid: + type: string + format: uuid + readOnly: true + vector: + type: string + maxLength: 100 + embargoed: + type: boolean + description: The embargoed boolean attribute is technically read-only as + it just indirectly modifies the ACLs but is mandatory as it controls the + access to the resource. + created_dt: + type: string + format: date-time + readOnly: true + required: + - created_dt + - cvss_version + - embargoed + - issuer + - uuid + - vector + FlawCVSSPut: + type: object + description: FlawCVSS serializer + properties: + comment: + type: string + cvss_version: + type: string + issuer: + $ref: '#/components/schemas/IssuerEnum' + score: + type: number + format: float + uuid: + type: string + format: uuid + readOnly: true + vector: + type: string + maxLength: 100 + embargoed: + type: boolean + description: The embargoed boolean attribute is technically read-only as + it just indirectly modifies the ACLs but is mandatory as it controls the + access to the resource. + created_dt: + type: string + format: date-time + readOnly: true + updated_dt: + type: string + format: date-time + description: The updated_dt timestamp attribute is mandatory on update as + it is used to detect mit-air collisions. + required: + - created_dt + - cvss_version + - embargoed + - issuer + - updated_dt + - uuid + - vector FlawComment: type: object description: FlawComment serializer for use by flaw_comments endpoint @@ -6276,68 +8198,174 @@ components: format: date-time description: The updated_dt timestamp attribute is mandatory on update as it is used to detect mit-air collisions. - embargoed: - type: boolean - description: The embargoed boolean attribute is technically read-only as - it just indirectly modifies the ACLs but is mandatory as it controls the - access to the resource. + embargoed: + type: boolean + description: The embargoed boolean attribute is technically read-only as + it just indirectly modifies the ACLs but is mandatory as it controls the + access to the resource. + required: + - created_dt + - embargoed + - external_system_id + - flaw + - text + - updated_dt + - uuid + FlawCommentPost: + type: object + description: FlawComment serializer for use by flaw_comments endpoint + properties: + text: + type: string + uuid: + type: string + format: uuid + readOnly: true + type: + $ref: '#/components/schemas/FlawCommentType' + meta_attr: + type: object + additionalProperties: + type: string + nullable: true + created_dt: + type: string + format: date-time + readOnly: true + embargoed: + type: boolean + description: The embargoed boolean attribute is technically read-only as + it just indirectly modifies the ACLs but is mandatory as it controls the + access to the resource. + required: + - created_dt + - embargoed + - text + - uuid + FlawCommentType: + enum: + - BUGZILLA + type: string + FlawMetaType: + enum: + - ERRATA + - REFERENCE + - ACKNOWLEDGMENT + - EXPLOIT + - MAJOR_INCIDENT + - MAJOR_INCIDENT_LITE + - REQUIRES_SUMMARY + - NIST_CVSS_VALIDATION + - NEED_INFO + - CHECKLIST + - NVD_CVSS + type: string + FlawPackageVersion: + type: object + description: Package model serializer + properties: + package: + type: string + maxLength: 2048 + versions: + type: array + items: + $ref: '#/components/schemas/FlawVersion' + flaw: + type: string + format: uuid + uuid: + type: string + format: uuid + readOnly: true + embargoed: + type: boolean + description: The embargoed boolean attribute is technically read-only as + it just indirectly modifies the ACLs but is mandatory as it controls the + access to the resource. + created_dt: + type: string + format: date-time + readOnly: true + updated_dt: + type: string + format: date-time + description: The updated_dt timestamp attribute is mandatory on update as + it is used to detect mit-air collisions. required: - created_dt - embargoed - - external_system_id - flaw - - text + - package - updated_dt - uuid - FlawCommentPost: + - versions + FlawPackageVersionPost: type: object - description: FlawComment serializer for use by flaw_comments endpoint + description: Package model serializer properties: - text: + package: type: string + maxLength: 2048 + versions: + type: array + items: + $ref: '#/components/schemas/FlawVersion' uuid: type: string format: uuid readOnly: true - type: - $ref: '#/components/schemas/FlawCommentType' - meta_attr: - type: object - additionalProperties: - type: string - nullable: true + embargoed: + type: boolean + description: The embargoed boolean attribute is technically read-only as + it just indirectly modifies the ACLs but is mandatory as it controls the + access to the resource. created_dt: type: string format: date-time readOnly: true + required: + - created_dt + - embargoed + - package + - uuid + - versions + FlawPackageVersionPut: + type: object + description: Package model serializer + properties: + package: + type: string + maxLength: 2048 + versions: + type: array + items: + $ref: '#/components/schemas/FlawVersion' + uuid: + type: string + format: uuid + readOnly: true embargoed: type: boolean description: The embargoed boolean attribute is technically read-only as it just indirectly modifies the ACLs but is mandatory as it controls the access to the resource. + created_dt: + type: string + format: date-time + readOnly: true + updated_dt: + type: string + format: date-time + description: The updated_dt timestamp attribute is mandatory on update as + it is used to detect mit-air collisions. required: - created_dt - embargoed - - text + - package + - updated_dt - uuid - FlawCommentType: - enum: - - BUGZILLA - type: string - FlawMetaType: - enum: - - ERRATA - - REFERENCE - - ACKNOWLEDGMENT - - EXPLOIT - - MAJOR_INCIDENT - - MAJOR_INCIDENT_LITE - - REQUIRES_SUMMARY - - NIST_CVSS_VALIDATION - - NEED_INFO - - CHECKLIST - - NVD_CVSS - type: string + - versions FlawPost: type: object description: serialize flaw model @@ -6403,23 +8431,29 @@ components: cvss2: type: string maxLength: 100 + deprecated: true cvss2_score: type: number format: float nullable: true + deprecated: true nvd_cvss2: type: string maxLength: 100 + deprecated: true cvss3: type: string maxLength: 100 + deprecated: true cvss3_score: type: number format: float nullable: true + deprecated: true nvd_cvss3: type: string maxLength: 100 + deprecated: true is_major_incident: type: boolean deprecated: true @@ -6513,7 +8547,7 @@ components: package_versions: type: array items: - $ref: '#/components/schemas/CVEv5PackageVersions' + $ref: '#/components/schemas/Package' readOnly: true acknowledgments: type: array @@ -6525,6 +8559,11 @@ components: items: $ref: '#/components/schemas/FlawReference' readOnly: true + cvss_scores: + type: array + items: + $ref: '#/components/schemas/FlawCVSS' + readOnly: true embargoed: type: boolean description: The embargoed boolean attribute is technically read-only as @@ -6555,6 +8594,7 @@ components: - classification - comments - created_dt + - cvss_scores - description - embargoed - meta @@ -6636,6 +8676,42 @@ components: - embargoed - url - uuid + FlawReferencePut: + type: object + description: FlawReference serializer + properties: + description: + type: string + type: + $ref: '#/components/schemas/FlawReferenceType' + url: + type: string + format: uri + maxLength: 2048 + uuid: + type: string + format: uuid + readOnly: true + embargoed: + type: boolean + description: The embargoed boolean attribute is technically read-only as + it just indirectly modifies the ACLs but is mandatory as it controls the + access to the resource. + created_dt: + type: string + format: date-time + readOnly: true + updated_dt: + type: string + format: date-time + description: The updated_dt timestamp attribute is mandatory on update as + it is used to detect mit-air collisions. + required: + - created_dt + - embargoed + - updated_dt + - url + - uuid FlawReferenceType: enum: - ARTICLE @@ -6666,6 +8742,25 @@ components: - VULNERABILITY - WEAKNESS type: string + FlawUUIDList: + type: object + properties: + flaw_uuids: + type: array + items: + type: string + format: uuid + required: + - flaw_uuids + FlawVersion: + type: object + description: PackageVer serializer used by FlawPackageVersionSerializer. + properties: + version: + type: string + maxLength: 1024 + required: + - version ImpactEnum: enum: - LOW @@ -6673,6 +8768,11 @@ components: - IMPORTANT - CRITICAL type: string + IssuerEnum: + enum: + - RH + - NIST + type: string JiraComment: type: object properties: @@ -6825,12 +8925,88 @@ components: - type - updated_dt - uuid + ModuleComponent: + type: object + properties: + ps_module: + type: string + format: uuid + ps_component: + type: string + format: uuid + streams: + type: array + items: + $ref: '#/components/schemas/PsStreamSelection' + selected: + type: boolean + affect: + type: string + readOnly: true + required: + - affect + - ps_component + - ps_module + - selected + - streams NistCvssValidationEnum: enum: - REQUESTED - APPROVED - REJECTED type: string + Package: + type: object + description: package_versions (Package model) serializer for read-only use in + FlawSerializer. + properties: + package: + type: string + maxLength: 2048 + versions: + type: array + items: + $ref: '#/components/schemas/PackageVer' + required: + - package + - versions + PackageVer: + type: object + description: |- + PackageVer model serializer for read-only use in FlawSerializer via + PackageVerSerializer. + properties: + version: + type: string + maxLength: 1024 + status: + type: string + readOnly: true + default: UNAFFECTED + deprecated: true + required: + - status + - version + PaginatedAffectCVSSList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/AffectCVSS' PaginatedAffectList: type: object properties: @@ -6911,6 +9087,26 @@ components: type: array items: $ref: '#/components/schemas/FlawAcknowledgment' + PaginatedFlawCVSSList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/FlawCVSS' PaginatedFlawCommentList: type: object properties: @@ -6951,6 +9147,26 @@ components: type: array items: $ref: '#/components/schemas/Flaw' + PaginatedFlawPackageVersionList: + type: object + properties: + count: + type: integer + example: 123 + next: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=400&limit=100 + previous: + type: string + nullable: true + format: uri + example: http://api.example.org/accounts/?offset=200&limit=100 + results: + type: array + items: + $ref: '#/components/schemas/FlawPackageVersion' PaginatedFlawReferenceList: type: object properties: @@ -7031,6 +9247,25 @@ components: type: array items: $ref: '#/components/schemas/Tracker' + PsStreamSelection: + type: object + properties: + ps_update_stream: + type: string + selected: + type: boolean + acked: + type: boolean + eus: + type: boolean + aus: + type: boolean + required: + - acked + - aus + - eus + - ps_update_stream + - selected RequiresSummaryEnum: enum: - REQUESTED @@ -7135,12 +9370,6 @@ components: - XEN - XPDF type: string - StatusEnum: - enum: - - AFFECTED - - UNAFFECTED - - UNKNOWN - type: string SupportedProducts: type: object properties: @@ -7277,6 +9506,19 @@ components: - external_system_id - status - type + TrackerSuggestion: + type: object + properties: + modules_components: + type: array + items: + $ref: '#/components/schemas/ModuleComponent' + not_applicable: + type: string + readOnly: true + required: + - modules_components + - not_applicable TrackerType: enum: - JIRA From 54c9e2a862a01be0d952f6b97e6de18d047cdcde Mon Sep 17 00:00:00 2001 From: Jakub Frejlach Date: Tue, 10 Oct 2023 16:05:27 +0200 Subject: [PATCH 3/5] Temporary workaround incorrect type in schema In OSIDB schema there is currently a bug when incorrect type bool (corret is boolean) was used, which renders the openapi-python-client package unable to regenerate the bindings, fixing this manually so we don't need to make another OSIDB release. Will be fixed in OSIDB as well and with the next release all should be back to normal --- osidb_bindings/openapi_schema.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osidb_bindings/openapi_schema.yml b/osidb_bindings/openapi_schema.yml index a224b44..ebb4917 100644 --- a/osidb_bindings/openapi_schema.yml +++ b/osidb_bindings/openapi_schema.yml @@ -214,7 +214,7 @@ paths: is_complete: type: boolean is_up2date: - type: bool + type: boolean data_models: type: array items: From 0641bb9944b701d44eda06cbf9363c3073198785 Mon Sep 17 00:00:00 2001 From: Jakub Frejlach Date: Tue, 10 Oct 2023 16:11:18 +0200 Subject: [PATCH 4/5] Regenerate bindings for OSIDB 3.5.0 --- .../python_client/api/osidb/__init__.py | 15 + .../api/osidb/osidb_api_v1_affects_create.py | 11 + ...osidb_api_v1_affects_cvss_scores_create.py | 165 ++++ ...sidb_api_v1_affects_cvss_scores_destroy.py | 137 +++ .../osidb_api_v1_affects_cvss_scores_list.py | 516 ++++++++++ ...idb_api_v1_affects_cvss_scores_retrieve.py | 179 ++++ ...osidb_api_v1_affects_cvss_scores_update.py | 175 ++++ .../api/osidb/osidb_api_v1_affects_destroy.py | 34 +- .../api/osidb/osidb_api_v1_affects_list.py | 380 +++++++ .../api/osidb/osidb_api_v1_affects_update.py | 11 + ...db_api_v1_flaws_acknowledgments_destroy.py | 36 +- .../api/osidb/osidb_api_v1_flaws_create.py | 21 + .../osidb_api_v1_flaws_cvss_scores_create.py | 165 ++++ .../osidb_api_v1_flaws_cvss_scores_destroy.py | 137 +++ .../osidb_api_v1_flaws_cvss_scores_list.py | 516 ++++++++++ ...osidb_api_v1_flaws_cvss_scores_retrieve.py | 179 ++++ .../osidb_api_v1_flaws_cvss_scores_update.py | 175 ++++ .../api/osidb/osidb_api_v1_flaws_list.py | 933 ++++++++++++++++++ ...db_api_v1_flaws_package_versions_create.py | 165 ++++ ...b_api_v1_flaws_package_versions_destroy.py | 137 +++ ...sidb_api_v1_flaws_package_versions_list.py | 473 +++++++++ ..._api_v1_flaws_package_versions_retrieve.py | 179 ++++ ...db_api_v1_flaws_package_versions_update.py | 175 ++++ .../osidb_api_v1_flaws_references_destroy.py | 36 +- .../osidb_api_v1_flaws_references_list.py | 301 ++++++ .../osidb_api_v1_flaws_references_update.py | 34 +- .../api/osidb/osidb_api_v1_flaws_update.py | 21 + .../taskman/taskman_api_v1_group_create.py | 20 +- .../taskman/taskman_api_v1_group_retrieve.py | 20 +- .../taskman/taskman_api_v1_group_update.py | 20 +- .../taskman_api_v1_task_assignee_retrieve.py | 20 +- .../taskman_api_v1_task_assignee_update.py | 20 +- .../taskman_api_v1_task_comment_create.py | 20 +- .../taskman_api_v1_task_comment_update.py | 20 +- .../taskman_api_v1_task_flaw_create.py | 20 +- .../taskman_api_v1_task_flaw_retrieve.py | 20 +- .../taskman_api_v1_task_flaw_update.py | 20 +- .../taskman/taskman_api_v1_task_retrieve.py | 20 +- .../taskman_api_v1_task_status_update.py | 20 +- ...taskman_api_v1_task_unassigned_retrieve.py | 20 +- .../python_client/api/trackers/__init__.py | 1 + .../trackers/trackers_api_v1_file_create.py | 159 +++ .../bindings/python_client/models/__init__.py | 95 +- .../bindings/python_client/models/affect.py | 44 + .../python_client/models/affect_cvss.py | 159 +++ .../python_client/models/affect_cvss_post.py | 196 ++++ .../python_client/models/affect_cvss_put.py | 218 ++++ .../python_client/models/affect_post.py | 44 + ...s_retrieve_response_200_collectors_item.py | 8 + .../bindings/python_client/models/erratum.py | 16 + .../bindings/python_client/models/flaw.py | 56 +- .../python_client/models/flaw_cvss.py | 159 +++ .../python_client/models/flaw_cvss_post.py | 196 ++++ .../python_client/models/flaw_cvss_put.py | 218 ++++ .../models/flaw_package_version.py | 147 +++ .../models/flaw_package_version_post.py | 171 ++++ .../models/flaw_package_version_put.py | 193 ++++ .../python_client/models/flaw_post.py | 56 +- .../python_client/models/flaw_reference.py | 55 +- .../models/flaw_reference_put.py | 184 ++++ .../python_client/models/flaw_uuid_list.py | 80 ++ .../python_client/models/flaw_version.py | 59 ++ .../python_client/models/issuer_enum.py | 9 + .../python_client/models/module_component.py | 114 +++ ...sidb_api_v1_affects_create_response_201.py | 31 + ...affects_cvss_scores_create_response_201.py | 199 ++++ ...ffects_cvss_scores_destroy_response_204.py | 93 ++ ..._api_v1_affects_cvss_scores_list_issuer.py | 9 + ...1_affects_cvss_scores_list_response_200.py | 148 +++ ...fects_cvss_scores_retrieve_response_200.py | 199 ++++ ...affects_cvss_scores_update_response_200.py | 199 ++++ ...db_api_v1_affects_destroy_response_200.py} | 10 +- ..._api_v1_affects_list_cvss_scores_issuer.py | 9 + .../osidb_api_v1_affects_list_order_item.py | 78 +- ...db_api_v1_affects_retrieve_response_200.py | 31 + ...sidb_api_v1_affects_update_response_200.py | 31 + ...s_acknowledgments_destroy_response_200.py} | 10 +- .../osidb_api_v1_flaws_create_response_201.py | 43 +- ...1_flaws_cvss_scores_create_response_201.py | 199 ++++ ..._flaws_cvss_scores_destroy_response_200.py | 93 ++ ...db_api_v1_flaws_cvss_scores_list_issuer.py | 9 + ..._v1_flaws_cvss_scores_list_response_200.py | 148 +++ ...flaws_cvss_scores_retrieve_response_200.py | 199 ++++ ...1_flaws_cvss_scores_update_response_200.py | 199 ++++ ...db_api_v1_flaws_list_cvss_scores_issuer.py | 9 + .../osidb_api_v1_flaws_list_order_item.py | 90 +- ...osidb_api_v1_flaws_list_references_type.py | 9 + ...ws_package_versions_create_response_201.py | 190 ++++ ...s_package_versions_destroy_response_200.py | 95 ++ ...laws_package_versions_list_response_200.py | 148 +++ ..._package_versions_retrieve_response_200.py | 190 ++++ ...ws_package_versions_update_response_200.py | 190 ++++ ..._flaws_references_destroy_response_200.py} | 10 +- ...osidb_api_v1_flaws_references_list_type.py | 9 + ...sidb_api_v1_flaws_retrieve_response_200.py | 43 +- .../osidb_api_v1_flaws_update_response_200.py | 43 +- ...cv_ev_5_package_versions.py => package.py} | 22 +- .../{cv_ev_5_versions.py => package_ver.py} | 30 +- .../models/paginated_affect_cvss_list.py | 105 ++ .../models/paginated_flaw_cvss_list.py | 105 ++ .../paginated_flaw_package_version_list.py | 105 ++ .../models/ps_stream_selection.py | 91 ++ .../python_client/models/status_enum.py | 10 - .../models/tracker_suggestion.py | 92 ++ 104 files changed, 11311 insertions(+), 415 deletions(-) create mode 100644 osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_cvss_scores_create.py create mode 100644 osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_cvss_scores_destroy.py create mode 100644 osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_cvss_scores_list.py create mode 100644 osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_cvss_scores_retrieve.py create mode 100644 osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_cvss_scores_update.py create mode 100644 osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_cvss_scores_create.py create mode 100644 osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_cvss_scores_destroy.py create mode 100644 osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_cvss_scores_list.py create mode 100644 osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_cvss_scores_retrieve.py create mode 100644 osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_cvss_scores_update.py create mode 100644 osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_package_versions_create.py create mode 100644 osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_package_versions_destroy.py create mode 100644 osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_package_versions_list.py create mode 100644 osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_package_versions_retrieve.py create mode 100644 osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_package_versions_update.py create mode 100644 osidb_bindings/bindings/python_client/api/trackers/__init__.py create mode 100644 osidb_bindings/bindings/python_client/api/trackers/trackers_api_v1_file_create.py create mode 100644 osidb_bindings/bindings/python_client/models/affect_cvss.py create mode 100644 osidb_bindings/bindings/python_client/models/affect_cvss_post.py create mode 100644 osidb_bindings/bindings/python_client/models/affect_cvss_put.py create mode 100644 osidb_bindings/bindings/python_client/models/flaw_cvss.py create mode 100644 osidb_bindings/bindings/python_client/models/flaw_cvss_post.py create mode 100644 osidb_bindings/bindings/python_client/models/flaw_cvss_put.py create mode 100644 osidb_bindings/bindings/python_client/models/flaw_package_version.py create mode 100644 osidb_bindings/bindings/python_client/models/flaw_package_version_post.py create mode 100644 osidb_bindings/bindings/python_client/models/flaw_package_version_put.py create mode 100644 osidb_bindings/bindings/python_client/models/flaw_reference_put.py create mode 100644 osidb_bindings/bindings/python_client/models/flaw_uuid_list.py create mode 100644 osidb_bindings/bindings/python_client/models/flaw_version.py create mode 100644 osidb_bindings/bindings/python_client/models/issuer_enum.py create mode 100644 osidb_bindings/bindings/python_client/models/module_component.py create mode 100644 osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_create_response_201.py create mode 100644 osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_destroy_response_204.py create mode 100644 osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_list_issuer.py create mode 100644 osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_list_response_200.py create mode 100644 osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_retrieve_response_200.py create mode 100644 osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_update_response_200.py rename osidb_bindings/bindings/python_client/models/{osidb_api_v1_affects_destroy_response_204.py => osidb_api_v1_affects_destroy_response_200.py} (88%) create mode 100644 osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_list_cvss_scores_issuer.py rename osidb_bindings/bindings/python_client/models/{osidb_api_v1_flaws_acknowledgments_destroy_response_204.py => osidb_api_v1_flaws_acknowledgments_destroy_response_200.py} (92%) create mode 100644 osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_create_response_201.py create mode 100644 osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_destroy_response_200.py create mode 100644 osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_list_issuer.py create mode 100644 osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_list_response_200.py create mode 100644 osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_retrieve_response_200.py create mode 100644 osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_update_response_200.py create mode 100644 osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_list_cvss_scores_issuer.py create mode 100644 osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_list_references_type.py create mode 100644 osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_package_versions_create_response_201.py create mode 100644 osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_package_versions_destroy_response_200.py create mode 100644 osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_package_versions_list_response_200.py create mode 100644 osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_package_versions_retrieve_response_200.py create mode 100644 osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_package_versions_update_response_200.py rename osidb_bindings/bindings/python_client/models/{osidb_api_v1_flaws_references_destroy_response_204.py => osidb_api_v1_flaws_references_destroy_response_200.py} (92%) create mode 100644 osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_references_list_type.py rename osidb_bindings/bindings/python_client/models/{cv_ev_5_package_versions.py => package.py} (81%) rename osidb_bindings/bindings/python_client/models/{cv_ev_5_versions.py => package_ver.py} (68%) create mode 100644 osidb_bindings/bindings/python_client/models/paginated_affect_cvss_list.py create mode 100644 osidb_bindings/bindings/python_client/models/paginated_flaw_cvss_list.py create mode 100644 osidb_bindings/bindings/python_client/models/paginated_flaw_package_version_list.py create mode 100644 osidb_bindings/bindings/python_client/models/ps_stream_selection.py delete mode 100644 osidb_bindings/bindings/python_client/models/status_enum.py create mode 100644 osidb_bindings/bindings/python_client/models/tracker_suggestion.py diff --git a/osidb_bindings/bindings/python_client/api/osidb/__init__.py b/osidb_bindings/bindings/python_client/api/osidb/__init__.py index 0908502..55dfc8d 100644 --- a/osidb_bindings/bindings/python_client/api/osidb/__init__.py +++ b/osidb_bindings/bindings/python_client/api/osidb/__init__.py @@ -1,4 +1,9 @@ from .osidb_api_v1_affects_create import * +from .osidb_api_v1_affects_cvss_scores_create import * +from .osidb_api_v1_affects_cvss_scores_destroy import * +from .osidb_api_v1_affects_cvss_scores_list import * +from .osidb_api_v1_affects_cvss_scores_retrieve import * +from .osidb_api_v1_affects_cvss_scores_update import * from .osidb_api_v1_affects_destroy import * from .osidb_api_v1_affects_list import * from .osidb_api_v1_affects_retrieve import * @@ -12,7 +17,17 @@ from .osidb_api_v1_flaws_comments_list import * from .osidb_api_v1_flaws_comments_retrieve import * from .osidb_api_v1_flaws_create import * +from .osidb_api_v1_flaws_cvss_scores_create import * +from .osidb_api_v1_flaws_cvss_scores_destroy import * +from .osidb_api_v1_flaws_cvss_scores_list import * +from .osidb_api_v1_flaws_cvss_scores_retrieve import * +from .osidb_api_v1_flaws_cvss_scores_update import * from .osidb_api_v1_flaws_list import * +from .osidb_api_v1_flaws_package_versions_create import * +from .osidb_api_v1_flaws_package_versions_destroy import * +from .osidb_api_v1_flaws_package_versions_list import * +from .osidb_api_v1_flaws_package_versions_retrieve import * +from .osidb_api_v1_flaws_package_versions_update import * from .osidb_api_v1_flaws_references_create import * from .osidb_api_v1_flaws_references_destroy import * from .osidb_api_v1_flaws_references_list import * diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_create.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_create.py index ac7749b..3ad77a8 100644 --- a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_create.py +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_create.py @@ -19,6 +19,7 @@ def _get_kwargs( form_data: AffectPost, multipart_data: AffectPost, json_body: AffectPost, + bugzilla_api_key: str, ) -> Dict[str, Any]: url = "{}/osidb/api/v1/affects".format( client.base_url, @@ -26,6 +27,8 @@ def _get_kwargs( headers: Dict[str, Any] = client.get_headers() + headers["bugzilla-api-key"] = bugzilla_api_key + json_json_body: Dict[str, Any] = UNSET if not isinstance(json_body, Unset): json_body.to_dict() @@ -73,12 +76,14 @@ def sync_detailed( form_data: AffectPost, multipart_data: AffectPost, json_body: AffectPost, + bugzilla_api_key: str, ) -> Response[OsidbApiV1AffectsCreateResponse201]: kwargs = _get_kwargs( client=client, form_data=form_data, multipart_data=multipart_data, json_body=json_body, + bugzilla_api_key=bugzilla_api_key, ) response = requests.post( @@ -98,6 +103,7 @@ def sync( form_data: AffectPost, multipart_data: AffectPost, json_body: AffectPost, + bugzilla_api_key: str, ) -> Optional[OsidbApiV1AffectsCreateResponse201]: """ """ @@ -106,6 +112,7 @@ def sync( form_data=form_data, multipart_data=multipart_data, json_body=json_body, + bugzilla_api_key=bugzilla_api_key, ).parsed @@ -115,12 +122,14 @@ async def async_detailed( form_data: AffectPost, multipart_data: AffectPost, json_body: AffectPost, + bugzilla_api_key: str, ) -> Response[OsidbApiV1AffectsCreateResponse201]: kwargs = _get_kwargs( client=client, form_data=form_data, multipart_data=multipart_data, json_body=json_body, + bugzilla_api_key=bugzilla_api_key, ) async with client.get_async_session().post( @@ -140,6 +149,7 @@ async def async_( form_data: AffectPost, multipart_data: AffectPost, json_body: AffectPost, + bugzilla_api_key: str, ) -> Optional[OsidbApiV1AffectsCreateResponse201]: """ """ @@ -149,5 +159,6 @@ async def async_( form_data=form_data, multipart_data=multipart_data, json_body=json_body, + bugzilla_api_key=bugzilla_api_key, ) ).parsed diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_cvss_scores_create.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_cvss_scores_create.py new file mode 100644 index 0000000..3071f38 --- /dev/null +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_cvss_scores_create.py @@ -0,0 +1,165 @@ +from typing import Any, Dict, Optional + +import requests + +from ...client import AuthenticatedClient +from ...models.affect_cvss_post import AffectCVSSPost +from ...models.osidb_api_v1_affects_cvss_scores_create_response_201 import ( + OsidbApiV1AffectsCvssScoresCreateResponse201, +) +from ...types import UNSET, Response, Unset + +QUERY_PARAMS = {} +REQUEST_BODY_TYPE = AffectCVSSPost + + +def _get_kwargs( + affect_id: str, + *, + client: AuthenticatedClient, + form_data: AffectCVSSPost, + multipart_data: AffectCVSSPost, + json_body: AffectCVSSPost, +) -> Dict[str, Any]: + url = "{}/osidb/api/v1/affects/{affect_id}/cvss_scores".format( + client.base_url, + affect_id=affect_id, + ) + + headers: Dict[str, Any] = client.get_headers() + + json_json_body: Dict[str, Any] = UNSET + if not isinstance(json_body, Unset): + json_body.to_dict() + + multipart_multipart_data: Dict[str, Any] = UNSET + if not isinstance(multipart_data, Unset): + multipart_data.to_multipart() + + return { + "url": url, + "headers": headers, + "data": form_data.to_dict(), + } + + +def _parse_response( + *, response: requests.Response +) -> Optional[OsidbApiV1AffectsCvssScoresCreateResponse201]: + if response.status_code == 201: + _response_201 = response.json() + response_201: OsidbApiV1AffectsCvssScoresCreateResponse201 + if isinstance(_response_201, Unset): + response_201 = UNSET + else: + response_201 = OsidbApiV1AffectsCvssScoresCreateResponse201.from_dict( + _response_201 + ) + + return response_201 + return None + + +def _build_response( + *, response: requests.Response +) -> Response[OsidbApiV1AffectsCvssScoresCreateResponse201]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + affect_id: str, + *, + client: AuthenticatedClient, + form_data: AffectCVSSPost, + multipart_data: AffectCVSSPost, + json_body: AffectCVSSPost, +) -> Response[OsidbApiV1AffectsCvssScoresCreateResponse201]: + kwargs = _get_kwargs( + affect_id=affect_id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ) + + response = requests.post( + verify=client.verify_ssl, + auth=client.auth, + timeout=client.timeout, + **kwargs, + ) + response.raise_for_status() + + return _build_response(response=response) + + +def sync( + affect_id: str, + *, + client: AuthenticatedClient, + form_data: AffectCVSSPost, + multipart_data: AffectCVSSPost, + json_body: AffectCVSSPost, +) -> Optional[OsidbApiV1AffectsCvssScoresCreateResponse201]: + """ """ + + return sync_detailed( + affect_id=affect_id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ).parsed + + +async def async_detailed( + affect_id: str, + *, + client: AuthenticatedClient, + form_data: AffectCVSSPost, + multipart_data: AffectCVSSPost, + json_body: AffectCVSSPost, +) -> Response[OsidbApiV1AffectsCvssScoresCreateResponse201]: + kwargs = _get_kwargs( + affect_id=affect_id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ) + + async with client.get_async_session().post( + verify_ssl=client.verify_ssl, raise_for_status=True, **kwargs + ) as response: + content = await response.read() + resp = requests.Response() + resp.status_code = response.status + resp._content = content + + return _build_response(response=resp) + + +async def async_( + affect_id: str, + *, + client: AuthenticatedClient, + form_data: AffectCVSSPost, + multipart_data: AffectCVSSPost, + json_body: AffectCVSSPost, +) -> Optional[OsidbApiV1AffectsCvssScoresCreateResponse201]: + """ """ + + return ( + await async_detailed( + affect_id=affect_id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ) + ).parsed diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_cvss_scores_destroy.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_cvss_scores_destroy.py new file mode 100644 index 0000000..a4d92a1 --- /dev/null +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_cvss_scores_destroy.py @@ -0,0 +1,137 @@ +from typing import Any, Dict, Optional + +import requests + +from ...client import AuthenticatedClient +from ...models.osidb_api_v1_affects_cvss_scores_destroy_response_204 import ( + OsidbApiV1AffectsCvssScoresDestroyResponse204, +) +from ...types import UNSET, Response, Unset + +QUERY_PARAMS = {} + + +def _get_kwargs( + affect_id: str, + id: str, + *, + client: AuthenticatedClient, +) -> Dict[str, Any]: + url = "{}/osidb/api/v1/affects/{affect_id}/cvss_scores/{id}".format( + client.base_url, + affect_id=affect_id, + id=id, + ) + + headers: Dict[str, Any] = client.get_headers() + + return { + "url": url, + "headers": headers, + } + + +def _parse_response( + *, response: requests.Response +) -> Optional[OsidbApiV1AffectsCvssScoresDestroyResponse204]: + if response.status_code == 204: + _response_204 = response.json() + response_204: OsidbApiV1AffectsCvssScoresDestroyResponse204 + if isinstance(_response_204, Unset): + response_204 = UNSET + else: + response_204 = OsidbApiV1AffectsCvssScoresDestroyResponse204.from_dict( + _response_204 + ) + + return response_204 + return None + + +def _build_response( + *, response: requests.Response +) -> Response[OsidbApiV1AffectsCvssScoresDestroyResponse204]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + affect_id: str, + id: str, + *, + client: AuthenticatedClient, +) -> Response[OsidbApiV1AffectsCvssScoresDestroyResponse204]: + kwargs = _get_kwargs( + affect_id=affect_id, + id=id, + client=client, + ) + + response = requests.delete( + verify=client.verify_ssl, + auth=client.auth, + timeout=client.timeout, + **kwargs, + ) + response.raise_for_status() + + return _build_response(response=response) + + +def sync( + affect_id: str, + id: str, + *, + client: AuthenticatedClient, +) -> Optional[OsidbApiV1AffectsCvssScoresDestroyResponse204]: + """Destroy the instance and proxy the delete to Bugzilla.""" + + return sync_detailed( + affect_id=affect_id, + id=id, + client=client, + ).parsed + + +async def async_detailed( + affect_id: str, + id: str, + *, + client: AuthenticatedClient, +) -> Response[OsidbApiV1AffectsCvssScoresDestroyResponse204]: + kwargs = _get_kwargs( + affect_id=affect_id, + id=id, + client=client, + ) + + async with client.get_async_session().delete( + verify_ssl=client.verify_ssl, raise_for_status=True, **kwargs + ) as response: + content = await response.read() + resp = requests.Response() + resp.status_code = response.status + resp._content = content + + return _build_response(response=resp) + + +async def async_( + affect_id: str, + id: str, + *, + client: AuthenticatedClient, +) -> Optional[OsidbApiV1AffectsCvssScoresDestroyResponse204]: + """Destroy the instance and proxy the delete to Bugzilla.""" + + return ( + await async_detailed( + affect_id=affect_id, + id=id, + client=client, + ) + ).parsed diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_cvss_scores_list.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_cvss_scores_list.py new file mode 100644 index 0000000..c775b74 --- /dev/null +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_cvss_scores_list.py @@ -0,0 +1,516 @@ +import datetime +from typing import Any, Dict, List, Optional, Union + +import requests + +from ...client import AuthenticatedClient +from ...models.osidb_api_v1_affects_cvss_scores_list_issuer import ( + OsidbApiV1AffectsCvssScoresListIssuer, +) +from ...models.osidb_api_v1_affects_cvss_scores_list_response_200 import ( + OsidbApiV1AffectsCvssScoresListResponse200, +) +from ...types import UNSET, Response, Unset + +QUERY_PARAMS = { + "comment": str, + "created_dt": datetime.datetime, + "created_dt__date": datetime.date, + "created_dt__date__gte": datetime.date, + "created_dt__date__lte": datetime.date, + "created_dt__gt": datetime.datetime, + "created_dt__gte": datetime.datetime, + "created_dt__lt": datetime.datetime, + "created_dt__lte": datetime.datetime, + "cvss_version": str, + "exclude_fields": List[str], + "include_fields": List[str], + "issuer": OsidbApiV1AffectsCvssScoresListIssuer, + "limit": int, + "offset": int, + "score": float, + "updated_dt": datetime.datetime, + "updated_dt__date": datetime.date, + "updated_dt__date__gte": datetime.date, + "updated_dt__date__lte": datetime.date, + "updated_dt__gt": datetime.datetime, + "updated_dt__gte": datetime.datetime, + "updated_dt__lt": datetime.datetime, + "updated_dt__lte": datetime.datetime, + "uuid": str, + "vector": str, +} + + +def _get_kwargs( + affect_id: str, + *, + client: AuthenticatedClient, + comment: Union[Unset, None, str] = UNSET, + created_dt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_date: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_version: Union[Unset, None, str] = UNSET, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, + issuer: Union[Unset, None, OsidbApiV1AffectsCvssScoresListIssuer] = UNSET, + limit: Union[Unset, None, int] = UNSET, + offset: Union[Unset, None, int] = UNSET, + score: Union[Unset, None, float] = UNSET, + updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + uuid: Union[Unset, None, str] = UNSET, + vector: Union[Unset, None, str] = UNSET, +) -> Dict[str, Any]: + url = "{}/osidb/api/v1/affects/{affect_id}/cvss_scores".format( + client.base_url, + affect_id=affect_id, + ) + + headers: Dict[str, Any] = client.get_headers() + + json_created_dt: Union[Unset, None, str] = UNSET + if not isinstance(created_dt, Unset): + json_created_dt = created_dt.isoformat() if created_dt else None + + json_created_dt_date: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_date, Unset): + json_created_dt_date = created_dt_date.isoformat() if created_dt_date else None + + json_created_dt_date_gte: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_date_gte, Unset): + json_created_dt_date_gte = ( + created_dt_date_gte.isoformat() if created_dt_date_gte else None + ) + + json_created_dt_date_lte: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_date_lte, Unset): + json_created_dt_date_lte = ( + created_dt_date_lte.isoformat() if created_dt_date_lte else None + ) + + json_created_dt_gt: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_gt, Unset): + json_created_dt_gt = created_dt_gt.isoformat() if created_dt_gt else None + + json_created_dt_gte: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_gte, Unset): + json_created_dt_gte = created_dt_gte.isoformat() if created_dt_gte else None + + json_created_dt_lt: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_lt, Unset): + json_created_dt_lt = created_dt_lt.isoformat() if created_dt_lt else None + + json_created_dt_lte: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_lte, Unset): + json_created_dt_lte = created_dt_lte.isoformat() if created_dt_lte else None + + json_exclude_fields: Union[Unset, None, List[str]] = UNSET + if not isinstance(exclude_fields, Unset): + if exclude_fields is None: + json_exclude_fields = None + else: + json_exclude_fields = exclude_fields + + json_include_fields: Union[Unset, None, List[str]] = UNSET + if not isinstance(include_fields, Unset): + if include_fields is None: + json_include_fields = None + else: + json_include_fields = include_fields + + json_issuer: Union[Unset, None, str] = UNSET + if not isinstance(issuer, Unset): + + json_issuer = ( + OsidbApiV1AffectsCvssScoresListIssuer(issuer).value if issuer else None + ) + + json_updated_dt: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt, Unset): + json_updated_dt = updated_dt.isoformat() if updated_dt else None + + json_updated_dt_date: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_date, Unset): + json_updated_dt_date = updated_dt_date.isoformat() if updated_dt_date else None + + json_updated_dt_date_gte: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_date_gte, Unset): + json_updated_dt_date_gte = ( + updated_dt_date_gte.isoformat() if updated_dt_date_gte else None + ) + + json_updated_dt_date_lte: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_date_lte, Unset): + json_updated_dt_date_lte = ( + updated_dt_date_lte.isoformat() if updated_dt_date_lte else None + ) + + json_updated_dt_gt: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_gt, Unset): + json_updated_dt_gt = updated_dt_gt.isoformat() if updated_dt_gt else None + + json_updated_dt_gte: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_gte, Unset): + json_updated_dt_gte = updated_dt_gte.isoformat() if updated_dt_gte else None + + json_updated_dt_lt: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_lt, Unset): + json_updated_dt_lt = updated_dt_lt.isoformat() if updated_dt_lt else None + + json_updated_dt_lte: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_lte, Unset): + json_updated_dt_lte = updated_dt_lte.isoformat() if updated_dt_lte else None + + params: Dict[str, Any] = { + "comment": comment, + "created_dt": json_created_dt, + "created_dt__date": json_created_dt_date, + "created_dt__date__gte": json_created_dt_date_gte, + "created_dt__date__lte": json_created_dt_date_lte, + "created_dt__gt": json_created_dt_gt, + "created_dt__gte": json_created_dt_gte, + "created_dt__lt": json_created_dt_lt, + "created_dt__lte": json_created_dt_lte, + "cvss_version": cvss_version, + "exclude_fields": json_exclude_fields, + "include_fields": json_include_fields, + "issuer": json_issuer, + "limit": limit, + "offset": offset, + "score": score, + "updated_dt": json_updated_dt, + "updated_dt__date": json_updated_dt_date, + "updated_dt__date__gte": json_updated_dt_date_gte, + "updated_dt__date__lte": json_updated_dt_date_lte, + "updated_dt__gt": json_updated_dt_gt, + "updated_dt__gte": json_updated_dt_gte, + "updated_dt__lt": json_updated_dt_lt, + "updated_dt__lte": json_updated_dt_lte, + "uuid": uuid, + "vector": vector, + } + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "url": url, + "headers": headers, + "params": params, + } + + +def _parse_response( + *, response: requests.Response +) -> Optional[OsidbApiV1AffectsCvssScoresListResponse200]: + if response.status_code == 200: + _response_200 = response.json() + response_200: OsidbApiV1AffectsCvssScoresListResponse200 + if isinstance(_response_200, Unset): + response_200 = UNSET + else: + response_200 = OsidbApiV1AffectsCvssScoresListResponse200.from_dict( + _response_200 + ) + + return response_200 + return None + + +def _build_response( + *, response: requests.Response +) -> Response[OsidbApiV1AffectsCvssScoresListResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + affect_id: str, + *, + client: AuthenticatedClient, + comment: Union[Unset, None, str] = UNSET, + created_dt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_date: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_version: Union[Unset, None, str] = UNSET, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, + issuer: Union[Unset, None, OsidbApiV1AffectsCvssScoresListIssuer] = UNSET, + limit: Union[Unset, None, int] = UNSET, + offset: Union[Unset, None, int] = UNSET, + score: Union[Unset, None, float] = UNSET, + updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + uuid: Union[Unset, None, str] = UNSET, + vector: Union[Unset, None, str] = UNSET, +) -> Response[OsidbApiV1AffectsCvssScoresListResponse200]: + kwargs = _get_kwargs( + affect_id=affect_id, + client=client, + comment=comment, + created_dt=created_dt, + created_dt_date=created_dt_date, + created_dt_date_gte=created_dt_date_gte, + created_dt_date_lte=created_dt_date_lte, + created_dt_gt=created_dt_gt, + created_dt_gte=created_dt_gte, + created_dt_lt=created_dt_lt, + created_dt_lte=created_dt_lte, + cvss_version=cvss_version, + exclude_fields=exclude_fields, + include_fields=include_fields, + issuer=issuer, + limit=limit, + offset=offset, + score=score, + updated_dt=updated_dt, + updated_dt_date=updated_dt_date, + updated_dt_date_gte=updated_dt_date_gte, + updated_dt_date_lte=updated_dt_date_lte, + updated_dt_gt=updated_dt_gt, + updated_dt_gte=updated_dt_gte, + updated_dt_lt=updated_dt_lt, + updated_dt_lte=updated_dt_lte, + uuid=uuid, + vector=vector, + ) + + response = requests.get( + verify=client.verify_ssl, + auth=client.auth, + timeout=client.timeout, + **kwargs, + ) + response.raise_for_status() + + return _build_response(response=response) + + +def sync( + affect_id: str, + *, + client: AuthenticatedClient, + comment: Union[Unset, None, str] = UNSET, + created_dt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_date: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_version: Union[Unset, None, str] = UNSET, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, + issuer: Union[Unset, None, OsidbApiV1AffectsCvssScoresListIssuer] = UNSET, + limit: Union[Unset, None, int] = UNSET, + offset: Union[Unset, None, int] = UNSET, + score: Union[Unset, None, float] = UNSET, + updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + uuid: Union[Unset, None, str] = UNSET, + vector: Union[Unset, None, str] = UNSET, +) -> Optional[OsidbApiV1AffectsCvssScoresListResponse200]: + """ """ + + return sync_detailed( + affect_id=affect_id, + client=client, + comment=comment, + created_dt=created_dt, + created_dt_date=created_dt_date, + created_dt_date_gte=created_dt_date_gte, + created_dt_date_lte=created_dt_date_lte, + created_dt_gt=created_dt_gt, + created_dt_gte=created_dt_gte, + created_dt_lt=created_dt_lt, + created_dt_lte=created_dt_lte, + cvss_version=cvss_version, + exclude_fields=exclude_fields, + include_fields=include_fields, + issuer=issuer, + limit=limit, + offset=offset, + score=score, + updated_dt=updated_dt, + updated_dt_date=updated_dt_date, + updated_dt_date_gte=updated_dt_date_gte, + updated_dt_date_lte=updated_dt_date_lte, + updated_dt_gt=updated_dt_gt, + updated_dt_gte=updated_dt_gte, + updated_dt_lt=updated_dt_lt, + updated_dt_lte=updated_dt_lte, + uuid=uuid, + vector=vector, + ).parsed + + +async def async_detailed( + affect_id: str, + *, + client: AuthenticatedClient, + comment: Union[Unset, None, str] = UNSET, + created_dt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_date: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_version: Union[Unset, None, str] = UNSET, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, + issuer: Union[Unset, None, OsidbApiV1AffectsCvssScoresListIssuer] = UNSET, + limit: Union[Unset, None, int] = UNSET, + offset: Union[Unset, None, int] = UNSET, + score: Union[Unset, None, float] = UNSET, + updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + uuid: Union[Unset, None, str] = UNSET, + vector: Union[Unset, None, str] = UNSET, +) -> Response[OsidbApiV1AffectsCvssScoresListResponse200]: + kwargs = _get_kwargs( + affect_id=affect_id, + client=client, + comment=comment, + created_dt=created_dt, + created_dt_date=created_dt_date, + created_dt_date_gte=created_dt_date_gte, + created_dt_date_lte=created_dt_date_lte, + created_dt_gt=created_dt_gt, + created_dt_gte=created_dt_gte, + created_dt_lt=created_dt_lt, + created_dt_lte=created_dt_lte, + cvss_version=cvss_version, + exclude_fields=exclude_fields, + include_fields=include_fields, + issuer=issuer, + limit=limit, + offset=offset, + score=score, + updated_dt=updated_dt, + updated_dt_date=updated_dt_date, + updated_dt_date_gte=updated_dt_date_gte, + updated_dt_date_lte=updated_dt_date_lte, + updated_dt_gt=updated_dt_gt, + updated_dt_gte=updated_dt_gte, + updated_dt_lt=updated_dt_lt, + updated_dt_lte=updated_dt_lte, + uuid=uuid, + vector=vector, + ) + + async with client.get_async_session().get( + verify_ssl=client.verify_ssl, raise_for_status=True, **kwargs + ) as response: + content = await response.read() + resp = requests.Response() + resp.status_code = response.status + resp._content = content + + return _build_response(response=resp) + + +async def async_( + affect_id: str, + *, + client: AuthenticatedClient, + comment: Union[Unset, None, str] = UNSET, + created_dt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_date: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_version: Union[Unset, None, str] = UNSET, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, + issuer: Union[Unset, None, OsidbApiV1AffectsCvssScoresListIssuer] = UNSET, + limit: Union[Unset, None, int] = UNSET, + offset: Union[Unset, None, int] = UNSET, + score: Union[Unset, None, float] = UNSET, + updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + uuid: Union[Unset, None, str] = UNSET, + vector: Union[Unset, None, str] = UNSET, +) -> Optional[OsidbApiV1AffectsCvssScoresListResponse200]: + """ """ + + return ( + await async_detailed( + affect_id=affect_id, + client=client, + comment=comment, + created_dt=created_dt, + created_dt_date=created_dt_date, + created_dt_date_gte=created_dt_date_gte, + created_dt_date_lte=created_dt_date_lte, + created_dt_gt=created_dt_gt, + created_dt_gte=created_dt_gte, + created_dt_lt=created_dt_lt, + created_dt_lte=created_dt_lte, + cvss_version=cvss_version, + exclude_fields=exclude_fields, + include_fields=include_fields, + issuer=issuer, + limit=limit, + offset=offset, + score=score, + updated_dt=updated_dt, + updated_dt_date=updated_dt_date, + updated_dt_date_gte=updated_dt_date_gte, + updated_dt_date_lte=updated_dt_date_lte, + updated_dt_gt=updated_dt_gt, + updated_dt_gte=updated_dt_gte, + updated_dt_lt=updated_dt_lt, + updated_dt_lte=updated_dt_lte, + uuid=uuid, + vector=vector, + ) + ).parsed diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_cvss_scores_retrieve.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_cvss_scores_retrieve.py new file mode 100644 index 0000000..5bb685a --- /dev/null +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_cvss_scores_retrieve.py @@ -0,0 +1,179 @@ +from typing import Any, Dict, List, Optional, Union + +import requests + +from ...client import AuthenticatedClient +from ...models.osidb_api_v1_affects_cvss_scores_retrieve_response_200 import ( + OsidbApiV1AffectsCvssScoresRetrieveResponse200, +) +from ...types import UNSET, Response, Unset + +QUERY_PARAMS = { + "exclude_fields": List[str], + "include_fields": List[str], +} + + +def _get_kwargs( + affect_id: str, + id: str, + *, + client: AuthenticatedClient, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, +) -> Dict[str, Any]: + url = "{}/osidb/api/v1/affects/{affect_id}/cvss_scores/{id}".format( + client.base_url, + affect_id=affect_id, + id=id, + ) + + headers: Dict[str, Any] = client.get_headers() + + json_exclude_fields: Union[Unset, None, List[str]] = UNSET + if not isinstance(exclude_fields, Unset): + if exclude_fields is None: + json_exclude_fields = None + else: + json_exclude_fields = exclude_fields + + json_include_fields: Union[Unset, None, List[str]] = UNSET + if not isinstance(include_fields, Unset): + if include_fields is None: + json_include_fields = None + else: + json_include_fields = include_fields + + params: Dict[str, Any] = { + "exclude_fields": json_exclude_fields, + "include_fields": json_include_fields, + } + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "url": url, + "headers": headers, + "params": params, + } + + +def _parse_response( + *, response: requests.Response +) -> Optional[OsidbApiV1AffectsCvssScoresRetrieveResponse200]: + if response.status_code == 200: + _response_200 = response.json() + response_200: OsidbApiV1AffectsCvssScoresRetrieveResponse200 + if isinstance(_response_200, Unset): + response_200 = UNSET + else: + response_200 = OsidbApiV1AffectsCvssScoresRetrieveResponse200.from_dict( + _response_200 + ) + + return response_200 + return None + + +def _build_response( + *, response: requests.Response +) -> Response[OsidbApiV1AffectsCvssScoresRetrieveResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + affect_id: str, + id: str, + *, + client: AuthenticatedClient, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, +) -> Response[OsidbApiV1AffectsCvssScoresRetrieveResponse200]: + kwargs = _get_kwargs( + affect_id=affect_id, + id=id, + client=client, + exclude_fields=exclude_fields, + include_fields=include_fields, + ) + + response = requests.get( + verify=client.verify_ssl, + auth=client.auth, + timeout=client.timeout, + **kwargs, + ) + response.raise_for_status() + + return _build_response(response=response) + + +def sync( + affect_id: str, + id: str, + *, + client: AuthenticatedClient, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, +) -> Optional[OsidbApiV1AffectsCvssScoresRetrieveResponse200]: + """ """ + + return sync_detailed( + affect_id=affect_id, + id=id, + client=client, + exclude_fields=exclude_fields, + include_fields=include_fields, + ).parsed + + +async def async_detailed( + affect_id: str, + id: str, + *, + client: AuthenticatedClient, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, +) -> Response[OsidbApiV1AffectsCvssScoresRetrieveResponse200]: + kwargs = _get_kwargs( + affect_id=affect_id, + id=id, + client=client, + exclude_fields=exclude_fields, + include_fields=include_fields, + ) + + async with client.get_async_session().get( + verify_ssl=client.verify_ssl, raise_for_status=True, **kwargs + ) as response: + content = await response.read() + resp = requests.Response() + resp.status_code = response.status + resp._content = content + + return _build_response(response=resp) + + +async def async_( + affect_id: str, + id: str, + *, + client: AuthenticatedClient, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, +) -> Optional[OsidbApiV1AffectsCvssScoresRetrieveResponse200]: + """ """ + + return ( + await async_detailed( + affect_id=affect_id, + id=id, + client=client, + exclude_fields=exclude_fields, + include_fields=include_fields, + ) + ).parsed diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_cvss_scores_update.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_cvss_scores_update.py new file mode 100644 index 0000000..202f318 --- /dev/null +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_cvss_scores_update.py @@ -0,0 +1,175 @@ +from typing import Any, Dict, Optional + +import requests + +from ...client import AuthenticatedClient +from ...models.affect_cvss_put import AffectCVSSPut +from ...models.osidb_api_v1_affects_cvss_scores_update_response_200 import ( + OsidbApiV1AffectsCvssScoresUpdateResponse200, +) +from ...types import UNSET, Response, Unset + +QUERY_PARAMS = {} +REQUEST_BODY_TYPE = AffectCVSSPut + + +def _get_kwargs( + affect_id: str, + id: str, + *, + client: AuthenticatedClient, + form_data: AffectCVSSPut, + multipart_data: AffectCVSSPut, + json_body: AffectCVSSPut, +) -> Dict[str, Any]: + url = "{}/osidb/api/v1/affects/{affect_id}/cvss_scores/{id}".format( + client.base_url, + affect_id=affect_id, + id=id, + ) + + headers: Dict[str, Any] = client.get_headers() + + json_json_body: Dict[str, Any] = UNSET + if not isinstance(json_body, Unset): + json_body.to_dict() + + multipart_multipart_data: Dict[str, Any] = UNSET + if not isinstance(multipart_data, Unset): + multipart_data.to_multipart() + + return { + "url": url, + "headers": headers, + "data": form_data.to_dict(), + } + + +def _parse_response( + *, response: requests.Response +) -> Optional[OsidbApiV1AffectsCvssScoresUpdateResponse200]: + if response.status_code == 200: + _response_200 = response.json() + response_200: OsidbApiV1AffectsCvssScoresUpdateResponse200 + if isinstance(_response_200, Unset): + response_200 = UNSET + else: + response_200 = OsidbApiV1AffectsCvssScoresUpdateResponse200.from_dict( + _response_200 + ) + + return response_200 + return None + + +def _build_response( + *, response: requests.Response +) -> Response[OsidbApiV1AffectsCvssScoresUpdateResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + affect_id: str, + id: str, + *, + client: AuthenticatedClient, + form_data: AffectCVSSPut, + multipart_data: AffectCVSSPut, + json_body: AffectCVSSPut, +) -> Response[OsidbApiV1AffectsCvssScoresUpdateResponse200]: + kwargs = _get_kwargs( + affect_id=affect_id, + id=id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ) + + response = requests.put( + verify=client.verify_ssl, + auth=client.auth, + timeout=client.timeout, + **kwargs, + ) + response.raise_for_status() + + return _build_response(response=response) + + +def sync( + affect_id: str, + id: str, + *, + client: AuthenticatedClient, + form_data: AffectCVSSPut, + multipart_data: AffectCVSSPut, + json_body: AffectCVSSPut, +) -> Optional[OsidbApiV1AffectsCvssScoresUpdateResponse200]: + """ """ + + return sync_detailed( + affect_id=affect_id, + id=id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ).parsed + + +async def async_detailed( + affect_id: str, + id: str, + *, + client: AuthenticatedClient, + form_data: AffectCVSSPut, + multipart_data: AffectCVSSPut, + json_body: AffectCVSSPut, +) -> Response[OsidbApiV1AffectsCvssScoresUpdateResponse200]: + kwargs = _get_kwargs( + affect_id=affect_id, + id=id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ) + + async with client.get_async_session().put( + verify_ssl=client.verify_ssl, raise_for_status=True, **kwargs + ) as response: + content = await response.read() + resp = requests.Response() + resp.status_code = response.status + resp._content = content + + return _build_response(response=resp) + + +async def async_( + affect_id: str, + id: str, + *, + client: AuthenticatedClient, + form_data: AffectCVSSPut, + multipart_data: AffectCVSSPut, + json_body: AffectCVSSPut, +) -> Optional[OsidbApiV1AffectsCvssScoresUpdateResponse200]: + """ """ + + return ( + await async_detailed( + affect_id=affect_id, + id=id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ) + ).parsed diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_destroy.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_destroy.py index 9c6816a..479a3bb 100644 --- a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_destroy.py +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_destroy.py @@ -3,8 +3,8 @@ import requests from ...client import AuthenticatedClient -from ...models.osidb_api_v1_affects_destroy_response_204 import ( - OsidbApiV1AffectsDestroyResponse204, +from ...models.osidb_api_v1_affects_destroy_response_200 import ( + OsidbApiV1AffectsDestroyResponse200, ) from ...types import UNSET, Response, Unset @@ -31,22 +31,22 @@ def _get_kwargs( def _parse_response( *, response: requests.Response -) -> Optional[OsidbApiV1AffectsDestroyResponse204]: - if response.status_code == 204: - _response_204 = response.json() - response_204: OsidbApiV1AffectsDestroyResponse204 - if isinstance(_response_204, Unset): - response_204 = UNSET +) -> Optional[OsidbApiV1AffectsDestroyResponse200]: + if response.status_code == 200: + _response_200 = response.json() + response_200: OsidbApiV1AffectsDestroyResponse200 + if isinstance(_response_200, Unset): + response_200 = UNSET else: - response_204 = OsidbApiV1AffectsDestroyResponse204.from_dict(_response_204) + response_200 = OsidbApiV1AffectsDestroyResponse200.from_dict(_response_200) - return response_204 + return response_200 return None def _build_response( *, response: requests.Response -) -> Response[OsidbApiV1AffectsDestroyResponse204]: +) -> Response[OsidbApiV1AffectsDestroyResponse200]: return Response( status_code=response.status_code, content=response.content, @@ -59,7 +59,7 @@ def sync_detailed( uuid: str, *, client: AuthenticatedClient, -) -> Response[OsidbApiV1AffectsDestroyResponse204]: +) -> Response[OsidbApiV1AffectsDestroyResponse200]: kwargs = _get_kwargs( uuid=uuid, client=client, @@ -80,8 +80,8 @@ def sync( uuid: str, *, client: AuthenticatedClient, -) -> Optional[OsidbApiV1AffectsDestroyResponse204]: - """ """ +) -> Optional[OsidbApiV1AffectsDestroyResponse200]: + """Destroy the instance and proxy the delete to Bugzilla""" return sync_detailed( uuid=uuid, @@ -93,7 +93,7 @@ async def async_detailed( uuid: str, *, client: AuthenticatedClient, -) -> Response[OsidbApiV1AffectsDestroyResponse204]: +) -> Response[OsidbApiV1AffectsDestroyResponse200]: kwargs = _get_kwargs( uuid=uuid, client=client, @@ -114,8 +114,8 @@ async def async_( uuid: str, *, client: AuthenticatedClient, -) -> Optional[OsidbApiV1AffectsDestroyResponse204]: - """ """ +) -> Optional[OsidbApiV1AffectsDestroyResponse200]: + """Destroy the instance and proxy the delete to Bugzilla""" return ( await async_detailed( diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_list.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_list.py index d07524a..17afba6 100644 --- a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_list.py +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_list.py @@ -7,6 +7,9 @@ from ...models.osidb_api_v1_affects_list_affectedness import ( OsidbApiV1AffectsListAffectedness, ) +from ...models.osidb_api_v1_affects_list_cvss_scores_issuer import ( + OsidbApiV1AffectsListCvssScoresIssuer, +) from ...models.osidb_api_v1_affects_list_flaw_impact import ( OsidbApiV1AffectsListFlawImpact, ) @@ -52,6 +55,28 @@ "cvss3_score__gte": float, "cvss3_score__lt": float, "cvss3_score__lte": float, + "cvss_scores__comment": str, + "cvss_scores__created_dt": datetime.datetime, + "cvss_scores__created_dt__date": datetime.date, + "cvss_scores__created_dt__date__gte": datetime.date, + "cvss_scores__created_dt__date__lte": datetime.date, + "cvss_scores__created_dt__gt": datetime.datetime, + "cvss_scores__created_dt__gte": datetime.datetime, + "cvss_scores__created_dt__lt": datetime.datetime, + "cvss_scores__created_dt__lte": datetime.datetime, + "cvss_scores__cvss_version": str, + "cvss_scores__issuer": OsidbApiV1AffectsListCvssScoresIssuer, + "cvss_scores__score": float, + "cvss_scores__updated_dt": datetime.datetime, + "cvss_scores__updated_dt__date": datetime.date, + "cvss_scores__updated_dt__date__gte": datetime.date, + "cvss_scores__updated_dt__date__lte": datetime.date, + "cvss_scores__updated_dt__gt": datetime.datetime, + "cvss_scores__updated_dt__gte": datetime.datetime, + "cvss_scores__updated_dt__lt": datetime.datetime, + "cvss_scores__updated_dt__lte": datetime.datetime, + "cvss_scores__uuid": str, + "cvss_scores__vector": str, "embargoed": bool, "exclude_fields": List[str], "flaw__component": str, @@ -171,6 +196,30 @@ def _get_kwargs( cvss3_score_gte: Union[Unset, None, float] = UNSET, cvss3_score_lt: Union[Unset, None, float] = UNSET, cvss3_score_lte: Union[Unset, None, float] = UNSET, + cvss_scores_comment: Union[Unset, None, str] = UNSET, + cvss_scores_created_dt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_date: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_cvss_version: Union[Unset, None, str] = UNSET, + cvss_scores_issuer: Union[ + Unset, None, OsidbApiV1AffectsListCvssScoresIssuer + ] = UNSET, + cvss_scores_score: Union[Unset, None, float] = UNSET, + cvss_scores_updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_uuid: Union[Unset, None, str] = UNSET, + cvss_scores_vector: Union[Unset, None, str] = UNSET, embargoed: Union[Unset, None, bool] = UNSET, exclude_fields: Union[Unset, None, List[str]] = UNSET, flaw_component: Union[Unset, None, str] = UNSET, @@ -315,6 +364,131 @@ def _get_kwargs( if not isinstance(created_dt_lte, Unset): json_created_dt_lte = created_dt_lte.isoformat() if created_dt_lte else None + json_cvss_scores_created_dt: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_created_dt, Unset): + json_cvss_scores_created_dt = ( + cvss_scores_created_dt.isoformat() if cvss_scores_created_dt else None + ) + + json_cvss_scores_created_dt_date: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_created_dt_date, Unset): + json_cvss_scores_created_dt_date = ( + cvss_scores_created_dt_date.isoformat() + if cvss_scores_created_dt_date + else None + ) + + json_cvss_scores_created_dt_date_gte: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_created_dt_date_gte, Unset): + json_cvss_scores_created_dt_date_gte = ( + cvss_scores_created_dt_date_gte.isoformat() + if cvss_scores_created_dt_date_gte + else None + ) + + json_cvss_scores_created_dt_date_lte: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_created_dt_date_lte, Unset): + json_cvss_scores_created_dt_date_lte = ( + cvss_scores_created_dt_date_lte.isoformat() + if cvss_scores_created_dt_date_lte + else None + ) + + json_cvss_scores_created_dt_gt: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_created_dt_gt, Unset): + json_cvss_scores_created_dt_gt = ( + cvss_scores_created_dt_gt.isoformat() if cvss_scores_created_dt_gt else None + ) + + json_cvss_scores_created_dt_gte: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_created_dt_gte, Unset): + json_cvss_scores_created_dt_gte = ( + cvss_scores_created_dt_gte.isoformat() + if cvss_scores_created_dt_gte + else None + ) + + json_cvss_scores_created_dt_lt: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_created_dt_lt, Unset): + json_cvss_scores_created_dt_lt = ( + cvss_scores_created_dt_lt.isoformat() if cvss_scores_created_dt_lt else None + ) + + json_cvss_scores_created_dt_lte: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_created_dt_lte, Unset): + json_cvss_scores_created_dt_lte = ( + cvss_scores_created_dt_lte.isoformat() + if cvss_scores_created_dt_lte + else None + ) + + json_cvss_scores_issuer: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_issuer, Unset): + + json_cvss_scores_issuer = ( + OsidbApiV1AffectsListCvssScoresIssuer(cvss_scores_issuer).value + if cvss_scores_issuer + else None + ) + + json_cvss_scores_updated_dt: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_updated_dt, Unset): + json_cvss_scores_updated_dt = ( + cvss_scores_updated_dt.isoformat() if cvss_scores_updated_dt else None + ) + + json_cvss_scores_updated_dt_date: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_updated_dt_date, Unset): + json_cvss_scores_updated_dt_date = ( + cvss_scores_updated_dt_date.isoformat() + if cvss_scores_updated_dt_date + else None + ) + + json_cvss_scores_updated_dt_date_gte: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_updated_dt_date_gte, Unset): + json_cvss_scores_updated_dt_date_gte = ( + cvss_scores_updated_dt_date_gte.isoformat() + if cvss_scores_updated_dt_date_gte + else None + ) + + json_cvss_scores_updated_dt_date_lte: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_updated_dt_date_lte, Unset): + json_cvss_scores_updated_dt_date_lte = ( + cvss_scores_updated_dt_date_lte.isoformat() + if cvss_scores_updated_dt_date_lte + else None + ) + + json_cvss_scores_updated_dt_gt: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_updated_dt_gt, Unset): + json_cvss_scores_updated_dt_gt = ( + cvss_scores_updated_dt_gt.isoformat() if cvss_scores_updated_dt_gt else None + ) + + json_cvss_scores_updated_dt_gte: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_updated_dt_gte, Unset): + json_cvss_scores_updated_dt_gte = ( + cvss_scores_updated_dt_gte.isoformat() + if cvss_scores_updated_dt_gte + else None + ) + + json_cvss_scores_updated_dt_lt: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_updated_dt_lt, Unset): + json_cvss_scores_updated_dt_lt = ( + cvss_scores_updated_dt_lt.isoformat() if cvss_scores_updated_dt_lt else None + ) + + json_cvss_scores_updated_dt_lte: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_updated_dt_lte, Unset): + json_cvss_scores_updated_dt_lte = ( + cvss_scores_updated_dt_lte.isoformat() + if cvss_scores_updated_dt_lte + else None + ) + json_exclude_fields: Union[Unset, None, List[str]] = UNSET if not isinstance(exclude_fields, Unset): if exclude_fields is None: @@ -705,6 +879,28 @@ def _get_kwargs( "cvss3_score__gte": cvss3_score_gte, "cvss3_score__lt": cvss3_score_lt, "cvss3_score__lte": cvss3_score_lte, + "cvss_scores__comment": cvss_scores_comment, + "cvss_scores__created_dt": json_cvss_scores_created_dt, + "cvss_scores__created_dt__date": json_cvss_scores_created_dt_date, + "cvss_scores__created_dt__date__gte": json_cvss_scores_created_dt_date_gte, + "cvss_scores__created_dt__date__lte": json_cvss_scores_created_dt_date_lte, + "cvss_scores__created_dt__gt": json_cvss_scores_created_dt_gt, + "cvss_scores__created_dt__gte": json_cvss_scores_created_dt_gte, + "cvss_scores__created_dt__lt": json_cvss_scores_created_dt_lt, + "cvss_scores__created_dt__lte": json_cvss_scores_created_dt_lte, + "cvss_scores__cvss_version": cvss_scores_cvss_version, + "cvss_scores__issuer": json_cvss_scores_issuer, + "cvss_scores__score": cvss_scores_score, + "cvss_scores__updated_dt": json_cvss_scores_updated_dt, + "cvss_scores__updated_dt__date": json_cvss_scores_updated_dt_date, + "cvss_scores__updated_dt__date__gte": json_cvss_scores_updated_dt_date_gte, + "cvss_scores__updated_dt__date__lte": json_cvss_scores_updated_dt_date_lte, + "cvss_scores__updated_dt__gt": json_cvss_scores_updated_dt_gt, + "cvss_scores__updated_dt__gte": json_cvss_scores_updated_dt_gte, + "cvss_scores__updated_dt__lt": json_cvss_scores_updated_dt_lt, + "cvss_scores__updated_dt__lte": json_cvss_scores_updated_dt_lte, + "cvss_scores__uuid": cvss_scores_uuid, + "cvss_scores__vector": cvss_scores_vector, "embargoed": embargoed, "exclude_fields": json_exclude_fields, "flaw__component": flaw_component, @@ -857,6 +1053,30 @@ def sync_detailed( cvss3_score_gte: Union[Unset, None, float] = UNSET, cvss3_score_lt: Union[Unset, None, float] = UNSET, cvss3_score_lte: Union[Unset, None, float] = UNSET, + cvss_scores_comment: Union[Unset, None, str] = UNSET, + cvss_scores_created_dt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_date: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_cvss_version: Union[Unset, None, str] = UNSET, + cvss_scores_issuer: Union[ + Unset, None, OsidbApiV1AffectsListCvssScoresIssuer + ] = UNSET, + cvss_scores_score: Union[Unset, None, float] = UNSET, + cvss_scores_updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_uuid: Union[Unset, None, str] = UNSET, + cvss_scores_vector: Union[Unset, None, str] = UNSET, embargoed: Union[Unset, None, bool] = UNSET, exclude_fields: Union[Unset, None, List[str]] = UNSET, flaw_component: Union[Unset, None, str] = UNSET, @@ -973,6 +1193,28 @@ def sync_detailed( cvss3_score_gte=cvss3_score_gte, cvss3_score_lt=cvss3_score_lt, cvss3_score_lte=cvss3_score_lte, + cvss_scores_comment=cvss_scores_comment, + cvss_scores_created_dt=cvss_scores_created_dt, + cvss_scores_created_dt_date=cvss_scores_created_dt_date, + cvss_scores_created_dt_date_gte=cvss_scores_created_dt_date_gte, + cvss_scores_created_dt_date_lte=cvss_scores_created_dt_date_lte, + cvss_scores_created_dt_gt=cvss_scores_created_dt_gt, + cvss_scores_created_dt_gte=cvss_scores_created_dt_gte, + cvss_scores_created_dt_lt=cvss_scores_created_dt_lt, + cvss_scores_created_dt_lte=cvss_scores_created_dt_lte, + cvss_scores_cvss_version=cvss_scores_cvss_version, + cvss_scores_issuer=cvss_scores_issuer, + cvss_scores_score=cvss_scores_score, + cvss_scores_updated_dt=cvss_scores_updated_dt, + cvss_scores_updated_dt_date=cvss_scores_updated_dt_date, + cvss_scores_updated_dt_date_gte=cvss_scores_updated_dt_date_gte, + cvss_scores_updated_dt_date_lte=cvss_scores_updated_dt_date_lte, + cvss_scores_updated_dt_gt=cvss_scores_updated_dt_gt, + cvss_scores_updated_dt_gte=cvss_scores_updated_dt_gte, + cvss_scores_updated_dt_lt=cvss_scores_updated_dt_lt, + cvss_scores_updated_dt_lte=cvss_scores_updated_dt_lte, + cvss_scores_uuid=cvss_scores_uuid, + cvss_scores_vector=cvss_scores_vector, embargoed=embargoed, exclude_fields=exclude_fields, flaw_component=flaw_component, @@ -1102,6 +1344,30 @@ def sync( cvss3_score_gte: Union[Unset, None, float] = UNSET, cvss3_score_lt: Union[Unset, None, float] = UNSET, cvss3_score_lte: Union[Unset, None, float] = UNSET, + cvss_scores_comment: Union[Unset, None, str] = UNSET, + cvss_scores_created_dt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_date: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_cvss_version: Union[Unset, None, str] = UNSET, + cvss_scores_issuer: Union[ + Unset, None, OsidbApiV1AffectsListCvssScoresIssuer + ] = UNSET, + cvss_scores_score: Union[Unset, None, float] = UNSET, + cvss_scores_updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_uuid: Union[Unset, None, str] = UNSET, + cvss_scores_vector: Union[Unset, None, str] = UNSET, embargoed: Union[Unset, None, bool] = UNSET, exclude_fields: Union[Unset, None, List[str]] = UNSET, flaw_component: Union[Unset, None, str] = UNSET, @@ -1220,6 +1486,28 @@ def sync( cvss3_score_gte=cvss3_score_gte, cvss3_score_lt=cvss3_score_lt, cvss3_score_lte=cvss3_score_lte, + cvss_scores_comment=cvss_scores_comment, + cvss_scores_created_dt=cvss_scores_created_dt, + cvss_scores_created_dt_date=cvss_scores_created_dt_date, + cvss_scores_created_dt_date_gte=cvss_scores_created_dt_date_gte, + cvss_scores_created_dt_date_lte=cvss_scores_created_dt_date_lte, + cvss_scores_created_dt_gt=cvss_scores_created_dt_gt, + cvss_scores_created_dt_gte=cvss_scores_created_dt_gte, + cvss_scores_created_dt_lt=cvss_scores_created_dt_lt, + cvss_scores_created_dt_lte=cvss_scores_created_dt_lte, + cvss_scores_cvss_version=cvss_scores_cvss_version, + cvss_scores_issuer=cvss_scores_issuer, + cvss_scores_score=cvss_scores_score, + cvss_scores_updated_dt=cvss_scores_updated_dt, + cvss_scores_updated_dt_date=cvss_scores_updated_dt_date, + cvss_scores_updated_dt_date_gte=cvss_scores_updated_dt_date_gte, + cvss_scores_updated_dt_date_lte=cvss_scores_updated_dt_date_lte, + cvss_scores_updated_dt_gt=cvss_scores_updated_dt_gt, + cvss_scores_updated_dt_gte=cvss_scores_updated_dt_gte, + cvss_scores_updated_dt_lt=cvss_scores_updated_dt_lt, + cvss_scores_updated_dt_lte=cvss_scores_updated_dt_lte, + cvss_scores_uuid=cvss_scores_uuid, + cvss_scores_vector=cvss_scores_vector, embargoed=embargoed, exclude_fields=exclude_fields, flaw_component=flaw_component, @@ -1339,6 +1627,30 @@ async def async_detailed( cvss3_score_gte: Union[Unset, None, float] = UNSET, cvss3_score_lt: Union[Unset, None, float] = UNSET, cvss3_score_lte: Union[Unset, None, float] = UNSET, + cvss_scores_comment: Union[Unset, None, str] = UNSET, + cvss_scores_created_dt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_date: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_cvss_version: Union[Unset, None, str] = UNSET, + cvss_scores_issuer: Union[ + Unset, None, OsidbApiV1AffectsListCvssScoresIssuer + ] = UNSET, + cvss_scores_score: Union[Unset, None, float] = UNSET, + cvss_scores_updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_uuid: Union[Unset, None, str] = UNSET, + cvss_scores_vector: Union[Unset, None, str] = UNSET, embargoed: Union[Unset, None, bool] = UNSET, exclude_fields: Union[Unset, None, List[str]] = UNSET, flaw_component: Union[Unset, None, str] = UNSET, @@ -1455,6 +1767,28 @@ async def async_detailed( cvss3_score_gte=cvss3_score_gte, cvss3_score_lt=cvss3_score_lt, cvss3_score_lte=cvss3_score_lte, + cvss_scores_comment=cvss_scores_comment, + cvss_scores_created_dt=cvss_scores_created_dt, + cvss_scores_created_dt_date=cvss_scores_created_dt_date, + cvss_scores_created_dt_date_gte=cvss_scores_created_dt_date_gte, + cvss_scores_created_dt_date_lte=cvss_scores_created_dt_date_lte, + cvss_scores_created_dt_gt=cvss_scores_created_dt_gt, + cvss_scores_created_dt_gte=cvss_scores_created_dt_gte, + cvss_scores_created_dt_lt=cvss_scores_created_dt_lt, + cvss_scores_created_dt_lte=cvss_scores_created_dt_lte, + cvss_scores_cvss_version=cvss_scores_cvss_version, + cvss_scores_issuer=cvss_scores_issuer, + cvss_scores_score=cvss_scores_score, + cvss_scores_updated_dt=cvss_scores_updated_dt, + cvss_scores_updated_dt_date=cvss_scores_updated_dt_date, + cvss_scores_updated_dt_date_gte=cvss_scores_updated_dt_date_gte, + cvss_scores_updated_dt_date_lte=cvss_scores_updated_dt_date_lte, + cvss_scores_updated_dt_gt=cvss_scores_updated_dt_gt, + cvss_scores_updated_dt_gte=cvss_scores_updated_dt_gte, + cvss_scores_updated_dt_lt=cvss_scores_updated_dt_lt, + cvss_scores_updated_dt_lte=cvss_scores_updated_dt_lte, + cvss_scores_uuid=cvss_scores_uuid, + cvss_scores_vector=cvss_scores_vector, embargoed=embargoed, exclude_fields=exclude_fields, flaw_component=flaw_component, @@ -1584,6 +1918,30 @@ async def async_( cvss3_score_gte: Union[Unset, None, float] = UNSET, cvss3_score_lt: Union[Unset, None, float] = UNSET, cvss3_score_lte: Union[Unset, None, float] = UNSET, + cvss_scores_comment: Union[Unset, None, str] = UNSET, + cvss_scores_created_dt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_date: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_cvss_version: Union[Unset, None, str] = UNSET, + cvss_scores_issuer: Union[ + Unset, None, OsidbApiV1AffectsListCvssScoresIssuer + ] = UNSET, + cvss_scores_score: Union[Unset, None, float] = UNSET, + cvss_scores_updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_uuid: Union[Unset, None, str] = UNSET, + cvss_scores_vector: Union[Unset, None, str] = UNSET, embargoed: Union[Unset, None, bool] = UNSET, exclude_fields: Union[Unset, None, List[str]] = UNSET, flaw_component: Union[Unset, None, str] = UNSET, @@ -1703,6 +2061,28 @@ async def async_( cvss3_score_gte=cvss3_score_gte, cvss3_score_lt=cvss3_score_lt, cvss3_score_lte=cvss3_score_lte, + cvss_scores_comment=cvss_scores_comment, + cvss_scores_created_dt=cvss_scores_created_dt, + cvss_scores_created_dt_date=cvss_scores_created_dt_date, + cvss_scores_created_dt_date_gte=cvss_scores_created_dt_date_gte, + cvss_scores_created_dt_date_lte=cvss_scores_created_dt_date_lte, + cvss_scores_created_dt_gt=cvss_scores_created_dt_gt, + cvss_scores_created_dt_gte=cvss_scores_created_dt_gte, + cvss_scores_created_dt_lt=cvss_scores_created_dt_lt, + cvss_scores_created_dt_lte=cvss_scores_created_dt_lte, + cvss_scores_cvss_version=cvss_scores_cvss_version, + cvss_scores_issuer=cvss_scores_issuer, + cvss_scores_score=cvss_scores_score, + cvss_scores_updated_dt=cvss_scores_updated_dt, + cvss_scores_updated_dt_date=cvss_scores_updated_dt_date, + cvss_scores_updated_dt_date_gte=cvss_scores_updated_dt_date_gte, + cvss_scores_updated_dt_date_lte=cvss_scores_updated_dt_date_lte, + cvss_scores_updated_dt_gt=cvss_scores_updated_dt_gt, + cvss_scores_updated_dt_gte=cvss_scores_updated_dt_gte, + cvss_scores_updated_dt_lt=cvss_scores_updated_dt_lt, + cvss_scores_updated_dt_lte=cvss_scores_updated_dt_lte, + cvss_scores_uuid=cvss_scores_uuid, + cvss_scores_vector=cvss_scores_vector, embargoed=embargoed, exclude_fields=exclude_fields, flaw_component=flaw_component, diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_update.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_update.py index 73929b0..6af5625 100644 --- a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_update.py +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_affects_update.py @@ -20,6 +20,7 @@ def _get_kwargs( form_data: Affect, multipart_data: Affect, json_body: Affect, + bugzilla_api_key: str, ) -> Dict[str, Any]: url = "{}/osidb/api/v1/affects/{uuid}".format( client.base_url, @@ -28,6 +29,8 @@ def _get_kwargs( headers: Dict[str, Any] = client.get_headers() + headers["bugzilla-api-key"] = bugzilla_api_key + json_json_body: Dict[str, Any] = UNSET if not isinstance(json_body, Unset): json_body.to_dict() @@ -76,6 +79,7 @@ def sync_detailed( form_data: Affect, multipart_data: Affect, json_body: Affect, + bugzilla_api_key: str, ) -> Response[OsidbApiV1AffectsUpdateResponse200]: kwargs = _get_kwargs( uuid=uuid, @@ -83,6 +87,7 @@ def sync_detailed( form_data=form_data, multipart_data=multipart_data, json_body=json_body, + bugzilla_api_key=bugzilla_api_key, ) response = requests.put( @@ -103,6 +108,7 @@ def sync( form_data: Affect, multipart_data: Affect, json_body: Affect, + bugzilla_api_key: str, ) -> Optional[OsidbApiV1AffectsUpdateResponse200]: """ """ @@ -112,6 +118,7 @@ def sync( form_data=form_data, multipart_data=multipart_data, json_body=json_body, + bugzilla_api_key=bugzilla_api_key, ).parsed @@ -122,6 +129,7 @@ async def async_detailed( form_data: Affect, multipart_data: Affect, json_body: Affect, + bugzilla_api_key: str, ) -> Response[OsidbApiV1AffectsUpdateResponse200]: kwargs = _get_kwargs( uuid=uuid, @@ -129,6 +137,7 @@ async def async_detailed( form_data=form_data, multipart_data=multipart_data, json_body=json_body, + bugzilla_api_key=bugzilla_api_key, ) async with client.get_async_session().put( @@ -149,6 +158,7 @@ async def async_( form_data: Affect, multipart_data: Affect, json_body: Affect, + bugzilla_api_key: str, ) -> Optional[OsidbApiV1AffectsUpdateResponse200]: """ """ @@ -159,5 +169,6 @@ async def async_( form_data=form_data, multipart_data=multipart_data, json_body=json_body, + bugzilla_api_key=bugzilla_api_key, ) ).parsed diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_acknowledgments_destroy.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_acknowledgments_destroy.py index b02c28d..bc8d180 100644 --- a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_acknowledgments_destroy.py +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_acknowledgments_destroy.py @@ -3,8 +3,8 @@ import requests from ...client import AuthenticatedClient -from ...models.osidb_api_v1_flaws_acknowledgments_destroy_response_204 import ( - OsidbApiV1FlawsAcknowledgmentsDestroyResponse204, +from ...models.osidb_api_v1_flaws_acknowledgments_destroy_response_200 import ( + OsidbApiV1FlawsAcknowledgmentsDestroyResponse200, ) from ...types import UNSET, Response, Unset @@ -33,24 +33,24 @@ def _get_kwargs( def _parse_response( *, response: requests.Response -) -> Optional[OsidbApiV1FlawsAcknowledgmentsDestroyResponse204]: - if response.status_code == 204: - _response_204 = response.json() - response_204: OsidbApiV1FlawsAcknowledgmentsDestroyResponse204 - if isinstance(_response_204, Unset): - response_204 = UNSET +) -> Optional[OsidbApiV1FlawsAcknowledgmentsDestroyResponse200]: + if response.status_code == 200: + _response_200 = response.json() + response_200: OsidbApiV1FlawsAcknowledgmentsDestroyResponse200 + if isinstance(_response_200, Unset): + response_200 = UNSET else: - response_204 = OsidbApiV1FlawsAcknowledgmentsDestroyResponse204.from_dict( - _response_204 + response_200 = OsidbApiV1FlawsAcknowledgmentsDestroyResponse200.from_dict( + _response_200 ) - return response_204 + return response_200 return None def _build_response( *, response: requests.Response -) -> Response[OsidbApiV1FlawsAcknowledgmentsDestroyResponse204]: +) -> Response[OsidbApiV1FlawsAcknowledgmentsDestroyResponse200]: return Response( status_code=response.status_code, content=response.content, @@ -64,7 +64,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[OsidbApiV1FlawsAcknowledgmentsDestroyResponse204]: +) -> Response[OsidbApiV1FlawsAcknowledgmentsDestroyResponse200]: kwargs = _get_kwargs( flaw_id=flaw_id, id=id, @@ -87,8 +87,8 @@ def sync( id: str, *, client: AuthenticatedClient, -) -> Optional[OsidbApiV1FlawsAcknowledgmentsDestroyResponse204]: - """ """ +) -> Optional[OsidbApiV1FlawsAcknowledgmentsDestroyResponse200]: + """Destroy the instance and proxy the delete to Bugzilla""" return sync_detailed( flaw_id=flaw_id, @@ -102,7 +102,7 @@ async def async_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[OsidbApiV1FlawsAcknowledgmentsDestroyResponse204]: +) -> Response[OsidbApiV1FlawsAcknowledgmentsDestroyResponse200]: kwargs = _get_kwargs( flaw_id=flaw_id, id=id, @@ -125,8 +125,8 @@ async def async_( id: str, *, client: AuthenticatedClient, -) -> Optional[OsidbApiV1FlawsAcknowledgmentsDestroyResponse204]: - """ """ +) -> Optional[OsidbApiV1FlawsAcknowledgmentsDestroyResponse200]: + """Destroy the instance and proxy the delete to Bugzilla""" return ( await async_detailed( diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_create.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_create.py index 7b963d8..70e4680 100644 --- a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_create.py +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_create.py @@ -19,6 +19,8 @@ def _get_kwargs( form_data: FlawPost, multipart_data: FlawPost, json_body: FlawPost, + bugzilla_api_key: str, + jira_api_key: str, ) -> Dict[str, Any]: url = "{}/osidb/api/v1/flaws".format( client.base_url, @@ -26,6 +28,9 @@ def _get_kwargs( headers: Dict[str, Any] = client.get_headers() + headers["bugzilla-api-key"] = bugzilla_api_key + headers["jira-api-key"] = jira_api_key + json_json_body: Dict[str, Any] = UNSET if not isinstance(json_body, Unset): json_body.to_dict() @@ -73,12 +78,16 @@ def sync_detailed( form_data: FlawPost, multipart_data: FlawPost, json_body: FlawPost, + bugzilla_api_key: str, + jira_api_key: str, ) -> Response[OsidbApiV1FlawsCreateResponse201]: kwargs = _get_kwargs( client=client, form_data=form_data, multipart_data=multipart_data, json_body=json_body, + bugzilla_api_key=bugzilla_api_key, + jira_api_key=jira_api_key, ) response = requests.post( @@ -98,6 +107,8 @@ def sync( form_data: FlawPost, multipart_data: FlawPost, json_body: FlawPost, + bugzilla_api_key: str, + jira_api_key: str, ) -> Optional[OsidbApiV1FlawsCreateResponse201]: """ """ @@ -106,6 +117,8 @@ def sync( form_data=form_data, multipart_data=multipart_data, json_body=json_body, + bugzilla_api_key=bugzilla_api_key, + jira_api_key=jira_api_key, ).parsed @@ -115,12 +128,16 @@ async def async_detailed( form_data: FlawPost, multipart_data: FlawPost, json_body: FlawPost, + bugzilla_api_key: str, + jira_api_key: str, ) -> Response[OsidbApiV1FlawsCreateResponse201]: kwargs = _get_kwargs( client=client, form_data=form_data, multipart_data=multipart_data, json_body=json_body, + bugzilla_api_key=bugzilla_api_key, + jira_api_key=jira_api_key, ) async with client.get_async_session().post( @@ -140,6 +157,8 @@ async def async_( form_data: FlawPost, multipart_data: FlawPost, json_body: FlawPost, + bugzilla_api_key: str, + jira_api_key: str, ) -> Optional[OsidbApiV1FlawsCreateResponse201]: """ """ @@ -149,5 +168,7 @@ async def async_( form_data=form_data, multipart_data=multipart_data, json_body=json_body, + bugzilla_api_key=bugzilla_api_key, + jira_api_key=jira_api_key, ) ).parsed diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_cvss_scores_create.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_cvss_scores_create.py new file mode 100644 index 0000000..12d9e0b --- /dev/null +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_cvss_scores_create.py @@ -0,0 +1,165 @@ +from typing import Any, Dict, Optional + +import requests + +from ...client import AuthenticatedClient +from ...models.flaw_cvss_post import FlawCVSSPost +from ...models.osidb_api_v1_flaws_cvss_scores_create_response_201 import ( + OsidbApiV1FlawsCvssScoresCreateResponse201, +) +from ...types import UNSET, Response, Unset + +QUERY_PARAMS = {} +REQUEST_BODY_TYPE = FlawCVSSPost + + +def _get_kwargs( + flaw_id: str, + *, + client: AuthenticatedClient, + form_data: FlawCVSSPost, + multipart_data: FlawCVSSPost, + json_body: FlawCVSSPost, +) -> Dict[str, Any]: + url = "{}/osidb/api/v1/flaws/{flaw_id}/cvss_scores".format( + client.base_url, + flaw_id=flaw_id, + ) + + headers: Dict[str, Any] = client.get_headers() + + json_json_body: Dict[str, Any] = UNSET + if not isinstance(json_body, Unset): + json_body.to_dict() + + multipart_multipart_data: Dict[str, Any] = UNSET + if not isinstance(multipart_data, Unset): + multipart_data.to_multipart() + + return { + "url": url, + "headers": headers, + "data": form_data.to_dict(), + } + + +def _parse_response( + *, response: requests.Response +) -> Optional[OsidbApiV1FlawsCvssScoresCreateResponse201]: + if response.status_code == 201: + _response_201 = response.json() + response_201: OsidbApiV1FlawsCvssScoresCreateResponse201 + if isinstance(_response_201, Unset): + response_201 = UNSET + else: + response_201 = OsidbApiV1FlawsCvssScoresCreateResponse201.from_dict( + _response_201 + ) + + return response_201 + return None + + +def _build_response( + *, response: requests.Response +) -> Response[OsidbApiV1FlawsCvssScoresCreateResponse201]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + flaw_id: str, + *, + client: AuthenticatedClient, + form_data: FlawCVSSPost, + multipart_data: FlawCVSSPost, + json_body: FlawCVSSPost, +) -> Response[OsidbApiV1FlawsCvssScoresCreateResponse201]: + kwargs = _get_kwargs( + flaw_id=flaw_id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ) + + response = requests.post( + verify=client.verify_ssl, + auth=client.auth, + timeout=client.timeout, + **kwargs, + ) + response.raise_for_status() + + return _build_response(response=response) + + +def sync( + flaw_id: str, + *, + client: AuthenticatedClient, + form_data: FlawCVSSPost, + multipart_data: FlawCVSSPost, + json_body: FlawCVSSPost, +) -> Optional[OsidbApiV1FlawsCvssScoresCreateResponse201]: + """ """ + + return sync_detailed( + flaw_id=flaw_id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ).parsed + + +async def async_detailed( + flaw_id: str, + *, + client: AuthenticatedClient, + form_data: FlawCVSSPost, + multipart_data: FlawCVSSPost, + json_body: FlawCVSSPost, +) -> Response[OsidbApiV1FlawsCvssScoresCreateResponse201]: + kwargs = _get_kwargs( + flaw_id=flaw_id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ) + + async with client.get_async_session().post( + verify_ssl=client.verify_ssl, raise_for_status=True, **kwargs + ) as response: + content = await response.read() + resp = requests.Response() + resp.status_code = response.status + resp._content = content + + return _build_response(response=resp) + + +async def async_( + flaw_id: str, + *, + client: AuthenticatedClient, + form_data: FlawCVSSPost, + multipart_data: FlawCVSSPost, + json_body: FlawCVSSPost, +) -> Optional[OsidbApiV1FlawsCvssScoresCreateResponse201]: + """ """ + + return ( + await async_detailed( + flaw_id=flaw_id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ) + ).parsed diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_cvss_scores_destroy.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_cvss_scores_destroy.py new file mode 100644 index 0000000..f60930c --- /dev/null +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_cvss_scores_destroy.py @@ -0,0 +1,137 @@ +from typing import Any, Dict, Optional + +import requests + +from ...client import AuthenticatedClient +from ...models.osidb_api_v1_flaws_cvss_scores_destroy_response_200 import ( + OsidbApiV1FlawsCvssScoresDestroyResponse200, +) +from ...types import UNSET, Response, Unset + +QUERY_PARAMS = {} + + +def _get_kwargs( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, +) -> Dict[str, Any]: + url = "{}/osidb/api/v1/flaws/{flaw_id}/cvss_scores/{id}".format( + client.base_url, + flaw_id=flaw_id, + id=id, + ) + + headers: Dict[str, Any] = client.get_headers() + + return { + "url": url, + "headers": headers, + } + + +def _parse_response( + *, response: requests.Response +) -> Optional[OsidbApiV1FlawsCvssScoresDestroyResponse200]: + if response.status_code == 200: + _response_200 = response.json() + response_200: OsidbApiV1FlawsCvssScoresDestroyResponse200 + if isinstance(_response_200, Unset): + response_200 = UNSET + else: + response_200 = OsidbApiV1FlawsCvssScoresDestroyResponse200.from_dict( + _response_200 + ) + + return response_200 + return None + + +def _build_response( + *, response: requests.Response +) -> Response[OsidbApiV1FlawsCvssScoresDestroyResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, +) -> Response[OsidbApiV1FlawsCvssScoresDestroyResponse200]: + kwargs = _get_kwargs( + flaw_id=flaw_id, + id=id, + client=client, + ) + + response = requests.delete( + verify=client.verify_ssl, + auth=client.auth, + timeout=client.timeout, + **kwargs, + ) + response.raise_for_status() + + return _build_response(response=response) + + +def sync( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, +) -> Optional[OsidbApiV1FlawsCvssScoresDestroyResponse200]: + """Destroy the instance and proxy the delete to Bugzilla""" + + return sync_detailed( + flaw_id=flaw_id, + id=id, + client=client, + ).parsed + + +async def async_detailed( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, +) -> Response[OsidbApiV1FlawsCvssScoresDestroyResponse200]: + kwargs = _get_kwargs( + flaw_id=flaw_id, + id=id, + client=client, + ) + + async with client.get_async_session().delete( + verify_ssl=client.verify_ssl, raise_for_status=True, **kwargs + ) as response: + content = await response.read() + resp = requests.Response() + resp.status_code = response.status + resp._content = content + + return _build_response(response=resp) + + +async def async_( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, +) -> Optional[OsidbApiV1FlawsCvssScoresDestroyResponse200]: + """Destroy the instance and proxy the delete to Bugzilla""" + + return ( + await async_detailed( + flaw_id=flaw_id, + id=id, + client=client, + ) + ).parsed diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_cvss_scores_list.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_cvss_scores_list.py new file mode 100644 index 0000000..7a584ba --- /dev/null +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_cvss_scores_list.py @@ -0,0 +1,516 @@ +import datetime +from typing import Any, Dict, List, Optional, Union + +import requests + +from ...client import AuthenticatedClient +from ...models.osidb_api_v1_flaws_cvss_scores_list_issuer import ( + OsidbApiV1FlawsCvssScoresListIssuer, +) +from ...models.osidb_api_v1_flaws_cvss_scores_list_response_200 import ( + OsidbApiV1FlawsCvssScoresListResponse200, +) +from ...types import UNSET, Response, Unset + +QUERY_PARAMS = { + "comment": str, + "created_dt": datetime.datetime, + "created_dt__date": datetime.date, + "created_dt__date__gte": datetime.date, + "created_dt__date__lte": datetime.date, + "created_dt__gt": datetime.datetime, + "created_dt__gte": datetime.datetime, + "created_dt__lt": datetime.datetime, + "created_dt__lte": datetime.datetime, + "cvss_version": str, + "exclude_fields": List[str], + "include_fields": List[str], + "issuer": OsidbApiV1FlawsCvssScoresListIssuer, + "limit": int, + "offset": int, + "score": float, + "updated_dt": datetime.datetime, + "updated_dt__date": datetime.date, + "updated_dt__date__gte": datetime.date, + "updated_dt__date__lte": datetime.date, + "updated_dt__gt": datetime.datetime, + "updated_dt__gte": datetime.datetime, + "updated_dt__lt": datetime.datetime, + "updated_dt__lte": datetime.datetime, + "uuid": str, + "vector": str, +} + + +def _get_kwargs( + flaw_id: str, + *, + client: AuthenticatedClient, + comment: Union[Unset, None, str] = UNSET, + created_dt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_date: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_version: Union[Unset, None, str] = UNSET, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, + issuer: Union[Unset, None, OsidbApiV1FlawsCvssScoresListIssuer] = UNSET, + limit: Union[Unset, None, int] = UNSET, + offset: Union[Unset, None, int] = UNSET, + score: Union[Unset, None, float] = UNSET, + updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + uuid: Union[Unset, None, str] = UNSET, + vector: Union[Unset, None, str] = UNSET, +) -> Dict[str, Any]: + url = "{}/osidb/api/v1/flaws/{flaw_id}/cvss_scores".format( + client.base_url, + flaw_id=flaw_id, + ) + + headers: Dict[str, Any] = client.get_headers() + + json_created_dt: Union[Unset, None, str] = UNSET + if not isinstance(created_dt, Unset): + json_created_dt = created_dt.isoformat() if created_dt else None + + json_created_dt_date: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_date, Unset): + json_created_dt_date = created_dt_date.isoformat() if created_dt_date else None + + json_created_dt_date_gte: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_date_gte, Unset): + json_created_dt_date_gte = ( + created_dt_date_gte.isoformat() if created_dt_date_gte else None + ) + + json_created_dt_date_lte: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_date_lte, Unset): + json_created_dt_date_lte = ( + created_dt_date_lte.isoformat() if created_dt_date_lte else None + ) + + json_created_dt_gt: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_gt, Unset): + json_created_dt_gt = created_dt_gt.isoformat() if created_dt_gt else None + + json_created_dt_gte: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_gte, Unset): + json_created_dt_gte = created_dt_gte.isoformat() if created_dt_gte else None + + json_created_dt_lt: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_lt, Unset): + json_created_dt_lt = created_dt_lt.isoformat() if created_dt_lt else None + + json_created_dt_lte: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_lte, Unset): + json_created_dt_lte = created_dt_lte.isoformat() if created_dt_lte else None + + json_exclude_fields: Union[Unset, None, List[str]] = UNSET + if not isinstance(exclude_fields, Unset): + if exclude_fields is None: + json_exclude_fields = None + else: + json_exclude_fields = exclude_fields + + json_include_fields: Union[Unset, None, List[str]] = UNSET + if not isinstance(include_fields, Unset): + if include_fields is None: + json_include_fields = None + else: + json_include_fields = include_fields + + json_issuer: Union[Unset, None, str] = UNSET + if not isinstance(issuer, Unset): + + json_issuer = ( + OsidbApiV1FlawsCvssScoresListIssuer(issuer).value if issuer else None + ) + + json_updated_dt: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt, Unset): + json_updated_dt = updated_dt.isoformat() if updated_dt else None + + json_updated_dt_date: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_date, Unset): + json_updated_dt_date = updated_dt_date.isoformat() if updated_dt_date else None + + json_updated_dt_date_gte: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_date_gte, Unset): + json_updated_dt_date_gte = ( + updated_dt_date_gte.isoformat() if updated_dt_date_gte else None + ) + + json_updated_dt_date_lte: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_date_lte, Unset): + json_updated_dt_date_lte = ( + updated_dt_date_lte.isoformat() if updated_dt_date_lte else None + ) + + json_updated_dt_gt: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_gt, Unset): + json_updated_dt_gt = updated_dt_gt.isoformat() if updated_dt_gt else None + + json_updated_dt_gte: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_gte, Unset): + json_updated_dt_gte = updated_dt_gte.isoformat() if updated_dt_gte else None + + json_updated_dt_lt: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_lt, Unset): + json_updated_dt_lt = updated_dt_lt.isoformat() if updated_dt_lt else None + + json_updated_dt_lte: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_lte, Unset): + json_updated_dt_lte = updated_dt_lte.isoformat() if updated_dt_lte else None + + params: Dict[str, Any] = { + "comment": comment, + "created_dt": json_created_dt, + "created_dt__date": json_created_dt_date, + "created_dt__date__gte": json_created_dt_date_gte, + "created_dt__date__lte": json_created_dt_date_lte, + "created_dt__gt": json_created_dt_gt, + "created_dt__gte": json_created_dt_gte, + "created_dt__lt": json_created_dt_lt, + "created_dt__lte": json_created_dt_lte, + "cvss_version": cvss_version, + "exclude_fields": json_exclude_fields, + "include_fields": json_include_fields, + "issuer": json_issuer, + "limit": limit, + "offset": offset, + "score": score, + "updated_dt": json_updated_dt, + "updated_dt__date": json_updated_dt_date, + "updated_dt__date__gte": json_updated_dt_date_gte, + "updated_dt__date__lte": json_updated_dt_date_lte, + "updated_dt__gt": json_updated_dt_gt, + "updated_dt__gte": json_updated_dt_gte, + "updated_dt__lt": json_updated_dt_lt, + "updated_dt__lte": json_updated_dt_lte, + "uuid": uuid, + "vector": vector, + } + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "url": url, + "headers": headers, + "params": params, + } + + +def _parse_response( + *, response: requests.Response +) -> Optional[OsidbApiV1FlawsCvssScoresListResponse200]: + if response.status_code == 200: + _response_200 = response.json() + response_200: OsidbApiV1FlawsCvssScoresListResponse200 + if isinstance(_response_200, Unset): + response_200 = UNSET + else: + response_200 = OsidbApiV1FlawsCvssScoresListResponse200.from_dict( + _response_200 + ) + + return response_200 + return None + + +def _build_response( + *, response: requests.Response +) -> Response[OsidbApiV1FlawsCvssScoresListResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + flaw_id: str, + *, + client: AuthenticatedClient, + comment: Union[Unset, None, str] = UNSET, + created_dt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_date: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_version: Union[Unset, None, str] = UNSET, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, + issuer: Union[Unset, None, OsidbApiV1FlawsCvssScoresListIssuer] = UNSET, + limit: Union[Unset, None, int] = UNSET, + offset: Union[Unset, None, int] = UNSET, + score: Union[Unset, None, float] = UNSET, + updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + uuid: Union[Unset, None, str] = UNSET, + vector: Union[Unset, None, str] = UNSET, +) -> Response[OsidbApiV1FlawsCvssScoresListResponse200]: + kwargs = _get_kwargs( + flaw_id=flaw_id, + client=client, + comment=comment, + created_dt=created_dt, + created_dt_date=created_dt_date, + created_dt_date_gte=created_dt_date_gte, + created_dt_date_lte=created_dt_date_lte, + created_dt_gt=created_dt_gt, + created_dt_gte=created_dt_gte, + created_dt_lt=created_dt_lt, + created_dt_lte=created_dt_lte, + cvss_version=cvss_version, + exclude_fields=exclude_fields, + include_fields=include_fields, + issuer=issuer, + limit=limit, + offset=offset, + score=score, + updated_dt=updated_dt, + updated_dt_date=updated_dt_date, + updated_dt_date_gte=updated_dt_date_gte, + updated_dt_date_lte=updated_dt_date_lte, + updated_dt_gt=updated_dt_gt, + updated_dt_gte=updated_dt_gte, + updated_dt_lt=updated_dt_lt, + updated_dt_lte=updated_dt_lte, + uuid=uuid, + vector=vector, + ) + + response = requests.get( + verify=client.verify_ssl, + auth=client.auth, + timeout=client.timeout, + **kwargs, + ) + response.raise_for_status() + + return _build_response(response=response) + + +def sync( + flaw_id: str, + *, + client: AuthenticatedClient, + comment: Union[Unset, None, str] = UNSET, + created_dt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_date: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_version: Union[Unset, None, str] = UNSET, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, + issuer: Union[Unset, None, OsidbApiV1FlawsCvssScoresListIssuer] = UNSET, + limit: Union[Unset, None, int] = UNSET, + offset: Union[Unset, None, int] = UNSET, + score: Union[Unset, None, float] = UNSET, + updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + uuid: Union[Unset, None, str] = UNSET, + vector: Union[Unset, None, str] = UNSET, +) -> Optional[OsidbApiV1FlawsCvssScoresListResponse200]: + """ """ + + return sync_detailed( + flaw_id=flaw_id, + client=client, + comment=comment, + created_dt=created_dt, + created_dt_date=created_dt_date, + created_dt_date_gte=created_dt_date_gte, + created_dt_date_lte=created_dt_date_lte, + created_dt_gt=created_dt_gt, + created_dt_gte=created_dt_gte, + created_dt_lt=created_dt_lt, + created_dt_lte=created_dt_lte, + cvss_version=cvss_version, + exclude_fields=exclude_fields, + include_fields=include_fields, + issuer=issuer, + limit=limit, + offset=offset, + score=score, + updated_dt=updated_dt, + updated_dt_date=updated_dt_date, + updated_dt_date_gte=updated_dt_date_gte, + updated_dt_date_lte=updated_dt_date_lte, + updated_dt_gt=updated_dt_gt, + updated_dt_gte=updated_dt_gte, + updated_dt_lt=updated_dt_lt, + updated_dt_lte=updated_dt_lte, + uuid=uuid, + vector=vector, + ).parsed + + +async def async_detailed( + flaw_id: str, + *, + client: AuthenticatedClient, + comment: Union[Unset, None, str] = UNSET, + created_dt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_date: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_version: Union[Unset, None, str] = UNSET, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, + issuer: Union[Unset, None, OsidbApiV1FlawsCvssScoresListIssuer] = UNSET, + limit: Union[Unset, None, int] = UNSET, + offset: Union[Unset, None, int] = UNSET, + score: Union[Unset, None, float] = UNSET, + updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + uuid: Union[Unset, None, str] = UNSET, + vector: Union[Unset, None, str] = UNSET, +) -> Response[OsidbApiV1FlawsCvssScoresListResponse200]: + kwargs = _get_kwargs( + flaw_id=flaw_id, + client=client, + comment=comment, + created_dt=created_dt, + created_dt_date=created_dt_date, + created_dt_date_gte=created_dt_date_gte, + created_dt_date_lte=created_dt_date_lte, + created_dt_gt=created_dt_gt, + created_dt_gte=created_dt_gte, + created_dt_lt=created_dt_lt, + created_dt_lte=created_dt_lte, + cvss_version=cvss_version, + exclude_fields=exclude_fields, + include_fields=include_fields, + issuer=issuer, + limit=limit, + offset=offset, + score=score, + updated_dt=updated_dt, + updated_dt_date=updated_dt_date, + updated_dt_date_gte=updated_dt_date_gte, + updated_dt_date_lte=updated_dt_date_lte, + updated_dt_gt=updated_dt_gt, + updated_dt_gte=updated_dt_gte, + updated_dt_lt=updated_dt_lt, + updated_dt_lte=updated_dt_lte, + uuid=uuid, + vector=vector, + ) + + async with client.get_async_session().get( + verify_ssl=client.verify_ssl, raise_for_status=True, **kwargs + ) as response: + content = await response.read() + resp = requests.Response() + resp.status_code = response.status + resp._content = content + + return _build_response(response=resp) + + +async def async_( + flaw_id: str, + *, + client: AuthenticatedClient, + comment: Union[Unset, None, str] = UNSET, + created_dt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_date: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_version: Union[Unset, None, str] = UNSET, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, + issuer: Union[Unset, None, OsidbApiV1FlawsCvssScoresListIssuer] = UNSET, + limit: Union[Unset, None, int] = UNSET, + offset: Union[Unset, None, int] = UNSET, + score: Union[Unset, None, float] = UNSET, + updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + uuid: Union[Unset, None, str] = UNSET, + vector: Union[Unset, None, str] = UNSET, +) -> Optional[OsidbApiV1FlawsCvssScoresListResponse200]: + """ """ + + return ( + await async_detailed( + flaw_id=flaw_id, + client=client, + comment=comment, + created_dt=created_dt, + created_dt_date=created_dt_date, + created_dt_date_gte=created_dt_date_gte, + created_dt_date_lte=created_dt_date_lte, + created_dt_gt=created_dt_gt, + created_dt_gte=created_dt_gte, + created_dt_lt=created_dt_lt, + created_dt_lte=created_dt_lte, + cvss_version=cvss_version, + exclude_fields=exclude_fields, + include_fields=include_fields, + issuer=issuer, + limit=limit, + offset=offset, + score=score, + updated_dt=updated_dt, + updated_dt_date=updated_dt_date, + updated_dt_date_gte=updated_dt_date_gte, + updated_dt_date_lte=updated_dt_date_lte, + updated_dt_gt=updated_dt_gt, + updated_dt_gte=updated_dt_gte, + updated_dt_lt=updated_dt_lt, + updated_dt_lte=updated_dt_lte, + uuid=uuid, + vector=vector, + ) + ).parsed diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_cvss_scores_retrieve.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_cvss_scores_retrieve.py new file mode 100644 index 0000000..d8311d3 --- /dev/null +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_cvss_scores_retrieve.py @@ -0,0 +1,179 @@ +from typing import Any, Dict, List, Optional, Union + +import requests + +from ...client import AuthenticatedClient +from ...models.osidb_api_v1_flaws_cvss_scores_retrieve_response_200 import ( + OsidbApiV1FlawsCvssScoresRetrieveResponse200, +) +from ...types import UNSET, Response, Unset + +QUERY_PARAMS = { + "exclude_fields": List[str], + "include_fields": List[str], +} + + +def _get_kwargs( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, +) -> Dict[str, Any]: + url = "{}/osidb/api/v1/flaws/{flaw_id}/cvss_scores/{id}".format( + client.base_url, + flaw_id=flaw_id, + id=id, + ) + + headers: Dict[str, Any] = client.get_headers() + + json_exclude_fields: Union[Unset, None, List[str]] = UNSET + if not isinstance(exclude_fields, Unset): + if exclude_fields is None: + json_exclude_fields = None + else: + json_exclude_fields = exclude_fields + + json_include_fields: Union[Unset, None, List[str]] = UNSET + if not isinstance(include_fields, Unset): + if include_fields is None: + json_include_fields = None + else: + json_include_fields = include_fields + + params: Dict[str, Any] = { + "exclude_fields": json_exclude_fields, + "include_fields": json_include_fields, + } + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "url": url, + "headers": headers, + "params": params, + } + + +def _parse_response( + *, response: requests.Response +) -> Optional[OsidbApiV1FlawsCvssScoresRetrieveResponse200]: + if response.status_code == 200: + _response_200 = response.json() + response_200: OsidbApiV1FlawsCvssScoresRetrieveResponse200 + if isinstance(_response_200, Unset): + response_200 = UNSET + else: + response_200 = OsidbApiV1FlawsCvssScoresRetrieveResponse200.from_dict( + _response_200 + ) + + return response_200 + return None + + +def _build_response( + *, response: requests.Response +) -> Response[OsidbApiV1FlawsCvssScoresRetrieveResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, +) -> Response[OsidbApiV1FlawsCvssScoresRetrieveResponse200]: + kwargs = _get_kwargs( + flaw_id=flaw_id, + id=id, + client=client, + exclude_fields=exclude_fields, + include_fields=include_fields, + ) + + response = requests.get( + verify=client.verify_ssl, + auth=client.auth, + timeout=client.timeout, + **kwargs, + ) + response.raise_for_status() + + return _build_response(response=response) + + +def sync( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, +) -> Optional[OsidbApiV1FlawsCvssScoresRetrieveResponse200]: + """ """ + + return sync_detailed( + flaw_id=flaw_id, + id=id, + client=client, + exclude_fields=exclude_fields, + include_fields=include_fields, + ).parsed + + +async def async_detailed( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, +) -> Response[OsidbApiV1FlawsCvssScoresRetrieveResponse200]: + kwargs = _get_kwargs( + flaw_id=flaw_id, + id=id, + client=client, + exclude_fields=exclude_fields, + include_fields=include_fields, + ) + + async with client.get_async_session().get( + verify_ssl=client.verify_ssl, raise_for_status=True, **kwargs + ) as response: + content = await response.read() + resp = requests.Response() + resp.status_code = response.status + resp._content = content + + return _build_response(response=resp) + + +async def async_( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, +) -> Optional[OsidbApiV1FlawsCvssScoresRetrieveResponse200]: + """ """ + + return ( + await async_detailed( + flaw_id=flaw_id, + id=id, + client=client, + exclude_fields=exclude_fields, + include_fields=include_fields, + ) + ).parsed diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_cvss_scores_update.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_cvss_scores_update.py new file mode 100644 index 0000000..0b8a8fd --- /dev/null +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_cvss_scores_update.py @@ -0,0 +1,175 @@ +from typing import Any, Dict, Optional + +import requests + +from ...client import AuthenticatedClient +from ...models.flaw_cvss_put import FlawCVSSPut +from ...models.osidb_api_v1_flaws_cvss_scores_update_response_200 import ( + OsidbApiV1FlawsCvssScoresUpdateResponse200, +) +from ...types import UNSET, Response, Unset + +QUERY_PARAMS = {} +REQUEST_BODY_TYPE = FlawCVSSPut + + +def _get_kwargs( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, + form_data: FlawCVSSPut, + multipart_data: FlawCVSSPut, + json_body: FlawCVSSPut, +) -> Dict[str, Any]: + url = "{}/osidb/api/v1/flaws/{flaw_id}/cvss_scores/{id}".format( + client.base_url, + flaw_id=flaw_id, + id=id, + ) + + headers: Dict[str, Any] = client.get_headers() + + json_json_body: Dict[str, Any] = UNSET + if not isinstance(json_body, Unset): + json_body.to_dict() + + multipart_multipart_data: Dict[str, Any] = UNSET + if not isinstance(multipart_data, Unset): + multipart_data.to_multipart() + + return { + "url": url, + "headers": headers, + "data": form_data.to_dict(), + } + + +def _parse_response( + *, response: requests.Response +) -> Optional[OsidbApiV1FlawsCvssScoresUpdateResponse200]: + if response.status_code == 200: + _response_200 = response.json() + response_200: OsidbApiV1FlawsCvssScoresUpdateResponse200 + if isinstance(_response_200, Unset): + response_200 = UNSET + else: + response_200 = OsidbApiV1FlawsCvssScoresUpdateResponse200.from_dict( + _response_200 + ) + + return response_200 + return None + + +def _build_response( + *, response: requests.Response +) -> Response[OsidbApiV1FlawsCvssScoresUpdateResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, + form_data: FlawCVSSPut, + multipart_data: FlawCVSSPut, + json_body: FlawCVSSPut, +) -> Response[OsidbApiV1FlawsCvssScoresUpdateResponse200]: + kwargs = _get_kwargs( + flaw_id=flaw_id, + id=id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ) + + response = requests.put( + verify=client.verify_ssl, + auth=client.auth, + timeout=client.timeout, + **kwargs, + ) + response.raise_for_status() + + return _build_response(response=response) + + +def sync( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, + form_data: FlawCVSSPut, + multipart_data: FlawCVSSPut, + json_body: FlawCVSSPut, +) -> Optional[OsidbApiV1FlawsCvssScoresUpdateResponse200]: + """ """ + + return sync_detailed( + flaw_id=flaw_id, + id=id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ).parsed + + +async def async_detailed( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, + form_data: FlawCVSSPut, + multipart_data: FlawCVSSPut, + json_body: FlawCVSSPut, +) -> Response[OsidbApiV1FlawsCvssScoresUpdateResponse200]: + kwargs = _get_kwargs( + flaw_id=flaw_id, + id=id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ) + + async with client.get_async_session().put( + verify_ssl=client.verify_ssl, raise_for_status=True, **kwargs + ) as response: + content = await response.read() + resp = requests.Response() + resp.status_code = response.status + resp._content = content + + return _build_response(response=resp) + + +async def async_( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, + form_data: FlawCVSSPut, + multipart_data: FlawCVSSPut, + json_body: FlawCVSSPut, +) -> Optional[OsidbApiV1FlawsCvssScoresUpdateResponse200]: + """ """ + + return ( + await async_detailed( + flaw_id=flaw_id, + id=id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ) + ).parsed diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_list.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_list.py index 80f3d31..c6e5ba7 100644 --- a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_list.py +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_list.py @@ -19,6 +19,9 @@ from ...models.osidb_api_v1_flaws_list_affects_type import ( OsidbApiV1FlawsListAffectsType, ) +from ...models.osidb_api_v1_flaws_list_cvss_scores_issuer import ( + OsidbApiV1FlawsListCvssScoresIssuer, +) from ...models.osidb_api_v1_flaws_list_impact import OsidbApiV1FlawsListImpact from ...models.osidb_api_v1_flaws_list_major_incident_state import ( OsidbApiV1FlawsListMajorIncidentState, @@ -27,6 +30,9 @@ OsidbApiV1FlawsListNistCvssValidation, ) from ...models.osidb_api_v1_flaws_list_order_item import OsidbApiV1FlawsListOrderItem +from ...models.osidb_api_v1_flaws_list_references_type import ( + OsidbApiV1FlawsListReferencesType, +) from ...models.osidb_api_v1_flaws_list_requires_summary import ( OsidbApiV1FlawsListRequiresSummary, ) @@ -94,6 +100,15 @@ "affects__trackers__created_dt__lte": datetime.datetime, "affects__trackers__embargoed": bool, "affects__trackers__errata__advisory_name": str, + "affects__trackers__errata__et_id": int, + "affects__trackers__errata__shipped_dt": datetime.datetime, + "affects__trackers__errata__shipped_dt__date": datetime.date, + "affects__trackers__errata__shipped_dt__date__gte": datetime.date, + "affects__trackers__errata__shipped_dt__date__lte": datetime.date, + "affects__trackers__errata__shipped_dt__gt": datetime.datetime, + "affects__trackers__errata__shipped_dt__gte": datetime.datetime, + "affects__trackers__errata__shipped_dt__lt": datetime.datetime, + "affects__trackers__errata__shipped_dt__lte": datetime.datetime, "affects__trackers__external_system_id": str, "affects__trackers__ps_update_stream": str, "affects__trackers__resolution": str, @@ -143,6 +158,28 @@ "cvss3_score__gte": float, "cvss3_score__lt": float, "cvss3_score__lte": float, + "cvss_scores__comment": str, + "cvss_scores__created_dt": datetime.datetime, + "cvss_scores__created_dt__date": datetime.date, + "cvss_scores__created_dt__date__gte": datetime.date, + "cvss_scores__created_dt__date__lte": datetime.date, + "cvss_scores__created_dt__gt": datetime.datetime, + "cvss_scores__created_dt__gte": datetime.datetime, + "cvss_scores__created_dt__lt": datetime.datetime, + "cvss_scores__created_dt__lte": datetime.datetime, + "cvss_scores__cvss_version": str, + "cvss_scores__issuer": OsidbApiV1FlawsListCvssScoresIssuer, + "cvss_scores__score": float, + "cvss_scores__updated_dt": datetime.datetime, + "cvss_scores__updated_dt__date": datetime.date, + "cvss_scores__updated_dt__date__gte": datetime.date, + "cvss_scores__updated_dt__date__lte": datetime.date, + "cvss_scores__updated_dt__gt": datetime.datetime, + "cvss_scores__updated_dt__gte": datetime.datetime, + "cvss_scores__updated_dt__lt": datetime.datetime, + "cvss_scores__updated_dt__lte": datetime.datetime, + "cvss_scores__uuid": str, + "cvss_scores__vector": str, "cwe_id": str, "description": str, "embargoed": bool, @@ -159,6 +196,26 @@ "nvd_cvss3": str, "offset": int, "order": List[OsidbApiV1FlawsListOrderItem], + "references__created_dt": datetime.datetime, + "references__created_dt__date": datetime.date, + "references__created_dt__date__gte": datetime.date, + "references__created_dt__date__lte": datetime.date, + "references__created_dt__gt": datetime.datetime, + "references__created_dt__gte": datetime.datetime, + "references__created_dt__lt": datetime.datetime, + "references__created_dt__lte": datetime.datetime, + "references__description": str, + "references__type": OsidbApiV1FlawsListReferencesType, + "references__updated_dt": datetime.datetime, + "references__updated_dt__date": datetime.date, + "references__updated_dt__date__gte": datetime.date, + "references__updated_dt__date__lte": datetime.date, + "references__updated_dt__gt": datetime.datetime, + "references__updated_dt__gte": datetime.datetime, + "references__updated_dt__lt": datetime.datetime, + "references__updated_dt__lte": datetime.datetime, + "references__url": str, + "references__uuid": str, "reported_dt": datetime.datetime, "reported_dt__date": datetime.date, "reported_dt__date__gte": datetime.date, @@ -251,6 +308,27 @@ def _get_kwargs( affects_trackers_created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, affects_trackers_embargoed: Union[Unset, None, bool] = UNSET, affects_trackers_errata_advisory_name: Union[Unset, None, str] = UNSET, + affects_trackers_errata_et_id: Union[Unset, None, int] = UNSET, + affects_trackers_errata_shipped_dt: Union[Unset, None, datetime.datetime] = UNSET, + affects_trackers_errata_shipped_dt_date: Union[Unset, None, datetime.date] = UNSET, + affects_trackers_errata_shipped_dt_date_gte: Union[ + Unset, None, datetime.date + ] = UNSET, + affects_trackers_errata_shipped_dt_date_lte: Union[ + Unset, None, datetime.date + ] = UNSET, + affects_trackers_errata_shipped_dt_gt: Union[ + Unset, None, datetime.datetime + ] = UNSET, + affects_trackers_errata_shipped_dt_gte: Union[ + Unset, None, datetime.datetime + ] = UNSET, + affects_trackers_errata_shipped_dt_lt: Union[ + Unset, None, datetime.datetime + ] = UNSET, + affects_trackers_errata_shipped_dt_lte: Union[ + Unset, None, datetime.datetime + ] = UNSET, affects_trackers_external_system_id: Union[Unset, None, str] = UNSET, affects_trackers_ps_update_stream: Union[Unset, None, str] = UNSET, affects_trackers_resolution: Union[Unset, None, str] = UNSET, @@ -302,6 +380,28 @@ def _get_kwargs( cvss3_score_gte: Union[Unset, None, float] = UNSET, cvss3_score_lt: Union[Unset, None, float] = UNSET, cvss3_score_lte: Union[Unset, None, float] = UNSET, + cvss_scores_comment: Union[Unset, None, str] = UNSET, + cvss_scores_created_dt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_date: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_cvss_version: Union[Unset, None, str] = UNSET, + cvss_scores_issuer: Union[Unset, None, OsidbApiV1FlawsListCvssScoresIssuer] = UNSET, + cvss_scores_score: Union[Unset, None, float] = UNSET, + cvss_scores_updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_uuid: Union[Unset, None, str] = UNSET, + cvss_scores_vector: Union[Unset, None, str] = UNSET, cwe_id: Union[Unset, None, str] = UNSET, description: Union[Unset, None, str] = UNSET, embargoed: Union[Unset, None, bool] = UNSET, @@ -322,6 +422,26 @@ def _get_kwargs( nvd_cvss3: Union[Unset, None, str] = UNSET, offset: Union[Unset, None, int] = UNSET, order: Union[Unset, None, List[OsidbApiV1FlawsListOrderItem]] = UNSET, + references_created_dt: Union[Unset, None, datetime.datetime] = UNSET, + references_created_dt_date: Union[Unset, None, datetime.date] = UNSET, + references_created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + references_created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + references_created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + references_created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + references_created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + references_created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + references_description: Union[Unset, None, str] = UNSET, + references_type: Union[Unset, None, OsidbApiV1FlawsListReferencesType] = UNSET, + references_updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + references_updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + references_updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + references_updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + references_updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + references_updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + references_updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + references_updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + references_url: Union[Unset, None, str] = UNSET, + references_uuid: Union[Unset, None, str] = UNSET, reported_dt: Union[Unset, None, datetime.datetime] = UNSET, reported_dt_date: Union[Unset, None, datetime.date] = UNSET, reported_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, @@ -626,6 +746,70 @@ def _get_kwargs( else None ) + json_affects_trackers_errata_shipped_dt: Union[Unset, None, str] = UNSET + if not isinstance(affects_trackers_errata_shipped_dt, Unset): + json_affects_trackers_errata_shipped_dt = ( + affects_trackers_errata_shipped_dt.isoformat() + if affects_trackers_errata_shipped_dt + else None + ) + + json_affects_trackers_errata_shipped_dt_date: Union[Unset, None, str] = UNSET + if not isinstance(affects_trackers_errata_shipped_dt_date, Unset): + json_affects_trackers_errata_shipped_dt_date = ( + affects_trackers_errata_shipped_dt_date.isoformat() + if affects_trackers_errata_shipped_dt_date + else None + ) + + json_affects_trackers_errata_shipped_dt_date_gte: Union[Unset, None, str] = UNSET + if not isinstance(affects_trackers_errata_shipped_dt_date_gte, Unset): + json_affects_trackers_errata_shipped_dt_date_gte = ( + affects_trackers_errata_shipped_dt_date_gte.isoformat() + if affects_trackers_errata_shipped_dt_date_gte + else None + ) + + json_affects_trackers_errata_shipped_dt_date_lte: Union[Unset, None, str] = UNSET + if not isinstance(affects_trackers_errata_shipped_dt_date_lte, Unset): + json_affects_trackers_errata_shipped_dt_date_lte = ( + affects_trackers_errata_shipped_dt_date_lte.isoformat() + if affects_trackers_errata_shipped_dt_date_lte + else None + ) + + json_affects_trackers_errata_shipped_dt_gt: Union[Unset, None, str] = UNSET + if not isinstance(affects_trackers_errata_shipped_dt_gt, Unset): + json_affects_trackers_errata_shipped_dt_gt = ( + affects_trackers_errata_shipped_dt_gt.isoformat() + if affects_trackers_errata_shipped_dt_gt + else None + ) + + json_affects_trackers_errata_shipped_dt_gte: Union[Unset, None, str] = UNSET + if not isinstance(affects_trackers_errata_shipped_dt_gte, Unset): + json_affects_trackers_errata_shipped_dt_gte = ( + affects_trackers_errata_shipped_dt_gte.isoformat() + if affects_trackers_errata_shipped_dt_gte + else None + ) + + json_affects_trackers_errata_shipped_dt_lt: Union[Unset, None, str] = UNSET + if not isinstance(affects_trackers_errata_shipped_dt_lt, Unset): + json_affects_trackers_errata_shipped_dt_lt = ( + affects_trackers_errata_shipped_dt_lt.isoformat() + if affects_trackers_errata_shipped_dt_lt + else None + ) + + json_affects_trackers_errata_shipped_dt_lte: Union[Unset, None, str] = UNSET + if not isinstance(affects_trackers_errata_shipped_dt_lte, Unset): + json_affects_trackers_errata_shipped_dt_lte = ( + affects_trackers_errata_shipped_dt_lte.isoformat() + if affects_trackers_errata_shipped_dt_lte + else None + ) + json_affects_trackers_type: Union[Unset, None, str] = UNSET if not isinstance(affects_trackers_type, Unset): @@ -809,6 +993,131 @@ def _get_kwargs( else: json_cve_id = cve_id + json_cvss_scores_created_dt: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_created_dt, Unset): + json_cvss_scores_created_dt = ( + cvss_scores_created_dt.isoformat() if cvss_scores_created_dt else None + ) + + json_cvss_scores_created_dt_date: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_created_dt_date, Unset): + json_cvss_scores_created_dt_date = ( + cvss_scores_created_dt_date.isoformat() + if cvss_scores_created_dt_date + else None + ) + + json_cvss_scores_created_dt_date_gte: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_created_dt_date_gte, Unset): + json_cvss_scores_created_dt_date_gte = ( + cvss_scores_created_dt_date_gte.isoformat() + if cvss_scores_created_dt_date_gte + else None + ) + + json_cvss_scores_created_dt_date_lte: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_created_dt_date_lte, Unset): + json_cvss_scores_created_dt_date_lte = ( + cvss_scores_created_dt_date_lte.isoformat() + if cvss_scores_created_dt_date_lte + else None + ) + + json_cvss_scores_created_dt_gt: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_created_dt_gt, Unset): + json_cvss_scores_created_dt_gt = ( + cvss_scores_created_dt_gt.isoformat() if cvss_scores_created_dt_gt else None + ) + + json_cvss_scores_created_dt_gte: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_created_dt_gte, Unset): + json_cvss_scores_created_dt_gte = ( + cvss_scores_created_dt_gte.isoformat() + if cvss_scores_created_dt_gte + else None + ) + + json_cvss_scores_created_dt_lt: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_created_dt_lt, Unset): + json_cvss_scores_created_dt_lt = ( + cvss_scores_created_dt_lt.isoformat() if cvss_scores_created_dt_lt else None + ) + + json_cvss_scores_created_dt_lte: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_created_dt_lte, Unset): + json_cvss_scores_created_dt_lte = ( + cvss_scores_created_dt_lte.isoformat() + if cvss_scores_created_dt_lte + else None + ) + + json_cvss_scores_issuer: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_issuer, Unset): + + json_cvss_scores_issuer = ( + OsidbApiV1FlawsListCvssScoresIssuer(cvss_scores_issuer).value + if cvss_scores_issuer + else None + ) + + json_cvss_scores_updated_dt: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_updated_dt, Unset): + json_cvss_scores_updated_dt = ( + cvss_scores_updated_dt.isoformat() if cvss_scores_updated_dt else None + ) + + json_cvss_scores_updated_dt_date: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_updated_dt_date, Unset): + json_cvss_scores_updated_dt_date = ( + cvss_scores_updated_dt_date.isoformat() + if cvss_scores_updated_dt_date + else None + ) + + json_cvss_scores_updated_dt_date_gte: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_updated_dt_date_gte, Unset): + json_cvss_scores_updated_dt_date_gte = ( + cvss_scores_updated_dt_date_gte.isoformat() + if cvss_scores_updated_dt_date_gte + else None + ) + + json_cvss_scores_updated_dt_date_lte: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_updated_dt_date_lte, Unset): + json_cvss_scores_updated_dt_date_lte = ( + cvss_scores_updated_dt_date_lte.isoformat() + if cvss_scores_updated_dt_date_lte + else None + ) + + json_cvss_scores_updated_dt_gt: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_updated_dt_gt, Unset): + json_cvss_scores_updated_dt_gt = ( + cvss_scores_updated_dt_gt.isoformat() if cvss_scores_updated_dt_gt else None + ) + + json_cvss_scores_updated_dt_gte: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_updated_dt_gte, Unset): + json_cvss_scores_updated_dt_gte = ( + cvss_scores_updated_dt_gte.isoformat() + if cvss_scores_updated_dt_gte + else None + ) + + json_cvss_scores_updated_dt_lt: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_updated_dt_lt, Unset): + json_cvss_scores_updated_dt_lt = ( + cvss_scores_updated_dt_lt.isoformat() if cvss_scores_updated_dt_lt else None + ) + + json_cvss_scores_updated_dt_lte: Union[Unset, None, str] = UNSET + if not isinstance(cvss_scores_updated_dt_lte, Unset): + json_cvss_scores_updated_dt_lte = ( + cvss_scores_updated_dt_lte.isoformat() + if cvss_scores_updated_dt_lte + else None + ) + json_exclude_fields: Union[Unset, None, List[str]] = UNSET if not isinstance(exclude_fields, Unset): if exclude_fields is None: @@ -874,6 +1183,123 @@ def _get_kwargs( json_order.append(order_item) + json_references_created_dt: Union[Unset, None, str] = UNSET + if not isinstance(references_created_dt, Unset): + json_references_created_dt = ( + references_created_dt.isoformat() if references_created_dt else None + ) + + json_references_created_dt_date: Union[Unset, None, str] = UNSET + if not isinstance(references_created_dt_date, Unset): + json_references_created_dt_date = ( + references_created_dt_date.isoformat() + if references_created_dt_date + else None + ) + + json_references_created_dt_date_gte: Union[Unset, None, str] = UNSET + if not isinstance(references_created_dt_date_gte, Unset): + json_references_created_dt_date_gte = ( + references_created_dt_date_gte.isoformat() + if references_created_dt_date_gte + else None + ) + + json_references_created_dt_date_lte: Union[Unset, None, str] = UNSET + if not isinstance(references_created_dt_date_lte, Unset): + json_references_created_dt_date_lte = ( + references_created_dt_date_lte.isoformat() + if references_created_dt_date_lte + else None + ) + + json_references_created_dt_gt: Union[Unset, None, str] = UNSET + if not isinstance(references_created_dt_gt, Unset): + json_references_created_dt_gt = ( + references_created_dt_gt.isoformat() if references_created_dt_gt else None + ) + + json_references_created_dt_gte: Union[Unset, None, str] = UNSET + if not isinstance(references_created_dt_gte, Unset): + json_references_created_dt_gte = ( + references_created_dt_gte.isoformat() if references_created_dt_gte else None + ) + + json_references_created_dt_lt: Union[Unset, None, str] = UNSET + if not isinstance(references_created_dt_lt, Unset): + json_references_created_dt_lt = ( + references_created_dt_lt.isoformat() if references_created_dt_lt else None + ) + + json_references_created_dt_lte: Union[Unset, None, str] = UNSET + if not isinstance(references_created_dt_lte, Unset): + json_references_created_dt_lte = ( + references_created_dt_lte.isoformat() if references_created_dt_lte else None + ) + + json_references_type: Union[Unset, None, str] = UNSET + if not isinstance(references_type, Unset): + + json_references_type = ( + OsidbApiV1FlawsListReferencesType(references_type).value + if references_type + else None + ) + + json_references_updated_dt: Union[Unset, None, str] = UNSET + if not isinstance(references_updated_dt, Unset): + json_references_updated_dt = ( + references_updated_dt.isoformat() if references_updated_dt else None + ) + + json_references_updated_dt_date: Union[Unset, None, str] = UNSET + if not isinstance(references_updated_dt_date, Unset): + json_references_updated_dt_date = ( + references_updated_dt_date.isoformat() + if references_updated_dt_date + else None + ) + + json_references_updated_dt_date_gte: Union[Unset, None, str] = UNSET + if not isinstance(references_updated_dt_date_gte, Unset): + json_references_updated_dt_date_gte = ( + references_updated_dt_date_gte.isoformat() + if references_updated_dt_date_gte + else None + ) + + json_references_updated_dt_date_lte: Union[Unset, None, str] = UNSET + if not isinstance(references_updated_dt_date_lte, Unset): + json_references_updated_dt_date_lte = ( + references_updated_dt_date_lte.isoformat() + if references_updated_dt_date_lte + else None + ) + + json_references_updated_dt_gt: Union[Unset, None, str] = UNSET + if not isinstance(references_updated_dt_gt, Unset): + json_references_updated_dt_gt = ( + references_updated_dt_gt.isoformat() if references_updated_dt_gt else None + ) + + json_references_updated_dt_gte: Union[Unset, None, str] = UNSET + if not isinstance(references_updated_dt_gte, Unset): + json_references_updated_dt_gte = ( + references_updated_dt_gte.isoformat() if references_updated_dt_gte else None + ) + + json_references_updated_dt_lt: Union[Unset, None, str] = UNSET + if not isinstance(references_updated_dt_lt, Unset): + json_references_updated_dt_lt = ( + references_updated_dt_lt.isoformat() if references_updated_dt_lt else None + ) + + json_references_updated_dt_lte: Union[Unset, None, str] = UNSET + if not isinstance(references_updated_dt_lte, Unset): + json_references_updated_dt_lte = ( + references_updated_dt_lte.isoformat() if references_updated_dt_lte else None + ) + json_reported_dt: Union[Unset, None, str] = UNSET if not isinstance(reported_dt, Unset): json_reported_dt = reported_dt.isoformat() if reported_dt else None @@ -1035,6 +1461,15 @@ def _get_kwargs( "affects__trackers__created_dt__lte": json_affects_trackers_created_dt_lte, "affects__trackers__embargoed": affects_trackers_embargoed, "affects__trackers__errata__advisory_name": affects_trackers_errata_advisory_name, + "affects__trackers__errata__et_id": affects_trackers_errata_et_id, + "affects__trackers__errata__shipped_dt": json_affects_trackers_errata_shipped_dt, + "affects__trackers__errata__shipped_dt__date": json_affects_trackers_errata_shipped_dt_date, + "affects__trackers__errata__shipped_dt__date__gte": json_affects_trackers_errata_shipped_dt_date_gte, + "affects__trackers__errata__shipped_dt__date__lte": json_affects_trackers_errata_shipped_dt_date_lte, + "affects__trackers__errata__shipped_dt__gt": json_affects_trackers_errata_shipped_dt_gt, + "affects__trackers__errata__shipped_dt__gte": json_affects_trackers_errata_shipped_dt_gte, + "affects__trackers__errata__shipped_dt__lt": json_affects_trackers_errata_shipped_dt_lt, + "affects__trackers__errata__shipped_dt__lte": json_affects_trackers_errata_shipped_dt_lte, "affects__trackers__external_system_id": affects_trackers_external_system_id, "affects__trackers__ps_update_stream": affects_trackers_ps_update_stream, "affects__trackers__resolution": affects_trackers_resolution, @@ -1084,6 +1519,28 @@ def _get_kwargs( "cvss3_score__gte": cvss3_score_gte, "cvss3_score__lt": cvss3_score_lt, "cvss3_score__lte": cvss3_score_lte, + "cvss_scores__comment": cvss_scores_comment, + "cvss_scores__created_dt": json_cvss_scores_created_dt, + "cvss_scores__created_dt__date": json_cvss_scores_created_dt_date, + "cvss_scores__created_dt__date__gte": json_cvss_scores_created_dt_date_gte, + "cvss_scores__created_dt__date__lte": json_cvss_scores_created_dt_date_lte, + "cvss_scores__created_dt__gt": json_cvss_scores_created_dt_gt, + "cvss_scores__created_dt__gte": json_cvss_scores_created_dt_gte, + "cvss_scores__created_dt__lt": json_cvss_scores_created_dt_lt, + "cvss_scores__created_dt__lte": json_cvss_scores_created_dt_lte, + "cvss_scores__cvss_version": cvss_scores_cvss_version, + "cvss_scores__issuer": json_cvss_scores_issuer, + "cvss_scores__score": cvss_scores_score, + "cvss_scores__updated_dt": json_cvss_scores_updated_dt, + "cvss_scores__updated_dt__date": json_cvss_scores_updated_dt_date, + "cvss_scores__updated_dt__date__gte": json_cvss_scores_updated_dt_date_gte, + "cvss_scores__updated_dt__date__lte": json_cvss_scores_updated_dt_date_lte, + "cvss_scores__updated_dt__gt": json_cvss_scores_updated_dt_gt, + "cvss_scores__updated_dt__gte": json_cvss_scores_updated_dt_gte, + "cvss_scores__updated_dt__lt": json_cvss_scores_updated_dt_lt, + "cvss_scores__updated_dt__lte": json_cvss_scores_updated_dt_lte, + "cvss_scores__uuid": cvss_scores_uuid, + "cvss_scores__vector": cvss_scores_vector, "cwe_id": cwe_id, "description": description, "embargoed": embargoed, @@ -1100,6 +1557,26 @@ def _get_kwargs( "nvd_cvss3": nvd_cvss3, "offset": offset, "order": json_order, + "references__created_dt": json_references_created_dt, + "references__created_dt__date": json_references_created_dt_date, + "references__created_dt__date__gte": json_references_created_dt_date_gte, + "references__created_dt__date__lte": json_references_created_dt_date_lte, + "references__created_dt__gt": json_references_created_dt_gt, + "references__created_dt__gte": json_references_created_dt_gte, + "references__created_dt__lt": json_references_created_dt_lt, + "references__created_dt__lte": json_references_created_dt_lte, + "references__description": references_description, + "references__type": json_references_type, + "references__updated_dt": json_references_updated_dt, + "references__updated_dt__date": json_references_updated_dt_date, + "references__updated_dt__date__gte": json_references_updated_dt_date_gte, + "references__updated_dt__date__lte": json_references_updated_dt_date_lte, + "references__updated_dt__gt": json_references_updated_dt_gt, + "references__updated_dt__gte": json_references_updated_dt_gte, + "references__updated_dt__lt": json_references_updated_dt_lt, + "references__updated_dt__lte": json_references_updated_dt_lte, + "references__url": references_url, + "references__uuid": references_uuid, "reported_dt": json_reported_dt, "reported_dt__date": json_reported_dt_date, "reported_dt__date__gte": json_reported_dt_date_gte, @@ -1225,6 +1702,27 @@ def sync_detailed( affects_trackers_created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, affects_trackers_embargoed: Union[Unset, None, bool] = UNSET, affects_trackers_errata_advisory_name: Union[Unset, None, str] = UNSET, + affects_trackers_errata_et_id: Union[Unset, None, int] = UNSET, + affects_trackers_errata_shipped_dt: Union[Unset, None, datetime.datetime] = UNSET, + affects_trackers_errata_shipped_dt_date: Union[Unset, None, datetime.date] = UNSET, + affects_trackers_errata_shipped_dt_date_gte: Union[ + Unset, None, datetime.date + ] = UNSET, + affects_trackers_errata_shipped_dt_date_lte: Union[ + Unset, None, datetime.date + ] = UNSET, + affects_trackers_errata_shipped_dt_gt: Union[ + Unset, None, datetime.datetime + ] = UNSET, + affects_trackers_errata_shipped_dt_gte: Union[ + Unset, None, datetime.datetime + ] = UNSET, + affects_trackers_errata_shipped_dt_lt: Union[ + Unset, None, datetime.datetime + ] = UNSET, + affects_trackers_errata_shipped_dt_lte: Union[ + Unset, None, datetime.datetime + ] = UNSET, affects_trackers_external_system_id: Union[Unset, None, str] = UNSET, affects_trackers_ps_update_stream: Union[Unset, None, str] = UNSET, affects_trackers_resolution: Union[Unset, None, str] = UNSET, @@ -1276,6 +1774,28 @@ def sync_detailed( cvss3_score_gte: Union[Unset, None, float] = UNSET, cvss3_score_lt: Union[Unset, None, float] = UNSET, cvss3_score_lte: Union[Unset, None, float] = UNSET, + cvss_scores_comment: Union[Unset, None, str] = UNSET, + cvss_scores_created_dt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_date: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_cvss_version: Union[Unset, None, str] = UNSET, + cvss_scores_issuer: Union[Unset, None, OsidbApiV1FlawsListCvssScoresIssuer] = UNSET, + cvss_scores_score: Union[Unset, None, float] = UNSET, + cvss_scores_updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_uuid: Union[Unset, None, str] = UNSET, + cvss_scores_vector: Union[Unset, None, str] = UNSET, cwe_id: Union[Unset, None, str] = UNSET, description: Union[Unset, None, str] = UNSET, embargoed: Union[Unset, None, bool] = UNSET, @@ -1296,6 +1816,26 @@ def sync_detailed( nvd_cvss3: Union[Unset, None, str] = UNSET, offset: Union[Unset, None, int] = UNSET, order: Union[Unset, None, List[OsidbApiV1FlawsListOrderItem]] = UNSET, + references_created_dt: Union[Unset, None, datetime.datetime] = UNSET, + references_created_dt_date: Union[Unset, None, datetime.date] = UNSET, + references_created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + references_created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + references_created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + references_created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + references_created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + references_created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + references_description: Union[Unset, None, str] = UNSET, + references_type: Union[Unset, None, OsidbApiV1FlawsListReferencesType] = UNSET, + references_updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + references_updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + references_updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + references_updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + references_updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + references_updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + references_updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + references_updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + references_url: Union[Unset, None, str] = UNSET, + references_uuid: Union[Unset, None, str] = UNSET, reported_dt: Union[Unset, None, datetime.datetime] = UNSET, reported_dt_date: Union[Unset, None, datetime.date] = UNSET, reported_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, @@ -1381,6 +1921,15 @@ def sync_detailed( affects_trackers_created_dt_lte=affects_trackers_created_dt_lte, affects_trackers_embargoed=affects_trackers_embargoed, affects_trackers_errata_advisory_name=affects_trackers_errata_advisory_name, + affects_trackers_errata_et_id=affects_trackers_errata_et_id, + affects_trackers_errata_shipped_dt=affects_trackers_errata_shipped_dt, + affects_trackers_errata_shipped_dt_date=affects_trackers_errata_shipped_dt_date, + affects_trackers_errata_shipped_dt_date_gte=affects_trackers_errata_shipped_dt_date_gte, + affects_trackers_errata_shipped_dt_date_lte=affects_trackers_errata_shipped_dt_date_lte, + affects_trackers_errata_shipped_dt_gt=affects_trackers_errata_shipped_dt_gt, + affects_trackers_errata_shipped_dt_gte=affects_trackers_errata_shipped_dt_gte, + affects_trackers_errata_shipped_dt_lt=affects_trackers_errata_shipped_dt_lt, + affects_trackers_errata_shipped_dt_lte=affects_trackers_errata_shipped_dt_lte, affects_trackers_external_system_id=affects_trackers_external_system_id, affects_trackers_ps_update_stream=affects_trackers_ps_update_stream, affects_trackers_resolution=affects_trackers_resolution, @@ -1430,6 +1979,28 @@ def sync_detailed( cvss3_score_gte=cvss3_score_gte, cvss3_score_lt=cvss3_score_lt, cvss3_score_lte=cvss3_score_lte, + cvss_scores_comment=cvss_scores_comment, + cvss_scores_created_dt=cvss_scores_created_dt, + cvss_scores_created_dt_date=cvss_scores_created_dt_date, + cvss_scores_created_dt_date_gte=cvss_scores_created_dt_date_gte, + cvss_scores_created_dt_date_lte=cvss_scores_created_dt_date_lte, + cvss_scores_created_dt_gt=cvss_scores_created_dt_gt, + cvss_scores_created_dt_gte=cvss_scores_created_dt_gte, + cvss_scores_created_dt_lt=cvss_scores_created_dt_lt, + cvss_scores_created_dt_lte=cvss_scores_created_dt_lte, + cvss_scores_cvss_version=cvss_scores_cvss_version, + cvss_scores_issuer=cvss_scores_issuer, + cvss_scores_score=cvss_scores_score, + cvss_scores_updated_dt=cvss_scores_updated_dt, + cvss_scores_updated_dt_date=cvss_scores_updated_dt_date, + cvss_scores_updated_dt_date_gte=cvss_scores_updated_dt_date_gte, + cvss_scores_updated_dt_date_lte=cvss_scores_updated_dt_date_lte, + cvss_scores_updated_dt_gt=cvss_scores_updated_dt_gt, + cvss_scores_updated_dt_gte=cvss_scores_updated_dt_gte, + cvss_scores_updated_dt_lt=cvss_scores_updated_dt_lt, + cvss_scores_updated_dt_lte=cvss_scores_updated_dt_lte, + cvss_scores_uuid=cvss_scores_uuid, + cvss_scores_vector=cvss_scores_vector, cwe_id=cwe_id, description=description, embargoed=embargoed, @@ -1446,6 +2017,26 @@ def sync_detailed( nvd_cvss3=nvd_cvss3, offset=offset, order=order, + references_created_dt=references_created_dt, + references_created_dt_date=references_created_dt_date, + references_created_dt_date_gte=references_created_dt_date_gte, + references_created_dt_date_lte=references_created_dt_date_lte, + references_created_dt_gt=references_created_dt_gt, + references_created_dt_gte=references_created_dt_gte, + references_created_dt_lt=references_created_dt_lt, + references_created_dt_lte=references_created_dt_lte, + references_description=references_description, + references_type=references_type, + references_updated_dt=references_updated_dt, + references_updated_dt_date=references_updated_dt_date, + references_updated_dt_date_gte=references_updated_dt_date_gte, + references_updated_dt_date_lte=references_updated_dt_date_lte, + references_updated_dt_gt=references_updated_dt_gt, + references_updated_dt_gte=references_updated_dt_gte, + references_updated_dt_lt=references_updated_dt_lt, + references_updated_dt_lte=references_updated_dt_lte, + references_url=references_url, + references_uuid=references_uuid, reported_dt=reported_dt, reported_dt_date=reported_dt_date, reported_dt_date_gte=reported_dt_date_gte, @@ -1548,6 +2139,27 @@ def sync( affects_trackers_created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, affects_trackers_embargoed: Union[Unset, None, bool] = UNSET, affects_trackers_errata_advisory_name: Union[Unset, None, str] = UNSET, + affects_trackers_errata_et_id: Union[Unset, None, int] = UNSET, + affects_trackers_errata_shipped_dt: Union[Unset, None, datetime.datetime] = UNSET, + affects_trackers_errata_shipped_dt_date: Union[Unset, None, datetime.date] = UNSET, + affects_trackers_errata_shipped_dt_date_gte: Union[ + Unset, None, datetime.date + ] = UNSET, + affects_trackers_errata_shipped_dt_date_lte: Union[ + Unset, None, datetime.date + ] = UNSET, + affects_trackers_errata_shipped_dt_gt: Union[ + Unset, None, datetime.datetime + ] = UNSET, + affects_trackers_errata_shipped_dt_gte: Union[ + Unset, None, datetime.datetime + ] = UNSET, + affects_trackers_errata_shipped_dt_lt: Union[ + Unset, None, datetime.datetime + ] = UNSET, + affects_trackers_errata_shipped_dt_lte: Union[ + Unset, None, datetime.datetime + ] = UNSET, affects_trackers_external_system_id: Union[Unset, None, str] = UNSET, affects_trackers_ps_update_stream: Union[Unset, None, str] = UNSET, affects_trackers_resolution: Union[Unset, None, str] = UNSET, @@ -1599,6 +2211,28 @@ def sync( cvss3_score_gte: Union[Unset, None, float] = UNSET, cvss3_score_lt: Union[Unset, None, float] = UNSET, cvss3_score_lte: Union[Unset, None, float] = UNSET, + cvss_scores_comment: Union[Unset, None, str] = UNSET, + cvss_scores_created_dt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_date: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_cvss_version: Union[Unset, None, str] = UNSET, + cvss_scores_issuer: Union[Unset, None, OsidbApiV1FlawsListCvssScoresIssuer] = UNSET, + cvss_scores_score: Union[Unset, None, float] = UNSET, + cvss_scores_updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_uuid: Union[Unset, None, str] = UNSET, + cvss_scores_vector: Union[Unset, None, str] = UNSET, cwe_id: Union[Unset, None, str] = UNSET, description: Union[Unset, None, str] = UNSET, embargoed: Union[Unset, None, bool] = UNSET, @@ -1619,6 +2253,26 @@ def sync( nvd_cvss3: Union[Unset, None, str] = UNSET, offset: Union[Unset, None, int] = UNSET, order: Union[Unset, None, List[OsidbApiV1FlawsListOrderItem]] = UNSET, + references_created_dt: Union[Unset, None, datetime.datetime] = UNSET, + references_created_dt_date: Union[Unset, None, datetime.date] = UNSET, + references_created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + references_created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + references_created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + references_created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + references_created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + references_created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + references_description: Union[Unset, None, str] = UNSET, + references_type: Union[Unset, None, OsidbApiV1FlawsListReferencesType] = UNSET, + references_updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + references_updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + references_updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + references_updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + references_updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + references_updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + references_updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + references_updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + references_url: Union[Unset, None, str] = UNSET, + references_uuid: Union[Unset, None, str] = UNSET, reported_dt: Union[Unset, None, datetime.datetime] = UNSET, reported_dt_date: Union[Unset, None, datetime.date] = UNSET, reported_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, @@ -1706,6 +2360,15 @@ def sync( affects_trackers_created_dt_lte=affects_trackers_created_dt_lte, affects_trackers_embargoed=affects_trackers_embargoed, affects_trackers_errata_advisory_name=affects_trackers_errata_advisory_name, + affects_trackers_errata_et_id=affects_trackers_errata_et_id, + affects_trackers_errata_shipped_dt=affects_trackers_errata_shipped_dt, + affects_trackers_errata_shipped_dt_date=affects_trackers_errata_shipped_dt_date, + affects_trackers_errata_shipped_dt_date_gte=affects_trackers_errata_shipped_dt_date_gte, + affects_trackers_errata_shipped_dt_date_lte=affects_trackers_errata_shipped_dt_date_lte, + affects_trackers_errata_shipped_dt_gt=affects_trackers_errata_shipped_dt_gt, + affects_trackers_errata_shipped_dt_gte=affects_trackers_errata_shipped_dt_gte, + affects_trackers_errata_shipped_dt_lt=affects_trackers_errata_shipped_dt_lt, + affects_trackers_errata_shipped_dt_lte=affects_trackers_errata_shipped_dt_lte, affects_trackers_external_system_id=affects_trackers_external_system_id, affects_trackers_ps_update_stream=affects_trackers_ps_update_stream, affects_trackers_resolution=affects_trackers_resolution, @@ -1755,6 +2418,28 @@ def sync( cvss3_score_gte=cvss3_score_gte, cvss3_score_lt=cvss3_score_lt, cvss3_score_lte=cvss3_score_lte, + cvss_scores_comment=cvss_scores_comment, + cvss_scores_created_dt=cvss_scores_created_dt, + cvss_scores_created_dt_date=cvss_scores_created_dt_date, + cvss_scores_created_dt_date_gte=cvss_scores_created_dt_date_gte, + cvss_scores_created_dt_date_lte=cvss_scores_created_dt_date_lte, + cvss_scores_created_dt_gt=cvss_scores_created_dt_gt, + cvss_scores_created_dt_gte=cvss_scores_created_dt_gte, + cvss_scores_created_dt_lt=cvss_scores_created_dt_lt, + cvss_scores_created_dt_lte=cvss_scores_created_dt_lte, + cvss_scores_cvss_version=cvss_scores_cvss_version, + cvss_scores_issuer=cvss_scores_issuer, + cvss_scores_score=cvss_scores_score, + cvss_scores_updated_dt=cvss_scores_updated_dt, + cvss_scores_updated_dt_date=cvss_scores_updated_dt_date, + cvss_scores_updated_dt_date_gte=cvss_scores_updated_dt_date_gte, + cvss_scores_updated_dt_date_lte=cvss_scores_updated_dt_date_lte, + cvss_scores_updated_dt_gt=cvss_scores_updated_dt_gt, + cvss_scores_updated_dt_gte=cvss_scores_updated_dt_gte, + cvss_scores_updated_dt_lt=cvss_scores_updated_dt_lt, + cvss_scores_updated_dt_lte=cvss_scores_updated_dt_lte, + cvss_scores_uuid=cvss_scores_uuid, + cvss_scores_vector=cvss_scores_vector, cwe_id=cwe_id, description=description, embargoed=embargoed, @@ -1771,6 +2456,26 @@ def sync( nvd_cvss3=nvd_cvss3, offset=offset, order=order, + references_created_dt=references_created_dt, + references_created_dt_date=references_created_dt_date, + references_created_dt_date_gte=references_created_dt_date_gte, + references_created_dt_date_lte=references_created_dt_date_lte, + references_created_dt_gt=references_created_dt_gt, + references_created_dt_gte=references_created_dt_gte, + references_created_dt_lt=references_created_dt_lt, + references_created_dt_lte=references_created_dt_lte, + references_description=references_description, + references_type=references_type, + references_updated_dt=references_updated_dt, + references_updated_dt_date=references_updated_dt_date, + references_updated_dt_date_gte=references_updated_dt_date_gte, + references_updated_dt_date_lte=references_updated_dt_date_lte, + references_updated_dt_gt=references_updated_dt_gt, + references_updated_dt_gte=references_updated_dt_gte, + references_updated_dt_lt=references_updated_dt_lt, + references_updated_dt_lte=references_updated_dt_lte, + references_url=references_url, + references_uuid=references_uuid, reported_dt=reported_dt, reported_dt_date=reported_dt_date, reported_dt_date_gte=reported_dt_date_gte, @@ -1863,6 +2568,27 @@ async def async_detailed( affects_trackers_created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, affects_trackers_embargoed: Union[Unset, None, bool] = UNSET, affects_trackers_errata_advisory_name: Union[Unset, None, str] = UNSET, + affects_trackers_errata_et_id: Union[Unset, None, int] = UNSET, + affects_trackers_errata_shipped_dt: Union[Unset, None, datetime.datetime] = UNSET, + affects_trackers_errata_shipped_dt_date: Union[Unset, None, datetime.date] = UNSET, + affects_trackers_errata_shipped_dt_date_gte: Union[ + Unset, None, datetime.date + ] = UNSET, + affects_trackers_errata_shipped_dt_date_lte: Union[ + Unset, None, datetime.date + ] = UNSET, + affects_trackers_errata_shipped_dt_gt: Union[ + Unset, None, datetime.datetime + ] = UNSET, + affects_trackers_errata_shipped_dt_gte: Union[ + Unset, None, datetime.datetime + ] = UNSET, + affects_trackers_errata_shipped_dt_lt: Union[ + Unset, None, datetime.datetime + ] = UNSET, + affects_trackers_errata_shipped_dt_lte: Union[ + Unset, None, datetime.datetime + ] = UNSET, affects_trackers_external_system_id: Union[Unset, None, str] = UNSET, affects_trackers_ps_update_stream: Union[Unset, None, str] = UNSET, affects_trackers_resolution: Union[Unset, None, str] = UNSET, @@ -1914,6 +2640,28 @@ async def async_detailed( cvss3_score_gte: Union[Unset, None, float] = UNSET, cvss3_score_lt: Union[Unset, None, float] = UNSET, cvss3_score_lte: Union[Unset, None, float] = UNSET, + cvss_scores_comment: Union[Unset, None, str] = UNSET, + cvss_scores_created_dt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_date: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_cvss_version: Union[Unset, None, str] = UNSET, + cvss_scores_issuer: Union[Unset, None, OsidbApiV1FlawsListCvssScoresIssuer] = UNSET, + cvss_scores_score: Union[Unset, None, float] = UNSET, + cvss_scores_updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_uuid: Union[Unset, None, str] = UNSET, + cvss_scores_vector: Union[Unset, None, str] = UNSET, cwe_id: Union[Unset, None, str] = UNSET, description: Union[Unset, None, str] = UNSET, embargoed: Union[Unset, None, bool] = UNSET, @@ -1934,6 +2682,26 @@ async def async_detailed( nvd_cvss3: Union[Unset, None, str] = UNSET, offset: Union[Unset, None, int] = UNSET, order: Union[Unset, None, List[OsidbApiV1FlawsListOrderItem]] = UNSET, + references_created_dt: Union[Unset, None, datetime.datetime] = UNSET, + references_created_dt_date: Union[Unset, None, datetime.date] = UNSET, + references_created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + references_created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + references_created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + references_created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + references_created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + references_created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + references_description: Union[Unset, None, str] = UNSET, + references_type: Union[Unset, None, OsidbApiV1FlawsListReferencesType] = UNSET, + references_updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + references_updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + references_updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + references_updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + references_updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + references_updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + references_updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + references_updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + references_url: Union[Unset, None, str] = UNSET, + references_uuid: Union[Unset, None, str] = UNSET, reported_dt: Union[Unset, None, datetime.datetime] = UNSET, reported_dt_date: Union[Unset, None, datetime.date] = UNSET, reported_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, @@ -2019,6 +2787,15 @@ async def async_detailed( affects_trackers_created_dt_lte=affects_trackers_created_dt_lte, affects_trackers_embargoed=affects_trackers_embargoed, affects_trackers_errata_advisory_name=affects_trackers_errata_advisory_name, + affects_trackers_errata_et_id=affects_trackers_errata_et_id, + affects_trackers_errata_shipped_dt=affects_trackers_errata_shipped_dt, + affects_trackers_errata_shipped_dt_date=affects_trackers_errata_shipped_dt_date, + affects_trackers_errata_shipped_dt_date_gte=affects_trackers_errata_shipped_dt_date_gte, + affects_trackers_errata_shipped_dt_date_lte=affects_trackers_errata_shipped_dt_date_lte, + affects_trackers_errata_shipped_dt_gt=affects_trackers_errata_shipped_dt_gt, + affects_trackers_errata_shipped_dt_gte=affects_trackers_errata_shipped_dt_gte, + affects_trackers_errata_shipped_dt_lt=affects_trackers_errata_shipped_dt_lt, + affects_trackers_errata_shipped_dt_lte=affects_trackers_errata_shipped_dt_lte, affects_trackers_external_system_id=affects_trackers_external_system_id, affects_trackers_ps_update_stream=affects_trackers_ps_update_stream, affects_trackers_resolution=affects_trackers_resolution, @@ -2068,6 +2845,28 @@ async def async_detailed( cvss3_score_gte=cvss3_score_gte, cvss3_score_lt=cvss3_score_lt, cvss3_score_lte=cvss3_score_lte, + cvss_scores_comment=cvss_scores_comment, + cvss_scores_created_dt=cvss_scores_created_dt, + cvss_scores_created_dt_date=cvss_scores_created_dt_date, + cvss_scores_created_dt_date_gte=cvss_scores_created_dt_date_gte, + cvss_scores_created_dt_date_lte=cvss_scores_created_dt_date_lte, + cvss_scores_created_dt_gt=cvss_scores_created_dt_gt, + cvss_scores_created_dt_gte=cvss_scores_created_dt_gte, + cvss_scores_created_dt_lt=cvss_scores_created_dt_lt, + cvss_scores_created_dt_lte=cvss_scores_created_dt_lte, + cvss_scores_cvss_version=cvss_scores_cvss_version, + cvss_scores_issuer=cvss_scores_issuer, + cvss_scores_score=cvss_scores_score, + cvss_scores_updated_dt=cvss_scores_updated_dt, + cvss_scores_updated_dt_date=cvss_scores_updated_dt_date, + cvss_scores_updated_dt_date_gte=cvss_scores_updated_dt_date_gte, + cvss_scores_updated_dt_date_lte=cvss_scores_updated_dt_date_lte, + cvss_scores_updated_dt_gt=cvss_scores_updated_dt_gt, + cvss_scores_updated_dt_gte=cvss_scores_updated_dt_gte, + cvss_scores_updated_dt_lt=cvss_scores_updated_dt_lt, + cvss_scores_updated_dt_lte=cvss_scores_updated_dt_lte, + cvss_scores_uuid=cvss_scores_uuid, + cvss_scores_vector=cvss_scores_vector, cwe_id=cwe_id, description=description, embargoed=embargoed, @@ -2084,6 +2883,26 @@ async def async_detailed( nvd_cvss3=nvd_cvss3, offset=offset, order=order, + references_created_dt=references_created_dt, + references_created_dt_date=references_created_dt_date, + references_created_dt_date_gte=references_created_dt_date_gte, + references_created_dt_date_lte=references_created_dt_date_lte, + references_created_dt_gt=references_created_dt_gt, + references_created_dt_gte=references_created_dt_gte, + references_created_dt_lt=references_created_dt_lt, + references_created_dt_lte=references_created_dt_lte, + references_description=references_description, + references_type=references_type, + references_updated_dt=references_updated_dt, + references_updated_dt_date=references_updated_dt_date, + references_updated_dt_date_gte=references_updated_dt_date_gte, + references_updated_dt_date_lte=references_updated_dt_date_lte, + references_updated_dt_gt=references_updated_dt_gt, + references_updated_dt_gte=references_updated_dt_gte, + references_updated_dt_lt=references_updated_dt_lt, + references_updated_dt_lte=references_updated_dt_lte, + references_url=references_url, + references_uuid=references_uuid, reported_dt=reported_dt, reported_dt_date=reported_dt_date, reported_dt_date_gte=reported_dt_date_gte, @@ -2186,6 +3005,27 @@ async def async_( affects_trackers_created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, affects_trackers_embargoed: Union[Unset, None, bool] = UNSET, affects_trackers_errata_advisory_name: Union[Unset, None, str] = UNSET, + affects_trackers_errata_et_id: Union[Unset, None, int] = UNSET, + affects_trackers_errata_shipped_dt: Union[Unset, None, datetime.datetime] = UNSET, + affects_trackers_errata_shipped_dt_date: Union[Unset, None, datetime.date] = UNSET, + affects_trackers_errata_shipped_dt_date_gte: Union[ + Unset, None, datetime.date + ] = UNSET, + affects_trackers_errata_shipped_dt_date_lte: Union[ + Unset, None, datetime.date + ] = UNSET, + affects_trackers_errata_shipped_dt_gt: Union[ + Unset, None, datetime.datetime + ] = UNSET, + affects_trackers_errata_shipped_dt_gte: Union[ + Unset, None, datetime.datetime + ] = UNSET, + affects_trackers_errata_shipped_dt_lt: Union[ + Unset, None, datetime.datetime + ] = UNSET, + affects_trackers_errata_shipped_dt_lte: Union[ + Unset, None, datetime.datetime + ] = UNSET, affects_trackers_external_system_id: Union[Unset, None, str] = UNSET, affects_trackers_ps_update_stream: Union[Unset, None, str] = UNSET, affects_trackers_resolution: Union[Unset, None, str] = UNSET, @@ -2237,6 +3077,28 @@ async def async_( cvss3_score_gte: Union[Unset, None, float] = UNSET, cvss3_score_lt: Union[Unset, None, float] = UNSET, cvss3_score_lte: Union[Unset, None, float] = UNSET, + cvss_scores_comment: Union[Unset, None, str] = UNSET, + cvss_scores_created_dt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_date: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_cvss_version: Union[Unset, None, str] = UNSET, + cvss_scores_issuer: Union[Unset, None, OsidbApiV1FlawsListCvssScoresIssuer] = UNSET, + cvss_scores_score: Union[Unset, None, float] = UNSET, + cvss_scores_updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + cvss_scores_updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + cvss_scores_uuid: Union[Unset, None, str] = UNSET, + cvss_scores_vector: Union[Unset, None, str] = UNSET, cwe_id: Union[Unset, None, str] = UNSET, description: Union[Unset, None, str] = UNSET, embargoed: Union[Unset, None, bool] = UNSET, @@ -2257,6 +3119,26 @@ async def async_( nvd_cvss3: Union[Unset, None, str] = UNSET, offset: Union[Unset, None, int] = UNSET, order: Union[Unset, None, List[OsidbApiV1FlawsListOrderItem]] = UNSET, + references_created_dt: Union[Unset, None, datetime.datetime] = UNSET, + references_created_dt_date: Union[Unset, None, datetime.date] = UNSET, + references_created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + references_created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + references_created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + references_created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + references_created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + references_created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + references_description: Union[Unset, None, str] = UNSET, + references_type: Union[Unset, None, OsidbApiV1FlawsListReferencesType] = UNSET, + references_updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + references_updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + references_updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + references_updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + references_updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + references_updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + references_updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + references_updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + references_url: Union[Unset, None, str] = UNSET, + references_uuid: Union[Unset, None, str] = UNSET, reported_dt: Union[Unset, None, datetime.datetime] = UNSET, reported_dt_date: Union[Unset, None, datetime.date] = UNSET, reported_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, @@ -2345,6 +3227,15 @@ async def async_( affects_trackers_created_dt_lte=affects_trackers_created_dt_lte, affects_trackers_embargoed=affects_trackers_embargoed, affects_trackers_errata_advisory_name=affects_trackers_errata_advisory_name, + affects_trackers_errata_et_id=affects_trackers_errata_et_id, + affects_trackers_errata_shipped_dt=affects_trackers_errata_shipped_dt, + affects_trackers_errata_shipped_dt_date=affects_trackers_errata_shipped_dt_date, + affects_trackers_errata_shipped_dt_date_gte=affects_trackers_errata_shipped_dt_date_gte, + affects_trackers_errata_shipped_dt_date_lte=affects_trackers_errata_shipped_dt_date_lte, + affects_trackers_errata_shipped_dt_gt=affects_trackers_errata_shipped_dt_gt, + affects_trackers_errata_shipped_dt_gte=affects_trackers_errata_shipped_dt_gte, + affects_trackers_errata_shipped_dt_lt=affects_trackers_errata_shipped_dt_lt, + affects_trackers_errata_shipped_dt_lte=affects_trackers_errata_shipped_dt_lte, affects_trackers_external_system_id=affects_trackers_external_system_id, affects_trackers_ps_update_stream=affects_trackers_ps_update_stream, affects_trackers_resolution=affects_trackers_resolution, @@ -2394,6 +3285,28 @@ async def async_( cvss3_score_gte=cvss3_score_gte, cvss3_score_lt=cvss3_score_lt, cvss3_score_lte=cvss3_score_lte, + cvss_scores_comment=cvss_scores_comment, + cvss_scores_created_dt=cvss_scores_created_dt, + cvss_scores_created_dt_date=cvss_scores_created_dt_date, + cvss_scores_created_dt_date_gte=cvss_scores_created_dt_date_gte, + cvss_scores_created_dt_date_lte=cvss_scores_created_dt_date_lte, + cvss_scores_created_dt_gt=cvss_scores_created_dt_gt, + cvss_scores_created_dt_gte=cvss_scores_created_dt_gte, + cvss_scores_created_dt_lt=cvss_scores_created_dt_lt, + cvss_scores_created_dt_lte=cvss_scores_created_dt_lte, + cvss_scores_cvss_version=cvss_scores_cvss_version, + cvss_scores_issuer=cvss_scores_issuer, + cvss_scores_score=cvss_scores_score, + cvss_scores_updated_dt=cvss_scores_updated_dt, + cvss_scores_updated_dt_date=cvss_scores_updated_dt_date, + cvss_scores_updated_dt_date_gte=cvss_scores_updated_dt_date_gte, + cvss_scores_updated_dt_date_lte=cvss_scores_updated_dt_date_lte, + cvss_scores_updated_dt_gt=cvss_scores_updated_dt_gt, + cvss_scores_updated_dt_gte=cvss_scores_updated_dt_gte, + cvss_scores_updated_dt_lt=cvss_scores_updated_dt_lt, + cvss_scores_updated_dt_lte=cvss_scores_updated_dt_lte, + cvss_scores_uuid=cvss_scores_uuid, + cvss_scores_vector=cvss_scores_vector, cwe_id=cwe_id, description=description, embargoed=embargoed, @@ -2410,6 +3323,26 @@ async def async_( nvd_cvss3=nvd_cvss3, offset=offset, order=order, + references_created_dt=references_created_dt, + references_created_dt_date=references_created_dt_date, + references_created_dt_date_gte=references_created_dt_date_gte, + references_created_dt_date_lte=references_created_dt_date_lte, + references_created_dt_gt=references_created_dt_gt, + references_created_dt_gte=references_created_dt_gte, + references_created_dt_lt=references_created_dt_lt, + references_created_dt_lte=references_created_dt_lte, + references_description=references_description, + references_type=references_type, + references_updated_dt=references_updated_dt, + references_updated_dt_date=references_updated_dt_date, + references_updated_dt_date_gte=references_updated_dt_date_gte, + references_updated_dt_date_lte=references_updated_dt_date_lte, + references_updated_dt_gt=references_updated_dt_gt, + references_updated_dt_gte=references_updated_dt_gte, + references_updated_dt_lt=references_updated_dt_lt, + references_updated_dt_lte=references_updated_dt_lte, + references_url=references_url, + references_uuid=references_uuid, reported_dt=reported_dt, reported_dt_date=reported_dt_date, reported_dt_date_gte=reported_dt_date_gte, diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_package_versions_create.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_package_versions_create.py new file mode 100644 index 0000000..fdfca64 --- /dev/null +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_package_versions_create.py @@ -0,0 +1,165 @@ +from typing import Any, Dict, Optional + +import requests + +from ...client import AuthenticatedClient +from ...models.flaw_package_version_post import FlawPackageVersionPost +from ...models.osidb_api_v1_flaws_package_versions_create_response_201 import ( + OsidbApiV1FlawsPackageVersionsCreateResponse201, +) +from ...types import UNSET, Response, Unset + +QUERY_PARAMS = {} +REQUEST_BODY_TYPE = FlawPackageVersionPost + + +def _get_kwargs( + flaw_id: str, + *, + client: AuthenticatedClient, + form_data: FlawPackageVersionPost, + multipart_data: FlawPackageVersionPost, + json_body: FlawPackageVersionPost, +) -> Dict[str, Any]: + url = "{}/osidb/api/v1/flaws/{flaw_id}/package_versions".format( + client.base_url, + flaw_id=flaw_id, + ) + + headers: Dict[str, Any] = client.get_headers() + + json_json_body: Dict[str, Any] = UNSET + if not isinstance(json_body, Unset): + json_body.to_dict() + + multipart_multipart_data: Dict[str, Any] = UNSET + if not isinstance(multipart_data, Unset): + multipart_data.to_multipart() + + return { + "url": url, + "headers": headers, + "data": form_data.to_dict(), + } + + +def _parse_response( + *, response: requests.Response +) -> Optional[OsidbApiV1FlawsPackageVersionsCreateResponse201]: + if response.status_code == 201: + _response_201 = response.json() + response_201: OsidbApiV1FlawsPackageVersionsCreateResponse201 + if isinstance(_response_201, Unset): + response_201 = UNSET + else: + response_201 = OsidbApiV1FlawsPackageVersionsCreateResponse201.from_dict( + _response_201 + ) + + return response_201 + return None + + +def _build_response( + *, response: requests.Response +) -> Response[OsidbApiV1FlawsPackageVersionsCreateResponse201]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + flaw_id: str, + *, + client: AuthenticatedClient, + form_data: FlawPackageVersionPost, + multipart_data: FlawPackageVersionPost, + json_body: FlawPackageVersionPost, +) -> Response[OsidbApiV1FlawsPackageVersionsCreateResponse201]: + kwargs = _get_kwargs( + flaw_id=flaw_id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ) + + response = requests.post( + verify=client.verify_ssl, + auth=client.auth, + timeout=client.timeout, + **kwargs, + ) + response.raise_for_status() + + return _build_response(response=response) + + +def sync( + flaw_id: str, + *, + client: AuthenticatedClient, + form_data: FlawPackageVersionPost, + multipart_data: FlawPackageVersionPost, + json_body: FlawPackageVersionPost, +) -> Optional[OsidbApiV1FlawsPackageVersionsCreateResponse201]: + """ """ + + return sync_detailed( + flaw_id=flaw_id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ).parsed + + +async def async_detailed( + flaw_id: str, + *, + client: AuthenticatedClient, + form_data: FlawPackageVersionPost, + multipart_data: FlawPackageVersionPost, + json_body: FlawPackageVersionPost, +) -> Response[OsidbApiV1FlawsPackageVersionsCreateResponse201]: + kwargs = _get_kwargs( + flaw_id=flaw_id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ) + + async with client.get_async_session().post( + verify_ssl=client.verify_ssl, raise_for_status=True, **kwargs + ) as response: + content = await response.read() + resp = requests.Response() + resp.status_code = response.status + resp._content = content + + return _build_response(response=resp) + + +async def async_( + flaw_id: str, + *, + client: AuthenticatedClient, + form_data: FlawPackageVersionPost, + multipart_data: FlawPackageVersionPost, + json_body: FlawPackageVersionPost, +) -> Optional[OsidbApiV1FlawsPackageVersionsCreateResponse201]: + """ """ + + return ( + await async_detailed( + flaw_id=flaw_id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ) + ).parsed diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_package_versions_destroy.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_package_versions_destroy.py new file mode 100644 index 0000000..445f25d --- /dev/null +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_package_versions_destroy.py @@ -0,0 +1,137 @@ +from typing import Any, Dict, Optional + +import requests + +from ...client import AuthenticatedClient +from ...models.osidb_api_v1_flaws_package_versions_destroy_response_200 import ( + OsidbApiV1FlawsPackageVersionsDestroyResponse200, +) +from ...types import UNSET, Response, Unset + +QUERY_PARAMS = {} + + +def _get_kwargs( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, +) -> Dict[str, Any]: + url = "{}/osidb/api/v1/flaws/{flaw_id}/package_versions/{id}".format( + client.base_url, + flaw_id=flaw_id, + id=id, + ) + + headers: Dict[str, Any] = client.get_headers() + + return { + "url": url, + "headers": headers, + } + + +def _parse_response( + *, response: requests.Response +) -> Optional[OsidbApiV1FlawsPackageVersionsDestroyResponse200]: + if response.status_code == 200: + _response_200 = response.json() + response_200: OsidbApiV1FlawsPackageVersionsDestroyResponse200 + if isinstance(_response_200, Unset): + response_200 = UNSET + else: + response_200 = OsidbApiV1FlawsPackageVersionsDestroyResponse200.from_dict( + _response_200 + ) + + return response_200 + return None + + +def _build_response( + *, response: requests.Response +) -> Response[OsidbApiV1FlawsPackageVersionsDestroyResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, +) -> Response[OsidbApiV1FlawsPackageVersionsDestroyResponse200]: + kwargs = _get_kwargs( + flaw_id=flaw_id, + id=id, + client=client, + ) + + response = requests.delete( + verify=client.verify_ssl, + auth=client.auth, + timeout=client.timeout, + **kwargs, + ) + response.raise_for_status() + + return _build_response(response=response) + + +def sync( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, +) -> Optional[OsidbApiV1FlawsPackageVersionsDestroyResponse200]: + """Destroy the instance and proxy the delete to Bugzilla""" + + return sync_detailed( + flaw_id=flaw_id, + id=id, + client=client, + ).parsed + + +async def async_detailed( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, +) -> Response[OsidbApiV1FlawsPackageVersionsDestroyResponse200]: + kwargs = _get_kwargs( + flaw_id=flaw_id, + id=id, + client=client, + ) + + async with client.get_async_session().delete( + verify_ssl=client.verify_ssl, raise_for_status=True, **kwargs + ) as response: + content = await response.read() + resp = requests.Response() + resp.status_code = response.status + resp._content = content + + return _build_response(response=resp) + + +async def async_( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, +) -> Optional[OsidbApiV1FlawsPackageVersionsDestroyResponse200]: + """Destroy the instance and proxy the delete to Bugzilla""" + + return ( + await async_detailed( + flaw_id=flaw_id, + id=id, + client=client, + ) + ).parsed diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_package_versions_list.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_package_versions_list.py new file mode 100644 index 0000000..6b40dc1 --- /dev/null +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_package_versions_list.py @@ -0,0 +1,473 @@ +import datetime +from typing import Any, Dict, List, Optional, Union + +import requests + +from ...client import AuthenticatedClient +from ...models.osidb_api_v1_flaws_package_versions_list_response_200 import ( + OsidbApiV1FlawsPackageVersionsListResponse200, +) +from ...types import UNSET, Response, Unset + +QUERY_PARAMS = { + "created_dt": datetime.datetime, + "created_dt__date": datetime.date, + "created_dt__date__gte": datetime.date, + "created_dt__date__lte": datetime.date, + "created_dt__gt": datetime.datetime, + "created_dt__gte": datetime.datetime, + "created_dt__lt": datetime.datetime, + "created_dt__lte": datetime.datetime, + "exclude_fields": List[str], + "include_fields": List[str], + "limit": int, + "offset": int, + "package": str, + "updated_dt": datetime.datetime, + "updated_dt__date": datetime.date, + "updated_dt__date__gte": datetime.date, + "updated_dt__date__lte": datetime.date, + "updated_dt__gt": datetime.datetime, + "updated_dt__gte": datetime.datetime, + "updated_dt__lt": datetime.datetime, + "updated_dt__lte": datetime.datetime, + "uuid": str, + "versions__version": str, +} + + +def _get_kwargs( + flaw_id: str, + *, + client: AuthenticatedClient, + created_dt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_date: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, + limit: Union[Unset, None, int] = UNSET, + offset: Union[Unset, None, int] = UNSET, + package: Union[Unset, None, str] = UNSET, + updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + uuid: Union[Unset, None, str] = UNSET, + versions_version: Union[Unset, None, str] = UNSET, +) -> Dict[str, Any]: + url = "{}/osidb/api/v1/flaws/{flaw_id}/package_versions".format( + client.base_url, + flaw_id=flaw_id, + ) + + headers: Dict[str, Any] = client.get_headers() + + json_created_dt: Union[Unset, None, str] = UNSET + if not isinstance(created_dt, Unset): + json_created_dt = created_dt.isoformat() if created_dt else None + + json_created_dt_date: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_date, Unset): + json_created_dt_date = created_dt_date.isoformat() if created_dt_date else None + + json_created_dt_date_gte: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_date_gte, Unset): + json_created_dt_date_gte = ( + created_dt_date_gte.isoformat() if created_dt_date_gte else None + ) + + json_created_dt_date_lte: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_date_lte, Unset): + json_created_dt_date_lte = ( + created_dt_date_lte.isoformat() if created_dt_date_lte else None + ) + + json_created_dt_gt: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_gt, Unset): + json_created_dt_gt = created_dt_gt.isoformat() if created_dt_gt else None + + json_created_dt_gte: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_gte, Unset): + json_created_dt_gte = created_dt_gte.isoformat() if created_dt_gte else None + + json_created_dt_lt: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_lt, Unset): + json_created_dt_lt = created_dt_lt.isoformat() if created_dt_lt else None + + json_created_dt_lte: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_lte, Unset): + json_created_dt_lte = created_dt_lte.isoformat() if created_dt_lte else None + + json_exclude_fields: Union[Unset, None, List[str]] = UNSET + if not isinstance(exclude_fields, Unset): + if exclude_fields is None: + json_exclude_fields = None + else: + json_exclude_fields = exclude_fields + + json_include_fields: Union[Unset, None, List[str]] = UNSET + if not isinstance(include_fields, Unset): + if include_fields is None: + json_include_fields = None + else: + json_include_fields = include_fields + + json_updated_dt: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt, Unset): + json_updated_dt = updated_dt.isoformat() if updated_dt else None + + json_updated_dt_date: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_date, Unset): + json_updated_dt_date = updated_dt_date.isoformat() if updated_dt_date else None + + json_updated_dt_date_gte: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_date_gte, Unset): + json_updated_dt_date_gte = ( + updated_dt_date_gte.isoformat() if updated_dt_date_gte else None + ) + + json_updated_dt_date_lte: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_date_lte, Unset): + json_updated_dt_date_lte = ( + updated_dt_date_lte.isoformat() if updated_dt_date_lte else None + ) + + json_updated_dt_gt: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_gt, Unset): + json_updated_dt_gt = updated_dt_gt.isoformat() if updated_dt_gt else None + + json_updated_dt_gte: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_gte, Unset): + json_updated_dt_gte = updated_dt_gte.isoformat() if updated_dt_gte else None + + json_updated_dt_lt: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_lt, Unset): + json_updated_dt_lt = updated_dt_lt.isoformat() if updated_dt_lt else None + + json_updated_dt_lte: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_lte, Unset): + json_updated_dt_lte = updated_dt_lte.isoformat() if updated_dt_lte else None + + params: Dict[str, Any] = { + "created_dt": json_created_dt, + "created_dt__date": json_created_dt_date, + "created_dt__date__gte": json_created_dt_date_gte, + "created_dt__date__lte": json_created_dt_date_lte, + "created_dt__gt": json_created_dt_gt, + "created_dt__gte": json_created_dt_gte, + "created_dt__lt": json_created_dt_lt, + "created_dt__lte": json_created_dt_lte, + "exclude_fields": json_exclude_fields, + "include_fields": json_include_fields, + "limit": limit, + "offset": offset, + "package": package, + "updated_dt": json_updated_dt, + "updated_dt__date": json_updated_dt_date, + "updated_dt__date__gte": json_updated_dt_date_gte, + "updated_dt__date__lte": json_updated_dt_date_lte, + "updated_dt__gt": json_updated_dt_gt, + "updated_dt__gte": json_updated_dt_gte, + "updated_dt__lt": json_updated_dt_lt, + "updated_dt__lte": json_updated_dt_lte, + "uuid": uuid, + "versions__version": versions_version, + } + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "url": url, + "headers": headers, + "params": params, + } + + +def _parse_response( + *, response: requests.Response +) -> Optional[OsidbApiV1FlawsPackageVersionsListResponse200]: + if response.status_code == 200: + _response_200 = response.json() + response_200: OsidbApiV1FlawsPackageVersionsListResponse200 + if isinstance(_response_200, Unset): + response_200 = UNSET + else: + response_200 = OsidbApiV1FlawsPackageVersionsListResponse200.from_dict( + _response_200 + ) + + return response_200 + return None + + +def _build_response( + *, response: requests.Response +) -> Response[OsidbApiV1FlawsPackageVersionsListResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + flaw_id: str, + *, + client: AuthenticatedClient, + created_dt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_date: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, + limit: Union[Unset, None, int] = UNSET, + offset: Union[Unset, None, int] = UNSET, + package: Union[Unset, None, str] = UNSET, + updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + uuid: Union[Unset, None, str] = UNSET, + versions_version: Union[Unset, None, str] = UNSET, +) -> Response[OsidbApiV1FlawsPackageVersionsListResponse200]: + kwargs = _get_kwargs( + flaw_id=flaw_id, + client=client, + created_dt=created_dt, + created_dt_date=created_dt_date, + created_dt_date_gte=created_dt_date_gte, + created_dt_date_lte=created_dt_date_lte, + created_dt_gt=created_dt_gt, + created_dt_gte=created_dt_gte, + created_dt_lt=created_dt_lt, + created_dt_lte=created_dt_lte, + exclude_fields=exclude_fields, + include_fields=include_fields, + limit=limit, + offset=offset, + package=package, + updated_dt=updated_dt, + updated_dt_date=updated_dt_date, + updated_dt_date_gte=updated_dt_date_gte, + updated_dt_date_lte=updated_dt_date_lte, + updated_dt_gt=updated_dt_gt, + updated_dt_gte=updated_dt_gte, + updated_dt_lt=updated_dt_lt, + updated_dt_lte=updated_dt_lte, + uuid=uuid, + versions_version=versions_version, + ) + + response = requests.get( + verify=client.verify_ssl, + auth=client.auth, + timeout=client.timeout, + **kwargs, + ) + response.raise_for_status() + + return _build_response(response=response) + + +def sync( + flaw_id: str, + *, + client: AuthenticatedClient, + created_dt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_date: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, + limit: Union[Unset, None, int] = UNSET, + offset: Union[Unset, None, int] = UNSET, + package: Union[Unset, None, str] = UNSET, + updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + uuid: Union[Unset, None, str] = UNSET, + versions_version: Union[Unset, None, str] = UNSET, +) -> Optional[OsidbApiV1FlawsPackageVersionsListResponse200]: + """ """ + + return sync_detailed( + flaw_id=flaw_id, + client=client, + created_dt=created_dt, + created_dt_date=created_dt_date, + created_dt_date_gte=created_dt_date_gte, + created_dt_date_lte=created_dt_date_lte, + created_dt_gt=created_dt_gt, + created_dt_gte=created_dt_gte, + created_dt_lt=created_dt_lt, + created_dt_lte=created_dt_lte, + exclude_fields=exclude_fields, + include_fields=include_fields, + limit=limit, + offset=offset, + package=package, + updated_dt=updated_dt, + updated_dt_date=updated_dt_date, + updated_dt_date_gte=updated_dt_date_gte, + updated_dt_date_lte=updated_dt_date_lte, + updated_dt_gt=updated_dt_gt, + updated_dt_gte=updated_dt_gte, + updated_dt_lt=updated_dt_lt, + updated_dt_lte=updated_dt_lte, + uuid=uuid, + versions_version=versions_version, + ).parsed + + +async def async_detailed( + flaw_id: str, + *, + client: AuthenticatedClient, + created_dt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_date: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, + limit: Union[Unset, None, int] = UNSET, + offset: Union[Unset, None, int] = UNSET, + package: Union[Unset, None, str] = UNSET, + updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + uuid: Union[Unset, None, str] = UNSET, + versions_version: Union[Unset, None, str] = UNSET, +) -> Response[OsidbApiV1FlawsPackageVersionsListResponse200]: + kwargs = _get_kwargs( + flaw_id=flaw_id, + client=client, + created_dt=created_dt, + created_dt_date=created_dt_date, + created_dt_date_gte=created_dt_date_gte, + created_dt_date_lte=created_dt_date_lte, + created_dt_gt=created_dt_gt, + created_dt_gte=created_dt_gte, + created_dt_lt=created_dt_lt, + created_dt_lte=created_dt_lte, + exclude_fields=exclude_fields, + include_fields=include_fields, + limit=limit, + offset=offset, + package=package, + updated_dt=updated_dt, + updated_dt_date=updated_dt_date, + updated_dt_date_gte=updated_dt_date_gte, + updated_dt_date_lte=updated_dt_date_lte, + updated_dt_gt=updated_dt_gt, + updated_dt_gte=updated_dt_gte, + updated_dt_lt=updated_dt_lt, + updated_dt_lte=updated_dt_lte, + uuid=uuid, + versions_version=versions_version, + ) + + async with client.get_async_session().get( + verify_ssl=client.verify_ssl, raise_for_status=True, **kwargs + ) as response: + content = await response.read() + resp = requests.Response() + resp.status_code = response.status + resp._content = content + + return _build_response(response=resp) + + +async def async_( + flaw_id: str, + *, + client: AuthenticatedClient, + created_dt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_date: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, + limit: Union[Unset, None, int] = UNSET, + offset: Union[Unset, None, int] = UNSET, + package: Union[Unset, None, str] = UNSET, + updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + uuid: Union[Unset, None, str] = UNSET, + versions_version: Union[Unset, None, str] = UNSET, +) -> Optional[OsidbApiV1FlawsPackageVersionsListResponse200]: + """ """ + + return ( + await async_detailed( + flaw_id=flaw_id, + client=client, + created_dt=created_dt, + created_dt_date=created_dt_date, + created_dt_date_gte=created_dt_date_gte, + created_dt_date_lte=created_dt_date_lte, + created_dt_gt=created_dt_gt, + created_dt_gte=created_dt_gte, + created_dt_lt=created_dt_lt, + created_dt_lte=created_dt_lte, + exclude_fields=exclude_fields, + include_fields=include_fields, + limit=limit, + offset=offset, + package=package, + updated_dt=updated_dt, + updated_dt_date=updated_dt_date, + updated_dt_date_gte=updated_dt_date_gte, + updated_dt_date_lte=updated_dt_date_lte, + updated_dt_gt=updated_dt_gt, + updated_dt_gte=updated_dt_gte, + updated_dt_lt=updated_dt_lt, + updated_dt_lte=updated_dt_lte, + uuid=uuid, + versions_version=versions_version, + ) + ).parsed diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_package_versions_retrieve.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_package_versions_retrieve.py new file mode 100644 index 0000000..f7ad815 --- /dev/null +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_package_versions_retrieve.py @@ -0,0 +1,179 @@ +from typing import Any, Dict, List, Optional, Union + +import requests + +from ...client import AuthenticatedClient +from ...models.osidb_api_v1_flaws_package_versions_retrieve_response_200 import ( + OsidbApiV1FlawsPackageVersionsRetrieveResponse200, +) +from ...types import UNSET, Response, Unset + +QUERY_PARAMS = { + "exclude_fields": List[str], + "include_fields": List[str], +} + + +def _get_kwargs( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, +) -> Dict[str, Any]: + url = "{}/osidb/api/v1/flaws/{flaw_id}/package_versions/{id}".format( + client.base_url, + flaw_id=flaw_id, + id=id, + ) + + headers: Dict[str, Any] = client.get_headers() + + json_exclude_fields: Union[Unset, None, List[str]] = UNSET + if not isinstance(exclude_fields, Unset): + if exclude_fields is None: + json_exclude_fields = None + else: + json_exclude_fields = exclude_fields + + json_include_fields: Union[Unset, None, List[str]] = UNSET + if not isinstance(include_fields, Unset): + if include_fields is None: + json_include_fields = None + else: + json_include_fields = include_fields + + params: Dict[str, Any] = { + "exclude_fields": json_exclude_fields, + "include_fields": json_include_fields, + } + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + return { + "url": url, + "headers": headers, + "params": params, + } + + +def _parse_response( + *, response: requests.Response +) -> Optional[OsidbApiV1FlawsPackageVersionsRetrieveResponse200]: + if response.status_code == 200: + _response_200 = response.json() + response_200: OsidbApiV1FlawsPackageVersionsRetrieveResponse200 + if isinstance(_response_200, Unset): + response_200 = UNSET + else: + response_200 = OsidbApiV1FlawsPackageVersionsRetrieveResponse200.from_dict( + _response_200 + ) + + return response_200 + return None + + +def _build_response( + *, response: requests.Response +) -> Response[OsidbApiV1FlawsPackageVersionsRetrieveResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, +) -> Response[OsidbApiV1FlawsPackageVersionsRetrieveResponse200]: + kwargs = _get_kwargs( + flaw_id=flaw_id, + id=id, + client=client, + exclude_fields=exclude_fields, + include_fields=include_fields, + ) + + response = requests.get( + verify=client.verify_ssl, + auth=client.auth, + timeout=client.timeout, + **kwargs, + ) + response.raise_for_status() + + return _build_response(response=response) + + +def sync( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, +) -> Optional[OsidbApiV1FlawsPackageVersionsRetrieveResponse200]: + """ """ + + return sync_detailed( + flaw_id=flaw_id, + id=id, + client=client, + exclude_fields=exclude_fields, + include_fields=include_fields, + ).parsed + + +async def async_detailed( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, +) -> Response[OsidbApiV1FlawsPackageVersionsRetrieveResponse200]: + kwargs = _get_kwargs( + flaw_id=flaw_id, + id=id, + client=client, + exclude_fields=exclude_fields, + include_fields=include_fields, + ) + + async with client.get_async_session().get( + verify_ssl=client.verify_ssl, raise_for_status=True, **kwargs + ) as response: + content = await response.read() + resp = requests.Response() + resp.status_code = response.status + resp._content = content + + return _build_response(response=resp) + + +async def async_( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, + exclude_fields: Union[Unset, None, List[str]] = UNSET, + include_fields: Union[Unset, None, List[str]] = UNSET, +) -> Optional[OsidbApiV1FlawsPackageVersionsRetrieveResponse200]: + """ """ + + return ( + await async_detailed( + flaw_id=flaw_id, + id=id, + client=client, + exclude_fields=exclude_fields, + include_fields=include_fields, + ) + ).parsed diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_package_versions_update.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_package_versions_update.py new file mode 100644 index 0000000..8717da1 --- /dev/null +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_package_versions_update.py @@ -0,0 +1,175 @@ +from typing import Any, Dict, Optional + +import requests + +from ...client import AuthenticatedClient +from ...models.flaw_package_version_put import FlawPackageVersionPut +from ...models.osidb_api_v1_flaws_package_versions_update_response_200 import ( + OsidbApiV1FlawsPackageVersionsUpdateResponse200, +) +from ...types import UNSET, Response, Unset + +QUERY_PARAMS = {} +REQUEST_BODY_TYPE = FlawPackageVersionPut + + +def _get_kwargs( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, + form_data: FlawPackageVersionPut, + multipart_data: FlawPackageVersionPut, + json_body: FlawPackageVersionPut, +) -> Dict[str, Any]: + url = "{}/osidb/api/v1/flaws/{flaw_id}/package_versions/{id}".format( + client.base_url, + flaw_id=flaw_id, + id=id, + ) + + headers: Dict[str, Any] = client.get_headers() + + json_json_body: Dict[str, Any] = UNSET + if not isinstance(json_body, Unset): + json_body.to_dict() + + multipart_multipart_data: Dict[str, Any] = UNSET + if not isinstance(multipart_data, Unset): + multipart_data.to_multipart() + + return { + "url": url, + "headers": headers, + "data": form_data.to_dict(), + } + + +def _parse_response( + *, response: requests.Response +) -> Optional[OsidbApiV1FlawsPackageVersionsUpdateResponse200]: + if response.status_code == 200: + _response_200 = response.json() + response_200: OsidbApiV1FlawsPackageVersionsUpdateResponse200 + if isinstance(_response_200, Unset): + response_200 = UNSET + else: + response_200 = OsidbApiV1FlawsPackageVersionsUpdateResponse200.from_dict( + _response_200 + ) + + return response_200 + return None + + +def _build_response( + *, response: requests.Response +) -> Response[OsidbApiV1FlawsPackageVersionsUpdateResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, + form_data: FlawPackageVersionPut, + multipart_data: FlawPackageVersionPut, + json_body: FlawPackageVersionPut, +) -> Response[OsidbApiV1FlawsPackageVersionsUpdateResponse200]: + kwargs = _get_kwargs( + flaw_id=flaw_id, + id=id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ) + + response = requests.put( + verify=client.verify_ssl, + auth=client.auth, + timeout=client.timeout, + **kwargs, + ) + response.raise_for_status() + + return _build_response(response=response) + + +def sync( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, + form_data: FlawPackageVersionPut, + multipart_data: FlawPackageVersionPut, + json_body: FlawPackageVersionPut, +) -> Optional[OsidbApiV1FlawsPackageVersionsUpdateResponse200]: + """ """ + + return sync_detailed( + flaw_id=flaw_id, + id=id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ).parsed + + +async def async_detailed( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, + form_data: FlawPackageVersionPut, + multipart_data: FlawPackageVersionPut, + json_body: FlawPackageVersionPut, +) -> Response[OsidbApiV1FlawsPackageVersionsUpdateResponse200]: + kwargs = _get_kwargs( + flaw_id=flaw_id, + id=id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ) + + async with client.get_async_session().put( + verify_ssl=client.verify_ssl, raise_for_status=True, **kwargs + ) as response: + content = await response.read() + resp = requests.Response() + resp.status_code = response.status + resp._content = content + + return _build_response(response=resp) + + +async def async_( + flaw_id: str, + id: str, + *, + client: AuthenticatedClient, + form_data: FlawPackageVersionPut, + multipart_data: FlawPackageVersionPut, + json_body: FlawPackageVersionPut, +) -> Optional[OsidbApiV1FlawsPackageVersionsUpdateResponse200]: + """ """ + + return ( + await async_detailed( + flaw_id=flaw_id, + id=id, + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ) + ).parsed diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_references_destroy.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_references_destroy.py index 146d55c..67a3a61 100644 --- a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_references_destroy.py +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_references_destroy.py @@ -3,8 +3,8 @@ import requests from ...client import AuthenticatedClient -from ...models.osidb_api_v1_flaws_references_destroy_response_204 import ( - OsidbApiV1FlawsReferencesDestroyResponse204, +from ...models.osidb_api_v1_flaws_references_destroy_response_200 import ( + OsidbApiV1FlawsReferencesDestroyResponse200, ) from ...types import UNSET, Response, Unset @@ -33,24 +33,24 @@ def _get_kwargs( def _parse_response( *, response: requests.Response -) -> Optional[OsidbApiV1FlawsReferencesDestroyResponse204]: - if response.status_code == 204: - _response_204 = response.json() - response_204: OsidbApiV1FlawsReferencesDestroyResponse204 - if isinstance(_response_204, Unset): - response_204 = UNSET +) -> Optional[OsidbApiV1FlawsReferencesDestroyResponse200]: + if response.status_code == 200: + _response_200 = response.json() + response_200: OsidbApiV1FlawsReferencesDestroyResponse200 + if isinstance(_response_200, Unset): + response_200 = UNSET else: - response_204 = OsidbApiV1FlawsReferencesDestroyResponse204.from_dict( - _response_204 + response_200 = OsidbApiV1FlawsReferencesDestroyResponse200.from_dict( + _response_200 ) - return response_204 + return response_200 return None def _build_response( *, response: requests.Response -) -> Response[OsidbApiV1FlawsReferencesDestroyResponse204]: +) -> Response[OsidbApiV1FlawsReferencesDestroyResponse200]: return Response( status_code=response.status_code, content=response.content, @@ -64,7 +64,7 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[OsidbApiV1FlawsReferencesDestroyResponse204]: +) -> Response[OsidbApiV1FlawsReferencesDestroyResponse200]: kwargs = _get_kwargs( flaw_id=flaw_id, id=id, @@ -87,8 +87,8 @@ def sync( id: str, *, client: AuthenticatedClient, -) -> Optional[OsidbApiV1FlawsReferencesDestroyResponse204]: - """ """ +) -> Optional[OsidbApiV1FlawsReferencesDestroyResponse200]: + """Destroy the instance and proxy the delete to Bugzilla""" return sync_detailed( flaw_id=flaw_id, @@ -102,7 +102,7 @@ async def async_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[OsidbApiV1FlawsReferencesDestroyResponse204]: +) -> Response[OsidbApiV1FlawsReferencesDestroyResponse200]: kwargs = _get_kwargs( flaw_id=flaw_id, id=id, @@ -125,8 +125,8 @@ async def async_( id: str, *, client: AuthenticatedClient, -) -> Optional[OsidbApiV1FlawsReferencesDestroyResponse204]: - """ """ +) -> Optional[OsidbApiV1FlawsReferencesDestroyResponse200]: + """Destroy the instance and proxy the delete to Bugzilla""" return ( await async_detailed( diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_references_list.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_references_list.py index f380139..2feddfe 100644 --- a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_references_list.py +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_references_list.py @@ -1,3 +1,4 @@ +import datetime from typing import Any, Dict, List, Optional, Union import requests @@ -6,14 +7,37 @@ from ...models.osidb_api_v1_flaws_references_list_response_200 import ( OsidbApiV1FlawsReferencesListResponse200, ) +from ...models.osidb_api_v1_flaws_references_list_type import ( + OsidbApiV1FlawsReferencesListType, +) from ...types import UNSET, Response, Unset QUERY_PARAMS = { + "created_dt": datetime.datetime, + "created_dt__date": datetime.date, + "created_dt__date__gte": datetime.date, + "created_dt__date__lte": datetime.date, + "created_dt__gt": datetime.datetime, + "created_dt__gte": datetime.datetime, + "created_dt__lt": datetime.datetime, + "created_dt__lte": datetime.datetime, + "description": str, "exclude_fields": List[str], "include_fields": List[str], "include_meta_attr": List[str], "limit": int, "offset": int, + "type": OsidbApiV1FlawsReferencesListType, + "updated_dt": datetime.datetime, + "updated_dt__date": datetime.date, + "updated_dt__date__gte": datetime.date, + "updated_dt__date__lte": datetime.date, + "updated_dt__gt": datetime.datetime, + "updated_dt__gte": datetime.datetime, + "updated_dt__lt": datetime.datetime, + "updated_dt__lte": datetime.datetime, + "url": str, + "uuid": str, } @@ -21,11 +45,31 @@ def _get_kwargs( flaw_id: str, *, client: AuthenticatedClient, + created_dt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_date: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + description: Union[Unset, None, str] = UNSET, exclude_fields: Union[Unset, None, List[str]] = UNSET, include_fields: Union[Unset, None, List[str]] = UNSET, include_meta_attr: Union[Unset, None, List[str]] = UNSET, limit: Union[Unset, None, int] = UNSET, offset: Union[Unset, None, int] = UNSET, + type: Union[Unset, None, OsidbApiV1FlawsReferencesListType] = UNSET, + updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + url: Union[Unset, None, str] = UNSET, + uuid: Union[Unset, None, str] = UNSET, ) -> Dict[str, Any]: url = "{}/osidb/api/v1/flaws/{flaw_id}/references".format( client.base_url, @@ -34,6 +78,42 @@ def _get_kwargs( headers: Dict[str, Any] = client.get_headers() + json_created_dt: Union[Unset, None, str] = UNSET + if not isinstance(created_dt, Unset): + json_created_dt = created_dt.isoformat() if created_dt else None + + json_created_dt_date: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_date, Unset): + json_created_dt_date = created_dt_date.isoformat() if created_dt_date else None + + json_created_dt_date_gte: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_date_gte, Unset): + json_created_dt_date_gte = ( + created_dt_date_gte.isoformat() if created_dt_date_gte else None + ) + + json_created_dt_date_lte: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_date_lte, Unset): + json_created_dt_date_lte = ( + created_dt_date_lte.isoformat() if created_dt_date_lte else None + ) + + json_created_dt_gt: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_gt, Unset): + json_created_dt_gt = created_dt_gt.isoformat() if created_dt_gt else None + + json_created_dt_gte: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_gte, Unset): + json_created_dt_gte = created_dt_gte.isoformat() if created_dt_gte else None + + json_created_dt_lt: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_lt, Unset): + json_created_dt_lt = created_dt_lt.isoformat() if created_dt_lt else None + + json_created_dt_lte: Union[Unset, None, str] = UNSET + if not isinstance(created_dt_lte, Unset): + json_created_dt_lte = created_dt_lte.isoformat() if created_dt_lte else None + json_exclude_fields: Union[Unset, None, List[str]] = UNSET if not isinstance(exclude_fields, Unset): if exclude_fields is None: @@ -55,12 +135,73 @@ def _get_kwargs( else: json_include_meta_attr = include_meta_attr + json_type: Union[Unset, None, str] = UNSET + if not isinstance(type, Unset): + + json_type = OsidbApiV1FlawsReferencesListType(type).value if type else None + + json_updated_dt: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt, Unset): + json_updated_dt = updated_dt.isoformat() if updated_dt else None + + json_updated_dt_date: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_date, Unset): + json_updated_dt_date = updated_dt_date.isoformat() if updated_dt_date else None + + json_updated_dt_date_gte: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_date_gte, Unset): + json_updated_dt_date_gte = ( + updated_dt_date_gte.isoformat() if updated_dt_date_gte else None + ) + + json_updated_dt_date_lte: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_date_lte, Unset): + json_updated_dt_date_lte = ( + updated_dt_date_lte.isoformat() if updated_dt_date_lte else None + ) + + json_updated_dt_gt: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_gt, Unset): + json_updated_dt_gt = updated_dt_gt.isoformat() if updated_dt_gt else None + + json_updated_dt_gte: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_gte, Unset): + json_updated_dt_gte = updated_dt_gte.isoformat() if updated_dt_gte else None + + json_updated_dt_lt: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_lt, Unset): + json_updated_dt_lt = updated_dt_lt.isoformat() if updated_dt_lt else None + + json_updated_dt_lte: Union[Unset, None, str] = UNSET + if not isinstance(updated_dt_lte, Unset): + json_updated_dt_lte = updated_dt_lte.isoformat() if updated_dt_lte else None + params: Dict[str, Any] = { + "created_dt": json_created_dt, + "created_dt__date": json_created_dt_date, + "created_dt__date__gte": json_created_dt_date_gte, + "created_dt__date__lte": json_created_dt_date_lte, + "created_dt__gt": json_created_dt_gt, + "created_dt__gte": json_created_dt_gte, + "created_dt__lt": json_created_dt_lt, + "created_dt__lte": json_created_dt_lte, + "description": description, "exclude_fields": json_exclude_fields, "include_fields": json_include_fields, "include_meta_attr": json_include_meta_attr, "limit": limit, "offset": offset, + "type": json_type, + "updated_dt": json_updated_dt, + "updated_dt__date": json_updated_dt_date, + "updated_dt__date__gte": json_updated_dt_date_gte, + "updated_dt__date__lte": json_updated_dt_date_lte, + "updated_dt__gt": json_updated_dt_gt, + "updated_dt__gte": json_updated_dt_gte, + "updated_dt__lt": json_updated_dt_lt, + "updated_dt__lte": json_updated_dt_lte, + "url": url, + "uuid": uuid, } params = {k: v for k, v in params.items() if v is not UNSET and v is not None} @@ -103,20 +244,60 @@ def sync_detailed( flaw_id: str, *, client: AuthenticatedClient, + created_dt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_date: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + description: Union[Unset, None, str] = UNSET, exclude_fields: Union[Unset, None, List[str]] = UNSET, include_fields: Union[Unset, None, List[str]] = UNSET, include_meta_attr: Union[Unset, None, List[str]] = UNSET, limit: Union[Unset, None, int] = UNSET, offset: Union[Unset, None, int] = UNSET, + type: Union[Unset, None, OsidbApiV1FlawsReferencesListType] = UNSET, + updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + url: Union[Unset, None, str] = UNSET, + uuid: Union[Unset, None, str] = UNSET, ) -> Response[OsidbApiV1FlawsReferencesListResponse200]: kwargs = _get_kwargs( flaw_id=flaw_id, client=client, + created_dt=created_dt, + created_dt_date=created_dt_date, + created_dt_date_gte=created_dt_date_gte, + created_dt_date_lte=created_dt_date_lte, + created_dt_gt=created_dt_gt, + created_dt_gte=created_dt_gte, + created_dt_lt=created_dt_lt, + created_dt_lte=created_dt_lte, + description=description, exclude_fields=exclude_fields, include_fields=include_fields, include_meta_attr=include_meta_attr, limit=limit, offset=offset, + type=type, + updated_dt=updated_dt, + updated_dt_date=updated_dt_date, + updated_dt_date_gte=updated_dt_date_gte, + updated_dt_date_lte=updated_dt_date_lte, + updated_dt_gt=updated_dt_gt, + updated_dt_gte=updated_dt_gte, + updated_dt_lt=updated_dt_lt, + updated_dt_lte=updated_dt_lte, + url=url, + uuid=uuid, ) response = requests.get( @@ -134,22 +315,62 @@ def sync( flaw_id: str, *, client: AuthenticatedClient, + created_dt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_date: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + description: Union[Unset, None, str] = UNSET, exclude_fields: Union[Unset, None, List[str]] = UNSET, include_fields: Union[Unset, None, List[str]] = UNSET, include_meta_attr: Union[Unset, None, List[str]] = UNSET, limit: Union[Unset, None, int] = UNSET, offset: Union[Unset, None, int] = UNSET, + type: Union[Unset, None, OsidbApiV1FlawsReferencesListType] = UNSET, + updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + url: Union[Unset, None, str] = UNSET, + uuid: Union[Unset, None, str] = UNSET, ) -> Optional[OsidbApiV1FlawsReferencesListResponse200]: """ """ return sync_detailed( flaw_id=flaw_id, client=client, + created_dt=created_dt, + created_dt_date=created_dt_date, + created_dt_date_gte=created_dt_date_gte, + created_dt_date_lte=created_dt_date_lte, + created_dt_gt=created_dt_gt, + created_dt_gte=created_dt_gte, + created_dt_lt=created_dt_lt, + created_dt_lte=created_dt_lte, + description=description, exclude_fields=exclude_fields, include_fields=include_fields, include_meta_attr=include_meta_attr, limit=limit, offset=offset, + type=type, + updated_dt=updated_dt, + updated_dt_date=updated_dt_date, + updated_dt_date_gte=updated_dt_date_gte, + updated_dt_date_lte=updated_dt_date_lte, + updated_dt_gt=updated_dt_gt, + updated_dt_gte=updated_dt_gte, + updated_dt_lt=updated_dt_lt, + updated_dt_lte=updated_dt_lte, + url=url, + uuid=uuid, ).parsed @@ -157,20 +378,60 @@ async def async_detailed( flaw_id: str, *, client: AuthenticatedClient, + created_dt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_date: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + description: Union[Unset, None, str] = UNSET, exclude_fields: Union[Unset, None, List[str]] = UNSET, include_fields: Union[Unset, None, List[str]] = UNSET, include_meta_attr: Union[Unset, None, List[str]] = UNSET, limit: Union[Unset, None, int] = UNSET, offset: Union[Unset, None, int] = UNSET, + type: Union[Unset, None, OsidbApiV1FlawsReferencesListType] = UNSET, + updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + url: Union[Unset, None, str] = UNSET, + uuid: Union[Unset, None, str] = UNSET, ) -> Response[OsidbApiV1FlawsReferencesListResponse200]: kwargs = _get_kwargs( flaw_id=flaw_id, client=client, + created_dt=created_dt, + created_dt_date=created_dt_date, + created_dt_date_gte=created_dt_date_gte, + created_dt_date_lte=created_dt_date_lte, + created_dt_gt=created_dt_gt, + created_dt_gte=created_dt_gte, + created_dt_lt=created_dt_lt, + created_dt_lte=created_dt_lte, + description=description, exclude_fields=exclude_fields, include_fields=include_fields, include_meta_attr=include_meta_attr, limit=limit, offset=offset, + type=type, + updated_dt=updated_dt, + updated_dt_date=updated_dt_date, + updated_dt_date_gte=updated_dt_date_gte, + updated_dt_date_lte=updated_dt_date_lte, + updated_dt_gt=updated_dt_gt, + updated_dt_gte=updated_dt_gte, + updated_dt_lt=updated_dt_lt, + updated_dt_lte=updated_dt_lte, + url=url, + uuid=uuid, ) async with client.get_async_session().get( @@ -188,11 +449,31 @@ async def async_( flaw_id: str, *, client: AuthenticatedClient, + created_dt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_date: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + created_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + created_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + created_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + description: Union[Unset, None, str] = UNSET, exclude_fields: Union[Unset, None, List[str]] = UNSET, include_fields: Union[Unset, None, List[str]] = UNSET, include_meta_attr: Union[Unset, None, List[str]] = UNSET, limit: Union[Unset, None, int] = UNSET, offset: Union[Unset, None, int] = UNSET, + type: Union[Unset, None, OsidbApiV1FlawsReferencesListType] = UNSET, + updated_dt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_date: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_gte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_date_lte: Union[Unset, None, datetime.date] = UNSET, + updated_dt_gt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_gte: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lt: Union[Unset, None, datetime.datetime] = UNSET, + updated_dt_lte: Union[Unset, None, datetime.datetime] = UNSET, + url: Union[Unset, None, str] = UNSET, + uuid: Union[Unset, None, str] = UNSET, ) -> Optional[OsidbApiV1FlawsReferencesListResponse200]: """ """ @@ -200,10 +481,30 @@ async def async_( await async_detailed( flaw_id=flaw_id, client=client, + created_dt=created_dt, + created_dt_date=created_dt_date, + created_dt_date_gte=created_dt_date_gte, + created_dt_date_lte=created_dt_date_lte, + created_dt_gt=created_dt_gt, + created_dt_gte=created_dt_gte, + created_dt_lt=created_dt_lt, + created_dt_lte=created_dt_lte, + description=description, exclude_fields=exclude_fields, include_fields=include_fields, include_meta_attr=include_meta_attr, limit=limit, offset=offset, + type=type, + updated_dt=updated_dt, + updated_dt_date=updated_dt_date, + updated_dt_date_gte=updated_dt_date_gte, + updated_dt_date_lte=updated_dt_date_lte, + updated_dt_gt=updated_dt_gt, + updated_dt_gte=updated_dt_gte, + updated_dt_lt=updated_dt_lt, + updated_dt_lte=updated_dt_lte, + url=url, + uuid=uuid, ) ).parsed diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_references_update.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_references_update.py index 1f3c7a4..b1d3f9d 100644 --- a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_references_update.py +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_references_update.py @@ -3,14 +3,14 @@ import requests from ...client import AuthenticatedClient -from ...models.flaw_reference import FlawReference +from ...models.flaw_reference_put import FlawReferencePut from ...models.osidb_api_v1_flaws_references_update_response_200 import ( OsidbApiV1FlawsReferencesUpdateResponse200, ) from ...types import UNSET, Response, Unset QUERY_PARAMS = {} -REQUEST_BODY_TYPE = FlawReference +REQUEST_BODY_TYPE = FlawReferencePut def _get_kwargs( @@ -18,9 +18,9 @@ def _get_kwargs( id: str, *, client: AuthenticatedClient, - form_data: FlawReference, - multipart_data: FlawReference, - json_body: FlawReference, + form_data: FlawReferencePut, + multipart_data: FlawReferencePut, + json_body: FlawReferencePut, ) -> Dict[str, Any]: url = "{}/osidb/api/v1/flaws/{flaw_id}/references/{id}".format( client.base_url, @@ -78,9 +78,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - form_data: FlawReference, - multipart_data: FlawReference, - json_body: FlawReference, + form_data: FlawReferencePut, + multipart_data: FlawReferencePut, + json_body: FlawReferencePut, ) -> Response[OsidbApiV1FlawsReferencesUpdateResponse200]: kwargs = _get_kwargs( flaw_id=flaw_id, @@ -107,9 +107,9 @@ def sync( id: str, *, client: AuthenticatedClient, - form_data: FlawReference, - multipart_data: FlawReference, - json_body: FlawReference, + form_data: FlawReferencePut, + multipart_data: FlawReferencePut, + json_body: FlawReferencePut, ) -> Optional[OsidbApiV1FlawsReferencesUpdateResponse200]: """ """ @@ -128,9 +128,9 @@ async def async_detailed( id: str, *, client: AuthenticatedClient, - form_data: FlawReference, - multipart_data: FlawReference, - json_body: FlawReference, + form_data: FlawReferencePut, + multipart_data: FlawReferencePut, + json_body: FlawReferencePut, ) -> Response[OsidbApiV1FlawsReferencesUpdateResponse200]: kwargs = _get_kwargs( flaw_id=flaw_id, @@ -157,9 +157,9 @@ async def async_( id: str, *, client: AuthenticatedClient, - form_data: FlawReference, - multipart_data: FlawReference, - json_body: FlawReference, + form_data: FlawReferencePut, + multipart_data: FlawReferencePut, + json_body: FlawReferencePut, ) -> Optional[OsidbApiV1FlawsReferencesUpdateResponse200]: """ """ diff --git a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_update.py b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_update.py index c0d296a..18d26af 100644 --- a/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_update.py +++ b/osidb_bindings/bindings/python_client/api/osidb/osidb_api_v1_flaws_update.py @@ -20,6 +20,8 @@ def _get_kwargs( form_data: Flaw, multipart_data: Flaw, json_body: Flaw, + bugzilla_api_key: str, + jira_api_key: str, ) -> Dict[str, Any]: url = "{}/osidb/api/v1/flaws/{id}".format( client.base_url, @@ -28,6 +30,9 @@ def _get_kwargs( headers: Dict[str, Any] = client.get_headers() + headers["bugzilla-api-key"] = bugzilla_api_key + headers["jira-api-key"] = jira_api_key + json_json_body: Dict[str, Any] = UNSET if not isinstance(json_body, Unset): json_body.to_dict() @@ -76,6 +81,8 @@ def sync_detailed( form_data: Flaw, multipart_data: Flaw, json_body: Flaw, + bugzilla_api_key: str, + jira_api_key: str, ) -> Response[OsidbApiV1FlawsUpdateResponse200]: kwargs = _get_kwargs( id=id, @@ -83,6 +90,8 @@ def sync_detailed( form_data=form_data, multipart_data=multipart_data, json_body=json_body, + bugzilla_api_key=bugzilla_api_key, + jira_api_key=jira_api_key, ) response = requests.put( @@ -103,6 +112,8 @@ def sync( form_data: Flaw, multipart_data: Flaw, json_body: Flaw, + bugzilla_api_key: str, + jira_api_key: str, ) -> Optional[OsidbApiV1FlawsUpdateResponse200]: """ """ @@ -112,6 +123,8 @@ def sync( form_data=form_data, multipart_data=multipart_data, json_body=json_body, + bugzilla_api_key=bugzilla_api_key, + jira_api_key=jira_api_key, ).parsed @@ -122,6 +135,8 @@ async def async_detailed( form_data: Flaw, multipart_data: Flaw, json_body: Flaw, + bugzilla_api_key: str, + jira_api_key: str, ) -> Response[OsidbApiV1FlawsUpdateResponse200]: kwargs = _get_kwargs( id=id, @@ -129,6 +144,8 @@ async def async_detailed( form_data=form_data, multipart_data=multipart_data, json_body=json_body, + bugzilla_api_key=bugzilla_api_key, + jira_api_key=jira_api_key, ) async with client.get_async_session().put( @@ -149,6 +166,8 @@ async def async_( form_data: Flaw, multipart_data: Flaw, json_body: Flaw, + bugzilla_api_key: str, + jira_api_key: str, ) -> Optional[OsidbApiV1FlawsUpdateResponse200]: """ """ @@ -159,5 +178,7 @@ async def async_( form_data=form_data, multipart_data=multipart_data, json_body=json_body, + bugzilla_api_key=bugzilla_api_key, + jira_api_key=jira_api_key, ) ).parsed diff --git a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_group_create.py b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_group_create.py index 24b3bfd..6041c61 100644 --- a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_group_create.py +++ b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_group_create.py @@ -19,7 +19,7 @@ def _get_kwargs( client: AuthenticatedClient, description: Union[Unset, None, str] = UNSET, name: str, - jira_authentication: str, + jira_api_key: str, ) -> Dict[str, Any]: url = "{}/taskman/api/v1/group".format( client.base_url, @@ -27,7 +27,7 @@ def _get_kwargs( headers: Dict[str, Any] = client.get_headers() - headers["jira-authentication"] = jira_authentication + headers["jira-api-key"] = jira_api_key params: Dict[str, Any] = { "description": description, @@ -73,13 +73,13 @@ def sync_detailed( client: AuthenticatedClient, description: Union[Unset, None, str] = UNSET, name: str, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1GroupCreateResponse200]: kwargs = _get_kwargs( client=client, description=description, name=name, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) response = requests.post( @@ -98,7 +98,7 @@ def sync( client: AuthenticatedClient, description: Union[Unset, None, str] = UNSET, name: str, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1GroupCreateResponse200]: """Create a new group of tasks""" @@ -106,7 +106,7 @@ def sync( client=client, description=description, name=name, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ).parsed @@ -115,13 +115,13 @@ async def async_detailed( client: AuthenticatedClient, description: Union[Unset, None, str] = UNSET, name: str, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1GroupCreateResponse200]: kwargs = _get_kwargs( client=client, description=description, name=name, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) async with client.get_async_session().post( @@ -140,7 +140,7 @@ async def async_( client: AuthenticatedClient, description: Union[Unset, None, str] = UNSET, name: str, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1GroupCreateResponse200]: """Create a new group of tasks""" @@ -149,6 +149,6 @@ async def async_( client=client, description=description, name=name, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) ).parsed diff --git a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_group_retrieve.py b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_group_retrieve.py index 999c0f4..b377664 100644 --- a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_group_retrieve.py +++ b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_group_retrieve.py @@ -15,7 +15,7 @@ def _get_kwargs( group_key: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Dict[str, Any]: url = "{}/taskman/api/v1/group/{group_key}".format( client.base_url, @@ -24,7 +24,7 @@ def _get_kwargs( headers: Dict[str, Any] = client.get_headers() - headers["jira-authentication"] = jira_authentication + headers["jira-api-key"] = jira_api_key return { "url": url, @@ -62,12 +62,12 @@ def sync_detailed( group_key: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1GroupRetrieveResponse200]: kwargs = _get_kwargs( group_key=group_key, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) response = requests.get( @@ -85,14 +85,14 @@ def sync( group_key: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1GroupRetrieveResponse200]: """Get a list of tasks from a group""" return sync_detailed( group_key=group_key, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ).parsed @@ -100,12 +100,12 @@ async def async_detailed( group_key: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1GroupRetrieveResponse200]: kwargs = _get_kwargs( group_key=group_key, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) async with client.get_async_session().get( @@ -123,7 +123,7 @@ async def async_( group_key: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1GroupRetrieveResponse200]: """Get a list of tasks from a group""" @@ -131,6 +131,6 @@ async def async_( await async_detailed( group_key=group_key, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) ).parsed diff --git a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_group_update.py b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_group_update.py index 0c37d50..69088be 100644 --- a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_group_update.py +++ b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_group_update.py @@ -18,7 +18,7 @@ def _get_kwargs( *, client: AuthenticatedClient, task_key: str, - jira_authentication: str, + jira_api_key: str, ) -> Dict[str, Any]: url = "{}/taskman/api/v1/group/{group_key}".format( client.base_url, @@ -27,7 +27,7 @@ def _get_kwargs( headers: Dict[str, Any] = client.get_headers() - headers["jira-authentication"] = jira_authentication + headers["jira-api-key"] = jira_api_key params: Dict[str, Any] = { "task_key": task_key, @@ -72,13 +72,13 @@ def sync_detailed( *, client: AuthenticatedClient, task_key: str, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1GroupUpdateResponse200]: kwargs = _get_kwargs( group_key=group_key, client=client, task_key=task_key, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) response = requests.put( @@ -97,7 +97,7 @@ def sync( *, client: AuthenticatedClient, task_key: str, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1GroupUpdateResponse200]: """Add a task into a group""" @@ -105,7 +105,7 @@ def sync( group_key=group_key, client=client, task_key=task_key, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ).parsed @@ -114,13 +114,13 @@ async def async_detailed( *, client: AuthenticatedClient, task_key: str, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1GroupUpdateResponse200]: kwargs = _get_kwargs( group_key=group_key, client=client, task_key=task_key, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) async with client.get_async_session().put( @@ -139,7 +139,7 @@ async def async_( *, client: AuthenticatedClient, task_key: str, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1GroupUpdateResponse200]: """Add a task into a group""" @@ -148,6 +148,6 @@ async def async_( group_key=group_key, client=client, task_key=task_key, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) ).parsed diff --git a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_assignee_retrieve.py b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_assignee_retrieve.py index 836c6cd..2de3c76 100644 --- a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_assignee_retrieve.py +++ b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_assignee_retrieve.py @@ -15,7 +15,7 @@ def _get_kwargs( user: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Dict[str, Any]: url = "{}/taskman/api/v1/task/assignee/{user}".format( client.base_url, @@ -24,7 +24,7 @@ def _get_kwargs( headers: Dict[str, Any] = client.get_headers() - headers["jira-authentication"] = jira_authentication + headers["jira-api-key"] = jira_api_key return { "url": url, @@ -64,12 +64,12 @@ def sync_detailed( user: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1TaskAssigneeRetrieveResponse200]: kwargs = _get_kwargs( user=user, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) response = requests.get( @@ -87,14 +87,14 @@ def sync( user: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1TaskAssigneeRetrieveResponse200]: """Get a list of tasks from a user""" return sync_detailed( user=user, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ).parsed @@ -102,12 +102,12 @@ async def async_detailed( user: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1TaskAssigneeRetrieveResponse200]: kwargs = _get_kwargs( user=user, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) async with client.get_async_session().get( @@ -125,7 +125,7 @@ async def async_( user: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1TaskAssigneeRetrieveResponse200]: """Get a list of tasks from a user""" @@ -133,6 +133,6 @@ async def async_( await async_detailed( user=user, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) ).parsed diff --git a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_assignee_update.py b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_assignee_update.py index 3b408be..5b8c24c 100644 --- a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_assignee_update.py +++ b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_assignee_update.py @@ -18,7 +18,7 @@ def _get_kwargs( *, client: AuthenticatedClient, task_key: str, - jira_authentication: str, + jira_api_key: str, ) -> Dict[str, Any]: url = "{}/taskman/api/v1/task/assignee/{user}".format( client.base_url, @@ -27,7 +27,7 @@ def _get_kwargs( headers: Dict[str, Any] = client.get_headers() - headers["jira-authentication"] = jira_authentication + headers["jira-api-key"] = jira_api_key params: Dict[str, Any] = { "task_key": task_key, @@ -74,13 +74,13 @@ def sync_detailed( *, client: AuthenticatedClient, task_key: str, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1TaskAssigneeUpdateResponse200]: kwargs = _get_kwargs( user=user, client=client, task_key=task_key, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) response = requests.put( @@ -99,7 +99,7 @@ def sync( *, client: AuthenticatedClient, task_key: str, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1TaskAssigneeUpdateResponse200]: """Assign a task to a user""" @@ -107,7 +107,7 @@ def sync( user=user, client=client, task_key=task_key, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ).parsed @@ -116,13 +116,13 @@ async def async_detailed( *, client: AuthenticatedClient, task_key: str, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1TaskAssigneeUpdateResponse200]: kwargs = _get_kwargs( user=user, client=client, task_key=task_key, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) async with client.get_async_session().put( @@ -141,7 +141,7 @@ async def async_( *, client: AuthenticatedClient, task_key: str, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1TaskAssigneeUpdateResponse200]: """Assign a task to a user""" @@ -150,6 +150,6 @@ async def async_( user=user, client=client, task_key=task_key, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) ).parsed diff --git a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_comment_create.py b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_comment_create.py index a6e4120..614f50c 100644 --- a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_comment_create.py +++ b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_comment_create.py @@ -18,7 +18,7 @@ def _get_kwargs( *, client: AuthenticatedClient, content: str, - jira_authentication: str, + jira_api_key: str, ) -> Dict[str, Any]: url = "{}/taskman/api/v1/task/{task_key}/comment".format( client.base_url, @@ -27,7 +27,7 @@ def _get_kwargs( headers: Dict[str, Any] = client.get_headers() - headers["jira-authentication"] = jira_authentication + headers["jira-api-key"] = jira_api_key params: Dict[str, Any] = { "content": content, @@ -74,13 +74,13 @@ def sync_detailed( *, client: AuthenticatedClient, content: str, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1TaskCommentCreateResponse200]: kwargs = _get_kwargs( task_key=task_key, client=client, content=content, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) response = requests.post( @@ -99,7 +99,7 @@ def sync( *, client: AuthenticatedClient, content: str, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1TaskCommentCreateResponse200]: """Create a new comment in a task""" @@ -107,7 +107,7 @@ def sync( task_key=task_key, client=client, content=content, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ).parsed @@ -116,13 +116,13 @@ async def async_detailed( *, client: AuthenticatedClient, content: str, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1TaskCommentCreateResponse200]: kwargs = _get_kwargs( task_key=task_key, client=client, content=content, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) async with client.get_async_session().post( @@ -141,7 +141,7 @@ async def async_( *, client: AuthenticatedClient, content: str, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1TaskCommentCreateResponse200]: """Create a new comment in a task""" @@ -150,6 +150,6 @@ async def async_( task_key=task_key, client=client, content=content, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) ).parsed diff --git a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_comment_update.py b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_comment_update.py index bde5a65..9e30dac 100644 --- a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_comment_update.py +++ b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_comment_update.py @@ -19,7 +19,7 @@ def _get_kwargs( *, client: AuthenticatedClient, content: str, - jira_authentication: str, + jira_api_key: str, ) -> Dict[str, Any]: url = "{}/taskman/api/v1/task/{task_key}/comment/{comment_id}".format( client.base_url, @@ -29,7 +29,7 @@ def _get_kwargs( headers: Dict[str, Any] = client.get_headers() - headers["jira-authentication"] = jira_authentication + headers["jira-api-key"] = jira_api_key params: Dict[str, Any] = { "content": content, @@ -77,14 +77,14 @@ def sync_detailed( *, client: AuthenticatedClient, content: str, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1TaskCommentUpdateResponse200]: kwargs = _get_kwargs( task_key=task_key, comment_id=comment_id, client=client, content=content, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) response = requests.put( @@ -104,7 +104,7 @@ def sync( *, client: AuthenticatedClient, content: str, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1TaskCommentUpdateResponse200]: """Edit a comment in a task""" @@ -113,7 +113,7 @@ def sync( comment_id=comment_id, client=client, content=content, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ).parsed @@ -123,14 +123,14 @@ async def async_detailed( *, client: AuthenticatedClient, content: str, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1TaskCommentUpdateResponse200]: kwargs = _get_kwargs( task_key=task_key, comment_id=comment_id, client=client, content=content, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) async with client.get_async_session().put( @@ -150,7 +150,7 @@ async def async_( *, client: AuthenticatedClient, content: str, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1TaskCommentUpdateResponse200]: """Edit a comment in a task""" @@ -160,6 +160,6 @@ async def async_( comment_id=comment_id, client=client, content=content, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) ).parsed diff --git a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_flaw_create.py b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_flaw_create.py index 5505093..40723c3 100644 --- a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_flaw_create.py +++ b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_flaw_create.py @@ -15,7 +15,7 @@ def _get_kwargs( flaw_uuid: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Dict[str, Any]: url = "{}/taskman/api/v1/task/flaw/{flaw_uuid}".format( client.base_url, @@ -24,7 +24,7 @@ def _get_kwargs( headers: Dict[str, Any] = client.get_headers() - headers["jira-authentication"] = jira_authentication + headers["jira-api-key"] = jira_api_key return { "url": url, @@ -64,12 +64,12 @@ def sync_detailed( flaw_uuid: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1TaskFlawCreateResponse200]: kwargs = _get_kwargs( flaw_uuid=flaw_uuid, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) response = requests.post( @@ -87,14 +87,14 @@ def sync( flaw_uuid: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1TaskFlawCreateResponse200]: """Create a task in Jira from a Flaw""" return sync_detailed( flaw_uuid=flaw_uuid, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ).parsed @@ -102,12 +102,12 @@ async def async_detailed( flaw_uuid: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1TaskFlawCreateResponse200]: kwargs = _get_kwargs( flaw_uuid=flaw_uuid, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) async with client.get_async_session().post( @@ -125,7 +125,7 @@ async def async_( flaw_uuid: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1TaskFlawCreateResponse200]: """Create a task in Jira from a Flaw""" @@ -133,6 +133,6 @@ async def async_( await async_detailed( flaw_uuid=flaw_uuid, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) ).parsed diff --git a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_flaw_retrieve.py b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_flaw_retrieve.py index 93b7230..d7b9bd0 100644 --- a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_flaw_retrieve.py +++ b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_flaw_retrieve.py @@ -15,7 +15,7 @@ def _get_kwargs( flaw_uuid: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Dict[str, Any]: url = "{}/taskman/api/v1/task/flaw/{flaw_uuid}".format( client.base_url, @@ -24,7 +24,7 @@ def _get_kwargs( headers: Dict[str, Any] = client.get_headers() - headers["jira-authentication"] = jira_authentication + headers["jira-api-key"] = jira_api_key return { "url": url, @@ -64,12 +64,12 @@ def sync_detailed( flaw_uuid: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1TaskFlawRetrieveResponse200]: kwargs = _get_kwargs( flaw_uuid=flaw_uuid, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) response = requests.get( @@ -87,14 +87,14 @@ def sync( flaw_uuid: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1TaskFlawRetrieveResponse200]: """Get a task from Jira given a Flaw uuid""" return sync_detailed( flaw_uuid=flaw_uuid, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ).parsed @@ -102,12 +102,12 @@ async def async_detailed( flaw_uuid: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1TaskFlawRetrieveResponse200]: kwargs = _get_kwargs( flaw_uuid=flaw_uuid, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) async with client.get_async_session().get( @@ -125,7 +125,7 @@ async def async_( flaw_uuid: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1TaskFlawRetrieveResponse200]: """Get a task from Jira given a Flaw uuid""" @@ -133,6 +133,6 @@ async def async_( await async_detailed( flaw_uuid=flaw_uuid, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) ).parsed diff --git a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_flaw_update.py b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_flaw_update.py index 30d925c..564d804 100644 --- a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_flaw_update.py +++ b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_flaw_update.py @@ -15,7 +15,7 @@ def _get_kwargs( flaw_uuid: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Dict[str, Any]: url = "{}/taskman/api/v1/task/flaw/{flaw_uuid}".format( client.base_url, @@ -24,7 +24,7 @@ def _get_kwargs( headers: Dict[str, Any] = client.get_headers() - headers["jira-authentication"] = jira_authentication + headers["jira-api-key"] = jira_api_key return { "url": url, @@ -64,12 +64,12 @@ def sync_detailed( flaw_uuid: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1TaskFlawUpdateResponse200]: kwargs = _get_kwargs( flaw_uuid=flaw_uuid, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) response = requests.put( @@ -87,14 +87,14 @@ def sync( flaw_uuid: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1TaskFlawUpdateResponse200]: """Update a task in Jira from a Flaw""" return sync_detailed( flaw_uuid=flaw_uuid, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ).parsed @@ -102,12 +102,12 @@ async def async_detailed( flaw_uuid: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1TaskFlawUpdateResponse200]: kwargs = _get_kwargs( flaw_uuid=flaw_uuid, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) async with client.get_async_session().put( @@ -125,7 +125,7 @@ async def async_( flaw_uuid: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1TaskFlawUpdateResponse200]: """Update a task in Jira from a Flaw""" @@ -133,6 +133,6 @@ async def async_( await async_detailed( flaw_uuid=flaw_uuid, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) ).parsed diff --git a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_retrieve.py b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_retrieve.py index 6699b34..ae4fcfc 100644 --- a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_retrieve.py +++ b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_retrieve.py @@ -15,7 +15,7 @@ def _get_kwargs( task_key: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Dict[str, Any]: url = "{}/taskman/api/v1/task/{task_key}".format( client.base_url, @@ -24,7 +24,7 @@ def _get_kwargs( headers: Dict[str, Any] = client.get_headers() - headers["jira-authentication"] = jira_authentication + headers["jira-api-key"] = jira_api_key return { "url": url, @@ -62,12 +62,12 @@ def sync_detailed( task_key: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1TaskRetrieveResponse200]: kwargs = _get_kwargs( task_key=task_key, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) response = requests.get( @@ -85,14 +85,14 @@ def sync( task_key: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1TaskRetrieveResponse200]: """Get a task from Jira given a task key""" return sync_detailed( task_key=task_key, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ).parsed @@ -100,12 +100,12 @@ async def async_detailed( task_key: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1TaskRetrieveResponse200]: kwargs = _get_kwargs( task_key=task_key, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) async with client.get_async_session().get( @@ -123,7 +123,7 @@ async def async_( task_key: str, *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1TaskRetrieveResponse200]: """Get a task from Jira given a task key""" @@ -131,6 +131,6 @@ async def async_( await async_detailed( task_key=task_key, client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) ).parsed diff --git a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_status_update.py b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_status_update.py index 31c2ba3..42e7dc1 100644 --- a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_status_update.py +++ b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_status_update.py @@ -31,7 +31,7 @@ def _get_kwargs( reason: Union[Unset, None, TaskmanApiV1TaskStatusUpdateReason] = UNSET, resolution: Union[Unset, None, TaskmanApiV1TaskStatusUpdateResolution] = UNSET, status: TaskmanApiV1TaskStatusUpdateStatus, - jira_authentication: str, + jira_api_key: str, ) -> Dict[str, Any]: url = "{}/taskman/api/v1/task/{task_key}/status".format( client.base_url, @@ -40,7 +40,7 @@ def _get_kwargs( headers: Dict[str, Any] = client.get_headers() - headers["jira-authentication"] = jira_authentication + headers["jira-api-key"] = jira_api_key json_reason: Union[Unset, None, str] = UNSET if not isinstance(reason, Unset): @@ -112,7 +112,7 @@ def sync_detailed( reason: Union[Unset, None, TaskmanApiV1TaskStatusUpdateReason] = UNSET, resolution: Union[Unset, None, TaskmanApiV1TaskStatusUpdateResolution] = UNSET, status: TaskmanApiV1TaskStatusUpdateStatus, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1TaskStatusUpdateResponse200]: kwargs = _get_kwargs( task_key=task_key, @@ -120,7 +120,7 @@ def sync_detailed( reason=reason, resolution=resolution, status=status, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) response = requests.put( @@ -141,7 +141,7 @@ def sync( reason: Union[Unset, None, TaskmanApiV1TaskStatusUpdateReason] = UNSET, resolution: Union[Unset, None, TaskmanApiV1TaskStatusUpdateResolution] = UNSET, status: TaskmanApiV1TaskStatusUpdateStatus, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1TaskStatusUpdateResponse200]: """Change a task workflow status""" @@ -151,7 +151,7 @@ def sync( reason=reason, resolution=resolution, status=status, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ).parsed @@ -162,7 +162,7 @@ async def async_detailed( reason: Union[Unset, None, TaskmanApiV1TaskStatusUpdateReason] = UNSET, resolution: Union[Unset, None, TaskmanApiV1TaskStatusUpdateResolution] = UNSET, status: TaskmanApiV1TaskStatusUpdateStatus, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1TaskStatusUpdateResponse200]: kwargs = _get_kwargs( task_key=task_key, @@ -170,7 +170,7 @@ async def async_detailed( reason=reason, resolution=resolution, status=status, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) async with client.get_async_session().put( @@ -191,7 +191,7 @@ async def async_( reason: Union[Unset, None, TaskmanApiV1TaskStatusUpdateReason] = UNSET, resolution: Union[Unset, None, TaskmanApiV1TaskStatusUpdateResolution] = UNSET, status: TaskmanApiV1TaskStatusUpdateStatus, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1TaskStatusUpdateResponse200]: """Change a task workflow status""" @@ -202,6 +202,6 @@ async def async_( reason=reason, resolution=resolution, status=status, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) ).parsed diff --git a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_unassigned_retrieve.py b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_unassigned_retrieve.py index b201631..99cd852 100644 --- a/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_unassigned_retrieve.py +++ b/osidb_bindings/bindings/python_client/api/taskman/taskman_api_v1_task_unassigned_retrieve.py @@ -14,7 +14,7 @@ def _get_kwargs( *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Dict[str, Any]: url = "{}/taskman/api/v1/task/unassigned/".format( client.base_url, @@ -22,7 +22,7 @@ def _get_kwargs( headers: Dict[str, Any] = client.get_headers() - headers["jira-authentication"] = jira_authentication + headers["jira-api-key"] = jira_api_key return { "url": url, @@ -61,11 +61,11 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1TaskUnassignedRetrieveResponse200]: kwargs = _get_kwargs( client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) response = requests.get( @@ -82,24 +82,24 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1TaskUnassignedRetrieveResponse200]: """Get a list of tasks without an user assigned""" return sync_detailed( client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ).parsed async def async_detailed( *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Response[TaskmanApiV1TaskUnassignedRetrieveResponse200]: kwargs = _get_kwargs( client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) async with client.get_async_session().get( @@ -116,13 +116,13 @@ async def async_detailed( async def async_( *, client: AuthenticatedClient, - jira_authentication: str, + jira_api_key: str, ) -> Optional[TaskmanApiV1TaskUnassignedRetrieveResponse200]: """Get a list of tasks without an user assigned""" return ( await async_detailed( client=client, - jira_authentication=jira_authentication, + jira_api_key=jira_api_key, ) ).parsed diff --git a/osidb_bindings/bindings/python_client/api/trackers/__init__.py b/osidb_bindings/bindings/python_client/api/trackers/__init__.py new file mode 100644 index 0000000..7226d06 --- /dev/null +++ b/osidb_bindings/bindings/python_client/api/trackers/__init__.py @@ -0,0 +1 @@ +from .trackers_api_v1_file_create import * diff --git a/osidb_bindings/bindings/python_client/api/trackers/trackers_api_v1_file_create.py b/osidb_bindings/bindings/python_client/api/trackers/trackers_api_v1_file_create.py new file mode 100644 index 0000000..c3dbca5 --- /dev/null +++ b/osidb_bindings/bindings/python_client/api/trackers/trackers_api_v1_file_create.py @@ -0,0 +1,159 @@ +from typing import Any, Dict, List, Optional + +import requests + +from ...client import AuthenticatedClient +from ...models.flaw_uuid_list import FlawUUIDList +from ...models.tracker_suggestion import TrackerSuggestion +from ...types import UNSET, Response, Unset + +QUERY_PARAMS = {} +REQUEST_BODY_TYPE = FlawUUIDList + + +def _get_kwargs( + *, + client: AuthenticatedClient, + form_data: FlawUUIDList, + multipart_data: FlawUUIDList, + json_body: FlawUUIDList, +) -> Dict[str, Any]: + url = "{}/trackers/api/v1/file".format( + client.base_url, + ) + + headers: Dict[str, Any] = client.get_headers() + + json_json_body: Dict[str, Any] = UNSET + if not isinstance(json_body, Unset): + json_body.to_dict() + + multipart_multipart_data: Dict[str, Any] = UNSET + if not isinstance(multipart_data, Unset): + multipart_data.to_multipart() + + return { + "url": url, + "headers": headers, + "data": form_data.to_dict(), + } + + +def _parse_response( + *, response: requests.Response +) -> Optional[List[TrackerSuggestion]]: + if response.status_code == 200: + response_200 = [] + _response_200 = response.json() + if _response_200 is UNSET: + response_200 = UNSET + else: + for response_200_item_data in _response_200 or []: + _response_200_item = response_200_item_data + response_200_item: TrackerSuggestion + if isinstance(_response_200_item, Unset): + response_200_item = UNSET + else: + response_200_item = TrackerSuggestion.from_dict(_response_200_item) + + response_200.append(response_200_item) + + return response_200 + return None + + +def _build_response( + *, response: requests.Response +) -> Response[List[TrackerSuggestion]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, + form_data: FlawUUIDList, + multipart_data: FlawUUIDList, + json_body: FlawUUIDList, +) -> Response[List[TrackerSuggestion]]: + kwargs = _get_kwargs( + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ) + + response = requests.post( + verify=client.verify_ssl, + auth=client.auth, + timeout=client.timeout, + **kwargs, + ) + response.raise_for_status() + + return _build_response(response=response) + + +def sync( + *, + client: AuthenticatedClient, + form_data: FlawUUIDList, + multipart_data: FlawUUIDList, + json_body: FlawUUIDList, +) -> Optional[List[TrackerSuggestion]]: + """Given a list of flaws, generates a list of suggested trackers to file.""" + + return sync_detailed( + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ).parsed + + +async def async_detailed( + *, + client: AuthenticatedClient, + form_data: FlawUUIDList, + multipart_data: FlawUUIDList, + json_body: FlawUUIDList, +) -> Response[List[TrackerSuggestion]]: + kwargs = _get_kwargs( + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ) + + async with client.get_async_session().post( + verify_ssl=client.verify_ssl, raise_for_status=True, **kwargs + ) as response: + content = await response.read() + resp = requests.Response() + resp.status_code = response.status + resp._content = content + + return _build_response(response=resp) + + +async def async_( + *, + client: AuthenticatedClient, + form_data: FlawUUIDList, + multipart_data: FlawUUIDList, + json_body: FlawUUIDList, +) -> Optional[List[TrackerSuggestion]]: + """Given a list of flaws, generates a list of suggested trackers to file.""" + + return ( + await async_detailed( + client=client, + form_data=form_data, + multipart_data=multipart_data, + json_body=json_body, + ) + ).parsed diff --git a/osidb_bindings/bindings/python_client/models/__init__.py b/osidb_bindings/bindings/python_client/models/__init__.py index 59c59d0..6765b14 100644 --- a/osidb_bindings/bindings/python_client/models/__init__.py +++ b/osidb_bindings/bindings/python_client/models/__init__.py @@ -1,6 +1,9 @@ """ Contains all the data models used in inputs/outputs """ from .affect import Affect +from .affect_cvss import AffectCVSS +from .affect_cvss_post import AffectCVSSPost +from .affect_cvss_put import AffectCVSSPut from .affect_meta_attr import AffectMetaAttr from .affect_post import AffectPost from .affect_post_meta_attr import AffectPostMetaAttr @@ -33,8 +36,6 @@ from .collectors_retrieve_response_200 import CollectorsRetrieveResponse200 from .comment import Comment from .comment_meta_attr import CommentMetaAttr -from .cv_ev_5_package_versions import CVEv5PackageVersions -from .cv_ev_5_versions import CVEv5Versions from .epss import EPSS from .erratum import Erratum from .exploit_only_report_data import ExploitOnlyReportData @@ -95,18 +96,28 @@ from .flaw_comment_post import FlawCommentPost from .flaw_comment_post_meta_attr import FlawCommentPostMetaAttr from .flaw_comment_type import FlawCommentType +from .flaw_cvss import FlawCVSS +from .flaw_cvss_post import FlawCVSSPost +from .flaw_cvss_put import FlawCVSSPut from .flaw_meta_attr import FlawMetaAttr from .flaw_meta_type import FlawMetaType +from .flaw_package_version import FlawPackageVersion +from .flaw_package_version_post import FlawPackageVersionPost +from .flaw_package_version_put import FlawPackageVersionPut from .flaw_post import FlawPost from .flaw_post_classification import FlawPostClassification from .flaw_post_classification_state import FlawPostClassificationState from .flaw_post_meta_attr import FlawPostMetaAttr from .flaw_reference import FlawReference from .flaw_reference_post import FlawReferencePost +from .flaw_reference_put import FlawReferencePut from .flaw_reference_type import FlawReferenceType from .flaw_report_data import FlawReportData from .flaw_type import FlawType +from .flaw_uuid_list import FlawUUIDList +from .flaw_version import FlawVersion from .impact_enum import ImpactEnum +from .issuer_enum import IssuerEnum from .jira_comment import JiraComment from .jira_issue import JiraIssue from .jira_issue_fields import JiraIssueFields @@ -117,12 +128,34 @@ from .maturity_preliminary_enum import MaturityPreliminaryEnum from .meta import Meta from .meta_meta_attr import MetaMetaAttr +from .module_component import ModuleComponent from .nist_cvss_validation_enum import NistCvssValidationEnum from .osidb_api_v1_affects_create_response_201 import OsidbApiV1AffectsCreateResponse201 -from .osidb_api_v1_affects_destroy_response_204 import ( - OsidbApiV1AffectsDestroyResponse204, +from .osidb_api_v1_affects_cvss_scores_create_response_201 import ( + OsidbApiV1AffectsCvssScoresCreateResponse201, +) +from .osidb_api_v1_affects_cvss_scores_destroy_response_204 import ( + OsidbApiV1AffectsCvssScoresDestroyResponse204, +) +from .osidb_api_v1_affects_cvss_scores_list_issuer import ( + OsidbApiV1AffectsCvssScoresListIssuer, +) +from .osidb_api_v1_affects_cvss_scores_list_response_200 import ( + OsidbApiV1AffectsCvssScoresListResponse200, +) +from .osidb_api_v1_affects_cvss_scores_retrieve_response_200 import ( + OsidbApiV1AffectsCvssScoresRetrieveResponse200, +) +from .osidb_api_v1_affects_cvss_scores_update_response_200 import ( + OsidbApiV1AffectsCvssScoresUpdateResponse200, +) +from .osidb_api_v1_affects_destroy_response_200 import ( + OsidbApiV1AffectsDestroyResponse200, ) from .osidb_api_v1_affects_list_affectedness import OsidbApiV1AffectsListAffectedness +from .osidb_api_v1_affects_list_cvss_scores_issuer import ( + OsidbApiV1AffectsListCvssScoresIssuer, +) from .osidb_api_v1_affects_list_flaw_impact import OsidbApiV1AffectsListFlawImpact from .osidb_api_v1_affects_list_flaw_source import OsidbApiV1AffectsListFlawSource from .osidb_api_v1_affects_list_flaw_type import OsidbApiV1AffectsListFlawType @@ -139,8 +172,8 @@ from .osidb_api_v1_flaws_acknowledgments_create_response_201 import ( OsidbApiV1FlawsAcknowledgmentsCreateResponse201, ) -from .osidb_api_v1_flaws_acknowledgments_destroy_response_204 import ( - OsidbApiV1FlawsAcknowledgmentsDestroyResponse204, +from .osidb_api_v1_flaws_acknowledgments_destroy_response_200 import ( + OsidbApiV1FlawsAcknowledgmentsDestroyResponse200, ) from .osidb_api_v1_flaws_acknowledgments_list_response_200 import ( OsidbApiV1FlawsAcknowledgmentsListResponse200, @@ -161,6 +194,24 @@ OsidbApiV1FlawsCommentsRetrieveResponse200, ) from .osidb_api_v1_flaws_create_response_201 import OsidbApiV1FlawsCreateResponse201 +from .osidb_api_v1_flaws_cvss_scores_create_response_201 import ( + OsidbApiV1FlawsCvssScoresCreateResponse201, +) +from .osidb_api_v1_flaws_cvss_scores_destroy_response_200 import ( + OsidbApiV1FlawsCvssScoresDestroyResponse200, +) +from .osidb_api_v1_flaws_cvss_scores_list_issuer import ( + OsidbApiV1FlawsCvssScoresListIssuer, +) +from .osidb_api_v1_flaws_cvss_scores_list_response_200 import ( + OsidbApiV1FlawsCvssScoresListResponse200, +) +from .osidb_api_v1_flaws_cvss_scores_retrieve_response_200 import ( + OsidbApiV1FlawsCvssScoresRetrieveResponse200, +) +from .osidb_api_v1_flaws_cvss_scores_update_response_200 import ( + OsidbApiV1FlawsCvssScoresUpdateResponse200, +) from .osidb_api_v1_flaws_list_affects_affectedness import ( OsidbApiV1FlawsListAffectsAffectedness, ) @@ -172,6 +223,9 @@ OsidbApiV1FlawsListAffectsTrackersType, ) from .osidb_api_v1_flaws_list_affects_type import OsidbApiV1FlawsListAffectsType +from .osidb_api_v1_flaws_list_cvss_scores_issuer import ( + OsidbApiV1FlawsListCvssScoresIssuer, +) from .osidb_api_v1_flaws_list_impact import OsidbApiV1FlawsListImpact from .osidb_api_v1_flaws_list_major_incident_state import ( OsidbApiV1FlawsListMajorIncidentState, @@ -180,19 +234,36 @@ OsidbApiV1FlawsListNistCvssValidation, ) from .osidb_api_v1_flaws_list_order_item import OsidbApiV1FlawsListOrderItem +from .osidb_api_v1_flaws_list_references_type import OsidbApiV1FlawsListReferencesType from .osidb_api_v1_flaws_list_requires_summary import OsidbApiV1FlawsListRequiresSummary from .osidb_api_v1_flaws_list_response_200 import OsidbApiV1FlawsListResponse200 from .osidb_api_v1_flaws_list_source import OsidbApiV1FlawsListSource from .osidb_api_v1_flaws_list_type import OsidbApiV1FlawsListType +from .osidb_api_v1_flaws_package_versions_create_response_201 import ( + OsidbApiV1FlawsPackageVersionsCreateResponse201, +) +from .osidb_api_v1_flaws_package_versions_destroy_response_200 import ( + OsidbApiV1FlawsPackageVersionsDestroyResponse200, +) +from .osidb_api_v1_flaws_package_versions_list_response_200 import ( + OsidbApiV1FlawsPackageVersionsListResponse200, +) +from .osidb_api_v1_flaws_package_versions_retrieve_response_200 import ( + OsidbApiV1FlawsPackageVersionsRetrieveResponse200, +) +from .osidb_api_v1_flaws_package_versions_update_response_200 import ( + OsidbApiV1FlawsPackageVersionsUpdateResponse200, +) from .osidb_api_v1_flaws_references_create_response_201 import ( OsidbApiV1FlawsReferencesCreateResponse201, ) -from .osidb_api_v1_flaws_references_destroy_response_204 import ( - OsidbApiV1FlawsReferencesDestroyResponse204, +from .osidb_api_v1_flaws_references_destroy_response_200 import ( + OsidbApiV1FlawsReferencesDestroyResponse200, ) from .osidb_api_v1_flaws_references_list_response_200 import ( OsidbApiV1FlawsReferencesListResponse200, ) +from .osidb_api_v1_flaws_references_list_type import OsidbApiV1FlawsReferencesListType from .osidb_api_v1_flaws_references_retrieve_response_200 import ( OsidbApiV1FlawsReferencesRetrieveResponse200, ) @@ -259,20 +330,25 @@ ) from .osim_healthy_retrieve_response_200 import OsimHealthyRetrieveResponse200 from .osim_retrieve_response_200 import OsimRetrieveResponse200 +from .package import Package +from .package_ver import PackageVer +from .paginated_affect_cvss_list import PaginatedAffectCVSSList from .paginated_affect_list import PaginatedAffectList from .paginated_epss_list import PaginatedEPSSList from .paginated_exploit_only_report_data_list import PaginatedExploitOnlyReportDataList from .paginated_flaw_acknowledgment_list import PaginatedFlawAcknowledgmentList from .paginated_flaw_comment_list import PaginatedFlawCommentList +from .paginated_flaw_cvss_list import PaginatedFlawCVSSList from .paginated_flaw_list import PaginatedFlawList +from .paginated_flaw_package_version_list import PaginatedFlawPackageVersionList from .paginated_flaw_reference_list import PaginatedFlawReferenceList from .paginated_flaw_report_data_list import PaginatedFlawReportDataList from .paginated_supported_products_list import PaginatedSupportedProductsList from .paginated_tracker_list import PaginatedTrackerList +from .ps_stream_selection import PsStreamSelection from .requires_summary_enum import RequiresSummaryEnum from .resolution_enum import ResolutionEnum from .source_666_enum import Source666Enum -from .status_enum import StatusEnum from .supported_products import SupportedProducts from .taskman_api_v1_group_create_response_200 import TaskmanApiV1GroupCreateResponse200 from .taskman_api_v1_group_retrieve_response_200 import ( @@ -321,4 +397,5 @@ from .tracker import Tracker from .tracker_meta_attr import TrackerMetaAttr from .tracker_report_data import TrackerReportData +from .tracker_suggestion import TrackerSuggestion from .tracker_type import TrackerType diff --git a/osidb_bindings/bindings/python_client/models/affect.py b/osidb_bindings/bindings/python_client/models/affect.py index 70c8878..89d94ba 100644 --- a/osidb_bindings/bindings/python_client/models/affect.py +++ b/osidb_bindings/bindings/python_client/models/affect.py @@ -5,6 +5,7 @@ import attr from dateutil.parser import isoparse +from ..models.affect_cvss import AffectCVSS from ..models.affect_meta_attr import AffectMetaAttr from ..models.affect_type import AffectType from ..models.affectedness_enum import AffectednessEnum @@ -27,6 +28,7 @@ class Affect(OSIDBModel): trackers: List[Tracker] meta_attr: AffectMetaAttr delegated_resolution: str + cvss_scores: List[AffectCVSS] embargoed: bool created_dt: datetime.datetime updated_dt: datetime.datetime @@ -60,6 +62,16 @@ def to_dict(self) -> Dict[str, Any]: meta_attr = self.meta_attr.to_dict() delegated_resolution = self.delegated_resolution + cvss_scores: List[Dict[str, Any]] = UNSET + if not isinstance(self.cvss_scores, Unset): + cvss_scores = [] + for cvss_scores_item_data in self.cvss_scores: + cvss_scores_item: Dict[str, Any] = UNSET + if not isinstance(cvss_scores_item_data, Unset): + cvss_scores_item = cvss_scores_item_data.to_dict() + + cvss_scores.append(cvss_scores_item) + embargoed = self.embargoed created_dt: str = UNSET if not isinstance(self.created_dt, Unset): @@ -139,6 +151,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["meta_attr"] = meta_attr if not isinstance(delegated_resolution, Unset): field_dict["delegated_resolution"] = delegated_resolution + if not isinstance(cvss_scores, Unset): + field_dict["cvss_scores"] = cvss_scores if not isinstance(embargoed, Unset): field_dict["embargoed"] = embargoed if not isinstance(created_dt, Unset): @@ -198,6 +212,17 @@ def to_multipart(self) -> Dict[str, Any]: if self.delegated_resolution is UNSET else (None, str(self.delegated_resolution), "text/plain") ) + cvss_scores: Union[Unset, Tuple[None, str, str]] = UNSET + if not isinstance(self.cvss_scores, Unset): + _temp_cvss_scores = [] + for cvss_scores_item_data in self.cvss_scores: + cvss_scores_item: Dict[str, Any] = UNSET + if not isinstance(cvss_scores_item_data, Unset): + cvss_scores_item = cvss_scores_item_data.to_dict() + + _temp_cvss_scores.append(cvss_scores_item) + cvss_scores = (None, json.dumps(_temp_cvss_scores), "application/json") + embargoed = ( self.embargoed if self.embargoed is UNSET @@ -298,6 +323,8 @@ def to_multipart(self) -> Dict[str, Any]: field_dict["meta_attr"] = meta_attr if not isinstance(delegated_resolution, Unset): field_dict["delegated_resolution"] = delegated_resolution + if not isinstance(cvss_scores, Unset): + field_dict["cvss_scores"] = cvss_scores if not isinstance(embargoed, Unset): field_dict["embargoed"] = embargoed if not isinstance(created_dt, Unset): @@ -358,6 +385,21 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: delegated_resolution = d.pop("delegated_resolution", UNSET) + cvss_scores = [] + _cvss_scores = d.pop("cvss_scores", UNSET) + if _cvss_scores is UNSET: + cvss_scores = UNSET + else: + for cvss_scores_item_data in _cvss_scores or []: + _cvss_scores_item = cvss_scores_item_data + cvss_scores_item: AffectCVSS + if isinstance(_cvss_scores_item, Unset): + cvss_scores_item = UNSET + else: + cvss_scores_item = AffectCVSS.from_dict(_cvss_scores_item) + + cvss_scores.append(cvss_scores_item) + embargoed = d.pop("embargoed", UNSET) _created_dt = d.pop("created_dt", UNSET) @@ -487,6 +529,7 @@ def _parse_impact(data: object) -> Union[BlankEnum, ImpactEnum, Unset]: trackers=trackers, meta_attr=meta_attr, delegated_resolution=delegated_resolution, + cvss_scores=cvss_scores, embargoed=embargoed, created_dt=created_dt, updated_dt=updated_dt, @@ -513,6 +556,7 @@ def get_fields(): "trackers": List[Tracker], "meta_attr": AffectMetaAttr, "delegated_resolution": str, + "cvss_scores": List[AffectCVSS], "embargoed": bool, "created_dt": datetime.datetime, "updated_dt": datetime.datetime, diff --git a/osidb_bindings/bindings/python_client/models/affect_cvss.py b/osidb_bindings/bindings/python_client/models/affect_cvss.py new file mode 100644 index 0000000..9cc7946 --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/affect_cvss.py @@ -0,0 +1,159 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.issuer_enum import IssuerEnum +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="AffectCVSS") + + +@attr.s(auto_attribs=True) +class AffectCVSS(OSIDBModel): + """AffectCVSS serializer""" + + cvss_version: str + issuer: IssuerEnum + uuid: str + vector: str + embargoed: bool + created_dt: datetime.datetime + updated_dt: datetime.datetime + affect: Union[Unset, str] = UNSET + comment: Union[Unset, str] = UNSET + score: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + cvss_version = self.cvss_version + issuer: str = UNSET + if not isinstance(self.issuer, Unset): + + issuer = IssuerEnum(self.issuer).value + + uuid = self.uuid + vector = self.vector + embargoed = self.embargoed + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + updated_dt: str = UNSET + if not isinstance(self.updated_dt, Unset): + updated_dt = self.updated_dt.isoformat() + + affect = self.affect + comment = self.comment + score = self.score + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(cvss_version, Unset): + field_dict["cvss_version"] = cvss_version + if not isinstance(issuer, Unset): + field_dict["issuer"] = issuer + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(vector, Unset): + field_dict["vector"] = vector + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(updated_dt, Unset): + field_dict["updated_dt"] = updated_dt + if not isinstance(affect, Unset): + field_dict["affect"] = affect + if not isinstance(comment, Unset): + field_dict["comment"] = comment + if not isinstance(score, Unset): + field_dict["score"] = score + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + cvss_version = d.pop("cvss_version", UNSET) + + _issuer = d.pop("issuer", UNSET) + issuer: IssuerEnum + if isinstance(_issuer, Unset): + issuer = UNSET + else: + issuer = IssuerEnum(_issuer) + + uuid = d.pop("uuid", UNSET) + + vector = d.pop("vector", UNSET) + + embargoed = d.pop("embargoed", UNSET) + + _created_dt = d.pop("created_dt", UNSET) + created_dt: datetime.datetime + if isinstance(_created_dt, Unset): + created_dt = UNSET + else: + created_dt = isoparse(_created_dt) + + _updated_dt = d.pop("updated_dt", UNSET) + updated_dt: datetime.datetime + if isinstance(_updated_dt, Unset): + updated_dt = UNSET + else: + updated_dt = isoparse(_updated_dt) + + affect = d.pop("affect", UNSET) + + comment = d.pop("comment", UNSET) + + score = d.pop("score", UNSET) + + affect_cvss = cls( + cvss_version=cvss_version, + issuer=issuer, + uuid=uuid, + vector=vector, + embargoed=embargoed, + created_dt=created_dt, + updated_dt=updated_dt, + affect=affect, + comment=comment, + score=score, + ) + + affect_cvss.additional_properties = d + return affect_cvss + + @staticmethod + def get_fields(): + return { + "cvss_version": str, + "issuer": IssuerEnum, + "uuid": str, + "vector": str, + "embargoed": bool, + "created_dt": datetime.datetime, + "updated_dt": datetime.datetime, + "affect": str, + "comment": str, + "score": float, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/affect_cvss_post.py b/osidb_bindings/bindings/python_client/models/affect_cvss_post.py new file mode 100644 index 0000000..89f6e9d --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/affect_cvss_post.py @@ -0,0 +1,196 @@ +import datetime +from typing import Any, Dict, List, Tuple, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.issuer_enum import IssuerEnum +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="AffectCVSSPost") + + +@attr.s(auto_attribs=True) +class AffectCVSSPost(OSIDBModel): + """AffectCVSS serializer""" + + cvss_version: str + issuer: IssuerEnum + uuid: str + vector: str + embargoed: bool + created_dt: datetime.datetime + comment: Union[Unset, str] = UNSET + score: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + cvss_version = self.cvss_version + issuer: str = UNSET + if not isinstance(self.issuer, Unset): + + issuer = IssuerEnum(self.issuer).value + + uuid = self.uuid + vector = self.vector + embargoed = self.embargoed + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + comment = self.comment + score = self.score + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(cvss_version, Unset): + field_dict["cvss_version"] = cvss_version + if not isinstance(issuer, Unset): + field_dict["issuer"] = issuer + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(vector, Unset): + field_dict["vector"] = vector + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(comment, Unset): + field_dict["comment"] = comment + if not isinstance(score, Unset): + field_dict["score"] = score + + return field_dict + + def to_multipart(self) -> Dict[str, Any]: + cvss_version = ( + self.cvss_version + if self.cvss_version is UNSET + else (None, str(self.cvss_version), "text/plain") + ) + issuer: Union[Unset, Tuple[None, str, str]] = UNSET + if not isinstance(self.issuer, Unset): + + issuer = IssuerEnum(self.issuer).value + + uuid = self.uuid if self.uuid is UNSET else (None, str(self.uuid), "text/plain") + vector = ( + self.vector + if self.vector is UNSET + else (None, str(self.vector), "text/plain") + ) + embargoed = ( + self.embargoed + if self.embargoed is UNSET + else (None, str(self.embargoed), "text/plain") + ) + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + comment = ( + self.comment + if self.comment is UNSET + else (None, str(self.comment), "text/plain") + ) + score = ( + self.score if self.score is UNSET else (None, str(self.score), "text/plain") + ) + + field_dict: Dict[str, Any] = {} + field_dict.update( + { + key: (None, str(value), "text/plain") + for key, value in self.additional_properties.items() + } + ) + if not isinstance(cvss_version, Unset): + field_dict["cvss_version"] = cvss_version + if not isinstance(issuer, Unset): + field_dict["issuer"] = issuer + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(vector, Unset): + field_dict["vector"] = vector + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(comment, Unset): + field_dict["comment"] = comment + if not isinstance(score, Unset): + field_dict["score"] = score + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + cvss_version = d.pop("cvss_version", UNSET) + + _issuer = d.pop("issuer", UNSET) + issuer: IssuerEnum + if isinstance(_issuer, Unset): + issuer = UNSET + else: + issuer = IssuerEnum(_issuer) + + uuid = d.pop("uuid", UNSET) + + vector = d.pop("vector", UNSET) + + embargoed = d.pop("embargoed", UNSET) + + _created_dt = d.pop("created_dt", UNSET) + created_dt: datetime.datetime + if isinstance(_created_dt, Unset): + created_dt = UNSET + else: + created_dt = isoparse(_created_dt) + + comment = d.pop("comment", UNSET) + + score = d.pop("score", UNSET) + + affect_cvss_post = cls( + cvss_version=cvss_version, + issuer=issuer, + uuid=uuid, + vector=vector, + embargoed=embargoed, + created_dt=created_dt, + comment=comment, + score=score, + ) + + affect_cvss_post.additional_properties = d + return affect_cvss_post + + @staticmethod + def get_fields(): + return { + "cvss_version": str, + "issuer": IssuerEnum, + "uuid": str, + "vector": str, + "embargoed": bool, + "created_dt": datetime.datetime, + "comment": str, + "score": float, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/affect_cvss_put.py b/osidb_bindings/bindings/python_client/models/affect_cvss_put.py new file mode 100644 index 0000000..0c8262b --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/affect_cvss_put.py @@ -0,0 +1,218 @@ +import datetime +from typing import Any, Dict, List, Tuple, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.issuer_enum import IssuerEnum +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="AffectCVSSPut") + + +@attr.s(auto_attribs=True) +class AffectCVSSPut(OSIDBModel): + """AffectCVSS serializer""" + + cvss_version: str + issuer: IssuerEnum + uuid: str + vector: str + embargoed: bool + created_dt: datetime.datetime + updated_dt: datetime.datetime + comment: Union[Unset, str] = UNSET + score: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + cvss_version = self.cvss_version + issuer: str = UNSET + if not isinstance(self.issuer, Unset): + + issuer = IssuerEnum(self.issuer).value + + uuid = self.uuid + vector = self.vector + embargoed = self.embargoed + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + updated_dt: str = UNSET + if not isinstance(self.updated_dt, Unset): + updated_dt = self.updated_dt.isoformat() + + comment = self.comment + score = self.score + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(cvss_version, Unset): + field_dict["cvss_version"] = cvss_version + if not isinstance(issuer, Unset): + field_dict["issuer"] = issuer + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(vector, Unset): + field_dict["vector"] = vector + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(updated_dt, Unset): + field_dict["updated_dt"] = updated_dt + if not isinstance(comment, Unset): + field_dict["comment"] = comment + if not isinstance(score, Unset): + field_dict["score"] = score + + return field_dict + + def to_multipart(self) -> Dict[str, Any]: + cvss_version = ( + self.cvss_version + if self.cvss_version is UNSET + else (None, str(self.cvss_version), "text/plain") + ) + issuer: Union[Unset, Tuple[None, str, str]] = UNSET + if not isinstance(self.issuer, Unset): + + issuer = IssuerEnum(self.issuer).value + + uuid = self.uuid if self.uuid is UNSET else (None, str(self.uuid), "text/plain") + vector = ( + self.vector + if self.vector is UNSET + else (None, str(self.vector), "text/plain") + ) + embargoed = ( + self.embargoed + if self.embargoed is UNSET + else (None, str(self.embargoed), "text/plain") + ) + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + updated_dt: str = UNSET + if not isinstance(self.updated_dt, Unset): + updated_dt = self.updated_dt.isoformat() + + comment = ( + self.comment + if self.comment is UNSET + else (None, str(self.comment), "text/plain") + ) + score = ( + self.score if self.score is UNSET else (None, str(self.score), "text/plain") + ) + + field_dict: Dict[str, Any] = {} + field_dict.update( + { + key: (None, str(value), "text/plain") + for key, value in self.additional_properties.items() + } + ) + if not isinstance(cvss_version, Unset): + field_dict["cvss_version"] = cvss_version + if not isinstance(issuer, Unset): + field_dict["issuer"] = issuer + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(vector, Unset): + field_dict["vector"] = vector + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(updated_dt, Unset): + field_dict["updated_dt"] = updated_dt + if not isinstance(comment, Unset): + field_dict["comment"] = comment + if not isinstance(score, Unset): + field_dict["score"] = score + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + cvss_version = d.pop("cvss_version", UNSET) + + _issuer = d.pop("issuer", UNSET) + issuer: IssuerEnum + if isinstance(_issuer, Unset): + issuer = UNSET + else: + issuer = IssuerEnum(_issuer) + + uuid = d.pop("uuid", UNSET) + + vector = d.pop("vector", UNSET) + + embargoed = d.pop("embargoed", UNSET) + + _created_dt = d.pop("created_dt", UNSET) + created_dt: datetime.datetime + if isinstance(_created_dt, Unset): + created_dt = UNSET + else: + created_dt = isoparse(_created_dt) + + _updated_dt = d.pop("updated_dt", UNSET) + updated_dt: datetime.datetime + if isinstance(_updated_dt, Unset): + updated_dt = UNSET + else: + updated_dt = isoparse(_updated_dt) + + comment = d.pop("comment", UNSET) + + score = d.pop("score", UNSET) + + affect_cvss_put = cls( + cvss_version=cvss_version, + issuer=issuer, + uuid=uuid, + vector=vector, + embargoed=embargoed, + created_dt=created_dt, + updated_dt=updated_dt, + comment=comment, + score=score, + ) + + affect_cvss_put.additional_properties = d + return affect_cvss_put + + @staticmethod + def get_fields(): + return { + "cvss_version": str, + "issuer": IssuerEnum, + "uuid": str, + "vector": str, + "embargoed": bool, + "created_dt": datetime.datetime, + "updated_dt": datetime.datetime, + "comment": str, + "score": float, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/affect_post.py b/osidb_bindings/bindings/python_client/models/affect_post.py index 576d352..2bddd48 100644 --- a/osidb_bindings/bindings/python_client/models/affect_post.py +++ b/osidb_bindings/bindings/python_client/models/affect_post.py @@ -5,6 +5,7 @@ import attr from dateutil.parser import isoparse +from ..models.affect_cvss import AffectCVSS from ..models.affect_post_meta_attr import AffectPostMetaAttr from ..models.affect_type import AffectType from ..models.affectedness_enum import AffectednessEnum @@ -27,6 +28,7 @@ class AffectPost(OSIDBModel): trackers: List[Tracker] meta_attr: AffectPostMetaAttr delegated_resolution: str + cvss_scores: List[AffectCVSS] embargoed: bool created_dt: datetime.datetime flaw: Optional[str] @@ -59,6 +61,16 @@ def to_dict(self) -> Dict[str, Any]: meta_attr = self.meta_attr.to_dict() delegated_resolution = self.delegated_resolution + cvss_scores: List[Dict[str, Any]] = UNSET + if not isinstance(self.cvss_scores, Unset): + cvss_scores = [] + for cvss_scores_item_data in self.cvss_scores: + cvss_scores_item: Dict[str, Any] = UNSET + if not isinstance(cvss_scores_item_data, Unset): + cvss_scores_item = cvss_scores_item_data.to_dict() + + cvss_scores.append(cvss_scores_item) + embargoed = self.embargoed created_dt: str = UNSET if not isinstance(self.created_dt, Unset): @@ -134,6 +146,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["meta_attr"] = meta_attr if not isinstance(delegated_resolution, Unset): field_dict["delegated_resolution"] = delegated_resolution + if not isinstance(cvss_scores, Unset): + field_dict["cvss_scores"] = cvss_scores if not isinstance(embargoed, Unset): field_dict["embargoed"] = embargoed if not isinstance(created_dt, Unset): @@ -191,6 +205,17 @@ def to_multipart(self) -> Dict[str, Any]: if self.delegated_resolution is UNSET else (None, str(self.delegated_resolution), "text/plain") ) + cvss_scores: Union[Unset, Tuple[None, str, str]] = UNSET + if not isinstance(self.cvss_scores, Unset): + _temp_cvss_scores = [] + for cvss_scores_item_data in self.cvss_scores: + cvss_scores_item: Dict[str, Any] = UNSET + if not isinstance(cvss_scores_item_data, Unset): + cvss_scores_item = cvss_scores_item_data.to_dict() + + _temp_cvss_scores.append(cvss_scores_item) + cvss_scores = (None, json.dumps(_temp_cvss_scores), "application/json") + embargoed = ( self.embargoed if self.embargoed is UNSET @@ -287,6 +312,8 @@ def to_multipart(self) -> Dict[str, Any]: field_dict["meta_attr"] = meta_attr if not isinstance(delegated_resolution, Unset): field_dict["delegated_resolution"] = delegated_resolution + if not isinstance(cvss_scores, Unset): + field_dict["cvss_scores"] = cvss_scores if not isinstance(embargoed, Unset): field_dict["embargoed"] = embargoed if not isinstance(created_dt, Unset): @@ -345,6 +372,21 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: delegated_resolution = d.pop("delegated_resolution", UNSET) + cvss_scores = [] + _cvss_scores = d.pop("cvss_scores", UNSET) + if _cvss_scores is UNSET: + cvss_scores = UNSET + else: + for cvss_scores_item_data in _cvss_scores or []: + _cvss_scores_item = cvss_scores_item_data + cvss_scores_item: AffectCVSS + if isinstance(_cvss_scores_item, Unset): + cvss_scores_item = UNSET + else: + cvss_scores_item = AffectCVSS.from_dict(_cvss_scores_item) + + cvss_scores.append(cvss_scores_item) + embargoed = d.pop("embargoed", UNSET) _created_dt = d.pop("created_dt", UNSET) @@ -467,6 +509,7 @@ def _parse_impact(data: object) -> Union[BlankEnum, ImpactEnum, Unset]: trackers=trackers, meta_attr=meta_attr, delegated_resolution=delegated_resolution, + cvss_scores=cvss_scores, embargoed=embargoed, created_dt=created_dt, flaw=flaw, @@ -492,6 +535,7 @@ def get_fields(): "trackers": List[Tracker], "meta_attr": AffectPostMetaAttr, "delegated_resolution": str, + "cvss_scores": List[AffectCVSS], "embargoed": bool, "created_dt": datetime.datetime, "flaw": str, diff --git a/osidb_bindings/bindings/python_client/models/collectors_api_v1_status_retrieve_response_200_collectors_item.py b/osidb_bindings/bindings/python_client/models/collectors_api_v1_status_retrieve_response_200_collectors_item.py index 7a043c6..d60fa3d 100644 --- a/osidb_bindings/bindings/python_client/models/collectors_api_v1_status_retrieve_response_200_collectors_item.py +++ b/osidb_bindings/bindings/python_client/models/collectors_api_v1_status_retrieve_response_200_collectors_item.py @@ -30,6 +30,7 @@ class CollectorsApiV1StatusRetrieveResponse200CollectorsItem(OSIDBModel): Unset, None, CollectorsApiV1StatusRetrieveResponse200CollectorsItemError ] = UNSET is_complete: Union[Unset, bool] = UNSET + is_up2date: Union[Unset, bool] = UNSET data_models: Union[Unset, List[str]] = UNSET state: Union[ Unset, CollectorsApiV1StatusRetrieveResponse200CollectorsItemState @@ -54,6 +55,7 @@ def to_dict(self) -> Dict[str, Any]: error = self.error.to_dict() if self.error else None is_complete = self.is_complete + is_up2date = self.is_up2date data_models: Union[Unset, List[str]] = UNSET if not isinstance(self.data_models, Unset): data_models = self.data_models @@ -79,6 +81,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["error"] = error if not isinstance(is_complete, Unset): field_dict["is_complete"] = is_complete + if not isinstance(is_up2date, Unset): + field_dict["is_up2date"] = is_up2date if not isinstance(data_models, Unset): field_dict["data_models"] = data_models if not isinstance(state, Unset): @@ -117,6 +121,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: is_complete = d.pop("is_complete", UNSET) + is_up2date = d.pop("is_up2date", UNSET) + data_models = cast(List[str], d.pop("data_models", UNSET)) _state = d.pop("state", UNSET) @@ -138,6 +144,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: depends_on=depends_on, error=error, is_complete=is_complete, + is_up2date=is_up2date, data_models=data_models, state=state, updated_until=updated_until, @@ -155,6 +162,7 @@ def get_fields(): "depends_on": List[str], "error": CollectorsApiV1StatusRetrieveResponse200CollectorsItemError, "is_complete": bool, + "is_up2date": bool, "data_models": List[str], "state": CollectorsApiV1StatusRetrieveResponse200CollectorsItemState, "updated_until": datetime.datetime, diff --git a/osidb_bindings/bindings/python_client/models/erratum.py b/osidb_bindings/bindings/python_client/models/erratum.py index 371d04c..b48b00f 100644 --- a/osidb_bindings/bindings/python_client/models/erratum.py +++ b/osidb_bindings/bindings/python_client/models/erratum.py @@ -15,6 +15,7 @@ class Erratum(OSIDBModel): et_id: int advisory_name: str + shipped_dt: datetime.datetime created_dt: datetime.datetime updated_dt: datetime.datetime additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -22,6 +23,10 @@ class Erratum(OSIDBModel): def to_dict(self) -> Dict[str, Any]: et_id = self.et_id advisory_name = self.advisory_name + shipped_dt: str = UNSET + if not isinstance(self.shipped_dt, Unset): + shipped_dt = self.shipped_dt.isoformat() + created_dt: str = UNSET if not isinstance(self.created_dt, Unset): created_dt = self.created_dt.isoformat() @@ -36,6 +41,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["et_id"] = et_id if not isinstance(advisory_name, Unset): field_dict["advisory_name"] = advisory_name + if not isinstance(shipped_dt, Unset): + field_dict["shipped_dt"] = shipped_dt if not isinstance(created_dt, Unset): field_dict["created_dt"] = created_dt if not isinstance(updated_dt, Unset): @@ -50,6 +57,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: advisory_name = d.pop("advisory_name", UNSET) + _shipped_dt = d.pop("shipped_dt", UNSET) + shipped_dt: datetime.datetime + if isinstance(_shipped_dt, Unset): + shipped_dt = UNSET + else: + shipped_dt = isoparse(_shipped_dt) + _created_dt = d.pop("created_dt", UNSET) created_dt: datetime.datetime if isinstance(_created_dt, Unset): @@ -67,6 +81,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: erratum = cls( et_id=et_id, advisory_name=advisory_name, + shipped_dt=shipped_dt, created_dt=created_dt, updated_dt=updated_dt, ) @@ -79,6 +94,7 @@ def get_fields(): return { "et_id": int, "advisory_name": str, + "shipped_dt": datetime.datetime, "created_dt": datetime.datetime, "updated_dt": datetime.datetime, } diff --git a/osidb_bindings/bindings/python_client/models/flaw.py b/osidb_bindings/bindings/python_client/models/flaw.py index 947fe41..482167c 100644 --- a/osidb_bindings/bindings/python_client/models/flaw.py +++ b/osidb_bindings/bindings/python_client/models/flaw.py @@ -8,9 +8,9 @@ from ..models.affect import Affect from ..models.blank_enum import BlankEnum from ..models.comment import Comment -from ..models.cv_ev_5_package_versions import CVEv5PackageVersions from ..models.flaw_acknowledgment import FlawAcknowledgment from ..models.flaw_classification import FlawClassification +from ..models.flaw_cvss import FlawCVSS from ..models.flaw_meta_attr import FlawMetaAttr from ..models.flaw_reference import FlawReference from ..models.flaw_type import FlawType @@ -18,6 +18,7 @@ from ..models.major_incident_state_enum import MajorIncidentStateEnum from ..models.meta import Meta from ..models.nist_cvss_validation_enum import NistCvssValidationEnum +from ..models.package import Package from ..models.requires_summary_enum import RequiresSummaryEnum from ..models.source_666_enum import Source666Enum from ..types import UNSET, OSIDBModel, Unset @@ -39,9 +40,10 @@ class Flaw(OSIDBModel): meta: List[Meta] comments: List[Comment] meta_attr: FlawMetaAttr - package_versions: List[CVEv5PackageVersions] + package_versions: List[Package] acknowledgments: List[FlawAcknowledgment] references: List[FlawReference] + cvss_scores: List[FlawCVSS] embargoed: bool created_dt: datetime.datetime updated_dt: datetime.datetime @@ -143,6 +145,16 @@ def to_dict(self) -> Dict[str, Any]: references.append(references_item) + cvss_scores: List[Dict[str, Any]] = UNSET + if not isinstance(self.cvss_scores, Unset): + cvss_scores = [] + for cvss_scores_item_data in self.cvss_scores: + cvss_scores_item: Dict[str, Any] = UNSET + if not isinstance(cvss_scores_item_data, Unset): + cvss_scores_item = cvss_scores_item_data.to_dict() + + cvss_scores.append(cvss_scores_item) + embargoed = self.embargoed created_dt: str = UNSET if not isinstance(self.created_dt, Unset): @@ -289,6 +301,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["acknowledgments"] = acknowledgments if not isinstance(references, Unset): field_dict["references"] = references + if not isinstance(cvss_scores, Unset): + field_dict["cvss_scores"] = cvss_scores if not isinstance(embargoed, Unset): field_dict["embargoed"] = embargoed if not isinstance(created_dt, Unset): @@ -443,6 +457,17 @@ def to_multipart(self) -> Dict[str, Any]: _temp_references.append(references_item) references = (None, json.dumps(_temp_references), "application/json") + cvss_scores: Union[Unset, Tuple[None, str, str]] = UNSET + if not isinstance(self.cvss_scores, Unset): + _temp_cvss_scores = [] + for cvss_scores_item_data in self.cvss_scores: + cvss_scores_item: Dict[str, Any] = UNSET + if not isinstance(cvss_scores_item_data, Unset): + cvss_scores_item = cvss_scores_item_data.to_dict() + + _temp_cvss_scores.append(cvss_scores_item) + cvss_scores = (None, json.dumps(_temp_cvss_scores), "application/json") + embargoed = ( self.embargoed if self.embargoed is UNSET @@ -650,6 +675,8 @@ def to_multipart(self) -> Dict[str, Any]: field_dict["acknowledgments"] = acknowledgments if not isinstance(references, Unset): field_dict["references"] = references + if not isinstance(cvss_scores, Unset): + field_dict["cvss_scores"] = cvss_scores if not isinstance(embargoed, Unset): field_dict["embargoed"] = embargoed if not isinstance(created_dt, Unset): @@ -777,13 +804,11 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: for package_versions_item_data in _package_versions or []: _package_versions_item = package_versions_item_data - package_versions_item: CVEv5PackageVersions + package_versions_item: Package if isinstance(_package_versions_item, Unset): package_versions_item = UNSET else: - package_versions_item = CVEv5PackageVersions.from_dict( - _package_versions_item - ) + package_versions_item = Package.from_dict(_package_versions_item) package_versions.append(package_versions_item) @@ -819,6 +844,21 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: references.append(references_item) + cvss_scores = [] + _cvss_scores = d.pop("cvss_scores", UNSET) + if _cvss_scores is UNSET: + cvss_scores = UNSET + else: + for cvss_scores_item_data in _cvss_scores or []: + _cvss_scores_item = cvss_scores_item_data + cvss_scores_item: FlawCVSS + if isinstance(_cvss_scores_item, Unset): + cvss_scores_item = UNSET + else: + cvss_scores_item = FlawCVSS.from_dict(_cvss_scores_item) + + cvss_scores.append(cvss_scores_item) + embargoed = d.pop("embargoed", UNSET) _created_dt = d.pop("created_dt", UNSET) @@ -1068,6 +1108,7 @@ def _parse_nist_cvss_validation( package_versions=package_versions, acknowledgments=acknowledgments, references=references, + cvss_scores=cvss_scores, embargoed=embargoed, created_dt=created_dt, updated_dt=updated_dt, @@ -1111,9 +1152,10 @@ def get_fields(): "meta": List[Meta], "comments": List[Comment], "meta_attr": FlawMetaAttr, - "package_versions": List[CVEv5PackageVersions], + "package_versions": List[Package], "acknowledgments": List[FlawAcknowledgment], "references": List[FlawReference], + "cvss_scores": List[FlawCVSS], "embargoed": bool, "created_dt": datetime.datetime, "updated_dt": datetime.datetime, diff --git a/osidb_bindings/bindings/python_client/models/flaw_cvss.py b/osidb_bindings/bindings/python_client/models/flaw_cvss.py new file mode 100644 index 0000000..9d4b9e7 --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/flaw_cvss.py @@ -0,0 +1,159 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.issuer_enum import IssuerEnum +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="FlawCVSS") + + +@attr.s(auto_attribs=True) +class FlawCVSS(OSIDBModel): + """FlawCVSS serializer""" + + cvss_version: str + issuer: IssuerEnum + uuid: str + vector: str + embargoed: bool + created_dt: datetime.datetime + updated_dt: datetime.datetime + comment: Union[Unset, str] = UNSET + flaw: Union[Unset, str] = UNSET + score: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + cvss_version = self.cvss_version + issuer: str = UNSET + if not isinstance(self.issuer, Unset): + + issuer = IssuerEnum(self.issuer).value + + uuid = self.uuid + vector = self.vector + embargoed = self.embargoed + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + updated_dt: str = UNSET + if not isinstance(self.updated_dt, Unset): + updated_dt = self.updated_dt.isoformat() + + comment = self.comment + flaw = self.flaw + score = self.score + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(cvss_version, Unset): + field_dict["cvss_version"] = cvss_version + if not isinstance(issuer, Unset): + field_dict["issuer"] = issuer + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(vector, Unset): + field_dict["vector"] = vector + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(updated_dt, Unset): + field_dict["updated_dt"] = updated_dt + if not isinstance(comment, Unset): + field_dict["comment"] = comment + if not isinstance(flaw, Unset): + field_dict["flaw"] = flaw + if not isinstance(score, Unset): + field_dict["score"] = score + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + cvss_version = d.pop("cvss_version", UNSET) + + _issuer = d.pop("issuer", UNSET) + issuer: IssuerEnum + if isinstance(_issuer, Unset): + issuer = UNSET + else: + issuer = IssuerEnum(_issuer) + + uuid = d.pop("uuid", UNSET) + + vector = d.pop("vector", UNSET) + + embargoed = d.pop("embargoed", UNSET) + + _created_dt = d.pop("created_dt", UNSET) + created_dt: datetime.datetime + if isinstance(_created_dt, Unset): + created_dt = UNSET + else: + created_dt = isoparse(_created_dt) + + _updated_dt = d.pop("updated_dt", UNSET) + updated_dt: datetime.datetime + if isinstance(_updated_dt, Unset): + updated_dt = UNSET + else: + updated_dt = isoparse(_updated_dt) + + comment = d.pop("comment", UNSET) + + flaw = d.pop("flaw", UNSET) + + score = d.pop("score", UNSET) + + flaw_cvss = cls( + cvss_version=cvss_version, + issuer=issuer, + uuid=uuid, + vector=vector, + embargoed=embargoed, + created_dt=created_dt, + updated_dt=updated_dt, + comment=comment, + flaw=flaw, + score=score, + ) + + flaw_cvss.additional_properties = d + return flaw_cvss + + @staticmethod + def get_fields(): + return { + "cvss_version": str, + "issuer": IssuerEnum, + "uuid": str, + "vector": str, + "embargoed": bool, + "created_dt": datetime.datetime, + "updated_dt": datetime.datetime, + "comment": str, + "flaw": str, + "score": float, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/flaw_cvss_post.py b/osidb_bindings/bindings/python_client/models/flaw_cvss_post.py new file mode 100644 index 0000000..38c9aea --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/flaw_cvss_post.py @@ -0,0 +1,196 @@ +import datetime +from typing import Any, Dict, List, Tuple, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.issuer_enum import IssuerEnum +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="FlawCVSSPost") + + +@attr.s(auto_attribs=True) +class FlawCVSSPost(OSIDBModel): + """FlawCVSS serializer""" + + cvss_version: str + issuer: IssuerEnum + uuid: str + vector: str + embargoed: bool + created_dt: datetime.datetime + comment: Union[Unset, str] = UNSET + score: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + cvss_version = self.cvss_version + issuer: str = UNSET + if not isinstance(self.issuer, Unset): + + issuer = IssuerEnum(self.issuer).value + + uuid = self.uuid + vector = self.vector + embargoed = self.embargoed + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + comment = self.comment + score = self.score + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(cvss_version, Unset): + field_dict["cvss_version"] = cvss_version + if not isinstance(issuer, Unset): + field_dict["issuer"] = issuer + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(vector, Unset): + field_dict["vector"] = vector + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(comment, Unset): + field_dict["comment"] = comment + if not isinstance(score, Unset): + field_dict["score"] = score + + return field_dict + + def to_multipart(self) -> Dict[str, Any]: + cvss_version = ( + self.cvss_version + if self.cvss_version is UNSET + else (None, str(self.cvss_version), "text/plain") + ) + issuer: Union[Unset, Tuple[None, str, str]] = UNSET + if not isinstance(self.issuer, Unset): + + issuer = IssuerEnum(self.issuer).value + + uuid = self.uuid if self.uuid is UNSET else (None, str(self.uuid), "text/plain") + vector = ( + self.vector + if self.vector is UNSET + else (None, str(self.vector), "text/plain") + ) + embargoed = ( + self.embargoed + if self.embargoed is UNSET + else (None, str(self.embargoed), "text/plain") + ) + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + comment = ( + self.comment + if self.comment is UNSET + else (None, str(self.comment), "text/plain") + ) + score = ( + self.score if self.score is UNSET else (None, str(self.score), "text/plain") + ) + + field_dict: Dict[str, Any] = {} + field_dict.update( + { + key: (None, str(value), "text/plain") + for key, value in self.additional_properties.items() + } + ) + if not isinstance(cvss_version, Unset): + field_dict["cvss_version"] = cvss_version + if not isinstance(issuer, Unset): + field_dict["issuer"] = issuer + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(vector, Unset): + field_dict["vector"] = vector + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(comment, Unset): + field_dict["comment"] = comment + if not isinstance(score, Unset): + field_dict["score"] = score + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + cvss_version = d.pop("cvss_version", UNSET) + + _issuer = d.pop("issuer", UNSET) + issuer: IssuerEnum + if isinstance(_issuer, Unset): + issuer = UNSET + else: + issuer = IssuerEnum(_issuer) + + uuid = d.pop("uuid", UNSET) + + vector = d.pop("vector", UNSET) + + embargoed = d.pop("embargoed", UNSET) + + _created_dt = d.pop("created_dt", UNSET) + created_dt: datetime.datetime + if isinstance(_created_dt, Unset): + created_dt = UNSET + else: + created_dt = isoparse(_created_dt) + + comment = d.pop("comment", UNSET) + + score = d.pop("score", UNSET) + + flaw_cvss_post = cls( + cvss_version=cvss_version, + issuer=issuer, + uuid=uuid, + vector=vector, + embargoed=embargoed, + created_dt=created_dt, + comment=comment, + score=score, + ) + + flaw_cvss_post.additional_properties = d + return flaw_cvss_post + + @staticmethod + def get_fields(): + return { + "cvss_version": str, + "issuer": IssuerEnum, + "uuid": str, + "vector": str, + "embargoed": bool, + "created_dt": datetime.datetime, + "comment": str, + "score": float, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/flaw_cvss_put.py b/osidb_bindings/bindings/python_client/models/flaw_cvss_put.py new file mode 100644 index 0000000..e4d91be --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/flaw_cvss_put.py @@ -0,0 +1,218 @@ +import datetime +from typing import Any, Dict, List, Tuple, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.issuer_enum import IssuerEnum +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="FlawCVSSPut") + + +@attr.s(auto_attribs=True) +class FlawCVSSPut(OSIDBModel): + """FlawCVSS serializer""" + + cvss_version: str + issuer: IssuerEnum + uuid: str + vector: str + embargoed: bool + created_dt: datetime.datetime + updated_dt: datetime.datetime + comment: Union[Unset, str] = UNSET + score: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + cvss_version = self.cvss_version + issuer: str = UNSET + if not isinstance(self.issuer, Unset): + + issuer = IssuerEnum(self.issuer).value + + uuid = self.uuid + vector = self.vector + embargoed = self.embargoed + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + updated_dt: str = UNSET + if not isinstance(self.updated_dt, Unset): + updated_dt = self.updated_dt.isoformat() + + comment = self.comment + score = self.score + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(cvss_version, Unset): + field_dict["cvss_version"] = cvss_version + if not isinstance(issuer, Unset): + field_dict["issuer"] = issuer + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(vector, Unset): + field_dict["vector"] = vector + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(updated_dt, Unset): + field_dict["updated_dt"] = updated_dt + if not isinstance(comment, Unset): + field_dict["comment"] = comment + if not isinstance(score, Unset): + field_dict["score"] = score + + return field_dict + + def to_multipart(self) -> Dict[str, Any]: + cvss_version = ( + self.cvss_version + if self.cvss_version is UNSET + else (None, str(self.cvss_version), "text/plain") + ) + issuer: Union[Unset, Tuple[None, str, str]] = UNSET + if not isinstance(self.issuer, Unset): + + issuer = IssuerEnum(self.issuer).value + + uuid = self.uuid if self.uuid is UNSET else (None, str(self.uuid), "text/plain") + vector = ( + self.vector + if self.vector is UNSET + else (None, str(self.vector), "text/plain") + ) + embargoed = ( + self.embargoed + if self.embargoed is UNSET + else (None, str(self.embargoed), "text/plain") + ) + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + updated_dt: str = UNSET + if not isinstance(self.updated_dt, Unset): + updated_dt = self.updated_dt.isoformat() + + comment = ( + self.comment + if self.comment is UNSET + else (None, str(self.comment), "text/plain") + ) + score = ( + self.score if self.score is UNSET else (None, str(self.score), "text/plain") + ) + + field_dict: Dict[str, Any] = {} + field_dict.update( + { + key: (None, str(value), "text/plain") + for key, value in self.additional_properties.items() + } + ) + if not isinstance(cvss_version, Unset): + field_dict["cvss_version"] = cvss_version + if not isinstance(issuer, Unset): + field_dict["issuer"] = issuer + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(vector, Unset): + field_dict["vector"] = vector + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(updated_dt, Unset): + field_dict["updated_dt"] = updated_dt + if not isinstance(comment, Unset): + field_dict["comment"] = comment + if not isinstance(score, Unset): + field_dict["score"] = score + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + cvss_version = d.pop("cvss_version", UNSET) + + _issuer = d.pop("issuer", UNSET) + issuer: IssuerEnum + if isinstance(_issuer, Unset): + issuer = UNSET + else: + issuer = IssuerEnum(_issuer) + + uuid = d.pop("uuid", UNSET) + + vector = d.pop("vector", UNSET) + + embargoed = d.pop("embargoed", UNSET) + + _created_dt = d.pop("created_dt", UNSET) + created_dt: datetime.datetime + if isinstance(_created_dt, Unset): + created_dt = UNSET + else: + created_dt = isoparse(_created_dt) + + _updated_dt = d.pop("updated_dt", UNSET) + updated_dt: datetime.datetime + if isinstance(_updated_dt, Unset): + updated_dt = UNSET + else: + updated_dt = isoparse(_updated_dt) + + comment = d.pop("comment", UNSET) + + score = d.pop("score", UNSET) + + flaw_cvss_put = cls( + cvss_version=cvss_version, + issuer=issuer, + uuid=uuid, + vector=vector, + embargoed=embargoed, + created_dt=created_dt, + updated_dt=updated_dt, + comment=comment, + score=score, + ) + + flaw_cvss_put.additional_properties = d + return flaw_cvss_put + + @staticmethod + def get_fields(): + return { + "cvss_version": str, + "issuer": IssuerEnum, + "uuid": str, + "vector": str, + "embargoed": bool, + "created_dt": datetime.datetime, + "updated_dt": datetime.datetime, + "comment": str, + "score": float, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/flaw_package_version.py b/osidb_bindings/bindings/python_client/models/flaw_package_version.py new file mode 100644 index 0000000..0cf1e35 --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/flaw_package_version.py @@ -0,0 +1,147 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar + +import attr +from dateutil.parser import isoparse + +from ..models.flaw_version import FlawVersion +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="FlawPackageVersion") + + +@attr.s(auto_attribs=True) +class FlawPackageVersion(OSIDBModel): + """Package model serializer""" + + package: str + versions: List[FlawVersion] + flaw: str + uuid: str + embargoed: bool + created_dt: datetime.datetime + updated_dt: datetime.datetime + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + package = self.package + versions: List[Dict[str, Any]] = UNSET + if not isinstance(self.versions, Unset): + versions = [] + for versions_item_data in self.versions: + versions_item: Dict[str, Any] = UNSET + if not isinstance(versions_item_data, Unset): + versions_item = versions_item_data.to_dict() + + versions.append(versions_item) + + flaw = self.flaw + uuid = self.uuid + embargoed = self.embargoed + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + updated_dt: str = UNSET + if not isinstance(self.updated_dt, Unset): + updated_dt = self.updated_dt.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(package, Unset): + field_dict["package"] = package + if not isinstance(versions, Unset): + field_dict["versions"] = versions + if not isinstance(flaw, Unset): + field_dict["flaw"] = flaw + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(updated_dt, Unset): + field_dict["updated_dt"] = updated_dt + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + package = d.pop("package", UNSET) + + versions = [] + _versions = d.pop("versions", UNSET) + if _versions is UNSET: + versions = UNSET + else: + for versions_item_data in _versions or []: + _versions_item = versions_item_data + versions_item: FlawVersion + if isinstance(_versions_item, Unset): + versions_item = UNSET + else: + versions_item = FlawVersion.from_dict(_versions_item) + + versions.append(versions_item) + + flaw = d.pop("flaw", UNSET) + + uuid = d.pop("uuid", UNSET) + + embargoed = d.pop("embargoed", UNSET) + + _created_dt = d.pop("created_dt", UNSET) + created_dt: datetime.datetime + if isinstance(_created_dt, Unset): + created_dt = UNSET + else: + created_dt = isoparse(_created_dt) + + _updated_dt = d.pop("updated_dt", UNSET) + updated_dt: datetime.datetime + if isinstance(_updated_dt, Unset): + updated_dt = UNSET + else: + updated_dt = isoparse(_updated_dt) + + flaw_package_version = cls( + package=package, + versions=versions, + flaw=flaw, + uuid=uuid, + embargoed=embargoed, + created_dt=created_dt, + updated_dt=updated_dt, + ) + + flaw_package_version.additional_properties = d + return flaw_package_version + + @staticmethod + def get_fields(): + return { + "package": str, + "versions": List[FlawVersion], + "flaw": str, + "uuid": str, + "embargoed": bool, + "created_dt": datetime.datetime, + "updated_dt": datetime.datetime, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/flaw_package_version_post.py b/osidb_bindings/bindings/python_client/models/flaw_package_version_post.py new file mode 100644 index 0000000..b2f3255 --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/flaw_package_version_post.py @@ -0,0 +1,171 @@ +import datetime +import json +from typing import Any, Dict, List, Tuple, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.flaw_version import FlawVersion +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="FlawPackageVersionPost") + + +@attr.s(auto_attribs=True) +class FlawPackageVersionPost(OSIDBModel): + """Package model serializer""" + + package: str + versions: List[FlawVersion] + uuid: str + embargoed: bool + created_dt: datetime.datetime + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + package = self.package + versions: List[Dict[str, Any]] = UNSET + if not isinstance(self.versions, Unset): + versions = [] + for versions_item_data in self.versions: + versions_item: Dict[str, Any] = UNSET + if not isinstance(versions_item_data, Unset): + versions_item = versions_item_data.to_dict() + + versions.append(versions_item) + + uuid = self.uuid + embargoed = self.embargoed + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(package, Unset): + field_dict["package"] = package + if not isinstance(versions, Unset): + field_dict["versions"] = versions + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + + return field_dict + + def to_multipart(self) -> Dict[str, Any]: + package = ( + self.package + if self.package is UNSET + else (None, str(self.package), "text/plain") + ) + versions: Union[Unset, Tuple[None, str, str]] = UNSET + if not isinstance(self.versions, Unset): + _temp_versions = [] + for versions_item_data in self.versions: + versions_item: Dict[str, Any] = UNSET + if not isinstance(versions_item_data, Unset): + versions_item = versions_item_data.to_dict() + + _temp_versions.append(versions_item) + versions = (None, json.dumps(_temp_versions), "application/json") + + uuid = self.uuid if self.uuid is UNSET else (None, str(self.uuid), "text/plain") + embargoed = ( + self.embargoed + if self.embargoed is UNSET + else (None, str(self.embargoed), "text/plain") + ) + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update( + { + key: (None, str(value), "text/plain") + for key, value in self.additional_properties.items() + } + ) + if not isinstance(package, Unset): + field_dict["package"] = package + if not isinstance(versions, Unset): + field_dict["versions"] = versions + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + package = d.pop("package", UNSET) + + versions = [] + _versions = d.pop("versions", UNSET) + if _versions is UNSET: + versions = UNSET + else: + for versions_item_data in _versions or []: + _versions_item = versions_item_data + versions_item: FlawVersion + if isinstance(_versions_item, Unset): + versions_item = UNSET + else: + versions_item = FlawVersion.from_dict(_versions_item) + + versions.append(versions_item) + + uuid = d.pop("uuid", UNSET) + + embargoed = d.pop("embargoed", UNSET) + + _created_dt = d.pop("created_dt", UNSET) + created_dt: datetime.datetime + if isinstance(_created_dt, Unset): + created_dt = UNSET + else: + created_dt = isoparse(_created_dt) + + flaw_package_version_post = cls( + package=package, + versions=versions, + uuid=uuid, + embargoed=embargoed, + created_dt=created_dt, + ) + + flaw_package_version_post.additional_properties = d + return flaw_package_version_post + + @staticmethod + def get_fields(): + return { + "package": str, + "versions": List[FlawVersion], + "uuid": str, + "embargoed": bool, + "created_dt": datetime.datetime, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/flaw_package_version_put.py b/osidb_bindings/bindings/python_client/models/flaw_package_version_put.py new file mode 100644 index 0000000..faf4cbf --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/flaw_package_version_put.py @@ -0,0 +1,193 @@ +import datetime +import json +from typing import Any, Dict, List, Tuple, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.flaw_version import FlawVersion +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="FlawPackageVersionPut") + + +@attr.s(auto_attribs=True) +class FlawPackageVersionPut(OSIDBModel): + """Package model serializer""" + + package: str + versions: List[FlawVersion] + uuid: str + embargoed: bool + created_dt: datetime.datetime + updated_dt: datetime.datetime + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + package = self.package + versions: List[Dict[str, Any]] = UNSET + if not isinstance(self.versions, Unset): + versions = [] + for versions_item_data in self.versions: + versions_item: Dict[str, Any] = UNSET + if not isinstance(versions_item_data, Unset): + versions_item = versions_item_data.to_dict() + + versions.append(versions_item) + + uuid = self.uuid + embargoed = self.embargoed + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + updated_dt: str = UNSET + if not isinstance(self.updated_dt, Unset): + updated_dt = self.updated_dt.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(package, Unset): + field_dict["package"] = package + if not isinstance(versions, Unset): + field_dict["versions"] = versions + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(updated_dt, Unset): + field_dict["updated_dt"] = updated_dt + + return field_dict + + def to_multipart(self) -> Dict[str, Any]: + package = ( + self.package + if self.package is UNSET + else (None, str(self.package), "text/plain") + ) + versions: Union[Unset, Tuple[None, str, str]] = UNSET + if not isinstance(self.versions, Unset): + _temp_versions = [] + for versions_item_data in self.versions: + versions_item: Dict[str, Any] = UNSET + if not isinstance(versions_item_data, Unset): + versions_item = versions_item_data.to_dict() + + _temp_versions.append(versions_item) + versions = (None, json.dumps(_temp_versions), "application/json") + + uuid = self.uuid if self.uuid is UNSET else (None, str(self.uuid), "text/plain") + embargoed = ( + self.embargoed + if self.embargoed is UNSET + else (None, str(self.embargoed), "text/plain") + ) + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + updated_dt: str = UNSET + if not isinstance(self.updated_dt, Unset): + updated_dt = self.updated_dt.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update( + { + key: (None, str(value), "text/plain") + for key, value in self.additional_properties.items() + } + ) + if not isinstance(package, Unset): + field_dict["package"] = package + if not isinstance(versions, Unset): + field_dict["versions"] = versions + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(updated_dt, Unset): + field_dict["updated_dt"] = updated_dt + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + package = d.pop("package", UNSET) + + versions = [] + _versions = d.pop("versions", UNSET) + if _versions is UNSET: + versions = UNSET + else: + for versions_item_data in _versions or []: + _versions_item = versions_item_data + versions_item: FlawVersion + if isinstance(_versions_item, Unset): + versions_item = UNSET + else: + versions_item = FlawVersion.from_dict(_versions_item) + + versions.append(versions_item) + + uuid = d.pop("uuid", UNSET) + + embargoed = d.pop("embargoed", UNSET) + + _created_dt = d.pop("created_dt", UNSET) + created_dt: datetime.datetime + if isinstance(_created_dt, Unset): + created_dt = UNSET + else: + created_dt = isoparse(_created_dt) + + _updated_dt = d.pop("updated_dt", UNSET) + updated_dt: datetime.datetime + if isinstance(_updated_dt, Unset): + updated_dt = UNSET + else: + updated_dt = isoparse(_updated_dt) + + flaw_package_version_put = cls( + package=package, + versions=versions, + uuid=uuid, + embargoed=embargoed, + created_dt=created_dt, + updated_dt=updated_dt, + ) + + flaw_package_version_put.additional_properties = d + return flaw_package_version_put + + @staticmethod + def get_fields(): + return { + "package": str, + "versions": List[FlawVersion], + "uuid": str, + "embargoed": bool, + "created_dt": datetime.datetime, + "updated_dt": datetime.datetime, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/flaw_post.py b/osidb_bindings/bindings/python_client/models/flaw_post.py index 827d03d..a51c2dd 100644 --- a/osidb_bindings/bindings/python_client/models/flaw_post.py +++ b/osidb_bindings/bindings/python_client/models/flaw_post.py @@ -8,8 +8,8 @@ from ..models.affect import Affect from ..models.blank_enum import BlankEnum from ..models.comment import Comment -from ..models.cv_ev_5_package_versions import CVEv5PackageVersions from ..models.flaw_acknowledgment import FlawAcknowledgment +from ..models.flaw_cvss import FlawCVSS from ..models.flaw_post_classification import FlawPostClassification from ..models.flaw_post_meta_attr import FlawPostMetaAttr from ..models.flaw_reference import FlawReference @@ -18,6 +18,7 @@ from ..models.major_incident_state_enum import MajorIncidentStateEnum from ..models.meta import Meta from ..models.nist_cvss_validation_enum import NistCvssValidationEnum +from ..models.package import Package from ..models.requires_summary_enum import RequiresSummaryEnum from ..models.source_666_enum import Source666Enum from ..types import UNSET, OSIDBModel, Unset @@ -39,9 +40,10 @@ class FlawPost(OSIDBModel): meta: List[Meta] comments: List[Comment] meta_attr: FlawPostMetaAttr - package_versions: List[CVEv5PackageVersions] + package_versions: List[Package] acknowledgments: List[FlawAcknowledgment] references: List[FlawReference] + cvss_scores: List[FlawCVSS] embargoed: bool created_dt: datetime.datetime classification: FlawPostClassification @@ -142,6 +144,16 @@ def to_dict(self) -> Dict[str, Any]: references.append(references_item) + cvss_scores: List[Dict[str, Any]] = UNSET + if not isinstance(self.cvss_scores, Unset): + cvss_scores = [] + for cvss_scores_item_data in self.cvss_scores: + cvss_scores_item: Dict[str, Any] = UNSET + if not isinstance(cvss_scores_item_data, Unset): + cvss_scores_item = cvss_scores_item_data.to_dict() + + cvss_scores.append(cvss_scores_item) + embargoed = self.embargoed created_dt: str = UNSET if not isinstance(self.created_dt, Unset): @@ -284,6 +296,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["acknowledgments"] = acknowledgments if not isinstance(references, Unset): field_dict["references"] = references + if not isinstance(cvss_scores, Unset): + field_dict["cvss_scores"] = cvss_scores if not isinstance(embargoed, Unset): field_dict["embargoed"] = embargoed if not isinstance(created_dt, Unset): @@ -436,6 +450,17 @@ def to_multipart(self) -> Dict[str, Any]: _temp_references.append(references_item) references = (None, json.dumps(_temp_references), "application/json") + cvss_scores: Union[Unset, Tuple[None, str, str]] = UNSET + if not isinstance(self.cvss_scores, Unset): + _temp_cvss_scores = [] + for cvss_scores_item_data in self.cvss_scores: + cvss_scores_item: Dict[str, Any] = UNSET + if not isinstance(cvss_scores_item_data, Unset): + cvss_scores_item = cvss_scores_item_data.to_dict() + + _temp_cvss_scores.append(cvss_scores_item) + cvss_scores = (None, json.dumps(_temp_cvss_scores), "application/json") + embargoed = ( self.embargoed if self.embargoed is UNSET @@ -639,6 +664,8 @@ def to_multipart(self) -> Dict[str, Any]: field_dict["acknowledgments"] = acknowledgments if not isinstance(references, Unset): field_dict["references"] = references + if not isinstance(cvss_scores, Unset): + field_dict["cvss_scores"] = cvss_scores if not isinstance(embargoed, Unset): field_dict["embargoed"] = embargoed if not isinstance(created_dt, Unset): @@ -764,13 +791,11 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: for package_versions_item_data in _package_versions or []: _package_versions_item = package_versions_item_data - package_versions_item: CVEv5PackageVersions + package_versions_item: Package if isinstance(_package_versions_item, Unset): package_versions_item = UNSET else: - package_versions_item = CVEv5PackageVersions.from_dict( - _package_versions_item - ) + package_versions_item = Package.from_dict(_package_versions_item) package_versions.append(package_versions_item) @@ -806,6 +831,21 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: references.append(references_item) + cvss_scores = [] + _cvss_scores = d.pop("cvss_scores", UNSET) + if _cvss_scores is UNSET: + cvss_scores = UNSET + else: + for cvss_scores_item_data in _cvss_scores or []: + _cvss_scores_item = cvss_scores_item_data + cvss_scores_item: FlawCVSS + if isinstance(_cvss_scores_item, Unset): + cvss_scores_item = UNSET + else: + cvss_scores_item = FlawCVSS.from_dict(_cvss_scores_item) + + cvss_scores.append(cvss_scores_item) + embargoed = d.pop("embargoed", UNSET) _created_dt = d.pop("created_dt", UNSET) @@ -1048,6 +1088,7 @@ def _parse_nist_cvss_validation( package_versions=package_versions, acknowledgments=acknowledgments, references=references, + cvss_scores=cvss_scores, embargoed=embargoed, created_dt=created_dt, classification=classification, @@ -1090,9 +1131,10 @@ def get_fields(): "meta": List[Meta], "comments": List[Comment], "meta_attr": FlawPostMetaAttr, - "package_versions": List[CVEv5PackageVersions], + "package_versions": List[Package], "acknowledgments": List[FlawAcknowledgment], "references": List[FlawReference], + "cvss_scores": List[FlawCVSS], "embargoed": bool, "created_dt": datetime.datetime, "classification": FlawPostClassification, diff --git a/osidb_bindings/bindings/python_client/models/flaw_reference.py b/osidb_bindings/bindings/python_client/models/flaw_reference.py index eaf5d4f..7a51662 100644 --- a/osidb_bindings/bindings/python_client/models/flaw_reference.py +++ b/osidb_bindings/bindings/python_client/models/flaw_reference.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Tuple, Type, TypeVar, Union +from typing import Any, Dict, List, Type, TypeVar, Union import attr from dateutil.parser import isoparse @@ -64,59 +64,6 @@ def to_dict(self) -> Dict[str, Any]: return field_dict - def to_multipart(self) -> Dict[str, Any]: - flaw = self.flaw if self.flaw is UNSET else (None, str(self.flaw), "text/plain") - url = self.url if self.url is UNSET else (None, str(self.url), "text/plain") - uuid = self.uuid if self.uuid is UNSET else (None, str(self.uuid), "text/plain") - embargoed = ( - self.embargoed - if self.embargoed is UNSET - else (None, str(self.embargoed), "text/plain") - ) - created_dt: str = UNSET - if not isinstance(self.created_dt, Unset): - created_dt = self.created_dt.isoformat() - - updated_dt: str = UNSET - if not isinstance(self.updated_dt, Unset): - updated_dt = self.updated_dt.isoformat() - - description = ( - self.description - if self.description is UNSET - else (None, str(self.description), "text/plain") - ) - type: Union[Unset, Tuple[None, str, str]] = UNSET - if not isinstance(self.type, Unset): - - type = FlawReferenceType(self.type).value - - field_dict: Dict[str, Any] = {} - field_dict.update( - { - key: (None, str(value), "text/plain") - for key, value in self.additional_properties.items() - } - ) - if not isinstance(flaw, Unset): - field_dict["flaw"] = flaw - if not isinstance(url, Unset): - field_dict["url"] = url - if not isinstance(uuid, Unset): - field_dict["uuid"] = uuid - if not isinstance(embargoed, Unset): - field_dict["embargoed"] = embargoed - if not isinstance(created_dt, Unset): - field_dict["created_dt"] = created_dt - if not isinstance(updated_dt, Unset): - field_dict["updated_dt"] = updated_dt - if not isinstance(description, Unset): - field_dict["description"] = description - if not isinstance(type, Unset): - field_dict["type"] = type - - return field_dict - @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() diff --git a/osidb_bindings/bindings/python_client/models/flaw_reference_put.py b/osidb_bindings/bindings/python_client/models/flaw_reference_put.py new file mode 100644 index 0000000..6c36f5f --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/flaw_reference_put.py @@ -0,0 +1,184 @@ +import datetime +from typing import Any, Dict, List, Tuple, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.flaw_reference_type import FlawReferenceType +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="FlawReferencePut") + + +@attr.s(auto_attribs=True) +class FlawReferencePut(OSIDBModel): + """FlawReference serializer""" + + url: str + uuid: str + embargoed: bool + created_dt: datetime.datetime + updated_dt: datetime.datetime + description: Union[Unset, str] = UNSET + type: Union[Unset, FlawReferenceType] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + url = self.url + uuid = self.uuid + embargoed = self.embargoed + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + updated_dt: str = UNSET + if not isinstance(self.updated_dt, Unset): + updated_dt = self.updated_dt.isoformat() + + description = self.description + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + + type = FlawReferenceType(self.type).value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(url, Unset): + field_dict["url"] = url + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(updated_dt, Unset): + field_dict["updated_dt"] = updated_dt + if not isinstance(description, Unset): + field_dict["description"] = description + if not isinstance(type, Unset): + field_dict["type"] = type + + return field_dict + + def to_multipart(self) -> Dict[str, Any]: + url = self.url if self.url is UNSET else (None, str(self.url), "text/plain") + uuid = self.uuid if self.uuid is UNSET else (None, str(self.uuid), "text/plain") + embargoed = ( + self.embargoed + if self.embargoed is UNSET + else (None, str(self.embargoed), "text/plain") + ) + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + updated_dt: str = UNSET + if not isinstance(self.updated_dt, Unset): + updated_dt = self.updated_dt.isoformat() + + description = ( + self.description + if self.description is UNSET + else (None, str(self.description), "text/plain") + ) + type: Union[Unset, Tuple[None, str, str]] = UNSET + if not isinstance(self.type, Unset): + + type = FlawReferenceType(self.type).value + + field_dict: Dict[str, Any] = {} + field_dict.update( + { + key: (None, str(value), "text/plain") + for key, value in self.additional_properties.items() + } + ) + if not isinstance(url, Unset): + field_dict["url"] = url + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(updated_dt, Unset): + field_dict["updated_dt"] = updated_dt + if not isinstance(description, Unset): + field_dict["description"] = description + if not isinstance(type, Unset): + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + url = d.pop("url", UNSET) + + uuid = d.pop("uuid", UNSET) + + embargoed = d.pop("embargoed", UNSET) + + _created_dt = d.pop("created_dt", UNSET) + created_dt: datetime.datetime + if isinstance(_created_dt, Unset): + created_dt = UNSET + else: + created_dt = isoparse(_created_dt) + + _updated_dt = d.pop("updated_dt", UNSET) + updated_dt: datetime.datetime + if isinstance(_updated_dt, Unset): + updated_dt = UNSET + else: + updated_dt = isoparse(_updated_dt) + + description = d.pop("description", UNSET) + + _type = d.pop("type", UNSET) + type: Union[Unset, FlawReferenceType] + if isinstance(_type, Unset): + type = UNSET + else: + type = FlawReferenceType(_type) + + flaw_reference_put = cls( + url=url, + uuid=uuid, + embargoed=embargoed, + created_dt=created_dt, + updated_dt=updated_dt, + description=description, + type=type, + ) + + flaw_reference_put.additional_properties = d + return flaw_reference_put + + @staticmethod + def get_fields(): + return { + "url": str, + "uuid": str, + "embargoed": bool, + "created_dt": datetime.datetime, + "updated_dt": datetime.datetime, + "description": str, + "type": FlawReferenceType, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/flaw_uuid_list.py b/osidb_bindings/bindings/python_client/models/flaw_uuid_list.py new file mode 100644 index 0000000..85d8933 --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/flaw_uuid_list.py @@ -0,0 +1,80 @@ +import json +from typing import Any, Dict, List, Tuple, Type, TypeVar, Union, cast + +import attr + +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="FlawUUIDList") + + +@attr.s(auto_attribs=True) +class FlawUUIDList(OSIDBModel): + """ """ + + flaw_uuids: List[str] + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + flaw_uuids: List[str] = UNSET + if not isinstance(self.flaw_uuids, Unset): + flaw_uuids = self.flaw_uuids + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(flaw_uuids, Unset): + field_dict["flaw_uuids"] = flaw_uuids + + return field_dict + + def to_multipart(self) -> Dict[str, Any]: + flaw_uuids: Union[Unset, Tuple[None, str, str]] = UNSET + if not isinstance(self.flaw_uuids, Unset): + _temp_flaw_uuids = self.flaw_uuids + flaw_uuids = (None, json.dumps(_temp_flaw_uuids), "application/json") + + field_dict: Dict[str, Any] = {} + field_dict.update( + { + key: (None, str(value), "text/plain") + for key, value in self.additional_properties.items() + } + ) + if not isinstance(flaw_uuids, Unset): + field_dict["flaw_uuids"] = flaw_uuids + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + flaw_uuids = cast(List[str], d.pop("flaw_uuids", UNSET)) + + flaw_uuid_list = cls( + flaw_uuids=flaw_uuids, + ) + + flaw_uuid_list.additional_properties = d + return flaw_uuid_list + + @staticmethod + def get_fields(): + return { + "flaw_uuids": List[str], + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/flaw_version.py b/osidb_bindings/bindings/python_client/models/flaw_version.py new file mode 100644 index 0000000..0438341 --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/flaw_version.py @@ -0,0 +1,59 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="FlawVersion") + + +@attr.s(auto_attribs=True) +class FlawVersion(OSIDBModel): + """PackageVer serializer used by FlawPackageVersionSerializer.""" + + version: str + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + version = self.version + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(version, Unset): + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + version = d.pop("version", UNSET) + + flaw_version = cls( + version=version, + ) + + flaw_version.additional_properties = d + return flaw_version + + @staticmethod + def get_fields(): + return { + "version": str, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/issuer_enum.py b/osidb_bindings/bindings/python_client/models/issuer_enum.py new file mode 100644 index 0000000..3ee0789 --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/issuer_enum.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class IssuerEnum(str, Enum): + RH = "RH" + NIST = "NIST" + + def __str__(self) -> str: + return str(self.value) diff --git a/osidb_bindings/bindings/python_client/models/module_component.py b/osidb_bindings/bindings/python_client/models/module_component.py new file mode 100644 index 0000000..0856052 --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/module_component.py @@ -0,0 +1,114 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.ps_stream_selection import PsStreamSelection +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="ModuleComponent") + + +@attr.s(auto_attribs=True) +class ModuleComponent(OSIDBModel): + """ """ + + ps_module: str + ps_component: str + streams: List[PsStreamSelection] + selected: bool + affect: str + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + ps_module = self.ps_module + ps_component = self.ps_component + streams: List[Dict[str, Any]] = UNSET + if not isinstance(self.streams, Unset): + streams = [] + for streams_item_data in self.streams: + streams_item: Dict[str, Any] = UNSET + if not isinstance(streams_item_data, Unset): + streams_item = streams_item_data.to_dict() + + streams.append(streams_item) + + selected = self.selected + affect = self.affect + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(ps_module, Unset): + field_dict["ps_module"] = ps_module + if not isinstance(ps_component, Unset): + field_dict["ps_component"] = ps_component + if not isinstance(streams, Unset): + field_dict["streams"] = streams + if not isinstance(selected, Unset): + field_dict["selected"] = selected + if not isinstance(affect, Unset): + field_dict["affect"] = affect + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + ps_module = d.pop("ps_module", UNSET) + + ps_component = d.pop("ps_component", UNSET) + + streams = [] + _streams = d.pop("streams", UNSET) + if _streams is UNSET: + streams = UNSET + else: + for streams_item_data in _streams or []: + _streams_item = streams_item_data + streams_item: PsStreamSelection + if isinstance(_streams_item, Unset): + streams_item = UNSET + else: + streams_item = PsStreamSelection.from_dict(_streams_item) + + streams.append(streams_item) + + selected = d.pop("selected", UNSET) + + affect = d.pop("affect", UNSET) + + module_component = cls( + ps_module=ps_module, + ps_component=ps_component, + streams=streams, + selected=selected, + affect=affect, + ) + + module_component.additional_properties = d + return module_component + + @staticmethod + def get_fields(): + return { + "ps_module": str, + "ps_component": str, + "streams": List[PsStreamSelection], + "selected": bool, + "affect": str, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_create_response_201.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_create_response_201.py index 4dcd5b2..1aef593 100644 --- a/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_create_response_201.py +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_create_response_201.py @@ -4,6 +4,7 @@ import attr from dateutil.parser import isoparse +from ..models.affect_cvss import AffectCVSS from ..models.affect_meta_attr import AffectMetaAttr from ..models.affect_type import AffectType from ..models.affectedness_enum import AffectednessEnum @@ -26,6 +27,7 @@ class OsidbApiV1AffectsCreateResponse201(OSIDBModel): trackers: List[Tracker] meta_attr: AffectMetaAttr delegated_resolution: str + cvss_scores: List[AffectCVSS] embargoed: bool created_dt: datetime.datetime updated_dt: datetime.datetime @@ -63,6 +65,16 @@ def to_dict(self) -> Dict[str, Any]: meta_attr = self.meta_attr.to_dict() delegated_resolution = self.delegated_resolution + cvss_scores: List[Dict[str, Any]] = UNSET + if not isinstance(self.cvss_scores, Unset): + cvss_scores = [] + for cvss_scores_item_data in self.cvss_scores: + cvss_scores_item: Dict[str, Any] = UNSET + if not isinstance(cvss_scores_item_data, Unset): + cvss_scores_item = cvss_scores_item_data.to_dict() + + cvss_scores.append(cvss_scores_item) + embargoed = self.embargoed created_dt: str = UNSET if not isinstance(self.created_dt, Unset): @@ -149,6 +161,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["meta_attr"] = meta_attr if not isinstance(delegated_resolution, Unset): field_dict["delegated_resolution"] = delegated_resolution + if not isinstance(cvss_scores, Unset): + field_dict["cvss_scores"] = cvss_scores if not isinstance(embargoed, Unset): field_dict["embargoed"] = embargoed if not isinstance(created_dt, Unset): @@ -217,6 +231,21 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: delegated_resolution = d.pop("delegated_resolution", UNSET) + cvss_scores = [] + _cvss_scores = d.pop("cvss_scores", UNSET) + if _cvss_scores is UNSET: + cvss_scores = UNSET + else: + for cvss_scores_item_data in _cvss_scores or []: + _cvss_scores_item = cvss_scores_item_data + cvss_scores_item: AffectCVSS + if isinstance(_cvss_scores_item, Unset): + cvss_scores_item = UNSET + else: + cvss_scores_item = AffectCVSS.from_dict(_cvss_scores_item) + + cvss_scores.append(cvss_scores_item) + embargoed = d.pop("embargoed", UNSET) _created_dt = d.pop("created_dt", UNSET) @@ -359,6 +388,7 @@ def _parse_impact(data: object) -> Union[BlankEnum, ImpactEnum, Unset]: trackers=trackers, meta_attr=meta_attr, delegated_resolution=delegated_resolution, + cvss_scores=cvss_scores, embargoed=embargoed, created_dt=created_dt, updated_dt=updated_dt, @@ -389,6 +419,7 @@ def get_fields(): "trackers": List[Tracker], "meta_attr": AffectMetaAttr, "delegated_resolution": str, + "cvss_scores": List[AffectCVSS], "embargoed": bool, "created_dt": datetime.datetime, "updated_dt": datetime.datetime, diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_create_response_201.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_create_response_201.py new file mode 100644 index 0000000..165a70c --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_create_response_201.py @@ -0,0 +1,199 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.issuer_enum import IssuerEnum +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="OsidbApiV1AffectsCvssScoresCreateResponse201") + + +@attr.s(auto_attribs=True) +class OsidbApiV1AffectsCvssScoresCreateResponse201(OSIDBModel): + """ """ + + cvss_version: str + issuer: IssuerEnum + uuid: str + vector: str + embargoed: bool + created_dt: datetime.datetime + updated_dt: datetime.datetime + affect: Union[Unset, str] = UNSET + comment: Union[Unset, str] = UNSET + score: Union[Unset, float] = UNSET + dt: Union[Unset, datetime.datetime] = UNSET + env: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + version: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + cvss_version = self.cvss_version + issuer: str = UNSET + if not isinstance(self.issuer, Unset): + + issuer = IssuerEnum(self.issuer).value + + uuid = self.uuid + vector = self.vector + embargoed = self.embargoed + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + updated_dt: str = UNSET + if not isinstance(self.updated_dt, Unset): + updated_dt = self.updated_dt.isoformat() + + affect = self.affect + comment = self.comment + score = self.score + dt: Union[Unset, str] = UNSET + if not isinstance(self.dt, Unset): + dt = self.dt.isoformat() + + env = self.env + revision = self.revision + version = self.version + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(cvss_version, Unset): + field_dict["cvss_version"] = cvss_version + if not isinstance(issuer, Unset): + field_dict["issuer"] = issuer + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(vector, Unset): + field_dict["vector"] = vector + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(updated_dt, Unset): + field_dict["updated_dt"] = updated_dt + if not isinstance(affect, Unset): + field_dict["affect"] = affect + if not isinstance(comment, Unset): + field_dict["comment"] = comment + if not isinstance(score, Unset): + field_dict["score"] = score + if not isinstance(dt, Unset): + field_dict["dt"] = dt + if not isinstance(env, Unset): + field_dict["env"] = env + if not isinstance(revision, Unset): + field_dict["revision"] = revision + if not isinstance(version, Unset): + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + cvss_version = d.pop("cvss_version", UNSET) + + _issuer = d.pop("issuer", UNSET) + issuer: IssuerEnum + if isinstance(_issuer, Unset): + issuer = UNSET + else: + issuer = IssuerEnum(_issuer) + + uuid = d.pop("uuid", UNSET) + + vector = d.pop("vector", UNSET) + + embargoed = d.pop("embargoed", UNSET) + + _created_dt = d.pop("created_dt", UNSET) + created_dt: datetime.datetime + if isinstance(_created_dt, Unset): + created_dt = UNSET + else: + created_dt = isoparse(_created_dt) + + _updated_dt = d.pop("updated_dt", UNSET) + updated_dt: datetime.datetime + if isinstance(_updated_dt, Unset): + updated_dt = UNSET + else: + updated_dt = isoparse(_updated_dt) + + affect = d.pop("affect", UNSET) + + comment = d.pop("comment", UNSET) + + score = d.pop("score", UNSET) + + _dt = d.pop("dt", UNSET) + dt: Union[Unset, datetime.datetime] + if isinstance(_dt, Unset): + dt = UNSET + else: + dt = isoparse(_dt) + + env = d.pop("env", UNSET) + + revision = d.pop("revision", UNSET) + + version = d.pop("version", UNSET) + + osidb_api_v1_affects_cvss_scores_create_response_201 = cls( + cvss_version=cvss_version, + issuer=issuer, + uuid=uuid, + vector=vector, + embargoed=embargoed, + created_dt=created_dt, + updated_dt=updated_dt, + affect=affect, + comment=comment, + score=score, + dt=dt, + env=env, + revision=revision, + version=version, + ) + + osidb_api_v1_affects_cvss_scores_create_response_201.additional_properties = d + return osidb_api_v1_affects_cvss_scores_create_response_201 + + @staticmethod + def get_fields(): + return { + "cvss_version": str, + "issuer": IssuerEnum, + "uuid": str, + "vector": str, + "embargoed": bool, + "created_dt": datetime.datetime, + "updated_dt": datetime.datetime, + "affect": str, + "comment": str, + "score": float, + "dt": datetime.datetime, + "env": str, + "revision": str, + "version": str, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_destroy_response_204.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_destroy_response_204.py new file mode 100644 index 0000000..865c603 --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_destroy_response_204.py @@ -0,0 +1,93 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="OsidbApiV1AffectsCvssScoresDestroyResponse204") + + +@attr.s(auto_attribs=True) +class OsidbApiV1AffectsCvssScoresDestroyResponse204(OSIDBModel): + """ """ + + dt: Union[Unset, datetime.datetime] = UNSET + env: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + version: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + dt: Union[Unset, str] = UNSET + if not isinstance(self.dt, Unset): + dt = self.dt.isoformat() + + env = self.env + revision = self.revision + version = self.version + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(dt, Unset): + field_dict["dt"] = dt + if not isinstance(env, Unset): + field_dict["env"] = env + if not isinstance(revision, Unset): + field_dict["revision"] = revision + if not isinstance(version, Unset): + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _dt = d.pop("dt", UNSET) + dt: Union[Unset, datetime.datetime] + if isinstance(_dt, Unset): + dt = UNSET + else: + dt = isoparse(_dt) + + env = d.pop("env", UNSET) + + revision = d.pop("revision", UNSET) + + version = d.pop("version", UNSET) + + osidb_api_v1_affects_cvss_scores_destroy_response_204 = cls( + dt=dt, + env=env, + revision=revision, + version=version, + ) + + osidb_api_v1_affects_cvss_scores_destroy_response_204.additional_properties = d + return osidb_api_v1_affects_cvss_scores_destroy_response_204 + + @staticmethod + def get_fields(): + return { + "dt": datetime.datetime, + "env": str, + "revision": str, + "version": str, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_list_issuer.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_list_issuer.py new file mode 100644 index 0000000..d25557c --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_list_issuer.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class OsidbApiV1AffectsCvssScoresListIssuer(str, Enum): + NIST = "NIST" + RH = "RH" + + def __str__(self) -> str: + return str(self.value) diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_list_response_200.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_list_response_200.py new file mode 100644 index 0000000..5cccff9 --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_list_response_200.py @@ -0,0 +1,148 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.affect_cvss import AffectCVSS +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="OsidbApiV1AffectsCvssScoresListResponse200") + + +@attr.s(auto_attribs=True) +class OsidbApiV1AffectsCvssScoresListResponse200(OSIDBModel): + """ """ + + count: Union[Unset, int] = UNSET + next_: Union[Unset, None, str] = UNSET + previous: Union[Unset, None, str] = UNSET + results: Union[Unset, List[AffectCVSS]] = UNSET + dt: Union[Unset, datetime.datetime] = UNSET + env: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + version: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + count = self.count + next_ = self.next_ + previous = self.previous + results: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.results, Unset): + results = [] + for results_item_data in self.results: + results_item: Dict[str, Any] = UNSET + if not isinstance(results_item_data, Unset): + results_item = results_item_data.to_dict() + + results.append(results_item) + + dt: Union[Unset, str] = UNSET + if not isinstance(self.dt, Unset): + dt = self.dt.isoformat() + + env = self.env + revision = self.revision + version = self.version + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(count, Unset): + field_dict["count"] = count + if not isinstance(next_, Unset): + field_dict["next"] = next_ + if not isinstance(previous, Unset): + field_dict["previous"] = previous + if not isinstance(results, Unset): + field_dict["results"] = results + if not isinstance(dt, Unset): + field_dict["dt"] = dt + if not isinstance(env, Unset): + field_dict["env"] = env + if not isinstance(revision, Unset): + field_dict["revision"] = revision + if not isinstance(version, Unset): + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + count = d.pop("count", UNSET) + + next_ = d.pop("next", UNSET) + + previous = d.pop("previous", UNSET) + + results = [] + _results = d.pop("results", UNSET) + if _results is UNSET: + results = UNSET + else: + for results_item_data in _results or []: + _results_item = results_item_data + results_item: AffectCVSS + if isinstance(_results_item, Unset): + results_item = UNSET + else: + results_item = AffectCVSS.from_dict(_results_item) + + results.append(results_item) + + _dt = d.pop("dt", UNSET) + dt: Union[Unset, datetime.datetime] + if isinstance(_dt, Unset): + dt = UNSET + else: + dt = isoparse(_dt) + + env = d.pop("env", UNSET) + + revision = d.pop("revision", UNSET) + + version = d.pop("version", UNSET) + + osidb_api_v1_affects_cvss_scores_list_response_200 = cls( + count=count, + next_=next_, + previous=previous, + results=results, + dt=dt, + env=env, + revision=revision, + version=version, + ) + + osidb_api_v1_affects_cvss_scores_list_response_200.additional_properties = d + return osidb_api_v1_affects_cvss_scores_list_response_200 + + @staticmethod + def get_fields(): + return { + "count": int, + "next": str, + "previous": str, + "results": List[AffectCVSS], + "dt": datetime.datetime, + "env": str, + "revision": str, + "version": str, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_retrieve_response_200.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_retrieve_response_200.py new file mode 100644 index 0000000..907d912 --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_retrieve_response_200.py @@ -0,0 +1,199 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.issuer_enum import IssuerEnum +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="OsidbApiV1AffectsCvssScoresRetrieveResponse200") + + +@attr.s(auto_attribs=True) +class OsidbApiV1AffectsCvssScoresRetrieveResponse200(OSIDBModel): + """ """ + + cvss_version: str + issuer: IssuerEnum + uuid: str + vector: str + embargoed: bool + created_dt: datetime.datetime + updated_dt: datetime.datetime + affect: Union[Unset, str] = UNSET + comment: Union[Unset, str] = UNSET + score: Union[Unset, float] = UNSET + dt: Union[Unset, datetime.datetime] = UNSET + env: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + version: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + cvss_version = self.cvss_version + issuer: str = UNSET + if not isinstance(self.issuer, Unset): + + issuer = IssuerEnum(self.issuer).value + + uuid = self.uuid + vector = self.vector + embargoed = self.embargoed + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + updated_dt: str = UNSET + if not isinstance(self.updated_dt, Unset): + updated_dt = self.updated_dt.isoformat() + + affect = self.affect + comment = self.comment + score = self.score + dt: Union[Unset, str] = UNSET + if not isinstance(self.dt, Unset): + dt = self.dt.isoformat() + + env = self.env + revision = self.revision + version = self.version + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(cvss_version, Unset): + field_dict["cvss_version"] = cvss_version + if not isinstance(issuer, Unset): + field_dict["issuer"] = issuer + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(vector, Unset): + field_dict["vector"] = vector + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(updated_dt, Unset): + field_dict["updated_dt"] = updated_dt + if not isinstance(affect, Unset): + field_dict["affect"] = affect + if not isinstance(comment, Unset): + field_dict["comment"] = comment + if not isinstance(score, Unset): + field_dict["score"] = score + if not isinstance(dt, Unset): + field_dict["dt"] = dt + if not isinstance(env, Unset): + field_dict["env"] = env + if not isinstance(revision, Unset): + field_dict["revision"] = revision + if not isinstance(version, Unset): + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + cvss_version = d.pop("cvss_version", UNSET) + + _issuer = d.pop("issuer", UNSET) + issuer: IssuerEnum + if isinstance(_issuer, Unset): + issuer = UNSET + else: + issuer = IssuerEnum(_issuer) + + uuid = d.pop("uuid", UNSET) + + vector = d.pop("vector", UNSET) + + embargoed = d.pop("embargoed", UNSET) + + _created_dt = d.pop("created_dt", UNSET) + created_dt: datetime.datetime + if isinstance(_created_dt, Unset): + created_dt = UNSET + else: + created_dt = isoparse(_created_dt) + + _updated_dt = d.pop("updated_dt", UNSET) + updated_dt: datetime.datetime + if isinstance(_updated_dt, Unset): + updated_dt = UNSET + else: + updated_dt = isoparse(_updated_dt) + + affect = d.pop("affect", UNSET) + + comment = d.pop("comment", UNSET) + + score = d.pop("score", UNSET) + + _dt = d.pop("dt", UNSET) + dt: Union[Unset, datetime.datetime] + if isinstance(_dt, Unset): + dt = UNSET + else: + dt = isoparse(_dt) + + env = d.pop("env", UNSET) + + revision = d.pop("revision", UNSET) + + version = d.pop("version", UNSET) + + osidb_api_v1_affects_cvss_scores_retrieve_response_200 = cls( + cvss_version=cvss_version, + issuer=issuer, + uuid=uuid, + vector=vector, + embargoed=embargoed, + created_dt=created_dt, + updated_dt=updated_dt, + affect=affect, + comment=comment, + score=score, + dt=dt, + env=env, + revision=revision, + version=version, + ) + + osidb_api_v1_affects_cvss_scores_retrieve_response_200.additional_properties = d + return osidb_api_v1_affects_cvss_scores_retrieve_response_200 + + @staticmethod + def get_fields(): + return { + "cvss_version": str, + "issuer": IssuerEnum, + "uuid": str, + "vector": str, + "embargoed": bool, + "created_dt": datetime.datetime, + "updated_dt": datetime.datetime, + "affect": str, + "comment": str, + "score": float, + "dt": datetime.datetime, + "env": str, + "revision": str, + "version": str, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_update_response_200.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_update_response_200.py new file mode 100644 index 0000000..4fb52ac --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_cvss_scores_update_response_200.py @@ -0,0 +1,199 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.issuer_enum import IssuerEnum +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="OsidbApiV1AffectsCvssScoresUpdateResponse200") + + +@attr.s(auto_attribs=True) +class OsidbApiV1AffectsCvssScoresUpdateResponse200(OSIDBModel): + """ """ + + cvss_version: str + issuer: IssuerEnum + uuid: str + vector: str + embargoed: bool + created_dt: datetime.datetime + updated_dt: datetime.datetime + affect: Union[Unset, str] = UNSET + comment: Union[Unset, str] = UNSET + score: Union[Unset, float] = UNSET + dt: Union[Unset, datetime.datetime] = UNSET + env: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + version: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + cvss_version = self.cvss_version + issuer: str = UNSET + if not isinstance(self.issuer, Unset): + + issuer = IssuerEnum(self.issuer).value + + uuid = self.uuid + vector = self.vector + embargoed = self.embargoed + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + updated_dt: str = UNSET + if not isinstance(self.updated_dt, Unset): + updated_dt = self.updated_dt.isoformat() + + affect = self.affect + comment = self.comment + score = self.score + dt: Union[Unset, str] = UNSET + if not isinstance(self.dt, Unset): + dt = self.dt.isoformat() + + env = self.env + revision = self.revision + version = self.version + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(cvss_version, Unset): + field_dict["cvss_version"] = cvss_version + if not isinstance(issuer, Unset): + field_dict["issuer"] = issuer + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(vector, Unset): + field_dict["vector"] = vector + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(updated_dt, Unset): + field_dict["updated_dt"] = updated_dt + if not isinstance(affect, Unset): + field_dict["affect"] = affect + if not isinstance(comment, Unset): + field_dict["comment"] = comment + if not isinstance(score, Unset): + field_dict["score"] = score + if not isinstance(dt, Unset): + field_dict["dt"] = dt + if not isinstance(env, Unset): + field_dict["env"] = env + if not isinstance(revision, Unset): + field_dict["revision"] = revision + if not isinstance(version, Unset): + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + cvss_version = d.pop("cvss_version", UNSET) + + _issuer = d.pop("issuer", UNSET) + issuer: IssuerEnum + if isinstance(_issuer, Unset): + issuer = UNSET + else: + issuer = IssuerEnum(_issuer) + + uuid = d.pop("uuid", UNSET) + + vector = d.pop("vector", UNSET) + + embargoed = d.pop("embargoed", UNSET) + + _created_dt = d.pop("created_dt", UNSET) + created_dt: datetime.datetime + if isinstance(_created_dt, Unset): + created_dt = UNSET + else: + created_dt = isoparse(_created_dt) + + _updated_dt = d.pop("updated_dt", UNSET) + updated_dt: datetime.datetime + if isinstance(_updated_dt, Unset): + updated_dt = UNSET + else: + updated_dt = isoparse(_updated_dt) + + affect = d.pop("affect", UNSET) + + comment = d.pop("comment", UNSET) + + score = d.pop("score", UNSET) + + _dt = d.pop("dt", UNSET) + dt: Union[Unset, datetime.datetime] + if isinstance(_dt, Unset): + dt = UNSET + else: + dt = isoparse(_dt) + + env = d.pop("env", UNSET) + + revision = d.pop("revision", UNSET) + + version = d.pop("version", UNSET) + + osidb_api_v1_affects_cvss_scores_update_response_200 = cls( + cvss_version=cvss_version, + issuer=issuer, + uuid=uuid, + vector=vector, + embargoed=embargoed, + created_dt=created_dt, + updated_dt=updated_dt, + affect=affect, + comment=comment, + score=score, + dt=dt, + env=env, + revision=revision, + version=version, + ) + + osidb_api_v1_affects_cvss_scores_update_response_200.additional_properties = d + return osidb_api_v1_affects_cvss_scores_update_response_200 + + @staticmethod + def get_fields(): + return { + "cvss_version": str, + "issuer": IssuerEnum, + "uuid": str, + "vector": str, + "embargoed": bool, + "created_dt": datetime.datetime, + "updated_dt": datetime.datetime, + "affect": str, + "comment": str, + "score": float, + "dt": datetime.datetime, + "env": str, + "revision": str, + "version": str, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_destroy_response_204.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_destroy_response_200.py similarity index 88% rename from osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_destroy_response_204.py rename to osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_destroy_response_200.py index 0733784..47fea84 100644 --- a/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_destroy_response_204.py +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_destroy_response_200.py @@ -6,11 +6,11 @@ from ..types import UNSET, OSIDBModel, Unset -T = TypeVar("T", bound="OsidbApiV1AffectsDestroyResponse204") +T = TypeVar("T", bound="OsidbApiV1AffectsDestroyResponse200") @attr.s(auto_attribs=True) -class OsidbApiV1AffectsDestroyResponse204(OSIDBModel): +class OsidbApiV1AffectsDestroyResponse200(OSIDBModel): """ """ dt: Union[Unset, datetime.datetime] = UNSET @@ -57,15 +57,15 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: version = d.pop("version", UNSET) - osidb_api_v1_affects_destroy_response_204 = cls( + osidb_api_v1_affects_destroy_response_200 = cls( dt=dt, env=env, revision=revision, version=version, ) - osidb_api_v1_affects_destroy_response_204.additional_properties = d - return osidb_api_v1_affects_destroy_response_204 + osidb_api_v1_affects_destroy_response_200.additional_properties = d + return osidb_api_v1_affects_destroy_response_200 @staticmethod def get_fields(): diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_list_cvss_scores_issuer.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_list_cvss_scores_issuer.py new file mode 100644 index 0000000..5ef2bdf --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_list_cvss_scores_issuer.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class OsidbApiV1AffectsListCvssScoresIssuer(str, Enum): + NIST = "NIST" + RH = "RH" + + def __str__(self) -> str: + return str(self.value) diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_list_order_item.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_list_order_item.py index 749920a..20bf340 100644 --- a/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_list_order_item.py +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_list_order_item.py @@ -8,44 +8,58 @@ class OsidbApiV1AffectsListOrderItem(str, Enum): VALUE_3 = "-cvss2_score" VALUE_4 = "-cvss3" VALUE_5 = "-cvss3_score" - VALUE_6 = "-flaw__component" - VALUE_7 = "-flaw__created_dt" - VALUE_8 = "-flaw__cve_id" - VALUE_9 = "-flaw__cvss2" - VALUE_10 = "-flaw__cvss2_score" - VALUE_11 = "-flaw__cvss3" - VALUE_12 = "-flaw__cvss3_score" - VALUE_13 = "-flaw__cwe_id" - VALUE_14 = "-flaw__impact" - VALUE_15 = "-flaw__nvd_cvss2" - VALUE_16 = "-flaw__nvd_cvss3" - VALUE_17 = "-flaw__reported_dt" - VALUE_18 = "-flaw__source" - VALUE_19 = "-flaw__type" - VALUE_20 = "-flaw__unembargo_dt" - VALUE_21 = "-flaw__updated_dt" - VALUE_22 = "-flaw__uuid" - VALUE_23 = "-impact" - VALUE_24 = "-ps_component" - VALUE_25 = "-ps_module" - VALUE_26 = "-resolution" - VALUE_27 = "-trackers__created_dt" - VALUE_28 = "-trackers__external_system_id" - VALUE_29 = "-trackers__ps_update_stream" - VALUE_30 = "-trackers__resolution" - VALUE_31 = "-trackers__status" - VALUE_32 = "-trackers__type" - VALUE_33 = "-trackers__updated_dt" - VALUE_34 = "-trackers__uuid" - VALUE_35 = "-type" - VALUE_36 = "-updated_dt" - VALUE_37 = "-uuid" + VALUE_6 = "-cvss_scores__comment" + VALUE_7 = "-cvss_scores__created_dt" + VALUE_8 = "-cvss_scores__issuer" + VALUE_9 = "-cvss_scores__score" + VALUE_10 = "-cvss_scores__updated_dt" + VALUE_11 = "-cvss_scores__uuid" + VALUE_12 = "-cvss_scores__vector" + VALUE_13 = "-flaw__component" + VALUE_14 = "-flaw__created_dt" + VALUE_15 = "-flaw__cve_id" + VALUE_16 = "-flaw__cvss2" + VALUE_17 = "-flaw__cvss2_score" + VALUE_18 = "-flaw__cvss3" + VALUE_19 = "-flaw__cvss3_score" + VALUE_20 = "-flaw__cwe_id" + VALUE_21 = "-flaw__impact" + VALUE_22 = "-flaw__nvd_cvss2" + VALUE_23 = "-flaw__nvd_cvss3" + VALUE_24 = "-flaw__reported_dt" + VALUE_25 = "-flaw__source" + VALUE_26 = "-flaw__type" + VALUE_27 = "-flaw__unembargo_dt" + VALUE_28 = "-flaw__updated_dt" + VALUE_29 = "-flaw__uuid" + VALUE_30 = "-impact" + VALUE_31 = "-ps_component" + VALUE_32 = "-ps_module" + VALUE_33 = "-resolution" + VALUE_34 = "-trackers__created_dt" + VALUE_35 = "-trackers__external_system_id" + VALUE_36 = "-trackers__ps_update_stream" + VALUE_37 = "-trackers__resolution" + VALUE_38 = "-trackers__status" + VALUE_39 = "-trackers__type" + VALUE_40 = "-trackers__updated_dt" + VALUE_41 = "-trackers__uuid" + VALUE_42 = "-type" + VALUE_43 = "-updated_dt" + VALUE_44 = "-uuid" AFFECTEDNESS = "affectedness" CREATED_DT = "created_dt" CVSS2 = "cvss2" CVSS2_SCORE = "cvss2_score" CVSS3 = "cvss3" CVSS3_SCORE = "cvss3_score" + CVSS_SCORES_COMMENT = "cvss_scores__comment" + CVSS_SCORES_CREATED_DT = "cvss_scores__created_dt" + CVSS_SCORES_ISSUER = "cvss_scores__issuer" + CVSS_SCORES_SCORE = "cvss_scores__score" + CVSS_SCORES_UPDATED_DT = "cvss_scores__updated_dt" + CVSS_SCORES_UUID = "cvss_scores__uuid" + CVSS_SCORES_VECTOR = "cvss_scores__vector" FLAW_COMPONENT = "flaw__component" FLAW_CREATED_DT = "flaw__created_dt" FLAW_CVE_ID = "flaw__cve_id" diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_retrieve_response_200.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_retrieve_response_200.py index 67f479e..c32fba0 100644 --- a/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_retrieve_response_200.py +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_retrieve_response_200.py @@ -4,6 +4,7 @@ import attr from dateutil.parser import isoparse +from ..models.affect_cvss import AffectCVSS from ..models.affect_meta_attr import AffectMetaAttr from ..models.affect_type import AffectType from ..models.affectedness_enum import AffectednessEnum @@ -26,6 +27,7 @@ class OsidbApiV1AffectsRetrieveResponse200(OSIDBModel): trackers: List[Tracker] meta_attr: AffectMetaAttr delegated_resolution: str + cvss_scores: List[AffectCVSS] embargoed: bool created_dt: datetime.datetime updated_dt: datetime.datetime @@ -63,6 +65,16 @@ def to_dict(self) -> Dict[str, Any]: meta_attr = self.meta_attr.to_dict() delegated_resolution = self.delegated_resolution + cvss_scores: List[Dict[str, Any]] = UNSET + if not isinstance(self.cvss_scores, Unset): + cvss_scores = [] + for cvss_scores_item_data in self.cvss_scores: + cvss_scores_item: Dict[str, Any] = UNSET + if not isinstance(cvss_scores_item_data, Unset): + cvss_scores_item = cvss_scores_item_data.to_dict() + + cvss_scores.append(cvss_scores_item) + embargoed = self.embargoed created_dt: str = UNSET if not isinstance(self.created_dt, Unset): @@ -149,6 +161,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["meta_attr"] = meta_attr if not isinstance(delegated_resolution, Unset): field_dict["delegated_resolution"] = delegated_resolution + if not isinstance(cvss_scores, Unset): + field_dict["cvss_scores"] = cvss_scores if not isinstance(embargoed, Unset): field_dict["embargoed"] = embargoed if not isinstance(created_dt, Unset): @@ -217,6 +231,21 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: delegated_resolution = d.pop("delegated_resolution", UNSET) + cvss_scores = [] + _cvss_scores = d.pop("cvss_scores", UNSET) + if _cvss_scores is UNSET: + cvss_scores = UNSET + else: + for cvss_scores_item_data in _cvss_scores or []: + _cvss_scores_item = cvss_scores_item_data + cvss_scores_item: AffectCVSS + if isinstance(_cvss_scores_item, Unset): + cvss_scores_item = UNSET + else: + cvss_scores_item = AffectCVSS.from_dict(_cvss_scores_item) + + cvss_scores.append(cvss_scores_item) + embargoed = d.pop("embargoed", UNSET) _created_dt = d.pop("created_dt", UNSET) @@ -359,6 +388,7 @@ def _parse_impact(data: object) -> Union[BlankEnum, ImpactEnum, Unset]: trackers=trackers, meta_attr=meta_attr, delegated_resolution=delegated_resolution, + cvss_scores=cvss_scores, embargoed=embargoed, created_dt=created_dt, updated_dt=updated_dt, @@ -389,6 +419,7 @@ def get_fields(): "trackers": List[Tracker], "meta_attr": AffectMetaAttr, "delegated_resolution": str, + "cvss_scores": List[AffectCVSS], "embargoed": bool, "created_dt": datetime.datetime, "updated_dt": datetime.datetime, diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_update_response_200.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_update_response_200.py index 8457847..2cebc67 100644 --- a/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_update_response_200.py +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_affects_update_response_200.py @@ -4,6 +4,7 @@ import attr from dateutil.parser import isoparse +from ..models.affect_cvss import AffectCVSS from ..models.affect_meta_attr import AffectMetaAttr from ..models.affect_type import AffectType from ..models.affectedness_enum import AffectednessEnum @@ -26,6 +27,7 @@ class OsidbApiV1AffectsUpdateResponse200(OSIDBModel): trackers: List[Tracker] meta_attr: AffectMetaAttr delegated_resolution: str + cvss_scores: List[AffectCVSS] embargoed: bool created_dt: datetime.datetime updated_dt: datetime.datetime @@ -63,6 +65,16 @@ def to_dict(self) -> Dict[str, Any]: meta_attr = self.meta_attr.to_dict() delegated_resolution = self.delegated_resolution + cvss_scores: List[Dict[str, Any]] = UNSET + if not isinstance(self.cvss_scores, Unset): + cvss_scores = [] + for cvss_scores_item_data in self.cvss_scores: + cvss_scores_item: Dict[str, Any] = UNSET + if not isinstance(cvss_scores_item_data, Unset): + cvss_scores_item = cvss_scores_item_data.to_dict() + + cvss_scores.append(cvss_scores_item) + embargoed = self.embargoed created_dt: str = UNSET if not isinstance(self.created_dt, Unset): @@ -149,6 +161,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["meta_attr"] = meta_attr if not isinstance(delegated_resolution, Unset): field_dict["delegated_resolution"] = delegated_resolution + if not isinstance(cvss_scores, Unset): + field_dict["cvss_scores"] = cvss_scores if not isinstance(embargoed, Unset): field_dict["embargoed"] = embargoed if not isinstance(created_dt, Unset): @@ -217,6 +231,21 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: delegated_resolution = d.pop("delegated_resolution", UNSET) + cvss_scores = [] + _cvss_scores = d.pop("cvss_scores", UNSET) + if _cvss_scores is UNSET: + cvss_scores = UNSET + else: + for cvss_scores_item_data in _cvss_scores or []: + _cvss_scores_item = cvss_scores_item_data + cvss_scores_item: AffectCVSS + if isinstance(_cvss_scores_item, Unset): + cvss_scores_item = UNSET + else: + cvss_scores_item = AffectCVSS.from_dict(_cvss_scores_item) + + cvss_scores.append(cvss_scores_item) + embargoed = d.pop("embargoed", UNSET) _created_dt = d.pop("created_dt", UNSET) @@ -359,6 +388,7 @@ def _parse_impact(data: object) -> Union[BlankEnum, ImpactEnum, Unset]: trackers=trackers, meta_attr=meta_attr, delegated_resolution=delegated_resolution, + cvss_scores=cvss_scores, embargoed=embargoed, created_dt=created_dt, updated_dt=updated_dt, @@ -389,6 +419,7 @@ def get_fields(): "trackers": List[Tracker], "meta_attr": AffectMetaAttr, "delegated_resolution": str, + "cvss_scores": List[AffectCVSS], "embargoed": bool, "created_dt": datetime.datetime, "updated_dt": datetime.datetime, diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_acknowledgments_destroy_response_204.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_acknowledgments_destroy_response_200.py similarity index 92% rename from osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_acknowledgments_destroy_response_204.py rename to osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_acknowledgments_destroy_response_200.py index 4d5ad87..b1d77fc 100644 --- a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_acknowledgments_destroy_response_204.py +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_acknowledgments_destroy_response_200.py @@ -6,11 +6,11 @@ from ..types import UNSET, OSIDBModel, Unset -T = TypeVar("T", bound="OsidbApiV1FlawsAcknowledgmentsDestroyResponse204") +T = TypeVar("T", bound="OsidbApiV1FlawsAcknowledgmentsDestroyResponse200") @attr.s(auto_attribs=True) -class OsidbApiV1FlawsAcknowledgmentsDestroyResponse204(OSIDBModel): +class OsidbApiV1FlawsAcknowledgmentsDestroyResponse200(OSIDBModel): """ """ dt: Union[Unset, datetime.datetime] = UNSET @@ -57,17 +57,17 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: version = d.pop("version", UNSET) - osidb_api_v1_flaws_acknowledgments_destroy_response_204 = cls( + osidb_api_v1_flaws_acknowledgments_destroy_response_200 = cls( dt=dt, env=env, revision=revision, version=version, ) - osidb_api_v1_flaws_acknowledgments_destroy_response_204.additional_properties = ( + osidb_api_v1_flaws_acknowledgments_destroy_response_200.additional_properties = ( d ) - return osidb_api_v1_flaws_acknowledgments_destroy_response_204 + return osidb_api_v1_flaws_acknowledgments_destroy_response_200 @staticmethod def get_fields(): diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_create_response_201.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_create_response_201.py index ada0ab9..9ea5269 100644 --- a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_create_response_201.py +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_create_response_201.py @@ -7,9 +7,9 @@ from ..models.affect import Affect from ..models.blank_enum import BlankEnum from ..models.comment import Comment -from ..models.cv_ev_5_package_versions import CVEv5PackageVersions from ..models.flaw_acknowledgment import FlawAcknowledgment from ..models.flaw_classification import FlawClassification +from ..models.flaw_cvss import FlawCVSS from ..models.flaw_meta_attr import FlawMetaAttr from ..models.flaw_reference import FlawReference from ..models.flaw_type import FlawType @@ -17,6 +17,7 @@ from ..models.major_incident_state_enum import MajorIncidentStateEnum from ..models.meta import Meta from ..models.nist_cvss_validation_enum import NistCvssValidationEnum +from ..models.package import Package from ..models.requires_summary_enum import RequiresSummaryEnum from ..models.source_666_enum import Source666Enum from ..types import UNSET, OSIDBModel, Unset @@ -38,9 +39,10 @@ class OsidbApiV1FlawsCreateResponse201(OSIDBModel): meta: List[Meta] comments: List[Comment] meta_attr: FlawMetaAttr - package_versions: List[CVEv5PackageVersions] + package_versions: List[Package] acknowledgments: List[FlawAcknowledgment] references: List[FlawReference] + cvss_scores: List[FlawCVSS] embargoed: bool created_dt: datetime.datetime updated_dt: datetime.datetime @@ -146,6 +148,16 @@ def to_dict(self) -> Dict[str, Any]: references.append(references_item) + cvss_scores: List[Dict[str, Any]] = UNSET + if not isinstance(self.cvss_scores, Unset): + cvss_scores = [] + for cvss_scores_item_data in self.cvss_scores: + cvss_scores_item: Dict[str, Any] = UNSET + if not isinstance(cvss_scores_item_data, Unset): + cvss_scores_item = cvss_scores_item_data.to_dict() + + cvss_scores.append(cvss_scores_item) + embargoed = self.embargoed created_dt: str = UNSET if not isinstance(self.created_dt, Unset): @@ -300,6 +312,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["acknowledgments"] = acknowledgments if not isinstance(references, Unset): field_dict["references"] = references + if not isinstance(cvss_scores, Unset): + field_dict["cvss_scores"] = cvss_scores if not isinstance(embargoed, Unset): field_dict["embargoed"] = embargoed if not isinstance(created_dt, Unset): @@ -435,13 +449,11 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: for package_versions_item_data in _package_versions or []: _package_versions_item = package_versions_item_data - package_versions_item: CVEv5PackageVersions + package_versions_item: Package if isinstance(_package_versions_item, Unset): package_versions_item = UNSET else: - package_versions_item = CVEv5PackageVersions.from_dict( - _package_versions_item - ) + package_versions_item = Package.from_dict(_package_versions_item) package_versions.append(package_versions_item) @@ -477,6 +489,21 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: references.append(references_item) + cvss_scores = [] + _cvss_scores = d.pop("cvss_scores", UNSET) + if _cvss_scores is UNSET: + cvss_scores = UNSET + else: + for cvss_scores_item_data in _cvss_scores or []: + _cvss_scores_item = cvss_scores_item_data + cvss_scores_item: FlawCVSS + if isinstance(_cvss_scores_item, Unset): + cvss_scores_item = UNSET + else: + cvss_scores_item = FlawCVSS.from_dict(_cvss_scores_item) + + cvss_scores.append(cvss_scores_item) + embargoed = d.pop("embargoed", UNSET) _created_dt = d.pop("created_dt", UNSET) @@ -739,6 +766,7 @@ def _parse_nist_cvss_validation( package_versions=package_versions, acknowledgments=acknowledgments, references=references, + cvss_scores=cvss_scores, embargoed=embargoed, created_dt=created_dt, updated_dt=updated_dt, @@ -786,9 +814,10 @@ def get_fields(): "meta": List[Meta], "comments": List[Comment], "meta_attr": FlawMetaAttr, - "package_versions": List[CVEv5PackageVersions], + "package_versions": List[Package], "acknowledgments": List[FlawAcknowledgment], "references": List[FlawReference], + "cvss_scores": List[FlawCVSS], "embargoed": bool, "created_dt": datetime.datetime, "updated_dt": datetime.datetime, diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_create_response_201.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_create_response_201.py new file mode 100644 index 0000000..2cedb21 --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_create_response_201.py @@ -0,0 +1,199 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.issuer_enum import IssuerEnum +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="OsidbApiV1FlawsCvssScoresCreateResponse201") + + +@attr.s(auto_attribs=True) +class OsidbApiV1FlawsCvssScoresCreateResponse201(OSIDBModel): + """ """ + + cvss_version: str + issuer: IssuerEnum + uuid: str + vector: str + embargoed: bool + created_dt: datetime.datetime + updated_dt: datetime.datetime + comment: Union[Unset, str] = UNSET + flaw: Union[Unset, str] = UNSET + score: Union[Unset, float] = UNSET + dt: Union[Unset, datetime.datetime] = UNSET + env: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + version: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + cvss_version = self.cvss_version + issuer: str = UNSET + if not isinstance(self.issuer, Unset): + + issuer = IssuerEnum(self.issuer).value + + uuid = self.uuid + vector = self.vector + embargoed = self.embargoed + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + updated_dt: str = UNSET + if not isinstance(self.updated_dt, Unset): + updated_dt = self.updated_dt.isoformat() + + comment = self.comment + flaw = self.flaw + score = self.score + dt: Union[Unset, str] = UNSET + if not isinstance(self.dt, Unset): + dt = self.dt.isoformat() + + env = self.env + revision = self.revision + version = self.version + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(cvss_version, Unset): + field_dict["cvss_version"] = cvss_version + if not isinstance(issuer, Unset): + field_dict["issuer"] = issuer + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(vector, Unset): + field_dict["vector"] = vector + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(updated_dt, Unset): + field_dict["updated_dt"] = updated_dt + if not isinstance(comment, Unset): + field_dict["comment"] = comment + if not isinstance(flaw, Unset): + field_dict["flaw"] = flaw + if not isinstance(score, Unset): + field_dict["score"] = score + if not isinstance(dt, Unset): + field_dict["dt"] = dt + if not isinstance(env, Unset): + field_dict["env"] = env + if not isinstance(revision, Unset): + field_dict["revision"] = revision + if not isinstance(version, Unset): + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + cvss_version = d.pop("cvss_version", UNSET) + + _issuer = d.pop("issuer", UNSET) + issuer: IssuerEnum + if isinstance(_issuer, Unset): + issuer = UNSET + else: + issuer = IssuerEnum(_issuer) + + uuid = d.pop("uuid", UNSET) + + vector = d.pop("vector", UNSET) + + embargoed = d.pop("embargoed", UNSET) + + _created_dt = d.pop("created_dt", UNSET) + created_dt: datetime.datetime + if isinstance(_created_dt, Unset): + created_dt = UNSET + else: + created_dt = isoparse(_created_dt) + + _updated_dt = d.pop("updated_dt", UNSET) + updated_dt: datetime.datetime + if isinstance(_updated_dt, Unset): + updated_dt = UNSET + else: + updated_dt = isoparse(_updated_dt) + + comment = d.pop("comment", UNSET) + + flaw = d.pop("flaw", UNSET) + + score = d.pop("score", UNSET) + + _dt = d.pop("dt", UNSET) + dt: Union[Unset, datetime.datetime] + if isinstance(_dt, Unset): + dt = UNSET + else: + dt = isoparse(_dt) + + env = d.pop("env", UNSET) + + revision = d.pop("revision", UNSET) + + version = d.pop("version", UNSET) + + osidb_api_v1_flaws_cvss_scores_create_response_201 = cls( + cvss_version=cvss_version, + issuer=issuer, + uuid=uuid, + vector=vector, + embargoed=embargoed, + created_dt=created_dt, + updated_dt=updated_dt, + comment=comment, + flaw=flaw, + score=score, + dt=dt, + env=env, + revision=revision, + version=version, + ) + + osidb_api_v1_flaws_cvss_scores_create_response_201.additional_properties = d + return osidb_api_v1_flaws_cvss_scores_create_response_201 + + @staticmethod + def get_fields(): + return { + "cvss_version": str, + "issuer": IssuerEnum, + "uuid": str, + "vector": str, + "embargoed": bool, + "created_dt": datetime.datetime, + "updated_dt": datetime.datetime, + "comment": str, + "flaw": str, + "score": float, + "dt": datetime.datetime, + "env": str, + "revision": str, + "version": str, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_destroy_response_200.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_destroy_response_200.py new file mode 100644 index 0000000..4613f04 --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_destroy_response_200.py @@ -0,0 +1,93 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="OsidbApiV1FlawsCvssScoresDestroyResponse200") + + +@attr.s(auto_attribs=True) +class OsidbApiV1FlawsCvssScoresDestroyResponse200(OSIDBModel): + """ """ + + dt: Union[Unset, datetime.datetime] = UNSET + env: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + version: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + dt: Union[Unset, str] = UNSET + if not isinstance(self.dt, Unset): + dt = self.dt.isoformat() + + env = self.env + revision = self.revision + version = self.version + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(dt, Unset): + field_dict["dt"] = dt + if not isinstance(env, Unset): + field_dict["env"] = env + if not isinstance(revision, Unset): + field_dict["revision"] = revision + if not isinstance(version, Unset): + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _dt = d.pop("dt", UNSET) + dt: Union[Unset, datetime.datetime] + if isinstance(_dt, Unset): + dt = UNSET + else: + dt = isoparse(_dt) + + env = d.pop("env", UNSET) + + revision = d.pop("revision", UNSET) + + version = d.pop("version", UNSET) + + osidb_api_v1_flaws_cvss_scores_destroy_response_200 = cls( + dt=dt, + env=env, + revision=revision, + version=version, + ) + + osidb_api_v1_flaws_cvss_scores_destroy_response_200.additional_properties = d + return osidb_api_v1_flaws_cvss_scores_destroy_response_200 + + @staticmethod + def get_fields(): + return { + "dt": datetime.datetime, + "env": str, + "revision": str, + "version": str, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_list_issuer.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_list_issuer.py new file mode 100644 index 0000000..05d2c25 --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_list_issuer.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class OsidbApiV1FlawsCvssScoresListIssuer(str, Enum): + NIST = "NIST" + RH = "RH" + + def __str__(self) -> str: + return str(self.value) diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_list_response_200.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_list_response_200.py new file mode 100644 index 0000000..7bf7267 --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_list_response_200.py @@ -0,0 +1,148 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.flaw_cvss import FlawCVSS +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="OsidbApiV1FlawsCvssScoresListResponse200") + + +@attr.s(auto_attribs=True) +class OsidbApiV1FlawsCvssScoresListResponse200(OSIDBModel): + """ """ + + count: Union[Unset, int] = UNSET + next_: Union[Unset, None, str] = UNSET + previous: Union[Unset, None, str] = UNSET + results: Union[Unset, List[FlawCVSS]] = UNSET + dt: Union[Unset, datetime.datetime] = UNSET + env: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + version: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + count = self.count + next_ = self.next_ + previous = self.previous + results: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.results, Unset): + results = [] + for results_item_data in self.results: + results_item: Dict[str, Any] = UNSET + if not isinstance(results_item_data, Unset): + results_item = results_item_data.to_dict() + + results.append(results_item) + + dt: Union[Unset, str] = UNSET + if not isinstance(self.dt, Unset): + dt = self.dt.isoformat() + + env = self.env + revision = self.revision + version = self.version + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(count, Unset): + field_dict["count"] = count + if not isinstance(next_, Unset): + field_dict["next"] = next_ + if not isinstance(previous, Unset): + field_dict["previous"] = previous + if not isinstance(results, Unset): + field_dict["results"] = results + if not isinstance(dt, Unset): + field_dict["dt"] = dt + if not isinstance(env, Unset): + field_dict["env"] = env + if not isinstance(revision, Unset): + field_dict["revision"] = revision + if not isinstance(version, Unset): + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + count = d.pop("count", UNSET) + + next_ = d.pop("next", UNSET) + + previous = d.pop("previous", UNSET) + + results = [] + _results = d.pop("results", UNSET) + if _results is UNSET: + results = UNSET + else: + for results_item_data in _results or []: + _results_item = results_item_data + results_item: FlawCVSS + if isinstance(_results_item, Unset): + results_item = UNSET + else: + results_item = FlawCVSS.from_dict(_results_item) + + results.append(results_item) + + _dt = d.pop("dt", UNSET) + dt: Union[Unset, datetime.datetime] + if isinstance(_dt, Unset): + dt = UNSET + else: + dt = isoparse(_dt) + + env = d.pop("env", UNSET) + + revision = d.pop("revision", UNSET) + + version = d.pop("version", UNSET) + + osidb_api_v1_flaws_cvss_scores_list_response_200 = cls( + count=count, + next_=next_, + previous=previous, + results=results, + dt=dt, + env=env, + revision=revision, + version=version, + ) + + osidb_api_v1_flaws_cvss_scores_list_response_200.additional_properties = d + return osidb_api_v1_flaws_cvss_scores_list_response_200 + + @staticmethod + def get_fields(): + return { + "count": int, + "next": str, + "previous": str, + "results": List[FlawCVSS], + "dt": datetime.datetime, + "env": str, + "revision": str, + "version": str, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_retrieve_response_200.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_retrieve_response_200.py new file mode 100644 index 0000000..c2e7acc --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_retrieve_response_200.py @@ -0,0 +1,199 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.issuer_enum import IssuerEnum +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="OsidbApiV1FlawsCvssScoresRetrieveResponse200") + + +@attr.s(auto_attribs=True) +class OsidbApiV1FlawsCvssScoresRetrieveResponse200(OSIDBModel): + """ """ + + cvss_version: str + issuer: IssuerEnum + uuid: str + vector: str + embargoed: bool + created_dt: datetime.datetime + updated_dt: datetime.datetime + comment: Union[Unset, str] = UNSET + flaw: Union[Unset, str] = UNSET + score: Union[Unset, float] = UNSET + dt: Union[Unset, datetime.datetime] = UNSET + env: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + version: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + cvss_version = self.cvss_version + issuer: str = UNSET + if not isinstance(self.issuer, Unset): + + issuer = IssuerEnum(self.issuer).value + + uuid = self.uuid + vector = self.vector + embargoed = self.embargoed + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + updated_dt: str = UNSET + if not isinstance(self.updated_dt, Unset): + updated_dt = self.updated_dt.isoformat() + + comment = self.comment + flaw = self.flaw + score = self.score + dt: Union[Unset, str] = UNSET + if not isinstance(self.dt, Unset): + dt = self.dt.isoformat() + + env = self.env + revision = self.revision + version = self.version + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(cvss_version, Unset): + field_dict["cvss_version"] = cvss_version + if not isinstance(issuer, Unset): + field_dict["issuer"] = issuer + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(vector, Unset): + field_dict["vector"] = vector + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(updated_dt, Unset): + field_dict["updated_dt"] = updated_dt + if not isinstance(comment, Unset): + field_dict["comment"] = comment + if not isinstance(flaw, Unset): + field_dict["flaw"] = flaw + if not isinstance(score, Unset): + field_dict["score"] = score + if not isinstance(dt, Unset): + field_dict["dt"] = dt + if not isinstance(env, Unset): + field_dict["env"] = env + if not isinstance(revision, Unset): + field_dict["revision"] = revision + if not isinstance(version, Unset): + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + cvss_version = d.pop("cvss_version", UNSET) + + _issuer = d.pop("issuer", UNSET) + issuer: IssuerEnum + if isinstance(_issuer, Unset): + issuer = UNSET + else: + issuer = IssuerEnum(_issuer) + + uuid = d.pop("uuid", UNSET) + + vector = d.pop("vector", UNSET) + + embargoed = d.pop("embargoed", UNSET) + + _created_dt = d.pop("created_dt", UNSET) + created_dt: datetime.datetime + if isinstance(_created_dt, Unset): + created_dt = UNSET + else: + created_dt = isoparse(_created_dt) + + _updated_dt = d.pop("updated_dt", UNSET) + updated_dt: datetime.datetime + if isinstance(_updated_dt, Unset): + updated_dt = UNSET + else: + updated_dt = isoparse(_updated_dt) + + comment = d.pop("comment", UNSET) + + flaw = d.pop("flaw", UNSET) + + score = d.pop("score", UNSET) + + _dt = d.pop("dt", UNSET) + dt: Union[Unset, datetime.datetime] + if isinstance(_dt, Unset): + dt = UNSET + else: + dt = isoparse(_dt) + + env = d.pop("env", UNSET) + + revision = d.pop("revision", UNSET) + + version = d.pop("version", UNSET) + + osidb_api_v1_flaws_cvss_scores_retrieve_response_200 = cls( + cvss_version=cvss_version, + issuer=issuer, + uuid=uuid, + vector=vector, + embargoed=embargoed, + created_dt=created_dt, + updated_dt=updated_dt, + comment=comment, + flaw=flaw, + score=score, + dt=dt, + env=env, + revision=revision, + version=version, + ) + + osidb_api_v1_flaws_cvss_scores_retrieve_response_200.additional_properties = d + return osidb_api_v1_flaws_cvss_scores_retrieve_response_200 + + @staticmethod + def get_fields(): + return { + "cvss_version": str, + "issuer": IssuerEnum, + "uuid": str, + "vector": str, + "embargoed": bool, + "created_dt": datetime.datetime, + "updated_dt": datetime.datetime, + "comment": str, + "flaw": str, + "score": float, + "dt": datetime.datetime, + "env": str, + "revision": str, + "version": str, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_update_response_200.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_update_response_200.py new file mode 100644 index 0000000..1644e44 --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_cvss_scores_update_response_200.py @@ -0,0 +1,199 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.issuer_enum import IssuerEnum +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="OsidbApiV1FlawsCvssScoresUpdateResponse200") + + +@attr.s(auto_attribs=True) +class OsidbApiV1FlawsCvssScoresUpdateResponse200(OSIDBModel): + """ """ + + cvss_version: str + issuer: IssuerEnum + uuid: str + vector: str + embargoed: bool + created_dt: datetime.datetime + updated_dt: datetime.datetime + comment: Union[Unset, str] = UNSET + flaw: Union[Unset, str] = UNSET + score: Union[Unset, float] = UNSET + dt: Union[Unset, datetime.datetime] = UNSET + env: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + version: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + cvss_version = self.cvss_version + issuer: str = UNSET + if not isinstance(self.issuer, Unset): + + issuer = IssuerEnum(self.issuer).value + + uuid = self.uuid + vector = self.vector + embargoed = self.embargoed + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + updated_dt: str = UNSET + if not isinstance(self.updated_dt, Unset): + updated_dt = self.updated_dt.isoformat() + + comment = self.comment + flaw = self.flaw + score = self.score + dt: Union[Unset, str] = UNSET + if not isinstance(self.dt, Unset): + dt = self.dt.isoformat() + + env = self.env + revision = self.revision + version = self.version + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(cvss_version, Unset): + field_dict["cvss_version"] = cvss_version + if not isinstance(issuer, Unset): + field_dict["issuer"] = issuer + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(vector, Unset): + field_dict["vector"] = vector + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(updated_dt, Unset): + field_dict["updated_dt"] = updated_dt + if not isinstance(comment, Unset): + field_dict["comment"] = comment + if not isinstance(flaw, Unset): + field_dict["flaw"] = flaw + if not isinstance(score, Unset): + field_dict["score"] = score + if not isinstance(dt, Unset): + field_dict["dt"] = dt + if not isinstance(env, Unset): + field_dict["env"] = env + if not isinstance(revision, Unset): + field_dict["revision"] = revision + if not isinstance(version, Unset): + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + cvss_version = d.pop("cvss_version", UNSET) + + _issuer = d.pop("issuer", UNSET) + issuer: IssuerEnum + if isinstance(_issuer, Unset): + issuer = UNSET + else: + issuer = IssuerEnum(_issuer) + + uuid = d.pop("uuid", UNSET) + + vector = d.pop("vector", UNSET) + + embargoed = d.pop("embargoed", UNSET) + + _created_dt = d.pop("created_dt", UNSET) + created_dt: datetime.datetime + if isinstance(_created_dt, Unset): + created_dt = UNSET + else: + created_dt = isoparse(_created_dt) + + _updated_dt = d.pop("updated_dt", UNSET) + updated_dt: datetime.datetime + if isinstance(_updated_dt, Unset): + updated_dt = UNSET + else: + updated_dt = isoparse(_updated_dt) + + comment = d.pop("comment", UNSET) + + flaw = d.pop("flaw", UNSET) + + score = d.pop("score", UNSET) + + _dt = d.pop("dt", UNSET) + dt: Union[Unset, datetime.datetime] + if isinstance(_dt, Unset): + dt = UNSET + else: + dt = isoparse(_dt) + + env = d.pop("env", UNSET) + + revision = d.pop("revision", UNSET) + + version = d.pop("version", UNSET) + + osidb_api_v1_flaws_cvss_scores_update_response_200 = cls( + cvss_version=cvss_version, + issuer=issuer, + uuid=uuid, + vector=vector, + embargoed=embargoed, + created_dt=created_dt, + updated_dt=updated_dt, + comment=comment, + flaw=flaw, + score=score, + dt=dt, + env=env, + revision=revision, + version=version, + ) + + osidb_api_v1_flaws_cvss_scores_update_response_200.additional_properties = d + return osidb_api_v1_flaws_cvss_scores_update_response_200 + + @staticmethod + def get_fields(): + return { + "cvss_version": str, + "issuer": IssuerEnum, + "uuid": str, + "vector": str, + "embargoed": bool, + "created_dt": datetime.datetime, + "updated_dt": datetime.datetime, + "comment": str, + "flaw": str, + "score": float, + "dt": datetime.datetime, + "env": str, + "revision": str, + "version": str, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_list_cvss_scores_issuer.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_list_cvss_scores_issuer.py new file mode 100644 index 0000000..65065e9 --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_list_cvss_scores_issuer.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class OsidbApiV1FlawsListCvssScoresIssuer(str, Enum): + NIST = "NIST" + RH = "RH" + + def __str__(self) -> str: + return str(self.value) diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_list_order_item.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_list_order_item.py index 605433a..919112f 100644 --- a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_list_order_item.py +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_list_order_item.py @@ -20,36 +20,51 @@ class OsidbApiV1FlawsListOrderItem(str, Enum): VALUE_15 = "-affects__resolution" VALUE_16 = "-affects__trackers__created_dt" VALUE_17 = "-affects__trackers__errata__advisory_name" - VALUE_18 = "-affects__trackers__external_system_id" - VALUE_19 = "-affects__trackers__ps_update_stream" - VALUE_20 = "-affects__trackers__resolution" - VALUE_21 = "-affects__trackers__status" - VALUE_22 = "-affects__trackers__type" - VALUE_23 = "-affects__trackers__updated_dt" - VALUE_24 = "-affects__trackers__uuid" - VALUE_25 = "-affects__type" - VALUE_26 = "-affects__updated_dt" - VALUE_27 = "-affects__uuid" - VALUE_28 = "-component" - VALUE_29 = "-created_dt" - VALUE_30 = "-cve_id" - VALUE_31 = "-cvss2" - VALUE_32 = "-cvss2_score" - VALUE_33 = "-cvss3" - VALUE_34 = "-cvss3_score" - VALUE_35 = "-cwe_id" - VALUE_36 = "-impact" - VALUE_37 = "-major_incident_state" - VALUE_38 = "-nist_cvss_validation" - VALUE_39 = "-nvd_cvss2" - VALUE_40 = "-nvd_cvss3" - VALUE_41 = "-reported_dt" - VALUE_42 = "-requires_summary" - VALUE_43 = "-source" - VALUE_44 = "-type" - VALUE_45 = "-unembargo_dt" - VALUE_46 = "-updated_dt" - VALUE_47 = "-uuid" + VALUE_18 = "-affects__trackers__errata__et_id" + VALUE_19 = "-affects__trackers__errata__shipped_dt" + VALUE_20 = "-affects__trackers__external_system_id" + VALUE_21 = "-affects__trackers__ps_update_stream" + VALUE_22 = "-affects__trackers__resolution" + VALUE_23 = "-affects__trackers__status" + VALUE_24 = "-affects__trackers__type" + VALUE_25 = "-affects__trackers__updated_dt" + VALUE_26 = "-affects__trackers__uuid" + VALUE_27 = "-affects__type" + VALUE_28 = "-affects__updated_dt" + VALUE_29 = "-affects__uuid" + VALUE_30 = "-component" + VALUE_31 = "-created_dt" + VALUE_32 = "-cve_id" + VALUE_33 = "-cvss2" + VALUE_34 = "-cvss2_score" + VALUE_35 = "-cvss3" + VALUE_36 = "-cvss3_score" + VALUE_37 = "-cvss_scores__comment" + VALUE_38 = "-cvss_scores__created_dt" + VALUE_39 = "-cvss_scores__issuer" + VALUE_40 = "-cvss_scores__score" + VALUE_41 = "-cvss_scores__updated_dt" + VALUE_42 = "-cvss_scores__uuid" + VALUE_43 = "-cvss_scores__vector" + VALUE_44 = "-cwe_id" + VALUE_45 = "-impact" + VALUE_46 = "-major_incident_state" + VALUE_47 = "-nist_cvss_validation" + VALUE_48 = "-nvd_cvss2" + VALUE_49 = "-nvd_cvss3" + VALUE_50 = "-references__created_dt" + VALUE_51 = "-references__description" + VALUE_52 = "-references__type" + VALUE_53 = "-references__updated_dt" + VALUE_54 = "-references__url" + VALUE_55 = "-references__uuid" + VALUE_56 = "-reported_dt" + VALUE_57 = "-requires_summary" + VALUE_58 = "-source" + VALUE_59 = "-type" + VALUE_60 = "-unembargo_dt" + VALUE_61 = "-updated_dt" + VALUE_62 = "-uuid" ACKNOWLEDGMENTS_AFFILIATION = "acknowledgments__affiliation" ACKNOWLEDGMENTS_CREATED_DT = "acknowledgments__created_dt" ACKNOWLEDGMENTS_FROM_UPSTREAM = "acknowledgments__from_upstream" @@ -68,6 +83,8 @@ class OsidbApiV1FlawsListOrderItem(str, Enum): AFFECTS_RESOLUTION = "affects__resolution" AFFECTS_TRACKERS_CREATED_DT = "affects__trackers__created_dt" AFFECTS_TRACKERS_ERRATA_ADVISORY_NAME = "affects__trackers__errata__advisory_name" + AFFECTS_TRACKERS_ERRATA_ET_ID = "affects__trackers__errata__et_id" + AFFECTS_TRACKERS_ERRATA_SHIPPED_DT = "affects__trackers__errata__shipped_dt" AFFECTS_TRACKERS_EXTERNAL_SYSTEM_ID = "affects__trackers__external_system_id" AFFECTS_TRACKERS_PS_UPDATE_STREAM = "affects__trackers__ps_update_stream" AFFECTS_TRACKERS_RESOLUTION = "affects__trackers__resolution" @@ -85,12 +102,25 @@ class OsidbApiV1FlawsListOrderItem(str, Enum): CVSS2_SCORE = "cvss2_score" CVSS3 = "cvss3" CVSS3_SCORE = "cvss3_score" + CVSS_SCORES_COMMENT = "cvss_scores__comment" + CVSS_SCORES_CREATED_DT = "cvss_scores__created_dt" + CVSS_SCORES_ISSUER = "cvss_scores__issuer" + CVSS_SCORES_SCORE = "cvss_scores__score" + CVSS_SCORES_UPDATED_DT = "cvss_scores__updated_dt" + CVSS_SCORES_UUID = "cvss_scores__uuid" + CVSS_SCORES_VECTOR = "cvss_scores__vector" CWE_ID = "cwe_id" IMPACT = "impact" MAJOR_INCIDENT_STATE = "major_incident_state" NIST_CVSS_VALIDATION = "nist_cvss_validation" NVD_CVSS2 = "nvd_cvss2" NVD_CVSS3 = "nvd_cvss3" + REFERENCES_CREATED_DT = "references__created_dt" + REFERENCES_DESCRIPTION = "references__description" + REFERENCES_TYPE = "references__type" + REFERENCES_UPDATED_DT = "references__updated_dt" + REFERENCES_URL = "references__url" + REFERENCES_UUID = "references__uuid" REPORTED_DT = "reported_dt" REQUIRES_SUMMARY = "requires_summary" SOURCE = "source" diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_list_references_type.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_list_references_type.py new file mode 100644 index 0000000..daf4e3d --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_list_references_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class OsidbApiV1FlawsListReferencesType(str, Enum): + ARTICLE = "ARTICLE" + EXTERNAL = "EXTERNAL" + + def __str__(self) -> str: + return str(self.value) diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_package_versions_create_response_201.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_package_versions_create_response_201.py new file mode 100644 index 0000000..96e661e --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_package_versions_create_response_201.py @@ -0,0 +1,190 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.flaw_version import FlawVersion +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="OsidbApiV1FlawsPackageVersionsCreateResponse201") + + +@attr.s(auto_attribs=True) +class OsidbApiV1FlawsPackageVersionsCreateResponse201(OSIDBModel): + """ """ + + package: str + versions: List[FlawVersion] + flaw: str + uuid: str + embargoed: bool + created_dt: datetime.datetime + updated_dt: datetime.datetime + dt: Union[Unset, datetime.datetime] = UNSET + env: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + version: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + package = self.package + versions: List[Dict[str, Any]] = UNSET + if not isinstance(self.versions, Unset): + versions = [] + for versions_item_data in self.versions: + versions_item: Dict[str, Any] = UNSET + if not isinstance(versions_item_data, Unset): + versions_item = versions_item_data.to_dict() + + versions.append(versions_item) + + flaw = self.flaw + uuid = self.uuid + embargoed = self.embargoed + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + updated_dt: str = UNSET + if not isinstance(self.updated_dt, Unset): + updated_dt = self.updated_dt.isoformat() + + dt: Union[Unset, str] = UNSET + if not isinstance(self.dt, Unset): + dt = self.dt.isoformat() + + env = self.env + revision = self.revision + version = self.version + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(package, Unset): + field_dict["package"] = package + if not isinstance(versions, Unset): + field_dict["versions"] = versions + if not isinstance(flaw, Unset): + field_dict["flaw"] = flaw + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(updated_dt, Unset): + field_dict["updated_dt"] = updated_dt + if not isinstance(dt, Unset): + field_dict["dt"] = dt + if not isinstance(env, Unset): + field_dict["env"] = env + if not isinstance(revision, Unset): + field_dict["revision"] = revision + if not isinstance(version, Unset): + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + package = d.pop("package", UNSET) + + versions = [] + _versions = d.pop("versions", UNSET) + if _versions is UNSET: + versions = UNSET + else: + for versions_item_data in _versions or []: + _versions_item = versions_item_data + versions_item: FlawVersion + if isinstance(_versions_item, Unset): + versions_item = UNSET + else: + versions_item = FlawVersion.from_dict(_versions_item) + + versions.append(versions_item) + + flaw = d.pop("flaw", UNSET) + + uuid = d.pop("uuid", UNSET) + + embargoed = d.pop("embargoed", UNSET) + + _created_dt = d.pop("created_dt", UNSET) + created_dt: datetime.datetime + if isinstance(_created_dt, Unset): + created_dt = UNSET + else: + created_dt = isoparse(_created_dt) + + _updated_dt = d.pop("updated_dt", UNSET) + updated_dt: datetime.datetime + if isinstance(_updated_dt, Unset): + updated_dt = UNSET + else: + updated_dt = isoparse(_updated_dt) + + _dt = d.pop("dt", UNSET) + dt: Union[Unset, datetime.datetime] + if isinstance(_dt, Unset): + dt = UNSET + else: + dt = isoparse(_dt) + + env = d.pop("env", UNSET) + + revision = d.pop("revision", UNSET) + + version = d.pop("version", UNSET) + + osidb_api_v1_flaws_package_versions_create_response_201 = cls( + package=package, + versions=versions, + flaw=flaw, + uuid=uuid, + embargoed=embargoed, + created_dt=created_dt, + updated_dt=updated_dt, + dt=dt, + env=env, + revision=revision, + version=version, + ) + + osidb_api_v1_flaws_package_versions_create_response_201.additional_properties = ( + d + ) + return osidb_api_v1_flaws_package_versions_create_response_201 + + @staticmethod + def get_fields(): + return { + "package": str, + "versions": List[FlawVersion], + "flaw": str, + "uuid": str, + "embargoed": bool, + "created_dt": datetime.datetime, + "updated_dt": datetime.datetime, + "dt": datetime.datetime, + "env": str, + "revision": str, + "version": str, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_package_versions_destroy_response_200.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_package_versions_destroy_response_200.py new file mode 100644 index 0000000..70e4926 --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_package_versions_destroy_response_200.py @@ -0,0 +1,95 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="OsidbApiV1FlawsPackageVersionsDestroyResponse200") + + +@attr.s(auto_attribs=True) +class OsidbApiV1FlawsPackageVersionsDestroyResponse200(OSIDBModel): + """ """ + + dt: Union[Unset, datetime.datetime] = UNSET + env: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + version: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + dt: Union[Unset, str] = UNSET + if not isinstance(self.dt, Unset): + dt = self.dt.isoformat() + + env = self.env + revision = self.revision + version = self.version + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(dt, Unset): + field_dict["dt"] = dt + if not isinstance(env, Unset): + field_dict["env"] = env + if not isinstance(revision, Unset): + field_dict["revision"] = revision + if not isinstance(version, Unset): + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _dt = d.pop("dt", UNSET) + dt: Union[Unset, datetime.datetime] + if isinstance(_dt, Unset): + dt = UNSET + else: + dt = isoparse(_dt) + + env = d.pop("env", UNSET) + + revision = d.pop("revision", UNSET) + + version = d.pop("version", UNSET) + + osidb_api_v1_flaws_package_versions_destroy_response_200 = cls( + dt=dt, + env=env, + revision=revision, + version=version, + ) + + osidb_api_v1_flaws_package_versions_destroy_response_200.additional_properties = ( + d + ) + return osidb_api_v1_flaws_package_versions_destroy_response_200 + + @staticmethod + def get_fields(): + return { + "dt": datetime.datetime, + "env": str, + "revision": str, + "version": str, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_package_versions_list_response_200.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_package_versions_list_response_200.py new file mode 100644 index 0000000..07d4bbf --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_package_versions_list_response_200.py @@ -0,0 +1,148 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.flaw_package_version import FlawPackageVersion +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="OsidbApiV1FlawsPackageVersionsListResponse200") + + +@attr.s(auto_attribs=True) +class OsidbApiV1FlawsPackageVersionsListResponse200(OSIDBModel): + """ """ + + count: Union[Unset, int] = UNSET + next_: Union[Unset, None, str] = UNSET + previous: Union[Unset, None, str] = UNSET + results: Union[Unset, List[FlawPackageVersion]] = UNSET + dt: Union[Unset, datetime.datetime] = UNSET + env: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + version: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + count = self.count + next_ = self.next_ + previous = self.previous + results: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.results, Unset): + results = [] + for results_item_data in self.results: + results_item: Dict[str, Any] = UNSET + if not isinstance(results_item_data, Unset): + results_item = results_item_data.to_dict() + + results.append(results_item) + + dt: Union[Unset, str] = UNSET + if not isinstance(self.dt, Unset): + dt = self.dt.isoformat() + + env = self.env + revision = self.revision + version = self.version + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(count, Unset): + field_dict["count"] = count + if not isinstance(next_, Unset): + field_dict["next"] = next_ + if not isinstance(previous, Unset): + field_dict["previous"] = previous + if not isinstance(results, Unset): + field_dict["results"] = results + if not isinstance(dt, Unset): + field_dict["dt"] = dt + if not isinstance(env, Unset): + field_dict["env"] = env + if not isinstance(revision, Unset): + field_dict["revision"] = revision + if not isinstance(version, Unset): + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + count = d.pop("count", UNSET) + + next_ = d.pop("next", UNSET) + + previous = d.pop("previous", UNSET) + + results = [] + _results = d.pop("results", UNSET) + if _results is UNSET: + results = UNSET + else: + for results_item_data in _results or []: + _results_item = results_item_data + results_item: FlawPackageVersion + if isinstance(_results_item, Unset): + results_item = UNSET + else: + results_item = FlawPackageVersion.from_dict(_results_item) + + results.append(results_item) + + _dt = d.pop("dt", UNSET) + dt: Union[Unset, datetime.datetime] + if isinstance(_dt, Unset): + dt = UNSET + else: + dt = isoparse(_dt) + + env = d.pop("env", UNSET) + + revision = d.pop("revision", UNSET) + + version = d.pop("version", UNSET) + + osidb_api_v1_flaws_package_versions_list_response_200 = cls( + count=count, + next_=next_, + previous=previous, + results=results, + dt=dt, + env=env, + revision=revision, + version=version, + ) + + osidb_api_v1_flaws_package_versions_list_response_200.additional_properties = d + return osidb_api_v1_flaws_package_versions_list_response_200 + + @staticmethod + def get_fields(): + return { + "count": int, + "next": str, + "previous": str, + "results": List[FlawPackageVersion], + "dt": datetime.datetime, + "env": str, + "revision": str, + "version": str, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_package_versions_retrieve_response_200.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_package_versions_retrieve_response_200.py new file mode 100644 index 0000000..4e766af --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_package_versions_retrieve_response_200.py @@ -0,0 +1,190 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.flaw_version import FlawVersion +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="OsidbApiV1FlawsPackageVersionsRetrieveResponse200") + + +@attr.s(auto_attribs=True) +class OsidbApiV1FlawsPackageVersionsRetrieveResponse200(OSIDBModel): + """ """ + + package: str + versions: List[FlawVersion] + flaw: str + uuid: str + embargoed: bool + created_dt: datetime.datetime + updated_dt: datetime.datetime + dt: Union[Unset, datetime.datetime] = UNSET + env: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + version: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + package = self.package + versions: List[Dict[str, Any]] = UNSET + if not isinstance(self.versions, Unset): + versions = [] + for versions_item_data in self.versions: + versions_item: Dict[str, Any] = UNSET + if not isinstance(versions_item_data, Unset): + versions_item = versions_item_data.to_dict() + + versions.append(versions_item) + + flaw = self.flaw + uuid = self.uuid + embargoed = self.embargoed + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + updated_dt: str = UNSET + if not isinstance(self.updated_dt, Unset): + updated_dt = self.updated_dt.isoformat() + + dt: Union[Unset, str] = UNSET + if not isinstance(self.dt, Unset): + dt = self.dt.isoformat() + + env = self.env + revision = self.revision + version = self.version + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(package, Unset): + field_dict["package"] = package + if not isinstance(versions, Unset): + field_dict["versions"] = versions + if not isinstance(flaw, Unset): + field_dict["flaw"] = flaw + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(updated_dt, Unset): + field_dict["updated_dt"] = updated_dt + if not isinstance(dt, Unset): + field_dict["dt"] = dt + if not isinstance(env, Unset): + field_dict["env"] = env + if not isinstance(revision, Unset): + field_dict["revision"] = revision + if not isinstance(version, Unset): + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + package = d.pop("package", UNSET) + + versions = [] + _versions = d.pop("versions", UNSET) + if _versions is UNSET: + versions = UNSET + else: + for versions_item_data in _versions or []: + _versions_item = versions_item_data + versions_item: FlawVersion + if isinstance(_versions_item, Unset): + versions_item = UNSET + else: + versions_item = FlawVersion.from_dict(_versions_item) + + versions.append(versions_item) + + flaw = d.pop("flaw", UNSET) + + uuid = d.pop("uuid", UNSET) + + embargoed = d.pop("embargoed", UNSET) + + _created_dt = d.pop("created_dt", UNSET) + created_dt: datetime.datetime + if isinstance(_created_dt, Unset): + created_dt = UNSET + else: + created_dt = isoparse(_created_dt) + + _updated_dt = d.pop("updated_dt", UNSET) + updated_dt: datetime.datetime + if isinstance(_updated_dt, Unset): + updated_dt = UNSET + else: + updated_dt = isoparse(_updated_dt) + + _dt = d.pop("dt", UNSET) + dt: Union[Unset, datetime.datetime] + if isinstance(_dt, Unset): + dt = UNSET + else: + dt = isoparse(_dt) + + env = d.pop("env", UNSET) + + revision = d.pop("revision", UNSET) + + version = d.pop("version", UNSET) + + osidb_api_v1_flaws_package_versions_retrieve_response_200 = cls( + package=package, + versions=versions, + flaw=flaw, + uuid=uuid, + embargoed=embargoed, + created_dt=created_dt, + updated_dt=updated_dt, + dt=dt, + env=env, + revision=revision, + version=version, + ) + + osidb_api_v1_flaws_package_versions_retrieve_response_200.additional_properties = ( + d + ) + return osidb_api_v1_flaws_package_versions_retrieve_response_200 + + @staticmethod + def get_fields(): + return { + "package": str, + "versions": List[FlawVersion], + "flaw": str, + "uuid": str, + "embargoed": bool, + "created_dt": datetime.datetime, + "updated_dt": datetime.datetime, + "dt": datetime.datetime, + "env": str, + "revision": str, + "version": str, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_package_versions_update_response_200.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_package_versions_update_response_200.py new file mode 100644 index 0000000..55dcee0 --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_package_versions_update_response_200.py @@ -0,0 +1,190 @@ +import datetime +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr +from dateutil.parser import isoparse + +from ..models.flaw_version import FlawVersion +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="OsidbApiV1FlawsPackageVersionsUpdateResponse200") + + +@attr.s(auto_attribs=True) +class OsidbApiV1FlawsPackageVersionsUpdateResponse200(OSIDBModel): + """ """ + + package: str + versions: List[FlawVersion] + flaw: str + uuid: str + embargoed: bool + created_dt: datetime.datetime + updated_dt: datetime.datetime + dt: Union[Unset, datetime.datetime] = UNSET + env: Union[Unset, str] = UNSET + revision: Union[Unset, str] = UNSET + version: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + package = self.package + versions: List[Dict[str, Any]] = UNSET + if not isinstance(self.versions, Unset): + versions = [] + for versions_item_data in self.versions: + versions_item: Dict[str, Any] = UNSET + if not isinstance(versions_item_data, Unset): + versions_item = versions_item_data.to_dict() + + versions.append(versions_item) + + flaw = self.flaw + uuid = self.uuid + embargoed = self.embargoed + created_dt: str = UNSET + if not isinstance(self.created_dt, Unset): + created_dt = self.created_dt.isoformat() + + updated_dt: str = UNSET + if not isinstance(self.updated_dt, Unset): + updated_dt = self.updated_dt.isoformat() + + dt: Union[Unset, str] = UNSET + if not isinstance(self.dt, Unset): + dt = self.dt.isoformat() + + env = self.env + revision = self.revision + version = self.version + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(package, Unset): + field_dict["package"] = package + if not isinstance(versions, Unset): + field_dict["versions"] = versions + if not isinstance(flaw, Unset): + field_dict["flaw"] = flaw + if not isinstance(uuid, Unset): + field_dict["uuid"] = uuid + if not isinstance(embargoed, Unset): + field_dict["embargoed"] = embargoed + if not isinstance(created_dt, Unset): + field_dict["created_dt"] = created_dt + if not isinstance(updated_dt, Unset): + field_dict["updated_dt"] = updated_dt + if not isinstance(dt, Unset): + field_dict["dt"] = dt + if not isinstance(env, Unset): + field_dict["env"] = env + if not isinstance(revision, Unset): + field_dict["revision"] = revision + if not isinstance(version, Unset): + field_dict["version"] = version + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + package = d.pop("package", UNSET) + + versions = [] + _versions = d.pop("versions", UNSET) + if _versions is UNSET: + versions = UNSET + else: + for versions_item_data in _versions or []: + _versions_item = versions_item_data + versions_item: FlawVersion + if isinstance(_versions_item, Unset): + versions_item = UNSET + else: + versions_item = FlawVersion.from_dict(_versions_item) + + versions.append(versions_item) + + flaw = d.pop("flaw", UNSET) + + uuid = d.pop("uuid", UNSET) + + embargoed = d.pop("embargoed", UNSET) + + _created_dt = d.pop("created_dt", UNSET) + created_dt: datetime.datetime + if isinstance(_created_dt, Unset): + created_dt = UNSET + else: + created_dt = isoparse(_created_dt) + + _updated_dt = d.pop("updated_dt", UNSET) + updated_dt: datetime.datetime + if isinstance(_updated_dt, Unset): + updated_dt = UNSET + else: + updated_dt = isoparse(_updated_dt) + + _dt = d.pop("dt", UNSET) + dt: Union[Unset, datetime.datetime] + if isinstance(_dt, Unset): + dt = UNSET + else: + dt = isoparse(_dt) + + env = d.pop("env", UNSET) + + revision = d.pop("revision", UNSET) + + version = d.pop("version", UNSET) + + osidb_api_v1_flaws_package_versions_update_response_200 = cls( + package=package, + versions=versions, + flaw=flaw, + uuid=uuid, + embargoed=embargoed, + created_dt=created_dt, + updated_dt=updated_dt, + dt=dt, + env=env, + revision=revision, + version=version, + ) + + osidb_api_v1_flaws_package_versions_update_response_200.additional_properties = ( + d + ) + return osidb_api_v1_flaws_package_versions_update_response_200 + + @staticmethod + def get_fields(): + return { + "package": str, + "versions": List[FlawVersion], + "flaw": str, + "uuid": str, + "embargoed": bool, + "created_dt": datetime.datetime, + "updated_dt": datetime.datetime, + "dt": datetime.datetime, + "env": str, + "revision": str, + "version": str, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_references_destroy_response_204.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_references_destroy_response_200.py similarity index 92% rename from osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_references_destroy_response_204.py rename to osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_references_destroy_response_200.py index 9d73b8d..735da72 100644 --- a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_references_destroy_response_204.py +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_references_destroy_response_200.py @@ -6,11 +6,11 @@ from ..types import UNSET, OSIDBModel, Unset -T = TypeVar("T", bound="OsidbApiV1FlawsReferencesDestroyResponse204") +T = TypeVar("T", bound="OsidbApiV1FlawsReferencesDestroyResponse200") @attr.s(auto_attribs=True) -class OsidbApiV1FlawsReferencesDestroyResponse204(OSIDBModel): +class OsidbApiV1FlawsReferencesDestroyResponse200(OSIDBModel): """ """ dt: Union[Unset, datetime.datetime] = UNSET @@ -57,15 +57,15 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: version = d.pop("version", UNSET) - osidb_api_v1_flaws_references_destroy_response_204 = cls( + osidb_api_v1_flaws_references_destroy_response_200 = cls( dt=dt, env=env, revision=revision, version=version, ) - osidb_api_v1_flaws_references_destroy_response_204.additional_properties = d - return osidb_api_v1_flaws_references_destroy_response_204 + osidb_api_v1_flaws_references_destroy_response_200.additional_properties = d + return osidb_api_v1_flaws_references_destroy_response_200 @staticmethod def get_fields(): diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_references_list_type.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_references_list_type.py new file mode 100644 index 0000000..875fa0e --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_references_list_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class OsidbApiV1FlawsReferencesListType(str, Enum): + ARTICLE = "ARTICLE" + EXTERNAL = "EXTERNAL" + + def __str__(self) -> str: + return str(self.value) diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_retrieve_response_200.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_retrieve_response_200.py index adcce48..2c0d1ff 100644 --- a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_retrieve_response_200.py +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_retrieve_response_200.py @@ -7,9 +7,9 @@ from ..models.affect import Affect from ..models.blank_enum import BlankEnum from ..models.comment import Comment -from ..models.cv_ev_5_package_versions import CVEv5PackageVersions from ..models.flaw_acknowledgment import FlawAcknowledgment from ..models.flaw_classification import FlawClassification +from ..models.flaw_cvss import FlawCVSS from ..models.flaw_meta_attr import FlawMetaAttr from ..models.flaw_reference import FlawReference from ..models.flaw_type import FlawType @@ -17,6 +17,7 @@ from ..models.major_incident_state_enum import MajorIncidentStateEnum from ..models.meta import Meta from ..models.nist_cvss_validation_enum import NistCvssValidationEnum +from ..models.package import Package from ..models.requires_summary_enum import RequiresSummaryEnum from ..models.source_666_enum import Source666Enum from ..types import UNSET, OSIDBModel, Unset @@ -38,9 +39,10 @@ class OsidbApiV1FlawsRetrieveResponse200(OSIDBModel): meta: List[Meta] comments: List[Comment] meta_attr: FlawMetaAttr - package_versions: List[CVEv5PackageVersions] + package_versions: List[Package] acknowledgments: List[FlawAcknowledgment] references: List[FlawReference] + cvss_scores: List[FlawCVSS] embargoed: bool created_dt: datetime.datetime updated_dt: datetime.datetime @@ -146,6 +148,16 @@ def to_dict(self) -> Dict[str, Any]: references.append(references_item) + cvss_scores: List[Dict[str, Any]] = UNSET + if not isinstance(self.cvss_scores, Unset): + cvss_scores = [] + for cvss_scores_item_data in self.cvss_scores: + cvss_scores_item: Dict[str, Any] = UNSET + if not isinstance(cvss_scores_item_data, Unset): + cvss_scores_item = cvss_scores_item_data.to_dict() + + cvss_scores.append(cvss_scores_item) + embargoed = self.embargoed created_dt: str = UNSET if not isinstance(self.created_dt, Unset): @@ -300,6 +312,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["acknowledgments"] = acknowledgments if not isinstance(references, Unset): field_dict["references"] = references + if not isinstance(cvss_scores, Unset): + field_dict["cvss_scores"] = cvss_scores if not isinstance(embargoed, Unset): field_dict["embargoed"] = embargoed if not isinstance(created_dt, Unset): @@ -435,13 +449,11 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: for package_versions_item_data in _package_versions or []: _package_versions_item = package_versions_item_data - package_versions_item: CVEv5PackageVersions + package_versions_item: Package if isinstance(_package_versions_item, Unset): package_versions_item = UNSET else: - package_versions_item = CVEv5PackageVersions.from_dict( - _package_versions_item - ) + package_versions_item = Package.from_dict(_package_versions_item) package_versions.append(package_versions_item) @@ -477,6 +489,21 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: references.append(references_item) + cvss_scores = [] + _cvss_scores = d.pop("cvss_scores", UNSET) + if _cvss_scores is UNSET: + cvss_scores = UNSET + else: + for cvss_scores_item_data in _cvss_scores or []: + _cvss_scores_item = cvss_scores_item_data + cvss_scores_item: FlawCVSS + if isinstance(_cvss_scores_item, Unset): + cvss_scores_item = UNSET + else: + cvss_scores_item = FlawCVSS.from_dict(_cvss_scores_item) + + cvss_scores.append(cvss_scores_item) + embargoed = d.pop("embargoed", UNSET) _created_dt = d.pop("created_dt", UNSET) @@ -739,6 +766,7 @@ def _parse_nist_cvss_validation( package_versions=package_versions, acknowledgments=acknowledgments, references=references, + cvss_scores=cvss_scores, embargoed=embargoed, created_dt=created_dt, updated_dt=updated_dt, @@ -786,9 +814,10 @@ def get_fields(): "meta": List[Meta], "comments": List[Comment], "meta_attr": FlawMetaAttr, - "package_versions": List[CVEv5PackageVersions], + "package_versions": List[Package], "acknowledgments": List[FlawAcknowledgment], "references": List[FlawReference], + "cvss_scores": List[FlawCVSS], "embargoed": bool, "created_dt": datetime.datetime, "updated_dt": datetime.datetime, diff --git a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_update_response_200.py b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_update_response_200.py index 429f06c..19bd508 100644 --- a/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_update_response_200.py +++ b/osidb_bindings/bindings/python_client/models/osidb_api_v1_flaws_update_response_200.py @@ -7,9 +7,9 @@ from ..models.affect import Affect from ..models.blank_enum import BlankEnum from ..models.comment import Comment -from ..models.cv_ev_5_package_versions import CVEv5PackageVersions from ..models.flaw_acknowledgment import FlawAcknowledgment from ..models.flaw_classification import FlawClassification +from ..models.flaw_cvss import FlawCVSS from ..models.flaw_meta_attr import FlawMetaAttr from ..models.flaw_reference import FlawReference from ..models.flaw_type import FlawType @@ -17,6 +17,7 @@ from ..models.major_incident_state_enum import MajorIncidentStateEnum from ..models.meta import Meta from ..models.nist_cvss_validation_enum import NistCvssValidationEnum +from ..models.package import Package from ..models.requires_summary_enum import RequiresSummaryEnum from ..models.source_666_enum import Source666Enum from ..types import UNSET, OSIDBModel, Unset @@ -38,9 +39,10 @@ class OsidbApiV1FlawsUpdateResponse200(OSIDBModel): meta: List[Meta] comments: List[Comment] meta_attr: FlawMetaAttr - package_versions: List[CVEv5PackageVersions] + package_versions: List[Package] acknowledgments: List[FlawAcknowledgment] references: List[FlawReference] + cvss_scores: List[FlawCVSS] embargoed: bool created_dt: datetime.datetime updated_dt: datetime.datetime @@ -146,6 +148,16 @@ def to_dict(self) -> Dict[str, Any]: references.append(references_item) + cvss_scores: List[Dict[str, Any]] = UNSET + if not isinstance(self.cvss_scores, Unset): + cvss_scores = [] + for cvss_scores_item_data in self.cvss_scores: + cvss_scores_item: Dict[str, Any] = UNSET + if not isinstance(cvss_scores_item_data, Unset): + cvss_scores_item = cvss_scores_item_data.to_dict() + + cvss_scores.append(cvss_scores_item) + embargoed = self.embargoed created_dt: str = UNSET if not isinstance(self.created_dt, Unset): @@ -300,6 +312,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["acknowledgments"] = acknowledgments if not isinstance(references, Unset): field_dict["references"] = references + if not isinstance(cvss_scores, Unset): + field_dict["cvss_scores"] = cvss_scores if not isinstance(embargoed, Unset): field_dict["embargoed"] = embargoed if not isinstance(created_dt, Unset): @@ -435,13 +449,11 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: for package_versions_item_data in _package_versions or []: _package_versions_item = package_versions_item_data - package_versions_item: CVEv5PackageVersions + package_versions_item: Package if isinstance(_package_versions_item, Unset): package_versions_item = UNSET else: - package_versions_item = CVEv5PackageVersions.from_dict( - _package_versions_item - ) + package_versions_item = Package.from_dict(_package_versions_item) package_versions.append(package_versions_item) @@ -477,6 +489,21 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: references.append(references_item) + cvss_scores = [] + _cvss_scores = d.pop("cvss_scores", UNSET) + if _cvss_scores is UNSET: + cvss_scores = UNSET + else: + for cvss_scores_item_data in _cvss_scores or []: + _cvss_scores_item = cvss_scores_item_data + cvss_scores_item: FlawCVSS + if isinstance(_cvss_scores_item, Unset): + cvss_scores_item = UNSET + else: + cvss_scores_item = FlawCVSS.from_dict(_cvss_scores_item) + + cvss_scores.append(cvss_scores_item) + embargoed = d.pop("embargoed", UNSET) _created_dt = d.pop("created_dt", UNSET) @@ -739,6 +766,7 @@ def _parse_nist_cvss_validation( package_versions=package_versions, acknowledgments=acknowledgments, references=references, + cvss_scores=cvss_scores, embargoed=embargoed, created_dt=created_dt, updated_dt=updated_dt, @@ -786,9 +814,10 @@ def get_fields(): "meta": List[Meta], "comments": List[Comment], "meta_attr": FlawMetaAttr, - "package_versions": List[CVEv5PackageVersions], + "package_versions": List[Package], "acknowledgments": List[FlawAcknowledgment], "references": List[FlawReference], + "cvss_scores": List[FlawCVSS], "embargoed": bool, "created_dt": datetime.datetime, "updated_dt": datetime.datetime, diff --git a/osidb_bindings/bindings/python_client/models/cv_ev_5_package_versions.py b/osidb_bindings/bindings/python_client/models/package.py similarity index 81% rename from osidb_bindings/bindings/python_client/models/cv_ev_5_package_versions.py rename to osidb_bindings/bindings/python_client/models/package.py index 740cbde..4568a08 100644 --- a/osidb_bindings/bindings/python_client/models/cv_ev_5_package_versions.py +++ b/osidb_bindings/bindings/python_client/models/package.py @@ -2,18 +2,18 @@ import attr -from ..models.cv_ev_5_versions import CVEv5Versions +from ..models.package_ver import PackageVer from ..types import UNSET, OSIDBModel, Unset -T = TypeVar("T", bound="CVEv5PackageVersions") +T = TypeVar("T", bound="Package") @attr.s(auto_attribs=True) -class CVEv5PackageVersions(OSIDBModel): - """CVEv5 package versions serializer""" +class Package(OSIDBModel): + """package_versions (Package model) serializer for read-only use in FlawSerializer.""" package: str - versions: List[CVEv5Versions] + versions: List[PackageVer] additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -49,27 +49,27 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: for versions_item_data in _versions or []: _versions_item = versions_item_data - versions_item: CVEv5Versions + versions_item: PackageVer if isinstance(_versions_item, Unset): versions_item = UNSET else: - versions_item = CVEv5Versions.from_dict(_versions_item) + versions_item = PackageVer.from_dict(_versions_item) versions.append(versions_item) - cv_ev_5_package_versions = cls( + package = cls( package=package, versions=versions, ) - cv_ev_5_package_versions.additional_properties = d - return cv_ev_5_package_versions + package.additional_properties = d + return package @staticmethod def get_fields(): return { "package": str, - "versions": List[CVEv5Versions], + "versions": List[PackageVer], } @property diff --git a/osidb_bindings/bindings/python_client/models/cv_ev_5_versions.py b/osidb_bindings/bindings/python_client/models/package_ver.py similarity index 68% rename from osidb_bindings/bindings/python_client/models/cv_ev_5_versions.py rename to osidb_bindings/bindings/python_client/models/package_ver.py index 1fae6ed..03914fd 100644 --- a/osidb_bindings/bindings/python_client/models/cv_ev_5_versions.py +++ b/osidb_bindings/bindings/python_client/models/package_ver.py @@ -2,26 +2,23 @@ import attr -from ..models.status_enum import StatusEnum from ..types import UNSET, OSIDBModel, Unset -T = TypeVar("T", bound="CVEv5Versions") +T = TypeVar("T", bound="PackageVer") @attr.s(auto_attribs=True) -class CVEv5Versions(OSIDBModel): - """CVEv5 Package Version Serializer""" +class PackageVer(OSIDBModel): + """PackageVer model serializer for read-only use in FlawSerializer via + PackageVerSerializer.""" version: str - status: StatusEnum + status: str = "UNAFFECTED" additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: version = self.version - status: str = UNSET - if not isinstance(self.status, Unset): - - status = StatusEnum(self.status).value + status = self.status field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -37,26 +34,21 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() version = d.pop("version", UNSET) - _status = d.pop("status", UNSET) - status: StatusEnum - if isinstance(_status, Unset): - status = UNSET - else: - status = StatusEnum(_status) + status = d.pop("status", UNSET) - cv_ev_5_versions = cls( + package_ver = cls( version=version, status=status, ) - cv_ev_5_versions.additional_properties = d - return cv_ev_5_versions + package_ver.additional_properties = d + return package_ver @staticmethod def get_fields(): return { "version": str, - "status": StatusEnum, + "status": str, } @property diff --git a/osidb_bindings/bindings/python_client/models/paginated_affect_cvss_list.py b/osidb_bindings/bindings/python_client/models/paginated_affect_cvss_list.py new file mode 100644 index 0000000..80d39cb --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/paginated_affect_cvss_list.py @@ -0,0 +1,105 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.affect_cvss import AffectCVSS +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="PaginatedAffectCVSSList") + + +@attr.s(auto_attribs=True) +class PaginatedAffectCVSSList(OSIDBModel): + """ """ + + count: Union[Unset, int] = UNSET + next_: Union[Unset, None, str] = UNSET + previous: Union[Unset, None, str] = UNSET + results: Union[Unset, List[AffectCVSS]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + count = self.count + next_ = self.next_ + previous = self.previous + results: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.results, Unset): + results = [] + for results_item_data in self.results: + results_item: Dict[str, Any] = UNSET + if not isinstance(results_item_data, Unset): + results_item = results_item_data.to_dict() + + results.append(results_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(count, Unset): + field_dict["count"] = count + if not isinstance(next_, Unset): + field_dict["next"] = next_ + if not isinstance(previous, Unset): + field_dict["previous"] = previous + if not isinstance(results, Unset): + field_dict["results"] = results + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + count = d.pop("count", UNSET) + + next_ = d.pop("next", UNSET) + + previous = d.pop("previous", UNSET) + + results = [] + _results = d.pop("results", UNSET) + if _results is UNSET: + results = UNSET + else: + for results_item_data in _results or []: + _results_item = results_item_data + results_item: AffectCVSS + if isinstance(_results_item, Unset): + results_item = UNSET + else: + results_item = AffectCVSS.from_dict(_results_item) + + results.append(results_item) + + paginated_affect_cvss_list = cls( + count=count, + next_=next_, + previous=previous, + results=results, + ) + + paginated_affect_cvss_list.additional_properties = d + return paginated_affect_cvss_list + + @staticmethod + def get_fields(): + return { + "count": int, + "next": str, + "previous": str, + "results": List[AffectCVSS], + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/paginated_flaw_cvss_list.py b/osidb_bindings/bindings/python_client/models/paginated_flaw_cvss_list.py new file mode 100644 index 0000000..1a6abc1 --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/paginated_flaw_cvss_list.py @@ -0,0 +1,105 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flaw_cvss import FlawCVSS +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="PaginatedFlawCVSSList") + + +@attr.s(auto_attribs=True) +class PaginatedFlawCVSSList(OSIDBModel): + """ """ + + count: Union[Unset, int] = UNSET + next_: Union[Unset, None, str] = UNSET + previous: Union[Unset, None, str] = UNSET + results: Union[Unset, List[FlawCVSS]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + count = self.count + next_ = self.next_ + previous = self.previous + results: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.results, Unset): + results = [] + for results_item_data in self.results: + results_item: Dict[str, Any] = UNSET + if not isinstance(results_item_data, Unset): + results_item = results_item_data.to_dict() + + results.append(results_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(count, Unset): + field_dict["count"] = count + if not isinstance(next_, Unset): + field_dict["next"] = next_ + if not isinstance(previous, Unset): + field_dict["previous"] = previous + if not isinstance(results, Unset): + field_dict["results"] = results + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + count = d.pop("count", UNSET) + + next_ = d.pop("next", UNSET) + + previous = d.pop("previous", UNSET) + + results = [] + _results = d.pop("results", UNSET) + if _results is UNSET: + results = UNSET + else: + for results_item_data in _results or []: + _results_item = results_item_data + results_item: FlawCVSS + if isinstance(_results_item, Unset): + results_item = UNSET + else: + results_item = FlawCVSS.from_dict(_results_item) + + results.append(results_item) + + paginated_flaw_cvss_list = cls( + count=count, + next_=next_, + previous=previous, + results=results, + ) + + paginated_flaw_cvss_list.additional_properties = d + return paginated_flaw_cvss_list + + @staticmethod + def get_fields(): + return { + "count": int, + "next": str, + "previous": str, + "results": List[FlawCVSS], + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/paginated_flaw_package_version_list.py b/osidb_bindings/bindings/python_client/models/paginated_flaw_package_version_list.py new file mode 100644 index 0000000..2c49618 --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/paginated_flaw_package_version_list.py @@ -0,0 +1,105 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.flaw_package_version import FlawPackageVersion +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="PaginatedFlawPackageVersionList") + + +@attr.s(auto_attribs=True) +class PaginatedFlawPackageVersionList(OSIDBModel): + """ """ + + count: Union[Unset, int] = UNSET + next_: Union[Unset, None, str] = UNSET + previous: Union[Unset, None, str] = UNSET + results: Union[Unset, List[FlawPackageVersion]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + count = self.count + next_ = self.next_ + previous = self.previous + results: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.results, Unset): + results = [] + for results_item_data in self.results: + results_item: Dict[str, Any] = UNSET + if not isinstance(results_item_data, Unset): + results_item = results_item_data.to_dict() + + results.append(results_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(count, Unset): + field_dict["count"] = count + if not isinstance(next_, Unset): + field_dict["next"] = next_ + if not isinstance(previous, Unset): + field_dict["previous"] = previous + if not isinstance(results, Unset): + field_dict["results"] = results + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + count = d.pop("count", UNSET) + + next_ = d.pop("next", UNSET) + + previous = d.pop("previous", UNSET) + + results = [] + _results = d.pop("results", UNSET) + if _results is UNSET: + results = UNSET + else: + for results_item_data in _results or []: + _results_item = results_item_data + results_item: FlawPackageVersion + if isinstance(_results_item, Unset): + results_item = UNSET + else: + results_item = FlawPackageVersion.from_dict(_results_item) + + results.append(results_item) + + paginated_flaw_package_version_list = cls( + count=count, + next_=next_, + previous=previous, + results=results, + ) + + paginated_flaw_package_version_list.additional_properties = d + return paginated_flaw_package_version_list + + @staticmethod + def get_fields(): + return { + "count": int, + "next": str, + "previous": str, + "results": List[FlawPackageVersion], + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/ps_stream_selection.py b/osidb_bindings/bindings/python_client/models/ps_stream_selection.py new file mode 100644 index 0000000..8eb4555 --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/ps_stream_selection.py @@ -0,0 +1,91 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="PsStreamSelection") + + +@attr.s(auto_attribs=True) +class PsStreamSelection(OSIDBModel): + """ """ + + ps_update_stream: str + selected: bool + acked: bool + eus: bool + aus: bool + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + ps_update_stream = self.ps_update_stream + selected = self.selected + acked = self.acked + eus = self.eus + aus = self.aus + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(ps_update_stream, Unset): + field_dict["ps_update_stream"] = ps_update_stream + if not isinstance(selected, Unset): + field_dict["selected"] = selected + if not isinstance(acked, Unset): + field_dict["acked"] = acked + if not isinstance(eus, Unset): + field_dict["eus"] = eus + if not isinstance(aus, Unset): + field_dict["aus"] = aus + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + ps_update_stream = d.pop("ps_update_stream", UNSET) + + selected = d.pop("selected", UNSET) + + acked = d.pop("acked", UNSET) + + eus = d.pop("eus", UNSET) + + aus = d.pop("aus", UNSET) + + ps_stream_selection = cls( + ps_update_stream=ps_update_stream, + selected=selected, + acked=acked, + eus=eus, + aus=aus, + ) + + ps_stream_selection.additional_properties = d + return ps_stream_selection + + @staticmethod + def get_fields(): + return { + "ps_update_stream": str, + "selected": bool, + "acked": bool, + "eus": bool, + "aus": bool, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/osidb_bindings/bindings/python_client/models/status_enum.py b/osidb_bindings/bindings/python_client/models/status_enum.py deleted file mode 100644 index 8a57694..0000000 --- a/osidb_bindings/bindings/python_client/models/status_enum.py +++ /dev/null @@ -1,10 +0,0 @@ -from enum import Enum - - -class StatusEnum(str, Enum): - AFFECTED = "AFFECTED" - UNAFFECTED = "UNAFFECTED" - UNKNOWN = "UNKNOWN" - - def __str__(self) -> str: - return str(self.value) diff --git a/osidb_bindings/bindings/python_client/models/tracker_suggestion.py b/osidb_bindings/bindings/python_client/models/tracker_suggestion.py new file mode 100644 index 0000000..80323ee --- /dev/null +++ b/osidb_bindings/bindings/python_client/models/tracker_suggestion.py @@ -0,0 +1,92 @@ +from typing import Any, Dict, List, Type, TypeVar + +import attr + +from ..models.module_component import ModuleComponent +from ..types import UNSET, OSIDBModel, Unset + +T = TypeVar("T", bound="TrackerSuggestion") + + +@attr.s(auto_attribs=True) +class TrackerSuggestion(OSIDBModel): + """ """ + + modules_components: List[ModuleComponent] + not_applicable: str + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + modules_components: List[Dict[str, Any]] = UNSET + if not isinstance(self.modules_components, Unset): + modules_components = [] + for modules_components_item_data in self.modules_components: + modules_components_item: Dict[str, Any] = UNSET + if not isinstance(modules_components_item_data, Unset): + modules_components_item = modules_components_item_data.to_dict() + + modules_components.append(modules_components_item) + + not_applicable = self.not_applicable + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if not isinstance(modules_components, Unset): + field_dict["modules_components"] = modules_components + if not isinstance(not_applicable, Unset): + field_dict["not_applicable"] = not_applicable + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + modules_components = [] + _modules_components = d.pop("modules_components", UNSET) + if _modules_components is UNSET: + modules_components = UNSET + else: + for modules_components_item_data in _modules_components or []: + _modules_components_item = modules_components_item_data + modules_components_item: ModuleComponent + if isinstance(_modules_components_item, Unset): + modules_components_item = UNSET + else: + modules_components_item = ModuleComponent.from_dict( + _modules_components_item + ) + + modules_components.append(modules_components_item) + + not_applicable = d.pop("not_applicable", UNSET) + + tracker_suggestion = cls( + modules_components=modules_components, + not_applicable=not_applicable, + ) + + tracker_suggestion.additional_properties = d + return tracker_suggestion + + @staticmethod + def get_fields(): + return { + "modules_components": List[ModuleComponent], + "not_applicable": str, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties From dcbf9584b4f1492c72079ea90398172378100b9e Mon Sep 17 00:00:00 2001 From: Jakub Frejlach Date: Tue, 10 Oct 2023 16:17:31 +0200 Subject: [PATCH 5/5] Add CRUD operations for OSIDB 3.5.0 resources Flaw nested resources: CVSS scores, package versions Affect nested resources: CVSS scores --- CHANGELOG.md | 3 +++ TUTORIAL.md | 3 +++ osidb_bindings/session.py | 29 +++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f48944c..0e4b6c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased +### Added +- add CRUD operations for Flaw CVSS scores and + package version and for Affect CVSS scores ## [3.4.6] - 2023-09-05 ### Fixed diff --git a/TUTORIAL.md b/TUTORIAL.md index 908e38e..51f8082 100644 --- a/TUTORIAL.md +++ b/TUTORIAL.md @@ -93,7 +93,10 @@ Operations can be performed on the following entities: * comments * references * acknowledgments + * cvss_scores + * packages_versions * affects + * cvss_scores * trackers * #### ```status``` diff --git a/osidb_bindings/session.py b/osidb_bindings/session.py index bb37b47..51d81bb 100644 --- a/osidb_bindings/session.py +++ b/osidb_bindings/session.py @@ -150,6 +150,24 @@ def __init__(self, base_url, auth=None, verify_ssl=True): "destroy", ] }, + "cvss_scores": { + "allowed_operations": [ + "retrieve", + "update", + "list", + "create", + "destroy", + ] + }, + "package_versions": { + "allowed_operations": [ + "retrieve", + "update", + "list", + "create", + "destroy", + ] + }, }, ) self.affects = SessionOperationsGroup( @@ -162,6 +180,17 @@ def __init__(self, base_url, auth=None, verify_ssl=True): "create", "destroy", ), + subresources={ + "cvss_scores": { + "allowed_operations": [ + "retrieve", + "update", + "list", + "create", + "destroy", + ] + }, + }, ) self.trackers = SessionOperationsGroup( self.__get_client_with_new_access_token,