crc-pulpcore-client 20250821.3__py3-none-any.whl → 20250825.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of crc-pulpcore-client might be problematic. Click here for more details.

Files changed (86) hide show
  1. crc-pulpcore-client/api/__init__.py +1 -0
  2. crc-pulpcore-client/api/content_api.py +12 -12
  3. crc-pulpcore-client/api/distributions_api.py +12 -12
  4. crc-pulpcore-client/api/remotes_api.py +12 -12
  5. crc-pulpcore-client/api/repositories_api.py +12 -12
  6. crc-pulpcore-client/api/vuln_report_api.py +977 -0
  7. crc-pulpcore-client/api_client.py +1 -1
  8. crc-pulpcore-client/configuration.py +3 -3
  9. crc-pulpcore-client/models/__init__.py +2 -0
  10. crc-pulpcore-client/models/artifact_distribution_response.py +16 -16
  11. crc-pulpcore-client/models/filesystem_export_response.py +0 -2
  12. crc-pulpcore-client/models/generic_remote_response.py +1 -3
  13. crc-pulpcore-client/models/group_role_response.py +0 -2
  14. crc-pulpcore-client/models/multiple_artifact_content_response.py +5 -1
  15. crc-pulpcore-client/models/nested_open_pgp_public_subkey_response.py +0 -2
  16. crc-pulpcore-client/models/nested_open_pgp_signature.py +1 -1
  17. crc-pulpcore-client/models/nested_open_pgp_signature_response.py +2 -3
  18. crc-pulpcore-client/models/nested_open_pgp_user_attribute_response.py +0 -2
  19. crc-pulpcore-client/models/nested_open_pgp_user_id_response.py +0 -2
  20. crc-pulpcore-client/models/open_pgp_keyring.py +2 -2
  21. crc-pulpcore-client/models/open_pgp_keyring_response.py +2 -3
  22. crc-pulpcore-client/models/open_pgp_public_key_response.py +4 -6
  23. crc-pulpcore-client/models/open_pgp_public_subkey_response.py +4 -2
  24. crc-pulpcore-client/models/open_pgp_signature_response.py +6 -3
  25. crc-pulpcore-client/models/open_pgp_user_attribute_response.py +4 -2
  26. crc-pulpcore-client/models/open_pgp_user_id_response.py +4 -2
  27. crc-pulpcore-client/models/orphans_cleanup.py +2 -3
  28. crc-pulpcore-client/models/paginated_access_policy_response_list.py +0 -10
  29. crc-pulpcore-client/models/paginated_artifact_distribution_response_list.py +0 -10
  30. crc-pulpcore-client/models/paginated_artifact_response_list.py +0 -10
  31. crc-pulpcore-client/models/paginated_composite_content_guard_response_list.py +0 -10
  32. crc-pulpcore-client/models/paginated_content_guard_response_list.py +0 -10
  33. crc-pulpcore-client/models/paginated_content_redirect_content_guard_response_list.py +0 -10
  34. crc-pulpcore-client/models/paginated_distribution_response_list.py +0 -10
  35. crc-pulpcore-client/models/paginated_domain_response_list.py +0 -10
  36. crc-pulpcore-client/models/paginated_filesystem_export_response_list.py +0 -10
  37. crc-pulpcore-client/models/paginated_filesystem_exporter_response_list.py +0 -10
  38. crc-pulpcore-client/models/paginated_generic_remote_response_list.py +0 -10
  39. crc-pulpcore-client/models/paginated_group_response_list.py +0 -10
  40. crc-pulpcore-client/models/paginated_group_role_response_list.py +0 -10
  41. crc-pulpcore-client/models/paginated_group_user_response_list.py +0 -10
  42. crc-pulpcore-client/models/paginated_header_content_guard_response_list.py +0 -10
  43. crc-pulpcore-client/models/paginated_import_response_list.py +0 -10
  44. crc-pulpcore-client/models/paginated_multiple_artifact_content_response_list.py +0 -10
  45. crc-pulpcore-client/models/paginated_open_pgp_distribution_response_list.py +0 -10
  46. crc-pulpcore-client/models/paginated_open_pgp_keyring_response_list.py +0 -10
  47. crc-pulpcore-client/models/paginated_open_pgp_public_key_response_list.py +0 -10
  48. crc-pulpcore-client/models/paginated_open_pgp_public_subkey_response_list.py +0 -10
  49. crc-pulpcore-client/models/paginated_open_pgp_signature_response_list.py +0 -10
  50. crc-pulpcore-client/models/paginated_open_pgp_user_attribute_response_list.py +0 -10
  51. crc-pulpcore-client/models/paginated_open_pgp_user_id_response_list.py +0 -10
  52. crc-pulpcore-client/models/paginated_publication_response_list.py +0 -10
  53. crc-pulpcore-client/models/paginated_pulp_export_response_list.py +0 -10
  54. crc-pulpcore-client/models/paginated_pulp_exporter_response_list.py +0 -10
  55. crc-pulpcore-client/models/paginated_pulp_importer_response_list.py +0 -10
  56. crc-pulpcore-client/models/paginated_rbac_content_guard_response_list.py +0 -10
  57. crc-pulpcore-client/models/paginated_repository_response_list.py +0 -10
  58. crc-pulpcore-client/models/paginated_repository_version_response_list.py +0 -10
  59. crc-pulpcore-client/models/paginated_role_response_list.py +0 -10
  60. crc-pulpcore-client/models/paginated_signing_service_response_list.py +0 -10
  61. crc-pulpcore-client/models/paginated_task_group_response_list.py +0 -10
  62. crc-pulpcore-client/models/paginated_task_response_list.py +0 -10
  63. crc-pulpcore-client/models/paginated_task_schedule_response_list.py +0 -10
  64. crc-pulpcore-client/models/paginated_upload_response_list.py +0 -10
  65. crc-pulpcore-client/models/paginated_upstream_pulp_response_list.py +0 -10
  66. crc-pulpcore-client/models/paginated_user_response_list.py +0 -10
  67. crc-pulpcore-client/models/paginated_user_role_response_list.py +0 -10
  68. crc-pulpcore-client/models/paginated_vulnerability_report_response_list.py +102 -0
  69. crc-pulpcore-client/models/paginated_worker_response_list.py +0 -10
  70. crc-pulpcore-client/models/patched_open_pgp_keyring.py +2 -2
  71. crc-pulpcore-client/models/pulp_export_response.py +0 -2
  72. crc-pulpcore-client/models/rbac_content_guard_response.py +0 -4
  73. crc-pulpcore-client/models/repository_response.py +2 -3
  74. crc-pulpcore-client/models/repository_version_response.py +6 -2
  75. crc-pulpcore-client/models/storage_response.py +4 -5
  76. crc-pulpcore-client/models/task_group_response.py +0 -4
  77. crc-pulpcore-client/models/task_response.py +0 -8
  78. crc-pulpcore-client/models/upload_detail_response.py +0 -2
  79. crc-pulpcore-client/models/upstream_pulp_response.py +0 -2
  80. crc-pulpcore-client/models/user_response.py +0 -4
  81. crc-pulpcore-client/models/user_role_response.py +0 -2
  82. crc-pulpcore-client/models/vulnerability_report_response.py +116 -0
  83. {crc_pulpcore_client-20250821.3.dist-info → crc_pulpcore_client-20250825.1.dist-info}/METADATA +1 -1
  84. {crc_pulpcore_client-20250821.3.dist-info → crc_pulpcore_client-20250825.1.dist-info}/RECORD +86 -83
  85. {crc_pulpcore_client-20250821.3.dist-info → crc_pulpcore_client-20250825.1.dist-info}/WHEEL +0 -0
  86. {crc_pulpcore_client-20250821.3.dist-info → crc_pulpcore_client-20250825.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,102 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pulp 3 API
5
+
6
+ Fetch, Upload, Organize, and Distribute Software Packages
7
+
8
+ The version of the OpenAPI document: v3
9
+ Contact: pulp-list@redhat.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from crc-pulpcore-client.models.vulnerability_report_response import VulnerabilityReportResponse
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class PaginatedVulnerabilityReportResponseList(BaseModel):
28
+ """
29
+ PaginatedVulnerabilityReportResponseList
30
+ """ # noqa: E501
31
+ count: StrictInt
32
+ next: Optional[StrictStr] = None
33
+ previous: Optional[StrictStr] = None
34
+ results: List[VulnerabilityReportResponse]
35
+ __properties: ClassVar[List[str]] = ["count", "next", "previous", "results"]
36
+
37
+ model_config = ConfigDict(
38
+ populate_by_name=True,
39
+ validate_assignment=True,
40
+ protected_namespaces=(),
41
+ )
42
+
43
+
44
+ def to_str(self) -> str:
45
+ """Returns the string representation of the model using alias"""
46
+ return pprint.pformat(self.model_dump(by_alias=True))
47
+
48
+ def to_json(self) -> str:
49
+ """Returns the JSON representation of the model using alias"""
50
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51
+ return json.dumps(self.to_dict())
52
+
53
+ @classmethod
54
+ def from_json(cls, json_str: str) -> Optional[Self]:
55
+ """Create an instance of PaginatedVulnerabilityReportResponseList from a JSON string"""
56
+ return cls.from_dict(json.loads(json_str))
57
+
58
+ def to_dict(self) -> Dict[str, Any]:
59
+ """Return the dictionary representation of the model using alias.
60
+
61
+ This has the following differences from calling pydantic's
62
+ `self.model_dump(by_alias=True)`:
63
+
64
+ * `None` is only added to the output dict for nullable fields that
65
+ were set at model initialization. Other fields with value `None`
66
+ are ignored.
67
+ """
68
+ excluded_fields: Set[str] = set([
69
+ ])
70
+
71
+ _dict = self.model_dump(
72
+ by_alias=True,
73
+ exclude=excluded_fields,
74
+ exclude_none=True,
75
+ )
76
+ # override the default output from pydantic by calling `to_dict()` of each item in results (list)
77
+ _items = []
78
+ if self.results:
79
+ for _item_results in self.results:
80
+ if _item_results:
81
+ _items.append(_item_results.to_dict())
82
+ _dict['results'] = _items
83
+ return _dict
84
+
85
+ @classmethod
86
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
87
+ """Create an instance of PaginatedVulnerabilityReportResponseList from a dict"""
88
+ if obj is None:
89
+ return None
90
+
91
+ if not isinstance(obj, dict):
92
+ return cls.model_validate(obj)
93
+
94
+ _obj = cls.model_validate({
95
+ "count": obj.get("count"),
96
+ "next": obj.get("next"),
97
+ "previous": obj.get("previous"),
98
+ "results": [VulnerabilityReportResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
99
+ })
100
+ return _obj
101
+
102
+
@@ -80,16 +80,6 @@ class PaginatedWorkerResponseList(BaseModel):
80
80
  if _item_results:
81
81
  _items.append(_item_results.to_dict())
82
82
  _dict['results'] = _items
83
- # set to None if next (nullable) is None
84
- # and model_fields_set contains the field
85
- if self.next is None and "next" in self.model_fields_set:
86
- _dict['next'] = None
87
-
88
- # set to None if previous (nullable) is None
89
- # and model_fields_set contains the field
90
- if self.previous is None and "previous" in self.model_fields_set:
91
- _dict['previous'] = None
92
-
93
83
  return _dict
94
84
 
95
85
  @classmethod
@@ -18,7 +18,7 @@ import pprint
18
18
  import re # noqa: F401
19
19
  import json
20
20
 
21
- from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
22
22
  from typing import Any, ClassVar, Dict, List, Optional
23
23
  from typing_extensions import Annotated
24
24
  from typing import Optional, Set
@@ -31,7 +31,7 @@ class PatchedOpenPGPKeyring(BaseModel):
31
31
  pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = None
32
32
  name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="A unique name for this repository.")
33
33
  description: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="An optional description.")
