diff --git a/packages/google-cloud-functions/google/cloud/functions/gapic_version.py b/packages/google-cloud-functions/google/cloud/functions/gapic_version.py index 1fc1b24be126..405b1cebcf15 100644 --- a/packages/google-cloud-functions/google/cloud/functions/gapic_version.py +++ b/packages/google-cloud-functions/google/cloud/functions/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.13.0" # {x-release-please-version} +__version__ = "0.1.0" # {x-release-please-version} diff --git a/packages/google-cloud-functions/google/cloud/functions_v1/gapic_version.py b/packages/google-cloud-functions/google/cloud/functions_v1/gapic_version.py index 1fc1b24be126..405b1cebcf15 100644 --- a/packages/google-cloud-functions/google/cloud/functions_v1/gapic_version.py +++ b/packages/google-cloud-functions/google/cloud/functions_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.13.0" # {x-release-please-version} +__version__ = "0.1.0" # {x-release-please-version} diff --git a/packages/google-cloud-functions/google/cloud/functions_v2/gapic_version.py b/packages/google-cloud-functions/google/cloud/functions_v2/gapic_version.py index 1fc1b24be126..405b1cebcf15 100644 --- a/packages/google-cloud-functions/google/cloud/functions_v2/gapic_version.py +++ b/packages/google-cloud-functions/google/cloud/functions_v2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.13.0" # {x-release-please-version} +__version__ = "0.1.0" # {x-release-please-version} diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_call_function_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_call_function_async.py new file mode 100644 index 000000000000..ef4edf2dac71 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_call_function_async.py @@ -0,0 +1,53 @@ +# -*- 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 CallFunction +# 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-functions + + +# [START cloudfunctions_v1_generated_CloudFunctionsService_CallFunction_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v1 + + +async def sample_call_function(): + # Create a client + client = functions_v1.CloudFunctionsServiceAsyncClient() + + # Initialize request argument(s) + request = functions_v1.CallFunctionRequest( + name="name_value", + data="data_value", + ) + + # Make the request + response = await client.call_function(request=request) + + # Handle the response + print(response) + +# [END cloudfunctions_v1_generated_CloudFunctionsService_CallFunction_async] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_call_function_sync.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_call_function_sync.py new file mode 100644 index 000000000000..27dc8b488b88 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_call_function_sync.py @@ -0,0 +1,53 @@ +# -*- 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 CallFunction +# 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-functions + + +# [START cloudfunctions_v1_generated_CloudFunctionsService_CallFunction_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v1 + + +def sample_call_function(): + # Create a client + client = functions_v1.CloudFunctionsServiceClient() + + # Initialize request argument(s) + request = functions_v1.CallFunctionRequest( + name="name_value", + data="data_value", + ) + + # Make the request + response = client.call_function(request=request) + + # Handle the response + print(response) + +# [END cloudfunctions_v1_generated_CloudFunctionsService_CallFunction_sync] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_create_function_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_create_function_async.py new file mode 100644 index 000000000000..2f1f649b6cae --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_create_function_async.py @@ -0,0 +1,60 @@ +# -*- 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 CreateFunction +# 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-functions + + +# [START cloudfunctions_v1_generated_CloudFunctionsService_CreateFunction_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v1 + + +async def sample_create_function(): + # Create a client + client = functions_v1.CloudFunctionsServiceAsyncClient() + + # Initialize request argument(s) + function = functions_v1.CloudFunction() + function.source_archive_url = "source_archive_url_value" + + request = functions_v1.CreateFunctionRequest( + location="location_value", + function=function, + ) + + # Make the request + operation = client.create_function(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudfunctions_v1_generated_CloudFunctionsService_CreateFunction_async] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_create_function_sync.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_create_function_sync.py new file mode 100644 index 000000000000..cbea4393f4ed --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_create_function_sync.py @@ -0,0 +1,60 @@ +# -*- 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 CreateFunction +# 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-functions + + +# [START cloudfunctions_v1_generated_CloudFunctionsService_CreateFunction_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v1 + + +def sample_create_function(): + # Create a client + client = functions_v1.CloudFunctionsServiceClient() + + # Initialize request argument(s) + function = functions_v1.CloudFunction() + function.source_archive_url = "source_archive_url_value" + + request = functions_v1.CreateFunctionRequest( + location="location_value", + function=function, + ) + + # Make the request + operation = client.create_function(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudfunctions_v1_generated_CloudFunctionsService_CreateFunction_sync] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_delete_function_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_delete_function_async.py new file mode 100644 index 000000000000..41b37c73e78a --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_delete_function_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 DeleteFunction +# 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-functions + + +# [START cloudfunctions_v1_generated_CloudFunctionsService_DeleteFunction_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v1 + + +async def sample_delete_function(): + # Create a client + client = functions_v1.CloudFunctionsServiceAsyncClient() + + # Initialize request argument(s) + request = functions_v1.DeleteFunctionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_function(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudfunctions_v1_generated_CloudFunctionsService_DeleteFunction_async] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_delete_function_sync.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_delete_function_sync.py new file mode 100644 index 000000000000..6421bb04d68a --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_delete_function_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 DeleteFunction +# 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-functions + + +# [START cloudfunctions_v1_generated_CloudFunctionsService_DeleteFunction_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v1 + + +def sample_delete_function(): + # Create a client + client = functions_v1.CloudFunctionsServiceClient() + + # Initialize request argument(s) + request = functions_v1.DeleteFunctionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_function(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudfunctions_v1_generated_CloudFunctionsService_DeleteFunction_sync] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_generate_download_url_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_generate_download_url_async.py new file mode 100644 index 000000000000..a3ec4ab9d8c3 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_generate_download_url_async.py @@ -0,0 +1,51 @@ +# -*- 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 GenerateDownloadUrl +# 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-functions + + +# [START cloudfunctions_v1_generated_CloudFunctionsService_GenerateDownloadUrl_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v1 + + +async def sample_generate_download_url(): + # Create a client + client = functions_v1.CloudFunctionsServiceAsyncClient() + + # Initialize request argument(s) + request = functions_v1.GenerateDownloadUrlRequest( + ) + + # Make the request + response = await client.generate_download_url(request=request) + + # Handle the response + print(response) + +# [END cloudfunctions_v1_generated_CloudFunctionsService_GenerateDownloadUrl_async] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_generate_download_url_sync.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_generate_download_url_sync.py new file mode 100644 index 000000000000..220198c038a8 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_generate_download_url_sync.py @@ -0,0 +1,51 @@ +# -*- 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 GenerateDownloadUrl +# 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-functions + + +# [START cloudfunctions_v1_generated_CloudFunctionsService_GenerateDownloadUrl_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v1 + + +def sample_generate_download_url(): + # Create a client + client = functions_v1.CloudFunctionsServiceClient() + + # Initialize request argument(s) + request = functions_v1.GenerateDownloadUrlRequest( + ) + + # Make the request + response = client.generate_download_url(request=request) + + # Handle the response + print(response) + +# [END cloudfunctions_v1_generated_CloudFunctionsService_GenerateDownloadUrl_sync] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_generate_upload_url_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_generate_upload_url_async.py new file mode 100644 index 000000000000..d89009201ed7 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_generate_upload_url_async.py @@ -0,0 +1,51 @@ +# -*- 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 GenerateUploadUrl +# 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-functions + + +# [START cloudfunctions_v1_generated_CloudFunctionsService_GenerateUploadUrl_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v1 + + +async def sample_generate_upload_url(): + # Create a client + client = functions_v1.CloudFunctionsServiceAsyncClient() + + # Initialize request argument(s) + request = functions_v1.GenerateUploadUrlRequest( + ) + + # Make the request + response = await client.generate_upload_url(request=request) + + # Handle the response + print(response) + +# [END cloudfunctions_v1_generated_CloudFunctionsService_GenerateUploadUrl_async] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_generate_upload_url_sync.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_generate_upload_url_sync.py new file mode 100644 index 000000000000..74cb6246b92a --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_generate_upload_url_sync.py @@ -0,0 +1,51 @@ +# -*- 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 GenerateUploadUrl +# 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-functions + + +# [START cloudfunctions_v1_generated_CloudFunctionsService_GenerateUploadUrl_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v1 + + +def sample_generate_upload_url(): + # Create a client + client = functions_v1.CloudFunctionsServiceClient() + + # Initialize request argument(s) + request = functions_v1.GenerateUploadUrlRequest( + ) + + # Make the request + response = client.generate_upload_url(request=request) + + # Handle the response + print(response) + +# [END cloudfunctions_v1_generated_CloudFunctionsService_GenerateUploadUrl_sync] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_get_function_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_get_function_async.py new file mode 100644 index 000000000000..11ef0c741d5e --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_get_function_async.py @@ -0,0 +1,52 @@ +# -*- 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 GetFunction +# 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-functions + + +# [START cloudfunctions_v1_generated_CloudFunctionsService_GetFunction_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v1 + + +async def sample_get_function(): + # Create a client + client = functions_v1.CloudFunctionsServiceAsyncClient() + + # Initialize request argument(s) + request = functions_v1.GetFunctionRequest( + name="name_value", + ) + + # Make the request + response = await client.get_function(request=request) + + # Handle the response + print(response) + +# [END cloudfunctions_v1_generated_CloudFunctionsService_GetFunction_async] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_get_function_sync.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_get_function_sync.py new file mode 100644 index 000000000000..f6949e8dd9fe --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_get_function_sync.py @@ -0,0 +1,52 @@ +# -*- 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 GetFunction +# 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-functions + + +# [START cloudfunctions_v1_generated_CloudFunctionsService_GetFunction_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v1 + + +def sample_get_function(): + # Create a client + client = functions_v1.CloudFunctionsServiceClient() + + # Initialize request argument(s) + request = functions_v1.GetFunctionRequest( + name="name_value", + ) + + # Make the request + response = client.get_function(request=request) + + # Handle the response + print(response) + +# [END cloudfunctions_v1_generated_CloudFunctionsService_GetFunction_sync] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_get_iam_policy_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_get_iam_policy_async.py new file mode 100644 index 000000000000..e9c65244574d --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_get_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- 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 GetIamPolicy +# 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-functions + + +# [START cloudfunctions_v1_generated_CloudFunctionsService_GetIamPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_get_iam_policy(): + # Create a client + client = functions_v1.CloudFunctionsServiceAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudfunctions_v1_generated_CloudFunctionsService_GetIamPolicy_async] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_get_iam_policy_sync.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_get_iam_policy_sync.py new file mode 100644 index 000000000000..800099c1ddac --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_get_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- 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 GetIamPolicy +# 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-functions + + +# [START cloudfunctions_v1_generated_CloudFunctionsService_GetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_get_iam_policy(): + # Create a client + client = functions_v1.CloudFunctionsServiceClient() + + # Initialize request argument(s) + request = iam_policy_pb2.GetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.get_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudfunctions_v1_generated_CloudFunctionsService_GetIamPolicy_sync] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_list_functions_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_list_functions_async.py new file mode 100644 index 000000000000..a4fc9d551da3 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_list_functions_async.py @@ -0,0 +1,52 @@ +# -*- 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 ListFunctions +# 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-functions + + +# [START cloudfunctions_v1_generated_CloudFunctionsService_ListFunctions_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v1 + + +async def sample_list_functions(): + # Create a client + client = functions_v1.CloudFunctionsServiceAsyncClient() + + # Initialize request argument(s) + request = functions_v1.ListFunctionsRequest( + ) + + # Make the request + page_result = client.list_functions(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END cloudfunctions_v1_generated_CloudFunctionsService_ListFunctions_async] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_list_functions_sync.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_list_functions_sync.py new file mode 100644 index 000000000000..bac6b5008490 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_list_functions_sync.py @@ -0,0 +1,52 @@ +# -*- 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 ListFunctions +# 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-functions + + +# [START cloudfunctions_v1_generated_CloudFunctionsService_ListFunctions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v1 + + +def sample_list_functions(): + # Create a client + client = functions_v1.CloudFunctionsServiceClient() + + # Initialize request argument(s) + request = functions_v1.ListFunctionsRequest( + ) + + # Make the request + page_result = client.list_functions(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END cloudfunctions_v1_generated_CloudFunctionsService_ListFunctions_sync] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_set_iam_policy_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_set_iam_policy_async.py new file mode 100644 index 000000000000..73ba32476f24 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_set_iam_policy_async.py @@ -0,0 +1,53 @@ +# -*- 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 SetIamPolicy +# 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-functions + + +# [START cloudfunctions_v1_generated_CloudFunctionsService_SetIamPolicy_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_set_iam_policy(): + # Create a client + client = functions_v1.CloudFunctionsServiceAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = await client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudfunctions_v1_generated_CloudFunctionsService_SetIamPolicy_async] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_set_iam_policy_sync.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_set_iam_policy_sync.py new file mode 100644 index 000000000000..4e2c5205ac01 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_set_iam_policy_sync.py @@ -0,0 +1,53 @@ +# -*- 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 SetIamPolicy +# 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-functions + + +# [START cloudfunctions_v1_generated_CloudFunctionsService_SetIamPolicy_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_set_iam_policy(): + # Create a client + client = functions_v1.CloudFunctionsServiceClient() + + # Initialize request argument(s) + request = iam_policy_pb2.SetIamPolicyRequest( + resource="resource_value", + ) + + # Make the request + response = client.set_iam_policy(request=request) + + # Handle the response + print(response) + +# [END cloudfunctions_v1_generated_CloudFunctionsService_SetIamPolicy_sync] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_test_iam_permissions_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_test_iam_permissions_async.py new file mode 100644 index 000000000000..169b626e7202 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_test_iam_permissions_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 TestIamPermissions +# 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-functions + + +# [START cloudfunctions_v1_generated_CloudFunctionsService_TestIamPermissions_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +async def sample_test_iam_permissions(): + # Create a client + client = functions_v1.CloudFunctionsServiceAsyncClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = await client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END cloudfunctions_v1_generated_CloudFunctionsService_TestIamPermissions_async] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_test_iam_permissions_sync.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_test_iam_permissions_sync.py new file mode 100644 index 000000000000..7546c627b855 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_test_iam_permissions_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 TestIamPermissions +# 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-functions + + +# [START cloudfunctions_v1_generated_CloudFunctionsService_TestIamPermissions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v1 +from google.iam.v1 import iam_policy_pb2 # type: ignore + + +def sample_test_iam_permissions(): + # Create a client + client = functions_v1.CloudFunctionsServiceClient() + + # Initialize request argument(s) + request = iam_policy_pb2.TestIamPermissionsRequest( + resource="resource_value", + permissions=['permissions_value1', 'permissions_value2'], + ) + + # Make the request + response = client.test_iam_permissions(request=request) + + # Handle the response + print(response) + +# [END cloudfunctions_v1_generated_CloudFunctionsService_TestIamPermissions_sync] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_update_function_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_update_function_async.py new file mode 100644 index 000000000000..c9ae9e7238d9 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_update_function_async.py @@ -0,0 +1,59 @@ +# -*- 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 UpdateFunction +# 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-functions + + +# [START cloudfunctions_v1_generated_CloudFunctionsService_UpdateFunction_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v1 + + +async def sample_update_function(): + # Create a client + client = functions_v1.CloudFunctionsServiceAsyncClient() + + # Initialize request argument(s) + function = functions_v1.CloudFunction() + function.source_archive_url = "source_archive_url_value" + + request = functions_v1.UpdateFunctionRequest( + function=function, + ) + + # Make the request + operation = client.update_function(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudfunctions_v1_generated_CloudFunctionsService_UpdateFunction_async] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_update_function_sync.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_update_function_sync.py new file mode 100644 index 000000000000..83d8aa1031eb --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_update_function_sync.py @@ -0,0 +1,59 @@ +# -*- 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 UpdateFunction +# 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-functions + + +# [START cloudfunctions_v1_generated_CloudFunctionsService_UpdateFunction_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v1 + + +def sample_update_function(): + # Create a client + client = functions_v1.CloudFunctionsServiceClient() + + # Initialize request argument(s) + function = functions_v1.CloudFunction() + function.source_archive_url = "source_archive_url_value" + + request = functions_v1.UpdateFunctionRequest( + function=function, + ) + + # Make the request + operation = client.update_function(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudfunctions_v1_generated_CloudFunctionsService_UpdateFunction_sync] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_create_function_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_create_function_async.py new file mode 100644 index 000000000000..e0845061a073 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_create_function_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 CreateFunction +# 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-functions + + +# [START cloudfunctions_v2_generated_FunctionService_CreateFunction_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v2 + + +async def sample_create_function(): + # Create a client + client = functions_v2.FunctionServiceAsyncClient() + + # Initialize request argument(s) + request = functions_v2.CreateFunctionRequest( + parent="parent_value", + ) + + # Make the request + operation = client.create_function(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudfunctions_v2_generated_FunctionService_CreateFunction_async] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_create_function_sync.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_create_function_sync.py new file mode 100644 index 000000000000..54c77b919da8 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_create_function_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 CreateFunction +# 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-functions + + +# [START cloudfunctions_v2_generated_FunctionService_CreateFunction_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v2 + + +def sample_create_function(): + # Create a client + client = functions_v2.FunctionServiceClient() + + # Initialize request argument(s) + request = functions_v2.CreateFunctionRequest( + parent="parent_value", + ) + + # Make the request + operation = client.create_function(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudfunctions_v2_generated_FunctionService_CreateFunction_sync] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_delete_function_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_delete_function_async.py new file mode 100644 index 000000000000..03d669665907 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_delete_function_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 DeleteFunction +# 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-functions + + +# [START cloudfunctions_v2_generated_FunctionService_DeleteFunction_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v2 + + +async def sample_delete_function(): + # Create a client + client = functions_v2.FunctionServiceAsyncClient() + + # Initialize request argument(s) + request = functions_v2.DeleteFunctionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_function(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudfunctions_v2_generated_FunctionService_DeleteFunction_async] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_delete_function_sync.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_delete_function_sync.py new file mode 100644 index 000000000000..af09eeb1b626 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_delete_function_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 DeleteFunction +# 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-functions + + +# [START cloudfunctions_v2_generated_FunctionService_DeleteFunction_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v2 + + +def sample_delete_function(): + # Create a client + client = functions_v2.FunctionServiceClient() + + # Initialize request argument(s) + request = functions_v2.DeleteFunctionRequest( + name="name_value", + ) + + # Make the request + operation = client.delete_function(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudfunctions_v2_generated_FunctionService_DeleteFunction_sync] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_generate_download_url_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_generate_download_url_async.py new file mode 100644 index 000000000000..ea954ceac206 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_generate_download_url_async.py @@ -0,0 +1,52 @@ +# -*- 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 GenerateDownloadUrl +# 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-functions + + +# [START cloudfunctions_v2_generated_FunctionService_GenerateDownloadUrl_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v2 + + +async def sample_generate_download_url(): + # Create a client + client = functions_v2.FunctionServiceAsyncClient() + + # Initialize request argument(s) + request = functions_v2.GenerateDownloadUrlRequest( + name="name_value", + ) + + # Make the request + response = await client.generate_download_url(request=request) + + # Handle the response + print(response) + +# [END cloudfunctions_v2_generated_FunctionService_GenerateDownloadUrl_async] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_generate_download_url_sync.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_generate_download_url_sync.py new file mode 100644 index 000000000000..1f7c839fa6d2 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_generate_download_url_sync.py @@ -0,0 +1,52 @@ +# -*- 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 GenerateDownloadUrl +# 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-functions + + +# [START cloudfunctions_v2_generated_FunctionService_GenerateDownloadUrl_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v2 + + +def sample_generate_download_url(): + # Create a client + client = functions_v2.FunctionServiceClient() + + # Initialize request argument(s) + request = functions_v2.GenerateDownloadUrlRequest( + name="name_value", + ) + + # Make the request + response = client.generate_download_url(request=request) + + # Handle the response + print(response) + +# [END cloudfunctions_v2_generated_FunctionService_GenerateDownloadUrl_sync] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_generate_upload_url_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_generate_upload_url_async.py new file mode 100644 index 000000000000..e05b5f414a25 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_generate_upload_url_async.py @@ -0,0 +1,52 @@ +# -*- 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 GenerateUploadUrl +# 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-functions + + +# [START cloudfunctions_v2_generated_FunctionService_GenerateUploadUrl_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v2 + + +async def sample_generate_upload_url(): + # Create a client + client = functions_v2.FunctionServiceAsyncClient() + + # Initialize request argument(s) + request = functions_v2.GenerateUploadUrlRequest( + parent="parent_value", + ) + + # Make the request + response = await client.generate_upload_url(request=request) + + # Handle the response + print(response) + +# [END cloudfunctions_v2_generated_FunctionService_GenerateUploadUrl_async] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_generate_upload_url_sync.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_generate_upload_url_sync.py new file mode 100644 index 000000000000..d9ea99101352 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_generate_upload_url_sync.py @@ -0,0 +1,52 @@ +# -*- 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 GenerateUploadUrl +# 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-functions + + +# [START cloudfunctions_v2_generated_FunctionService_GenerateUploadUrl_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v2 + + +def sample_generate_upload_url(): + # Create a client + client = functions_v2.FunctionServiceClient() + + # Initialize request argument(s) + request = functions_v2.GenerateUploadUrlRequest( + parent="parent_value", + ) + + # Make the request + response = client.generate_upload_url(request=request) + + # Handle the response + print(response) + +# [END cloudfunctions_v2_generated_FunctionService_GenerateUploadUrl_sync] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_get_function_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_get_function_async.py new file mode 100644 index 000000000000..82a9327a6f31 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_get_function_async.py @@ -0,0 +1,52 @@ +# -*- 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 GetFunction +# 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-functions + + +# [START cloudfunctions_v2_generated_FunctionService_GetFunction_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v2 + + +async def sample_get_function(): + # Create a client + client = functions_v2.FunctionServiceAsyncClient() + + # Initialize request argument(s) + request = functions_v2.GetFunctionRequest( + name="name_value", + ) + + # Make the request + response = await client.get_function(request=request) + + # Handle the response + print(response) + +# [END cloudfunctions_v2_generated_FunctionService_GetFunction_async] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_get_function_sync.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_get_function_sync.py new file mode 100644 index 000000000000..459839dfe988 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_get_function_sync.py @@ -0,0 +1,52 @@ +# -*- 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 GetFunction +# 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-functions + + +# [START cloudfunctions_v2_generated_FunctionService_GetFunction_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v2 + + +def sample_get_function(): + # Create a client + client = functions_v2.FunctionServiceClient() + + # Initialize request argument(s) + request = functions_v2.GetFunctionRequest( + name="name_value", + ) + + # Make the request + response = client.get_function(request=request) + + # Handle the response + print(response) + +# [END cloudfunctions_v2_generated_FunctionService_GetFunction_sync] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_list_functions_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_list_functions_async.py new file mode 100644 index 000000000000..3d647a68cd98 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_list_functions_async.py @@ -0,0 +1,53 @@ +# -*- 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 ListFunctions +# 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-functions + + +# [START cloudfunctions_v2_generated_FunctionService_ListFunctions_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v2 + + +async def sample_list_functions(): + # Create a client + client = functions_v2.FunctionServiceAsyncClient() + + # Initialize request argument(s) + request = functions_v2.ListFunctionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_functions(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END cloudfunctions_v2_generated_FunctionService_ListFunctions_async] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_list_functions_sync.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_list_functions_sync.py new file mode 100644 index 000000000000..b0dbc9e6dc0e --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_list_functions_sync.py @@ -0,0 +1,53 @@ +# -*- 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 ListFunctions +# 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-functions + + +# [START cloudfunctions_v2_generated_FunctionService_ListFunctions_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v2 + + +def sample_list_functions(): + # Create a client + client = functions_v2.FunctionServiceClient() + + # Initialize request argument(s) + request = functions_v2.ListFunctionsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_functions(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END cloudfunctions_v2_generated_FunctionService_ListFunctions_sync] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_list_runtimes_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_list_runtimes_async.py new file mode 100644 index 000000000000..7e24f9e68409 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_list_runtimes_async.py @@ -0,0 +1,52 @@ +# -*- 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 ListRuntimes +# 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-functions + + +# [START cloudfunctions_v2_generated_FunctionService_ListRuntimes_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v2 + + +async def sample_list_runtimes(): + # Create a client + client = functions_v2.FunctionServiceAsyncClient() + + # Initialize request argument(s) + request = functions_v2.ListRuntimesRequest( + parent="parent_value", + ) + + # Make the request + response = await client.list_runtimes(request=request) + + # Handle the response + print(response) + +# [END cloudfunctions_v2_generated_FunctionService_ListRuntimes_async] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_list_runtimes_sync.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_list_runtimes_sync.py new file mode 100644 index 000000000000..d0401232cb9d --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_list_runtimes_sync.py @@ -0,0 +1,52 @@ +# -*- 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 ListRuntimes +# 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-functions + + +# [START cloudfunctions_v2_generated_FunctionService_ListRuntimes_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v2 + + +def sample_list_runtimes(): + # Create a client + client = functions_v2.FunctionServiceClient() + + # Initialize request argument(s) + request = functions_v2.ListRuntimesRequest( + parent="parent_value", + ) + + # Make the request + response = client.list_runtimes(request=request) + + # Handle the response + print(response) + +# [END cloudfunctions_v2_generated_FunctionService_ListRuntimes_sync] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_update_function_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_update_function_async.py new file mode 100644 index 000000000000..1b913e70d184 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_update_function_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 UpdateFunction +# 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-functions + + +# [START cloudfunctions_v2_generated_FunctionService_UpdateFunction_async] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v2 + + +async def sample_update_function(): + # Create a client + client = functions_v2.FunctionServiceAsyncClient() + + # Initialize request argument(s) + request = functions_v2.UpdateFunctionRequest( + ) + + # Make the request + operation = client.update_function(request=request) + + print("Waiting for operation to complete...") + + response = (await operation).result() + + # Handle the response + print(response) + +# [END cloudfunctions_v2_generated_FunctionService_UpdateFunction_async] diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_update_function_sync.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_update_function_sync.py new file mode 100644 index 000000000000..aafa1469d6c0 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_update_function_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 UpdateFunction +# 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-functions + + +# [START cloudfunctions_v2_generated_FunctionService_UpdateFunction_sync] +# This snippet has been automatically generated and should be regarded as a +# code template only. +# It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html +from google.cloud import functions_v2 + + +def sample_update_function(): + # Create a client + client = functions_v2.FunctionServiceClient() + + # Initialize request argument(s) + request = functions_v2.UpdateFunctionRequest( + ) + + # Make the request + operation = client.update_function(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + + # Handle the response + print(response) + +# [END cloudfunctions_v2_generated_FunctionService_UpdateFunction_sync] diff --git a/packages/google-cloud-functions/samples/generated_samples/snippet_metadata_google.cloud.functions.v1.json b/packages/google-cloud-functions/samples/generated_samples/snippet_metadata_google.cloud.functions.v1.json new file mode 100644 index 000000000000..3a16e5fca57c --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/snippet_metadata_google.cloud.functions.v1.json @@ -0,0 +1,1754 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.functions.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-functions", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceAsyncClient", + "shortName": "CloudFunctionsServiceAsyncClient" + }, + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceAsyncClient.call_function", + "method": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService.CallFunction", + "service": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService", + "shortName": "CloudFunctionsService" + }, + "shortName": "CallFunction" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v1.types.CallFunctionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "data", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.functions_v1.types.CallFunctionResponse", + "shortName": "call_function" + }, + "description": "Sample for CallFunction", + "file": "cloudfunctions_v1_generated_cloud_functions_service_call_function_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_CallFunction_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v1_generated_cloud_functions_service_call_function_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceClient", + "shortName": "CloudFunctionsServiceClient" + }, + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceClient.call_function", + "method": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService.CallFunction", + "service": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService", + "shortName": "CloudFunctionsService" + }, + "shortName": "CallFunction" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v1.types.CallFunctionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "data", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.functions_v1.types.CallFunctionResponse", + "shortName": "call_function" + }, + "description": "Sample for CallFunction", + "file": "cloudfunctions_v1_generated_cloud_functions_service_call_function_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_CallFunction_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v1_generated_cloud_functions_service_call_function_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceAsyncClient", + "shortName": "CloudFunctionsServiceAsyncClient" + }, + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceAsyncClient.create_function", + "method": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService.CreateFunction", + "service": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService", + "shortName": "CloudFunctionsService" + }, + "shortName": "CreateFunction" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v1.types.CreateFunctionRequest" + }, + { + "name": "location", + "type": "str" + }, + { + "name": "function", + "type": "google.cloud.functions_v1.types.CloudFunction" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_function" + }, + "description": "Sample for CreateFunction", + "file": "cloudfunctions_v1_generated_cloud_functions_service_create_function_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_CreateFunction_async", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v1_generated_cloud_functions_service_create_function_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceClient", + "shortName": "CloudFunctionsServiceClient" + }, + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceClient.create_function", + "method": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService.CreateFunction", + "service": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService", + "shortName": "CloudFunctionsService" + }, + "shortName": "CreateFunction" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v1.types.CreateFunctionRequest" + }, + { + "name": "location", + "type": "str" + }, + { + "name": "function", + "type": "google.cloud.functions_v1.types.CloudFunction" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_function" + }, + "description": "Sample for CreateFunction", + "file": "cloudfunctions_v1_generated_cloud_functions_service_create_function_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_CreateFunction_sync", + "segments": [ + { + "end": 59, + "start": 27, + "type": "FULL" + }, + { + "end": 59, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 49, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 56, + "start": 50, + "type": "REQUEST_EXECUTION" + }, + { + "end": 60, + "start": 57, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v1_generated_cloud_functions_service_create_function_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceAsyncClient", + "shortName": "CloudFunctionsServiceAsyncClient" + }, + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceAsyncClient.delete_function", + "method": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService.DeleteFunction", + "service": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService", + "shortName": "CloudFunctionsService" + }, + "shortName": "DeleteFunction" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v1.types.DeleteFunctionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_function" + }, + "description": "Sample for DeleteFunction", + "file": "cloudfunctions_v1_generated_cloud_functions_service_delete_function_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_DeleteFunction_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v1_generated_cloud_functions_service_delete_function_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceClient", + "shortName": "CloudFunctionsServiceClient" + }, + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceClient.delete_function", + "method": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService.DeleteFunction", + "service": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService", + "shortName": "CloudFunctionsService" + }, + "shortName": "DeleteFunction" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v1.types.DeleteFunctionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_function" + }, + "description": "Sample for DeleteFunction", + "file": "cloudfunctions_v1_generated_cloud_functions_service_delete_function_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_DeleteFunction_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v1_generated_cloud_functions_service_delete_function_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceAsyncClient", + "shortName": "CloudFunctionsServiceAsyncClient" + }, + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceAsyncClient.generate_download_url", + "method": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService.GenerateDownloadUrl", + "service": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService", + "shortName": "CloudFunctionsService" + }, + "shortName": "GenerateDownloadUrl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v1.types.GenerateDownloadUrlRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.functions_v1.types.GenerateDownloadUrlResponse", + "shortName": "generate_download_url" + }, + "description": "Sample for GenerateDownloadUrl", + "file": "cloudfunctions_v1_generated_cloud_functions_service_generate_download_url_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_GenerateDownloadUrl_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v1_generated_cloud_functions_service_generate_download_url_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceClient", + "shortName": "CloudFunctionsServiceClient" + }, + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceClient.generate_download_url", + "method": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService.GenerateDownloadUrl", + "service": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService", + "shortName": "CloudFunctionsService" + }, + "shortName": "GenerateDownloadUrl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v1.types.GenerateDownloadUrlRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.functions_v1.types.GenerateDownloadUrlResponse", + "shortName": "generate_download_url" + }, + "description": "Sample for GenerateDownloadUrl", + "file": "cloudfunctions_v1_generated_cloud_functions_service_generate_download_url_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_GenerateDownloadUrl_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v1_generated_cloud_functions_service_generate_download_url_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceAsyncClient", + "shortName": "CloudFunctionsServiceAsyncClient" + }, + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceAsyncClient.generate_upload_url", + "method": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService.GenerateUploadUrl", + "service": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService", + "shortName": "CloudFunctionsService" + }, + "shortName": "GenerateUploadUrl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v1.types.GenerateUploadUrlRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.functions_v1.types.GenerateUploadUrlResponse", + "shortName": "generate_upload_url" + }, + "description": "Sample for GenerateUploadUrl", + "file": "cloudfunctions_v1_generated_cloud_functions_service_generate_upload_url_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_GenerateUploadUrl_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v1_generated_cloud_functions_service_generate_upload_url_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceClient", + "shortName": "CloudFunctionsServiceClient" + }, + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceClient.generate_upload_url", + "method": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService.GenerateUploadUrl", + "service": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService", + "shortName": "CloudFunctionsService" + }, + "shortName": "GenerateUploadUrl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v1.types.GenerateUploadUrlRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.functions_v1.types.GenerateUploadUrlResponse", + "shortName": "generate_upload_url" + }, + "description": "Sample for GenerateUploadUrl", + "file": "cloudfunctions_v1_generated_cloud_functions_service_generate_upload_url_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_GenerateUploadUrl_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v1_generated_cloud_functions_service_generate_upload_url_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceAsyncClient", + "shortName": "CloudFunctionsServiceAsyncClient" + }, + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceAsyncClient.get_function", + "method": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService.GetFunction", + "service": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService", + "shortName": "CloudFunctionsService" + }, + "shortName": "GetFunction" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v1.types.GetFunctionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.functions_v1.types.CloudFunction", + "shortName": "get_function" + }, + "description": "Sample for GetFunction", + "file": "cloudfunctions_v1_generated_cloud_functions_service_get_function_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_GetFunction_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v1_generated_cloud_functions_service_get_function_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceClient", + "shortName": "CloudFunctionsServiceClient" + }, + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceClient.get_function", + "method": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService.GetFunction", + "service": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService", + "shortName": "CloudFunctionsService" + }, + "shortName": "GetFunction" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v1.types.GetFunctionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.functions_v1.types.CloudFunction", + "shortName": "get_function" + }, + "description": "Sample for GetFunction", + "file": "cloudfunctions_v1_generated_cloud_functions_service_get_function_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_GetFunction_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v1_generated_cloud_functions_service_get_function_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceAsyncClient", + "shortName": "CloudFunctionsServiceAsyncClient" + }, + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceAsyncClient.get_iam_policy", + "method": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService.GetIamPolicy", + "service": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService", + "shortName": "CloudFunctionsService" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "cloudfunctions_v1_generated_cloud_functions_service_get_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_GetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v1_generated_cloud_functions_service_get_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceClient", + "shortName": "CloudFunctionsServiceClient" + }, + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceClient.get_iam_policy", + "method": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService.GetIamPolicy", + "service": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService", + "shortName": "CloudFunctionsService" + }, + "shortName": "GetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.GetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "get_iam_policy" + }, + "description": "Sample for GetIamPolicy", + "file": "cloudfunctions_v1_generated_cloud_functions_service_get_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_GetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v1_generated_cloud_functions_service_get_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceAsyncClient", + "shortName": "CloudFunctionsServiceAsyncClient" + }, + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceAsyncClient.list_functions", + "method": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService.ListFunctions", + "service": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService", + "shortName": "CloudFunctionsService" + }, + "shortName": "ListFunctions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v1.types.ListFunctionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.functions_v1.services.cloud_functions_service.pagers.ListFunctionsAsyncPager", + "shortName": "list_functions" + }, + "description": "Sample for ListFunctions", + "file": "cloudfunctions_v1_generated_cloud_functions_service_list_functions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_ListFunctions_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v1_generated_cloud_functions_service_list_functions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceClient", + "shortName": "CloudFunctionsServiceClient" + }, + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceClient.list_functions", + "method": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService.ListFunctions", + "service": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService", + "shortName": "CloudFunctionsService" + }, + "shortName": "ListFunctions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v1.types.ListFunctionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.functions_v1.services.cloud_functions_service.pagers.ListFunctionsPager", + "shortName": "list_functions" + }, + "description": "Sample for ListFunctions", + "file": "cloudfunctions_v1_generated_cloud_functions_service_list_functions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_ListFunctions_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 47, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 48, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v1_generated_cloud_functions_service_list_functions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceAsyncClient", + "shortName": "CloudFunctionsServiceAsyncClient" + }, + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceAsyncClient.set_iam_policy", + "method": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService.SetIamPolicy", + "service": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService", + "shortName": "CloudFunctionsService" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "cloudfunctions_v1_generated_cloud_functions_service_set_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_SetIamPolicy_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v1_generated_cloud_functions_service_set_iam_policy_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceClient", + "shortName": "CloudFunctionsServiceClient" + }, + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceClient.set_iam_policy", + "method": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService.SetIamPolicy", + "service": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService", + "shortName": "CloudFunctionsService" + }, + "shortName": "SetIamPolicy" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.SetIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.policy_pb2.Policy", + "shortName": "set_iam_policy" + }, + "description": "Sample for SetIamPolicy", + "file": "cloudfunctions_v1_generated_cloud_functions_service_set_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_SetIamPolicy_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 46, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 49, + "start": 47, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 50, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v1_generated_cloud_functions_service_set_iam_policy_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceAsyncClient", + "shortName": "CloudFunctionsServiceAsyncClient" + }, + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceAsyncClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService.TestIamPermissions", + "service": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService", + "shortName": "CloudFunctionsService" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "cloudfunctions_v1_generated_cloud_functions_service_test_iam_permissions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_TestIamPermissions_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v1_generated_cloud_functions_service_test_iam_permissions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceClient", + "shortName": "CloudFunctionsServiceClient" + }, + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceClient.test_iam_permissions", + "method": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService.TestIamPermissions", + "service": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService", + "shortName": "CloudFunctionsService" + }, + "shortName": "TestIamPermissions" + }, + "parameters": [ + { + "name": "request", + "type": "google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.iam.v1.iam_policy_pb2.TestIamPermissionsResponse", + "shortName": "test_iam_permissions" + }, + "description": "Sample for TestIamPermissions", + "file": "cloudfunctions_v1_generated_cloud_functions_service_test_iam_permissions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_TestIamPermissions_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 41, + "start": 39, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 47, + "start": 42, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 50, + "start": 48, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "start": 51, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v1_generated_cloud_functions_service_test_iam_permissions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceAsyncClient", + "shortName": "CloudFunctionsServiceAsyncClient" + }, + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceAsyncClient.update_function", + "method": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService.UpdateFunction", + "service": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService", + "shortName": "CloudFunctionsService" + }, + "shortName": "UpdateFunction" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v1.types.UpdateFunctionRequest" + }, + { + "name": "function", + "type": "google.cloud.functions_v1.types.CloudFunction" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_function" + }, + "description": "Sample for UpdateFunction", + "file": "cloudfunctions_v1_generated_cloud_functions_service_update_function_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_UpdateFunction_async", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v1_generated_cloud_functions_service_update_function_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceClient", + "shortName": "CloudFunctionsServiceClient" + }, + "fullName": "google.cloud.functions_v1.CloudFunctionsServiceClient.update_function", + "method": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService.UpdateFunction", + "service": { + "fullName": "google.cloud.functions.v1.CloudFunctionsService", + "shortName": "CloudFunctionsService" + }, + "shortName": "UpdateFunction" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v1.types.UpdateFunctionRequest" + }, + { + "name": "function", + "type": "google.cloud.functions_v1.types.CloudFunction" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_function" + }, + "description": "Sample for UpdateFunction", + "file": "cloudfunctions_v1_generated_cloud_functions_service_update_function_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v1_generated_CloudFunctionsService_UpdateFunction_sync", + "segments": [ + { + "end": 58, + "start": 27, + "type": "FULL" + }, + { + "end": 58, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 48, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 55, + "start": 49, + "type": "REQUEST_EXECUTION" + }, + { + "end": 59, + "start": 56, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v1_generated_cloud_functions_service_update_function_sync.py" + } + ] +} diff --git a/packages/google-cloud-functions/samples/generated_samples/snippet_metadata_google.cloud.functions.v2.json b/packages/google-cloud-functions/samples/generated_samples/snippet_metadata_google.cloud.functions.v2.json new file mode 100644 index 000000000000..0dbb0a2efac1 --- /dev/null +++ b/packages/google-cloud-functions/samples/generated_samples/snippet_metadata_google.cloud.functions.v2.json @@ -0,0 +1,1311 @@ +{ + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.functions.v2", + "version": "v2" + } + ], + "language": "PYTHON", + "name": "google-cloud-functions", + "version": "0.1.0" + }, + "snippets": [ + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.functions_v2.FunctionServiceAsyncClient", + "shortName": "FunctionServiceAsyncClient" + }, + "fullName": "google.cloud.functions_v2.FunctionServiceAsyncClient.create_function", + "method": { + "fullName": "google.cloud.functions.v2.FunctionService.CreateFunction", + "service": { + "fullName": "google.cloud.functions.v2.FunctionService", + "shortName": "FunctionService" + }, + "shortName": "CreateFunction" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v2.types.CreateFunctionRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "function", + "type": "google.cloud.functions_v2.types.Function" + }, + { + "name": "function_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "create_function" + }, + "description": "Sample for CreateFunction", + "file": "cloudfunctions_v2_generated_function_service_create_function_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v2_generated_FunctionService_CreateFunction_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v2_generated_function_service_create_function_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.functions_v2.FunctionServiceClient", + "shortName": "FunctionServiceClient" + }, + "fullName": "google.cloud.functions_v2.FunctionServiceClient.create_function", + "method": { + "fullName": "google.cloud.functions.v2.FunctionService.CreateFunction", + "service": { + "fullName": "google.cloud.functions.v2.FunctionService", + "shortName": "FunctionService" + }, + "shortName": "CreateFunction" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v2.types.CreateFunctionRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "function", + "type": "google.cloud.functions_v2.types.Function" + }, + { + "name": "function_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "create_function" + }, + "description": "Sample for CreateFunction", + "file": "cloudfunctions_v2_generated_function_service_create_function_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v2_generated_FunctionService_CreateFunction_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v2_generated_function_service_create_function_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.functions_v2.FunctionServiceAsyncClient", + "shortName": "FunctionServiceAsyncClient" + }, + "fullName": "google.cloud.functions_v2.FunctionServiceAsyncClient.delete_function", + "method": { + "fullName": "google.cloud.functions.v2.FunctionService.DeleteFunction", + "service": { + "fullName": "google.cloud.functions.v2.FunctionService", + "shortName": "FunctionService" + }, + "shortName": "DeleteFunction" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v2.types.DeleteFunctionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "delete_function" + }, + "description": "Sample for DeleteFunction", + "file": "cloudfunctions_v2_generated_function_service_delete_function_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v2_generated_FunctionService_DeleteFunction_async", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v2_generated_function_service_delete_function_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.functions_v2.FunctionServiceClient", + "shortName": "FunctionServiceClient" + }, + "fullName": "google.cloud.functions_v2.FunctionServiceClient.delete_function", + "method": { + "fullName": "google.cloud.functions.v2.FunctionService.DeleteFunction", + "service": { + "fullName": "google.cloud.functions.v2.FunctionService", + "shortName": "FunctionService" + }, + "shortName": "DeleteFunction" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v2.types.DeleteFunctionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "delete_function" + }, + "description": "Sample for DeleteFunction", + "file": "cloudfunctions_v2_generated_function_service_delete_function_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v2_generated_FunctionService_DeleteFunction_sync", + "segments": [ + { + "end": 55, + "start": 27, + "type": "FULL" + }, + { + "end": 55, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 52, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 56, + "start": 53, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v2_generated_function_service_delete_function_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.functions_v2.FunctionServiceAsyncClient", + "shortName": "FunctionServiceAsyncClient" + }, + "fullName": "google.cloud.functions_v2.FunctionServiceAsyncClient.generate_download_url", + "method": { + "fullName": "google.cloud.functions.v2.FunctionService.GenerateDownloadUrl", + "service": { + "fullName": "google.cloud.functions.v2.FunctionService", + "shortName": "FunctionService" + }, + "shortName": "GenerateDownloadUrl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v2.types.GenerateDownloadUrlRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.functions_v2.types.GenerateDownloadUrlResponse", + "shortName": "generate_download_url" + }, + "description": "Sample for GenerateDownloadUrl", + "file": "cloudfunctions_v2_generated_function_service_generate_download_url_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v2_generated_FunctionService_GenerateDownloadUrl_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v2_generated_function_service_generate_download_url_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.functions_v2.FunctionServiceClient", + "shortName": "FunctionServiceClient" + }, + "fullName": "google.cloud.functions_v2.FunctionServiceClient.generate_download_url", + "method": { + "fullName": "google.cloud.functions.v2.FunctionService.GenerateDownloadUrl", + "service": { + "fullName": "google.cloud.functions.v2.FunctionService", + "shortName": "FunctionService" + }, + "shortName": "GenerateDownloadUrl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v2.types.GenerateDownloadUrlRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.functions_v2.types.GenerateDownloadUrlResponse", + "shortName": "generate_download_url" + }, + "description": "Sample for GenerateDownloadUrl", + "file": "cloudfunctions_v2_generated_function_service_generate_download_url_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v2_generated_FunctionService_GenerateDownloadUrl_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v2_generated_function_service_generate_download_url_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.functions_v2.FunctionServiceAsyncClient", + "shortName": "FunctionServiceAsyncClient" + }, + "fullName": "google.cloud.functions_v2.FunctionServiceAsyncClient.generate_upload_url", + "method": { + "fullName": "google.cloud.functions.v2.FunctionService.GenerateUploadUrl", + "service": { + "fullName": "google.cloud.functions.v2.FunctionService", + "shortName": "FunctionService" + }, + "shortName": "GenerateUploadUrl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v2.types.GenerateUploadUrlRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.functions_v2.types.GenerateUploadUrlResponse", + "shortName": "generate_upload_url" + }, + "description": "Sample for GenerateUploadUrl", + "file": "cloudfunctions_v2_generated_function_service_generate_upload_url_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v2_generated_FunctionService_GenerateUploadUrl_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v2_generated_function_service_generate_upload_url_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.functions_v2.FunctionServiceClient", + "shortName": "FunctionServiceClient" + }, + "fullName": "google.cloud.functions_v2.FunctionServiceClient.generate_upload_url", + "method": { + "fullName": "google.cloud.functions.v2.FunctionService.GenerateUploadUrl", + "service": { + "fullName": "google.cloud.functions.v2.FunctionService", + "shortName": "FunctionService" + }, + "shortName": "GenerateUploadUrl" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v2.types.GenerateUploadUrlRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.functions_v2.types.GenerateUploadUrlResponse", + "shortName": "generate_upload_url" + }, + "description": "Sample for GenerateUploadUrl", + "file": "cloudfunctions_v2_generated_function_service_generate_upload_url_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v2_generated_FunctionService_GenerateUploadUrl_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v2_generated_function_service_generate_upload_url_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.functions_v2.FunctionServiceAsyncClient", + "shortName": "FunctionServiceAsyncClient" + }, + "fullName": "google.cloud.functions_v2.FunctionServiceAsyncClient.get_function", + "method": { + "fullName": "google.cloud.functions.v2.FunctionService.GetFunction", + "service": { + "fullName": "google.cloud.functions.v2.FunctionService", + "shortName": "FunctionService" + }, + "shortName": "GetFunction" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v2.types.GetFunctionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.functions_v2.types.Function", + "shortName": "get_function" + }, + "description": "Sample for GetFunction", + "file": "cloudfunctions_v2_generated_function_service_get_function_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v2_generated_FunctionService_GetFunction_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v2_generated_function_service_get_function_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.functions_v2.FunctionServiceClient", + "shortName": "FunctionServiceClient" + }, + "fullName": "google.cloud.functions_v2.FunctionServiceClient.get_function", + "method": { + "fullName": "google.cloud.functions.v2.FunctionService.GetFunction", + "service": { + "fullName": "google.cloud.functions.v2.FunctionService", + "shortName": "FunctionService" + }, + "shortName": "GetFunction" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v2.types.GetFunctionRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.functions_v2.types.Function", + "shortName": "get_function" + }, + "description": "Sample for GetFunction", + "file": "cloudfunctions_v2_generated_function_service_get_function_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v2_generated_FunctionService_GetFunction_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v2_generated_function_service_get_function_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.functions_v2.FunctionServiceAsyncClient", + "shortName": "FunctionServiceAsyncClient" + }, + "fullName": "google.cloud.functions_v2.FunctionServiceAsyncClient.list_functions", + "method": { + "fullName": "google.cloud.functions.v2.FunctionService.ListFunctions", + "service": { + "fullName": "google.cloud.functions.v2.FunctionService", + "shortName": "FunctionService" + }, + "shortName": "ListFunctions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v2.types.ListFunctionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.functions_v2.services.function_service.pagers.ListFunctionsAsyncPager", + "shortName": "list_functions" + }, + "description": "Sample for ListFunctions", + "file": "cloudfunctions_v2_generated_function_service_list_functions_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v2_generated_FunctionService_ListFunctions_async", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v2_generated_function_service_list_functions_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.functions_v2.FunctionServiceClient", + "shortName": "FunctionServiceClient" + }, + "fullName": "google.cloud.functions_v2.FunctionServiceClient.list_functions", + "method": { + "fullName": "google.cloud.functions.v2.FunctionService.ListFunctions", + "service": { + "fullName": "google.cloud.functions.v2.FunctionService", + "shortName": "FunctionService" + }, + "shortName": "ListFunctions" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v2.types.ListFunctionsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.functions_v2.services.function_service.pagers.ListFunctionsPager", + "shortName": "list_functions" + }, + "description": "Sample for ListFunctions", + "file": "cloudfunctions_v2_generated_function_service_list_functions_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v2_generated_FunctionService_ListFunctions_sync", + "segments": [ + { + "end": 52, + "start": 27, + "type": "FULL" + }, + { + "end": 52, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 53, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v2_generated_function_service_list_functions_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.functions_v2.FunctionServiceAsyncClient", + "shortName": "FunctionServiceAsyncClient" + }, + "fullName": "google.cloud.functions_v2.FunctionServiceAsyncClient.list_runtimes", + "method": { + "fullName": "google.cloud.functions.v2.FunctionService.ListRuntimes", + "service": { + "fullName": "google.cloud.functions.v2.FunctionService", + "shortName": "FunctionService" + }, + "shortName": "ListRuntimes" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v2.types.ListRuntimesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.functions_v2.types.ListRuntimesResponse", + "shortName": "list_runtimes" + }, + "description": "Sample for ListRuntimes", + "file": "cloudfunctions_v2_generated_function_service_list_runtimes_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v2_generated_FunctionService_ListRuntimes_async", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v2_generated_function_service_list_runtimes_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.functions_v2.FunctionServiceClient", + "shortName": "FunctionServiceClient" + }, + "fullName": "google.cloud.functions_v2.FunctionServiceClient.list_runtimes", + "method": { + "fullName": "google.cloud.functions.v2.FunctionService.ListRuntimes", + "service": { + "fullName": "google.cloud.functions.v2.FunctionService", + "shortName": "FunctionService" + }, + "shortName": "ListRuntimes" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v2.types.ListRuntimesRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.functions_v2.types.ListRuntimesResponse", + "shortName": "list_runtimes" + }, + "description": "Sample for ListRuntimes", + "file": "cloudfunctions_v2_generated_function_service_list_runtimes_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v2_generated_FunctionService_ListRuntimes_sync", + "segments": [ + { + "end": 51, + "start": 27, + "type": "FULL" + }, + { + "end": 51, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 48, + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 52, + "start": 49, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v2_generated_function_service_list_runtimes_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.functions_v2.FunctionServiceAsyncClient", + "shortName": "FunctionServiceAsyncClient" + }, + "fullName": "google.cloud.functions_v2.FunctionServiceAsyncClient.update_function", + "method": { + "fullName": "google.cloud.functions.v2.FunctionService.UpdateFunction", + "service": { + "fullName": "google.cloud.functions.v2.FunctionService", + "shortName": "FunctionService" + }, + "shortName": "UpdateFunction" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v2.types.UpdateFunctionRequest" + }, + { + "name": "function", + "type": "google.cloud.functions_v2.types.Function" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "update_function" + }, + "description": "Sample for UpdateFunction", + "file": "cloudfunctions_v2_generated_function_service_update_function_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v2_generated_FunctionService_UpdateFunction_async", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v2_generated_function_service_update_function_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.functions_v2.FunctionServiceClient", + "shortName": "FunctionServiceClient" + }, + "fullName": "google.cloud.functions_v2.FunctionServiceClient.update_function", + "method": { + "fullName": "google.cloud.functions.v2.FunctionService.UpdateFunction", + "service": { + "fullName": "google.cloud.functions.v2.FunctionService", + "shortName": "FunctionService" + }, + "shortName": "UpdateFunction" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.functions_v2.types.UpdateFunctionRequest" + }, + { + "name": "function", + "type": "google.cloud.functions_v2.types.Function" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "update_function" + }, + "description": "Sample for UpdateFunction", + "file": "cloudfunctions_v2_generated_function_service_update_function_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudfunctions_v2_generated_FunctionService_UpdateFunction_sync", + "segments": [ + { + "end": 54, + "start": 27, + "type": "FULL" + }, + { + "end": 54, + "start": 27, + "type": "SHORT" + }, + { + "end": 40, + "start": 38, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 44, + "start": 41, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 51, + "start": 45, + "type": "REQUEST_EXECUTION" + }, + { + "end": 55, + "start": 52, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudfunctions_v2_generated_function_service_update_function_sync.py" + } + ] +}