waldur-api-client 7.7.8__py3-none-any.whl → 7.8.0__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 waldur-api-client might be problematic. Click here for more details.

Files changed (77) hide show
  1. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_count.py +15 -0
  2. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_list.py +15 -0
  3. waldur_api_client/api/{rancher_clusters/rancher_clusters_destroy.py → marketplace_orders/marketplace_orders_delete_attachment.py} +6 -4
  4. waldur_api_client/api/{rancher_clusters/rancher_clusters_create.py → marketplace_orders/marketplace_orders_update_attachment.py} +47 -29
  5. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_component_stats_list.py +45 -0
  6. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_costs_list.py +45 -0
  7. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_count.py +45 -0
  8. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_customers_list.py +45 -0
  9. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_groups_count.py +45 -0
  10. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_groups_list.py +45 -0
  11. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_list.py +45 -0
  12. waldur_api_client/api/marketplace_public_offerings/marketplace_public_offerings_count.py +45 -0
  13. waldur_api_client/api/marketplace_public_offerings/marketplace_public_offerings_list.py +45 -0
  14. waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_offerings_list.py +45 -0
  15. waldur_api_client/models/__init__.py +10 -4
  16. waldur_api_client/models/booking_offerings_list_field_item.py +1 -0
  17. waldur_api_client/models/booking_offerings_retrieve_field_item.py +1 -0
  18. waldur_api_client/models/constance_settings.py +9 -0
  19. waldur_api_client/models/constance_settings_request.py +9 -0
  20. waldur_api_client/models/country_enum.py +211 -0
  21. waldur_api_client/models/course_account.py +14 -15
  22. waldur_api_client/models/course_account_request.py +0 -9
  23. waldur_api_client/models/customer_request.py +9 -0
  24. waldur_api_client/models/deployment_mode_enum.py +9 -0
  25. waldur_api_client/models/identity_provider.py +57 -0
  26. waldur_api_client/models/identity_provider_request.py +57 -0
  27. waldur_api_client/models/issue.py +8 -17
  28. waldur_api_client/models/issue_request.py +8 -17
  29. waldur_api_client/models/issue_type_enum.py +4 -4
  30. waldur_api_client/models/marketplace_offering_users_list_field_item.py +2 -0
  31. waldur_api_client/models/marketplace_offering_users_retrieve_field_item.py +2 -0
  32. waldur_api_client/models/marketplace_orders_list_field_item.py +2 -0
  33. waldur_api_client/models/marketplace_orders_retrieve_field_item.py +2 -0
  34. waldur_api_client/models/marketplace_public_offerings_list_field_item.py +1 -0
  35. waldur_api_client/models/marketplace_public_offerings_retrieve_field_item.py +1 -0
  36. waldur_api_client/models/merged_plugin_options.py +27 -0
  37. waldur_api_client/models/merged_plugin_options_request.py +27 -0
  38. waldur_api_client/models/offering.py +9 -0
  39. waldur_api_client/models/offering_create.py +9 -8
  40. waldur_api_client/models/offering_create_request.py +9 -0
  41. waldur_api_client/models/offering_overview_update_request.py +9 -0
  42. waldur_api_client/models/offering_terms_of_service.py +42 -1
  43. waldur_api_client/models/offering_user.py +18 -0
  44. waldur_api_client/models/open_stack_tenant_create_order_attributes.py +0 -18
  45. waldur_api_client/models/open_stack_tenant_request.py +18 -0
  46. waldur_api_client/models/order_attachment.py +71 -0
  47. waldur_api_client/models/order_attachment_request.py +84 -0
  48. waldur_api_client/models/order_create.py +58 -16
  49. waldur_api_client/models/order_create_request.py +44 -62
  50. waldur_api_client/models/order_details.py +65 -16
  51. waldur_api_client/models/patched_customer_request.py +9 -0
  52. waldur_api_client/models/patched_identity_provider_request.py +58 -0
  53. waldur_api_client/models/patched_project_request.py +9 -0
  54. waldur_api_client/models/patched_protected_call_request.py +9 -0
  55. waldur_api_client/models/patched_protected_round_request.py +2 -2
  56. waldur_api_client/models/patched_service_provider_request.py +9 -0
  57. waldur_api_client/models/patched_user_request.py +9 -0
  58. waldur_api_client/models/project_request.py +9 -0
  59. waldur_api_client/models/protected_call_request.py +9 -0
  60. waldur_api_client/models/protected_round.py +2 -2
  61. waldur_api_client/models/protected_round_request.py +2 -2
  62. waldur_api_client/models/provider_offering_details_request.py +9 -0
  63. waldur_api_client/models/public_offering_details.py +9 -0
  64. waldur_api_client/models/rancher_cluster_request.py +1 -48
  65. waldur_api_client/models/resource_update_limits_request.py +56 -1
  66. waldur_api_client/models/robot_account.py +12 -4
  67. waldur_api_client/models/robot_account_details.py +12 -4
  68. waldur_api_client/models/robot_account_states.py +13 -0
  69. waldur_api_client/models/service_provider_request.py +9 -0
  70. waldur_api_client/models/user_consent_info.py +86 -0
  71. waldur_api_client/models/user_request.py +9 -0
  72. {waldur_api_client-7.7.8.dist-info → waldur_api_client-7.8.0.dist-info}/METADATA +4 -2
  73. {waldur_api_client-7.7.8.dist-info → waldur_api_client-7.8.0.dist-info}/RECORD +75 -72
  74. {waldur_api_client-7.7.8.dist-info → waldur_api_client-7.8.0.dist-info}/WHEEL +1 -1
  75. waldur_api_client/models/marketplace_managed_rancher_create_order_attributes.py +0 -144
  76. waldur_api_client/models/marketplace_rancher_create_order_attributes.py +0 -145
  77. {waldur_api_client-7.7.8.dist-info → waldur_api_client-7.8.0.dist-info/licenses}/LICENSE +0 -0