34
- retain_repo_versions: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Retain X versions of the repository. Default is null which retains all versions.")
34
+ retain_repo_versions: Optional[StrictInt] = Field(default=None, description="Retain X versions of the repository. Default is null which retains all versions.")
35
35
  remote: Optional[StrictStr] = Field(default=None, description="An optional remote to use by default when syncing.")
36
36
  __properties: ClassVar[List[str]] = ["pulp_labels", "name", "description", "retain_repo_versions", "remote"]
37
37
 
@@ -76,14 +76,12 @@ class PulpExportResponse(BaseModel):
76
76
  * OpenAPI `readOnly` fields are excluded.
77
77
  * OpenAPI `readOnly` fields are excluded.
78
78
  * OpenAPI `readOnly` fields are excluded.
79
- * OpenAPI `readOnly` fields are excluded.
80
79
  """
81
80
  excluded_fields: Set[str] = set([
82
81
  "pulp_href",
83
82
  "prn",
84
83
  "pulp_created",
85
84
  "pulp_last_updated",
86
- "exported_resources",
87
85
  "params",
88
86
  "output_file_info",
89
87
  "toc_info",
@@ -74,16 +74,12 @@ class RBACContentGuardResponse(BaseModel):
74
74
  * OpenAPI `readOnly` fields are excluded.
75
75
  * OpenAPI `readOnly` fields are excluded.
76
76
  * OpenAPI `readOnly` fields are excluded.
77
- * OpenAPI `readOnly` fields are excluded.
78
- * OpenAPI `readOnly` fields are excluded.
79
77
  """
