crc-pulp-service-client 20260107.2__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-pulp-service-client might be problematic. Click here for more details.

Files changed (41) hide show
  1. crc_pulp_service_client-20260107.2.dist-info/METADATA +2727 -0
  2. crc_pulp_service_client-20260107.2.dist-info/RECORD +41 -0
  3. crc_pulp_service_client-20260107.2.dist-info/WHEEL +5 -0
  4. crc_pulp_service_client-20260107.2.dist-info/top_level.txt +1 -0
  5. pulpcore/__init__.py +2 -0
  6. pulpcore/client/__init__.py +2 -0
  7. pulpcore/client/pulp_service/__init__.py +59 -0
  8. pulpcore/client/pulp_service/api/__init__.py +13 -0
  9. pulpcore/client/pulp_service/api/api_create_domain_api.py +335 -0
  10. pulpcore/client/pulp_service/api/api_debug_auth_header_api.py +329 -0
  11. pulpcore/client/pulp_service/api/api_debug_database_triggers_api.py +329 -0
  12. pulpcore/client/pulp_service/api/api_rds_connection_tests_api.py +591 -0
  13. pulpcore/client/pulp_service/api/api_test_random_lock_tasks_api.py +326 -0
  14. pulpcore/client/pulp_service/api/api_test_tasks_api.py +326 -0
  15. pulpcore/client/pulp_service/api/contentguards_feature_api.py +3401 -0
  16. pulpcore/client/pulp_service/api/tasks_api.py +1469 -0
  17. pulpcore/client/pulp_service/api/vuln_report_service_api.py +1301 -0
  18. pulpcore/client/pulp_service/api_client.py +798 -0
  19. pulpcore/client/pulp_service/api_response.py +21 -0
  20. pulpcore/client/pulp_service/configuration.py +628 -0
  21. pulpcore/client/pulp_service/exceptions.py +200 -0
  22. pulpcore/client/pulp_service/models/__init__.py +34 -0
  23. pulpcore/client/pulp_service/models/async_operation_response.py +88 -0
  24. pulpcore/client/pulp_service/models/domain.py +114 -0
  25. pulpcore/client/pulp_service/models/domain_response.py +131 -0
  26. pulpcore/client/pulp_service/models/my_permissions_response.py +88 -0
  27. pulpcore/client/pulp_service/models/nested_role.py +93 -0
  28. pulpcore/client/pulp_service/models/nested_role_response.py +92 -0
  29. pulpcore/client/pulp_service/models/object_roles_response.py +96 -0
  30. pulpcore/client/pulp_service/models/paginated_task_response_list.py +112 -0
  31. pulpcore/client/pulp_service/models/paginatedservice_feature_content_guard_response_list.py +112 -0
  32. pulpcore/client/pulp_service/models/paginatedservice_vulnerability_report_response_list.py +112 -0
  33. pulpcore/client/pulp_service/models/patchedservice_feature_content_guard.py +107 -0
  34. pulpcore/client/pulp_service/models/progress_report_response.py +115 -0
  35. pulpcore/client/pulp_service/models/service_feature_content_guard.py +107 -0
  36. pulpcore/client/pulp_service/models/service_feature_content_guard_response.py +123 -0
  37. pulpcore/client/pulp_service/models/service_vulnerability_report_response.py +110 -0
  38. pulpcore/client/pulp_service/models/storage_class_enum.py +40 -0
  39. pulpcore/client/pulp_service/models/task_response.py +186 -0
  40. pulpcore/client/pulp_service/py.typed +0 -0
  41. pulpcore/client/pulp_service/rest.py +258 -0