@@ -7,6 +7,7 @@ from attrs import field as _attrs_field
7
7
  from dateutil.parser import isoparse
8
8
 
9
9
  from ..models.account_name_generation_policy_enum import AccountNameGenerationPolicyEnum
10
+ from ..models.deployment_mode_enum import DeploymentModeEnum
10
11
  from ..models.storage_mode_enum import StorageModeEnum
11
12
  from ..models.username_generation_policy_enum import UsernameGenerationPolicyEnum
12
13
  from ..types import UNSET, Unset
@@ -35,6 +36,8 @@ class MergedPluginOptionsRequest:
35
36
  resources
36
37
  required_team_role_for_provisioning (Union[Unset, str]): Required user role in a project for provisioning of
37
38
  resources
39
+ order_supports_comments_and_metadata (Union[Unset, bool]): If set to True, orders will support comments and
40
+ metadata
38
41
  default_internal_network_mtu (Union[Unset, int]): If set, it will be used as a default MTU for the first network
39
42
  in a tenant
40
43
  max_instances (Union[Unset, int]): Default limit for number of instances in OpenStack tenant
@@ -53,6 +56,7 @@ class MergedPluginOptionsRequest:
53
56
  username_generation_policy (Union[Unset, UsernameGenerationPolicyEnum]): Default:
54
57
  UsernameGenerationPolicyEnum.SERVICE_PROVIDER.
55
58
  enable_issues_for_membership_changes (Union[Unset, bool]): Enable issues for membership changes
59
+ deployment_mode (Union[Unset, DeploymentModeEnum]):
56
60
  flavors_regex (Union[Unset, str]): Regular expression to limit flavors list
57
61
  openstack_offering_uuid_list (Union[Unset, list[str]]): List of UUID of OpenStack offerings where tenant can be
58
62
  created
@@ -86,6 +90,7 @@ class MergedPluginOptionsRequest:
86
90
  supports_pausing: Union[Unset, bool] = UNSET
87
91
  minimal_team_count_for_provisioning: Union[Unset, int] = UNSET
88
92
  required_team_role_for_provisioning: Union[Unset, str] = UNSET
93
+ order_supports_comments_and_metadata: Union[Unset, bool] = UNSET
89
94
  default_internal_network_mtu: Union[Unset, int] = UNSET
90
95
  max_instances: Union[Unset, int] = UNSET
91
96
  max_volumes: Union[Unset, int] = UNSET
@@ -104,6 +109,7 @@ class MergedPluginOptionsRequest:
104
109
  UsernameGenerationPolicyEnum.SERVICE_PROVIDER
105
110
  )
106
111
  enable_issues_for_membership_changes: Union[Unset, bool] = UNSET
112
+ deployment_mode: Union[Unset, DeploymentModeEnum] = UNSET
107
113
  flavors_regex: Union[Unset, str] = UNSET
108
114
  openstack_offering_uuid_list: Union[Unset, list[str]] = UNSET
109
115
  managed_rancher_server_flavor_name: Union[Unset, str] = UNSET
@@ -149,6 +155,8 @@ class MergedPluginOptionsRequest:
149
155
 
150
156
  required_team_role_for_provisioning = self.required_team_role_for_provisioning
151
157
 
158
+ order_supports_comments_and_metadata = self.order_supports_comments_and_metadata
159
+
152
160
  default_internal_network_mtu = self.default_internal_network_mtu
153
161
 
154
162
  max_instances = self.max_instances