80
78
  excluded_fields: Set[str] = set([
81
79
  "pulp_href",
82
80
  "prn",
83
81
  "pulp_created",
84
82
  "pulp_last_updated",
85
- "users",
86
- "groups",
87
83
  ])
88
84
 
89
85
  _dict = self.model_dump(
@@ -19,9 +19,8 @@ import re # noqa: F401
19
19
  import json
20
20
 
21
21
  from datetime import datetime
22
- from pydantic import BaseModel, ConfigDict, Field, StrictStr
22
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
23
23
  from typing import Any, ClassVar, Dict, List, Optional
24
- from typing_extensions import Annotated
25
24
  from typing import Optional, Set
26
25
  from typing_extensions import Self
27
26
 
@@ -38,7 +37,7 @@ class RepositoryResponse(BaseModel):
38
37
  latest_version_href: Optional[StrictStr] = None
39
38
  name: StrictStr = Field(description="A unique name for this repository.")
40
39
  description: Optional[StrictStr] = Field(default=None, description="An optional description.")
41
- retain_repo_versions: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Retain X versions of the repository. Default is null which retains all versions.")
40
+ retain_repo_versions: Optional[StrictInt] = Field(default=None, description="Retain X versions of the repository. Default is null which retains all versions.")
42
41
  remote: Optional[StrictStr] = Field(default=None, description="An optional remote to use by default when syncing.")
43
42
  __properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "versions_href", "pulp_labels", "latest_version_href", "name", "description", "retain_repo_versions", "remote"]
