Repository: googleapis/google-cloud-python

Issue:
[DO NOT MERGE] Oslogin to pick up changes in the API or client library generator.
This PR was generated using Autosynth. :rainbow:

Here's the log from Synthtool:
```
synthtool > Cloning googleapis.
synthtool > Running generator for google/cloud/oslogin/artman_oslogin_v1.yaml.
synthtool > Ensuring dependencies.
synthtool > Pulling artman image.
latest: Pulling from googleapis/artman
Digest: sha256:90f9d15e9bad675aeecd586725bce48f5667ffe7d5fc4d1e96d51ff34304815b
Status: Image is up to date for googleapis/artman:latest
synthtool > Generated code into /home/kbuilder/.cache/synthtool/googleapis/artman-genfiles/python/os-login-v1.
synthtool > Replaced 'from google.cloud.oslogin.common import common_pb2' in google/cloud/oslogin_v1/proto/oslogin_pb2.py.
synthtool > Replaced 'from google.cloud.oslogin.common import common_pb2' in google/cloud/oslogin_v1/proto/oslogin_pb2_grpc.py.
synthtool > Cleaned up 0 temporary directories.

```


Discussion:

Resolving patch:
diff --git a/oslogin/google/cloud/oslogin_v1/gapic/os_login_service_client.py b/oslogin/google/cloud/oslogin_v1/gapic/os_login_service_client.py
--- a/oslogin/google/cloud/oslogin_v1/gapic/os_login_service_client.py
+++ b/oslogin/google/cloud/oslogin_v1/gapic/os_login_service_client.py
@@ -104,7 +104,7 @@ def __init__(self,
                  transport=None,
                  channel=None,
                  credentials=None,
-                 client_config=os_login_service_client_config.config,
+                 client_config=None,
                  client_info=None):
         """Constructor.
 
@@ -137,13 +137,20 @@ def __init__(self,
                 your own client library.
         """
         # Raise deprecation warnings for things we want to go away.
-        if client_config:
-            warnings.warn('The `client_config` argument is deprecated.',
-                          PendingDeprecationWarning)
+        if client_config is not None:
+            warnings.warn(
+                'The `client_config` argument is deprecated.',
+                PendingDeprecationWarning,
+                stacklevel=2)
+        else:
+            client_config = os_login_service_client_config.config
+
         if channel:
             warnings.warn(
                 'The `channel` argument is deprecated; use '
-                '`transport` instead.', PendingDeprecationWarning)
+                '`transport` instead.',
+                PendingDeprecationWarning,
+                stacklevel=2)
 
         # Instantiate the transport.
         # The transport is responsible for handling serialization and
diff --git a/oslogin/google/cloud/oslogin_v1/gapic/transports/os_login_service_grpc_transport.py b/oslogin/google/cloud/oslogin_v1/gapic/transports/os_login_service_grpc_transport.py
--- a/oslogin/google/cloud/oslogin_v1/gapic/transports/os_login_service_grpc_transport.py
+++ b/oslogin/google/cloud/oslogin_v1/gapic/transports/os_login_service_grpc_transport.py
@@ -67,6 +67,8 @@ def __init__(self,
                 credentials=credentials,
             )
 
