@@ -104,7 +104,9 @@ def __dir__(self) -> Tuple[str]:
104104
105105 return self ._enums
106106
107- def __getattr__ (self , name : str ) -> Union [ProtoPlusMessageType , ProtobufMessageType ]:
107+ def __getattr__ (
108+ self , name : str
109+ ) -> Union [ProtoPlusMessageType , ProtobufMessageType ]:
108110 """Dynamically loads the given enum class instance.
109111
110112 Args:
@@ -162,10 +164,10 @@ class GoogleAdsClient:
162164
163165 @classmethod
164166 def copy_from (
165- cls ,
166- destination : Union [ProtoPlusMessageType , ProtobufMessageType ],
167- origin : Union [ProtoPlusMessageType , ProtobufMessageType ]
168- ) -> Union [ProtoPlusMessageType , ProtobufMessageType ]:
167+ cls ,
168+ destination : Union [ProtoPlusMessageType , ProtobufMessageType ],
169+ origin : Union [ProtoPlusMessageType , ProtobufMessageType ],
170+ ) -> Union [ProtoPlusMessageType , ProtobufMessageType ]:
169171 """Copies protobuf and proto-plus messages into one-another.
170172
171173 This method consolidates the CopyFrom logic of protobuf and proto-plus
@@ -204,7 +206,7 @@ def _get_client_kwargs(cls, config_data: Dict[str, Any]) -> Dict[str, Any]:
204206 "use_cloud_org_for_api_access" : config_data .get (
205207 "use_cloud_org_for_api_access"
206208 ),
207- "gaada " : config_data .get ("gaada " ),
209+ "ads_assistant " : config_data .get ("ads_assistant " ),
208210 }
209211
210212 @classmethod
@@ -267,7 +269,9 @@ def load_from_string(
267269 Raises:
268270 ValueError: If the configuration lacks a required field.
269271 """
270- config_data : Dict [str , Any ] = config .parse_yaml_document_to_dict (yaml_str )
272+ config_data : Dict [str , Any ] = config .parse_yaml_document_to_dict (
273+ yaml_str
274+ )
271275 kwargs : Dict [str , Any ] = cls ._get_client_kwargs (config_data )
272276 return cls (** dict (version = version , ** kwargs ))
273277
@@ -329,7 +333,7 @@ def __init__(
329333 http_proxy : Union [str , None ] = None ,
330334 use_proto_plus : bool = False ,
331335 use_cloud_org_for_api_access : Union [str , None ] = None ,
332- gaada : Union [str , None ] = None ,
336+ ads_assistant : Union [str , None ] = None ,
333337 ):
334338 """Initializer for the GoogleAdsClient.
335339
@@ -349,7 +353,7 @@ def __init__(
349353 of developer token to determine your Google Ads API access
350354 levels. Use this flag only if you are enrolled into a limited
351355 pilot that supports this configuration.
352- gaada : a str specifying the Google Ads API Assistant version.
356+ ads_assistant : a str specifying the Google Ads API Assistant version.
353357 """
354358 if logging_config :
355359 logging .config .dictConfig (logging_config )
@@ -366,7 +370,7 @@ def __init__(
366370 use_cloud_org_for_api_access
367371 )
368372 self .enums : _EnumGetter = _EnumGetter (self )
369- self .gaada : Union [str , None ] = gaada
373+ self ._ads_assistant : Union [str , None ] = ads_assistant
370374
371375 # If given, write the http_proxy channel option for GRPC to use
372376 if http_proxy :
@@ -403,9 +407,7 @@ def get_service(
403407 # override any version specified as an argument.
404408 version = self .version if self .version else version
405409 # api_module = self._get_api_services_by_version(version)
406- services_path : str = (
407- f"google.ads.googleads.{ version } .services.services"
408- )
410+ services_path : str = f"google.ads.googleads.{ version } .services.services"
409411 snaked : str = util .convert_upper_case_to_snake_case (name )
410412 interceptors = interceptors or []
411413
@@ -446,14 +448,14 @@ def get_service(
446448 self .login_customer_id ,
447449 self .linked_customer_id ,
448450 self .use_cloud_org_for_api_access ,
449- gaada = self .gaada ,
451+ ads_assistant = self ._ads_assistant ,
450452 ),
451453 AsyncUnaryStreamMetadataInterceptor (
452454 self .developer_token ,
453455 self .login_customer_id ,
454456 self .linked_customer_id ,
455457 self .use_cloud_org_for_api_access ,
456- gaada = self .gaada ,
458+ ads_assistant = self ._ads_assistant ,
457459 ),
458460 AsyncUnaryUnaryLoggingInterceptor (_logger , version , endpoint ),
459461 AsyncUnaryStreamLoggingInterceptor (_logger , version , endpoint ),
@@ -485,7 +487,7 @@ def get_service(
485487 developer_token = self .developer_token ,
486488 login_customer_id = self .login_customer_id ,
487489 linked_customer_id = self .linked_customer_id ,
488- use_cloud_org_for_api_access = self .use_cloud_org_for_api_access
490+ use_cloud_org_for_api_access = self .use_cloud_org_for_api_access ,
489491 )
490492
491493 return service_client_class (transport = service_transport )
@@ -496,18 +498,21 @@ def get_service(
496498 options = _GRPC_CHANNEL_OPTIONS ,
497499 )
498500
499- interceptors : List [Union [grpc .UnaryUnaryClientInterceptor , grpc .UnaryStreamClientInterceptor ]] = interceptors + [
501+ interceptors : List [
502+ Union [
503+ grpc .UnaryUnaryClientInterceptor ,
504+ grpc .UnaryStreamClientInterceptor ,
505+ ]
506+ ] = interceptors + [
500507 MetadataInterceptor (
501508 self .developer_token ,
502509 self .login_customer_id ,
503510 self .linked_customer_id ,
504511 self .use_cloud_org_for_api_access ,
505- gaada = self .gaada ,
512+ ads_assistant = self ._ads_assistant ,
506513 ),
507514 LoggingInterceptor (_logger , version , endpoint ),
508- ExceptionInterceptor (
509- version , use_proto_plus = self .use_proto_plus
510- ),
515+ ExceptionInterceptor (version , use_proto_plus = self .use_proto_plus ),
511516 ]
512517
513518 channel : grpc .Channel = grpc .intercept_channel (channel , * interceptors )
@@ -525,12 +530,14 @@ def get_service(
525530 developer_token = self .developer_token ,
526531 login_customer_id = self .login_customer_id ,
527532 linked_customer_id = self .linked_customer_id ,
528- use_cloud_org_for_api_access = self .use_cloud_org_for_api_access
533+ use_cloud_org_for_api_access = self .use_cloud_org_for_api_access ,
529534 )
530535
531536 return service_client_class (transport = service_transport )
532537
533- def get_type (self , name : str , version : str = _DEFAULT_VERSION ) -> Union [ProtoPlusMessageType , ProtobufMessageType ]:
538+ def get_type (
539+ self , name : str , version : str = _DEFAULT_VERSION
540+ ) -> Union [ProtoPlusMessageType , ProtobufMessageType ]:
534541 """Returns the specified common, enum, error, or resource type.
535542
536543 Args:
0 commit comments