Exemple #1
0
def sample_method_lro_signatures():
    # Create a client
    client = mollusca_v1.SnippetsClient()

    # Initialize request argument(s)
    my_message = mollusca_v1.MessageWithNesting()
    my_message.message.required_string = "required_string_value"
    my_message.my_int = 656

    request = mollusca_v1.SignatureRequest(
        my_string="my_string_value",
        my_int=656,
        my_bool=True,
        my_message=my_message,
        single_enum="DEFAULT",
    )

    # Make the request
    operation = client.method_lro_signatures(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Exemple #2
0
async def sample_method_one_signature():
    # Create a client
    client = mollusca_v1.SnippetsAsyncClient()

    # Initialize request argument(s)
    my_message = mollusca_v1.MessageWithNesting()
    my_message.message.required_string = "required_string_value"
    my_message.my_int = 656

    request = mollusca_v1.SignatureRequest(
        my_string="my_string_value",
        my_int=656,
        my_bool=True,
        my_message=my_message,
        single_enum="DEFAULT",
    )

    # Make the request
    response = await client.method_one_signature(request=request)

    # Handle the response
    print(response)
Exemple #3
0
def sample_method_server_streaming():
    # Create a client
    client = mollusca_v1.SnippetsClient()

    # Initialize request argument(s)
    my_message = mollusca_v1.MessageWithNesting()
    my_message.message.required_string = "required_string_value"
    my_message.my_int = 656

    request = mollusca_v1.SignatureRequest(
        my_string="my_string_value",
        my_int=656,
        my_bool=True,
        my_message=my_message,
        single_enum="DEFAULT",
    )

    # Make the request
    stream = client.method_server_streaming(request=request)

    # Handle the response
    for response in stream:
        print(response)