Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.63.1 (#83)
Browse files Browse the repository at this point in the history
- [x] Regenerate this pull request now.

docs: add autogenerated code snippets
PiperOrigin-RevId: 426256923

Source-Link: googleapis/googleapis@9ebabfa

Source-Link: googleapis/googleapis-gen@a881752
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTg4MTc1MjYzZTYwYTFkNDVkM2E0NDc4NDg2NTJiMGY2NzBiMmNiOCJ9
  • Loading branch information
gcf-owl-bot[bot] authored Feb 4, 2022
1 parent 77a1733 commit 4363e03
Show file tree
Hide file tree
Showing 9 changed files with 460 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,25 @@ async def list_connections(
r"""Lists connections that are currently active for the
given Apigee Connect endpoint.
.. code-block::
from google.cloud import apigeeconnect_v1
def sample_list_connections():
# Create a client
client = apigeeconnect_v1.ConnectionServiceClient()
# Initialize request argument(s)
request = apigeeconnect_v1.ListConnectionsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_connections(request=request)
for response in page_result:
print(response)
Args:
request (Union[google.cloud.apigeeconnect_v1.types.ListConnectionsRequest, dict]):
The request object. The request for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,26 @@ def list_connections(
r"""Lists connections that are currently active for the
given Apigee Connect endpoint.
.. code-block::
from google.cloud import apigeeconnect_v1
def sample_list_connections():
# Create a client
client = apigeeconnect_v1.ConnectionServiceClient()
# Initialize request argument(s)
request = apigeeconnect_v1.ListConnectionsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_connections(request=request)
for response in page_result:
print(response)
Args:
request (Union[google.cloud.apigeeconnect_v1.types.ListConnectionsRequest, dict]):
The request object. The request for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,33 @@ def egress(
The listener streams http requests and the dialer
streams http responses.
.. code-block::
from google.cloud import apigeeconnect_v1
def sample_egress():
# Create a client
client = apigeeconnect_v1.TetherClient()
# Initialize request argument(s)
request = apigeeconnect_v1.EgressResponse(
)
# This method expects an iterator which contains
# 'apigeeconnect_v1.EgressResponse' objects
# Here we create a generator that yields a single `request` for
# demonstrative purposes.
requests = [request]
def request_generator():
for request in requests:
yield request
# Make the request
stream = client.egress(requests=request_generator())
for response in stream:
print(response)
Args:
requests (AsyncIterator[`google.cloud.apigeeconnect_v1.types.EgressResponse`]):
The request object AsyncIterator. gRPC response payload for tether.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,34 @@ def egress(
The listener streams http requests and the dialer
streams http responses.
.. code-block::
from google.cloud import apigeeconnect_v1
def sample_egress():
# Create a client
client = apigeeconnect_v1.TetherClient()
# Initialize request argument(s)
request = apigeeconnect_v1.EgressResponse(
)
# This method expects an iterator which contains
# 'apigeeconnect_v1.EgressResponse' objects
# Here we create a generator that yields a single `request` for
# demonstrative purposes.
requests = [request]
def request_generator():
for request in requests:
yield request
# Make the request
stream = client.egress(requests=request_generator())
for response in stream:
print(response)
Args:
requests (Iterator[google.cloud.apigeeconnect_v1.types.EgressResponse]):
The request object iterator. gRPC response payload for tether.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# -*- 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 ListConnections
# 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-apigee-connect


# [START apigeeconnect_generated_apigeeconnect_v1_ConnectionService_ListConnections_async]
from google.cloud import apigeeconnect_v1


async def sample_list_connections():
# Create a client
client = apigeeconnect_v1.ConnectionServiceAsyncClient()

# Initialize request argument(s)
request = apigeeconnect_v1.ListConnectionsRequest(
parent="parent_value",
)

# Make the request
page_result = client.list_connections(request=request)
async for response in page_result:
print(response)

# [END apigeeconnect_generated_apigeeconnect_v1_ConnectionService_ListConnections_async]
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# -*- 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 ListConnections
# 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-apigee-connect


# [START apigeeconnect_generated_apigeeconnect_v1_ConnectionService_ListConnections_sync]
from google.cloud import apigeeconnect_v1


def sample_list_connections():
# Create a client
client = apigeeconnect_v1.ConnectionServiceClient()

# Initialize request argument(s)
request = apigeeconnect_v1.ListConnectionsRequest(
parent="parent_value",
)

# Make the request
page_result = client.list_connections(request=request)
for response in page_result:
print(response)

# [END apigeeconnect_generated_apigeeconnect_v1_ConnectionService_ListConnections_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# -*- 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 Egress
# 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-apigee-connect


# [START apigeeconnect_generated_apigeeconnect_v1_Tether_Egress_async]
from google.cloud import apigeeconnect_v1


async def sample_egress():
# Create a client
client = apigeeconnect_v1.TetherAsyncClient()

# Initialize request argument(s)
request = apigeeconnect_v1.EgressResponse(
)

# This method expects an iterator which contains
# 'apigeeconnect_v1.EgressResponse' objects
# Here we create a generator that yields a single `request` for
# demonstrative purposes.
requests = [request]
def request_generator():
for request in requests:
yield request

# Make the request
stream = await client.egress(requests=request_generator())
async for response in stream:
print(response)

# [END apigeeconnect_generated_apigeeconnect_v1_Tether_Egress_async]
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# -*- 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 Egress
# 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-apigee-connect


# [START apigeeconnect_generated_apigeeconnect_v1_Tether_Egress_sync]
from google.cloud import apigeeconnect_v1


def sample_egress():
# Create a client
client = apigeeconnect_v1.TetherClient()

# Initialize request argument(s)
request = apigeeconnect_v1.EgressResponse(
)

# This method expects an iterator which contains
# 'apigeeconnect_v1.EgressResponse' objects
# Here we create a generator that yields a single `request` for
# demonstrative purposes.
requests = [request]
def request_generator():
for request in requests:
yield request

# Make the request
stream = client.egress(requests=request_generator())
for response in stream:
print(response)

# [END apigeeconnect_generated_apigeeconnect_v1_Tether_Egress_sync]
Loading

0 comments on commit 4363e03

Please sign in to comment.