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

Files changed (82) hide show
  1. crc-pulp_service-client/__init__.py +2 -0
  2. crc-pulp_service-client/api/__init__.py +11 -0
  3. crc-pulp_service-client/api/api_create_domain_api.py +335 -0
  4. crc-pulp_service-client/api/api_debug_auth_header_api.py +329 -0
  5. crc-pulp_service-client/api/api_test_tasks_api.py +326 -0
  6. crc-pulp_service-client/api/content_rpmpackages_api.py +1899 -0
  7. crc-pulp_service-client/api/contentguards_feature_api.py +3401 -0
  8. crc-pulp_service-client/api/tasks_api.py +1504 -0
  9. crc-pulp_service-client/api/vuln_report_api.py +1301 -0
  10. crc-pulp_service-client/api_client.py +798 -0
  11. crc-pulp_service-client/api_response.py +21 -0
  12. crc-pulp_service-client/configuration.py +628 -0
  13. crc-pulp_service-client/exceptions.py +200 -0
  14. crc-pulp_service-client/models/__init__.py +40 -0
  15. crc-pulp_service-client/models/async_operation_response.py +88 -0
  16. crc-pulp_service-client/models/domain.py +114 -0
  17. crc-pulp_service-client/models/domain_response.py +131 -0
  18. crc-pulp_service-client/models/my_permissions_response.py +88 -0
  19. crc-pulp_service-client/models/nested_role.py +93 -0
  20. crc-pulp_service-client/models/nested_role_response.py +92 -0
  21. crc-pulp_service-client/models/object_roles_response.py +96 -0
  22. crc-pulp_service-client/models/paginated_task_response_list.py +112 -0
  23. crc-pulp_service-client/models/paginatedrpm_package_response_list.py +112 -0
  24. crc-pulp_service-client/models/paginatedservice_feature_content_guard_response_list.py +112 -0
  25. crc-pulp_service-client/models/paginatedservice_vulnerability_report_response_list.py +112 -0
  26. crc-pulp_service-client/models/patchedservice_feature_content_guard.py +107 -0
  27. crc-pulp_service-client/models/progress_report_response.py +115 -0
  28. crc-pulp_service-client/models/rpm_package_response.py +325 -0
  29. crc-pulp_service-client/models/service_feature_content_guard.py +107 -0
  30. crc-pulp_service-client/models/service_feature_content_guard_response.py +123 -0
  31. crc-pulp_service-client/models/service_vulnerability_report_response.py +110 -0
  32. crc-pulp_service-client/models/set_label.py +103 -0
  33. crc-pulp_service-client/models/set_label_response.py +103 -0
  34. crc-pulp_service-client/models/storage_class_enum.py +40 -0
  35. crc-pulp_service-client/models/task_response.py +167 -0
  36. crc-pulp_service-client/models/unset_label.py +96 -0
  37. crc-pulp_service-client/models/unset_label_response.py +100 -0
  38. crc-pulp_service-client/py.typed +0 -0
  39. crc-pulp_service-client/rest.py +258 -0
  40. crc_pulp_service_client-20250819.1.dist-info/METADATA +25 -0
  41. crc_pulp_service_client-20250819.1.dist-info/RECORD +82 -0
  42. crc_pulp_service_client-20250819.1.dist-info/WHEEL +5 -0
  43. crc_pulp_service_client-20250819.1.dist-info/top_level.txt +2 -0
  44. services-pulp_service-client/__init__.py +2 -0
  45. services-pulp_service-client/api/__init__.py +11 -0
  46. services-pulp_service-client/api/api_create_domain_api.py +335 -0
  47. services-pulp_service-client/api/api_debug_auth_header_api.py +329 -0
  48. services-pulp_service-client/api/api_test_tasks_api.py +326 -0
  49. services-pulp_service-client/api/content_rpmpackages_api.py +1899 -0
  50. services-pulp_service-client/api/contentguards_feature_api.py +3401 -0
  51. services-pulp_service-client/api/tasks_api.py +1504 -0
  52. services-pulp_service-client/api/vuln_report_api.py +1301 -0
  53. services-pulp_service-client/api_client.py +798 -0
  54. services-pulp_service-client/api_response.py +21 -0
  55. services-pulp_service-client/configuration.py +628 -0
  56. services-pulp_service-client/exceptions.py +200 -0
  57. services-pulp_service-client/models/__init__.py +40 -0
  58. services-pulp_service-client/models/async_operation_response.py +88 -0
  59. services-pulp_service-client/models/domain.py +114 -0
  60. services-pulp_service-client/models/domain_response.py +131 -0
  61. services-pulp_service-client/models/my_permissions_response.py +88 -0
  62. services-pulp_service-client/models/nested_role.py +93 -0
  63. services-pulp_service-client/models/nested_role_response.py +92 -0
  64. services-pulp_service-client/models/object_roles_response.py +96 -0
  65. services-pulp_service-client/models/paginated_task_response_list.py +112 -0
  66. services-pulp_service-client/models/paginatedrpm_package_response_list.py +112 -0
  67. services-pulp_service-client/models/paginatedservice_feature_content_guard_response_list.py +112 -0
  68. services-pulp_service-client/models/paginatedservice_vulnerability_report_response_list.py +112 -0
  69. services-pulp_service-client/models/patchedservice_feature_content_guard.py +107 -0
  70. services-pulp_service-client/models/progress_report_response.py +115 -0
  71. services-pulp_service-client/models/rpm_package_response.py +325 -0
  72. services-pulp_service-client/models/service_feature_content_guard.py +107 -0
  73. services-pulp_service-client/models/service_feature_content_guard_response.py +123 -0
  74. services-pulp_service-client/models/service_vulnerability_report_response.py +110 -0
  75. services-pulp_service-client/models/set_label.py +103 -0
  76. services-pulp_service-client/models/set_label_response.py +103 -0
  77. services-pulp_service-client/models/storage_class_enum.py +40 -0
  78. services-pulp_service-client/models/task_response.py +167 -0
  79. services-pulp_service-client/models/unset_label.py +96 -0
  80. services-pulp_service-client/models/unset_label_response.py +100 -0
  81. services-pulp_service-client/py.typed +0 -0
  82. services-pulp_service-client/rest.py +258 -0
