Service Client: Google::Ai::Generativelanguage::V1beta::PredictionService::PredictionServiceClient

Client stub representing the remote PredictionService gRPC service. Delegates call dispatching to Google::gRPC::Client.

target

The endpoint target address. Defaults to ai.googleapis.com:443.

credentials

The authentication credentials provider. Defaults to application default credentials via Google::Auth.

NAME

Google::Ai::Generativelanguage::V1beta::PredictionService - Compiled Protocol Buffers messages for google/ai/generativelanguage/v1beta/prediction_service.proto

SYNOPSIS

use Google::Ai::Generativelanguage::V1beta::PredictionService;

my $msg = Google::Ai::Generativelanguage::V1beta::PredictionService::PredictRequest->new({
    model => $model,
    instances => $instances,
    parameters => $parameters,
});

# Read or update a field
my $val = $msg->model();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Ai::Generativelanguage::V1beta::PredictionService::PredictRequest->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/ai/generativelanguage/v1beta/prediction_service.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Ai::Generativelanguage::V1beta::PredictionService::PredictRequest

Request message for [PredictionService.Predict][google.ai.generativelanguage.v1beta.PredictionService.Predict].

Inherits from Protobuf::Message.

Accessors

  • $msg->model() / $msg->model($value)

    Type: String

    Required. The name of the model for prediction. Format: `name=models/{model}`.

  • $msg->instances() / $msg->instances($value)

    Type: Message (Google::Protobuf::Struct::Value)

    Required. The instances that are the input to the prediction call.

  • $msg->parameters() / $msg->parameters($value)

    Type: Message (Google::Protobuf::Struct::Value)

    Optional. The parameters that govern the prediction call.

Google::Ai::Generativelanguage::V1beta::PredictionService::PredictLongRunningRequest

Request message for [PredictionService.PredictLongRunning].

Inherits from Protobuf::Message.

Accessors

  • $msg->model() / $msg->model($value)

    Type: String

    Required. The name of the model for prediction. Format: `name=models/{model}`.

  • $msg->instances() / $msg->instances($value)

    Type: Message (Google::Protobuf::Struct::Value)

    Required. The instances that are the input to the prediction call.

  • $msg->parameters() / $msg->parameters($value)

    Type: Message (Google::Protobuf::Struct::Value)

    Optional. The parameters that govern the prediction call.

Google::Ai::Generativelanguage::V1beta::PredictionService::PredictResponse

Response message for [PredictionService.Predict].

Inherits from Protobuf::Message.

Accessors

Google::Ai::Generativelanguage::V1beta::PredictionService::PredictLongRunningResponse

Response message for [PredictionService.PredictLongRunning]

Inherits from Protobuf::Message.

Accessors

Google::Ai::Generativelanguage::V1beta::PredictionService::PredictLongRunningMetadata

Metadata for PredictLongRunning long running operations.

Inherits from Protobuf::Message.

Google::Ai::Generativelanguage::V1beta::PredictionService::Media

A proto encapsulate various type of media.

Inherits from Protobuf::Message.

Accessors

Google::Ai::Generativelanguage::V1beta::PredictionService::Video

Representation of a video.

Inherits from Protobuf::Message.

Accessors

  • $msg->video() / $msg->video($value)

    Type: Bytes

    Raw bytes.

  • $msg->uri() / $msg->uri($value)

    Type: String

    Path to another storage.

Google::Ai::Generativelanguage::V1beta::PredictionService::PredictLongRunningGeneratedVideoResponse

Veo response.

Inherits from Protobuf::Message.

Accessors

  • $msg->generated_samples() / $msg->generated_samples($value)

    Type: Message (Google::Ai::Generativelanguage::V1beta::PredictionService::Media)

    The generated samples.

  • $msg->rai_media_filtered_count() / $msg->rai_media_filtered_count($value)

    Type: Int32

    Returns if any videos were filtered due to RAI policies.

  • $msg->rai_media_filtered_reasons() / $msg->rai_media_filtered_reasons($value)

    Type: String

    Returns rai failure reasons if any.

SEE ALSO

Protobuf, Protobuf::Message, Google::Ai::Generativelanguage::V1beta::PredictionService::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.