@@ -53,15 +53,20 @@ class ClientOptions(object):
53
53
"""Client Options used to set options on clients.
54
54
55
55
Args:
56
- api_endpoint (str): The desired API endpoint, e.g., compute.googleapis.com
57
- client_cert_source (Callable[[], (bytes, bytes)]): An optional callback
56
+ api_endpoint (Optional[str]): The desired API endpoint, e.g.,
57
+ compute.googleapis.com
58
+ client_cert_source (Optional[Callable[[], (bytes, bytes)]]): A callback
58
59
which returns client certificate bytes and private key bytes both in
59
60
PEM format. ``client_cert_source`` and ``client_encrypted_cert_source``
60
61
are mutually exclusive.
61
- client_encrypted_cert_source (Callable[[], (str, str, bytes)]): An optional
62
- callback which returns client certificate file path, encrypted private
63
- key file path, and the passphrase bytes.``client_cert_source`` and
64
- ``client_encrypted_cert_source`` are mutually exclusive.
62
+ client_encrypted_cert_source (Optional[Callable[[], (str, str, bytes)]]):
63
+ A callback which returns client certificate file path, encrypted
64
+ private key file path, and the passphrase bytes.``client_cert_source``
65
+ and ``client_encrypted_cert_source`` are mutually exclusive.
66
+ quota_project_id (Optional[str]): A project name that a client's
67
+ quota belongs to.
68
+ credentials_file (Optional[str]): A path to a file storing credentials.
69
+ scopes (Optional[Sequence[str]]): OAuth access token override scopes.
65
70
66
71
Raises:
67
72
ValueError: If both ``client_cert_source`` and ``client_encrypted_cert_source``
@@ -73,6 +78,9 @@ def __init__(
73
78
api_endpoint = None ,
74
79
client_cert_source = None ,
75
80
client_encrypted_cert_source = None ,
81
+ quota_project_id = None ,
82
+ credentials_file = None ,
83
+ scopes = None ,
76
84
):
77
85
if client_cert_source and client_encrypted_cert_source :
78
86
raise ValueError (
@@ -81,6 +89,9 @@ def __init__(
81
89
self .api_endpoint = api_endpoint
82
90
self .client_cert_source = client_cert_source
83
91
self .client_encrypted_cert_source = client_encrypted_cert_source
92
+ self .quota_project_id = quota_project_id
93
+ self .credentials_file = credentials_file
94
+ self .scopes = scopes
84
95
85
96
def __repr__ (self ):
86
97
return "ClientOptions: " + repr (self .__dict__ )
@@ -90,7 +101,8 @@ def from_dict(options):
90
101
"""Construct a client options object from a dictionary.
91
102
92
103
Args:
93
- options (dict): A dictionary with client options.
104
+ options (Dict[str, Any]): A dictionary with client options.
105
+ See the docstring for ClientOptions for details on valid arguments.
94
106
"""
95
107
96
108
client_options = ClientOptions ()
0 commit comments