@@ -185,6 +193,10 @@ class MergedPluginOptionsRequest:
185
193
 
186
194
  enable_issues_for_membership_changes = self.enable_issues_for_membership_changes
187
195
 
196
+ deployment_mode: Union[Unset, str] = UNSET
197
+ if not isinstance(self.deployment_mode, Unset):
198
+ deployment_mode = self.deployment_mode.value
199
+
188
200
  flavors_regex = self.flavors_regex
189
201
 
190
202
  openstack_offering_uuid_list: Union[Unset, list[str]] = UNSET
@@ -256,6 +268,8 @@ class MergedPluginOptionsRequest:
256
268
  field_dict["minimal_team_count_for_provisioning"] = minimal_team_count_for_provisioning
257
269
  if required_team_role_for_provisioning is not UNSET:
258
270
  field_dict["required_team_role_for_provisioning"] = required_team_role_for_provisioning
271
+ if order_supports_comments_and_metadata is not UNSET:
272
+ field_dict["order_supports_comments_and_metadata"] = order_supports_comments_and_metadata
259
273
  if default_internal_network_mtu is not UNSET:
260
274
  field_dict["default_internal_network_mtu"] = default_internal_network_mtu
261
275
  if max_instances is not UNSET:
@@ -288,6 +302,8 @@ class MergedPluginOptionsRequest:
288
302
  field_dict["username_generation_policy"] = username_generation_policy
289
303
  if enable_issues_for_membership_changes is not UNSET:
290
304
  field_dict["enable_issues_for_membership_changes"] = enable_issues_for_membership_changes
305
+ if deployment_mode is not UNSET:
306
+ field_dict["deployment_mode"] = deployment_mode
291
307
  if flavors_regex is not UNSET:
292
308
  field_dict["flavors_regex"] = flavors_regex
293
309
  if openstack_offering_uuid_list is not UNSET:
@@ -369,6 +385,8 @@ class MergedPluginOptionsRequest:
369
385
 
370
386
  required_team_role_for_provisioning = d.pop("required_team_role_for_provisioning", UNSET)
371
387
 
388
+ order_supports_comments_and_metadata = d.pop("order_supports_comments_and_metadata", UNSET)
389
+
372
390
  default_internal_network_mtu = d.pop("default_internal_network_mtu", UNSET)
373
391
 
374
392
  max_instances = d.pop("max_instances", UNSET)
@@ -411,6 +429,13 @@ class MergedPluginOptionsRequest:
411
429
 
412
430
  enable_issues_for_membership_changes = d.pop("enable_issues_for_membership_changes", UNSET)
413
431
 
432
+ _deployment_mode = d.pop("deployment_mode", UNSET)
433
+ deployment_mode: Union[Unset, DeploymentModeEnum]
434
+ if isinstance(_deployment_mode, Unset):
435
+ deployment_mode = UNSET
436
+ else:
437
+ deployment_mode = DeploymentModeEnum(_deployment_mode)
438
+
414
439
  flavors_regex = d.pop("flavors_regex", UNSET)
415
440
 
416
441
  openstack_offering_uuid_list = cast(list[str], d.pop("openstack_offering_uuid_list", UNSET))
@@ -484,6 +509,7 @@ class MergedPluginOptionsRequest:
484
509
  supports_pausing=supports_pausing,
485
510
  minimal_team_count_for_provisioning=minimal_team_count_for_provisioning,
486
511
  required_team_role_for_provisioning=required_team_role_for_provisioning,
512
+ order_supports_comments_and_metadata=order_supports_comments_and_metadata,
487
513
  default_internal_network_mtu=default_internal_network_mtu,
488
514
  max_instances=max_instances,
489
515
  max_volumes=max_volumes,
@@ -500,6 +526,7 @@ class MergedPluginOptionsRequest:
500
526
  username_anonymized_prefix=username_anonymized_prefix,
501
527
  username_generation_policy=username_generation_policy,
502
528
  enable_issues_for_membership_changes=enable_issues_for_membership_changes,
529
+ deployment_mode=deployment_mode,
503
530
  flavors_regex=flavors_regex,
504
531
  openstack_offering_uuid_list=openstack_offering_uuid_list,
505
532
  managed_rancher_server_flavor_name=managed_rancher_server_flavor_name,
@@ -95,6 +95,7 @@ class Offering:
95
95
  parent_name (Union[None, Unset, str]):
96
96
  backend_metadata (Union[Unset, Any]):
97
97
  has_compliance_requirements (Union[Unset, bool]):
98
+ user_has_consent (Union[Unset, bool]):
98
99
  googlecalendar (Union[Unset, GoogleCalendar]):
