Service Client: Google::Cloud::Modelarmor::V1beta::Service::ModelArmorClient

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

target

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

credentials

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

NAME

Google::Cloud::Modelarmor::V1beta::Service - Compiled Protocol Buffers messages for google/cloud/modelarmor/v1beta/service.proto

SYNOPSIS

use Google::Cloud::Modelarmor::V1beta::Service;

my $msg = Google::Cloud::Modelarmor::V1beta::Service::Template->new({
    name => $name,
    create_time => $create_time,
    update_time => $update_time,
    labels => $labels,
});

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

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Cloud::Modelarmor::V1beta::Service::Template->parse($bytes);

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

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/modelarmor/v1beta/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::Cloud::Modelarmor::V1beta::Service::Template

Message describing Template resource

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Modelarmor::V1beta::Service::FloorSetting

Message describing FloorSetting resource

Inherits from Protobuf::Message.

Accessors

Enum: FloorSetting::IntegratedService

  • INTEGRATED_SERVICE_UNSPECIFIED => 0

  • AI_PLATFORM => 1

  • GOOGLE_MCP_SERVER => 2

Google::Cloud::Modelarmor::V1beta::Service::McpServerFloorSetting

Message describing MCP Server Floor Setting.

Inherits from Protobuf::Message.

Accessors

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

    Type: Bool

    Optional. If true, Model Armor filters will be run in inspect only mode. No action will be taken on the request.

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

    Type: Bool

    Optional. If true, Model Armor filters will be run in inspect and block mode. Requests that trip Model Armor filters will be blocked.

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

    Type: Bool

    Optional. If true, log Model Armor filter results to Cloud Logging.

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

    Type: String

    Optional. List of MCP servers for which the MCP floor setting is applicable. Examples: "bigquery.googleapis.com/mcp", "run.googleapis.com/mcp" Empty list denotes that the floor setting is applicable to all MCP servers.

Google::Cloud::Modelarmor::V1beta::Service::AiPlatformFloorSetting

message describing AiPlatformFloorSetting

Inherits from Protobuf::Message.

Accessors

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

    Type: Bool

    Optional. If true, Model Armor filters will be run in inspect only mode. No action will be taken on the request.

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

    Type: Bool

    Optional. If true, Model Armor filters will be run in inspect and block mode. Requests that trip Model Armor filters will be blocked.

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

    Type: Bool

    Optional. If true, log Model Armor filter results to Cloud Logging.

Google::Cloud::Modelarmor::V1beta::Service::ListTemplatesRequest

Message for requesting list of Templates

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Required. Parent value for ListTemplatesRequest

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

    Type: Int32

    Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.

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

    Type: String

    Optional. A token identifying a page of results the server should return.

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

    Type: String

    Optional. Filtering results

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

    Type: String

    Optional. Hint for how to order the results

Google::Cloud::Modelarmor::V1beta::Service::ListTemplatesResponse

Message for response to listing Templates

Inherits from Protobuf::Message.

Accessors

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

    Type: Message (Google::Cloud::Modelarmor::V1beta::Service::Template)

    The list of Template

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

    Type: String

    A token identifying a page of results the server should return.

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

    Type: String

    Locations that could not be reached.

Google::Cloud::Modelarmor::V1beta::Service::GetTemplateRequest

Message for getting a Template

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Required. Name of the resource

Google::Cloud::Modelarmor::V1beta::Service::CreateTemplateRequest

Message for creating a Template

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Required. Value for parent.

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

    Type: String

    Required. Id of the requesting object If auto-generating Id server-side, remove this field and template_id from the method_signature of Create RPC

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

    Type: Message (Google::Cloud::Modelarmor::V1beta::Service::Template)

    Required. The resource being created

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

    Type: String

    Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server stores the request ID for 60 minutes after the first request.

    For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Google::Cloud::Modelarmor::V1beta::Service::UpdateTemplateRequest

Message for updating a Template

Inherits from Protobuf::Message.

