We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[runtimeconfig] typo: "config.get_variable(...)"
https://github.com/GoogleCloudPlatform/google-cloud-python/blob/bee32c0ae68b1e6cf224f9017c758a8e31e8be83/runtimeconfig/google/cloud/runtimeconfig/config.py#L190
[runtimeconfig] Should be "client.config(...)" not "client.get_config(...)
https://github.com/GoogleCloudPlatform/google-cloud-python/blob/bee32c0ae68b1e6cf224f9017c758a8e31e8be83/runtimeconfig/google/cloud/runtimeconfig/config.py#L189

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `runtimeconfig/google/cloud/runtimeconfig/config.py`
Content:
```
1 # Copyright 2016 Google Inc.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 
15 """Create / interact with Google Cloud RuntimeConfig configs."""
16 
17 from google.api.core import page_iterator
18 from google.cloud.exceptions import NotFound
19 from google.cloud.runtimeconfig._helpers import config_name_from_full_name
20 from google.cloud.runtimeconfig.variable import Variable
21 
22 
23 class Config(object):
24     """A Config resource in the Cloud RuntimeConfig service.
25 
26     This consists of metadata and a hierarchy of variables.
27 
28     See
29     https://cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs
30 
31     :type client: :class:`google.cloud.runtimeconfig.client.Client`
32     :param client: A client which holds credentials and project configuration
33                    for the config (which requires a project).
34 
35     :type name: str
36     :param name: The name of the config.
37     """
38 
39     def __init__(self, client, name):
40         self._client = client
41         self.name = name
42         self._properties = {}
43 
44     def __repr__(self):
45         return '<Config: %s>' % (self.name,)
46 
47     @property
48     def client(self):
49         """The client bound to this config."""
50         return self._client
51 
52     @property
53     def description(self):
54         """Description of the config object.
55 
56         See
57         https://cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs#resource-runtimeconfig
58 
59         :rtype: str, or ``NoneType``
60         :returns: the description (None until set from the server).
61         """
62         return self._properties.get('description')
63 
64     @property
65     def project(self):
66         """Project bound to the config.
67 
68         :rtype: str
69         :returns: the project (derived from the client).
70         """
71         return self._client.project
72 
73     @property
74     def full_name(self):
75         """Fully-qualified name of this variable.
76 
77         Example:
78         ``projects/my-project/configs/my-config``
79 
80         :rtype: str
81         :returns: The full name based on project and config names.
82 
83         :raises: :class:`ValueError` if the config is missing a name.
84         """
85         if not self.name:
86             raise ValueError('Missing config name.')
87         return 'projects/%s/configs/%s' % (self._client.project, self.name)
88 
89     @property
90     def path(self):
91         """URL path for the config's APIs.
92 
93         :rtype: str
94         :returns: The URL path based on project and config names.
95         """
96         return '/%s' % (self.full_name,)
97 
98     def variable(self, variable_name):
99         """Factory constructor for variable object.
100 
101         .. note::
102           This will not make an HTTP request; it simply instantiates
103           a variable object owned by this config.
104 
105         :type variable_name: str
106         :param variable_name: The name of the variable to be instantiated.
107 
108         :rtype: :class:`google.cloud.runtimeconfig.variable.Variable`
109         :returns: The variable object created.
110         """
111         return Variable(name=variable_name, config=self)
112 
113     def _require_client(self, client):
114         """Check client or verify over-ride.
115 
116         :type client: :class:`google.cloud.runtimconfig.client.Client`
117         :param client:
118             (Optional) The client to use.  If not passed, falls back to the
119             ``client`` stored on the current zone.
120 
121         :rtype: :class:`google.cloud.runtimeconfig.client.Client`
122         :returns: The client passed in or the currently bound client.
123         """
124         if client is None:
125             client = self._client
126         return client
127 
128     def _set_properties(self, api_response):
129         """Update properties from resource in body of ``api_response``
130 
131         :type api_response: dict
132         :param api_response: response returned from an API call
133         """
134         self._properties.clear()
135         cleaned = api_response.copy()
136         if 'name' in cleaned:
137             self.name = config_name_from_full_name(cleaned.pop('name'))
138         self._properties.update(cleaned)
139 
140     def exists(self, client=None):
141         """Determines whether or not this config exists.
142 
143         :type client: :class:`~google.cloud.runtimeconfig.client.Client`
144         :param client:
145             (Optional) The client to use.  If not passed, falls back to the
146             ``client`` stored on the current config.
147 
148         :rtype: bool
149         :returns: True if the config exists in Cloud Runtime Configurator.
150         """
151         client = self._require_client(client)
152         try:
153             # We only need the status code (200 or not) so we seek to
154             # minimize the returned payload.
155             query_params = {'fields': 'name'}
156             client._connection.api_request(
157                 method='GET', path=self.path, query_params=query_params)
158             return True
159         except NotFound:
160             return False
161 
162     def reload(self, client=None):
163         """API call:  reload the config via a ``GET`` request.
164 
165         This method will reload the newest data for the config.
166 
167         See
168         https://cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs/get
169 
170         :type client: :class:`google.cloud.runtimeconfig.client.Client`
171         :param client:
172             (Optional) The client to use.  If not passed, falls back to the
173             client stored on the current config.
174         """
175         client = self._require_client(client)
176 
177         # We assume the config exists. If it doesn't it will raise a NotFound
178         # exception.
179         resp = client._connection.api_request(method='GET', path=self.path)
180         self._set_properties(api_response=resp)
181 
182     def get_variable(self, variable_name, client=None):
183         """API call:  get a variable via a ``GET`` request.
184 
185         This will return None if the variable doesn't exist::
186 
187           >>> from google.cloud import runtimeconfig
188           >>> client = runtimeconfig.Client()
189           >>> config = client.get_config('my-config')
190           >>> print(config.get_varialbe('variable-name'))
191           <Variable: my-config, variable-name>
192           >>> print(config.get_variable('does-not-exist'))
193           None
194 
195         :type variable_name: str
196         :param variable_name: The name of the variable to retrieve.
197 
198         :type client: :class:`~google.cloud.runtimeconfig.client.Client`
199         :param client:
200             (Optional) The client to use.  If not passed, falls back to the
201             ``client`` stored on the current config.
202 
203         :rtype: :class:`google.cloud.runtimeconfig.variable.Variable` or None
204         :returns: The variable object if it exists, otherwise None.
205         """
206         client = self._require_client(client)
207         variable = Variable(config=self, name=variable_name)
208         try:
209             variable.reload(client=client)
210             return variable
211         except NotFound:
212             return None
213 
214     def list_variables(self, page_size=None, page_token=None, client=None):
215         """API call:  list variables for this config.
216 
217         This only lists variable names, not the values.
218 
219         See
220         https://cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs.variables/list
221 
222         :type page_size: int
223         :param page_size:
224             (Optional) Maximum number of variables to return per page.
225 
226         :type page_token: str
227         :param page_token: opaque marker for the next "page" of variables. If
228                            not passed, will return the first page of variables.
229 
230         :type client: :class:`~google.cloud.runtimeconfig.client.Client`
231         :param client:
232             (Optional) The client to use.  If not passed, falls back to the
233             ``client`` stored on the current config.
234 
235         :rtype: :class:`~google.api.core.page_iterator.Iterator`
236         :returns:
237             Iterator of :class:`~google.cloud.runtimeconfig.variable.Variable`
238             belonging to this project.
239         """
240         path = '%s/variables' % (self.path,)
241         client = self._require_client(client)
242         iterator = page_iterator.HTTPIterator(
243             client=client,
244             api_request=client._connection.api_request,
245             path=path,
246             item_to_value=_item_to_variable,
247             items_key='variables',
248             page_token=page_token,
249             max_results=page_size)
250         iterator._MAX_RESULTS = 'pageSize'
251         iterator.config = self
252         return iterator
253 
254 
255 def _item_to_variable(iterator, resource):
256     """Convert a JSON variable to the native object.
257 
258     :type iterator: :class:`~google.api.core.page_iterator.Iterator`
259     :param iterator: The iterator that has retrieved the item.
260 
261     :type resource: dict
262     :param resource: An item to be converted to a variable.
263 
264     :rtype: :class:`.Variable`
265     :returns: The next variable in the page.
266     """
267     return Variable.from_api_repr(resource, iterator.config)
268
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/runtimeconfig/google/cloud/runtimeconfig/config.py b/runtimeconfig/google/cloud/runtimeconfig/config.py
--- a/runtimeconfig/google/cloud/runtimeconfig/config.py
+++ b/runtimeconfig/google/cloud/runtimeconfig/config.py
@@ -186,8 +186,8 @@
 
           >>> from google.cloud import runtimeconfig
           >>> client = runtimeconfig.Client()
-          >>> config = client.get_config('my-config')
-          >>> print(config.get_varialbe('variable-name'))
+          >>> config = client.config('my-config')
+          >>> print(config.get_variable('variable-name'))
           <Variable: my-config, variable-name>
           >>> print(config.get_variable('does-not-exist'))
           None

{"golden_diff": "diff --git a/runtimeconfig/google/cloud/runtimeconfig/config.py b/runtimeconfig/google/cloud/runtimeconfig/config.py\n--- a/runtimeconfig/google/cloud/runtimeconfig/config.py\n+++ b/runtimeconfig/google/cloud/runtimeconfig/config.py\n@@ -186,8 +186,8 @@\n \n           >>> from google.cloud import runtimeconfig\n           >>> client = runtimeconfig.Client()\n-          >>> config = client.get_config('my-config')\n-          >>> print(config.get_varialbe('variable-name'))\n+          >>> config = client.config('my-config')\n+          >>> print(config.get_variable('variable-name'))\n           <Variable: my-config, variable-name>\n           >>> print(config.get_variable('does-not-exist'))\n           None\n", "issue": "[runtimeconfig] typo: \"config.get_variable(...)\"\nhttps://github.com/GoogleCloudPlatform/google-cloud-python/blob/bee32c0ae68b1e6cf224f9017c758a8e31e8be83/runtimeconfig/google/cloud/runtimeconfig/config.py#L190\n[runtimeconfig] Should be \"client.config(...)\" not \"client.get_config(...)\nhttps://github.com/GoogleCloudPlatform/google-cloud-python/blob/bee32c0ae68b1e6cf224f9017c758a8e31e8be83/runtimeconfig/google/cloud/runtimeconfig/config.py#L189\n", "before_files": [{"content": "# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"Create / interact with Google Cloud RuntimeConfig configs.\"\"\"\n\nfrom google.api.core import page_iterator\nfrom google.cloud.exceptions import NotFound\nfrom google.cloud.runtimeconfig._helpers import config_name_from_full_name\nfrom google.cloud.runtimeconfig.variable import Variable\n\n\nclass Config(object):\n    \"\"\"A Config resource in the Cloud RuntimeConfig service.\n\n    This consists of metadata and a hierarchy of variables.\n\n    See\n    https://cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs\n\n    :type client: :class:`google.cloud.runtimeconfig.client.Client`\n    :param client: A client which holds credentials and project configuration\n                   for the config (which requires a project).\n\n    :type name: str\n    :param name: The name of the config.\n    \"\"\"\n\n    def __init__(self, client, name):\n        self._client = client\n        self.name = name\n        self._properties = {}\n\n    def __repr__(self):\n        return '<Config: %s>' % (self.name,)\n\n    @property\n    def client(self):\n        \"\"\"The client bound to this config.\"\"\"\n        return self._client\n\n    @property\n    def description(self):\n        \"\"\"Description of the config object.\n\n        See\n        https://cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs#resource-runtimeconfig\n\n        :rtype: str, or ``NoneType``\n        :returns: the description (None until set from the server).\n        \"\"\"\n        return self._properties.get('description')\n\n    @property\n    def project(self):\n        \"\"\"Project bound to the config.\n\n        :rtype: str\n        :returns: the project (derived from the client).\n        \"\"\"\n        return self._client.project\n\n    @property\n    def full_name(self):\n        \"\"\"Fully-qualified name of this variable.\n\n        Example:\n        ``projects/my-project/configs/my-config``\n\n        :rtype: str\n        :returns: The full name based on project and config names.\n\n        :raises: :class:`ValueError` if the config is missing a name.\n        \"\"\"\n        if not self.name:\n            raise ValueError('Missing config name.')\n        return 'projects/%s/configs/%s' % (self._client.project, self.name)\n\n    @property\n    def path(self):\n        \"\"\"URL path for the config's APIs.\n\n        :rtype: str\n        :returns: The URL path based on project and config names.\n        \"\"\"\n        return '/%s' % (self.full_name,)\n\n    def variable(self, variable_name):\n        \"\"\"Factory constructor for variable object.\n\n        .. note::\n          This will not make an HTTP request; it simply instantiates\n          a variable object owned by this config.\n\n        :type variable_name: str\n        :param variable_name: The name of the variable to be instantiated.\n\n        :rtype: :class:`google.cloud.runtimeconfig.variable.Variable`\n        :returns: The variable object created.\n        \"\"\"\n        return Variable(name=variable_name, config=self)\n\n    def _require_client(self, client):\n        \"\"\"Check client or verify over-ride.\n\n        :type client: :class:`google.cloud.runtimconfig.client.Client`\n        :param client:\n            (Optional) The client to use.  If not passed, falls back to the\n            ``client`` stored on the current zone.\n\n        :rtype: :class:`google.cloud.runtimeconfig.client.Client`\n        :returns: The client passed in or the currently bound client.\n        \"\"\"\n        if client is None:\n            client = self._client\n        return client\n\n    def _set_properties(self, api_response):\n        \"\"\"Update properties from resource in body of ``api_response``\n\n        :type api_response: dict\n        :param api_response: response returned from an API call\n        \"\"\"\n        self._properties.clear()\n        cleaned = api_response.copy()\n        if 'name' in cleaned:\n            self.name = config_name_from_full_name(cleaned.pop('name'))\n        self._properties.update(cleaned)\n\n    def exists(self, client=None):\n        \"\"\"Determines whether or not this config exists.\n\n        :type client: :class:`~google.cloud.runtimeconfig.client.Client`\n        :param client:\n            (Optional) The client to use.  If not passed, falls back to the\n            ``client`` stored on the current config.\n\n        :rtype: bool\n        :returns: True if the config exists in Cloud Runtime Configurator.\n        \"\"\"\n        client = self._require_client(client)\n        try:\n            # We only need the status code (200 or not) so we seek to\n            # minimize the returned payload.\n            query_params = {'fields': 'name'}\n            client._connection.api_request(\n                method='GET', path=self.path, query_params=query_params)\n            return True\n        except NotFound:\n            return False\n\n    def reload(self, client=None):\n        \"\"\"API call:  reload the config via a ``GET`` request.\n\n        This method will reload the newest data for the config.\n\n        See\n        https://cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs/get\n\n        :type client: :class:`google.cloud.runtimeconfig.client.Client`\n        :param client:\n            (Optional) The client to use.  If not passed, falls back to the\n            client stored on the current config.\n        \"\"\"\n        client = self._require_client(client)\n\n        # We assume the config exists. If it doesn't it will raise a NotFound\n        # exception.\n        resp = client._connection.api_request(method='GET', path=self.path)\n        self._set_properties(api_response=resp)\n\n    def get_variable(self, variable_name, client=None):\n        \"\"\"API call:  get a variable via a ``GET`` request.\n\n        This will return None if the variable doesn't exist::\n\n          >>> from google.cloud import runtimeconfig\n          >>> client = runtimeconfig.Client()\n          >>> config = client.get_config('my-config')\n          >>> print(config.get_varialbe('variable-name'))\n          <Variable: my-config, variable-name>\n          >>> print(config.get_variable('does-not-exist'))\n          None\n\n        :type variable_name: str\n        :param variable_name: The name of the variable to retrieve.\n\n        :type client: :class:`~google.cloud.runtimeconfig.client.Client`\n        :param client:\n            (Optional) The client to use.  If not passed, falls back to the\n            ``client`` stored on the current config.\n\n        :rtype: :class:`google.cloud.runtimeconfig.variable.Variable` or None\n        :returns: The variable object if it exists, otherwise None.\n        \"\"\"\n        client = self._require_client(client)\n        variable = Variable(config=self, name=variable_name)\n        try:\n            variable.reload(client=client)\n            return variable\n        except NotFound:\n            return None\n\n    def list_variables(self, page_size=None, page_token=None, client=None):\n        \"\"\"API call:  list variables for this config.\n\n        This only lists variable names, not the values.\n\n        See\n        https://cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs.variables/list\n\n        :type page_size: int\n        :param page_size:\n            (Optional) Maximum number of variables to return per page.\n\n        :type page_token: str\n        :param page_token: opaque marker for the next \"page\" of variables. If\n                           not passed, will return the first page of variables.\n\n        :type client: :class:`~google.cloud.runtimeconfig.client.Client`\n        :param client:\n            (Optional) The client to use.  If not passed, falls back to the\n            ``client`` stored on the current config.\n\n        :rtype: :class:`~google.api.core.page_iterator.Iterator`\n        :returns:\n            Iterator of :class:`~google.cloud.runtimeconfig.variable.Variable`\n            belonging to this project.\n        \"\"\"\n        path = '%s/variables' % (self.path,)\n        client = self._require_client(client)\n        iterator = page_iterator.HTTPIterator(\n            client=client,\n            api_request=client._connection.api_request,\n            path=path,\n            item_to_value=_item_to_variable,\n            items_key='variables',\n            page_token=page_token,\n            max_results=page_size)\n        iterator._MAX_RESULTS = 'pageSize'\n        iterator.config = self\n        return iterator\n\n\ndef _item_to_variable(iterator, resource):\n    \"\"\"Convert a JSON variable to the native object.\n\n    :type iterator: :class:`~google.api.core.page_iterator.Iterator`\n    :param iterator: The iterator that has retrieved the item.\n\n    :type resource: dict\n    :param resource: An item to be converted to a variable.\n\n    :rtype: :class:`.Variable`\n    :returns: The next variable in the page.\n    \"\"\"\n    return Variable.from_api_repr(resource, iterator.config)\n", "path": "runtimeconfig/google/cloud/runtimeconfig/config.py"}], "after_files": [{"content": "# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"Create / interact with Google Cloud RuntimeConfig configs.\"\"\"\n\nfrom google.api.core import page_iterator\nfrom google.cloud.exceptions import NotFound\nfrom google.cloud.runtimeconfig._helpers import config_name_from_full_name\nfrom google.cloud.runtimeconfig.variable import Variable\n\n\nclass Config(object):\n    \"\"\"A Config resource in the Cloud RuntimeConfig service.\n\n    This consists of metadata and a hierarchy of variables.\n\n    See\n    https://cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs\n\n    :type client: :class:`google.cloud.runtimeconfig.client.Client`\n    :param client: A client which holds credentials and project configuration\n                   for the config (which requires a project).\n\n    :type name: str\n    :param name: The name of the config.\n    \"\"\"\n\n    def __init__(self, client, name):\n        self._client = client\n        self.name = name\n        self._properties = {}\n\n    def __repr__(self):\n        return '<Config: %s>' % (self.name,)\n\n    @property\n    def client(self):\n        \"\"\"The client bound to this config.\"\"\"\n        return self._client\n\n    @property\n    def description(self):\n        \"\"\"Description of the config object.\n\n        See\n        https://cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs#resource-runtimeconfig\n\n        :rtype: str, or ``NoneType``\n        :returns: the description (None until set from the server).\n        \"\"\"\n        return self._properties.get('description')\n\n    @property\n    def project(self):\n        \"\"\"Project bound to the config.\n\n        :rtype: str\n        :returns: the project (derived from the client).\n        \"\"\"\n        return self._client.project\n\n    @property\n    def full_name(self):\n        \"\"\"Fully-qualified name of this variable.\n\n        Example:\n        ``projects/my-project/configs/my-config``\n\n        :rtype: str\n        :returns: The full name based on project and config names.\n\n        :raises: :class:`ValueError` if the config is missing a name.\n        \"\"\"\n        if not self.name:\n            raise ValueError('Missing config name.')\n        return 'projects/%s/configs/%s' % (self._client.project, self.name)\n\n    @property\n    def path(self):\n        \"\"\"URL path for the config's APIs.\n\n        :rtype: str\n        :returns: The URL path based on project and config names.\n        \"\"\"\n        return '/%s' % (self.full_name,)\n\n    def variable(self, variable_name):\n        \"\"\"Factory constructor for variable object.\n\n        .. note::\n          This will not make an HTTP request; it simply instantiates\n          a variable object owned by this config.\n\n        :type variable_name: str\n        :param variable_name: The name of the variable to be instantiated.\n\n        :rtype: :class:`google.cloud.runtimeconfig.variable.Variable`\n        :returns: The variable object created.\n        \"\"\"\n        return Variable(name=variable_name, config=self)\n\n    def _require_client(self, client):\n        \"\"\"Check client or verify over-ride.\n\n        :type client: :class:`google.cloud.runtimconfig.client.Client`\n        :param client:\n            (Optional) The client to use.  If not passed, falls back to the\n            ``client`` stored on the current zone.\n\n        :rtype: :class:`google.cloud.runtimeconfig.client.Client`\n        :returns: The client passed in or the currently bound client.\n        \"\"\"\n        if client is None:\n            client = self._client\n        return client\n\n    def _set_properties(self, api_response):\n        \"\"\"Update properties from resource in body of ``api_response``\n\n        :type api_response: dict\n        :param api_response: response returned from an API call\n        \"\"\"\n        self._properties.clear()\n        cleaned = api_response.copy()\n        if 'name' in cleaned:\n            self.name = config_name_from_full_name(cleaned.pop('name'))\n        self._properties.update(cleaned)\n\n    def exists(self, client=None):\n        \"\"\"Determines whether or not this config exists.\n\n        :type client: :class:`~google.cloud.runtimeconfig.client.Client`\n        :param client:\n            (Optional) The client to use.  If not passed, falls back to the\n            ``client`` stored on the current config.\n\n        :rtype: bool\n        :returns: True if the config exists in Cloud Runtime Configurator.\n        \"\"\"\n        client = self._require_client(client)\n        try:\n            # We only need the status code (200 or not) so we seek to\n            # minimize the returned payload.\n            query_params = {'fields': 'name'}\n            client._connection.api_request(\n                method='GET', path=self.path, query_params=query_params)\n            return True\n        except NotFound:\n            return False\n\n    def reload(self, client=None):\n        \"\"\"API call:  reload the config via a ``GET`` request.\n\n        This method will reload the newest data for the config.\n\n        See\n        https://cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs/get\n\n        :type client: :class:`google.cloud.runtimeconfig.client.Client`\n        :param client:\n            (Optional) The client to use.  If not passed, falls back to the\n            client stored on the current config.\n        \"\"\"\n        client = self._require_client(client)\n\n        # We assume the config exists. If it doesn't it will raise a NotFound\n        # exception.\n        resp = client._connection.api_request(method='GET', path=self.path)\n        self._set_properties(api_response=resp)\n\n    def get_variable(self, variable_name, client=None):\n        \"\"\"API call:  get a variable via a ``GET`` request.\n\n        This will return None if the variable doesn't exist::\n\n          >>> from google.cloud import runtimeconfig\n          >>> client = runtimeconfig.Client()\n          >>> config = client.config('my-config')\n          >>> print(config.get_variable('variable-name'))\n          <Variable: my-config, variable-name>\n          >>> print(config.get_variable('does-not-exist'))\n          None\n\n        :type variable_name: str\n        :param variable_name: The name of the variable to retrieve.\n\n        :type client: :class:`~google.cloud.runtimeconfig.client.Client`\n        :param client:\n            (Optional) The client to use.  If not passed, falls back to the\n            ``client`` stored on the current config.\n\n        :rtype: :class:`google.cloud.runtimeconfig.variable.Variable` or None\n        :returns: The variable object if it exists, otherwise None.\n        \"\"\"\n        client = self._require_client(client)\n        variable = Variable(config=self, name=variable_name)\n        try:\n            variable.reload(client=client)\n            return variable\n        except NotFound:\n            return None\n\n    def list_variables(self, page_size=None, page_token=None, client=None):\n        \"\"\"API call:  list variables for this config.\n\n        This only lists variable names, not the values.\n\n        See\n        https://cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs.variables/list\n\n        :type page_size: int\n        :param page_size:\n            (Optional) Maximum number of variables to return per page.\n\n        :type page_token: str\n        :param page_token: opaque marker for the next \"page\" of variables. If\n                           not passed, will return the first page of variables.\n\n        :type client: :class:`~google.cloud.runtimeconfig.client.Client`\n        :param client:\n            (Optional) The client to use.  If not passed, falls back to the\n            ``client`` stored on the current config.\n\n        :rtype: :class:`~google.api.core.page_iterator.Iterator`\n        :returns:\n            Iterator of :class:`~google.cloud.runtimeconfig.variable.Variable`\n            belonging to this project.\n        \"\"\"\n        path = '%s/variables' % (self.path,)\n        client = self._require_client(client)\n        iterator = page_iterator.HTTPIterator(\n            client=client,\n            api_request=client._connection.api_request,\n            path=path,\n            item_to_value=_item_to_variable,\n            items_key='variables',\n            page_token=page_token,\n            max_results=page_size)\n        iterator._MAX_RESULTS = 'pageSize'\n        iterator.config = self\n        return iterator\n\n\ndef _item_to_variable(iterator, resource):\n    \"\"\"Convert a JSON variable to the native object.\n\n    :type iterator: :class:`~google.api.core.page_iterator.Iterator`\n    :param iterator: The iterator that has retrieved the item.\n\n    :type resource: dict\n    :param resource: An item to be converted to a variable.\n\n    :rtype: :class:`.Variable`\n    :returns: The next variable in the page.\n    \"\"\"\n    return Variable.from_api_repr(resource, iterator.config)\n", "path": "runtimeconfig/google/cloud/runtimeconfig/config.py"}]}