99
100
  """
100
101
 
@@ -158,6 +159,7 @@ class Offering:
158
159
  parent_name: Union[None, Unset, str] = UNSET
159
160
  backend_metadata: Union[Unset, Any] = UNSET
160
161
  has_compliance_requirements: Union[Unset, bool] = UNSET
162
+ user_has_consent: Union[Unset, bool] = UNSET
161
163
  googlecalendar: Union[Unset, "GoogleCalendar"] = UNSET
162
164
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
163
165
 
@@ -436,6 +438,8 @@ class Offering:
436
438
 
437
439
  has_compliance_requirements = self.has_compliance_requirements
438
440
 
441
+ user_has_consent = self.user_has_consent
442
+
439
443
  googlecalendar: Union[Unset, dict[str, Any]] = UNSET
440
444
  if not isinstance(self.googlecalendar, Unset):
441
445
  googlecalendar = self.googlecalendar.to_dict()
@@ -563,6 +567,8 @@ class Offering:
563
567
  field_dict["backend_metadata"] = backend_metadata
564
568
  if has_compliance_requirements is not UNSET:
565
569
  field_dict["has_compliance_requirements"] = has_compliance_requirements
570
+ if user_has_consent is not UNSET:
571
+ field_dict["user_has_consent"] = user_has_consent
566
572
  if googlecalendar is not UNSET:
567
573
  field_dict["googlecalendar"] = googlecalendar
568
574
 
@@ -989,6 +995,8 @@ class Offering:
989
995
 
990
996
  has_compliance_requirements = d.pop("has_compliance_requirements", UNSET)
991
997
 
998
+ user_has_consent = d.pop("user_has_consent", UNSET)
999
+
992
1000
  _googlecalendar = d.pop("googlecalendar", UNSET)
993
1001
  googlecalendar: Union[Unset, GoogleCalendar]
994
1002
  if isinstance(_googlecalendar, Unset):
@@ -1057,6 +1065,7 @@ class Offering:
1057
1065
  parent_name=parent_name,
1058
1066
  backend_metadata=backend_metadata,
1059
1067
  has_compliance_requirements=has_compliance_requirements,
1068
+ user_has_consent=user_has_consent,
1060
1069
  googlecalendar=googlecalendar,
1061
1070
  )
1062
1071
 
@@ -39,7 +39,6 @@ class OfferingCreate:
39
39
  uuid (UUID):
40
40
  created (datetime.datetime):
41
41
  name (str):
42
- slug (str):
43
42
  endpoints (list['NestedEndpoint']):
44
43
  roles (list['NestedRole']):
45
44
  customer_uuid (Union[None, UUID]):
@@ -74,6 +73,7 @@ class OfferingCreate:
74
73
  parent_uuid (Union[None, UUID]):
75
74
  parent_name (Union[None, str]):
76
75
  has_compliance_requirements (bool):
76
+ slug (Union[Unset, str]):
77
77
  description (Union[Unset, str]):
78
78
  full_description (Union[Unset, str]):
79
79
  privacy_policy_link (Union[Unset, str]):
@@ -103,7 +103,6 @@ class OfferingCreate:
103
103
  uuid: UUID
104
104
  created: datetime.datetime
105
105
  name: str
106
- slug: str
107
106
  endpoints: list["NestedEndpoint"]
108
107
  roles: list["NestedRole"]
109
108
  customer_uuid: Union[None, UUID]
@@ -138,6 +137,7 @@ class OfferingCreate:
138
137
  parent_uuid: Union[None, UUID]
139
138
  parent_name: Union[None, str]
140
139
  has_compliance_requirements: bool
140
+ slug: Union[Unset, str] = UNSET
141
141
  description: Union[Unset, str] = UNSET
142
142
  full_description: Union[Unset, str] = UNSET
143
143
  privacy_policy_link: Union[Unset, str] = UNSET
@@ -172,8 +172,6 @@ class OfferingCreate:
172
172
 
173
173
  name = self.name
174
174
 
175
- slug = self.slug
176
-
177
175
  endpoints = []
178
176
  for endpoints_item_data in self.endpoints:
179
177
  endpoints_item = endpoints_item_data.to_dict()
@@ -293,6 +291,8 @@ class OfferingCreate:
293
291
 
294
292
  has_compliance_requirements = self.has_compliance_requirements
295
293
 
294
+ slug = self.slug
295
+
296
296
  description = self.description
297
297
 
298
298
  full_description = self.full_description
@@ -387,7 +387,6 @@ class OfferingCreate:
387
387
  "uuid": uuid,
388
388
  "created": created,
389
389
  "name": name,
390
- "slug": slug,
391
390
  "endpoints": endpoints,
392
391
  "roles": roles,
393
392
  "customer_uuid": customer_uuid,
@@ -424,6 +423,8 @@ class OfferingCreate:
424
423
  "has_compliance_requirements": has_compliance_requirements,
425
424
  }
426
425
  )
426
+ if slug is not UNSET:
427
+ field_dict["slug"] = slug
427
428
  if description is not UNSET:
428
429
  field_dict["description"] = description
429
430
  if full_description is not UNSET:
@@ -497,8 +498,6 @@ class OfferingCreate:
497
498
 
498
499
  name = d.pop("name")
499
500
 
500
- slug = d.pop("slug")
501
-
502
501
  endpoints = []
503
502
  _endpoints = d.pop("endpoints")
504
503
  for endpoints_item_data in _endpoints:
@@ -720,6 +719,8 @@ class OfferingCreate:
720
719
 
721
720
  has_compliance_requirements = d.pop("has_compliance_requirements")
722
721
 
722
+ slug = d.pop("slug", UNSET)
723
+
723
724
  description = d.pop("description", UNSET)
724
725
 
725
726
  full_description = d.pop("full_description", UNSET)
@@ -843,7 +844,6 @@ class OfferingCreate:
843
844
  uuid=uuid,
844
845
  created=created,
845
846
  name=name,
846
- slug=slug,
847
847
  endpoints=endpoints,
848
848
  roles=roles,
849
849
  customer_uuid=customer_uuid,
@@ -878,6 +878,7 @@ class OfferingCreate:
878
878
  parent_uuid=parent_uuid,
879
879
  parent_name=parent_name,
880
880
  has_compliance_requirements=has_compliance_requirements,
881
+ slug=slug,
881
882
  description=description,
882
883
  full_description=full_description,
883
884
  privacy_policy_link=privacy_policy_link,
@@ -27,6 +27,7 @@ class OfferingCreateRequest:
27
27
  name (str):
28
28
  category (str):
29
29
  type_ (str):
30
+ slug (Union[Unset, str]):
30
31
  description (Union[Unset, str]):
31
32
  full_description (Union[Unset, str]):
32
33
  privacy_policy_link (Union[Unset, str]):
@@ -56,6 +57,7 @@ class OfferingCreateRequest:
56
57
  name: str
57
58
  category: str
58
59
  type_: str
60
+ slug: Union[Unset, str] = UNSET
59
61
  description: Union[Unset, str] = UNSET
60
62
  full_description: Union[Unset, str] = UNSET
61
63
  privacy_policy_link: Union[Unset, str] = UNSET
@@ -89,6 +91,8 @@ class OfferingCreateRequest:
89
91
 
90
92
  type_ = self.type_
91
93
 
94
+ slug = self.slug
95
+
92
96
  description = self.description
93
97
 
94
98
  full_description = self.full_description
@@ -194,6 +198,8 @@ class OfferingCreateRequest:
194
198
  "type": type_,
195
199
  }
196
200
  )
201
+ if slug is not UNSET:
202
+ field_dict["slug"] = slug
197
203
  if description is not UNSET:
198
204
  field_dict["description"] = description
199
205
  if full_description is not UNSET:
@@ -259,6 +265,8 @@ class OfferingCreateRequest:
259
265
 
260
266
  type_ = d.pop("type")
261
267
 
268
+ slug = d.pop("slug", UNSET)
269
+
262
270
  description = d.pop("description", UNSET)
263
271
 
264
272
  full_description = d.pop("full_description", UNSET)
@@ -404,6 +412,7 @@ class OfferingCreateRequest:
404
412
  name=name,
405
413
  category=category,
406
414
  type_=type_,
415
+ slug=slug,
407
416
  description=description,
408
417
  full_description=full_description,
409
418
  privacy_policy_link=privacy_policy_link,
@@ -20,6 +20,7 @@ class OfferingOverviewUpdateRequest:
20
20
  access_url (Union[Unset, str]): Publicly accessible offering access URL
21
21
  getting_started (Union[Unset, str]):
22
22
  integration_guide (Union[Unset, str]):
23
+ slug (Union[Unset, str]):
23
24
  """