Accessors

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

    Type: Message (Google::Protobuf::FieldMask::FieldMask)

    Required. Field mask is used to specify the fields to be overwritten in the Template resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

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

    Type: Message (Google::Cloud::Modelarmor::V1beta::Service::Template)

    Required. The resource being updated

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

    Type: String

    Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server stores the request ID for 60 minutes after the first request.

    For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Google::Cloud::Modelarmor::V1beta::Service::DeleteTemplateRequest

Message for deleting a Template

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Required. Name of the resource

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

    Type: String

    Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server stores the request ID for 60 minutes after the first request.

    For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

    The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Google::Cloud::Modelarmor::V1beta::Service::GetFloorSettingRequest

Message for getting a Floor Setting

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Required. The name of the floor setting to get, example projects/123/floorsetting.

Google::Cloud::Modelarmor::V1beta::Service::UpdateFloorSettingRequest

Message for Updating a Floor Setting

Inherits from Protobuf::Message.

Accessors

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

    Type: Message (Google::Cloud::Modelarmor::V1beta::Service::FloorSetting)

    Required. The floor setting being updated.

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

    Type: Message (Google::Protobuf::FieldMask::FieldMask)

    Optional. Field mask is used to specify the fields to be overwritten in the FloorSetting resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

Google::Cloud::Modelarmor::V1beta::Service::FilterConfig

Filters configuration.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Modelarmor::V1beta::Service::PiAndJailbreakFilterSettings

Prompt injection and Jailbreak Filter settings.

Inherits from Protobuf::Message.

Accessors

Enum: PiAndJailbreakFilterSettings::PiAndJailbreakFilterEnforcement

  • PI_AND_JAILBREAK_FILTER_ENFORCEMENT_UNSPECIFIED => 0

  • ENABLED => 1

  • DISABLED => 2

Google::Cloud::Modelarmor::V1beta::Service::MaliciousUriFilterSettings

Malicious URI filter settings.

Inherits from Protobuf::Message.

Accessors

Enum: MaliciousUriFilterSettings::MaliciousUriFilterEnforcement

  • MALICIOUS_URI_FILTER_ENFORCEMENT_UNSPECIFIED => 0

  • ENABLED => 1

  • DISABLED => 2

Google::Cloud::Modelarmor::V1beta::Service::RaiFilterSettings

Responsible AI Filter settings.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Modelarmor::V1beta::Service::SdpFilterSettings

Sensitive Data Protection settings.

Inherits from Protobuf::Message.

Accessors

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

    Type: Message (Google::Cloud::Modelarmor::V1beta::Service::SdpBasicConfig)

    Optional. Basic Sensitive Data Protection configuration inspects the content for sensitive data using a fixed set of six info-types. Sensitive Data Protection templates cannot be used with basic configuration. Only Sensitive Data Protection inspection operation is supported with basic configuration.

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

    Type: Message (Google::Cloud::Modelarmor::V1beta::Service::SdpAdvancedConfig)

    Optional. Advanced Sensitive Data Protection configuration which enables use of Sensitive Data Protection templates. Supports both Sensitive Data Protection inspection and de-identification operations.

Google::Cloud::Modelarmor::V1beta::Service::SdpBasicConfig

Sensitive Data Protection basic configuration.

Inherits from Protobuf::Message.

Accessors

Enum: SdpBasicConfig::SdpBasicConfigEnforcement

  • SDP_BASIC_CONFIG_ENFORCEMENT_UNSPECIFIED => 0

  • ENABLED => 1

  • DISABLED => 2

Google::Cloud::Modelarmor::V1beta::Service::SdpAdvancedConfig

Sensitive Data Protection Advanced configuration.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Optional. Sensitive Data Protection inspect template resource name

    If only inspect template is provided (de-identify template not provided), then Sensitive Data Protection InspectContent action is performed during Sanitization. All Sensitive Data Protection findings identified during inspection will be returned as SdpFinding in SdpInsepctionResult.

    e.g. `projects/{project}/locations/{location}/inspectTemplates/{inspect_template}`

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

    Type: String

    Optional. Optional Sensitive Data Protection Deidentify template resource name.

    If provided then DeidentifyContent action is performed during Sanitization using this template and inspect template. The De-identified data will be returned in SdpDeidentifyResult. Note that all info-types present in the deidentify template must be present in inspect template.

    e.g. `projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}`