@@ -0,0 +1,112 @@
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-pulp_service-client.models.service_vulnerability_report_response import ServiceVulnerabilityReportResponse
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class PaginatedserviceVulnerabilityReportResponseList(BaseModel):
28
+ """
29
+ PaginatedserviceVulnerabilityReportResponseList
30
+ """ # noqa: E501
31
+ count: StrictInt
32
+ next: Optional[StrictStr] = None
33
+ previous: Optional[StrictStr] = None
34
+ results: List[ServiceVulnerabilityReportResponse]
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 PaginatedserviceVulnerabilityReportResponseList 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
+ # 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
+ return _dict
94
+
95
+ @classmethod
96
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
97
+ """Create an instance of PaginatedserviceVulnerabilityReportResponseList from a dict"""
98
+ if obj is None:
99
+ return None
100
+
101
+ if not isinstance(obj, dict):
102
+ return cls.model_validate(obj)
103
+
104
+ _obj = cls.model_validate({
105
+ "count": obj.get("count"),
106
+ "next": obj.get("next"),
107
+ "previous": obj.get("previous"),
108
+ "results": [ServiceVulnerabilityReportResponse.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None
109
+ })
110
+ return _obj
111
+
112
+
@@ -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,325 @@
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, StrictBool, StrictInt, 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 RpmPackageResponse(BaseModel):
28
+ """
29
+ A Serializer for Package. Add serializers for the new fields defined in Package and add those fields to the Meta class keeping fields from the parent class as well. Provide help_text.
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
+ md5: Optional[StrictStr] = Field(default=None, description="The MD5 checksum if available.")
36
+ sha1: Optional[StrictStr] = Field(default=None, description="The SHA-1 checksum if available.")
37
+ sha224: Optional[StrictStr] = Field(default=None, description="The SHA-224 checksum if available.")
38
+ sha256: Optional[StrictStr] = Field(default=None, description="The SHA-256 checksum if available.")
39
+ sha384: Optional[StrictStr] = Field(default=None, description="The SHA-384 checksum if available.")
40
+ sha512: Optional[StrictStr] = Field(default=None, description="The SHA-512 checksum if available.")
41
+ pulp_labels: Optional[Dict[str, Optional[StrictStr]]] = Field(default=None, description="A dictionary of arbitrary key/value pairs used to describe a specific Content instance.")
42
+ artifact: Optional[StrictStr] = Field(default=None, description="Artifact file representing the physical content")
43
+ name: Optional[StrictStr] = Field(default=None, description="Name of the package")
44
+ epoch: Optional[StrictStr] = Field(default=None, description="The package's epoch")
45
+ version: Optional[StrictStr] = Field(default=None, description="The version of the package. For example, '2.8.0'")
46
+ release: Optional[StrictStr] = Field(default=None, description="The release of a particular version of the package. e.g. '1.el7' or '3.f24'")
47
+ arch: Optional[StrictStr] = Field(default=None, description="The target architecture for a package.For example, 'x86_64', 'i686', or 'noarch'")
48
+ pkg_id: Optional[StrictStr] = Field(default=None, description="Checksum of the package file", alias="pkgId")
49
+ checksum_type: Optional[StrictStr] = Field(default=None, description="Type of checksum, e.g. 'sha256', 'md5'")
50
+ summary: Optional[StrictStr] = Field(default=None, description="Short description of the packaged software")
51
+ description: Optional[StrictStr] = Field(default=None, description="In-depth description of the packaged software")
52
+ url: Optional[StrictStr] = Field(default=None, description="URL with more information about the packaged software")
53
+ changelogs: Optional[Any] = Field(default=None, description="Changelogs that package contains")
54
+ files: Optional[Any] = Field(default=None, description="Files that package contains")
55
+ requires: Optional[Any] = Field(default=None, description="Capabilities the package requires")
56
+ provides: Optional[Any] = Field(default=None, description="Capabilities the package provides")
57
+ conflicts: Optional[Any] = Field(default=None, description="Capabilities the package conflicts")
58
+ obsoletes: Optional[Any] = Field(default=None, description="Capabilities the package obsoletes")
59
+ suggests: Optional[Any] = Field(default=None, description="Capabilities the package suggests")
60
+ enhances: Optional[Any] = Field(default=None, description="Capabilities the package enhances")
61
+ recommends: Optional[Any] = Field(default=None, description="Capabilities the package recommends")
62
+ supplements: Optional[Any] = Field(default=None, description="Capabilities the package supplements")
63
+ location_base: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Base location of this package. This field will be removed in a future release of pulp_rpm.")
64
+ location_href: Optional[StrictStr] = Field(default=None, description="DEPRECATED: Relative location of package to the repodata. This field will be removed in a future release of pulp_rpm.")
65
+ rpm_buildhost: Optional[StrictStr] = Field(default=None, description="Hostname of the system that built the package")
66
+ rpm_group: Optional[StrictStr] = Field(default=None, description="RPM group (See: http://fedoraproject.org/wiki/RPMGroups)")
67
+ rpm_license: Optional[StrictStr] = Field(default=None, description="License term applicable to the package software (GPLv2, etc.)")
68
+ rpm_packager: Optional[StrictStr] = Field(default=None, description="Person or persons responsible for creating the package")
69
+ rpm_sourcerpm: Optional[StrictStr] = Field(default=None, description="Name of the source package (srpm) the package was built from")
70
+ rpm_vendor: Optional[StrictStr] = Field(default=None, description="Name of the organization that produced the package")
71
+ rpm_header_start: Optional[StrictInt] = Field(default=None, description="First byte of the header")
72
+ rpm_header_end: Optional[StrictInt] = Field(default=None, description="Last byte of the header")
73
+ is_modular: Optional[StrictBool] = Field(default=None, description="Flag to identify if the package is modular")
74
+ size_archive: Optional[StrictInt] = Field(default=None, description="Size, in bytes, of the archive portion of the original package file")
75
+ size_installed: Optional[StrictInt] = Field(default=None, description="Total size, in bytes, of every file installed by this package")
76
+ size_package: Optional[StrictInt] = Field(default=None, description="Size, in bytes, of the package")
77
+ time_build: Optional[StrictInt] = Field(default=None, description="Time the package was built in seconds since the epoch")
78
+ time_file: Optional[StrictInt] = Field(default=None, description="The 'file' time attribute in the primary XML - file mtime in seconds since the epoch.")
79
+ __properties: ClassVar[List[str]] = ["pulp_href", "prn", "pulp_created", "pulp_last_updated", "md5", "sha1", "sha224", "sha256", "sha384", "sha512", "pulp_labels", "artifact", "name", "epoch", "version", "release", "arch", "pkgId", "checksum_type", "summary", "description", "url", "changelogs", "files", "requires", "provides", "conflicts", "obsoletes", "suggests", "enhances", "recommends", "supplements", "location_base", "location_href", "rpm_buildhost", "rpm_group", "rpm_license", "rpm_packager", "rpm_sourcerpm", "rpm_vendor", "rpm_header_start", "rpm_header_end", "is_modular", "size_archive", "size_installed", "size_package", "time_build", "time_file"]
80
+
81
+ model_config = ConfigDict(
82
+ populate_by_name=True,
83
+ validate_assignment=True,
84
+ protected_namespaces=(),
85
+ )
86
+
87
+
88
+ def to_str(self) -> str:
89
+ """Returns the string representation of the model using alias"""
90
+ return pprint.pformat(self.model_dump(by_alias=True))
91
+
92
+ def to_json(self) -> str:
93
+ """Returns the JSON representation of the model using alias"""
94
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
95
+ return json.dumps(self.to_dict())
96
+
97
+ @classmethod
98
+ def from_json(cls, json_str: str) -> Optional[Self]:
99
+ """Create an instance of RpmPackageResponse from a JSON string"""
100
+ return cls.from_dict(json.loads(json_str))
101
+
102
+ def to_dict(self) -> Dict[str, Any]:
103
+ """Return the dictionary representation of the model using alias.
104
+
105
+ This has the following differences from calling pydantic's
106
+ `self.model_dump(by_alias=True)`:
107
+
108
+ * `None` is only added to the output dict for nullable fields that
109
+ were set at model initialization. Other fields with value `None`
110
+ are ignored.
111
+ * OpenAPI `readOnly` fields are excluded.
112
+ * OpenAPI `readOnly` fields are excluded.
113
+ * OpenAPI `readOnly` fields are excluded.
114
+ * OpenAPI `readOnly` fields are excluded.
115
+ * OpenAPI `readOnly` fields are excluded.
116
+ * OpenAPI `readOnly` fields are excluded.
117
+ * OpenAPI `readOnly` fields are excluded.
118
+ * OpenAPI `readOnly` fields are excluded.
119
+ * OpenAPI `readOnly` fields are excluded.
120
+ * OpenAPI `readOnly` fields are excluded.
121
+ * OpenAPI `readOnly` fields are excluded.
122
+ * OpenAPI `readOnly` fields are excluded.
123
+ * OpenAPI `readOnly` fields are excluded.
124
+ * OpenAPI `readOnly` fields are excluded.
125
+ * OpenAPI `readOnly` fields are excluded.
126
+ * OpenAPI `readOnly` fields are excluded.
127
+ * OpenAPI `readOnly` fields are excluded.
128
+ * OpenAPI `readOnly` fields are excluded.
129
+ * OpenAPI `readOnly` fields are excluded.
130
+ * OpenAPI `readOnly` fields are excluded.
131
+ * OpenAPI `readOnly` fields are excluded.
132
+ * OpenAPI `readOnly` fields are excluded.
133
+ * OpenAPI `readOnly` fields are excluded.
134
+ * OpenAPI `readOnly` fields are excluded.
135
+ * OpenAPI `readOnly` fields are excluded.
136
+ * OpenAPI `readOnly` fields are excluded.
137
+ * OpenAPI `readOnly` fields are excluded.
138
+ * OpenAPI `readOnly` fields are excluded.
139
+ * OpenAPI `readOnly` fields are excluded.
140
+ * OpenAPI `readOnly` fields are excluded.
141
+ * OpenAPI `readOnly` fields are excluded.
142
+ * OpenAPI `readOnly` fields are excluded.
143
+ * OpenAPI `readOnly` fields are excluded.
144
+ * OpenAPI `readOnly` fields are excluded.
145
+ * OpenAPI `readOnly` fields are excluded.
146
+ * OpenAPI `readOnly` fields are excluded.
147
+ * OpenAPI `readOnly` fields are excluded.
148
+ * OpenAPI `readOnly` fields are excluded.
149
+ * OpenAPI `readOnly` fields are excluded.
150
+ * OpenAPI `readOnly` fields are excluded.
151
+ * OpenAPI `readOnly` fields are excluded.
152
+ * OpenAPI `readOnly` fields are excluded.
153
+ * OpenAPI `readOnly` fields are excluded.
154
+ * OpenAPI `readOnly` fields are excluded.
155
+ * OpenAPI `readOnly` fields are excluded.
156
+ * OpenAPI `readOnly` fields are excluded.
157
+ """
158
+ excluded_fields: Set[str] = set([
159
+ "pulp_href",
160
+ "prn",
161
+ "pulp_created",
162
+ "pulp_last_updated",
163
+ "md5",
164
+ "sha1",
165
+ "sha224",
166
+ "sha256",
167
+ "sha384",
168
+ "sha512",
169
+ "name",
170
+ "epoch",
171
+ "version",
172
+ "release",
173
+ "arch",
174
+ "pkg_id",
175
+ "checksum_type",
176
+ "summary",
177
+ "description",
178
+ "url",
179
+ "changelogs",
180
+ "files",
181
+ "requires",
182
+ "provides",
183
+ "conflicts",
184
+ "obsoletes",
185
+ "suggests",
186
+ "enhances",
187
+ "recommends",
188
+ "supplements",
189
+ "location_base",
190
+ "location_href",
191
+ "rpm_buildhost",
192
+ "rpm_group",
193
+ "rpm_license",
194
+ "rpm_packager",
195
+ "rpm_sourcerpm",
196
+ "rpm_vendor",
197
+ "rpm_header_start",
198
+ "rpm_header_end",
199
+ "is_modular",
200
+ "size_archive",
201
+ "size_installed",
202
+ "size_package",
203
+ "time_build",
204
+ "time_file",
205
+ ])
206
+
207
+ _dict = self.model_dump(
208
+ by_alias=True,
209
+ exclude=excluded_fields,
210
+ exclude_none=True,
211
+ )
212
+ # set to None if changelogs (nullable) is None
213
+ # and model_fields_set contains the field
214
+ if self.changelogs is None and "changelogs" in self.model_fields_set:
215
+ _dict['changelogs'] = None
216
+
217
+ # set to None if files (nullable) is None
218
+ # and model_fields_set contains the field
219
+ if self.files is None and "files" in self.model_fields_set:
220
+ _dict['files'] = None
221
+
222
+ # set to None if requires (nullable) is None
223
+ # and model_fields_set contains the field
224
+ if self.requires is None and "requires" in self.model_fields_set:
225
+ _dict['requires'] = None
226
+
227
+ # set to None if provides (nullable) is None
228
+ # and model_fields_set contains the field
229
+ if self.provides is None and "provides" in self.model_fields_set:
230
+ _dict['provides'] = None
231
+
232
+ # set to None if conflicts (nullable) is None
233
+ # and model_fields_set contains the field
234
+ if self.conflicts is None and "conflicts" in self.model_fields_set:
235
+ _dict['conflicts'] = None
236
+
237
+ # set to None if obsoletes (nullable) is None
238
+ # and model_fields_set contains the field
239
+ if self.obsoletes is None and "obsoletes" in self.model_fields_set:
240
+ _dict['obsoletes'] = None
241
+
242
+ # set to None if suggests (nullable) is None
243
+ # and model_fields_set contains the field
244
+ if self.suggests is None and "suggests" in self.model_fields_set:
245
+ _dict['suggests'] = None
246
+
247
+ # set to None if enhances (nullable) is None
248
+ # and model_fields_set contains the field
249
+ if self.enhances is None and "enhances" in self.model_fields_set:
250
+ _dict['enhances'] = None
251
+
252
+ # set to None if recommends (nullable) is None
253
+ # and model_fields_set contains the field
254
+ if self.recommends is None and "recommends" in self.model_fields_set:
255
+ _dict['recommends'] = None
256
+
257
+ # set to None if supplements (nullable) is None
258
+ # and model_fields_set contains the field
259
+ if self.supplements is None and "supplements" in self.model_fields_set:
260
+ _dict['supplements'] = None
261
+
262
+ return _dict
263
+
264
+ @classmethod
265
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
266
+ """Create an instance of RpmPackageResponse from a dict"""
267
+ if obj is None:
268
+ return None
269
+
270
+ if not isinstance(obj, dict):
271
+ return cls.model_validate(obj)
272
+
273
+ _obj = cls.model_validate({
274
+ "pulp_href": obj.get("pulp_href"),
275
+ "prn": obj.get("prn"),
276
+ "pulp_created": obj.get("pulp_created"),
277
+ "pulp_last_updated": obj.get("pulp_last_updated"),
278
+ "md5": obj.get("md5"),
279
+ "sha1": obj.get("sha1"),
280
+ "sha224": obj.get("sha224"),
281
+ "sha256": obj.get("sha256"),
282
+ "sha384": obj.get("sha384"),
283
+ "sha512": obj.get("sha512"),
284
+ "pulp_labels": obj.get("pulp_labels"),
285
+ "artifact": obj.get("artifact"),
286
+ "name": obj.get("name"),
287
+ "epoch": obj.get("epoch"),
288
+ "version": obj.get("version"),
289
+ "release": obj.get("release"),
290
+ "arch": obj.get("arch"),
291
+ "pkgId": obj.get("pkgId"),
292
+ "checksum_type": obj.get("checksum_type"),
293
+ "summary": obj.get("summary"),
294
+ "description": obj.get("description"),
295
+ "url": obj.get("url"),
296
+ "changelogs": obj.get("changelogs"),
297
+ "files": obj.get("files"),
298
+ "requires": obj.get("requires"),
299
+ "provides": obj.get("provides"),
300
+ "conflicts": obj.get("conflicts"),
301
+ "obsoletes": obj.get("obsoletes"),
302
+ "suggests": obj.get("suggests"),
303
+ "enhances": obj.get("enhances"),
304
+ "recommends": obj.get("recommends"),
305
+ "supplements": obj.get("supplements"),
306
+ "location_base": obj.get("location_base"),
307
+ "location_href": obj.get("location_href"),
308
+ "rpm_buildhost": obj.get("rpm_buildhost"),
309
+ "rpm_group": obj.get("rpm_group"),
310
+ "rpm_license": obj.get("rpm_license"),
311
+ "rpm_packager": obj.get("rpm_packager"),
312
+ "rpm_sourcerpm": obj.get("rpm_sourcerpm"),
313
+ "rpm_vendor": obj.get("rpm_vendor"),
314
+ "rpm_header_start": obj.get("rpm_header_start"),
315
+ "rpm_header_end": obj.get("rpm_header_end"),
316
+ "is_modular": obj.get("is_modular"),
317
+ "size_archive": obj.get("size_archive"),
318
+ "size_installed": obj.get("size_installed"),
319
+ "size_package": obj.get("size_package"),
320
+ "time_build": obj.get("time_build"),
321
+ "time_file": obj.get("time_file")
322
+ })
323
+ return _obj
324
+
325
+