diff --git a/CHANGELOG.md b/CHANGELOG.md index b2cf1a5..b7c4010 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [0.4.1](https://github.com/googleapis/python-datastream/compare/v0.4.0...v0.4.1) (2022-02-26) + + +### Documentation + +* add generated snippets ([#66](https://github.com/googleapis/python-datastream/issues/66)) ([75656c1](https://github.com/googleapis/python-datastream/commit/75656c11c8e9ff8e0ffc509476477db268aca08d)) + ## [0.4.0](https://github.com/googleapis/python-datastream/compare/v0.3.1...v0.4.0) (2022-02-03) diff --git a/google/cloud/datastream/__init__.py b/google/cloud/datastream/__init__.py index 2fb1855..8c5ff0b 100644 --- a/google/cloud/datastream/__init__.py +++ b/google/cloud/datastream/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastream_v1/__init__.py b/google/cloud/datastream_v1/__init__.py index 73b1bed..be9f50e 100644 --- a/google/cloud/datastream_v1/__init__.py +++ b/google/cloud/datastream_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastream_v1/services/__init__.py b/google/cloud/datastream_v1/services/__init__.py index 4de6597..e8e1c38 100644 --- a/google/cloud/datastream_v1/services/__init__.py +++ b/google/cloud/datastream_v1/services/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastream_v1/services/datastream/__init__.py b/google/cloud/datastream_v1/services/datastream/__init__.py index b2aee97..0e6c29f 100644 --- a/google/cloud/datastream_v1/services/datastream/__init__.py +++ b/google/cloud/datastream_v1/services/datastream/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastream_v1/services/datastream/async_client.py b/google/cloud/datastream_v1/services/datastream/async_client.py index fe0b497..c098b9b 100644 --- a/google/cloud/datastream_v1/services/datastream/async_client.py +++ b/google/cloud/datastream_v1/services/datastream/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -228,6 +228,27 @@ async def list_connection_profiles( r"""Use this method to list connection profiles created in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_list_connection_profiles(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.ListConnectionProfilesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_connection_profiles(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.datastream_v1.types.ListConnectionProfilesRequest, dict]): The request object. Request message for listing @@ -309,6 +330,26 @@ async def get_connection_profile( r"""Use this method to get details about a connection profile. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_get_connection_profile(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.GetConnectionProfileRequest( + name="name_value", + ) + + # Make the request + response = client.get_connection_profile(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.GetConnectionProfileRequest, dict]): The request object. Request message for getting a @@ -384,6 +425,39 @@ async def create_connection_profile( r"""Use this method to create a connection profile in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_create_connection_profile(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + connection_profile = datastream_v1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1.CreateConnectionProfileRequest( + parent="parent_value", + connection_profile_id="connection_profile_id_value", + connection_profile=connection_profile, + ) + + # Make the request + operation = client.create_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.CreateConnectionProfileRequest, dict]): The request object. Request message for creating a @@ -485,6 +559,37 @@ async def update_connection_profile( r"""Use this method to update the parameters of a connection profile. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_update_connection_profile(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + connection_profile = datastream_v1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1.UpdateConnectionProfileRequest( + connection_profile=connection_profile, + ) + + # Make the request + operation = client.update_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.UpdateConnectionProfileRequest, dict]): The request object. Connection profile update message. @@ -581,6 +686,29 @@ async def delete_connection_profile( ) -> operation_async.AsyncOperation: r"""Use this method to delete a connection profile. + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_delete_connection_profile(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.DeleteConnectionProfileRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.DeleteConnectionProfileRequest, dict]): The request object. Request message for deleting a @@ -676,6 +804,35 @@ async def discover_connection_profile( returns children data objects of a parent data object that's optionally supplied in the request. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_discover_connection_profile(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + connection_profile = datastream_v1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1.DiscoverConnectionProfileRequest( + connection_profile=connection_profile, + full_hierarchy=True, + parent="parent_value", + ) + + # Make the request + response = client.discover_connection_profile(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.DiscoverConnectionProfileRequest, dict]): The request object. Request message for 'discover' @@ -725,6 +882,27 @@ async def list_streams( r"""Use this method to list streams in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_list_streams(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.ListStreamsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_streams(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.datastream_v1.types.ListStreamsRequest, dict]): The request object. Request message for listing streams. @@ -803,6 +981,25 @@ async def get_stream( ) -> datastream_resources.Stream: r"""Use this method to get details about a stream. + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_get_stream(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.GetStreamRequest( + name="name_value", + ) + + # Make the request + response = client.get_stream(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.GetStreamRequest, dict]): The request object. Request message for getting a @@ -876,6 +1073,36 @@ async def create_stream( ) -> operation_async.AsyncOperation: r"""Use this method to create a stream. + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_create_stream(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + stream = datastream_v1.Stream() + stream.display_name = "display_name_value" + stream.source_config.source_connection_profile = "source_connection_profile_value" + stream.destination_config.destination_connection_profile = "destination_connection_profile_value" + + request = datastream_v1.CreateStreamRequest( + parent="parent_value", + stream_id="stream_id_value", + stream=stream, + ) + + # Make the request + operation = client.create_stream(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.CreateStreamRequest, dict]): The request object. Request message for creating a @@ -977,6 +1204,35 @@ async def update_stream( r"""Use this method to update the configuration of a stream. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_update_stream(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + stream = datastream_v1.Stream() + stream.display_name = "display_name_value" + stream.source_config.source_connection_profile = "source_connection_profile_value" + stream.destination_config.destination_connection_profile = "destination_connection_profile_value" + + request = datastream_v1.UpdateStreamRequest( + stream=stream, + ) + + # Make the request + operation = client.update_stream(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.UpdateStreamRequest, dict]): The request object. Request message for updating a @@ -1075,6 +1331,29 @@ async def delete_stream( ) -> operation_async.AsyncOperation: r"""Use this method to delete a stream. + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_delete_stream(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.DeleteStreamRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_stream(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.DeleteStreamRequest, dict]): The request object. Request message for deleting a @@ -1167,6 +1446,25 @@ async def get_stream_object( ) -> datastream_resources.StreamObject: r"""Use this method to get details about a stream object. + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_get_stream_object(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.GetStreamObjectRequest( + name="name_value", + ) + + # Make the request + response = client.get_stream_object(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.GetStreamObjectRequest, dict]): The request object. Request for fetching a specific @@ -1238,6 +1536,31 @@ async def lookup_stream_object( r"""Use this method to look up a stream object by its source object identifier. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_lookup_stream_object(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + source_object_identifier = datastream_v1.SourceObjectIdentifier() + source_object_identifier.oracle_identifier.schema = "schema_value" + source_object_identifier.oracle_identifier.table = "table_value" + + request = datastream_v1.LookupStreamObjectRequest( + parent="parent_value", + source_object_identifier=source_object_identifier, + ) + + # Make the request + response = client.lookup_stream_object(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.LookupStreamObjectRequest, dict]): The request object. Request for looking up a specific @@ -1289,6 +1612,27 @@ async def list_stream_objects( r"""Use this method to list the objects of a specific stream. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_list_stream_objects(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.ListStreamObjectsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_stream_objects(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.datastream_v1.types.ListStreamObjectsRequest, dict]): The request object. Request for listing all objects for @@ -1370,6 +1714,26 @@ async def start_backfill_job( r"""Use this method to start a backfill job for the specified stream object. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_start_backfill_job(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.StartBackfillJobRequest( + object_="object__value", + ) + + # Make the request + response = client.start_backfill_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.StartBackfillJobRequest, dict]): The request object. Request for manually initiating a @@ -1444,6 +1808,26 @@ async def stop_backfill_job( r"""Use this method to stop a backfill job for the specified stream object. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_stop_backfill_job(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.StopBackfillJobRequest( + object_="object__value", + ) + + # Make the request + response = client.stop_backfill_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.StopBackfillJobRequest, dict]): The request object. Request for manually stopping a @@ -1517,6 +1901,27 @@ async def fetch_static_ips( r"""The FetchStaticIps API call exposes the static IP addresses used by Datastream. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_fetch_static_ips(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.FetchStaticIpsRequest( + name="name_value", + ) + + # Make the request + page_result = client.fetch_static_ips(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.datastream_v1.types.FetchStaticIpsRequest, dict]): The request object. Request message for 'FetchStaticIps' @@ -1601,6 +2006,35 @@ async def create_private_connection( r"""Use this method to create a private connectivity configuration. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_create_private_connection(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + private_connection = datastream_v1.PrivateConnection() + private_connection.display_name = "display_name_value" + + request = datastream_v1.CreatePrivateConnectionRequest( + parent="parent_value", + private_connection_id="private_connection_id_value", + private_connection=private_connection, + ) + + # Make the request + operation = client.create_private_connection(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.CreatePrivateConnectionRequest, dict]): The request object. Request for creating a private @@ -1701,6 +2135,26 @@ async def get_private_connection( r"""Use this method to get details about a private connectivity configuration. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_get_private_connection(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.GetPrivateConnectionRequest( + name="name_value", + ) + + # Make the request + response = client.get_private_connection(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.GetPrivateConnectionRequest, dict]): The request object. Request to get a private connection @@ -1775,6 +2229,27 @@ async def list_private_connections( r"""Use this method to list private connectivity configurations in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_list_private_connections(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.ListPrivateConnectionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_private_connections(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.datastream_v1.types.ListPrivateConnectionsRequest, dict]): The request object. Request for listing private @@ -1857,6 +2332,30 @@ async def delete_private_connection( r"""Use this method to delete a private connectivity configuration. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_delete_private_connection(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.DeletePrivateConnectionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_private_connection(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.DeletePrivateConnectionRequest, dict]): The request object. Request to delete a private @@ -1952,6 +2451,36 @@ async def create_route( r"""Use this method to create a route for a private connectivity configuration in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_create_route(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + route = datastream_v1.Route() + route.display_name = "display_name_value" + route.destination_address = "destination_address_value" + + request = datastream_v1.CreateRouteRequest( + parent="parent_value", + route_id="route_id_value", + route=route, + ) + + # Make the request + operation = client.create_route(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.CreateRouteRequest, dict]): The request object. Route creation request. @@ -2048,6 +2577,25 @@ async def get_route( ) -> datastream_resources.Route: r"""Use this method to get details about a route. + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_get_route(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.GetRouteRequest( + name="name_value", + ) + + # Make the request + response = client.get_route(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.GetRouteRequest, dict]): The request object. Route get request. @@ -2121,6 +2669,27 @@ async def list_routes( r"""Use this method to list routes created for a private connectivity configuration in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_list_routes(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.ListRoutesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_routes(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.datastream_v1.types.ListRoutesRequest, dict]): The request object. Route list request. @@ -2199,6 +2768,29 @@ async def delete_route( ) -> operation_async.AsyncOperation: r"""Use this method to delete a route. + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_delete_route(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.DeleteRouteRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_route(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.DeleteRouteRequest, dict]): The request object. Route deletion request. diff --git a/google/cloud/datastream_v1/services/datastream/client.py b/google/cloud/datastream_v1/services/datastream/client.py index 3520a34..3ab4e19 100644 --- a/google/cloud/datastream_v1/services/datastream/client.py +++ b/google/cloud/datastream_v1/services/datastream/client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -505,6 +505,27 @@ def list_connection_profiles( r"""Use this method to list connection profiles created in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_list_connection_profiles(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.ListConnectionProfilesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_connection_profiles(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.datastream_v1.types.ListConnectionProfilesRequest, dict]): The request object. Request message for listing @@ -586,6 +607,26 @@ def get_connection_profile( r"""Use this method to get details about a connection profile. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_get_connection_profile(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.GetConnectionProfileRequest( + name="name_value", + ) + + # Make the request + response = client.get_connection_profile(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.GetConnectionProfileRequest, dict]): The request object. Request message for getting a @@ -661,6 +702,39 @@ def create_connection_profile( r"""Use this method to create a connection profile in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_create_connection_profile(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + connection_profile = datastream_v1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1.CreateConnectionProfileRequest( + parent="parent_value", + connection_profile_id="connection_profile_id_value", + connection_profile=connection_profile, + ) + + # Make the request + operation = client.create_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.CreateConnectionProfileRequest, dict]): The request object. Request message for creating a @@ -764,6 +838,37 @@ def update_connection_profile( r"""Use this method to update the parameters of a connection profile. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_update_connection_profile(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + connection_profile = datastream_v1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1.UpdateConnectionProfileRequest( + connection_profile=connection_profile, + ) + + # Make the request + operation = client.update_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.UpdateConnectionProfileRequest, dict]): The request object. Connection profile update message. @@ -862,6 +967,29 @@ def delete_connection_profile( ) -> operation.Operation: r"""Use this method to delete a connection profile. + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_delete_connection_profile(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.DeleteConnectionProfileRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.DeleteConnectionProfileRequest, dict]): The request object. Request message for deleting a @@ -959,6 +1087,35 @@ def discover_connection_profile( returns children data objects of a parent data object that's optionally supplied in the request. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_discover_connection_profile(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + connection_profile = datastream_v1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1.DiscoverConnectionProfileRequest( + connection_profile=connection_profile, + full_hierarchy=True, + parent="parent_value", + ) + + # Make the request + response = client.discover_connection_profile(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.DiscoverConnectionProfileRequest, dict]): The request object. Request message for 'discover' @@ -1011,6 +1168,27 @@ def list_streams( r"""Use this method to list streams in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_list_streams(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.ListStreamsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_streams(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.datastream_v1.types.ListStreamsRequest, dict]): The request object. Request message for listing streams. @@ -1089,6 +1267,25 @@ def get_stream( ) -> datastream_resources.Stream: r"""Use this method to get details about a stream. + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_get_stream(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.GetStreamRequest( + name="name_value", + ) + + # Make the request + response = client.get_stream(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.GetStreamRequest, dict]): The request object. Request message for getting a @@ -1162,6 +1359,36 @@ def create_stream( ) -> operation.Operation: r"""Use this method to create a stream. + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_create_stream(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + stream = datastream_v1.Stream() + stream.display_name = "display_name_value" + stream.source_config.source_connection_profile = "source_connection_profile_value" + stream.destination_config.destination_connection_profile = "destination_connection_profile_value" + + request = datastream_v1.CreateStreamRequest( + parent="parent_value", + stream_id="stream_id_value", + stream=stream, + ) + + # Make the request + operation = client.create_stream(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.CreateStreamRequest, dict]): The request object. Request message for creating a @@ -1263,6 +1490,35 @@ def update_stream( r"""Use this method to update the configuration of a stream. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_update_stream(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + stream = datastream_v1.Stream() + stream.display_name = "display_name_value" + stream.source_config.source_connection_profile = "source_connection_profile_value" + stream.destination_config.destination_connection_profile = "destination_connection_profile_value" + + request = datastream_v1.UpdateStreamRequest( + stream=stream, + ) + + # Make the request + operation = client.update_stream(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.UpdateStreamRequest, dict]): The request object. Request message for updating a @@ -1361,6 +1617,29 @@ def delete_stream( ) -> operation.Operation: r"""Use this method to delete a stream. + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_delete_stream(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.DeleteStreamRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_stream(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.DeleteStreamRequest, dict]): The request object. Request message for deleting a @@ -1453,6 +1732,25 @@ def get_stream_object( ) -> datastream_resources.StreamObject: r"""Use this method to get details about a stream object. + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_get_stream_object(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.GetStreamObjectRequest( + name="name_value", + ) + + # Make the request + response = client.get_stream_object(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.GetStreamObjectRequest, dict]): The request object. Request for fetching a specific @@ -1524,6 +1822,31 @@ def lookup_stream_object( r"""Use this method to look up a stream object by its source object identifier. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_lookup_stream_object(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + source_object_identifier = datastream_v1.SourceObjectIdentifier() + source_object_identifier.oracle_identifier.schema = "schema_value" + source_object_identifier.oracle_identifier.table = "table_value" + + request = datastream_v1.LookupStreamObjectRequest( + parent="parent_value", + source_object_identifier=source_object_identifier, + ) + + # Make the request + response = client.lookup_stream_object(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.LookupStreamObjectRequest, dict]): The request object. Request for looking up a specific @@ -1576,6 +1899,27 @@ def list_stream_objects( r"""Use this method to list the objects of a specific stream. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_list_stream_objects(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.ListStreamObjectsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_stream_objects(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.datastream_v1.types.ListStreamObjectsRequest, dict]): The request object. Request for listing all objects for @@ -1657,6 +2001,26 @@ def start_backfill_job( r"""Use this method to start a backfill job for the specified stream object. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_start_backfill_job(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.StartBackfillJobRequest( + object_="object__value", + ) + + # Make the request + response = client.start_backfill_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.StartBackfillJobRequest, dict]): The request object. Request for manually initiating a @@ -1731,6 +2095,26 @@ def stop_backfill_job( r"""Use this method to stop a backfill job for the specified stream object. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_stop_backfill_job(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.StopBackfillJobRequest( + object_="object__value", + ) + + # Make the request + response = client.stop_backfill_job(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.StopBackfillJobRequest, dict]): The request object. Request for manually stopping a @@ -1804,6 +2188,27 @@ def fetch_static_ips( r"""The FetchStaticIps API call exposes the static IP addresses used by Datastream. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_fetch_static_ips(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.FetchStaticIpsRequest( + name="name_value", + ) + + # Make the request + page_result = client.fetch_static_ips(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.datastream_v1.types.FetchStaticIpsRequest, dict]): The request object. Request message for 'FetchStaticIps' @@ -1888,6 +2293,35 @@ def create_private_connection( r"""Use this method to create a private connectivity configuration. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_create_private_connection(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + private_connection = datastream_v1.PrivateConnection() + private_connection.display_name = "display_name_value" + + request = datastream_v1.CreatePrivateConnectionRequest( + parent="parent_value", + private_connection_id="private_connection_id_value", + private_connection=private_connection, + ) + + # Make the request + operation = client.create_private_connection(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.CreatePrivateConnectionRequest, dict]): The request object. Request for creating a private @@ -1990,6 +2424,26 @@ def get_private_connection( r"""Use this method to get details about a private connectivity configuration. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_get_private_connection(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.GetPrivateConnectionRequest( + name="name_value", + ) + + # Make the request + response = client.get_private_connection(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.GetPrivateConnectionRequest, dict]): The request object. Request to get a private connection @@ -2064,6 +2518,27 @@ def list_private_connections( r"""Use this method to list private connectivity configurations in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_list_private_connections(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.ListPrivateConnectionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_private_connections(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.datastream_v1.types.ListPrivateConnectionsRequest, dict]): The request object. Request for listing private @@ -2146,6 +2621,30 @@ def delete_private_connection( r"""Use this method to delete a private connectivity configuration. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_delete_private_connection(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.DeletePrivateConnectionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_private_connection(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.DeletePrivateConnectionRequest, dict]): The request object. Request to delete a private @@ -2243,6 +2742,36 @@ def create_route( r"""Use this method to create a route for a private connectivity configuration in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_create_route(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + route = datastream_v1.Route() + route.display_name = "display_name_value" + route.destination_address = "destination_address_value" + + request = datastream_v1.CreateRouteRequest( + parent="parent_value", + route_id="route_id_value", + route=route, + ) + + # Make the request + operation = client.create_route(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.CreateRouteRequest, dict]): The request object. Route creation request. @@ -2339,6 +2868,25 @@ def get_route( ) -> datastream_resources.Route: r"""Use this method to get details about a route. + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_get_route(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.GetRouteRequest( + name="name_value", + ) + + # Make the request + response = client.get_route(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.GetRouteRequest, dict]): The request object. Route get request. @@ -2412,6 +2960,27 @@ def list_routes( r"""Use this method to list routes created for a private connectivity configuration in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_list_routes(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.ListRoutesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_routes(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.datastream_v1.types.ListRoutesRequest, dict]): The request object. Route list request. @@ -2490,6 +3059,29 @@ def delete_route( ) -> operation.Operation: r"""Use this method to delete a route. + .. code-block:: python + + from google.cloud import datastream_v1 + + def sample_delete_route(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.DeleteRouteRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_route(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1.types.DeleteRouteRequest, dict]): The request object. Route deletion request. diff --git a/google/cloud/datastream_v1/services/datastream/pagers.py b/google/cloud/datastream_v1/services/datastream/pagers.py index 530d1ae..7617d90 100644 --- a/google/cloud/datastream_v1/services/datastream/pagers.py +++ b/google/cloud/datastream_v1/services/datastream/pagers.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastream_v1/services/datastream/transports/__init__.py b/google/cloud/datastream_v1/services/datastream/transports/__init__.py index b7d2ccc..8684788 100644 --- a/google/cloud/datastream_v1/services/datastream/transports/__init__.py +++ b/google/cloud/datastream_v1/services/datastream/transports/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastream_v1/services/datastream/transports/base.py b/google/cloud/datastream_v1/services/datastream/transports/base.py index a816f54..6be6f26 100644 --- a/google/cloud/datastream_v1/services/datastream/transports/base.py +++ b/google/cloud/datastream_v1/services/datastream/transports/base.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastream_v1/services/datastream/transports/grpc.py b/google/cloud/datastream_v1/services/datastream/transports/grpc.py index 7e82de6..e9b279d 100644 --- a/google/cloud/datastream_v1/services/datastream/transports/grpc.py +++ b/google/cloud/datastream_v1/services/datastream/transports/grpc.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastream_v1/services/datastream/transports/grpc_asyncio.py b/google/cloud/datastream_v1/services/datastream/transports/grpc_asyncio.py index e292d69..0e9c610 100644 --- a/google/cloud/datastream_v1/services/datastream/transports/grpc_asyncio.py +++ b/google/cloud/datastream_v1/services/datastream/transports/grpc_asyncio.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastream_v1/types/__init__.py b/google/cloud/datastream_v1/types/__init__.py index 1aafa21..ea4dd7f 100644 --- a/google/cloud/datastream_v1/types/__init__.py +++ b/google/cloud/datastream_v1/types/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastream_v1/types/datastream.py b/google/cloud/datastream_v1/types/datastream.py index 10e6772..1e57cc0 100644 --- a/google/cloud/datastream_v1/types/datastream.py +++ b/google/cloud/datastream_v1/types/datastream.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastream_v1/types/datastream_resources.py b/google/cloud/datastream_v1/types/datastream_resources.py index dd0ade4..71eab25 100644 --- a/google/cloud/datastream_v1/types/datastream_resources.py +++ b/google/cloud/datastream_v1/types/datastream_resources.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastream_v1alpha1/__init__.py b/google/cloud/datastream_v1alpha1/__init__.py index 1481aca..e143d2e 100644 --- a/google/cloud/datastream_v1alpha1/__init__.py +++ b/google/cloud/datastream_v1alpha1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastream_v1alpha1/services/__init__.py b/google/cloud/datastream_v1alpha1/services/__init__.py index 4de6597..e8e1c38 100644 --- a/google/cloud/datastream_v1alpha1/services/__init__.py +++ b/google/cloud/datastream_v1alpha1/services/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastream_v1alpha1/services/datastream/__init__.py b/google/cloud/datastream_v1alpha1/services/datastream/__init__.py index b2aee97..0e6c29f 100644 --- a/google/cloud/datastream_v1alpha1/services/datastream/__init__.py +++ b/google/cloud/datastream_v1alpha1/services/datastream/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastream_v1alpha1/services/datastream/async_client.py b/google/cloud/datastream_v1alpha1/services/datastream/async_client.py index 7d5c834..e9e829c 100644 --- a/google/cloud/datastream_v1alpha1/services/datastream/async_client.py +++ b/google/cloud/datastream_v1alpha1/services/datastream/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -224,6 +224,27 @@ async def list_connection_profiles( r"""Use this method to list connection profiles created in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_list_connection_profiles(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.ListConnectionProfilesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_connection_profiles(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.ListConnectionProfilesRequest, dict]): The request object. @@ -302,6 +323,26 @@ async def get_connection_profile( r"""Use this method to get details about a connection profile. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_get_connection_profile(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.GetConnectionProfileRequest( + name="name_value", + ) + + # Make the request + response = client.get_connection_profile(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.GetConnectionProfileRequest, dict]): The request object. @@ -373,6 +414,39 @@ async def create_connection_profile( r"""Use this method to create a connection profile in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_create_connection_profile(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + connection_profile = datastream_v1alpha1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1alpha1.CreateConnectionProfileRequest( + parent="parent_value", + connection_profile_id="connection_profile_id_value", + connection_profile=connection_profile, + ) + + # Make the request + operation = client.create_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.CreateConnectionProfileRequest, dict]): The request object. @@ -473,6 +547,37 @@ async def update_connection_profile( r"""Use this method to update the parameters of a connection profile. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_update_connection_profile(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + connection_profile = datastream_v1alpha1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1alpha1.UpdateConnectionProfileRequest( + connection_profile=connection_profile, + ) + + # Make the request + operation = client.update_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.UpdateConnectionProfileRequest, dict]): The request object. @@ -569,6 +674,29 @@ async def delete_connection_profile( ) -> operation_async.AsyncOperation: r"""Use this method to delete a connection profile.. + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_delete_connection_profile(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.DeleteConnectionProfileRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.DeleteConnectionProfileRequest, dict]): The request object. @@ -663,6 +791,35 @@ async def discover_connection_profile( returns children data objects under a parent data object that's optionally supplied in the request. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_discover_connection_profile(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + connection_profile = datastream_v1alpha1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1alpha1.DiscoverConnectionProfileRequest( + connection_profile=connection_profile, + recursive=True, + parent="parent_value", + ) + + # Make the request + response = client.discover_connection_profile(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.DiscoverConnectionProfileRequest, dict]): The request object. Request message for 'discover' @@ -712,6 +869,27 @@ async def list_streams( r"""Use this method to list streams in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_list_streams(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.ListStreamsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_streams(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.ListStreamsRequest, dict]): The request object. @@ -789,6 +967,25 @@ async def get_stream( ) -> datastream_resources.Stream: r"""Use this method to get details about a stream. + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_get_stream(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.GetStreamRequest( + name="name_value", + ) + + # Make the request + response = client.get_stream(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.GetStreamRequest, dict]): The request object. @@ -859,6 +1056,36 @@ async def create_stream( ) -> operation_async.AsyncOperation: r"""Use this method to create a stream. + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_create_stream(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + stream = datastream_v1alpha1.Stream() + stream.display_name = "display_name_value" + stream.source_config.source_connection_profile_name = "source_connection_profile_name_value" + stream.destination_config.destination_connection_profile_name = "destination_connection_profile_name_value" + + request = datastream_v1alpha1.CreateStreamRequest( + parent="parent_value", + stream_id="stream_id_value", + stream=stream, + ) + + # Make the request + operation = client.create_stream(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.CreateStreamRequest, dict]): The request object. @@ -957,6 +1184,35 @@ async def update_stream( r"""Use this method to update the configuration of a stream. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_update_stream(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + stream = datastream_v1alpha1.Stream() + stream.display_name = "display_name_value" + stream.source_config.source_connection_profile_name = "source_connection_profile_name_value" + stream.destination_config.destination_connection_profile_name = "destination_connection_profile_name_value" + + request = datastream_v1alpha1.UpdateStreamRequest( + stream=stream, + ) + + # Make the request + operation = client.update_stream(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.UpdateStreamRequest, dict]): The request object. @@ -1052,6 +1308,29 @@ async def delete_stream( ) -> operation_async.AsyncOperation: r"""Use this method to delete a stream. + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_delete_stream(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.DeleteStreamRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_stream(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.DeleteStreamRequest, dict]): The request object. @@ -1143,6 +1422,29 @@ async def fetch_errors( r"""Use this method to fetch any errors associated with a stream. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_fetch_errors(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.FetchErrorsRequest( + ) + + # Make the request + operation = client.fetch_errors(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.FetchErrorsRequest, dict]): The request object. Request message for 'FetchErrors' @@ -1207,6 +1509,27 @@ async def fetch_static_ips( children data objects under a parent data object that's optionally supplied in the request. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_fetch_static_ips(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.FetchStaticIpsRequest( + name="name_value", + ) + + # Make the request + page_result = client.fetch_static_ips(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.FetchStaticIpsRequest, dict]): The request object. Request message for 'FetchStaticIps' @@ -1290,6 +1613,35 @@ async def create_private_connection( r"""Use this method to create a private connectivity configuration. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_create_private_connection(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + private_connection = datastream_v1alpha1.PrivateConnection() + private_connection.display_name = "display_name_value" + + request = datastream_v1alpha1.CreatePrivateConnectionRequest( + parent="parent_value", + private_connection_id="private_connection_id_value", + private_connection=private_connection, + ) + + # Make the request + operation = client.create_private_connection(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.CreatePrivateConnectionRequest, dict]): The request object. @@ -1389,6 +1741,26 @@ async def get_private_connection( r"""Use this method to get details about a private connectivity configuration. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_get_private_connection(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.GetPrivateConnectionRequest( + name="name_value", + ) + + # Make the request + response = client.get_private_connection(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.GetPrivateConnectionRequest, dict]): The request object. @@ -1462,6 +1834,27 @@ async def list_private_connections( r"""Use this method to list private connectivity configurations in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_list_private_connections(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.ListPrivateConnectionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_private_connections(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.ListPrivateConnectionsRequest, dict]): The request object. @@ -1541,6 +1934,30 @@ async def delete_private_connection( r"""Use this method to delete a private connectivity configuration. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_delete_private_connection(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.DeletePrivateConnectionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_private_connection(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.DeletePrivateConnectionRequest, dict]): The request object. @@ -1635,6 +2052,36 @@ async def create_route( r"""Use this method to create a route for a private connectivity in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_create_route(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + route = datastream_v1alpha1.Route() + route.display_name = "display_name_value" + route.destination_address = "destination_address_value" + + request = datastream_v1alpha1.CreateRouteRequest( + parent="parent_value", + route_id="route_id_value", + route=route, + ) + + # Make the request + operation = client.create_route(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.CreateRouteRequest, dict]): The request object. route creation request @@ -1732,6 +2179,25 @@ async def get_route( ) -> datastream_resources.Route: r"""Use this method to get details about a route. + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_get_route(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.GetRouteRequest( + name="name_value", + ) + + # Make the request + response = client.get_route(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.GetRouteRequest, dict]): The request object. route get request @@ -1805,6 +2271,27 @@ async def list_routes( r"""Use this method to list routes created for a private connectivity in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_list_routes(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.ListRoutesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_routes(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.ListRoutesRequest, dict]): The request object. route list request @@ -1883,6 +2370,29 @@ async def delete_route( ) -> operation_async.AsyncOperation: r"""Use this method to delete a route. + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_delete_route(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.DeleteRouteRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_route(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.DeleteRouteRequest, dict]): The request object. route deletion request diff --git a/google/cloud/datastream_v1alpha1/services/datastream/client.py b/google/cloud/datastream_v1alpha1/services/datastream/client.py index 53794fa..09df963 100644 --- a/google/cloud/datastream_v1alpha1/services/datastream/client.py +++ b/google/cloud/datastream_v1alpha1/services/datastream/client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -472,6 +472,27 @@ def list_connection_profiles( r"""Use this method to list connection profiles created in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_list_connection_profiles(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.ListConnectionProfilesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_connection_profiles(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.ListConnectionProfilesRequest, dict]): The request object. @@ -550,6 +571,26 @@ def get_connection_profile( r"""Use this method to get details about a connection profile. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_get_connection_profile(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.GetConnectionProfileRequest( + name="name_value", + ) + + # Make the request + response = client.get_connection_profile(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.GetConnectionProfileRequest, dict]): The request object. @@ -621,6 +662,39 @@ def create_connection_profile( r"""Use this method to create a connection profile in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_create_connection_profile(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + connection_profile = datastream_v1alpha1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1alpha1.CreateConnectionProfileRequest( + parent="parent_value", + connection_profile_id="connection_profile_id_value", + connection_profile=connection_profile, + ) + + # Make the request + operation = client.create_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.CreateConnectionProfileRequest, dict]): The request object. @@ -723,6 +797,37 @@ def update_connection_profile( r"""Use this method to update the parameters of a connection profile. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_update_connection_profile(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + connection_profile = datastream_v1alpha1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1alpha1.UpdateConnectionProfileRequest( + connection_profile=connection_profile, + ) + + # Make the request + operation = client.update_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.UpdateConnectionProfileRequest, dict]): The request object. @@ -821,6 +926,29 @@ def delete_connection_profile( ) -> operation.Operation: r"""Use this method to delete a connection profile.. + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_delete_connection_profile(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.DeleteConnectionProfileRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.DeleteConnectionProfileRequest, dict]): The request object. @@ -917,6 +1045,35 @@ def discover_connection_profile( returns children data objects under a parent data object that's optionally supplied in the request. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_discover_connection_profile(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + connection_profile = datastream_v1alpha1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1alpha1.DiscoverConnectionProfileRequest( + connection_profile=connection_profile, + recursive=True, + parent="parent_value", + ) + + # Make the request + response = client.discover_connection_profile(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.DiscoverConnectionProfileRequest, dict]): The request object. Request message for 'discover' @@ -969,6 +1126,27 @@ def list_streams( r"""Use this method to list streams in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_list_streams(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.ListStreamsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_streams(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.ListStreamsRequest, dict]): The request object. @@ -1046,6 +1224,25 @@ def get_stream( ) -> datastream_resources.Stream: r"""Use this method to get details about a stream. + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_get_stream(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.GetStreamRequest( + name="name_value", + ) + + # Make the request + response = client.get_stream(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.GetStreamRequest, dict]): The request object. @@ -1116,6 +1313,36 @@ def create_stream( ) -> operation.Operation: r"""Use this method to create a stream. + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_create_stream(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + stream = datastream_v1alpha1.Stream() + stream.display_name = "display_name_value" + stream.source_config.source_connection_profile_name = "source_connection_profile_name_value" + stream.destination_config.destination_connection_profile_name = "destination_connection_profile_name_value" + + request = datastream_v1alpha1.CreateStreamRequest( + parent="parent_value", + stream_id="stream_id_value", + stream=stream, + ) + + # Make the request + operation = client.create_stream(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.CreateStreamRequest, dict]): The request object. @@ -1214,6 +1441,35 @@ def update_stream( r"""Use this method to update the configuration of a stream. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_update_stream(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + stream = datastream_v1alpha1.Stream() + stream.display_name = "display_name_value" + stream.source_config.source_connection_profile_name = "source_connection_profile_name_value" + stream.destination_config.destination_connection_profile_name = "destination_connection_profile_name_value" + + request = datastream_v1alpha1.UpdateStreamRequest( + stream=stream, + ) + + # Make the request + operation = client.update_stream(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.UpdateStreamRequest, dict]): The request object. @@ -1309,6 +1565,29 @@ def delete_stream( ) -> operation.Operation: r"""Use this method to delete a stream. + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_delete_stream(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.DeleteStreamRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_stream(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.DeleteStreamRequest, dict]): The request object. @@ -1400,6 +1679,29 @@ def fetch_errors( r"""Use this method to fetch any errors associated with a stream. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_fetch_errors(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.FetchErrorsRequest( + ) + + # Make the request + operation = client.fetch_errors(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.FetchErrorsRequest, dict]): The request object. Request message for 'FetchErrors' @@ -1465,6 +1767,27 @@ def fetch_static_ips( children data objects under a parent data object that's optionally supplied in the request. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_fetch_static_ips(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.FetchStaticIpsRequest( + name="name_value", + ) + + # Make the request + page_result = client.fetch_static_ips(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.FetchStaticIpsRequest, dict]): The request object. Request message for 'FetchStaticIps' @@ -1548,6 +1871,35 @@ def create_private_connection( r"""Use this method to create a private connectivity configuration. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_create_private_connection(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + private_connection = datastream_v1alpha1.PrivateConnection() + private_connection.display_name = "display_name_value" + + request = datastream_v1alpha1.CreatePrivateConnectionRequest( + parent="parent_value", + private_connection_id="private_connection_id_value", + private_connection=private_connection, + ) + + # Make the request + operation = client.create_private_connection(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.CreatePrivateConnectionRequest, dict]): The request object. @@ -1649,6 +2001,26 @@ def get_private_connection( r"""Use this method to get details about a private connectivity configuration. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_get_private_connection(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.GetPrivateConnectionRequest( + name="name_value", + ) + + # Make the request + response = client.get_private_connection(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.GetPrivateConnectionRequest, dict]): The request object. @@ -1722,6 +2094,27 @@ def list_private_connections( r"""Use this method to list private connectivity configurations in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_list_private_connections(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.ListPrivateConnectionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_private_connections(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.ListPrivateConnectionsRequest, dict]): The request object. @@ -1801,6 +2194,30 @@ def delete_private_connection( r"""Use this method to delete a private connectivity configuration. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_delete_private_connection(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.DeletePrivateConnectionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_private_connection(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.DeletePrivateConnectionRequest, dict]): The request object. @@ -1897,6 +2314,36 @@ def create_route( r"""Use this method to create a route for a private connectivity in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_create_route(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + route = datastream_v1alpha1.Route() + route.display_name = "display_name_value" + route.destination_address = "destination_address_value" + + request = datastream_v1alpha1.CreateRouteRequest( + parent="parent_value", + route_id="route_id_value", + route=route, + ) + + # Make the request + operation = client.create_route(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.CreateRouteRequest, dict]): The request object. route creation request @@ -1994,6 +2441,25 @@ def get_route( ) -> datastream_resources.Route: r"""Use this method to get details about a route. + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_get_route(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.GetRouteRequest( + name="name_value", + ) + + # Make the request + response = client.get_route(request=request) + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.GetRouteRequest, dict]): The request object. route get request @@ -2067,6 +2533,27 @@ def list_routes( r"""Use this method to list routes created for a private connectivity in a project and location. + + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_list_routes(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.ListRoutesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_routes(request=request) + + # Handle the response + for response in page_result: + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.ListRoutesRequest, dict]): The request object. route list request @@ -2145,6 +2632,29 @@ def delete_route( ) -> operation.Operation: r"""Use this method to delete a route. + .. code-block:: python + + from google.cloud import datastream_v1alpha1 + + def sample_delete_route(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.DeleteRouteRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_route(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + Args: request (Union[google.cloud.datastream_v1alpha1.types.DeleteRouteRequest, dict]): The request object. route deletion request diff --git a/google/cloud/datastream_v1alpha1/services/datastream/pagers.py b/google/cloud/datastream_v1alpha1/services/datastream/pagers.py index 8c0e91e..68b28f6 100644 --- a/google/cloud/datastream_v1alpha1/services/datastream/pagers.py +++ b/google/cloud/datastream_v1alpha1/services/datastream/pagers.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastream_v1alpha1/services/datastream/transports/__init__.py b/google/cloud/datastream_v1alpha1/services/datastream/transports/__init__.py index b7d2ccc..8684788 100644 --- a/google/cloud/datastream_v1alpha1/services/datastream/transports/__init__.py +++ b/google/cloud/datastream_v1alpha1/services/datastream/transports/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastream_v1alpha1/services/datastream/transports/base.py b/google/cloud/datastream_v1alpha1/services/datastream/transports/base.py index 43d4725..37457e4 100644 --- a/google/cloud/datastream_v1alpha1/services/datastream/transports/base.py +++ b/google/cloud/datastream_v1alpha1/services/datastream/transports/base.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastream_v1alpha1/services/datastream/transports/grpc.py b/google/cloud/datastream_v1alpha1/services/datastream/transports/grpc.py index 392cb31..6bfd130 100644 --- a/google/cloud/datastream_v1alpha1/services/datastream/transports/grpc.py +++ b/google/cloud/datastream_v1alpha1/services/datastream/transports/grpc.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastream_v1alpha1/services/datastream/transports/grpc_asyncio.py b/google/cloud/datastream_v1alpha1/services/datastream/transports/grpc_asyncio.py index d50d487..d36b5b6 100644 --- a/google/cloud/datastream_v1alpha1/services/datastream/transports/grpc_asyncio.py +++ b/google/cloud/datastream_v1alpha1/services/datastream/transports/grpc_asyncio.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastream_v1alpha1/types/__init__.py b/google/cloud/datastream_v1alpha1/types/__init__.py index 6b7ad92..bcb6350 100644 --- a/google/cloud/datastream_v1alpha1/types/__init__.py +++ b/google/cloud/datastream_v1alpha1/types/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastream_v1alpha1/types/datastream.py b/google/cloud/datastream_v1alpha1/types/datastream.py index cfdf1d3..327eb74 100644 --- a/google/cloud/datastream_v1alpha1/types/datastream.py +++ b/google/cloud/datastream_v1alpha1/types/datastream.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/datastream_v1alpha1/types/datastream_resources.py b/google/cloud/datastream_v1alpha1/types/datastream_resources.py index 8a41a4b..b6c2f08 100644 --- a/google/cloud/datastream_v1alpha1/types/datastream_resources.py +++ b/google/cloud/datastream_v1alpha1/types/datastream_resources.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/generated_samples/datastream_v1_generated_datastream_create_connection_profile_async.py b/samples/generated_samples/datastream_v1_generated_datastream_create_connection_profile_async.py new file mode 100644 index 0000000..1d8dd91 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_create_connection_profile_async.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_CreateConnectionProfile_async] +from google.cloud import datastream_v1 + + +async def sample_create_connection_profile(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + connection_profile = datastream_v1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1.CreateConnectionProfileRequest( + parent="parent_value", + connection_profile_id="connection_profile_id_value", + connection_profile=connection_profile, + ) + + # Make the request + operation = client.create_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_CreateConnectionProfile_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_create_connection_profile_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_create_connection_profile_sync.py new file mode 100644 index 0000000..baa6c1a --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_create_connection_profile_sync.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_CreateConnectionProfile_sync] +from google.cloud import datastream_v1 + + +def sample_create_connection_profile(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + connection_profile = datastream_v1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1.CreateConnectionProfileRequest( + parent="parent_value", + connection_profile_id="connection_profile_id_value", + connection_profile=connection_profile, + ) + + # Make the request + operation = client.create_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_CreateConnectionProfile_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_create_private_connection_async.py b/samples/generated_samples/datastream_v1_generated_datastream_create_private_connection_async.py new file mode 100644 index 0000000..ed52a6b --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_create_private_connection_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreatePrivateConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_CreatePrivateConnection_async] +from google.cloud import datastream_v1 + + +async def sample_create_private_connection(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + private_connection = datastream_v1.PrivateConnection() + private_connection.display_name = "display_name_value" + + request = datastream_v1.CreatePrivateConnectionRequest( + parent="parent_value", + private_connection_id="private_connection_id_value", + private_connection=private_connection, + ) + + # Make the request + operation = client.create_private_connection(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_CreatePrivateConnection_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_create_private_connection_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_create_private_connection_sync.py new file mode 100644 index 0000000..aa7c290 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_create_private_connection_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreatePrivateConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_CreatePrivateConnection_sync] +from google.cloud import datastream_v1 + + +def sample_create_private_connection(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + private_connection = datastream_v1.PrivateConnection() + private_connection.display_name = "display_name_value" + + request = datastream_v1.CreatePrivateConnectionRequest( + parent="parent_value", + private_connection_id="private_connection_id_value", + private_connection=private_connection, + ) + + # Make the request + operation = client.create_private_connection(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_CreatePrivateConnection_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_create_route_async.py b/samples/generated_samples/datastream_v1_generated_datastream_create_route_async.py new file mode 100644 index 0000000..2b2f489 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_create_route_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateRoute +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_CreateRoute_async] +from google.cloud import datastream_v1 + + +async def sample_create_route(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + route = datastream_v1.Route() + route.display_name = "display_name_value" + route.destination_address = "destination_address_value" + + request = datastream_v1.CreateRouteRequest( + parent="parent_value", + route_id="route_id_value", + route=route, + ) + + # Make the request + operation = client.create_route(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_CreateRoute_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_create_route_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_create_route_sync.py new file mode 100644 index 0000000..d449442 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_create_route_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateRoute +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_CreateRoute_sync] +from google.cloud import datastream_v1 + + +def sample_create_route(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + route = datastream_v1.Route() + route.display_name = "display_name_value" + route.destination_address = "destination_address_value" + + request = datastream_v1.CreateRouteRequest( + parent="parent_value", + route_id="route_id_value", + route=route, + ) + + # Make the request + operation = client.create_route(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_CreateRoute_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_create_stream_async.py b/samples/generated_samples/datastream_v1_generated_datastream_create_stream_async.py new file mode 100644 index 0000000..639ee71 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_create_stream_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateStream +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_CreateStream_async] +from google.cloud import datastream_v1 + + +async def sample_create_stream(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + stream = datastream_v1.Stream() + stream.display_name = "display_name_value" + stream.source_config.source_connection_profile = "source_connection_profile_value" + stream.destination_config.destination_connection_profile = "destination_connection_profile_value" + + request = datastream_v1.CreateStreamRequest( + parent="parent_value", + stream_id="stream_id_value", + stream=stream, + ) + + # Make the request + operation = client.create_stream(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_CreateStream_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_create_stream_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_create_stream_sync.py new file mode 100644 index 0000000..cdb75f6 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_create_stream_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateStream +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_CreateStream_sync] +from google.cloud import datastream_v1 + + +def sample_create_stream(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + stream = datastream_v1.Stream() + stream.display_name = "display_name_value" + stream.source_config.source_connection_profile = "source_connection_profile_value" + stream.destination_config.destination_connection_profile = "destination_connection_profile_value" + + request = datastream_v1.CreateStreamRequest( + parent="parent_value", + stream_id="stream_id_value", + stream=stream, + ) + + # Make the request + operation = client.create_stream(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_CreateStream_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_delete_connection_profile_async.py b/samples/generated_samples/datastream_v1_generated_datastream_delete_connection_profile_async.py new file mode 100644 index 0000000..0a36465 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_delete_connection_profile_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_DeleteConnectionProfile_async] +from google.cloud import datastream_v1 + + +async def sample_delete_connection_profile(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1.DeleteConnectionProfileRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_DeleteConnectionProfile_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_delete_connection_profile_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_delete_connection_profile_sync.py new file mode 100644 index 0000000..886ecf6 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_delete_connection_profile_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_DeleteConnectionProfile_sync] +from google.cloud import datastream_v1 + + +def sample_delete_connection_profile(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.DeleteConnectionProfileRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_DeleteConnectionProfile_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_delete_private_connection_async.py b/samples/generated_samples/datastream_v1_generated_datastream_delete_private_connection_async.py new file mode 100644 index 0000000..b982710 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_delete_private_connection_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeletePrivateConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_DeletePrivateConnection_async] +from google.cloud import datastream_v1 + + +async def sample_delete_private_connection(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1.DeletePrivateConnectionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_private_connection(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_DeletePrivateConnection_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_delete_private_connection_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_delete_private_connection_sync.py new file mode 100644 index 0000000..e4efc38 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_delete_private_connection_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeletePrivateConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_DeletePrivateConnection_sync] +from google.cloud import datastream_v1 + + +def sample_delete_private_connection(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.DeletePrivateConnectionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_private_connection(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_DeletePrivateConnection_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_delete_route_async.py b/samples/generated_samples/datastream_v1_generated_datastream_delete_route_async.py new file mode 100644 index 0000000..11d582f --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_delete_route_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteRoute +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_DeleteRoute_async] +from google.cloud import datastream_v1 + + +async def sample_delete_route(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1.DeleteRouteRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_route(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_DeleteRoute_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_delete_route_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_delete_route_sync.py new file mode 100644 index 0000000..71143c5 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_delete_route_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteRoute +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_DeleteRoute_sync] +from google.cloud import datastream_v1 + + +def sample_delete_route(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.DeleteRouteRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_route(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_DeleteRoute_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_delete_stream_async.py b/samples/generated_samples/datastream_v1_generated_datastream_delete_stream_async.py new file mode 100644 index 0000000..0c21081 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_delete_stream_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteStream +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_DeleteStream_async] +from google.cloud import datastream_v1 + + +async def sample_delete_stream(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1.DeleteStreamRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_stream(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_DeleteStream_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_delete_stream_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_delete_stream_sync.py new file mode 100644 index 0000000..0c9fc5a --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_delete_stream_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteStream +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_DeleteStream_sync] +from google.cloud import datastream_v1 + + +def sample_delete_stream(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.DeleteStreamRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_stream(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_DeleteStream_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_discover_connection_profile_async.py b/samples/generated_samples/datastream_v1_generated_datastream_discover_connection_profile_async.py new file mode 100644 index 0000000..fc4a8fd --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_discover_connection_profile_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DiscoverConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_DiscoverConnectionProfile_async] +from google.cloud import datastream_v1 + + +async def sample_discover_connection_profile(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + connection_profile = datastream_v1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1.DiscoverConnectionProfileRequest( + connection_profile=connection_profile, + full_hierarchy=True, + parent="parent_value", + ) + + # Make the request + response = await client.discover_connection_profile(request=request) + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_DiscoverConnectionProfile_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_discover_connection_profile_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_discover_connection_profile_sync.py new file mode 100644 index 0000000..d4e13e0 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_discover_connection_profile_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DiscoverConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_DiscoverConnectionProfile_sync] +from google.cloud import datastream_v1 + + +def sample_discover_connection_profile(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + connection_profile = datastream_v1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1.DiscoverConnectionProfileRequest( + connection_profile=connection_profile, + full_hierarchy=True, + parent="parent_value", + ) + + # Make the request + response = client.discover_connection_profile(request=request) + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_DiscoverConnectionProfile_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_fetch_static_ips_async.py b/samples/generated_samples/datastream_v1_generated_datastream_fetch_static_ips_async.py new file mode 100644 index 0000000..f4eba29 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_fetch_static_ips_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for FetchStaticIps +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_FetchStaticIps_async] +from google.cloud import datastream_v1 + + +async def sample_fetch_static_ips(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1.FetchStaticIpsRequest( + name="name_value", + ) + + # Make the request + page_result = client.fetch_static_ips(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END datastream_v1_generated_Datastream_FetchStaticIps_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_fetch_static_ips_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_fetch_static_ips_sync.py new file mode 100644 index 0000000..5e0ab53 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_fetch_static_ips_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for FetchStaticIps +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_FetchStaticIps_sync] +from google.cloud import datastream_v1 + + +def sample_fetch_static_ips(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.FetchStaticIpsRequest( + name="name_value", + ) + + # Make the request + page_result = client.fetch_static_ips(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END datastream_v1_generated_Datastream_FetchStaticIps_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_get_connection_profile_async.py b/samples/generated_samples/datastream_v1_generated_datastream_get_connection_profile_async.py new file mode 100644 index 0000000..f9251df --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_get_connection_profile_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_GetConnectionProfile_async] +from google.cloud import datastream_v1 + + +async def sample_get_connection_profile(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1.GetConnectionProfileRequest( + name="name_value", + ) + + # Make the request + response = await client.get_connection_profile(request=request) + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_GetConnectionProfile_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_get_connection_profile_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_get_connection_profile_sync.py new file mode 100644 index 0000000..0ab6f99 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_get_connection_profile_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_GetConnectionProfile_sync] +from google.cloud import datastream_v1 + + +def sample_get_connection_profile(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.GetConnectionProfileRequest( + name="name_value", + ) + + # Make the request + response = client.get_connection_profile(request=request) + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_GetConnectionProfile_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_get_private_connection_async.py b/samples/generated_samples/datastream_v1_generated_datastream_get_private_connection_async.py new file mode 100644 index 0000000..f233545 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_get_private_connection_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetPrivateConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_GetPrivateConnection_async] +from google.cloud import datastream_v1 + + +async def sample_get_private_connection(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1.GetPrivateConnectionRequest( + name="name_value", + ) + + # Make the request + response = await client.get_private_connection(request=request) + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_GetPrivateConnection_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_get_private_connection_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_get_private_connection_sync.py new file mode 100644 index 0000000..8e71f97 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_get_private_connection_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetPrivateConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_GetPrivateConnection_sync] +from google.cloud import datastream_v1 + + +def sample_get_private_connection(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.GetPrivateConnectionRequest( + name="name_value", + ) + + # Make the request + response = client.get_private_connection(request=request) + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_GetPrivateConnection_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_get_route_async.py b/samples/generated_samples/datastream_v1_generated_datastream_get_route_async.py new file mode 100644 index 0000000..9ee0d5f --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_get_route_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetRoute +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_GetRoute_async] +from google.cloud import datastream_v1 + + +async def sample_get_route(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1.GetRouteRequest( + name="name_value", + ) + + # Make the request + response = await client.get_route(request=request) + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_GetRoute_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_get_route_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_get_route_sync.py new file mode 100644 index 0000000..e33689d --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_get_route_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetRoute +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_GetRoute_sync] +from google.cloud import datastream_v1 + + +def sample_get_route(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.GetRouteRequest( + name="name_value", + ) + + # Make the request + response = client.get_route(request=request) + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_GetRoute_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_get_stream_async.py b/samples/generated_samples/datastream_v1_generated_datastream_get_stream_async.py new file mode 100644 index 0000000..82d5e50 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_get_stream_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetStream +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_GetStream_async] +from google.cloud import datastream_v1 + + +async def sample_get_stream(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1.GetStreamRequest( + name="name_value", + ) + + # Make the request + response = await client.get_stream(request=request) + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_GetStream_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_get_stream_object_async.py b/samples/generated_samples/datastream_v1_generated_datastream_get_stream_object_async.py new file mode 100644 index 0000000..ff1c983 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_get_stream_object_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetStreamObject +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_GetStreamObject_async] +from google.cloud import datastream_v1 + + +async def sample_get_stream_object(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1.GetStreamObjectRequest( + name="name_value", + ) + + # Make the request + response = await client.get_stream_object(request=request) + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_GetStreamObject_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_get_stream_object_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_get_stream_object_sync.py new file mode 100644 index 0000000..bcdee83 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_get_stream_object_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetStreamObject +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_GetStreamObject_sync] +from google.cloud import datastream_v1 + + +def sample_get_stream_object(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.GetStreamObjectRequest( + name="name_value", + ) + + # Make the request + response = client.get_stream_object(request=request) + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_GetStreamObject_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_get_stream_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_get_stream_sync.py new file mode 100644 index 0000000..83392d0 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_get_stream_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetStream +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_GetStream_sync] +from google.cloud import datastream_v1 + + +def sample_get_stream(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.GetStreamRequest( + name="name_value", + ) + + # Make the request + response = client.get_stream(request=request) + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_GetStream_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_list_connection_profiles_async.py b/samples/generated_samples/datastream_v1_generated_datastream_list_connection_profiles_async.py new file mode 100644 index 0000000..498805a --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_list_connection_profiles_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListConnectionProfiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_ListConnectionProfiles_async] +from google.cloud import datastream_v1 + + +async def sample_list_connection_profiles(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1.ListConnectionProfilesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_connection_profiles(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END datastream_v1_generated_Datastream_ListConnectionProfiles_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_list_connection_profiles_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_list_connection_profiles_sync.py new file mode 100644 index 0000000..430bfce --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_list_connection_profiles_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListConnectionProfiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_ListConnectionProfiles_sync] +from google.cloud import datastream_v1 + + +def sample_list_connection_profiles(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.ListConnectionProfilesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_connection_profiles(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END datastream_v1_generated_Datastream_ListConnectionProfiles_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_list_private_connections_async.py b/samples/generated_samples/datastream_v1_generated_datastream_list_private_connections_async.py new file mode 100644 index 0000000..5e0ee81 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_list_private_connections_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListPrivateConnections +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_ListPrivateConnections_async] +from google.cloud import datastream_v1 + + +async def sample_list_private_connections(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1.ListPrivateConnectionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_private_connections(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END datastream_v1_generated_Datastream_ListPrivateConnections_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_list_private_connections_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_list_private_connections_sync.py new file mode 100644 index 0000000..26ea0f3 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_list_private_connections_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListPrivateConnections +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_ListPrivateConnections_sync] +from google.cloud import datastream_v1 + + +def sample_list_private_connections(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.ListPrivateConnectionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_private_connections(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END datastream_v1_generated_Datastream_ListPrivateConnections_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_list_routes_async.py b/samples/generated_samples/datastream_v1_generated_datastream_list_routes_async.py new file mode 100644 index 0000000..378a026 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_list_routes_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListRoutes +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_ListRoutes_async] +from google.cloud import datastream_v1 + + +async def sample_list_routes(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1.ListRoutesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_routes(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END datastream_v1_generated_Datastream_ListRoutes_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_list_routes_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_list_routes_sync.py new file mode 100644 index 0000000..a542133 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_list_routes_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListRoutes +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_ListRoutes_sync] +from google.cloud import datastream_v1 + + +def sample_list_routes(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.ListRoutesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_routes(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END datastream_v1_generated_Datastream_ListRoutes_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_list_stream_objects_async.py b/samples/generated_samples/datastream_v1_generated_datastream_list_stream_objects_async.py new file mode 100644 index 0000000..d4a26f0 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_list_stream_objects_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListStreamObjects +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_ListStreamObjects_async] +from google.cloud import datastream_v1 + + +async def sample_list_stream_objects(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1.ListStreamObjectsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_stream_objects(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END datastream_v1_generated_Datastream_ListStreamObjects_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_list_stream_objects_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_list_stream_objects_sync.py new file mode 100644 index 0000000..b7bd2d3 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_list_stream_objects_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListStreamObjects +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_ListStreamObjects_sync] +from google.cloud import datastream_v1 + + +def sample_list_stream_objects(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.ListStreamObjectsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_stream_objects(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END datastream_v1_generated_Datastream_ListStreamObjects_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_list_streams_async.py b/samples/generated_samples/datastream_v1_generated_datastream_list_streams_async.py new file mode 100644 index 0000000..984b5cc --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_list_streams_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListStreams +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_ListStreams_async] +from google.cloud import datastream_v1 + + +async def sample_list_streams(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1.ListStreamsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_streams(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END datastream_v1_generated_Datastream_ListStreams_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_list_streams_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_list_streams_sync.py new file mode 100644 index 0000000..12eb779 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_list_streams_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListStreams +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_ListStreams_sync] +from google.cloud import datastream_v1 + + +def sample_list_streams(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.ListStreamsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_streams(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END datastream_v1_generated_Datastream_ListStreams_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_lookup_stream_object_async.py b/samples/generated_samples/datastream_v1_generated_datastream_lookup_stream_object_async.py new file mode 100644 index 0000000..d348234 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_lookup_stream_object_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for LookupStreamObject +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_LookupStreamObject_async] +from google.cloud import datastream_v1 + + +async def sample_lookup_stream_object(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + source_object_identifier = datastream_v1.SourceObjectIdentifier() + source_object_identifier.oracle_identifier.schema = "schema_value" + source_object_identifier.oracle_identifier.table = "table_value" + + request = datastream_v1.LookupStreamObjectRequest( + parent="parent_value", + source_object_identifier=source_object_identifier, + ) + + # Make the request + response = await client.lookup_stream_object(request=request) + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_LookupStreamObject_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_lookup_stream_object_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_lookup_stream_object_sync.py new file mode 100644 index 0000000..71a4fbf --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_lookup_stream_object_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for LookupStreamObject +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_LookupStreamObject_sync] +from google.cloud import datastream_v1 + + +def sample_lookup_stream_object(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + source_object_identifier = datastream_v1.SourceObjectIdentifier() + source_object_identifier.oracle_identifier.schema = "schema_value" + source_object_identifier.oracle_identifier.table = "table_value" + + request = datastream_v1.LookupStreamObjectRequest( + parent="parent_value", + source_object_identifier=source_object_identifier, + ) + + # Make the request + response = client.lookup_stream_object(request=request) + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_LookupStreamObject_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_start_backfill_job_async.py b/samples/generated_samples/datastream_v1_generated_datastream_start_backfill_job_async.py new file mode 100644 index 0000000..ea97fc6 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_start_backfill_job_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for StartBackfillJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_StartBackfillJob_async] +from google.cloud import datastream_v1 + + +async def sample_start_backfill_job(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1.StartBackfillJobRequest( + object_="object__value", + ) + + # Make the request + response = await client.start_backfill_job(request=request) + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_StartBackfillJob_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_start_backfill_job_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_start_backfill_job_sync.py new file mode 100644 index 0000000..a4b8c2b --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_start_backfill_job_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for StartBackfillJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_StartBackfillJob_sync] +from google.cloud import datastream_v1 + + +def sample_start_backfill_job(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.StartBackfillJobRequest( + object_="object__value", + ) + + # Make the request + response = client.start_backfill_job(request=request) + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_StartBackfillJob_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_stop_backfill_job_async.py b/samples/generated_samples/datastream_v1_generated_datastream_stop_backfill_job_async.py new file mode 100644 index 0000000..87fc602 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_stop_backfill_job_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for StopBackfillJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_StopBackfillJob_async] +from google.cloud import datastream_v1 + + +async def sample_stop_backfill_job(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1.StopBackfillJobRequest( + object_="object__value", + ) + + # Make the request + response = await client.stop_backfill_job(request=request) + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_StopBackfillJob_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_stop_backfill_job_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_stop_backfill_job_sync.py new file mode 100644 index 0000000..02fb2fa --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_stop_backfill_job_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for StopBackfillJob +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_StopBackfillJob_sync] +from google.cloud import datastream_v1 + + +def sample_stop_backfill_job(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1.StopBackfillJobRequest( + object_="object__value", + ) + + # Make the request + response = client.stop_backfill_job(request=request) + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_StopBackfillJob_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_update_connection_profile_async.py b/samples/generated_samples/datastream_v1_generated_datastream_update_connection_profile_async.py new file mode 100644 index 0000000..6674c34 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_update_connection_profile_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_UpdateConnectionProfile_async] +from google.cloud import datastream_v1 + + +async def sample_update_connection_profile(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + connection_profile = datastream_v1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1.UpdateConnectionProfileRequest( + connection_profile=connection_profile, + ) + + # Make the request + operation = client.update_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_UpdateConnectionProfile_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_update_connection_profile_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_update_connection_profile_sync.py new file mode 100644 index 0000000..c8a6b72 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_update_connection_profile_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_UpdateConnectionProfile_sync] +from google.cloud import datastream_v1 + + +def sample_update_connection_profile(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + connection_profile = datastream_v1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1.UpdateConnectionProfileRequest( + connection_profile=connection_profile, + ) + + # Make the request + operation = client.update_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_UpdateConnectionProfile_sync] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_update_stream_async.py b/samples/generated_samples/datastream_v1_generated_datastream_update_stream_async.py new file mode 100644 index 0000000..1eeff0c --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_update_stream_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateStream +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_UpdateStream_async] +from google.cloud import datastream_v1 + + +async def sample_update_stream(): + # Create a client + client = datastream_v1.DatastreamAsyncClient() + + # Initialize request argument(s) + stream = datastream_v1.Stream() + stream.display_name = "display_name_value" + stream.source_config.source_connection_profile = "source_connection_profile_value" + stream.destination_config.destination_connection_profile = "destination_connection_profile_value" + + request = datastream_v1.UpdateStreamRequest( + stream=stream, + ) + + # Make the request + operation = client.update_stream(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_UpdateStream_async] diff --git a/samples/generated_samples/datastream_v1_generated_datastream_update_stream_sync.py b/samples/generated_samples/datastream_v1_generated_datastream_update_stream_sync.py new file mode 100644 index 0000000..7631c17 --- /dev/null +++ b/samples/generated_samples/datastream_v1_generated_datastream_update_stream_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateStream +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1_generated_Datastream_UpdateStream_sync] +from google.cloud import datastream_v1 + + +def sample_update_stream(): + # Create a client + client = datastream_v1.DatastreamClient() + + # Initialize request argument(s) + stream = datastream_v1.Stream() + stream.display_name = "display_name_value" + stream.source_config.source_connection_profile = "source_connection_profile_value" + stream.destination_config.destination_connection_profile = "destination_connection_profile_value" + + request = datastream_v1.UpdateStreamRequest( + stream=stream, + ) + + # Make the request + operation = client.update_stream(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datastream_v1_generated_Datastream_UpdateStream_sync] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_connection_profile_async.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_connection_profile_async.py new file mode 100644 index 0000000..4c4d714 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_connection_profile_async.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_CreateConnectionProfile_async] +from google.cloud import datastream_v1alpha1 + + +async def sample_create_connection_profile(): + # Create a client + client = datastream_v1alpha1.DatastreamAsyncClient() + + # Initialize request argument(s) + connection_profile = datastream_v1alpha1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1alpha1.CreateConnectionProfileRequest( + parent="parent_value", + connection_profile_id="connection_profile_id_value", + connection_profile=connection_profile, + ) + + # Make the request + operation = client.create_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_CreateConnectionProfile_async] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_connection_profile_sync.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_connection_profile_sync.py new file mode 100644 index 0000000..f8643ee --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_connection_profile_sync.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_CreateConnectionProfile_sync] +from google.cloud import datastream_v1alpha1 + + +def sample_create_connection_profile(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + connection_profile = datastream_v1alpha1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1alpha1.CreateConnectionProfileRequest( + parent="parent_value", + connection_profile_id="connection_profile_id_value", + connection_profile=connection_profile, + ) + + # Make the request + operation = client.create_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_CreateConnectionProfile_sync] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_private_connection_async.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_private_connection_async.py new file mode 100644 index 0000000..df38638 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_private_connection_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreatePrivateConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_CreatePrivateConnection_async] +from google.cloud import datastream_v1alpha1 + + +async def sample_create_private_connection(): + # Create a client + client = datastream_v1alpha1.DatastreamAsyncClient() + + # Initialize request argument(s) + private_connection = datastream_v1alpha1.PrivateConnection() + private_connection.display_name = "display_name_value" + + request = datastream_v1alpha1.CreatePrivateConnectionRequest( + parent="parent_value", + private_connection_id="private_connection_id_value", + private_connection=private_connection, + ) + + # Make the request + operation = client.create_private_connection(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_CreatePrivateConnection_async] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_private_connection_sync.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_private_connection_sync.py new file mode 100644 index 0000000..975ff1f --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_private_connection_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreatePrivateConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_CreatePrivateConnection_sync] +from google.cloud import datastream_v1alpha1 + + +def sample_create_private_connection(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + private_connection = datastream_v1alpha1.PrivateConnection() + private_connection.display_name = "display_name_value" + + request = datastream_v1alpha1.CreatePrivateConnectionRequest( + parent="parent_value", + private_connection_id="private_connection_id_value", + private_connection=private_connection, + ) + + # Make the request + operation = client.create_private_connection(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_CreatePrivateConnection_sync] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_route_async.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_route_async.py new file mode 100644 index 0000000..c0b70df --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_route_async.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateRoute +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_CreateRoute_async] +from google.cloud import datastream_v1alpha1 + + +async def sample_create_route(): + # Create a client + client = datastream_v1alpha1.DatastreamAsyncClient() + + # Initialize request argument(s) + route = datastream_v1alpha1.Route() + route.display_name = "display_name_value" + route.destination_address = "destination_address_value" + + request = datastream_v1alpha1.CreateRouteRequest( + parent="parent_value", + route_id="route_id_value", + route=route, + ) + + # Make the request + operation = client.create_route(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_CreateRoute_async] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_route_sync.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_route_sync.py new file mode 100644 index 0000000..7d44fb5 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_route_sync.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateRoute +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_CreateRoute_sync] +from google.cloud import datastream_v1alpha1 + + +def sample_create_route(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + route = datastream_v1alpha1.Route() + route.display_name = "display_name_value" + route.destination_address = "destination_address_value" + + request = datastream_v1alpha1.CreateRouteRequest( + parent="parent_value", + route_id="route_id_value", + route=route, + ) + + # Make the request + operation = client.create_route(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_CreateRoute_sync] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_stream_async.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_stream_async.py new file mode 100644 index 0000000..740be9d --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_stream_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateStream +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_CreateStream_async] +from google.cloud import datastream_v1alpha1 + + +async def sample_create_stream(): + # Create a client + client = datastream_v1alpha1.DatastreamAsyncClient() + + # Initialize request argument(s) + stream = datastream_v1alpha1.Stream() + stream.display_name = "display_name_value" + stream.source_config.source_connection_profile_name = "source_connection_profile_name_value" + stream.destination_config.destination_connection_profile_name = "destination_connection_profile_name_value" + + request = datastream_v1alpha1.CreateStreamRequest( + parent="parent_value", + stream_id="stream_id_value", + stream=stream, + ) + + # Make the request + operation = client.create_stream(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_CreateStream_async] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_stream_sync.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_stream_sync.py new file mode 100644 index 0000000..b379d26 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_create_stream_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateStream +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_CreateStream_sync] +from google.cloud import datastream_v1alpha1 + + +def sample_create_stream(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + stream = datastream_v1alpha1.Stream() + stream.display_name = "display_name_value" + stream.source_config.source_connection_profile_name = "source_connection_profile_name_value" + stream.destination_config.destination_connection_profile_name = "destination_connection_profile_name_value" + + request = datastream_v1alpha1.CreateStreamRequest( + parent="parent_value", + stream_id="stream_id_value", + stream=stream, + ) + + # Make the request + operation = client.create_stream(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_CreateStream_sync] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_connection_profile_async.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_connection_profile_async.py new file mode 100644 index 0000000..870da22 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_connection_profile_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_DeleteConnectionProfile_async] +from google.cloud import datastream_v1alpha1 + + +async def sample_delete_connection_profile(): + # Create a client + client = datastream_v1alpha1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.DeleteConnectionProfileRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_DeleteConnectionProfile_async] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_connection_profile_sync.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_connection_profile_sync.py new file mode 100644 index 0000000..5df5511 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_connection_profile_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_DeleteConnectionProfile_sync] +from google.cloud import datastream_v1alpha1 + + +def sample_delete_connection_profile(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.DeleteConnectionProfileRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_DeleteConnectionProfile_sync] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_private_connection_async.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_private_connection_async.py new file mode 100644 index 0000000..4a87aec --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_private_connection_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeletePrivateConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_DeletePrivateConnection_async] +from google.cloud import datastream_v1alpha1 + + +async def sample_delete_private_connection(): + # Create a client + client = datastream_v1alpha1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.DeletePrivateConnectionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_private_connection(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_DeletePrivateConnection_async] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_private_connection_sync.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_private_connection_sync.py new file mode 100644 index 0000000..c92c9ba --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_private_connection_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeletePrivateConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_DeletePrivateConnection_sync] +from google.cloud import datastream_v1alpha1 + + +def sample_delete_private_connection(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.DeletePrivateConnectionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_private_connection(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_DeletePrivateConnection_sync] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_route_async.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_route_async.py new file mode 100644 index 0000000..1933b6e --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_route_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteRoute +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_DeleteRoute_async] +from google.cloud import datastream_v1alpha1 + + +async def sample_delete_route(): + # Create a client + client = datastream_v1alpha1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.DeleteRouteRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_route(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_DeleteRoute_async] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_route_sync.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_route_sync.py new file mode 100644 index 0000000..d02ceed --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_route_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteRoute +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_DeleteRoute_sync] +from google.cloud import datastream_v1alpha1 + + +def sample_delete_route(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.DeleteRouteRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_route(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_DeleteRoute_sync] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_stream_async.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_stream_async.py new file mode 100644 index 0000000..1d9cffe --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_stream_async.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteStream +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_DeleteStream_async] +from google.cloud import datastream_v1alpha1 + + +async def sample_delete_stream(): + # Create a client + client = datastream_v1alpha1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.DeleteStreamRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_stream(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_DeleteStream_async] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_stream_sync.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_stream_sync.py new file mode 100644 index 0000000..e5b8a35 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_delete_stream_sync.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteStream +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_DeleteStream_sync] +from google.cloud import datastream_v1alpha1 + + +def sample_delete_stream(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.DeleteStreamRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_stream(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_DeleteStream_sync] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_discover_connection_profile_async.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_discover_connection_profile_async.py new file mode 100644 index 0000000..e1b0990 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_discover_connection_profile_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DiscoverConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_DiscoverConnectionProfile_async] +from google.cloud import datastream_v1alpha1 + + +async def sample_discover_connection_profile(): + # Create a client + client = datastream_v1alpha1.DatastreamAsyncClient() + + # Initialize request argument(s) + connection_profile = datastream_v1alpha1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1alpha1.DiscoverConnectionProfileRequest( + connection_profile=connection_profile, + recursive=True, + parent="parent_value", + ) + + # Make the request + response = await client.discover_connection_profile(request=request) + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_DiscoverConnectionProfile_async] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_discover_connection_profile_sync.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_discover_connection_profile_sync.py new file mode 100644 index 0000000..7d6fada --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_discover_connection_profile_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DiscoverConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_DiscoverConnectionProfile_sync] +from google.cloud import datastream_v1alpha1 + + +def sample_discover_connection_profile(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + connection_profile = datastream_v1alpha1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1alpha1.DiscoverConnectionProfileRequest( + connection_profile=connection_profile, + recursive=True, + parent="parent_value", + ) + + # Make the request + response = client.discover_connection_profile(request=request) + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_DiscoverConnectionProfile_sync] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_fetch_errors_async.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_fetch_errors_async.py new file mode 100644 index 0000000..f610461 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_fetch_errors_async.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for FetchErrors +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_FetchErrors_async] +from google.cloud import datastream_v1alpha1 + + +async def sample_fetch_errors(): + # Create a client + client = datastream_v1alpha1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.FetchErrorsRequest( + ) + + # Make the request + operation = client.fetch_errors(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_FetchErrors_async] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_fetch_errors_sync.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_fetch_errors_sync.py new file mode 100644 index 0000000..06e649f --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_fetch_errors_sync.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for FetchErrors +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_FetchErrors_sync] +from google.cloud import datastream_v1alpha1 + + +def sample_fetch_errors(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.FetchErrorsRequest( + ) + + # Make the request + operation = client.fetch_errors(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_FetchErrors_sync] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_fetch_static_ips_async.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_fetch_static_ips_async.py new file mode 100644 index 0000000..8cb3f91 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_fetch_static_ips_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for FetchStaticIps +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_FetchStaticIps_async] +from google.cloud import datastream_v1alpha1 + + +async def sample_fetch_static_ips(): + # Create a client + client = datastream_v1alpha1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.FetchStaticIpsRequest( + name="name_value", + ) + + # Make the request + page_result = client.fetch_static_ips(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END datastream_v1alpha1_generated_Datastream_FetchStaticIps_async] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_fetch_static_ips_sync.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_fetch_static_ips_sync.py new file mode 100644 index 0000000..1451127 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_fetch_static_ips_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for FetchStaticIps +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_FetchStaticIps_sync] +from google.cloud import datastream_v1alpha1 + + +def sample_fetch_static_ips(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.FetchStaticIpsRequest( + name="name_value", + ) + + # Make the request + page_result = client.fetch_static_ips(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END datastream_v1alpha1_generated_Datastream_FetchStaticIps_sync] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_connection_profile_async.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_connection_profile_async.py new file mode 100644 index 0000000..518299d --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_connection_profile_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_GetConnectionProfile_async] +from google.cloud import datastream_v1alpha1 + + +async def sample_get_connection_profile(): + # Create a client + client = datastream_v1alpha1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.GetConnectionProfileRequest( + name="name_value", + ) + + # Make the request + response = await client.get_connection_profile(request=request) + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_GetConnectionProfile_async] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_connection_profile_sync.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_connection_profile_sync.py new file mode 100644 index 0000000..eb645f1 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_connection_profile_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_GetConnectionProfile_sync] +from google.cloud import datastream_v1alpha1 + + +def sample_get_connection_profile(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.GetConnectionProfileRequest( + name="name_value", + ) + + # Make the request + response = client.get_connection_profile(request=request) + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_GetConnectionProfile_sync] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_private_connection_async.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_private_connection_async.py new file mode 100644 index 0000000..a4dffb5 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_private_connection_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetPrivateConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_GetPrivateConnection_async] +from google.cloud import datastream_v1alpha1 + + +async def sample_get_private_connection(): + # Create a client + client = datastream_v1alpha1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.GetPrivateConnectionRequest( + name="name_value", + ) + + # Make the request + response = await client.get_private_connection(request=request) + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_GetPrivateConnection_async] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_private_connection_sync.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_private_connection_sync.py new file mode 100644 index 0000000..c052f23 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_private_connection_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetPrivateConnection +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_GetPrivateConnection_sync] +from google.cloud import datastream_v1alpha1 + + +def sample_get_private_connection(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.GetPrivateConnectionRequest( + name="name_value", + ) + + # Make the request + response = client.get_private_connection(request=request) + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_GetPrivateConnection_sync] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_route_async.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_route_async.py new file mode 100644 index 0000000..b3c5b99 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_route_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetRoute +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_GetRoute_async] +from google.cloud import datastream_v1alpha1 + + +async def sample_get_route(): + # Create a client + client = datastream_v1alpha1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.GetRouteRequest( + name="name_value", + ) + + # Make the request + response = await client.get_route(request=request) + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_GetRoute_async] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_route_sync.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_route_sync.py new file mode 100644 index 0000000..dc497a3 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_route_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetRoute +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_GetRoute_sync] +from google.cloud import datastream_v1alpha1 + + +def sample_get_route(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.GetRouteRequest( + name="name_value", + ) + + # Make the request + response = client.get_route(request=request) + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_GetRoute_sync] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_stream_async.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_stream_async.py new file mode 100644 index 0000000..419a69f --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_stream_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetStream +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_GetStream_async] +from google.cloud import datastream_v1alpha1 + + +async def sample_get_stream(): + # Create a client + client = datastream_v1alpha1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.GetStreamRequest( + name="name_value", + ) + + # Make the request + response = await client.get_stream(request=request) + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_GetStream_async] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_stream_sync.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_stream_sync.py new file mode 100644 index 0000000..90487f8 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_get_stream_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetStream +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_GetStream_sync] +from google.cloud import datastream_v1alpha1 + + +def sample_get_stream(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.GetStreamRequest( + name="name_value", + ) + + # Make the request + response = client.get_stream(request=request) + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_GetStream_sync] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_connection_profiles_async.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_connection_profiles_async.py new file mode 100644 index 0000000..a4ca948 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_connection_profiles_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListConnectionProfiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_ListConnectionProfiles_async] +from google.cloud import datastream_v1alpha1 + + +async def sample_list_connection_profiles(): + # Create a client + client = datastream_v1alpha1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.ListConnectionProfilesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_connection_profiles(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END datastream_v1alpha1_generated_Datastream_ListConnectionProfiles_async] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_connection_profiles_sync.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_connection_profiles_sync.py new file mode 100644 index 0000000..cca48a0 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_connection_profiles_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListConnectionProfiles +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_ListConnectionProfiles_sync] +from google.cloud import datastream_v1alpha1 + + +def sample_list_connection_profiles(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.ListConnectionProfilesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_connection_profiles(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END datastream_v1alpha1_generated_Datastream_ListConnectionProfiles_sync] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_private_connections_async.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_private_connections_async.py new file mode 100644 index 0000000..f479143 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_private_connections_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListPrivateConnections +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_ListPrivateConnections_async] +from google.cloud import datastream_v1alpha1 + + +async def sample_list_private_connections(): + # Create a client + client = datastream_v1alpha1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.ListPrivateConnectionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_private_connections(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END datastream_v1alpha1_generated_Datastream_ListPrivateConnections_async] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_private_connections_sync.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_private_connections_sync.py new file mode 100644 index 0000000..34a4fbc --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_private_connections_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListPrivateConnections +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_ListPrivateConnections_sync] +from google.cloud import datastream_v1alpha1 + + +def sample_list_private_connections(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.ListPrivateConnectionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_private_connections(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END datastream_v1alpha1_generated_Datastream_ListPrivateConnections_sync] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_routes_async.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_routes_async.py new file mode 100644 index 0000000..21efde0 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_routes_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListRoutes +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_ListRoutes_async] +from google.cloud import datastream_v1alpha1 + + +async def sample_list_routes(): + # Create a client + client = datastream_v1alpha1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.ListRoutesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_routes(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END datastream_v1alpha1_generated_Datastream_ListRoutes_async] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_routes_sync.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_routes_sync.py new file mode 100644 index 0000000..2db21b1 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_routes_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListRoutes +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_ListRoutes_sync] +from google.cloud import datastream_v1alpha1 + + +def sample_list_routes(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.ListRoutesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_routes(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END datastream_v1alpha1_generated_Datastream_ListRoutes_sync] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_streams_async.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_streams_async.py new file mode 100644 index 0000000..b5eecdc --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_streams_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListStreams +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_ListStreams_async] +from google.cloud import datastream_v1alpha1 + + +async def sample_list_streams(): + # Create a client + client = datastream_v1alpha1.DatastreamAsyncClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.ListStreamsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_streams(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END datastream_v1alpha1_generated_Datastream_ListStreams_async] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_streams_sync.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_streams_sync.py new file mode 100644 index 0000000..68b80a4 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_list_streams_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListStreams +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_ListStreams_sync] +from google.cloud import datastream_v1alpha1 + + +def sample_list_streams(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + request = datastream_v1alpha1.ListStreamsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_streams(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END datastream_v1alpha1_generated_Datastream_ListStreams_sync] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_update_connection_profile_async.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_update_connection_profile_async.py new file mode 100644 index 0000000..838c268 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_update_connection_profile_async.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_UpdateConnectionProfile_async] +from google.cloud import datastream_v1alpha1 + + +async def sample_update_connection_profile(): + # Create a client + client = datastream_v1alpha1.DatastreamAsyncClient() + + # Initialize request argument(s) + connection_profile = datastream_v1alpha1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1alpha1.UpdateConnectionProfileRequest( + connection_profile=connection_profile, + ) + + # Make the request + operation = client.update_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_UpdateConnectionProfile_async] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_update_connection_profile_sync.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_update_connection_profile_sync.py new file mode 100644 index 0000000..89809a4 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_update_connection_profile_sync.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateConnectionProfile +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_UpdateConnectionProfile_sync] +from google.cloud import datastream_v1alpha1 + + +def sample_update_connection_profile(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + connection_profile = datastream_v1alpha1.ConnectionProfile() + connection_profile.oracle_profile.hostname = "hostname_value" + connection_profile.oracle_profile.username = "username_value" + connection_profile.oracle_profile.password = "password_value" + connection_profile.oracle_profile.database_service = "database_service_value" + connection_profile.display_name = "display_name_value" + + request = datastream_v1alpha1.UpdateConnectionProfileRequest( + connection_profile=connection_profile, + ) + + # Make the request + operation = client.update_connection_profile(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_UpdateConnectionProfile_sync] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_update_stream_async.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_update_stream_async.py new file mode 100644 index 0000000..c9ca440 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_update_stream_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateStream +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_UpdateStream_async] +from google.cloud import datastream_v1alpha1 + + +async def sample_update_stream(): + # Create a client + client = datastream_v1alpha1.DatastreamAsyncClient() + + # Initialize request argument(s) + stream = datastream_v1alpha1.Stream() + stream.display_name = "display_name_value" + stream.source_config.source_connection_profile_name = "source_connection_profile_name_value" + stream.destination_config.destination_connection_profile_name = "destination_connection_profile_name_value" + + request = datastream_v1alpha1.UpdateStreamRequest( + stream=stream, + ) + + # Make the request + operation = client.update_stream(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_UpdateStream_async] diff --git a/samples/generated_samples/datastream_v1alpha1_generated_datastream_update_stream_sync.py b/samples/generated_samples/datastream_v1alpha1_generated_datastream_update_stream_sync.py new file mode 100644 index 0000000..f86ab80 --- /dev/null +++ b/samples/generated_samples/datastream_v1alpha1_generated_datastream_update_stream_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateStream +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-datastream + + +# [START datastream_v1alpha1_generated_Datastream_UpdateStream_sync] +from google.cloud import datastream_v1alpha1 + + +def sample_update_stream(): + # Create a client + client = datastream_v1alpha1.DatastreamClient() + + # Initialize request argument(s) + stream = datastream_v1alpha1.Stream() + stream.display_name = "display_name_value" + stream.source_config.source_connection_profile_name = "source_connection_profile_name_value" + stream.destination_config.destination_connection_profile_name = "destination_connection_profile_name_value" + + request = datastream_v1alpha1.UpdateStreamRequest( + stream=stream, + ) + + # Make the request + operation = client.update_stream(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END datastream_v1alpha1_generated_Datastream_UpdateStream_sync] diff --git a/samples/generated_samples/snippet_metadata_datastream_v1.json b/samples/generated_samples/snippet_metadata_datastream_v1.json new file mode 100644 index 0000000..41ce403 --- /dev/null +++ b/samples/generated_samples/snippet_metadata_datastream_v1.json @@ -0,0 +1,2229 @@ +{ + "snippets": [ + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "CreateConnectionProfile" + } + }, + "file": "datastream_v1_generated_datastream_create_connection_profile_async.py", + "regionTag": "datastream_v1_generated_Datastream_CreateConnectionProfile_async", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 54, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 55, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "CreateConnectionProfile" + } + }, + "file": "datastream_v1_generated_datastream_create_connection_profile_sync.py", + "regionTag": "datastream_v1_generated_Datastream_CreateConnectionProfile_sync", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 54, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 55, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "CreatePrivateConnection" + } + }, + "file": "datastream_v1_generated_datastream_create_private_connection_async.py", + "regionTag": "datastream_v1_generated_Datastream_CreatePrivateConnection_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "CreatePrivateConnection" + } + }, + "file": "datastream_v1_generated_datastream_create_private_connection_sync.py", + "regionTag": "datastream_v1_generated_Datastream_CreatePrivateConnection_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "CreateRoute" + } + }, + "file": "datastream_v1_generated_datastream_create_route_async.py", + "regionTag": "datastream_v1_generated_Datastream_CreateRoute_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "CreateRoute" + } + }, + "file": "datastream_v1_generated_datastream_create_route_sync.py", + "regionTag": "datastream_v1_generated_Datastream_CreateRoute_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "CreateStream" + } + }, + "file": "datastream_v1_generated_datastream_create_stream_async.py", + "regionTag": "datastream_v1_generated_Datastream_CreateStream_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "CreateStream" + } + }, + "file": "datastream_v1_generated_datastream_create_stream_sync.py", + "regionTag": "datastream_v1_generated_Datastream_CreateStream_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "DeleteConnectionProfile" + } + }, + "file": "datastream_v1_generated_datastream_delete_connection_profile_async.py", + "regionTag": "datastream_v1_generated_Datastream_DeleteConnectionProfile_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "DeleteConnectionProfile" + } + }, + "file": "datastream_v1_generated_datastream_delete_connection_profile_sync.py", + "regionTag": "datastream_v1_generated_Datastream_DeleteConnectionProfile_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "DeletePrivateConnection" + } + }, + "file": "datastream_v1_generated_datastream_delete_private_connection_async.py", + "regionTag": "datastream_v1_generated_Datastream_DeletePrivateConnection_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "DeletePrivateConnection" + } + }, + "file": "datastream_v1_generated_datastream_delete_private_connection_sync.py", + "regionTag": "datastream_v1_generated_Datastream_DeletePrivateConnection_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "DeleteRoute" + } + }, + "file": "datastream_v1_generated_datastream_delete_route_async.py", + "regionTag": "datastream_v1_generated_Datastream_DeleteRoute_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "DeleteRoute" + } + }, + "file": "datastream_v1_generated_datastream_delete_route_sync.py", + "regionTag": "datastream_v1_generated_Datastream_DeleteRoute_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "DeleteStream" + } + }, + "file": "datastream_v1_generated_datastream_delete_stream_async.py", + "regionTag": "datastream_v1_generated_Datastream_DeleteStream_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "DeleteStream" + } + }, + "file": "datastream_v1_generated_datastream_delete_stream_sync.py", + "regionTag": "datastream_v1_generated_Datastream_DeleteStream_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "DiscoverConnectionProfile" + } + }, + "file": "datastream_v1_generated_datastream_discover_connection_profile_async.py", + "regionTag": "datastream_v1_generated_Datastream_DiscoverConnectionProfile_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "DiscoverConnectionProfile" + } + }, + "file": "datastream_v1_generated_datastream_discover_connection_profile_sync.py", + "regionTag": "datastream_v1_generated_Datastream_DiscoverConnectionProfile_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "FetchStaticIps" + } + }, + "file": "datastream_v1_generated_datastream_fetch_static_ips_async.py", + "regionTag": "datastream_v1_generated_Datastream_FetchStaticIps_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "FetchStaticIps" + } + }, + "file": "datastream_v1_generated_datastream_fetch_static_ips_sync.py", + "regionTag": "datastream_v1_generated_Datastream_FetchStaticIps_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "GetConnectionProfile" + } + }, + "file": "datastream_v1_generated_datastream_get_connection_profile_async.py", + "regionTag": "datastream_v1_generated_Datastream_GetConnectionProfile_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "GetConnectionProfile" + } + }, + "file": "datastream_v1_generated_datastream_get_connection_profile_sync.py", + "regionTag": "datastream_v1_generated_Datastream_GetConnectionProfile_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "GetPrivateConnection" + } + }, + "file": "datastream_v1_generated_datastream_get_private_connection_async.py", + "regionTag": "datastream_v1_generated_Datastream_GetPrivateConnection_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "GetPrivateConnection" + } + }, + "file": "datastream_v1_generated_datastream_get_private_connection_sync.py", + "regionTag": "datastream_v1_generated_Datastream_GetPrivateConnection_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "GetRoute" + } + }, + "file": "datastream_v1_generated_datastream_get_route_async.py", + "regionTag": "datastream_v1_generated_Datastream_GetRoute_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "GetRoute" + } + }, + "file": "datastream_v1_generated_datastream_get_route_sync.py", + "regionTag": "datastream_v1_generated_Datastream_GetRoute_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "GetStreamObject" + } + }, + "file": "datastream_v1_generated_datastream_get_stream_object_async.py", + "regionTag": "datastream_v1_generated_Datastream_GetStreamObject_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "GetStreamObject" + } + }, + "file": "datastream_v1_generated_datastream_get_stream_object_sync.py", + "regionTag": "datastream_v1_generated_Datastream_GetStreamObject_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "GetStream" + } + }, + "file": "datastream_v1_generated_datastream_get_stream_async.py", + "regionTag": "datastream_v1_generated_Datastream_GetStream_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "GetStream" + } + }, + "file": "datastream_v1_generated_datastream_get_stream_sync.py", + "regionTag": "datastream_v1_generated_Datastream_GetStream_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "ListConnectionProfiles" + } + }, + "file": "datastream_v1_generated_datastream_list_connection_profiles_async.py", + "regionTag": "datastream_v1_generated_Datastream_ListConnectionProfiles_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "ListConnectionProfiles" + } + }, + "file": "datastream_v1_generated_datastream_list_connection_profiles_sync.py", + "regionTag": "datastream_v1_generated_Datastream_ListConnectionProfiles_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "ListPrivateConnections" + } + }, + "file": "datastream_v1_generated_datastream_list_private_connections_async.py", + "regionTag": "datastream_v1_generated_Datastream_ListPrivateConnections_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "ListPrivateConnections" + } + }, + "file": "datastream_v1_generated_datastream_list_private_connections_sync.py", + "regionTag": "datastream_v1_generated_Datastream_ListPrivateConnections_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "ListRoutes" + } + }, + "file": "datastream_v1_generated_datastream_list_routes_async.py", + "regionTag": "datastream_v1_generated_Datastream_ListRoutes_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "ListRoutes" + } + }, + "file": "datastream_v1_generated_datastream_list_routes_sync.py", + "regionTag": "datastream_v1_generated_Datastream_ListRoutes_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "ListStreamObjects" + } + }, + "file": "datastream_v1_generated_datastream_list_stream_objects_async.py", + "regionTag": "datastream_v1_generated_Datastream_ListStreamObjects_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "ListStreamObjects" + } + }, + "file": "datastream_v1_generated_datastream_list_stream_objects_sync.py", + "regionTag": "datastream_v1_generated_Datastream_ListStreamObjects_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "ListStreams" + } + }, + "file": "datastream_v1_generated_datastream_list_streams_async.py", + "regionTag": "datastream_v1_generated_Datastream_ListStreams_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "ListStreams" + } + }, + "file": "datastream_v1_generated_datastream_list_streams_sync.py", + "regionTag": "datastream_v1_generated_Datastream_ListStreams_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "LookupStreamObject" + } + }, + "file": "datastream_v1_generated_datastream_lookup_stream_object_async.py", + "regionTag": "datastream_v1_generated_Datastream_LookupStreamObject_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "LookupStreamObject" + } + }, + "file": "datastream_v1_generated_datastream_lookup_stream_object_sync.py", + "regionTag": "datastream_v1_generated_Datastream_LookupStreamObject_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "StartBackfillJob" + } + }, + "file": "datastream_v1_generated_datastream_start_backfill_job_async.py", + "regionTag": "datastream_v1_generated_Datastream_StartBackfillJob_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "StartBackfillJob" + } + }, + "file": "datastream_v1_generated_datastream_start_backfill_job_sync.py", + "regionTag": "datastream_v1_generated_Datastream_StartBackfillJob_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "StopBackfillJob" + } + }, + "file": "datastream_v1_generated_datastream_stop_backfill_job_async.py", + "regionTag": "datastream_v1_generated_Datastream_StopBackfillJob_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "StopBackfillJob" + } + }, + "file": "datastream_v1_generated_datastream_stop_backfill_job_sync.py", + "regionTag": "datastream_v1_generated_Datastream_StopBackfillJob_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "UpdateConnectionProfile" + } + }, + "file": "datastream_v1_generated_datastream_update_connection_profile_async.py", + "regionTag": "datastream_v1_generated_Datastream_UpdateConnectionProfile_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "UpdateConnectionProfile" + } + }, + "file": "datastream_v1_generated_datastream_update_connection_profile_sync.py", + "regionTag": "datastream_v1_generated_Datastream_UpdateConnectionProfile_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "UpdateStream" + } + }, + "file": "datastream_v1_generated_datastream_update_stream_async.py", + "regionTag": "datastream_v1_generated_Datastream_UpdateStream_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "UpdateStream" + } + }, + "file": "datastream_v1_generated_datastream_update_stream_sync.py", + "regionTag": "datastream_v1_generated_Datastream_UpdateStream_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +} diff --git a/samples/generated_samples/snippet_metadata_datastream_v1alpha1.json b/samples/generated_samples/snippet_metadata_datastream_v1alpha1.json new file mode 100644 index 0000000..c68d11b --- /dev/null +++ b/samples/generated_samples/snippet_metadata_datastream_v1alpha1.json @@ -0,0 +1,1873 @@ +{ + "snippets": [ + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "CreateConnectionProfile" + } + }, + "file": "datastream_v1alpha1_generated_datastream_create_connection_profile_async.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_CreateConnectionProfile_async", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 54, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 55, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "CreateConnectionProfile" + } + }, + "file": "datastream_v1alpha1_generated_datastream_create_connection_profile_sync.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_CreateConnectionProfile_sync", + "segments": [ + { + "end": 57, + "start": 27, + "type": "FULL" + }, + { + "end": 57, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 54, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 58, + "start": 55, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "CreatePrivateConnection" + } + }, + "file": "datastream_v1alpha1_generated_datastream_create_private_connection_async.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_CreatePrivateConnection_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "CreatePrivateConnection" + } + }, + "file": "datastream_v1alpha1_generated_datastream_create_private_connection_sync.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_CreatePrivateConnection_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "CreateRoute" + } + }, + "file": "datastream_v1alpha1_generated_datastream_create_route_async.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_CreateRoute_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "CreateRoute" + } + }, + "file": "datastream_v1alpha1_generated_datastream_create_route_sync.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_CreateRoute_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "CreateStream" + } + }, + "file": "datastream_v1alpha1_generated_datastream_create_stream_async.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_CreateStream_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "CreateStream" + } + }, + "file": "datastream_v1alpha1_generated_datastream_create_stream_sync.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_CreateStream_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "DeleteConnectionProfile" + } + }, + "file": "datastream_v1alpha1_generated_datastream_delete_connection_profile_async.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_DeleteConnectionProfile_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "DeleteConnectionProfile" + } + }, + "file": "datastream_v1alpha1_generated_datastream_delete_connection_profile_sync.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_DeleteConnectionProfile_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "DeletePrivateConnection" + } + }, + "file": "datastream_v1alpha1_generated_datastream_delete_private_connection_async.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_DeletePrivateConnection_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "DeletePrivateConnection" + } + }, + "file": "datastream_v1alpha1_generated_datastream_delete_private_connection_sync.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_DeletePrivateConnection_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "DeleteRoute" + } + }, + "file": "datastream_v1alpha1_generated_datastream_delete_route_async.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_DeleteRoute_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "DeleteRoute" + } + }, + "file": "datastream_v1alpha1_generated_datastream_delete_route_sync.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_DeleteRoute_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "DeleteStream" + } + }, + "file": "datastream_v1alpha1_generated_datastream_delete_stream_async.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_DeleteStream_async", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "DeleteStream" + } + }, + "file": "datastream_v1alpha1_generated_datastream_delete_stream_sync.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_DeleteStream_sync", + "segments": [ + { + "end": 48, + "start": 27, + "type": "FULL" + }, + { + "end": 48, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 45, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 49, + "start": 46, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "DiscoverConnectionProfile" + } + }, + "file": "datastream_v1alpha1_generated_datastream_discover_connection_profile_async.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_DiscoverConnectionProfile_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "DiscoverConnectionProfile" + } + }, + "file": "datastream_v1alpha1_generated_datastream_discover_connection_profile_sync.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_DiscoverConnectionProfile_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "FetchErrors" + } + }, + "file": "datastream_v1alpha1_generated_datastream_fetch_errors_async.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_FetchErrors_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "FetchErrors" + } + }, + "file": "datastream_v1alpha1_generated_datastream_fetch_errors_sync.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_FetchErrors_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "FetchStaticIps" + } + }, + "file": "datastream_v1alpha1_generated_datastream_fetch_static_ips_async.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_FetchStaticIps_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "FetchStaticIps" + } + }, + "file": "datastream_v1alpha1_generated_datastream_fetch_static_ips_sync.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_FetchStaticIps_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "GetConnectionProfile" + } + }, + "file": "datastream_v1alpha1_generated_datastream_get_connection_profile_async.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_GetConnectionProfile_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "GetConnectionProfile" + } + }, + "file": "datastream_v1alpha1_generated_datastream_get_connection_profile_sync.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_GetConnectionProfile_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "GetPrivateConnection" + } + }, + "file": "datastream_v1alpha1_generated_datastream_get_private_connection_async.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_GetPrivateConnection_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "GetPrivateConnection" + } + }, + "file": "datastream_v1alpha1_generated_datastream_get_private_connection_sync.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_GetPrivateConnection_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "GetRoute" + } + }, + "file": "datastream_v1alpha1_generated_datastream_get_route_async.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_GetRoute_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "GetRoute" + } + }, + "file": "datastream_v1alpha1_generated_datastream_get_route_sync.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_GetRoute_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "GetStream" + } + }, + "file": "datastream_v1alpha1_generated_datastream_get_stream_async.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_GetStream_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "GetStream" + } + }, + "file": "datastream_v1alpha1_generated_datastream_get_stream_sync.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_GetStream_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "ListConnectionProfiles" + } + }, + "file": "datastream_v1alpha1_generated_datastream_list_connection_profiles_async.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_ListConnectionProfiles_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "ListConnectionProfiles" + } + }, + "file": "datastream_v1alpha1_generated_datastream_list_connection_profiles_sync.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_ListConnectionProfiles_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "ListPrivateConnections" + } + }, + "file": "datastream_v1alpha1_generated_datastream_list_private_connections_async.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_ListPrivateConnections_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "ListPrivateConnections" + } + }, + "file": "datastream_v1alpha1_generated_datastream_list_private_connections_sync.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_ListPrivateConnections_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "ListRoutes" + } + }, + "file": "datastream_v1alpha1_generated_datastream_list_routes_async.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_ListRoutes_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "ListRoutes" + } + }, + "file": "datastream_v1alpha1_generated_datastream_list_routes_sync.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_ListRoutes_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "ListStreams" + } + }, + "file": "datastream_v1alpha1_generated_datastream_list_streams_async.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_ListStreams_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "ListStreams" + } + }, + "file": "datastream_v1alpha1_generated_datastream_list_streams_sync.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_ListStreams_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "UpdateConnectionProfile" + } + }, + "file": "datastream_v1alpha1_generated_datastream_update_connection_profile_async.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_UpdateConnectionProfile_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "UpdateConnectionProfile" + } + }, + "file": "datastream_v1alpha1_generated_datastream_update_connection_profile_sync.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_UpdateConnectionProfile_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "UpdateStream" + } + }, + "file": "datastream_v1alpha1_generated_datastream_update_stream_async.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_UpdateStream_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "Datastream" + }, + "shortName": "UpdateStream" + } + }, + "file": "datastream_v1alpha1_generated_datastream_update_stream_sync.py", + "regionTag": "datastream_v1alpha1_generated_Datastream_UpdateStream_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +} diff --git a/scripts/fixup_datastream_v1_keywords.py b/scripts/fixup_datastream_v1_keywords.py index 00b466f..c4b4fb5 100644 --- a/scripts/fixup_datastream_v1_keywords.py +++ b/scripts/fixup_datastream_v1_keywords.py @@ -1,6 +1,6 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/scripts/fixup_datastream_v1alpha1_keywords.py b/scripts/fixup_datastream_v1alpha1_keywords.py index 636ec17..74accfd 100644 --- a/scripts/fixup_datastream_v1alpha1_keywords.py +++ b/scripts/fixup_datastream_v1alpha1_keywords.py @@ -1,6 +1,6 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/setup.py b/setup.py index ececfe8..b42a5e7 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ name = "google-cloud-datastream" description = "Datastream client library" -version = "0.4.0" +version = "0.4.1" release_status = "Development Status :: 3 - Alpha" url = "https://github.com/googleapis/python-datastream" dependencies = [ diff --git a/tests/__init__.py b/tests/__init__.py index 4de6597..e8e1c38 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py index 4de6597..e8e1c38 100644 --- a/tests/unit/__init__.py +++ b/tests/unit/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/__init__.py b/tests/unit/gapic/__init__.py index 4de6597..e8e1c38 100644 --- a/tests/unit/gapic/__init__.py +++ b/tests/unit/gapic/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/datastream_v1/__init__.py b/tests/unit/gapic/datastream_v1/__init__.py index 4de6597..e8e1c38 100644 --- a/tests/unit/gapic/datastream_v1/__init__.py +++ b/tests/unit/gapic/datastream_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/datastream_v1/test_datastream.py b/tests/unit/gapic/datastream_v1/test_datastream.py index 95c5efa..ce7fc66 100644 --- a/tests/unit/gapic/datastream_v1/test_datastream.py +++ b/tests/unit/gapic/datastream_v1/test_datastream.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/datastream_v1alpha1/__init__.py b/tests/unit/gapic/datastream_v1alpha1/__init__.py index 4de6597..e8e1c38 100644 --- a/tests/unit/gapic/datastream_v1alpha1/__init__.py +++ b/tests/unit/gapic/datastream_v1alpha1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/unit/gapic/datastream_v1alpha1/test_datastream.py b/tests/unit/gapic/datastream_v1alpha1/test_datastream.py index 0c32ccb..e714883 100644 --- a/tests/unit/gapic/datastream_v1alpha1/test_datastream.py +++ b/tests/unit/gapic/datastream_v1alpha1/test_datastream.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.