24
25
 
25
26
  name: str
@@ -29,6 +30,7 @@ class OfferingOverviewUpdateRequest:
29
30
  access_url: Union[Unset, str] = UNSET
30
31
  getting_started: Union[Unset, str] = UNSET
31
32
  integration_guide: Union[Unset, str] = UNSET
33
+ slug: Union[Unset, str] = UNSET
32
34
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
33
35
 
34
36
  def to_dict(self) -> dict[str, Any]:
@@ -46,6 +48,8 @@ class OfferingOverviewUpdateRequest:
46
48
 
47
49
  integration_guide = self.integration_guide
48
50
 
51
+ slug = self.slug
52
+
49
53
  field_dict: dict[str, Any] = {}
50
54
  field_dict.update(self.additional_properties)
51
55
  field_dict.update(
@@ -65,6 +69,8 @@ class OfferingOverviewUpdateRequest:
65
69
  field_dict["getting_started"] = getting_started
66
70
  if integration_guide is not UNSET:
67
71
  field_dict["integration_guide"] = integration_guide
72
+ if slug is not UNSET:
73
+ field_dict["slug"] = slug
68
74
 
69
75
  return field_dict
70
76
 
@@ -85,6 +91,8 @@ class OfferingOverviewUpdateRequest:
85
91
 
86
92
  integration_guide = d.pop("integration_guide", UNSET)
87
93
 
94
+ slug = d.pop("slug", UNSET)
95
+
88
96
  offering_overview_update_request = cls(
89
97
  name=name,
90
98
  description=description,
@@ -93,6 +101,7 @@ class OfferingOverviewUpdateRequest:
93
101
  access_url=access_url,
94
102
  getting_started=getting_started,
95
103
  integration_guide=integration_guide,
104
+ slug=slug,
96
105
  )
97
106
 
98
107
  offering_overview_update_request.additional_properties = d
@@ -1,6 +1,6 @@
1
1
  import datetime
2
2
  from collections.abc import Mapping
3
- from typing import Any, TypeVar, Union
3
+ from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
4
4
  from uuid import UUID
5
5
 
6
6
  from attrs import define as _attrs_define
@@ -9,6 +9,10 @@ from dateutil.parser import isoparse
9
9
 
10
10
  from ..types import UNSET, Unset
11
11
 
12
+ if TYPE_CHECKING:
13
+ from ..models.user_consent_info import UserConsentInfo
14
+
15
+
12
16
  T = TypeVar("T", bound="OfferingTermsOfService")
13
17
 
14
18
 
@@ -19,6 +23,8 @@ class OfferingTermsOfService:
19
23
  uuid (UUID):
20
24
  offering_uuid (UUID):
21
25
  offering_name (str):
26
+ user_consent (Union['UserConsentInfo', None]):
27
+ has_user_consent (bool):
22
28
  created (datetime.datetime):
23
29
  modified (datetime.datetime):
24
30
  terms_of_service (Union[Unset, str]):
@@ -32,6 +38,8 @@ class OfferingTermsOfService:
32
38
  uuid: UUID
33
39
  offering_uuid: UUID
34
40
  offering_name: str
41
+ user_consent: Union["UserConsentInfo", None]
42
+ has_user_consent: bool
35
43
  created: datetime.datetime
36
44
  modified: datetime.datetime
37
45
  terms_of_service: Union[Unset, str] = UNSET
@@ -42,12 +50,22 @@ class OfferingTermsOfService:
42
50
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
43
51
 
44
52
  def to_dict(self) -> dict[str, Any]:
53
+ from ..models.user_consent_info import UserConsentInfo
54
+
45
55
  uuid = str(self.uuid)
46
56
 
47
57
  offering_uuid = str(self.offering_uuid)
48
58
 
49
59
  offering_name = self.offering_name
50
60
 
61
+ user_consent: Union[None, dict[str, Any]]
62
+ if isinstance(self.user_consent, UserConsentInfo):
63
+ user_consent = self.user_consent.to_dict()
64
+ else:
65
+ user_consent = self.user_consent
66
+
67
+ has_user_consent = self.has_user_consent
68
+
51
69
  created = self.created.isoformat()
52
70
 
53
71
  modified = self.modified.isoformat()
@@ -69,6 +87,8 @@ class OfferingTermsOfService:
69
87
  "uuid": uuid,
70
88
  "offering_uuid": offering_uuid,
71
89
  "offering_name": offering_name,
90
+ "user_consent": user_consent,
91
+ "has_user_consent": has_user_consent,
72
92
  "created": created,
73
93
  "modified": modified,
74
94
  }
