|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +# Copyright 2026 Google LLC |
| 3 | +# |
| 4 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +# you may not use this file except in compliance with the License. |
| 6 | +# You may obtain a copy of the License at |
| 7 | +# |
| 8 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +# |
| 10 | +# Unless required by applicable law or agreed to in writing, software |
| 11 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +# See the License for the specific language governing permissions and |
| 14 | +# limitations under the License. |
| 15 | +# |
| 16 | +# Generated code. DO NOT EDIT! |
| 17 | +# |
| 18 | +# Snippet for Import |
| 19 | +# NOTE: This snippet has been automatically generated for illustrative purposes only. |
| 20 | +# It may require modifications to work in your environment. |
| 21 | + |
| 22 | +# To install the latest published package dependency, execute the following: |
| 23 | +# python3 -m pip install animalia-mollusca |
| 24 | + |
| 25 | + |
| 26 | +# [START mollusca_v1_generated_Snippets_Import_async] |
| 27 | +# This snippet has been automatically generated and should be regarded as a |
| 28 | +# code template only. |
| 29 | +# It will require modifications to work: |
| 30 | +# - It may require correct/in-range values for request initialization. |
| 31 | +# - It may require specifying regional endpoints when creating the service |
| 32 | +# client as shown in: |
| 33 | +# https://googleapis.dev/python/google-api-core/latest/client_options.html |
| 34 | +import asyncio |
| 35 | + |
| 36 | +from animalia import mollusca_v1 |
| 37 | + |
| 38 | + |
| 39 | +async def sample_import_(): |
| 40 | + # Create a client |
| 41 | + client = mollusca_v1.SnippetsAsyncClient() |
| 42 | + |
| 43 | + # Initialize request argument(s) |
| 44 | + my_message = mollusca_v1.MessageWithNesting() |
| 45 | + my_message.message.required_string = "required_string_value" |
| 46 | + my_message.my_int = 656 |
| 47 | + |
| 48 | + request = mollusca_v1.SignatureRequest( |
| 49 | + my_string="my_string_value", |
| 50 | + my_int=656, |
| 51 | + my_bool=True, |
| 52 | + my_message=my_message, |
| 53 | + single_enum="DEFAULT", |
| 54 | + ) |
| 55 | + |
| 56 | + # Make the request |
| 57 | + response = await client.import_(request=request) |
| 58 | + |
| 59 | + # Handle the response |
| 60 | + print(response) |
| 61 | + |
| 62 | +# [END mollusca_v1_generated_Snippets_Import_async] |
0 commit comments