+        self._channel = channel
+
         # gRPC uses objects called "stubs" that are bound to the
         # channel and provide a basic method for each RPC.
         self._stubs = {
@@ -97,6 +99,15 @@ def create_channel(cls,
             scopes=cls._OAUTH_SCOPES,
         )
 
+    @property
+    def channel(self):
+        """The gRPC channel used by the transport.
+
+        Returns:
+            grpc.Channel: A gRPC channel object.
+        """
+        return self._channel
+
     @property
     def delete_posix_account(self):
         """Return the gRPC stub for {$apiMethod.name}.
diff --git a/oslogin/synth.py b/oslogin/synth.py
--- a/oslogin/synth.py
+++ b/oslogin/synth.py
@@ -29,6 +29,7 @@
     artman_output_name='os-login-v1')
 
 s.move(library / 'google/cloud/oslogin_v1')
+s.move(library / 'tests/unit/gapic/v1')
 
 # Fix up imports
 s.replace(


Test patch:
diff --git a/oslogin/tests/unit/gapic/v1/test_os_login_service_client_v1.py b/oslogin/tests/unit/gapic/v1/test_os_login_service_client_v1.py
--- a/oslogin/tests/unit/gapic/v1/test_os_login_service_client_v1.py
+++ b/oslogin/tests/unit/gapic/v1/test_os_login_service_client_v1.py
@@ -1,3 +1,5 @@
+# -*- coding: utf-8 -*-
+#
 # Copyright 2018 Google LLC
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,6 +15,7 @@
 # limitations under the License.
 """Unit tests."""
 
+import mock
 import pytest
 
 from google.cloud import oslogin_v1
@@ -63,7 +66,10 @@ class CustomException(Exception):
 class TestOsLoginServiceClient(object):
     def test_delete_posix_account(self):
         channel = ChannelStub()
-        client = oslogin_v1.OsLoginServiceClient(channel=channel)
+        patch = mock.patch('google.api_core.grpc_helpers.create_channel')
+        with patch as create_channel:
+            create_channel.return_value = channel
+            client = oslogin_v1.OsLoginServiceClient()
 
         # Setup Request
         name = client.project_path('[USER]', '[PROJECT]')
@@ -78,7 +84,10 @@ def test_delete_posix_account(self):
     def test_delete_posix_account_exception(self):
         # Mock the API response
         channel = ChannelStub(responses=[CustomException()])
-        client = oslogin_v1.OsLoginServiceClient(channel=channel)
+        patch = mock.patch('google.api_core.grpc_helpers.create_channel')
+        with patch as create_channel:
+            create_channel.return_value = channel
+            client = oslogin_v1.OsLoginServiceClient()
 
         # Setup request
         name = client.project_path('[USER]', '[PROJECT]')
@@ -88,7 +97,10 @@ def test_delete_posix_account_exception(self):
 
     def test_delete_ssh_public_key(self):
         channel = ChannelStub()
-        client = oslogin_v1.OsLoginServiceClient(channel=channel)
+        patch = mock.patch('google.api_core.grpc_helpers.create_channel')
+        with patch as create_channel:
+            create_channel.return_value = channel
+            client = oslogin_v1.OsLoginServiceClient()
 
         # Setup Request
         name = client.fingerprint_path('[USER]', '[FINGERPRINT]')
@@ -103,7 +115,10 @@ def test_delete_ssh_public_key(self):
     def test_delete_ssh_public_key_exception(self):
         # Mock the API response
         channel = ChannelStub(responses=[CustomException()])
-        client = oslogin_v1.OsLoginServiceClient(channel=channel)
+        patch = mock.patch('google.api_core.grpc_helpers.create_channel')
+        with patch as create_channel:
+            create_channel.return_value = channel
+            client = oslogin_v1.OsLoginServiceClient()
 
         # Setup request
         name = client.fingerprint_path('[USER]', '[FINGERPRINT]')
@@ -120,7 +135,10 @@ def test_get_login_profile(self):
 
         # Mock the API response
         channel = ChannelStub(responses=[expected_response])
-        client = oslogin_v1.OsLoginServiceClient(channel=channel)
+        patch = mock.patch('google.api_core.grpc_helpers.create_channel')
+        with patch as create_channel:
+            create_channel.return_value = channel
+            client = oslogin_v1.OsLoginServiceClient()
 
         # Setup Request
         name = client.user_path('[USER]')
@@ -136,7 +154,10 @@ def test_get_login_profile(self):
     def test_get_login_profile_exception(self):
         # Mock the API response
         channel = ChannelStub(responses=[CustomException()])
-        client = oslogin_v1.OsLoginServiceClient(channel=channel)
+        patch = mock.patch('google.api_core.grpc_helpers.create_channel')
+        with patch as create_channel:
+            create_channel.return_value = channel
+            client = oslogin_v1.OsLoginServiceClient()
 
         # Setup request
         name = client.user_path('[USER]')
@@ -158,7 +179,10 @@ def test_get_ssh_public_key(self):
 
         # Mock the API response
         channel = ChannelStub(responses=[expected_response])
-        client = oslogin_v1.OsLoginServiceClient(channel=channel)
+        patch = mock.patch('google.api_core.grpc_helpers.create_channel')
+        with patch as create_channel:
+            create_channel.return_value = channel
+            client = oslogin_v1.OsLoginServiceClient()
 
         # Setup Request
         name = client.fingerprint_path('[USER]', '[FINGERPRINT]')
@@ -174,7 +198,10 @@ def test_get_ssh_public_key(self):
     def test_get_ssh_public_key_exception(self):
         # Mock the API response
         channel = ChannelStub(responses=[CustomException()])
-        client = oslogin_v1.OsLoginServiceClient(channel=channel)
+        patch = mock.patch('google.api_core.grpc_helpers.create_channel')
+        with patch as create_channel:
+            create_channel.return_value = channel
+            client = oslogin_v1.OsLoginServiceClient()
 
         # Setup request
         name = client.fingerprint_path('[USER]', '[FINGERPRINT]')
@@ -190,7 +217,10 @@ def test_import_ssh_public_key(self):
 
         # Mock the API response
         channel = ChannelStub(responses=[expected_response])
-        client = oslogin_v1.OsLoginServiceClient(channel=channel)
+        patch = mock.patch('google.api_core.grpc_helpers.create_channel')
+        with patch as create_channel:
+            create_channel.return_value = channel
+            client = oslogin_v1.OsLoginServiceClient()
 
         # Setup Request
         parent = client.user_path('[USER]')
@@ -208,7 +238,10 @@ def test_import_ssh_public_key(self):
     def test_import_ssh_public_key_exception(self):
         # Mock the API response
         channel = ChannelStub(responses=[CustomException()])
-        client = oslogin_v1.OsLoginServiceClient(channel=channel)
+        patch = mock.patch('google.api_core.grpc_helpers.create_channel')
+        with patch as create_channel:
+            create_channel.return_value = channel
+            client = oslogin_v1.OsLoginServiceClient()
 
         # Setup request
         parent = client.user_path('[USER]')
@@ -231,7 +264,10 @@ def test_update_ssh_public_key(self):
 
         # Mock the API response
         channel = ChannelStub(responses=[expected_response])
-        client = oslogin_v1.OsLoginServiceClient(channel=channel)
+        patch = mock.patch('google.api_core.grpc_helpers.create_channel')
+        with patch as create_channel:
+            create_channel.return_value = channel
+            client = oslogin_v1.OsLoginServiceClient()
 
         # Setup Request
         name = client.fingerprint_path('[USER]', '[FINGERPRINT]')
@@ -249,7 +285,10 @@ def test_update_ssh_public_key(self):
     def test_update_ssh_public_key_exception(self):
         # Mock the API response
         channel = ChannelStub(responses=[CustomException()])
-        client = oslogin_v1.OsLoginServiceClient(channel=channel)
+        patch = mock.patch('google.api_core.grpc_helpers.create_channel')
+        with patch as create_channel:
+            create_channel.return_value = channel
+            client = oslogin_v1.OsLoginServiceClient()
 
         # Setup request
         name = client.fingerprint_path('[USER]', '[FINGERPRINT]')