@@ -88,6 +108,8 @@ class OfferingTermsOfService:
88
108
 
89
109
  @classmethod
90
110
  def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
111
+ from ..models.user_consent_info import UserConsentInfo
112
+
91
113
  d = dict(src_dict)
92
114
  uuid = UUID(d.pop("uuid"))
93
115
 
@@ -95,6 +117,23 @@ class OfferingTermsOfService:
95
117
 
96
118
  offering_name = d.pop("offering_name")
97
119
 
120
+ def _parse_user_consent(data: object) -> Union["UserConsentInfo", None]:
121
+ if data is None:
122
+ return data
123
+ try:
124
+ if not isinstance(data, dict):
125
+ raise TypeError()
126
+ user_consent_type_1 = UserConsentInfo.from_dict(data)
127
+
128
+ return user_consent_type_1
129
+ except: # noqa: E722
130
+ pass
131
+ return cast(Union["UserConsentInfo", None], data)
132
+
133
+ user_consent = _parse_user_consent(d.pop("user_consent"))
134
+
135
+ has_user_consent = d.pop("has_user_consent")
136
+
98
137
  created = isoparse(d.pop("created"))
99
138
 
100
139
  modified = isoparse(d.pop("modified"))
@@ -113,6 +152,8 @@ class OfferingTermsOfService:
113
152
  uuid=uuid,
