Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

chore: use gapic-generator-python 0.63.2 #66

Merged
merged 3 commits into from
Feb 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
592 changes: 592 additions & 0 deletions google/cloud/datastream_v1/services/datastream/async_client.py

Large diffs are not rendered by default.

617 changes: 617 additions & 0 deletions google/cloud/datastream_v1/services/datastream/client.py

Large diffs are not rendered by default.

510 changes: 510 additions & 0 deletions google/cloud/datastream_v1alpha1/services/datastream/async_client.py

Large diffs are not rendered by default.

531 changes: 531 additions & 0 deletions google/cloud/datastream_v1alpha1/services/datastream/client.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# -*- coding: utf-8 -*-
# Copyright 2020 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_generated_datastream_v1_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_generated_datastream_v1_Datastream_CreateConnectionProfile_async]
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# -*- coding: utf-8 -*-
# Copyright 2020 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_generated_datastream_v1_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_generated_datastream_v1_Datastream_CreateConnectionProfile_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# -*- coding: utf-8 -*-
# Copyright 2020 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_generated_datastream_v1_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_generated_datastream_v1_Datastream_CreatePrivateConnection_async]
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# -*- coding: utf-8 -*-
# Copyright 2020 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_generated_datastream_v1_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_generated_datastream_v1_Datastream_CreatePrivateConnection_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# -*- coding: utf-8 -*-
# Copyright 2020 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_generated_datastream_v1_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_generated_datastream_v1_Datastream_CreateRoute_async]
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# -*- coding: utf-8 -*-
# Copyright 2020 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_generated_datastream_v1_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_generated_datastream_v1_Datastream_CreateRoute_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# -*- coding: utf-8 -*-
# Copyright 2020 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_generated_datastream_v1_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_generated_datastream_v1_Datastream_CreateStream_async]
Loading