@@ -60,7 +60,7 @@ def __init__(
6060 self ,
6161 api_manager : gcp .api .GcpApiManager ,
6262 project : str ,
63- gfe_debug_header : Optional [ str ] = None ,
63+ gfe_debug_header : str | None = None ,
6464 version : str = "v1" ,
6565 ):
6666 super ().__init__ (api_manager .compute (version ), project )
@@ -80,7 +80,7 @@ def create_health_check(
8080 name : str ,
8181 protocol : HealthCheckProtocol ,
8282 * ,
83- port : Optional [ int ] = None ,
83+ port : int | None = None ,
8484 ) -> "GcpResource" :
8585 if protocol is self .HealthCheckProtocol .TCP :
8686 health_check_field = "tcpHealthCheck"
@@ -146,11 +146,11 @@ def create_backend_service_traffic_director(
146146 self ,
147147 name : str ,
148148 health_check : "GcpResource" ,
149- affinity_header : Optional [ str ] = None ,
150- protocol : Optional [ BackendServiceProtocol ] = None ,
151- subset_size : Optional [ int ] = None ,
152- locality_lb_policies : Optional [ List [dict ]] = None ,
153- outlier_detection : Optional [ dict ] = None ,
149+ affinity_header : str | None = None ,
150+ protocol : BackendServiceProtocol | None = None ,
151+ subset_size : int | None = None ,
152+ locality_lb_policies : List [dict ] | None = None ,
153+ outlier_detection : dict | None = None ,
154154 enable_dualstack : bool = False ,
155155 ) -> "GcpResource" :
156156 if not isinstance (protocol , self .BackendServiceProtocol ):
@@ -201,9 +201,9 @@ def backend_service_patch_backends(
201201 self ,
202202 backend_service ,
203203 backends ,
204- max_rate_per_endpoint : Optional [ int ] = None ,
204+ max_rate_per_endpoint : int | None = None ,
205205 * ,
206- circuit_breakers : Optional [ dict [str , int ]] = None ,
206+ circuit_breakers : dict [str , int ] | None = None ,
207207 ):
208208 if max_rate_per_endpoint is None :
209209 max_rate_per_endpoint = 5
@@ -244,7 +244,7 @@ def create_url_map(
244244 matcher_name : str ,
245245 src_hosts ,
246246 dst_default_backend_service : "GcpResource" ,
247- dst_host_rule_match_backend_service : Optional [ "GcpResource" ] = None ,
247+ dst_host_rule_match_backend_service : "GcpResource" | None = None ,
248248 ) -> "GcpResource" :
249249 if dst_host_rule_match_backend_service is None :
250250 dst_host_rule_match_backend_service = dst_default_backend_service
0 commit comments