@@ -0,0 +1,107 @@
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, Field
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing_extensions import Annotated
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class PatchedserviceFeatureContentGuard(BaseModel):
28
+ """
29
+ A serializer for FeatureContentGuard.
30
+ """ # noqa: E501
31
+ name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The unique name.")
32
+ description: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="An optional description.")
33
+ header_name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None
34
+ jq_filter: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None
35
+ features: Optional[List[Annotated[str, Field(min_length=1, strict=True)]]] = Field(default=None, description="The list of features required to access the content.")
36
+ __properties: ClassVar[List[str]] = ["name", "description", "header_name", "jq_filter", "features"]
37
+
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Optional[Self]:
56
+ """Create an instance of PatchedserviceFeatureContentGuard from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self) -> Dict[str, Any]:
60
+ """Return the dictionary representation of the model using alias.
61
+
62
+ This has the following differences from calling pydantic's
63
+ `self.model_dump(by_alias=True)`:
64
+
65
+ * `None` is only added to the output dict for nullable fields that
66
+ were set at model initialization. Other fields with value `None`
67
+ are ignored.
68
+ """
69
+ excluded_fields: Set[str] = set([
70
+ ])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ # set to None if description (nullable) is None
78
+ # and model_fields_set contains the field
79
+ if self.description is None and "description" in self.model_fields_set:
80
+ _dict['description'] = None
81
+
82
+ # set to None if jq_filter (nullable) is None
83
+ # and model_fields_set contains the field
84
+ if self.jq_filter is None and "jq_filter" in self.model_fields_set:
85
+ _dict['jq_filter'] = None
86
+
87
+ return _dict
88
+
89
+ @classmethod
90
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
91
+ """Create an instance of PatchedserviceFeatureContentGuard from a dict"""
92
+ if obj is None:
93
+ return None
94
+
95
+ if not isinstance(obj, dict):
96
+ return cls.model_validate(obj)
97
+
98
+ _obj = cls.model_validate({
99
+ "name": obj.get("name"),
100
+ "description": obj.get("description"),
101
+ "header_name": obj.get("header_name"),
102
+ "jq_filter": obj.get("jq_filter"),
103
+ "features": obj.get("features")
104
+ })
105
+ return _obj
106
+
107
+
@@ -0,0 +1,115 @@
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, Field, StrictInt, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class ProgressReportResponse(BaseModel):
27
+ """
28
+ Base serializer for use with [pulpcore.app.models.Model][] This ensures that all Serializers provide values for the 'pulp_href` field. The class provides a default for the ``ref_name`` attribute in the ModelSerializers's ``Meta`` class. This ensures that the OpenAPI definitions of plugins are namespaced properly.
29
+ """ # noqa: E501
30
+ message: Optional[StrictStr] = Field(default=None, description="The message shown to the user for the progress report.")
31
+ code: Optional[StrictStr] = Field(default=None, description="Identifies the type of progress report'.")
32
+ state: Optional[StrictStr] = Field(default=None, description="The current state of the progress report. The possible values are: 'waiting', 'skipped', 'running', 'completed', 'failed', 'canceled' and 'canceling'. The default is 'waiting'.")
33
+ total: Optional[StrictInt] = Field(default=None, description="The total count of items.")
34
+ done: Optional[StrictInt] = Field(default=None, description="The count of items already processed. Defaults to 0.")
35
+ suffix: Optional[StrictStr] = Field(default=None, description="The suffix to be shown with the progress report.")
36
+ __properties: ClassVar[List[str]] = ["message", "code", "state", "total", "done", "suffix"]
37
+
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Optional[Self]:
56
+ """Create an instance of ProgressReportResponse from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self) -> Dict[str, Any]:
60
+ """Return the dictionary representation of the model using alias.
61
+
62
+ This has the following differences from calling pydantic's
63
+ `self.model_dump(by_alias=True)`:
64
+
65
+ * `None` is only added to the output dict for nullable fields that
66
+ were set at model initialization. Other fields with value `None`
67
+ are ignored.
68
+ * OpenAPI `readOnly` fields are excluded.
69
+ * OpenAPI `readOnly` fields are excluded.
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
+ """
75
+ excluded_fields: Set[str] = set([
76
+ "message",
77
+ "code",
78
+ "state",
79
+ "total",
80
+ "done",
81
+ "suffix",
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 suffix (nullable) is None
90
+ # and model_fields_set contains the field
91
+ if self.suffix is None and "suffix" in self.model_fields_set:
92
+ _dict['suffix'] = 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 ProgressReportResponse 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
+ "message": obj.get("message"),
107
+ "code": obj.get("code"),
108
+ "state": obj.get("state"),
109
+ "total": obj.get("total"),
110
+ "done": obj.get("done"),
111
+ "suffix": obj.get("suffix")
112
+ })
113
+ return _obj
114
+
115
+
@@ -0,0 +1,107 @@
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, Field
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing_extensions import Annotated
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class ServiceFeatureContentGuard(BaseModel):
28
+ """
29
+ A serializer for FeatureContentGuard.
30
+ """ # noqa: E501
31
+ name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The unique name.")
32
+ description: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="An optional description.")
33
+ header_name: Annotated[str, Field(min_length=1, strict=True)]
34
+ jq_filter: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None
35
+ features: List[Annotated[str, Field(min_length=1, strict=True)]] = Field(description="The list of features required to access the content.")
36
+ __properties: ClassVar[List[str]] = ["name", "description", "header_name", "jq_filter", "features"]
37
+
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Optional[Self]:
56
+ """Create an instance of ServiceFeatureContentGuard from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self) -> Dict[str, Any]:
60
+ """Return the dictionary representation of the model using alias.
61
+
62
+ This has the following differences from calling pydantic's
63
+ `self.model_dump(by_alias=True)`:
64
+
65
+ * `None` is only added to the output dict for nullable fields that
66
+ were set at model initialization. Other fields with value `None`
67
+ are ignored.
68
+ """
69
+ excluded_fields: Set[str] = set([
70
+ ])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ # set to None if description (nullable) is None
78
+ # and model_fields_set contains the field
79
+ if self.description is None and "description" in self.model_fields_set:
80
+ _dict['description'] = None
81
+
82
+ # set to None if jq_filter (nullable) is None
83
+ # and model_fields_set contains the field
84
+ if self.jq_filter is None and "jq_filter" in self.model_fields_set:
85
+ _dict['jq_filter'] = None
86
+
87
+ return _dict
88
+
89
+ @classmethod
90
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
91
+ """Create an instance of ServiceFeatureContentGuard from a dict"""
92
+ if obj is None:
93
+ return None
94
+
95
+ if not isinstance(obj, dict):
96
+ return cls.model_validate(obj)
97
+
98
+ _obj = cls.model_validate({
99
+ "name": obj.get("name"),
100
+ "description": obj.get("description"),
101
+ "header_name": obj.get("header_name"),
102
+ "jq_filter": obj.get("jq_filter"),
103
+ "features": obj.get("features")
104
+ })
105
+ return _obj
106
+
107
+
@@ -0,0 +1,123 @@
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 ServiceFeatureContentGuardResponse(BaseModel):
28
+ """
29
+ A serializer for FeatureContentGuard.
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
+ name: StrictStr = Field(description="The unique name.")
36
+ description: Optional[StrictStr] = Field(default=None, description="An optional description.")
37
+ header_name: StrictStr
38
+ jq_filter: Optional[StrictStr] = None
39
+ features: List[StrictStr] = Field(description="The list of features required to access the content.")
40
+ __properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "name", "description", "header_name", "jq_filter", "features"]
41
+
42
+ model_config = ConfigDict(
43
+ populate_by_name=True,
44
+ validate_assignment=True,
45
+ protected_namespaces=(),
46
+ )
47
+
48
+
49
+ def to_str(self) -> str:
50
+ """Returns the string representation of the model using alias"""
51
+ return pprint.pformat(self.model_dump(by_alias=True))
52
+
53
+ def to_json(self) -> str:
54
+ """Returns the JSON representation of the model using alias"""
55
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
56
+ return json.dumps(self.to_dict())
57
+
58
+ @classmethod
59
+ def from_json(cls, json_str: str) -> Optional[Self]:
60
+ """Create an instance of ServiceFeatureContentGuardResponse from a JSON string"""
61
+ return cls.from_dict(json.loads(json_str))
62
+
63
+ def to_dict(self) -> Dict[str, Any]:
64
+ """Return the dictionary representation of the model using alias.
65
+
66
+ This has the following differences from calling pydantic's
67
+ `self.model_dump(by_alias=True)`:
68
+
69
+ * `None` is only added to the output dict for nullable fields that
70
+ were set at model initialization. Other fields with value `None`
71
+ are ignored.
72
+ * OpenAPI `readOnly` fields are excluded.
73
+ * OpenAPI `readOnly` fields are excluded.
74
+ * OpenAPI `readOnly` fields are excluded.
75
+ * OpenAPI `readOnly` fields are excluded.
76
+ """
77
+ excluded_fields: Set[str] = set([
78
+ "pulp_href",
79
+ "prn",
80
+ "pulp_created",
81
+ "pulp_last_updated",
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 description (nullable) is None
90
+ # and model_fields_set contains the field
91
+ if self.description is None and "description" in self.model_fields_set:
92
+ _dict['description'] = None
93
+
94
+ # set to None if jq_filter (nullable) is None
95
+ # and model_fields_set contains the field
96
+ if self.jq_filter is None and "jq_filter" in self.model_fields_set:
97
+ _dict['jq_filter'] = None
98
+
99
+ return _dict
100
+
101
+ @classmethod
102
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
103
+ """Create an instance of ServiceFeatureContentGuardResponse from a dict"""
104
+ if obj is None:
105
+ return None
106
+
107
+ if not isinstance(obj, dict):
108
+ return cls.model_validate(obj)
109
+
110
+ _obj = cls.model_validate({
111
+ "pulp_href": obj.get("pulp_href"),
112
+ "prn": obj.get("prn"),
113
+ "pulp_created": obj.get("pulp_created"),
114
+ "pulp_last_updated": obj.get("pulp_last_updated"),
115
+ "name": obj.get("name"),
116
+ "description": obj.get("description"),
117
+ "header_name": obj.get("header_name"),
118
+ "jq_filter": obj.get("jq_filter"),
119
+ "features": obj.get("features")
120
+ })
121
+ return _obj
122
+
123
+
@@ -0,0 +1,110 @@
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 ServiceVulnerabilityReportResponse(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
+ __properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "vulns"]
37
+
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Optional[Self]:
56
+ """Create an instance of ServiceVulnerabilityReportResponse from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self) -> Dict[str, Any]:
60
+ """Return the dictionary representation of the model using alias.
61
+
62
+ This has the following differences from calling pydantic's
63
+ `self.model_dump(by_alias=True)`:
64
+
65
+ * `None` is only added to the output dict for nullable fields that
66
+ were set at model initialization. Other fields with value `None`
67
+ are ignored.
68
+ * OpenAPI `readOnly` fields are excluded.
69
+ * OpenAPI `readOnly` fields are excluded.
70
+ * OpenAPI `readOnly` fields are excluded.
71
+ * OpenAPI `readOnly` fields are excluded.
72
+ """
73
+ excluded_fields: Set[str] = set([
74
+ "pulp_href",
75
+ "prn",
76
+ "pulp_created",
77
+ "pulp_last_updated",
78
+ ])
79
+
80
+ _dict = self.model_dump(
81
+ by_alias=True,
82
+ exclude=excluded_fields,
83
+ exclude_none=True,
84
+ )
85
+ # set to None if vulns (nullable) is None
86
+ # and model_fields_set contains the field
87
+ if self.vulns is None and "vulns" in self.model_fields_set:
88
+ _dict['vulns'] = None
89
+
90
+ return _dict
91
+
92
+ @classmethod
93
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
94
+ """Create an instance of ServiceVulnerabilityReportResponse from a dict"""
95
+ if obj is None:
96
+ return None
97
+
98
+ if not isinstance(obj, dict):
99
+ return cls.model_validate(obj)
100
+
101
+ _obj = cls.model_validate({
102
+ "pulp_href": obj.get("pulp_href"),
103
+ "prn": obj.get("prn"),
104
+ "pulp_created": obj.get("pulp_created"),
105
+ "pulp_last_updated": obj.get("pulp_last_updated"),
106
+ "vulns": obj.get("vulns")
107
+ })
108
+ return _obj
109
+
110
+
@@ -0,0 +1,40 @@
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 json
18
+ from enum import Enum
19
+ from typing_extensions import Self
20
+
21
+
22
+ class StorageClassEnum(str, Enum):
23
+ """
24
+ * `pulpcore.app.models.storage.FileSystem` - Use local filesystem as storage * `storages.backends.s3boto3.S3Boto3Storage` - Use Amazon S3 as storage * `storages.backends.azure_storage.AzureStorage` - Use Azure Blob as storage * `pulp_service.app.storage.OCIStorage` - Use OCI as storage
25
+ """
26
+
27
+ """
28
+ allowed enum values
29
+ """
30
+ PULPCORE_DOT_APP_DOT_MODELS_DOT_STORAGE_DOT_FILE_SYSTEM = 'pulpcore.app.models.storage.FileSystem'
31
+ STORAGES_DOT_BACKENDS_DOT_S3BOTO3_DOT_S3_BOTO3_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
32
+ STORAGES_DOT_BACKENDS_DOT_AZURE_STORAGE_DOT_AZURE_STORAGE = 'storages.backends.azure_storage.AzureStorage'
33
+ PULP_SERVICE_DOT_APP_DOT_STORAGE_DOT_OCI_STORAGE = 'pulp_service.app.storage.OCIStorage'
34
+
35
+ @classmethod
36
+ def from_json(cls, json_str: str) -> Self:
37
+ """Create an instance of StorageClassEnum from a JSON string"""
38
+ return cls(json.loads(json_str))
39
+
40
+