Google::Cloud::Modelarmor::V1beta::Service::SanitizeUserPromptRequest

Sanitize User Prompt request.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Modelarmor::V1beta::Service::SanitizeModelResponseRequest

Sanitize Model Response request.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Modelarmor::V1beta::Service::SanitizeUserPromptResponse

Sanitized User Prompt Response.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Modelarmor::V1beta::Service::SanitizeModelResponseResponse

Sanitized Model Response Response.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Modelarmor::V1beta::Service::SanitizationResult

Sanitization result after applying all the filters on input content.

Inherits from Protobuf::Message.

Accessors

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

    Type: Enum (Google::Cloud::Modelarmor::V1beta::FilterMatchState)

    Output only. Overall filter match state for Sanitization. The state can have below two values.

    1) NO_MATCH_FOUND: No filters in configuration satisfy matching criteria. In other words, input passed all filters.

    2) MATCH_FOUND: At least one filter in configuration satisfies matching. In other words, input did not pass one or more filters.

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

    Type: Message (Google::Cloud::Modelarmor::V1beta::Service::SanitizationResult::FilterResultsEntry)

    Output only. Results for all filters where the key is the filter name - either of "csam", "malicious_uris", "rai", "pi_and_jailbreak" ,"sdp".

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

    Type: Enum (Google::Cloud::Modelarmor::V1beta::InvocationResult)

    Output only. A field indicating the outcome of the invocation, irrespective of match status. It can have the following three values: SUCCESS: All filters were executed successfully. PARTIAL: Some filters were skipped or failed execution. FAILURE: All filters were skipped or failed execution.

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

    Type: Message (Google::Cloud::Modelarmor::V1beta::Service::SanitizationResult::SanitizationMetadata)

    Output only. Metadata related to Sanitization.

Google::Cloud::Modelarmor::V1beta::Service::MultiLanguageDetectionMetadata

