graphiant-sdk 25.9.2__py3-none-any.whl → 25.10.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.
Files changed (185) hide show
  1. graphiant_sdk/__init__.py +110 -1212
  2. graphiant_sdk/api/__init__.py +1 -16
  3. graphiant_sdk/api/default_api.py +17843 -12280
  4. graphiant_sdk/api_client.py +5 -5
  5. graphiant_sdk/configuration.py +1 -1
  6. graphiant_sdk/models/__init__.py +55 -1186
  7. graphiant_sdk/models/v1_auth_login_temp_post200_response.py +91 -0
  8. graphiant_sdk/models/v1_auth_login_temp_post_request.py +91 -0
  9. graphiant_sdk/models/v1_b2b_extranet_monitoring_filter_post200_response.py +91 -0
  10. graphiant_sdk/models/v1_b2b_extranet_monitoring_filter_post200_response_filters.py +104 -0
  11. graphiant_sdk/models/v1_b2b_extranet_monitoring_filter_post200_response_filters_customers_inner.py +93 -0
  12. graphiant_sdk/models/v1_b2b_extranet_monitoring_filter_post_request.py +91 -0
  13. graphiant_sdk/models/v1_devices_device_id_config_put_request_core_core_vrf_bgp_neighbors_value_neighbor.py +6 -6
  14. graphiant_sdk/models/v1_devices_device_id_config_put_request_core_core_vrf_bgp_redistribution_value.py +3 -3
  15. graphiant_sdk/models/v1_devices_device_id_config_put_request_edge_site_to_site_vpn_value_site_to_site_vpn.py +3 -3
  16. graphiant_sdk/models/v1_enterprises_get200_response_enterprises_inner.py +3 -1
  17. graphiant_sdk/models/v1_enterprises_patch_request.py +3 -1
  18. graphiant_sdk/models/v1_extranet_b2b_monitoring_peering_service_service_customer_list_post200_response.py +87 -0
  19. graphiant_sdk/models/v1_extranet_b2b_monitoring_peering_service_service_customer_list_post_request.py +95 -0
  20. graphiant_sdk/models/v1_extranets_b2b_general_customers_summary_get200_response.py +95 -0
  21. graphiant_sdk/models/v1_extranets_b2b_general_customers_summary_get200_response_customers_inner.py +104 -0
  22. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_customer_id_consumer_details_get200_response.py +166 -0
  23. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_customer_id_consumer_details_get200_response_ipsec_tunnel_config_inner.py +150 -0
  24. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_customer_id_consumer_details_get200_response_match_details.py +109 -0
  25. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_customer_id_consumer_details_get200_response_match_details_customer.py +94 -0
  26. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_customer_id_consumer_details_get200_response_match_details_service.py +95 -0
  27. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_customer_id_consumer_details_get200_response_match_details_service_prefixes_inner.py +91 -0
  28. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_customer_id_match_details_get200_response.py +95 -0
  29. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_customer_id_match_details_get200_response_details_inner.py +109 -0
  30. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_customer_id_match_details_get200_response_details_inner_customer.py +94 -0
  31. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_customer_id_match_details_get200_response_details_inner_service.py +93 -0
  32. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post200_response.py +109 -0
  33. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post_request.py +123 -0
  34. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post_request_policy_inner.py +89 -0
  35. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn.py +95 -0
  36. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details.py +117 -0
  37. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing.py +97 -0
  38. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp.py +115 -0
  39. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp_address_families_value.py +91 -0
  40. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp_address_families_value_family.py +98 -0
  41. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp_md5_password.py +87 -0
  42. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_static.py +87 -0
  43. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_tunnel1.py +93 -0
  44. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_match_id_match_details_get200_response.py +95 -0
  45. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_match_id_post200_response.py +109 -0
  46. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_match_id_post_request.py +140 -0
  47. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_match_id_post_request_global_object_ops_value.py +87 -0
  48. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_match_id_post_request_policy_inner.py +89 -0
  49. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_match_id_post_request_site_to_site_vpn.py +95 -0
  50. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_match_id_post_request_site_to_site_vpn_ipsec_gateway_details.py +117 -0
  51. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_match_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing.py +97 -0
  52. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_match_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp.py +115 -0
  53. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_match_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp_address_families_value.py +91 -0
  54. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_match_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp_address_families_value_family.py +98 -0
  55. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_match_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp_md5_password.py +87 -0
  56. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_match_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_static.py +87 -0
  57. graphiant_sdk/models/v1_extranets_b2b_peering_consumer_match_id_post_request_site_to_site_vpn_ipsec_gateway_details_tunnel1.py +93 -0
  58. graphiant_sdk/models/v1_extranets_b2b_peering_customer_id_get200_response.py +96 -0
  59. graphiant_sdk/models/v1_extranets_b2b_peering_customer_id_put_request.py +87 -0
  60. graphiant_sdk/models/v1_extranets_b2b_peering_customer_post200_response.py +93 -0
  61. graphiant_sdk/models/v1_extranets_b2b_peering_customer_post_request.py +95 -0
  62. graphiant_sdk/models/v1_extranets_b2b_peering_customer_post_request_invite.py +90 -0
  63. graphiant_sdk/models/v1_extranets_b2b_peering_match_customers_post200_response.py +95 -0
  64. graphiant_sdk/models/v1_extranets_b2b_peering_match_customers_post_request.py +97 -0
  65. graphiant_sdk/models/v1_extranets_b2b_peering_match_customers_post_request_info_inner.py +104 -0
  66. graphiant_sdk/models/v1_extranets_b2b_peering_match_service_to_customer_post200_response.py +97 -0
  67. graphiant_sdk/models/v1_extranets_b2b_peering_match_service_to_customer_post_request.py +93 -0
  68. graphiant_sdk/models/v1_extranets_b2b_peering_match_service_to_customer_post_request_service.py +112 -0
  69. graphiant_sdk/models/v1_extranets_b2b_peering_match_service_to_customer_post_request_service_nat_inner.py +89 -0
  70. graphiant_sdk/models/v1_extranets_b2b_peering_match_service_to_customer_post_request_service_service_prefixes_inner.py +89 -0
  71. graphiant_sdk/models/v1_extranets_b2b_peering_match_service_to_customer_put200_response.py +91 -0
  72. graphiant_sdk/models/v1_extranets_b2b_peering_match_service_to_customer_put_request.py +93 -0
  73. graphiant_sdk/models/v1_extranets_b2b_peering_match_service_to_customer_put_request_service.py +112 -0
  74. graphiant_sdk/models/v1_extranets_b2b_peering_match_service_to_customer_put_request_service_nat_inner.py +89 -0
  75. graphiant_sdk/models/v1_extranets_b2b_peering_match_service_to_customer_put_request_service_service_prefixes_inner.py +89 -0
  76. graphiant_sdk/models/v1_extranets_b2b_peering_match_services_summary_get200_response.py +95 -0
  77. graphiant_sdk/models/v1_extranets_b2b_peering_match_services_summary_get200_response_services_inner.py +104 -0
  78. graphiant_sdk/models/v1_extranets_b2b_peering_producer_id_get200_response.py +95 -0
  79. graphiant_sdk/models/v1_extranets_b2b_peering_producer_id_matching_customers_summary_get200_response.py +95 -0
  80. graphiant_sdk/models/v1_extranets_b2b_peering_producer_id_matching_customers_summary_get200_response_info_inner.py +104 -0
  81. graphiant_sdk/models/v1_extranets_b2b_peering_producer_id_put_request.py +91 -0
  82. graphiant_sdk/models/v1_extranets_b2b_peering_producer_post200_response.py +93 -0
  83. graphiant_sdk/models/v1_extranets_b2b_peering_producer_post200_response_policy.py +93 -0
  84. graphiant_sdk/models/v1_extranets_b2b_peering_producer_post_request.py +95 -0
  85. graphiant_sdk/models/v1_extranets_b2b_peering_producer_post_request_policy.py +126 -0
  86. graphiant_sdk/models/v1_extranets_b2b_post_request_policy.py +48 -2
  87. graphiant_sdk/models/v1_extranets_b2b_post_request_policy_global_object_device_summaries_value.py +95 -0
  88. graphiant_sdk/models/v1_extranets_b2b_post_request_policy_global_object_device_summaries_value_routing_policies_inner.py +114 -0
  89. graphiant_sdk/models/v1_extranets_b2b_producers_summary_get200_response_info_inner.py +16 -3
  90. graphiant_sdk/models/v1_extranets_get200_response_policies_inner_branches_excluded_devices_inner_ipsec_tunnels_inner.py +3 -3
  91. graphiant_sdk/models/v1_extranets_get200_response_policies_inner_branches_excluded_devices_inner_region.py +5 -3
  92. graphiant_sdk/models/v1_gateways_guest_consumer_get200_response.py +91 -0
  93. graphiant_sdk/models/v1_gateways_guest_consumer_match_id_get200_response.py +103 -0
  94. graphiant_sdk/models/v1_gateways_put_request_details.py +3 -3
  95. graphiant_sdk/models/v1_global_config_patch_request_snmps_value_config_notify_filter_profiles_value_notify_filter_profile.py +3 -3
  96. graphiant_sdk/models/v1_groups_get200_response_groups_inner_permissions.py +3 -1
  97. graphiant_sdk/models/v1_invitation_email_post_request.py +97 -0
  98. graphiant_sdk/models/v1_temp_password_put_request.py +93 -0
  99. graphiant_sdk/models/v2_assistant_conversation_interface_state_get200_response.py +87 -0
  100. {graphiant_sdk-25.9.2.dist-info → graphiant_sdk-25.10.2.dist-info}/METADATA +3 -4
  101. {graphiant_sdk-25.9.2.dist-info → graphiant_sdk-25.10.2.dist-info}/RECORD +185 -23
  102. test/test_v1_auth_login_temp_post200_response.py +53 -0
  103. test/test_v1_auth_login_temp_post_request.py +52 -0
  104. test/test_v1_b2b_extranet_monitoring_filter_post200_response.py +65 -0
  105. test/test_v1_b2b_extranet_monitoring_filter_post200_response_filters.py +64 -0
  106. test/test_v1_b2b_extranet_monitoring_filter_post200_response_filters_customers_inner.py +54 -0
  107. test/test_v1_b2b_extranet_monitoring_filter_post_request.py +53 -0
  108. test/test_v1_extranet_b2b_monitoring_peering_service_service_customer_list_post200_response.py +53 -0
  109. test/test_v1_extranet_b2b_monitoring_peering_service_service_customer_list_post_request.py +60 -0
  110. test/test_v1_extranets_b2b_general_customers_summary_get200_response.py +64 -0
  111. test/test_v1_extranets_b2b_general_customers_summary_get200_response_customers_inner.py +61 -0
  112. test/test_v1_extranets_b2b_peering_consumer_customer_id_consumer_details_get200_response.py +224 -0
  113. test/test_v1_extranets_b2b_peering_consumer_customer_id_consumer_details_get200_response_ipsec_tunnel_config_inner.py +82 -0
  114. test/test_v1_extranets_b2b_peering_consumer_customer_id_consumer_details_get200_response_match_details.py +74 -0
  115. test/test_v1_extranets_b2b_peering_consumer_customer_id_consumer_details_get200_response_match_details_customer.py +56 -0
  116. test/test_v1_extranets_b2b_peering_consumer_customer_id_consumer_details_get200_response_match_details_service.py +57 -0
  117. test/test_v1_extranets_b2b_peering_consumer_customer_id_consumer_details_get200_response_match_details_service_prefixes_inner.py +53 -0
  118. test/test_v1_extranets_b2b_peering_consumer_customer_id_match_details_get200_response.py +75 -0
  119. test/test_v1_extranets_b2b_peering_consumer_customer_id_match_details_get200_response_details_inner.py +72 -0
  120. test/test_v1_extranets_b2b_peering_consumer_customer_id_match_details_get200_response_details_inner_customer.py +56 -0
  121. test/test_v1_extranets_b2b_peering_consumer_customer_id_match_details_get200_response_details_inner_service.py +56 -0
  122. test/test_v1_extranets_b2b_peering_consumer_id_post200_response.py +74 -0
  123. test/test_v1_extranets_b2b_peering_consumer_id_post_request.py +123 -0
  124. test/test_v1_extranets_b2b_peering_consumer_id_post_request_policy_inner.py +54 -0
  125. test/test_v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn.py +92 -0
  126. test/test_v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details.py +87 -0
  127. test/test_v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing.py +69 -0
  128. test/test_v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp.py +64 -0
  129. test/test_v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp_address_families_value.py +56 -0
  130. test/test_v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp_address_families_value_family.py +55 -0
  131. test/test_v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp_md5_password.py +51 -0
  132. test/test_v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_static.py +53 -0
  133. test/test_v1_extranets_b2b_peering_consumer_id_post_request_site_to_site_vpn_ipsec_gateway_details_tunnel1.py +54 -0
  134. test/test_v1_extranets_b2b_peering_consumer_match_id_match_details_get200_response.py +77 -0
  135. test/test_v1_extranets_b2b_peering_consumer_match_id_post200_response.py +74 -0
  136. test/test_v1_extranets_b2b_peering_consumer_match_id_post_request.py +130 -0
  137. test/test_v1_extranets_b2b_peering_consumer_match_id_post_request_global_object_ops_value.py +53 -0
  138. test/test_v1_extranets_b2b_peering_consumer_match_id_post_request_policy_inner.py +54 -0
  139. test/test_v1_extranets_b2b_peering_consumer_match_id_post_request_site_to_site_vpn.py +92 -0
  140. test/test_v1_extranets_b2b_peering_consumer_match_id_post_request_site_to_site_vpn_ipsec_gateway_details.py +87 -0
  141. test/test_v1_extranets_b2b_peering_consumer_match_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing.py +69 -0
  142. test/test_v1_extranets_b2b_peering_consumer_match_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp.py +64 -0
  143. test/test_v1_extranets_b2b_peering_consumer_match_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp_address_families_value.py +56 -0
  144. test/test_v1_extranets_b2b_peering_consumer_match_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp_address_families_value_family.py +55 -0
  145. test/test_v1_extranets_b2b_peering_consumer_match_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_bgp_md5_password.py +51 -0
  146. test/test_v1_extranets_b2b_peering_consumer_match_id_post_request_site_to_site_vpn_ipsec_gateway_details_routing_static.py +53 -0
  147. test/test_v1_extranets_b2b_peering_consumer_match_id_post_request_site_to_site_vpn_ipsec_gateway_details_tunnel1.py +54 -0
  148. test/test_v1_extranets_b2b_peering_customer_id_get200_response.py +57 -0
  149. test/test_v1_extranets_b2b_peering_customer_id_put_request.py +51 -0
  150. test/test_v1_extranets_b2b_peering_customer_post200_response.py +56 -0
  151. test/test_v1_extranets_b2b_peering_customer_post_request.py +57 -0
  152. test/test_v1_extranets_b2b_peering_customer_post_request_invite.py +54 -0
  153. test/test_v1_extranets_b2b_peering_match_customers_post200_response.py +64 -0
  154. test/test_v1_extranets_b2b_peering_match_customers_post_request.py +65 -0
  155. test/test_v1_extranets_b2b_peering_match_customers_post_request_info_inner.py +61 -0
  156. test/test_v1_extranets_b2b_peering_match_service_to_customer_post200_response.py +66 -0
  157. test/test_v1_extranets_b2b_peering_match_service_to_customer_post_request.py +65 -0
  158. test/test_v1_extranets_b2b_peering_match_service_to_customer_post_request_service.py +63 -0
  159. test/test_v1_extranets_b2b_peering_match_service_to_customer_post_request_service_nat_inner.py +52 -0
  160. test/test_v1_extranets_b2b_peering_match_service_to_customer_post_request_service_service_prefixes_inner.py +52 -0
  161. test/test_v1_extranets_b2b_peering_match_service_to_customer_put200_response.py +64 -0
  162. test/test_v1_extranets_b2b_peering_match_service_to_customer_put_request.py +65 -0
  163. test/test_v1_extranets_b2b_peering_match_service_to_customer_put_request_service.py +63 -0
  164. test/test_v1_extranets_b2b_peering_match_service_to_customer_put_request_service_nat_inner.py +52 -0
  165. test/test_v1_extranets_b2b_peering_match_service_to_customer_put_request_service_service_prefixes_inner.py +52 -0
  166. test/test_v1_extranets_b2b_peering_match_services_summary_get200_response.py +62 -0
  167. test/test_v1_extranets_b2b_peering_match_services_summary_get200_response_services_inner.py +59 -0
  168. test/test_v1_extranets_b2b_peering_producer_id_get200_response.py +80 -0
  169. test/test_v1_extranets_b2b_peering_producer_id_matching_customers_summary_get200_response.py +64 -0
  170. test/test_v1_extranets_b2b_peering_producer_id_matching_customers_summary_get200_response_info_inner.py +61 -0
  171. test/test_v1_extranets_b2b_peering_producer_id_put_request.py +76 -0
  172. test/test_v1_extranets_b2b_peering_producer_post200_response.py +79 -0
  173. test/test_v1_extranets_b2b_peering_producer_post200_response_policy.py +77 -0
  174. test/test_v1_extranets_b2b_peering_producer_post_request.py +78 -0
  175. test/test_v1_extranets_b2b_peering_producer_post_request_policy.py +75 -0
  176. test/test_v1_extranets_b2b_post_request_policy_global_object_device_summaries_value.py +67 -0
  177. test/test_v1_extranets_b2b_post_request_policy_global_object_device_summaries_value_routing_policies_inner.py +64 -0
  178. test/test_v1_gateways_guest_consumer_get200_response.py +93 -0
  179. test/test_v1_gateways_guest_consumer_match_id_get200_response.py +131 -0
  180. test/test_v1_invitation_email_post_request.py +55 -0
  181. test/test_v1_temp_password_put_request.py +55 -0
  182. test/test_v2_assistant_conversation_interface_state_get200_response.py +51 -0
  183. {graphiant_sdk-25.9.2.dist-info → graphiant_sdk-25.10.2.dist-info}/WHEEL +0 -0
  184. {graphiant_sdk-25.9.2.dist-info → graphiant_sdk-25.10.2.dist-info}/licenses/LICENSE +0 -0
  185. {graphiant_sdk-25.9.2.dist-info → graphiant_sdk-25.10.2.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,93 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Graphiant APIs
5
+
6
+ Graphiant API documentation.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictInt
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from graphiant_sdk.models.v1_extranets_b2b_peering_match_service_to_customer_post_request_service import V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequestService
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequest(BaseModel):
27
+ """
28
+ V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequest
29
+ """ # noqa: E501
30
+ id: Optional[StrictInt] = None
31
+ service: Optional[V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequestService] = None
32
+ __properties: ClassVar[List[str]] = ["id", "service"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequest from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
57
+
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
60
+
61
+ * `None` is only added to the output dict for nullable fields that
62
+ were set at model initialization. Other fields with value `None`
63
+ are ignored.
64
+ """
65
+ excluded_fields: Set[str] = set([
66
+ ])
67
+
68
+ _dict = self.model_dump(
69
+ by_alias=True,
70
+ exclude=excluded_fields,
71
+ exclude_none=True,
72
+ )
73
+ # override the default output from pydantic by calling `to_dict()` of service
74
+ if self.service:
75
+ _dict['service'] = self.service.to_dict()
76
+ return _dict
77
+
78
+ @classmethod
79
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
80
+ """Create an instance of V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequest from a dict"""
81
+ if obj is None:
82
+ return None
83
+
84
+ if not isinstance(obj, dict):
85
+ return cls.model_validate(obj)
86
+
87
+ _obj = cls.model_validate({
88
+ "id": obj.get("id"),
89
+ "service": V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequestService.from_dict(obj["service"]) if obj.get("service") is not None else None
90
+ })
91
+ return _obj
92
+
93
+
@@ -0,0 +1,112 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Graphiant APIs
5
+
6
+ Graphiant API documentation.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing_extensions import Annotated
23
+ from graphiant_sdk.models.v1_extranets_b2b_peering_match_service_to_customer_post_request_service_nat_inner import V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequestServiceNatInner
24
+ from graphiant_sdk.models.v1_extranets_b2b_peering_match_service_to_customer_post_request_service_service_prefixes_inner import V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequestServiceServicePrefixesInner
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequestService(BaseModel):
29
+ """
30
+ V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequestService
31
+ """ # noqa: E501
32
+ id: Optional[StrictInt] = None
33
+ lan_segment: Optional[StrictInt] = Field(default=None, alias="lanSegment")
34
+ nat: Optional[List[V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequestServiceNatInner]] = None
35
+ num_customers: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, alias="numCustomers")
36
+ service_prefixes: Optional[List[V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequestServiceServicePrefixesInner]] = Field(default=None, alias="servicePrefixes")
37
+ __properties: ClassVar[List[str]] = ["id", "lanSegment", "nat", "numCustomers", "servicePrefixes"]
38
+
39
+ model_config = ConfigDict(
40
+ populate_by_name=True,
41
+ validate_assignment=True,
42
+ protected_namespaces=(),
43
+ )
44
+
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.model_dump(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
53
+ return json.dumps(self.to_dict())
54
+
55
+ @classmethod
56
+ def from_json(cls, json_str: str) -> Optional[Self]:
57
+ """Create an instance of V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequestService from a JSON string"""
58
+ return cls.from_dict(json.loads(json_str))
59
+
60
+ def to_dict(self) -> Dict[str, Any]:
61
+ """Return the dictionary representation of the model using alias.
62
+
63
+ This has the following differences from calling pydantic's
64
+ `self.model_dump(by_alias=True)`:
65
+
66
+ * `None` is only added to the output dict for nullable fields that
67
+ were set at model initialization. Other fields with value `None`
68
+ are ignored.
69
+ """
70
+ excluded_fields: Set[str] = set([
71
+ ])
72
+
73
+ _dict = self.model_dump(
74
+ by_alias=True,
75
+ exclude=excluded_fields,
76
+ exclude_none=True,
77
+ )
78
+ # override the default output from pydantic by calling `to_dict()` of each item in nat (list)
79
+ _items = []
80
+ if self.nat:
81
+ for _item_nat in self.nat:
82
+ if _item_nat:
83
+ _items.append(_item_nat.to_dict())
84
+ _dict['nat'] = _items
85
+ # override the default output from pydantic by calling `to_dict()` of each item in service_prefixes (list)
86
+ _items = []
87
+ if self.service_prefixes:
88
+ for _item_service_prefixes in self.service_prefixes:
89
+ if _item_service_prefixes:
90
+ _items.append(_item_service_prefixes.to_dict())
91
+ _dict['servicePrefixes'] = _items
92
+ return _dict
93
+
94
+ @classmethod
95
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
96
+ """Create an instance of V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequestService from a dict"""
97
+ if obj is None:
98
+ return None
99
+
100
+ if not isinstance(obj, dict):
101
+ return cls.model_validate(obj)
102
+
103
+ _obj = cls.model_validate({
104
+ "id": obj.get("id"),
105
+ "lanSegment": obj.get("lanSegment"),
106
+ "nat": [V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequestServiceNatInner.from_dict(_item) for _item in obj["nat"]] if obj.get("nat") is not None else None,
107
+ "numCustomers": obj.get("numCustomers"),
108
+ "servicePrefixes": [V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequestServiceServicePrefixesInner.from_dict(_item) for _item in obj["servicePrefixes"]] if obj.get("servicePrefixes") is not None else None
109
+ })
110
+ return _obj
111
+
112
+
@@ -0,0 +1,89 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Graphiant APIs
5
+
6
+ Graphiant API documentation.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequestServiceNatInner(BaseModel):
26
+ """
27
+ V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequestServiceNatInner
28
+ """ # noqa: E501
29
+ outside_nat_prefix: Optional[StrictStr] = Field(default=None, alias="outsideNatPrefix")
30
+ prefix: Optional[StrictStr] = None
31
+ __properties: ClassVar[List[str]] = ["outsideNatPrefix", "prefix"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequestServiceNatInner from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ return _dict
73
+
74
+ @classmethod
75
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
+ """Create an instance of V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequestServiceNatInner from a dict"""
77
+ if obj is None:
78
+ return None
79
+
80
+ if not isinstance(obj, dict):
81
+ return cls.model_validate(obj)
82
+
83
+ _obj = cls.model_validate({
84
+ "outsideNatPrefix": obj.get("outsideNatPrefix"),
85
+ "prefix": obj.get("prefix")
86
+ })
87
+ return _obj
88
+
89
+
@@ -0,0 +1,89 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Graphiant APIs
5
+
6
+ Graphiant API documentation.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequestServiceServicePrefixesInner(BaseModel):
26
+ """
27
+ V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequestServiceServicePrefixesInner
28
+ """ # noqa: E501
29
+ prefix: Optional[StrictStr] = None
30
+ tag: Optional[StrictStr] = None
31
+ __properties: ClassVar[List[str]] = ["prefix", "tag"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequestServiceServicePrefixesInner from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ return _dict
73
+
74
+ @classmethod
75
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
+ """Create an instance of V1ExtranetsB2bPeeringMatchServiceToCustomerPostRequestServiceServicePrefixesInner from a dict"""
77
+ if obj is None:
78
+ return None
79
+
80
+ if not isinstance(obj, dict):
81
+ return cls.model_validate(obj)
82
+
83
+ _obj = cls.model_validate({
84
+ "prefix": obj.get("prefix"),
85
+ "tag": obj.get("tag")
86
+ })
87
+ return _obj
88
+
89
+
@@ -0,0 +1,91 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Graphiant APIs
5
+
6
+ Graphiant API documentation.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from graphiant_sdk.models.v1_extranets_b2b_peering_match_service_to_customer_put_request_service import V1ExtranetsB2bPeeringMatchServiceToCustomerPutRequestService
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class V1ExtranetsB2bPeeringMatchServiceToCustomerPut200Response(BaseModel):
27
+ """
28
+ V1ExtranetsB2bPeeringMatchServiceToCustomerPut200Response
29
+ """ # noqa: E501
30
+ service: Optional[V1ExtranetsB2bPeeringMatchServiceToCustomerPutRequestService] = None
31
+ __properties: ClassVar[List[str]] = ["service"]
32
+
33
+ model_config = ConfigDict(
34
+ populate_by_name=True,
35
+ validate_assignment=True,
36
+ protected_namespaces=(),
37
+ )
38
+
39
+
40
+ def to_str(self) -> str:
41
+ """Returns the string representation of the model using alias"""
42
+ return pprint.pformat(self.model_dump(by_alias=True))
43
+
44
+ def to_json(self) -> str:
45
+ """Returns the JSON representation of the model using alias"""
46
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> Optional[Self]:
51
+ """Create an instance of V1ExtranetsB2bPeeringMatchServiceToCustomerPut200Response from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self) -> Dict[str, Any]:
55
+ """Return the dictionary representation of the model using alias.
56
+
57
+ This has the following differences from calling pydantic's
58
+ `self.model_dump(by_alias=True)`:
59
+
60
+ * `None` is only added to the output dict for nullable fields that
61
+ were set at model initialization. Other fields with value `None`
62
+ are ignored.
63
+ """
64
+ excluded_fields: Set[str] = set([
65
+ ])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ # override the default output from pydantic by calling `to_dict()` of service
73
+ if self.service:
74
+ _dict['service'] = self.service.to_dict()
75
+ return _dict
76
+
77
+ @classmethod
78
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79
+ """Create an instance of V1ExtranetsB2bPeeringMatchServiceToCustomerPut200Response from a dict"""
80
+ if obj is None:
81
+ return None
82
+
83
+ if not isinstance(obj, dict):
84
+ return cls.model_validate(obj)
85
+
86
+ _obj = cls.model_validate({
87
+ "service": V1ExtranetsB2bPeeringMatchServiceToCustomerPutRequestService.from_dict(obj["service"]) if obj.get("service") is not None else None
88
+ })
89
+ return _obj
90
+
91
+
@@ -0,0 +1,93 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Graphiant APIs
5
+
6
+ Graphiant API documentation.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictInt
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from graphiant_sdk.models.v1_extranets_b2b_peering_match_service_to_customer_put_request_service import V1ExtranetsB2bPeeringMatchServiceToCustomerPutRequestService
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class V1ExtranetsB2bPeeringMatchServiceToCustomerPutRequest(BaseModel):
27
+ """
28
+ V1ExtranetsB2bPeeringMatchServiceToCustomerPutRequest
29
+ """ # noqa: E501
30
+ id: Optional[StrictInt] = None
31
+ service: Optional[V1ExtranetsB2bPeeringMatchServiceToCustomerPutRequestService] = None
32
+ __properties: ClassVar[List[str]] = ["id", "service"]
33
+
34
+ model_config = ConfigDict(
35
+ populate_by_name=True,
36
+ validate_assignment=True,
37
+ protected_namespaces=(),
38
+ )
39
+
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.model_dump(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of V1ExtranetsB2bPeeringMatchServiceToCustomerPutRequest from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
57
+
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
60
+
61
+ * `None` is only added to the output dict for nullable fields that
62
+ were set at model initialization. Other fields with value `None`
63
+ are ignored.
64
+ """
65
+ excluded_fields: Set[str] = set([
66
+ ])
67
+
68
+ _dict = self.model_dump(
69
+ by_alias=True,
70
+ exclude=excluded_fields,
71
+ exclude_none=True,
72
+ )
73
+ # override the default output from pydantic by calling `to_dict()` of service
74
+ if self.service:
75
+ _dict['service'] = self.service.to_dict()
76
+ return _dict
77
+
78
+ @classmethod
79
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
80
+ """Create an instance of V1ExtranetsB2bPeeringMatchServiceToCustomerPutRequest from a dict"""
81
+ if obj is None:
82
+ return None
83
+
84
+ if not isinstance(obj, dict):
85
+ return cls.model_validate(obj)
86
+
87
+ _obj = cls.model_validate({
88
+ "id": obj.get("id"),
89
+ "service": V1ExtranetsB2bPeeringMatchServiceToCustomerPutRequestService.from_dict(obj["service"]) if obj.get("service") is not None else None
90
+ })
91
+ return _obj
92
+
93
+
@@ -0,0 +1,112 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Graphiant APIs
5
+
6
+ Graphiant API documentation.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing_extensions import Annotated
23
+ from graphiant_sdk.models.v1_extranets_b2b_peering_match_service_to_customer_put_request_service_nat_inner import V1ExtranetsB2bPeeringMatchServiceToCustomerPutRequestServiceNatInner
24
+ from graphiant_sdk.models.v1_extranets_b2b_peering_match_service_to_customer_put_request_service_service_prefixes_inner import V1ExtranetsB2bPeeringMatchServiceToCustomerPutRequestServiceServicePrefixesInner
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class V1ExtranetsB2bPeeringMatchServiceToCustomerPutRequestService(BaseModel):
29
+ """
30
+ V1ExtranetsB2bPeeringMatchServiceToCustomerPutRequestService
31
+ """ # noqa: E501
32
+ id: Optional[StrictInt] = None
33
+ lan_segment: Optional[StrictInt] = Field(default=None, alias="lanSegment")
34
+ nat: Optional[List[V1ExtranetsB2bPeeringMatchServiceToCustomerPutRequestServiceNatInner]] = None
35
+ num_customers: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, alias="numCustomers")
36
+ service_prefixes: Optional[List[V1ExtranetsB2bPeeringMatchServiceToCustomerPutRequestServiceServicePrefixesInner]] = Field(default=None, alias="servicePrefixes")
37
+ __properties: ClassVar[List[str]] = ["id", "lanSegment", "nat", "numCustomers", "servicePrefixes"]
38
+
39
+ model_config = ConfigDict(
40
+ populate_by_name=True,
41
+ validate_assignment=True,
42
+ protected_namespaces=(),
43
+ )
44
+
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.model_dump(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
53
+ return json.dumps(self.to_dict())
54
+
55
+ @classmethod
56
+ def from_json(cls, json_str: str) -> Optional[Self]:
57
+ """Create an instance of V1ExtranetsB2bPeeringMatchServiceToCustomerPutRequestService from a JSON string"""
58
+ return cls.from_dict(json.loads(json_str))
59
+
60
+ def to_dict(self) -> Dict[str, Any]:
61
+ """Return the dictionary representation of the model using alias.
62
+
63
+ This has the following differences from calling pydantic's
64
+ `self.model_dump(by_alias=True)`:
65
+
66
+ * `None` is only added to the output dict for nullable fields that
67
+ were set at model initialization. Other fields with value `None`
68
+ are ignored.
69
+ """
70
+ excluded_fields: Set[str] = set([
71
+ ])
72
+
73
+ _dict = self.model_dump(
74
+ by_alias=True,
75
+ exclude=excluded_fields,
76
+ exclude_none=True,
77
+ )
78
+ # override the default output from pydantic by calling `to_dict()` of each item in nat (list)
79
+ _items = []
80
+ if self.nat:
81
+ for _item_nat in self.nat:
82
+ if _item_nat:
83
+ _items.append(_item_nat.to_dict())
84
+ _dict['nat'] = _items
85
+ # override the default output from pydantic by calling `to_dict()` of each item in service_prefixes (list)
86
+ _items = []
87
+ if self.service_prefixes:
88
+ for _item_service_prefixes in self.service_prefixes:
89
+ if _item_service_prefixes:
90
+ _items.append(_item_service_prefixes.to_dict())
91
+ _dict['servicePrefixes'] = _items
92
+ return _dict
93
+
94
+ @classmethod
95
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
96
+ """Create an instance of V1ExtranetsB2bPeeringMatchServiceToCustomerPutRequestService from a dict"""
97
+ if obj is None:
98
+ return None
99
+
100
+ if not isinstance(obj, dict):
101
+ return cls.model_validate(obj)
102
+
103
+ _obj = cls.model_validate({
104
+ "id": obj.get("id"),
105
+ "lanSegment": obj.get("lanSegment"),
106
+ "nat": [V1ExtranetsB2bPeeringMatchServiceToCustomerPutRequestServiceNatInner.from_dict(_item) for _item in obj["nat"]] if obj.get("nat") is not None else None,
107
+ "numCustomers": obj.get("numCustomers"),
108
+ "servicePrefixes": [V1ExtranetsB2bPeeringMatchServiceToCustomerPutRequestServiceServicePrefixesInner.from_dict(_item) for _item in obj["servicePrefixes"]] if obj.get("servicePrefixes") is not None else None
109
+ })
110
+ return _obj
111
+
112
+