114
153
  offering_uuid=offering_uuid,
115
154
  offering_name=offering_name,
155
+ user_consent=user_consent,
156
+ has_user_consent=has_user_consent,
116
157
  created=created,
117
158
  modified=modified,
118
159
  terms_of_service=terms_of_service,
@@ -39,6 +39,8 @@ class OfferingUser:
39
39
  linking
40
40
  service_provider_comment_url (Union[Unset, str]): URL link for additional information or actions related to
41
41
  service provider comment
42
+ has_consent (Union[Unset, bool]): Check if the user has active consent for this offering.
43
+ requires_reconsent (Union[Unset, bool]): Check if the user needs to re-consent due to ToS changes.
42
44
  """
43
45
 
44
46
  url: Union[Unset, str] = UNSET
@@ -60,6 +62,8 @@ class OfferingUser:
60
62
  state: Union[Unset, OfferingUserStateEnum] = UNSET
61
63
  service_provider_comment: Union[Unset, str] = UNSET
62
64
  service_provider_comment_url: Union[Unset, str] = UNSET
65
+ has_consent: Union[Unset, bool] = UNSET
66
+ requires_reconsent: Union[Unset, bool] = UNSET
63
67
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
64
68
 
65
69
  def to_dict(self) -> dict[str, Any]:
@@ -119,6 +123,10 @@ class OfferingUser:
119
123
 
120
124
  service_provider_comment_url = self.service_provider_comment_url
121
125
 
126
+ has_consent = self.has_consent
127
+
128
+ requires_reconsent = self.requires_reconsent
129
+
122
130
  field_dict: dict[str, Any] = {}
123
131
  field_dict.update(self.additional_properties)
124
132
  field_dict.update({})
@@ -160,6 +168,10 @@ class OfferingUser:
160
168
  field_dict["service_provider_comment"] = service_provider_comment
161
169
  if service_provider_comment_url is not UNSET:
162
170
  field_dict["service_provider_comment_url"] = service_provider_comment_url
171
+ if has_consent is not UNSET:
172
+ field_dict["has_consent"] = has_consent
173
+ if requires_reconsent is not UNSET:
174
+ field_dict["requires_reconsent"] = requires_reconsent
163
175
 
164
176
  return field_dict
165
177
 
@@ -246,6 +258,10 @@ class OfferingUser:
246
258
 
247
259
  service_provider_comment_url = d.pop("service_provider_comment_url", UNSET)
248
260
 
261
+ has_consent = d.pop("has_consent", UNSET)
262
+
263
+ requires_reconsent = d.pop("requires_reconsent", UNSET)
264
+
249
265
  offering_user = cls(
250
266
  url=url,
251
267
  uuid=uuid,
@@ -266,6 +282,8 @@ class OfferingUser:
266
282
  state=state,
267
283
  service_provider_comment=service_provider_comment,
268
284
  service_provider_comment_url=service_provider_comment_url,
285
+ has_consent=has_consent,
286
+ requires_reconsent=requires_reconsent,
269
287
  )
270
288
 
271
289
  offering_user.additional_properties = d
@@ -20,8 +20,6 @@ class OpenStackTenantCreateOrderAttributes:
20
20
  Attributes:
21
21
  name (str):
22
22
  description (Union[Unset, str]):
23
- user_username (Union[Unset, str]): Username of the tenant user
24
- user_password (Union[Unset, str]): Password of the tenant user
25
23
  subnet_cidr (Union[Unset, str]): Default: '192.168.42.0/24'.
26
24
  skip_connection_extnet (Union[Unset, bool]): Default: False.
27
25
  skip_creation_of_default_router (Union[Unset, bool]): Default: False.
@@ -31,8 +29,6 @@ class OpenStackTenantCreateOrderAttributes:
31
29
 
32
30
  name: str
33
31
  description: Union[Unset, str] = UNSET
34
- user_username: Union[Unset, str] = UNSET
35
- user_password: Union[Unset, str] = UNSET
36
32
  subnet_cidr: Union[Unset, str] = "192.168.42.0/24"
37
33
  skip_connection_extnet: Union[Unset, bool] = False
38
34
  skip_creation_of_default_router: Union[Unset, bool] = False
@@ -44,10 +40,6 @@ class OpenStackTenantCreateOrderAttributes:
44
40
 
45
41
  description = self.description
46
42
 
47
- user_username = self.user_username
48
-
49
- user_password = self.user_password
50
-
51
43
  subnet_cidr = self.subnet_cidr
52
44
 
53
45
  skip_connection_extnet = self.skip_connection_extnet
@@ -65,10 +57,6 @@ class OpenStackTenantCreateOrderAttributes:
65
57
  )
66
58
  if description is not UNSET:
67
59
  field_dict["description"] = description
68
- if user_username is not UNSET:
69
- field_dict["user_username"] = user_username
70
- if user_password is not UNSET:
71
- field_dict["user_password"] = user_password
72
60
  if subnet_cidr is not UNSET:
73
61
  field_dict["subnet_cidr"] = subnet_cidr
74
62
  if skip_connection_extnet is not UNSET:
@@ -87,10 +75,6 @@ class OpenStackTenantCreateOrderAttributes:
87
75
 
88
76
  description = d.pop("description", UNSET)
89
77
 
90
- user_username = d.pop("user_username", UNSET)
91
-
92
- user_password = d.pop("user_password", UNSET)
93
-
94
78
  subnet_cidr = d.pop("subnet_cidr", UNSET)
95
79
 
96
80
  skip_connection_extnet = d.pop("skip_connection_extnet", UNSET)
@@ -102,8 +86,6 @@ class OpenStackTenantCreateOrderAttributes:
102
86
  open_stack_tenant_create_order_attributes = cls(
103
87
  name=name,
104
88
  description=description,
105
- user_username=user_username,
106
- user_password=user_password,
107
89
  subnet_cidr=subnet_cidr,
108
90
  skip_connection_extnet=skip_connection_extnet,
109
91
  skip_creation_of_default_router=skip_creation_of_default_router,
@@ -19,6 +19,8 @@ class OpenStackTenantRequest:
19
19
  description (Union[Unset, str]):
20
20
  availability_zone (Union[Unset, str]): Optional availability group. Will be used for all instances provisioned
21
21
  in this tenant
22
+ user_username (Union[Unset, str]): Username of the tenant user
23
+ user_password (Union[Unset, str]): Password of the tenant user
22
24
  subnet_cidr (Union[Unset, str]): Default: '192.168.42.0/24'.
23
25
  default_volume_type_name (Union[Unset, str]): Volume type name to use when creating volumes.
24
26
  """