Message for Enabling Multi Language Detection.

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Optional. Optional Source language of the user prompt.

    If multi-language detection is enabled and this field is not set, the source language will be automatically detected. When a source language is provided, Model Armor uses it to sanitize the input. In that case the system does not perform auto-detection and relies solely on the specified language.

    This string field accepts a language code from the ISO-639 standard. For a list of languages supported by Model Armor, see [Model Armor supported languages] (https://cloud.google.com/security-command-center/docs/model-armor-overview#languages-supported). For a comprehensive list of language codes, see [ISO-639](https://cloud.google.com/translate/docs/languages#nmt).

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

    Type: Bool

    Optional. Enable detection of multi-language prompts and responses.

Google::Cloud::Modelarmor::V1beta::Service::FilterResult

Filter Result obtained after Sanitization operations.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Modelarmor::V1beta::Service::RaiFilterResult

Responsible AI Result.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Modelarmor::V1beta::Service::SdpFilterResult

Sensitive Data Protection filter result.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Modelarmor::V1beta::Service::SdpInspectResult

Sensitive Data Protection Inspection Result.

Inherits from Protobuf::Message.

Accessors

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

    Type: Enum (Google::Cloud::Modelarmor::V1beta::FilterExecutionState)

    Output only. Reports whether Sensitive Data Protection inspection was successfully executed or not.

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

    Type: Message (Google::Cloud::Modelarmor::V1beta::Service::MessageItem)

    Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation.

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

    Type: Enum (Google::Cloud::Modelarmor::V1beta::FilterMatchState)

    Output only. Match state for SDP Inspection. Value is MATCH_FOUND if at least one Sensitive Data Protection finding is identified.

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

    Type: Message (Google::Cloud::Modelarmor::V1beta::Service::SdpFinding)

    List of Sensitive Data Protection findings.

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

    Type: Bool

    If true, then there is possibility that more findings were identified and the findings returned are a subset of all findings. The findings list might be truncated because the input items were too large, or because the server reached the maximum amount of resources allowed for a single API call.

Google::Cloud::Modelarmor::V1beta::Service::DataItem

Represents Data item

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Modelarmor::V1beta::Service::ByteDataItem

Represents Byte Data item.

Inherits from Protobuf::Message.

Accessors

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

    Type: Enum (Google::Cloud::Modelarmor::V1beta::ByteDataItem::ByteItemType)

    Required. The type of byte data

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

    Type: Bytes

    Required. Bytes Data

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

    Type: String

    Optional. Label of the file. This is used to identify the file in the response.

Enum: ByteDataItem::ByteItemType

  • BYTE_ITEM_TYPE_UNSPECIFIED => 0

  • PLAINTEXT_UTF8 => 1

  • PDF => 2

  • WORD_DOCUMENT => 3

  • EXCEL_DOCUMENT => 4

  • POWERPOINT_DOCUMENT => 5

  • TXT => 6

  • CSV => 7

  • ZIP => 9

Google::Cloud::Modelarmor::V1beta::Service::SdpDeidentifyResult

Sensitive Data Protection Deidentification Result.

Inherits from Protobuf::Message.

Accessors

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

    Type: Enum (Google::Cloud::Modelarmor::V1beta::FilterExecutionState)

    Output only. Reports whether Sensitive Data Protection deidentification was successfully executed or not.

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

    Type: Message (Google::Cloud::Modelarmor::V1beta::Service::MessageItem)

    Optional messages corresponding to the result. A message can provide warnings or error details. For example, if execution state is skipped then this field provides related reason/explanation.

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

    Type: Enum (Google::Cloud::Modelarmor::V1beta::FilterMatchState)

    Output only. Match state for Sensitive Data Protection Deidentification. Value is MATCH_FOUND if content is de-identified.

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

    Type: Message (Google::Cloud::Modelarmor::V1beta::Service::DataItem)

    De-identified data.

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

    Type: Int64

    Total size in bytes that were transformed during deidentification.

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

    Type: String

    List of Sensitive Data Protection info-types that were de-identified.

Google::Cloud::Modelarmor::V1beta::Service::SdpFinding

Finding corresponding to Sensitive Data Protection filter.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Modelarmor::V1beta::Service::PiAndJailbreakFilterResult

Prompt injection and Jailbreak Filter Result.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Modelarmor::V1beta::Service::MaliciousUriFilterResult

Malicious URI Filter Result.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Modelarmor::V1beta::Service::VirusScanFilterResult

Virus scan results.

Inherits from Protobuf::Message.

Accessors

Enum: VirusScanFilterResult::ScannedContentType

  • SCANNED_CONTENT_TYPE_UNSPECIFIED => 0

  • UNKNOWN => 1

  • PLAINTEXT => 2

  • PDF => 3

Google::Cloud::Modelarmor::V1beta::Service::VirusDetail

Details of an identified virus

Inherits from Protobuf::Message.

Accessors

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

    Type: String

    Name of vendor that produced this virus identification.

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

    Type: String

    Names of this Virus.

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

    Type: Enum (Google::Cloud::Modelarmor::V1beta::VirusDetail::ThreatType)

    Threat type of the identified virus

Enum: VirusDetail::ThreatType

  • THREAT_TYPE_UNSPECIFIED => 0

  • UNKNOWN => 1

  • VIRUS_OR_WORM => 2

  • MALICIOUS_PROGRAM => 3

  • POTENTIALLY_HARMFUL_CONTENT => 4

  • POTENTIALLY_UNWANTED_CONTENT => 5

Google::Cloud::Modelarmor::V1beta::Service::CsamFilterResult

CSAM (Child Safety Abuse Material) Filter Result

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Modelarmor::V1beta::Service::MessageItem

Message item to report information, warning or error messages.

Inherits from Protobuf::Message.

Accessors

Enum: MessageItem::MessageType

  • MESSAGE_TYPE_UNSPECIFIED => 0

  • INFO => 1

  • WARNING => 2

  • ERROR => 3

Google::Cloud::Modelarmor::V1beta::Service::RangeInfo

Half-open range interval [start, end)

Inherits from Protobuf::Message.

Accessors

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

    Type: Int64

    For proto3, value cannot be set to 0 unless the field is optional. Ref: https://protobuf.dev/programming-guides/proto3/#default Index of first character (inclusive).

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

    Type: Int64

    Index of last character (exclusive).

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Modelarmor::V1beta::Service::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.