44
43
 
@@ -37,7 +37,8 @@ class RepositoryVersionResponse(BaseModel):
37
37
  repository: Optional[StrictStr] = None
38
38
  base_version: Optional[StrictStr] = Field(default=None, description="A repository version whose content was used as the initial set of content for this repository version")
39
39
  content_summary: Optional[ContentSummaryResponse] = Field(default=None, description="Various count summaries of the content in the version and the HREF to view them.")
40
- __properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "number", "repository", "base_version", "content_summary"]
40
+ vuln_report: Optional[StrictStr] = None
41
+ __properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "number", "repository", "base_version", "content_summary", "vuln_report"]
41
42
 
42
43
  model_config = ConfigDict(
43
44
  populate_by_name=True,
@@ -76,6 +77,7 @@ class RepositoryVersionResponse(BaseModel):
76
77
  * OpenAPI `readOnly` fields are excluded.
77
78
  * OpenAPI `readOnly` fields are excluded.
78
79
  * OpenAPI `readOnly` fields are excluded.
80
+ * OpenAPI `readOnly` fields are excluded.
79
81
  """
80
82
  excluded_fields: Set[str] = set([
81
83
  "pulp_href",
@@ -85,6 +87,7 @@ class RepositoryVersionResponse(BaseModel):
85
87
  "number",
86
88
  "repository",
87
89
  "content_summary",
90
+ "vuln_report",
88
91
  ])
89
92
 
90
93
  _dict = self.model_dump(
@@ -114,7 +117,8 @@ class RepositoryVersionResponse(BaseModel):
114
117
  "number": obj.get("number"),
115
118
  "repository": obj.get("repository"),
116
119
  "base_version": obj.get("base_version"),
117
- "content_summary": ContentSummaryResponse.from_dict(obj["content_summary"]) if obj.get("content_summary") is not None else None
120
+ "content_summary": ContentSummaryResponse.from_dict(obj["content_summary"]) if obj.get("content_summary") is not None else None,
121
+ "vuln_report": obj.get("vuln_report")
118
122
  })
119
123
  return _obj
120
124
 
@@ -18,9 +18,8 @@ import pprint
18
18
  import re # noqa: F401
19
19
  import json
20
20
 
21
- from pydantic import BaseModel, ConfigDict, Field
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt
22
22
  from typing import Any, ClassVar, Dict, List, Optional
23
- from typing_extensions import Annotated
24
23
  from typing import Optional, Set
25
24
  from typing_extensions import Self
26
25
 
@@ -28,9 +27,9 @@ class StorageResponse(BaseModel):
28
27
  """
29
28
  Serializer for information about the storage system
30
29
  """ # noqa: E501
31
- total: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(description="Total number of bytes")
32
- used: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(description="Number of bytes in use")
33
- free: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(description="Number of free bytes")
30
+ total: Optional[StrictInt] = Field(description="Total number of bytes")
31
+ used: Optional[StrictInt] = Field(description="Number of bytes in use")
32
+ free: Optional[StrictInt] = Field(description="Number of free bytes")
34
33
  __properties: ClassVar[List[str]] = ["total", "used", "free"]
35
34
 
36
35
  model_config = ConfigDict(
@@ -83,8 +83,6 @@ class TaskGroupResponse(BaseModel):
83
83
  * OpenAPI `readOnly` fields are excluded.
84
84
  * OpenAPI `readOnly` fields are excluded.
85
85
  * OpenAPI `readOnly` fields are excluded.
86
- * OpenAPI `readOnly` fields are excluded.
87
- * OpenAPI `readOnly` fields are excluded.
88
86
  """
89
87
  excluded_fields: Set[str] = set([
90
88
  "pulp_href",
@@ -96,8 +94,6 @@ class TaskGroupResponse(BaseModel):
96
94
  "canceled",
97
95
  "failed",
98
96
  "canceling",
99
- "group_progress_reports",
100
- "tasks",
101
97
  ])
102
98
 
103
99
  _dict = self.model_dump(
@@ -93,10 +93,6 @@ class TaskResponse(BaseModel):
93
93
  * OpenAPI `readOnly` fields are excluded.
94
94
  * OpenAPI `readOnly` fields are excluded.
95
95
  * OpenAPI `readOnly` fields are excluded.
96
- * OpenAPI `readOnly` fields are excluded.
97
- * OpenAPI `readOnly` fields are excluded.
98
- * OpenAPI `readOnly` fields are excluded.
99
- * OpenAPI `readOnly` fields are excluded.
100
96
  """
101
97
  excluded_fields: Set[str] = set([
102
98
  "pulp_href",
@@ -111,11 +107,7 @@ class TaskResponse(BaseModel):
111
107
  "error",
112
108
  "worker",
113
109
  "parent_task",
114
- "child_tasks",
115
110
  "task_group",
116
- "progress_reports",
117
- "created_resources",
118
- "reserved_resources_record",
119
111
  ])
120
112
 
121
113
  _dict = self.model_dump(
@@ -73,7 +73,6 @@ class UploadDetailResponse(BaseModel):
73
73
  * OpenAPI `readOnly` fields are excluded.
74
74
  * OpenAPI `readOnly` fields are excluded.
75
75
  * OpenAPI `readOnly` fields are excluded.
76
- * OpenAPI `readOnly` fields are excluded.
77
76
  """
78
77
  excluded_fields: Set[str] = set([
79
78
  "pulp_href",
@@ -81,7 +80,6 @@ class UploadDetailResponse(BaseModel):
81
80
  "pulp_created",
82
81
  "pulp_last_updated",
83
82
  "completed",
84
- "chunks",
85
83
  ])
86
84
 
87
85
  _dict = self.model_dump(
@@ -82,14 +82,12 @@ class UpstreamPulpResponse(BaseModel):
82
82
  * OpenAPI `readOnly` fields are excluded.
83
83
  * OpenAPI `readOnly` fields are excluded.
84
84
  * OpenAPI `readOnly` fields are excluded.
85
- * OpenAPI `readOnly` fields are excluded.
86
85
  """
87
86
  excluded_fields: Set[str] = set([
88
87
  "pulp_href",
89
88
  "prn",
90
89
  "pulp_created",
91
90
  "pulp_last_updated",
92
- "hidden_fields",
93
91
  "last_replication",
94
92
  ])
95
93
 
@@ -79,16 +79,12 @@ class UserResponse(BaseModel):
79
79
  * OpenAPI `readOnly` fields are excluded.
80
80
  * OpenAPI `readOnly` fields are excluded.
81
81
  * OpenAPI `readOnly` fields are excluded.
82
- * OpenAPI `readOnly` fields are excluded.
83
- * OpenAPI `readOnly` fields are excluded.
84
82
  """
85
83
  excluded_fields: Set[str] = set([
86
84
  "pulp_href",
87
85
  "prn",
88
86
  "id",
89
87
  "date_joined",
90
- "groups",
91
- "hidden_fields",
92
88
  ])
93
89
 
94
90
  _dict = self.model_dump(
@@ -75,7 +75,6 @@ class UserRoleResponse(BaseModel):
75
75
  * OpenAPI `readOnly` fields are excluded.
76
76
  * OpenAPI `readOnly` fields are excluded.
77
77
  * OpenAPI `readOnly` fields are excluded.
78
- * OpenAPI `readOnly` fields are excluded.
79
78
  """
80
79
  excluded_fields: Set[str] = set([
81
80
  "pulp_href",
@@ -83,7 +82,6 @@ class UserRoleResponse(BaseModel):
83
82
  "pulp_created",
84
83
  "pulp_last_updated",
85
84
  "description",
86
- "permissions",
87
85
  ])
88
86
 
89
87
  _dict = self.model_dump(
@@ -0,0 +1,116 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pulp 3 API
5
+
6
+ Fetch, Upload, Organize, and Distribute Software Packages
7
+
8
+ The version of the OpenAPI document: v3
9
+ Contact: pulp-list@redhat.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+
16
+ from __future__ import annotations
17
+ import pprint
18
+ import re # noqa: F401
19
+ import json
20
+
21
+ from datetime import datetime
22
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
23
+ from typing import Any, ClassVar, Dict, List, Optional
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class VulnerabilityReportResponse(BaseModel):
28
+ """
29
+ A serializer for the VulnerabilityReport Model.
30
+ """ # noqa: E501
31
+ pulp_href: Optional[StrictStr] = None
32
+ prn: Optional[StrictStr] = Field(default=None, description="The Pulp Resource Name (PRN).")
33
+ pulp_created: Optional[datetime] = Field(default=None, description="Timestamp of creation.")
34
+ pulp_last_updated: Optional[datetime] = Field(default=None, description="Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.")
35
+ vulns: Optional[Any]
36
+ repo_versions: Optional[List[StrictStr]] = None
37
+ content: Optional[StrictStr] = None
38
+ __properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "vulns", "repo_versions", "content"]
39
+
40
+ model_config = ConfigDict(
41
+ populate_by_name=True,
42
+ validate_assignment=True,
43
+ protected_namespaces=(),
44
+ )
45
+
46
+
47
+ def to_str(self) -> str:
48
+ """Returns the string representation of the model using alias"""
49
+ return pprint.pformat(self.model_dump(by_alias=True))
50
+
51
+ def to_json(self) -> str:
52
+ """Returns the JSON representation of the model using alias"""
53
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
54
+ return json.dumps(self.to_dict())
55
+
56
+ @classmethod
57
+ def from_json(cls, json_str: str) -> Optional[Self]:
58
+ """Create an instance of VulnerabilityReportResponse from a JSON string"""
59
+ return cls.from_dict(json.loads(json_str))
60
+
61
+ def to_dict(self) -> Dict[str, Any]:
62
+ """Return the dictionary representation of the model using alias.
63
+
64
+ This has the following differences from calling pydantic's
65
+ `self.model_dump(by_alias=True)`:
66
+
67
+ * `None` is only added to the output dict for nullable fields that
68
+ were set at model initialization. Other fields with value `None`
69
+ are ignored.
70
+ * OpenAPI `readOnly` fields are excluded.
71
+ * OpenAPI `readOnly` fields are excluded.
72
+ * OpenAPI `readOnly` fields are excluded.
73
+ * OpenAPI `readOnly` fields are excluded.
74
+ * OpenAPI `readOnly` fields are excluded.
75
+ """
76
+ excluded_fields: Set[str] = set([
77
+ "pulp_href",
78
+ "prn",
79
+ "pulp_created",
80
+ "pulp_last_updated",
81
+ "content",
82
+ ])
83
+
84
+ _dict = self.model_dump(
85
+ by_alias=True,
86
+ exclude=excluded_fields,
87
+ exclude_none=True,
88
+ )
89
+ # set to None if vulns (nullable) is None
90
+ # and model_fields_set contains the field
91
+ if self.vulns is None and "vulns" in self.model_fields_set:
92
+ _dict['vulns'] = None
93
+
94
+ return _dict
95
+
96
+ @classmethod
97
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
98
+ """Create an instance of VulnerabilityReportResponse from a dict"""
99
+ if obj is None:
100
+ return None
101
+
102
+ if not isinstance(obj, dict):
103
+ return cls.model_validate(obj)
104
+
105
+ _obj = cls.model_validate({
106
+ "pulp_href": obj.get("pulp_href"),
107
+ "prn": obj.get("prn"),
108
+ "pulp_created": obj.get("pulp_created"),
109
+ "pulp_last_updated": obj.get("pulp_last_updated"),
110
+ "vulns": obj.get("vulns"),
111
+ "repo_versions": obj.get("repo_versions"),
112
+ "content": obj.get("content")
113
+ })
114
+ return _obj
115
+
116
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crc-pulpcore-client
3
- Version: 20250821.3
3
+ Version: 20250825.1
4
4
  Summary: Pulp 3 API
5
5
  Home-page:
6
6
  Author: Pulp Team