@@ -28,6 +30,8 @@ class OpenStackTenantRequest:
28
30
  project: str
29
31
  description: Union[Unset, str] = UNSET
30
32
  availability_zone: Union[Unset, str] = UNSET
33
+ user_username: Union[Unset, str] = UNSET
34
+ user_password: Union[Unset, str] = UNSET
31
35
  subnet_cidr: Union[Unset, str] = "192.168.42.0/24"
32
36
  default_volume_type_name: Union[Unset, str] = UNSET
33
37
  additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
@@ -43,6 +47,10 @@ class OpenStackTenantRequest:
43
47
 
44
48
  availability_zone = self.availability_zone
45
49
 
50
+ user_username = self.user_username
51
+
52
+ user_password = self.user_password
53
+
46
54
  subnet_cidr = self.subnet_cidr
47
55
 
48
56
  default_volume_type_name = self.default_volume_type_name
@@ -60,6 +68,10 @@ class OpenStackTenantRequest:
60
68
  field_dict["description"] = description
61
69
  if availability_zone is not UNSET:
62
70
  field_dict["availability_zone"] = availability_zone
71
+ if user_username is not UNSET:
72
+ field_dict["user_username"] = user_username
73
+ if user_password is not UNSET:
74
+ field_dict["user_password"] = user_password
63
75
  if subnet_cidr is not UNSET:
64
76
  field_dict["subnet_cidr"] = subnet_cidr
65
77
  if default_volume_type_name is not UNSET:
@@ -80,6 +92,10 @@ class OpenStackTenantRequest:
80
92
 
81
93
  availability_zone = d.pop("availability_zone", UNSET)
82
94
 
95
+ user_username = d.pop("user_username", UNSET)
96
+
97
+ user_password = d.pop("user_password", UNSET)
98
+
83
99
  subnet_cidr = d.pop("subnet_cidr", UNSET)
84
100
 
85
101
  default_volume_type_name = d.pop("default_volume_type_name", UNSET)
@@ -90,6 +106,8 @@ class OpenStackTenantRequest:
90
106
  project=project,
91
107
  description=description,
92
108
  availability_zone=availability_zone,
109
+ user_username=user_username,
110
+ user_password=user_password,
93
111
  subnet_cidr=subnet_cidr,
94
112
  default_volume_type_name=default_volume_type_name,
95
113
  )