feat: Add new gcloud commands, API clients, and third-party libraries across various services.

This commit is contained in:
2026-01-01 20:26:35 +01:00
parent 5e23cbece0
commit a19e592eb7
25221 changed files with 8324611 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
"""Manages Model Armor resources."""
from googlecloudsdk.calliope import base
from surface.model_armor import _init_extensions as extensions
@base.ReleaseTracks(base.ReleaseTrack.ALPHA)
@base.Autogenerated
class ModelArmorAlpha(extensions.ModelArmorAlpha):
"""Model Armor is a service offering LLM-agnostic security and AI safety measures to mitigate risks associated with large language models (LLMs)."""
@base.ReleaseTracks(base.ReleaseTrack.BETA)
@base.Autogenerated
class ModelArmorBeta(extensions.ModelArmorBeta):
"""Model Armor is a service offering LLM-agnostic security and AI safety measures to mitigate risks associated with large language models (LLMs)."""
@base.ReleaseTracks(base.ReleaseTrack.GA)
@base.Autogenerated
class ModelArmorGa(extensions.ModelArmorGa):
"""Model Armor is a service offering LLM-agnostic security and AI safety measures to mitigate risks associated with large language models (LLMs)."""

View File

@@ -0,0 +1,34 @@
# -*- coding: utf-8 -*- #
# Copyright 2024 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
"""File to add optional custom code to extend __init__.py."""
from googlecloudsdk.calliope import base
class ModelArmorAlpha(base.Group):
"""Optional no-auto-generated code for ALPHA."""
category = base.UNCATEGORIZED_CATEGORY
class ModelArmorBeta(base.Group):
"""Optional no-auto-generated code for BETA."""
category = base.UNCATEGORIZED_CATEGORY
class ModelArmorGa(base.Group):
"""Optional no-auto-generated code for GA."""
category = base.UNCATEGORIZED_CATEGORY

View File

@@ -0,0 +1,33 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 Google LLC. All Rights Reserved.
#
# 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.
"""Manage FloorSettings resources."""
from googlecloudsdk.calliope import base
from surface.model_armor.templates import _init_extensions as extensions
@base.ReleaseTracks(base.ReleaseTrack.ALPHA)
class FloorSettingsAlpha(extensions.TemplatesAlpha):
"""Manage FloorSettings resources."""
@base.ReleaseTracks(base.ReleaseTrack.GA)
class FloorSettingsGA(extensions.TemplatesGa):
"""Manage FloorSettings resources."""
@base.ReleaseTracks(base.ReleaseTrack.BETA)
class FloorSettingsBeta(extensions.TemplatesBeta):
"""Manage FloorSettings resources."""

View File

@@ -0,0 +1,88 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 Google LLC. All Rights Reserved.
#
# 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.
"""Describe the FloorSetting resource."""
from googlecloudsdk.api_lib.model_armor import api as model_armor_api
from googlecloudsdk.calliope import base
from googlecloudsdk.command_lib.model_armor import args as model_armor_args
@base.DefaultUniverseOnly
@base.ReleaseTracks(base.ReleaseTrack.ALPHA)
class DescribeAlpha(base.DescribeCommand):
"""Describe the FloorSetting resource.
Displays the floor setting resource with the given name.
"""
@staticmethod
def Args(parser):
model_armor_args.AddFullUri(
parser,
positional=False,
help_text='Full uri of the floor setting',
)
def Run(self, args):
api_version = model_armor_api.GetApiFromTrack(self.ReleaseTrack())
return model_armor_api.FloorSettings(api_version=api_version).Get(
args.full_uri
)
@base.DefaultUniverseOnly
@base.ReleaseTracks(base.ReleaseTrack.BETA)
class DescribeBeta(base.DescribeCommand):
"""Describe the FloorSetting resource.
Displays the floor setting resource with the given name.
"""
@staticmethod
def Args(parser):
model_armor_args.AddFullUri(
parser,
positional=False,
help_text='Full uri of the floor setting',
)
def Run(self, args):
api_version = model_armor_api.GetApiFromTrack(self.ReleaseTrack())
return model_armor_api.FloorSettings(api_version=api_version).Get(
args.full_uri
)
@base.DefaultUniverseOnly
@base.ReleaseTracks(base.ReleaseTrack.GA)
class Describe(base.DescribeCommand):
"""Describe the FloorSetting resource.
Displays the floor setting resource with the given name.
"""
@staticmethod
def Args(parser):
model_armor_args.AddFullUri(
parser,
positional=False,
help_text='Full uri of the floor setting',
)
def Run(self, args):
api_version = model_armor_api.GetApiFromTrack(self.ReleaseTrack())
return model_armor_api.FloorSettings(api_version=api_version).Get(
args.full_uri
)

View File

@@ -0,0 +1,783 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 Google LLC. All Rights Reserved.
#
# 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.
"""Fetch the FloorSetting resource."""
import dataclasses
import json
from googlecloudsdk.api_lib.model_armor import api as model_armor_api
from googlecloudsdk.calliope import base
from googlecloudsdk.calliope import exceptions
from googlecloudsdk.command_lib.model_armor import args as model_armor_args
from googlecloudsdk.command_lib.model_armor import util as model_armor_util
from googlecloudsdk.core import log
@dataclasses.dataclass
class ServiceConfig:
"""Configuration for an integrated service."""
name: str
enum: ...
enforcement_type_arg: str
enforcement_type_flag_name: str
cloud_logging_arg: str
service_floor_setting_arg: str
service_floor_setting_attr: str
defaulted_enforcement_flag_name: str
setting_message: ...
cli_name: str
def _GetServicesConfig(messages):
"""Returns a list of service configurations."""
return [
ServiceConfig(
name='VERTEX_AI',
enum=(
messages.FloorSetting.IntegratedServicesValueListEntryValuesEnum.AI_PLATFORM
),
enforcement_type_arg='vertex_ai_enforcement_type',
enforcement_type_flag_name='--vertex-ai-enforcement-type',
cloud_logging_arg='enable_vertex_ai_cloud_logging',
service_floor_setting_arg='ai_platform_floor_setting',
service_floor_setting_attr='aiPlatformFloorSetting',
defaulted_enforcement_flag_name='vertex_ai_enforcement_defaulted',
setting_message=messages.AiPlatformFloorSetting,
cli_name='vertex-ai',
),
ServiceConfig(
name='GOOGLE_MCP_SERVER',
enum=(
messages.FloorSetting.IntegratedServicesValueListEntryValuesEnum.GOOGLE_MCP_SERVER
),
enforcement_type_arg='google_mcp_server_enforcement_type',
enforcement_type_flag_name='--google-mcp-server-enforcement-type',
cloud_logging_arg='enable_google_mcp_server_cloud_logging',
service_floor_setting_attr='googleMcpServerFloorSetting',
service_floor_setting_arg='google_mcp_server_floor_setting',
defaulted_enforcement_flag_name=(
'google_mcp_server_enforcement_defaulted'
),
setting_message=messages.McpServerFloorSetting,
cli_name='google-mcp-server',
),
]
@base.DefaultUniverseOnly
@base.ReleaseTracks(
base.ReleaseTrack.ALPHA, base.ReleaseTrack.BETA, base.ReleaseTrack.GA
)
class Update(base.Command):
"""Update the FloorSetting resource.
Updates the floor setting resource with the given name.
"""
NO_CHANGES_MESSAGE = 'There are no changes to the floor setting for update.'
@staticmethod
def Args(parser):
model_armor_args.AddFullUri(
parser,
positional=False,
required=True,
help_text='Full uri of the floor setting',
)
model_armor_args.AddFloorSettingEnforcement(
parser,
positional=False,
required=False,
)
model_armor_args.AddMaliciousUriFilterSettingsEnforcement(parser)
model_armor_args.AddPIJBFilterSettingsGroup(parser)
model_armor_args.AddSDPFilterBasicConfigGroup(parser)
model_armor_args.AddRaiFilterSettingsGroup(parser)
model_armor_args.AddIntegratedServices(parser)
model_armor_args.AddVertexAiFloorSetting(parser)
model_armor_args.AddGoogleMcpServerFloorSetting(parser)
model_armor_args.AddMultiLanguageDetection(parser)
def _GetEnumValue(self, value):
return value.upper().replace('-', '_')
def _updateMaskForEnforcementType(
self, *, service_floor_setting_arg, arg_enforcement_type, update_mask
):
"""Update the update mask for enforcement type."""
if arg_enforcement_type == 'INSPECT_ONLY':
update_mask.append(service_floor_setting_arg + '.inspect_only')
elif arg_enforcement_type == 'INSPECT_AND_BLOCK':
update_mask.append(service_floor_setting_arg + '.inspect_and_block')
def _handleEnforcementType(self, arg_enforcement_type, service_floor_setting):
"""Handle the enforcement type for Integreated Services."""
# Reset both oneof fields to None before setting the desired one.
setattr(service_floor_setting, 'inspectOnly', None)
setattr(service_floor_setting, 'inspectAndBlock', None)
if arg_enforcement_type == 'INSPECT_ONLY':
setattr(
service_floor_setting,
'inspectOnly',
True,
)
elif arg_enforcement_type == 'INSPECT_AND_BLOCK':
setattr(
service_floor_setting,
'inspectAndBlock',
True,
)
def _validateRaiFilterSettings(self, messages, filters, argument_name):
for item in [json.loads(f) for f in filters]:
confidence_level = item['confidenceLevel']
filter_type = item['filterType']
model_armor_util.ValidateEnum(
filter_type,
messages.RaiFilter.FilterTypeValueValuesEnum,
argument_name,
f'Invalid choice : {filter_type}',
)
model_armor_util.ValidateEnum(
confidence_level,
messages.RaiFilter.ConfidenceLevelValueValuesEnum,
argument_name,
f'Invalid choice : {confidence_level}',
)
def _validateIntegratedServices(self, messages, services):
for service in services:
if service == 'VERTEX_AI':
service = 'AI_PLATFORM'
model_armor_util.ValidateEnum(
service,
messages.FloorSetting.IntegratedServicesValueListEntryValuesEnum,
'integrated-services',
f'{service}',
)
def _validateRemoveIntegratedServices(self, messages, args):
"""Validate the arguments for removing integrated services."""
self._validateIntegratedServices(messages, args.remove_integrated_services)
services_config = _GetServicesConfig(messages)
services_config_by_name = {
service_config.name: service_config
for service_config in services_config
}
for service_name in args.remove_integrated_services:
if service_name in services_config_by_name:
service_config = services_config_by_name[service_name]
if service_name == service_config.name:
if args.IsSpecified(service_config.enforcement_type_arg):
raise exceptions.ConflictingArgumentsException(
f'--remove-integrated-services={service_config.name}',
f'--{service_config.cli_name}-enforcement-type',
)
if args.IsSpecified(service_config.cloud_logging_arg):
raise exceptions.ConflictingArgumentsException(
f'--remove-integrated-services={service_config.name}',
f'--enable-{service_config.cli_name}-cloud-logging',
)
def _validateClearIntegratedServices(self, messages, args):
"""Validate the arguments for clearing integrated services."""
services_config = _GetServicesConfig(messages)
for service_config in services_config:
if args.IsSpecified(service_config.enforcement_type_arg):
raise exceptions.ConflictingArgumentsException(
'--clear-integrated-services',
f'--{service_config.cli_name}-enforcement-type',
)
if args.IsSpecified(service_config.cloud_logging_arg):
raise exceptions.ConflictingArgumentsException(
'--clear-integrated-services',
f'--enable-{service_config.cli_name}-cloud-logging',
)
def _validateEnforcementType(self, enforcement_type, service_name):
if (
enforcement_type == 'INSPECT_ONLY'
or enforcement_type == 'INSPECT_AND_BLOCK'
):
return
raise exceptions.InvalidArgumentException(
f'{service_name}-enforcement-type',
f'argument --{service_name}-enforcement-type: Invalid choice:'
f' {enforcement_type!r}. Valid choices are [INSPECT_AND_BLOCK,'
' INSPECT_ONLY].',
)
def _validateArgs(self, messages, args):
"""Validate the arguments."""
if args.pi_and_jailbreak_filter_settings_confidence_level:
model_armor_util.ValidateEnum(
args.pi_and_jailbreak_filter_settings_confidence_level,
messages.PiAndJailbreakFilterResult.ConfidenceLevelValueValuesEnum,
'pi-and-jailbreak-filter-settings-confidence-level',
'Invalid choice :'
f' {args.pi_and_jailbreak_filter_settings_confidence_level}',
)
if args.pi_and_jailbreak_filter_settings_enforcement:
model_armor_util.ValidateEnum(
args.pi_and_jailbreak_filter_settings_enforcement,
messages.PiAndJailbreakFilterSettings.FilterEnforcementValueValuesEnum,
'pi-and-jailbreak-filter-settings-enforcement',
'Invalid choice :'
f' {args.pi_and_jailbreak_filter_settings_enforcement}',
)
if args.malicious_uri_filter_settings_enforcement:
model_armor_util.ValidateEnum(
args.malicious_uri_filter_settings_enforcement,
messages.MaliciousUriFilterSettings.FilterEnforcementValueValuesEnum,
'malicious-uri-filter-settings-enforcement',
f'Invalid choice : {args.malicious_uri_filter_settings_enforcement}',
)
if args.basic_config_filter_enforcement:
model_armor_util.ValidateEnum(
args.basic_config_filter_enforcement,
messages.SdpBasicConfig.FilterEnforcementValueValuesEnum,
'basic-config-filter-enforcement',
f'Invalid choice : {args.basic_config_filter_enforcement}',
)
if args.rai_settings_filters:
self._validateRaiFilterSettings(
messages, args.rai_settings_filters, 'rai-settings-filters'
)
if args.add_rai_settings_filters:
self._validateRaiFilterSettings(
messages, args.add_rai_settings_filters, 'add-rai-settings-filters'
)
if args.remove_rai_settings_filters:
self._validateRaiFilterSettings(
messages,
args.remove_rai_settings_filters,
'remove-rai-settings-filters',
)
if args.IsSpecified('basic_config_filter_enforcement') and ((
args.IsSpecified('advanced_config_inspect_template')
or args.IsSpecified('advanced_config_deidentify_template')
)):
raise exceptions.ConflictingArgumentsException(
'basic_config_filter_enforcement', 'sdp_advanced_config_*_template'
)
if args.IsSpecified('add_integrated_services'):
self._validateIntegratedServices(messages, args.add_integrated_services)
if args.IsSpecified('remove_integrated_services'):
self._validateRemoveIntegratedServices(messages, args)
if args.IsSpecified('clear_integrated_services'):
self._validateClearIntegratedServices(messages, args)
if args.IsSpecified('vertex_ai_enforcement_type'):
self._validateEnforcementType(
args.vertex_ai_enforcement_type, 'vertex-ai'
)
if args.IsSpecified('google_mcp_server_enforcement_type'):
self._validateEnforcementType(
args.google_mcp_server_enforcement_type, 'google-mcp-server'
)
def _RunUpdate(self, original, args):
api_version = model_armor_api.GetApiFromTrack(self.ReleaseTrack())
api_client = model_armor_api.FloorSettings(api_version=api_version)
messages = api_client.GetMessages()
self._validateArgs(messages, args)
floor_setting_updated = original
if floor_setting_updated.filterConfig is None:
floor_setting_updated.filterConfig = messages.FilterConfig()
# Collect the list of update masks
update_mask = []
if args.IsSpecified(
'pi_and_jailbreak_filter_settings_enforcement'
) or args.IsSpecified('pi_and_jailbreak_filter_settings_confidence_level'):
update_mask.append('filter_config.pi_and_jailbreak_filter_settings')
if args.IsSpecified('malicious_uri_filter_settings_enforcement'):
update_mask.append('filter_config.malicious_uri_filter_settings')
if (
args.IsSpecified('basic_config_filter_enforcement')
or args.IsSpecified('advanced_config_inspect_template')
or args.IsSpecified('advanced_config_deidentify_template')
):
update_mask.append('filter_config.sdp_settings')
if (
args.IsSpecified('add_rai_settings_filters')
or args.IsSpecified('remove_rai_settings_filters')
or args.IsSpecified('clear_rai_settings_filters')
or args.IsSpecified('rai_settings_filters')
):
update_mask.append('filter_config.rai_settings')
if args.IsSpecified('enable_floor_setting_enforcement'):
update_mask.append('enable_floor_setting_enforcement')
if (
args.IsSpecified('add_integrated_services')
or args.IsSpecified('remove_integrated_services')
or args.IsSpecified('clear_integrated_services')
):
update_mask.append('integrated_services')
if args.IsSpecified('vertex_ai_enforcement_type'):
self._updateMaskForEnforcementType(
service_floor_setting_arg='ai_platform_floor_setting',
arg_enforcement_type=args.vertex_ai_enforcement_type,
update_mask=update_mask,
)
if args.IsSpecified('google_mcp_server_enforcement_type'):
self._updateMaskForEnforcementType(
service_floor_setting_arg='google_mcp_server_floor_setting',
arg_enforcement_type=args.google_mcp_server_enforcement_type,
update_mask=update_mask,
)
if args.IsSpecified('enable_vertex_ai_cloud_logging'):
update_mask.append('ai_platform_floor_setting.enable_cloud_logging')
if args.IsSpecified('enable_google_mcp_server_cloud_logging'):
update_mask.append('google_mcp_server_floor_setting.enable_cloud_logging')
if args.IsSpecified('enable_multi_language_detection'):
update_mask.append('floor_setting_metadata.multi_language_detection')
if not update_mask:
possible_args = [
'--pi-and-jailbreak-filter-settings-enforcement',
'--pi-and-jailbreak-filter-settings-confidence-level',
'--malicious-uri-filter-settings-enforcement',
'--basic-config-filter-enforcement',
'--advanced-config-inspect-template',
'--advanced-config-deidentify-template',
'--rai-settings-filters',
'--add-rai-settings-filters',
'--remove-rai-settings-filters',
'--clear-rai-settings-filters',
'--enable-floor-setting-enforcement',
'--add-integrated-services',
'--remove-integrated-services',
'--clear-integrated-services',
'--enable-vertex-ai-cloud-logging',
'--vertex-ai-enforcement-type',
'--enable-google-mcp-server-cloud-logging',
'--google-mcp-server-enforcement-type',
'--enable-multi-language-detection',
]
raise exceptions.MinimumArgumentException(
possible_args,
self.NO_CHANGES_MESSAGE.format(floor_setting=args.full_uri),
)
if 'filter_config.rai_settings' in update_mask:
self._UpdateRaiSettings(messages, args, floor_setting_updated)
if 'filter_config.pi_and_jailbreak_filter_settings' in update_mask:
self._UpdatePiAndJailbreakSettings(messages, args, floor_setting_updated)
if 'filter_config.malicious_uri_filter_settings' in update_mask:
self._UpdateMaliciousUriSettings(messages, args, floor_setting_updated)
if 'filter_config.sdp_settings' in update_mask:
self._UpdateSdpSettings(messages, args, floor_setting_updated)
defaulted_enforcement = {}
if (
args.IsSpecified('add_integrated_services')
or args.IsSpecified('remove_integrated_services')
or args.IsSpecified('clear_integrated_services')
):
defaulted_enforcement = self._UpdateIntegratedServices(
messages, args, floor_setting_updated, update_mask
)
# Handle Service Specific FloorSettings
# (e.g., Cloud Logging, Enforcement Type).
self._UpdateServiceSpecificSettings(messages, args, floor_setting_updated)
if args.IsSpecified('enable_multi_language_detection'):
self._UpdateMultiLanguageDetection(messages, args, floor_setting_updated)
if 'enable_floor_setting_enforcement' in update_mask:
if args.IsSpecified('enable_floor_setting_enforcement'):
floor_setting_updated.enableFloorSettingEnforcement = (
args.enable_floor_setting_enforcement.lower() == 'true'
)
return (
api_client.Update(
name=args.full_uri,
floor_setting=floor_setting_updated,
update_mask=update_mask,
),
defaulted_enforcement,
)
def _UpdateRaiSettings(self, messages, args, floor_setting_updated):
"""Updates the RaiFilterSettings in the FloorSetting."""
rai_filters = []
if floor_setting_updated.filterConfig.raiSettings is not None:
rai_filters = floor_setting_updated.filterConfig.raiSettings.raiFilters
if args.IsSpecified('rai_settings_filters'):
rai_filters = []
for item in [json.loads(f) for f in args.rai_settings_filters]:
arg_filter_type = messages.RaiFilter.FilterTypeValueValuesEnum(
self._GetEnumValue(item['filterType'])
)
arg_confidence_level = (
messages.RaiFilter.ConfidenceLevelValueValuesEnum(
self._GetEnumValue(item['confidenceLevel'])
)
)
rai_filters.append(
messages.RaiFilter(
filterType=arg_filter_type,
confidenceLevel=arg_confidence_level,
)
)
floor_setting_updated.filterConfig.raiSettings = (
messages.RaiFilterSettings(raiFilters=rai_filters)
)
if args.IsSpecified('add_rai_settings_filters'):
for item in [json.loads(f) for f in args.add_rai_settings_filters]:
already_exists = False
arg_filter_type = messages.RaiFilter.FilterTypeValueValuesEnum(
self._GetEnumValue(item['filterType'])
)
arg_confidence_level = (
messages.RaiFilter.ConfidenceLevelValueValuesEnum(
self._GetEnumValue(item['confidenceLevel'])
)
)
for _, rai_filter in enumerate(rai_filters):
if arg_filter_type == rai_filter.filterType:
already_exists = True
rai_filters.remove(rai_filter)
rai_filters.append(
messages.RaiFilter(
filterType=arg_filter_type,
confidenceLevel=arg_confidence_level,
)
)
break
if not already_exists:
rai_filters.append(
messages.RaiFilter(
filterType=arg_filter_type,
confidenceLevel=arg_confidence_level,
)
)
floor_setting_updated.filterConfig.raiSettings = (
messages.RaiFilterSettings(raiFilters=rai_filters)
)
if args.IsSpecified('remove_rai_settings_filters'):
for item in [json.loads(f) for f in args.remove_rai_settings_filters]:
arg_filter_type = messages.RaiFilter.FilterTypeValueValuesEnum(
self._GetEnumValue(item['filterType'])
)
arg_confidence_level = (
messages.RaiFilter.ConfidenceLevelValueValuesEnum(
self._GetEnumValue(item['confidenceLevel'])
)
)
for _, rai_filter in enumerate(rai_filters):
if (
messages.RaiFilter.FilterTypeValueValuesEnum(arg_filter_type)
== rai_filter.filterType
and messages.RaiFilter.ConfidenceLevelValueValuesEnum(
arg_confidence_level
)
== rai_filter.confidenceLevel
):
rai_filters.remove(rai_filter)
break
if args.IsSpecified('clear_rai_settings_filters'):
floor_setting_updated.filterConfig.raiSettings = None
def _UpdatePiAndJailbreakSettings(
self, messages, args, floor_setting_updated
):
"""Updates the PiAndJailbreakFilterSettings in the FloorSetting."""
if args.IsSpecified('pi_and_jailbreak_filter_settings_enforcement'):
pi_and_jailbreak_filter_settings_enforcement = self._GetEnumValue(
args.pi_and_jailbreak_filter_settings_enforcement
)
if (
floor_setting_updated.filterConfig.piAndJailbreakFilterSettings
is None
):
floor_setting_updated.filterConfig.piAndJailbreakFilterSettings = messages.PiAndJailbreakFilterSettings(
filterEnforcement=messages.PiAndJailbreakFilterSettings.FilterEnforcementValueValuesEnum(
pi_and_jailbreak_filter_settings_enforcement
)
)
else:
floor_setting_updated.filterConfig.piAndJailbreakFilterSettings.filterEnforcement = messages.PiAndJailbreakFilterSettings.FilterEnforcementValueValuesEnum(
pi_and_jailbreak_filter_settings_enforcement
)
if args.IsSpecified('pi_and_jailbreak_filter_settings_confidence_level'):
pi_and_jailbreak_filter_settings_confidence_level = self._GetEnumValue(
args.pi_and_jailbreak_filter_settings_confidence_level
)
if (
floor_setting_updated.filterConfig.piAndJailbreakFilterSettings
is None
):
floor_setting_updated.filterConfig.piAndJailbreakFilterSettings = messages.PiAndJailbreakFilterSettings(
confidenceLevel=messages.PiAndJailbreakFilterSettings.ConfidenceLevelValueValuesEnum(
pi_and_jailbreak_filter_settings_confidence_level
)
)
def _UpdateMultiLanguageDetection(
self, messages, args, floor_setting_updated
):
"""Updates the MultiLanguageDetection in the FloorSetting."""
if floor_setting_updated.floorSettingMetadata is None:
floor_setting_updated.floorSettingMetadata = (
messages.FloorSettingMetadata()
)
if (
floor_setting_updated.floorSettingMetadata.multiLanguageDetection
is None
):
floor_setting_updated.floorSettingMetadata.multiLanguageDetection = (
messages.FloorSettingFloorSettingMetadataMultiLanguageDetection(
enableMultiLanguageDetection=args.enable_multi_language_detection
)
)
else:
(
floor_setting_updated.floorSettingMetadata.multiLanguageDetection.enableMultiLanguageDetection
) = args.enable_multi_language_detection
def _UpdateServiceSpecificSettings(
self, messages, args, floor_setting_updated
):
"""Handles Cloud Logging and Enforcement Type for Integrated Services."""
services_config = _GetServicesConfig(messages)
for service_config in services_config:
service_attr = service_config.service_floor_setting_attr
service_setting = getattr(floor_setting_updated, service_attr)
is_cloud_logging_specified = args.IsSpecified(
service_config.cloud_logging_arg
)
is_enforcement_type_specified = args.IsSpecified(
service_config.enforcement_type_arg
)
if is_cloud_logging_specified or is_enforcement_type_specified:
if service_setting is None:
service_setting = service_config.setting_message()
setattr(floor_setting_updated, service_attr, service_setting)
if is_cloud_logging_specified:
service_setting = getattr(floor_setting_updated, service_attr)
service_setting.enableCloudLogging = getattr(
args, service_config.cloud_logging_arg
)
if is_enforcement_type_specified:
arg_enforcement_type = self._GetEnumValue(
getattr(args, service_config.enforcement_type_arg)
)
self._handleEnforcementType(arg_enforcement_type, service_setting)
def _UpdateIntegratedServices(
self, messages, args, floor_setting_updated, update_mask
):
"""Updates the IntegratedServices in the FloorSetting."""
defaulted_enforcement = {}
services_config = _GetServicesConfig(messages)
if args.IsSpecified('clear_integrated_services'):
for service_config in services_config:
service_attr = service_config.service_floor_setting_attr
if (
getattr(floor_setting_updated, service_attr) is not None
and service_config.enum in floor_setting_updated.integratedServices
):
setattr(floor_setting_updated, service_attr, None)
update_mask.append(service_config.service_floor_setting_arg)
floor_setting_updated.integratedServices = []
if args.IsSpecified('add_integrated_services') or args.IsSpecified(
'remove_integrated_services'
):
integrated_services = []
if floor_setting_updated.integratedServices is not None:
integrated_services = list(floor_setting_updated.integratedServices)
services_config_by_name = {
service_config.name: service_config
for service_config in services_config
}
if args.IsSpecified('add_integrated_services'):
for service in args.add_integrated_services:
arg_service = self._GetEnumValue(service)
if arg_service in services_config_by_name:
found_config = services_config_by_name[arg_service]
if found_config.enum in integrated_services:
continue
# if no enforcement type is specified, set it to INSPECT_ONLY.
if not args.IsSpecified(found_config.enforcement_type_arg):
setting_attr = found_config.service_floor_setting_attr
service_setting = getattr(
floor_setting_updated,
setting_attr,
)
if service_setting is None:
service_setting = found_config.setting_message()
setattr(
floor_setting_updated,
setting_attr,
service_setting,
)
self._handleEnforcementType('INSPECT_ONLY', service_setting)
self._updateMaskForEnforcementType(
service_floor_setting_arg=found_config.service_floor_setting_arg,
arg_enforcement_type='INSPECT_ONLY',
update_mask=update_mask,
)
setattr(
floor_setting_updated,
setting_attr,
service_setting,
)
defaulted_enforcement[found_config.enforcement_type_flag_name] = (
True
)
if found_config.enum not in integrated_services:
integrated_services.append(found_config.enum)
if args.IsSpecified('remove_integrated_services'):
for service in args.remove_integrated_services:
arg_service = self._GetEnumValue(service)
if arg_service in services_config_by_name:
found_config = services_config_by_name[arg_service]
if found_config.enum in integrated_services:
integrated_services.remove(found_config.enum)
setattr(
floor_setting_updated,
found_config.service_floor_setting_attr,
None,
)
update_mask.append(found_config.service_floor_setting_arg)
floor_setting_updated.integratedServices = integrated_services
return defaulted_enforcement
def _UpdateMaliciousUriSettings(self, messages, args, floor_setting_updated):
"""Updates the MaliciousUriFilterSettings in the FloorSetting."""
if args.IsSpecified('malicious_uri_filter_settings_enforcement'):
if floor_setting_updated.filterConfig.maliciousUriFilterSettings is None:
floor_setting_updated.filterConfig.maliciousUriFilterSettings = messages.MaliciousUriFilterSettings(
filterEnforcement=messages.MaliciousUriFilterSettings.FilterEnforcementValueValuesEnum(
self._GetEnumValue(
args.malicious_uri_filter_settings_enforcement
)
)
)
else:
floor_setting_updated.filterConfig.maliciousUriFilterSettings.filterEnforcement = messages.MaliciousUriFilterSettings.FilterEnforcementValueValuesEnum(
self._GetEnumValue(args.malicious_uri_filter_settings_enforcement)
)
def _UpdateSdpSettings(self, messages, args, floor_setting_updated):
"""Updates the SdpFilterSettings in the FloorSetting."""
if args.IsSpecified('basic_config_filter_enforcement'):
if floor_setting_updated.filterConfig.sdpSettings is None:
floor_setting_updated.filterConfig.sdpSettings = messages.SdpFilterSettings(
basicConfig=messages.SdpBasicConfig(
filterEnforcement=(
messages.SdpBasicConfig.FilterEnforcementValueValuesEnum(
self._GetEnumValue(args.basic_config_filter_enforcement)
)
)
)
)
else:
floor_setting_updated.filterConfig.sdpSettings.advancedConfig = None
floor_setting_updated.filterConfig.sdpSettings.basicConfig = messages.SdpBasicConfig(
filterEnforcement=messages.SdpBasicConfig.FilterEnforcementValueValuesEnum(
self._GetEnumValue(args.basic_config_filter_enforcement)
)
)
if args.IsSpecified('advanced_config_inspect_template'):
if floor_setting_updated.filterConfig.sdpSettings is None:
floor_setting_updated.filterConfig.sdpSettings = (
messages.SdpFilterSettings(
advancedConfig=messages.SdpAdvancedConfig(
inspectTemplate=args.advanced_config_inspect_template
)
)
)
else:
floor_setting_updated.filterConfig.sdpSettings.basicConfig = None
if (
floor_setting_updated.filterConfig.sdpSettings.advancedConfig
is None
):
floor_setting_updated.filterConfig.sdpSettings.advancedConfig = (
messages.SdpAdvancedConfig(
inspectTemplate=args.advanced_config_inspect_template
)
)
else:
floor_setting_updated.filterConfig.sdpSettings.advancedConfig.inspectTemplate = (
args.advanced_config_inspect_template
)
if args.IsSpecified('advanced_config_deidentify_template'):
if floor_setting_updated.filterConfig.sdpSettings is None:
floor_setting_updated.filterConfig.sdpSettings = (
messages.SdpFilterSettings(
advancedConfig=messages.SdpAdvancedConfig(
deidentifyTemplate=args.advanced_config_deidentify_template
)
)
)
else:
floor_setting_updated.filterConfig.sdpSettings.basicConfig = None
if (
floor_setting_updated.filterConfig.sdpSettings.advancedConfig
is None
):
floor_setting_updated.filterConfig.sdpSettings.advancedConfig = (
messages.SdpAdvancedConfig(
deidentifyTemplate=args.advanced_config_deidentify_template
)
)
else:
floor_setting_updated.filterConfig.sdpSettings.advancedConfig.deidentifyTemplate = (
args.advanced_config_deidentify_template
)
def Run(self, args):
api_version = model_armor_api.GetApiFromTrack(self.ReleaseTrack())
full_uri = args.full_uri
original = model_armor_api.FloorSettings(api_version=api_version).Get(
full_uri
)
(res, defaulted_enforcement) = self._RunUpdate(original, args)
defaulted_enforcement_services_flags = []
if defaulted_enforcement:
for service in defaulted_enforcement.items():
defaulted_enforcement_services_flags.append(
f'{service[0]}=INSPECT_AND_BLOCK'
)
defaulted_services_str = ' and '.join(
[f'"{service}"' for service in defaulted_enforcement_services_flags]
)
message = (
'Enforcement type defaulted to INSPECT_ONLY. This means that traffic'
' violating Model Armor settings will be inspected but not blocked.'
f' To block such traffic, please specify {defaulted_services_str}.'
)
log.status.Print(message)
return res

View File

@@ -0,0 +1,39 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
"""Manage Template resources."""
from googlecloudsdk.calliope import base
from surface.model_armor.templates import _init_extensions as extensions
@base.ReleaseTracks(base.ReleaseTrack.ALPHA)
@base.Autogenerated
class TemplatesAlpha(extensions.TemplatesAlpha):
"""Manage Template resources."""
@base.ReleaseTracks(base.ReleaseTrack.BETA)
@base.Autogenerated
class TemplatesBeta(extensions.TemplatesBeta):
"""Manage Template resources."""
@base.ReleaseTracks(base.ReleaseTrack.GA)
@base.Autogenerated
class TemplatesGa(extensions.TemplatesGa):
"""Manage Template resources."""

View File

@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*- #
# Copyright 2024 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
"""File to add optional custom code to extend __init__.py."""
from googlecloudsdk.calliope import base
class TemplatesAlpha(base.Group):
"""Optional no-auto-generated code for ALPHA."""
class TemplatesBeta(base.Group):
"""Optional no-auto-generated code for BETA."""
class TemplatesGa(base.Group):
"""Optional no-auto-generated code for GA."""

View File

@@ -0,0 +1,289 @@
# -*- coding: utf-8 -*- #
# Copyright 2024 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- ALPHA
auto_generated: true
help_text:
brief: Create Model Armor Template.
description: Creates a new Template in a given project and location.
examples: |-
To create a Template, run:
$ {command} my-template --location=us-central1 --malicious-uri-filter-settings-enforcement=enabled
arguments:
params:
- help_text: |-
Identifier. name of resource
is_positional: true
is_primary_resource: true
request_id_field: templateId
resource_spec: !REF googlecloudsdk.command_lib.model_armor.v1alpha_resources:project_location_template
required: true
- arg_name: labels
api_field: template.labels
required: false
repeated: true
help_text: |-
Labels as key value pairs
spec:
- api_field: key
- api_field: value
- group:
api_field: template.filterConfig
required: true
help_text: |-
Filters configuration.
params:
- group:
api_field: template.filterConfig.raiSettings
required: false
help_text: |-
Responsible AI Filter settings.
params:
- arg_name: rai-settings-filters
api_field: template.filterConfig.raiSettings.raiFilters
required: true
repeated: true
help_text: |-
List of Responsible AI filters enabled for template.
spec:
- api_field: filterType
help_text: |-
Type of responsible AI filter.
- api_field: confidenceLevel
help_text: |-
Confidence level for this RAI filter.
During data sanitization, if data is classified under this filter with a
confidence level equal to or greater than the specified level, a positive
match is reported. If the confidence level is unspecified (i.e., 0), the
system will use a reasonable default level based on the `filter_type`.
- group:
api_field: template.filterConfig.sdpSettings
required: false
help_text: |-
Sensitive Data Protection settings.
params:
- group:
mutex: true
help_text: |-
Arguments for the sdp configuration.
params:
- group:
api_field: template.filterConfig.sdpSettings.basicConfig
required: false
help_text: |-
Sensitive Data Protection basic configuration.
params:
- arg_name: basic-config-filter-enforcement
api_field: template.filterConfig.sdpSettings.basicConfig.filterEnforcement
required: false
help_text: |-
Tells whether the Sensitive Data Protection basic config is enabled or
disabled.
choices:
- arg_value: enabled
enum_value: ENABLED
help_text: |-
Enabled
- arg_value: disabled
enum_value: DISABLED
help_text: |-
Disabled
- group:
api_field: template.filterConfig.sdpSettings.advancedConfig
required: false
help_text: |-
Sensitive Data Protection Advanced configuration.
params:
- arg_name: advanced-config-inspect-template
api_field: template.filterConfig.sdpSettings.advancedConfig.inspectTemplate
required: false
repeated: false
help_text: |-
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.
`organizations/{organization}/inspectTemplates/{inspect_template}`,
`projects/{project}/inspectTemplates/{inspect_template}`
`organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}`
`projects/{project}/locations/{location}/inspectTemplates/{inspect_template}`
- arg_name: advanced-config-deidentify-template
api_field: template.filterConfig.sdpSettings.advancedConfig.deidentifyTemplate
required: false
repeated: false
help_text: |-
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.
`organizations/{organization}/deidentifyTemplates/{deidentify_template}`,
`projects/{project}/deidentifyTemplates/{deidentify_template}`
`organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}`
`projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}`
- group:
api_field: template.filterConfig.piAndJailbreakFilterSettings
required: false
help_text: |-
Prompt injection and Jailbreak Filter settings.
params:
- arg_name: pi-and-jailbreak-filter-settings-enforcement
api_field: template.filterConfig.piAndJailbreakFilterSettings.filterEnforcement
required: false
help_text: |-
Tells whether Prompt injection and Jailbreak filter is enabled or
disabled.
choices:
- arg_value: enabled
enum_value: ENABLED
help_text: |-
Enabled
- arg_value: disabled
enum_value: DISABLED
help_text: |-
Enabled
- arg_name: pi-and-jailbreak-filter-settings-confidence-level
api_field: template.filterConfig.piAndJailbreakFilterSettings.confidenceLevel
required: false
help_text: |-
Confidence level for this filter.
Confidence level is used to determine the threshold for the filter. If
detection confidence is equal to or greater than the specified level, a
positive match is reported. Confidence level will only be used if the
filter is enabled.
choices:
- arg_value: low-and-above
enum_value: LOW_AND_ABOVE
help_text: |-
Highest chance of a false positive.
- arg_value: medium-and-above
enum_value: MEDIUM_AND_ABOVE
help_text: |-
Some chance of false positives.
- arg_value: high
enum_value: HIGH
help_text: |-
Low chance of false positives.
- group:
api_field: template.filterConfig.maliciousUriFilterSettings
required: false
help_text: |-
Malicious URI filter settings.
params:
- arg_name: malicious-uri-filter-settings-enforcement
api_field: template.filterConfig.maliciousUriFilterSettings.filterEnforcement
required: false
help_text: |-
Tells whether the Malicious URI filter is enabled or disabled.
choices:
- arg_value: enabled
enum_value: ENABLED
help_text: |-
Enabled
- arg_value: disabled
enum_value: DISABLED
help_text: |-
Disabled
- group:
api_field: template.templateMetadata
required: false
help_text: |-
Message describing TemplateMetadata
params:
- arg_name: template-metadata-ignore-partial-invocation-failures
api_field: template.templateMetadata.ignorePartialInvocationFailures
action: store_true
required: false
type: bool
help_text: |-
If true, partial detector failures should be ignored.
default: null
- arg_name: template-metadata-custom-prompt-safety-error-code
api_field: template.templateMetadata.customPromptSafetyErrorCode
required: false
repeated: false
type: int
help_text: |-
Indicates the custom error code set by the user to be returned to the end
user by the service extension if the prompt trips Model Armor filters.
- arg_name: template-metadata-custom-prompt-safety-error-message
api_field: template.templateMetadata.customPromptSafetyErrorMessage
required: false
repeated: false
help_text: |-
Indicates the custom error message set by the user to be returned to the
end user if the prompt trips Model Armor filters.
- arg_name: template-metadata-custom-llm-response-safety-error-code
api_field: template.templateMetadata.customLlmResponseSafetyErrorCode
required: false
repeated: false
type: int
help_text: |-
Indicates the custom error code set by the user to be returned to the end
user if the LLM response trips Model Armor filters.
- arg_name: template-metadata-custom-llm-response-safety-error-message
api_field: template.templateMetadata.customLlmResponseSafetyErrorMessage
required: false
repeated: false
help_text: |-
Indicates the custom error message set by the user to be returned to the
end user if the LLM response trips Model Armor filters.
- arg_name: template-metadata-log-operations
api_field: template.templateMetadata.logTemplateOperations
action: store_true
required: false
type: bool
help_text: |-
If true, log template crud operations.
default: null
- arg_name: template-metadata-log-sanitize-operations
api_field: template.templateMetadata.logSanitizeOperations
action: store_true
required: false
type: bool
help_text: |-
If true, log sanitize operations.
default: null
- arg_name: request-id
api_field: requestId
required: false
repeated: false
help_text: |-
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).
request:
api_version: v1alpha
collection:
- modelarmor.projects.locations.templates

View File

@@ -0,0 +1,315 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- BETA
auto_generated: true
help_text:
brief: Create Model Armor Template.
description: Creates a new Template in a given project and location.
examples: |-
To create a Template, run:
$ {command} my-template --location=us-central1 --malicious-uri-filter-settings-enforcement=enabled
arguments:
params:
- help_text: |-
Identifier. name of resource
is_positional: true
is_primary_resource: true
request_id_field: templateId
resource_spec: !REF googlecloudsdk.command_lib.model_armor.v1beta_resources:projects_locations_templates
required: true
- arg_name: labels
api_field: template.labels
required: false
repeated: true
help_text: |-
Labels as key value pairs
spec:
- api_field: key
- api_field: value
- group:
api_field: template.filterConfig
required: true
help_text: |-
Filters configuration.
params:
- group:
api_field: template.filterConfig.raiSettings
required: false
help_text: |-
Responsible AI Filter settings.
params:
- arg_name: rai-settings-filters
api_field: template.filterConfig.raiSettings.raiFilters
required: true
repeated: true
help_text: |-
List of Responsible AI filters enabled for template.
spec:
- api_field: filterType
help_text: |-
Type of responsible AI filter.
- api_field: confidenceLevel
help_text: |-
Confidence level for this RAI filter.
During data sanitization, if data is classified under this filter with a
confidence level equal to or greater than the specified level, a positive
match is reported. If the confidence level is unspecified (i.e., 0), the
system will use a reasonable default level based on the `filter_type`.
- group:
api_field: template.filterConfig.sdpSettings
required: false
help_text: |-
Sensitive Data Protection settings.
params:
- group:
mutex: true
help_text: |-
Arguments for the sdp configuration.
params:
- group:
api_field: template.filterConfig.sdpSettings.basicConfig
required: false
help_text: |-
Sensitive Data Protection basic configuration.
params:
- arg_name: basic-config-filter-enforcement
api_field: template.filterConfig.sdpSettings.basicConfig.filterEnforcement
required: false
help_text: |-
Tells whether the Sensitive Data Protection basic config is enabled or
disabled.
choices:
- arg_value: enabled
enum_value: ENABLED
help_text: |-
Enabled
- arg_value: disabled
enum_value: DISABLED
help_text: |-
Disabled
- group:
api_field: template.filterConfig.sdpSettings.advancedConfig
required: false
help_text: |-
Sensitive Data Protection Advanced configuration.
params:
- arg_name: advanced-config-inspect-template
api_field: template.filterConfig.sdpSettings.advancedConfig.inspectTemplate
required: false
repeated: false
help_text: |-
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}`
- arg_name: advanced-config-deidentify-template
api_field: template.filterConfig.sdpSettings.advancedConfig.deidentifyTemplate
required: false
repeated: false
help_text: |-
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}`
- group:
api_field: template.filterConfig.piAndJailbreakFilterSettings
required: false
help_text: |-
Prompt injection and Jailbreak Filter settings.
params:
- arg_name: pi-and-jailbreak-filter-settings-enforcement
api_field: template.filterConfig.piAndJailbreakFilterSettings.filterEnforcement
required: false
help_text: |-
Tells whether Prompt injection and Jailbreak filter is enabled or
disabled.
choices:
- arg_value: enabled
enum_value: ENABLED
help_text: |-
Enabled
- arg_value: disabled
enum_value: DISABLED
help_text: |-
Enabled
- arg_name: pi-and-jailbreak-filter-settings-confidence-level
api_field: template.filterConfig.piAndJailbreakFilterSettings.confidenceLevel
required: false
help_text: |-
Confidence level for this filter.
Confidence level is used to determine the threshold for the filter. If
detection confidence is equal to or greater than the specified level, a
positive match is reported. Confidence level will only be used if the
filter is enabled.
choices:
- arg_value: low-and-above
enum_value: LOW_AND_ABOVE
help_text: |-
Highest chance of a false positive.
- arg_value: medium-and-above
enum_value: MEDIUM_AND_ABOVE
help_text: |-
Some chance of false positives.
- arg_value: high
enum_value: HIGH
help_text: |-
Low chance of false positives.
- group:
api_field: template.filterConfig.maliciousUriFilterSettings
required: false
help_text: |-
Malicious URI filter settings.
params:
- arg_name: malicious-uri-filter-settings-enforcement
api_field: template.filterConfig.maliciousUriFilterSettings.filterEnforcement
required: false
help_text: |-
Tells whether the Malicious URI filter is enabled or disabled.
choices:
- arg_value: enabled
enum_value: ENABLED
help_text: |-
Enabled
- arg_value: disabled
enum_value: DISABLED
help_text: |-
Disabled
- group:
api_field: template.templateMetadata
required: false
help_text: |-
Message describing TemplateMetadata
params:
- arg_name: template-metadata-ignore-partial-invocation-failures
api_field: template.templateMetadata.ignorePartialInvocationFailures
action: store_true
required: false
type: bool
help_text: |-
If true, partial detector failures should be ignored.
default: null
- arg_name: template-metadata-custom-prompt-safety-error-code
api_field: template.templateMetadata.customPromptSafetyErrorCode
required: false
repeated: false
type: int
help_text: |-
Indicates the custom error code set by the user to be returned to the end
user by the service extension if the prompt trips Model Armor filters.
- arg_name: template-metadata-custom-prompt-safety-error-message
api_field: template.templateMetadata.customPromptSafetyErrorMessage
required: false
repeated: false
help_text: |-
Indicates the custom error message set by the user to be returned to the
end user if the prompt trips Model Armor filters.
- arg_name: template-metadata-custom-llm-response-safety-error-code
api_field: template.templateMetadata.customLlmResponseSafetyErrorCode
required: false
repeated: false
type: int
help_text: |-
Indicates the custom error code set by the user to be returned to the end
user if the LLM response trips Model Armor filters.
- arg_name: template-metadata-custom-llm-response-safety-error-message
api_field: template.templateMetadata.customLlmResponseSafetyErrorMessage
required: false
repeated: false
help_text: |-
Indicates the custom error message set by the user to be returned to the
end user if the LLM response trips Model Armor filters.
- arg_name: template-metadata-log-operations
api_field: template.templateMetadata.logTemplateOperations
action: store_true
required: false
type: bool
help_text: |-
If true, log template crud operations.
default: null
- arg_name: template-metadata-log-sanitize-operations
api_field: template.templateMetadata.logSanitizeOperations
action: store_true
required: false
type: bool
help_text: |-
If true, log sanitize operations.
default: null
- arg_name: template-metadata-enforcement-type
api_field: template.templateMetadata.enforcementType
required: false
help_text: |-
Enforcement type for Model Armor filters.
choices:
- arg_value: inspect-only
enum_value: INSPECT_ONLY
help_text: |-
Model Armor filters will run in inspect only mode. No action will be
taken on the request.
- arg_value: inspect-and-block
enum_value: INSPECT_AND_BLOCK
help_text: |-
Model Armor filters will run in inspect and block mode. Requests
that trip Model Armor filters will be blocked.
- group:
api_field: template.templateMetadata.multiLanguageDetection
required: false
help_text: |-
Metadata to enable multi language detection via template.
params:
- arg_name: multi-language-detection-enable
api_field: template.templateMetadata.multiLanguageDetection.enableMultiLanguageDetection
action: store_true_false
required: true
type: bool
help_text: |-
If true, multi language detection will be enabled.
- arg_name: request-id
api_field: requestId
required: false
repeated: false
help_text: |-
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).
request:
api_version: v1beta
collection:
- modelarmor.projects.locations.templates

View File

@@ -0,0 +1,289 @@
# -*- coding: utf-8 -*- #
# Copyright 2024 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- GA
auto_generated: true
help_text:
brief: Create Model Armor Template.
description: Creates a new Template in a given project and location.
examples: |-
To create a Template, run:
$ {command} my-template --location=us-central1 --malicious-uri-filter-settings-enforcement=enabled
arguments:
params:
- help_text: |-
Identifier. name of resource
is_positional: true
is_primary_resource: true
request_id_field: templateId
resource_spec: !REF googlecloudsdk.command_lib.model_armor.v1_resources:project_location_template
required: true
- arg_name: labels
api_field: template.labels
required: false
repeated: true
help_text: |-
Labels as key value pairs
spec:
- api_field: key
- api_field: value
- group:
api_field: template.filterConfig
required: true
help_text: |-
Filters configuration.
params:
- group:
api_field: template.filterConfig.raiSettings
required: false
help_text: |-
Responsible AI Filter settings.
params:
- arg_name: rai-settings-filters
api_field: template.filterConfig.raiSettings.raiFilters
required: true
repeated: true
help_text: |-
List of Responsible AI filters enabled for template.
spec:
- api_field: filterType
help_text: |-
Type of responsible AI filter.
- api_field: confidenceLevel
help_text: |-
Confidence level for this RAI filter.
During data sanitization, if data is classified under this filter with a
confidence level equal to or greater than the specified level, a positive
match is reported. If the confidence level is unspecified (i.e., 0), the
system will use a reasonable default level based on the `filter_type`.
- group:
api_field: template.filterConfig.sdpSettings
required: false
help_text: |-
Sensitive Data Protection settings.
params:
- group:
mutex: true
help_text: |-
Arguments for the sdp configuration.
params:
- group:
api_field: template.filterConfig.sdpSettings.basicConfig
required: false
help_text: |-
Sensitive Data Protection basic configuration.
params:
- arg_name: basic-config-filter-enforcement
api_field: template.filterConfig.sdpSettings.basicConfig.filterEnforcement
required: false
help_text: |-
Tells whether the Sensitive Data Protection basic config is enabled or
disabled.
choices:
- arg_value: enabled
enum_value: ENABLED
help_text: |-
Enabled
- arg_value: disabled
enum_value: DISABLED
help_text: |-
Disabled
- group:
api_field: template.filterConfig.sdpSettings.advancedConfig
required: false
help_text: |-
Sensitive Data Protection Advanced configuration.
params:
- arg_name: advanced-config-inspect-template
api_field: template.filterConfig.sdpSettings.advancedConfig.inspectTemplate
required: false
repeated: false
help_text: |-
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.
`organizations/{organization}/inspectTemplates/{inspect_template}`,
`projects/{project}/inspectTemplates/{inspect_template}`
`organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}`
`projects/{project}/locations/{location}/inspectTemplates/{inspect_template}`
- arg_name: advanced-config-deidentify-template
api_field: template.filterConfig.sdpSettings.advancedConfig.deidentifyTemplate
required: false
repeated: false
help_text: |-
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.
`organizations/{organization}/deidentifyTemplates/{deidentify_template}`,
`projects/{project}/deidentifyTemplates/{deidentify_template}`
`organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}`
`projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}`
- group:
api_field: template.filterConfig.piAndJailbreakFilterSettings
required: false
help_text: |-
Prompt injection and Jailbreak Filter settings.
params:
- arg_name: pi-and-jailbreak-filter-settings-enforcement
api_field: template.filterConfig.piAndJailbreakFilterSettings.filterEnforcement
required: false
help_text: |-
Tells whether Prompt injection and Jailbreak filter is enabled or
disabled.
choices:
- arg_value: enabled
enum_value: ENABLED
help_text: |-
Enabled
- arg_value: disabled
enum_value: DISABLED
help_text: |-
Enabled
- arg_name: pi-and-jailbreak-filter-settings-confidence-level
api_field: template.filterConfig.piAndJailbreakFilterSettings.confidenceLevel
required: false
help_text: |-
Confidence level for this filter.
Confidence level is used to determine the threshold for the filter. If
detection confidence is equal to or greater than the specified level, a
positive match is reported. Confidence level will only be used if the
filter is enabled.
choices:
- arg_value: low-and-above
enum_value: LOW_AND_ABOVE
help_text: |-
Highest chance of a false positive.
- arg_value: medium-and-above
enum_value: MEDIUM_AND_ABOVE
help_text: |-
Some chance of false positives.
- arg_value: high
enum_value: HIGH
help_text: |-
Low chance of false positives.
- group:
api_field: template.filterConfig.maliciousUriFilterSettings
required: false
help_text: |-
Malicious URI filter settings.
params:
- arg_name: malicious-uri-filter-settings-enforcement
api_field: template.filterConfig.maliciousUriFilterSettings.filterEnforcement
required: false
help_text: |-
Tells whether the Malicious URI filter is enabled or disabled.
choices:
- arg_value: enabled
enum_value: ENABLED
help_text: |-
Enabled
- arg_value: disabled
enum_value: DISABLED
help_text: |-
Disabled
- group:
api_field: template.templateMetadata
required: false
help_text: |-
Message describing TemplateMetadata
params:
- arg_name: template-metadata-ignore-partial-invocation-failures
api_field: template.templateMetadata.ignorePartialInvocationFailures
action: store_true
required: false
type: bool
help_text: |-
If true, partial detector failures should be ignored.
default: null
- arg_name: template-metadata-custom-prompt-safety-error-code
api_field: template.templateMetadata.customPromptSafetyErrorCode
required: false
repeated: false
type: int
help_text: |-
Indicates the custom error code set by the user to be returned to the end
user by the service extension if the prompt trips Model Armor filters.
- arg_name: template-metadata-custom-prompt-safety-error-message
api_field: template.templateMetadata.customPromptSafetyErrorMessage
required: false
repeated: false
help_text: |-
Indicates the custom error message set by the user to be returned to the
end user if the prompt trips Model Armor filters.
- arg_name: template-metadata-custom-llm-response-safety-error-code
api_field: template.templateMetadata.customLlmResponseSafetyErrorCode
required: false
repeated: false
type: int
help_text: |-
Indicates the custom error code set by the user to be returned to the end
user if the LLM response trips Model Armor filters.
- arg_name: template-metadata-custom-llm-response-safety-error-message
api_field: template.templateMetadata.customLlmResponseSafetyErrorMessage
required: false
repeated: false
help_text: |-
Indicates the custom error message set by the user to be returned to the
end user if the LLM response trips Model Armor filters.
- arg_name: template-metadata-log-operations
api_field: template.templateMetadata.logTemplateOperations
action: store_true
required: false
type: bool
help_text: |-
If true, log template crud operations.
default: null
- arg_name: template-metadata-log-sanitize-operations
api_field: template.templateMetadata.logSanitizeOperations
action: store_true
required: false
type: bool
help_text: |-
If true, log sanitize operations.
default: null
- arg_name: request-id
api_field: requestId
required: false
repeated: false
help_text: |-
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).
request:
api_version: v1
collection:
- modelarmor.projects.locations.templates

View File

@@ -0,0 +1,56 @@
# -*- coding: utf-8 -*- #
# Copyright 2024 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- ALPHA
auto_generated: true
help_text:
brief: Delete Model Armor Template.
description: Deletes a Template.
examples: |-
To delete a Template, run:
$ {command} my-template --location=us-central1
arguments:
params:
- help_text: |-
Name of the resource
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.model_armor.v1alpha_resources:project_location_template
required: true
- arg_name: request-id
api_field: requestId
required: false
repeated: false
help_text: |-
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).
request:
api_version: v1alpha
collection:
- modelarmor.projects.locations.templates

View File

@@ -0,0 +1,57 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- BETA
auto_generated: true
help_text:
brief: Delete Model Armor Template.
description: Deletes a Template.
examples: |-
To delete a Template, run:
$ {command} my-template --location=us-central1
arguments:
params:
- help_text: |-
Name of the resource
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.model_armor.v1beta_resources:projects_locations_templates
required: true
- arg_name: request-id
api_field: requestId
required: false
repeated: false
help_text: |-
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).
request:
api_version: v1beta
collection:
- modelarmor.projects.locations.templates

View File

@@ -0,0 +1,56 @@
# -*- coding: utf-8 -*- #
# Copyright 2024 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- GA
auto_generated: true
help_text:
brief: Delete Model Armor Template.
description: Deletes a Template.
examples: |-
To delete a Template, run:
$ {command} my-template --location=us-central1
arguments:
params:
- help_text: |-
Name of the resource
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.model_armor.v1_resources:project_location_template
required: true
- arg_name: request-id
api_field: requestId
required: false
repeated: false
help_text: |-
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).
request:
api_version: v1
collection:
- modelarmor.projects.locations.templates

View File

@@ -0,0 +1,38 @@
# -*- coding: utf-8 -*- #
# Copyright 2024 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- ALPHA
auto_generated: true
help_text:
brief: Get Model Armor Template.
description: Gets a Template.
examples: |-
To get a Template, run:
$ {command} my-template --location=us-central1
arguments:
params:
- help_text: |-
Name of the resource
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.model_armor.v1alpha_resources:project_location_template
required: true
request:
api_version: v1alpha
collection:
- modelarmor.projects.locations.templates

View File

@@ -0,0 +1,39 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- BETA
auto_generated: true
help_text:
brief: Get Model Armor Template.
description: Gets a Template.
examples: |-
To get a Template, run:
$ {command} my-template --location=us-central1
arguments:
params:
- help_text: |-
Name of the resource
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.model_armor.v1beta_resources:projects_locations_templates
required: true
request:
api_version: v1beta
collection:
- modelarmor.projects.locations.templates

View File

@@ -0,0 +1,38 @@
# -*- coding: utf-8 -*- #
# Copyright 2024 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- GA
auto_generated: true
help_text:
brief: Get Model Armor Template.
description: Gets a Template.
examples: |-
To get a Template, run:
$ {command} my-template --location=us-central1
arguments:
params:
- help_text: |-
Name of the resource
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.model_armor.v1_resources:project_location_template
required: true
request:
api_version: v1
collection:
- modelarmor.projects.locations.templates

View File

@@ -0,0 +1,45 @@
# -*- coding: utf-8 -*- #
# Copyright 2024 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- ALPHA
auto_generated: true
help_text:
brief: List Model Armor Templates.
description: Lists Templates in a given project and location.
examples: |-
To list Templates in a given project and location, run:
$ {command} list --location=us-central1
arguments:
params:
- help_text: |-
Parent value for ListTemplatesRequest
is_positional: false
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.model_armor.v1alpha_resources:project_location
required: true
request:
api_version: v1alpha
collection:
- modelarmor.projects.locations.templates
response:
id_field: name
output:
format: |-
table(name,
createTime,
updateTime)

View File

@@ -0,0 +1,46 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- BETA
auto_generated: true
help_text:
brief: List Model Armor Templates.
description: Lists Templates in a given project and location.
examples: |-
To list Templates in a given project and location, run:
$ {command} list --location=us-central1
arguments:
params:
- help_text: |-
Parent value for ListTemplatesRequest
is_positional: false
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.model_armor.v1beta_resources:projects_locations
required: true
request:
api_version: v1beta
collection:
- modelarmor.projects.locations.templates
response:
id_field: name
output:
format: |-
table(name,
createTime,
updateTime)

View File

@@ -0,0 +1,45 @@
# -*- coding: utf-8 -*- #
# Copyright 2024 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- GA
auto_generated: true
help_text:
brief: List Model Armor Templates.
description: Lists Templates in a given project and location.
examples: |-
To list Templates in a given project and location, run:
$ {command} list --location=us-central1
arguments:
params:
- help_text: |-
Parent value for ListTemplatesRequest
is_positional: false
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.model_armor.v1_resources:project_location
required: true
request:
api_version: v1
collection:
- modelarmor.projects.locations.templates
response:
id_field: name
output:
format: |-
table(name,
createTime,
updateTime)

View File

@@ -0,0 +1,85 @@
# -*- coding: utf-8 -*- #
# Copyright 2024 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- ALPHA
auto_generated: true
help_text:
brief: Sanitize Model Response.
description: Sanitizes a model response.
examples: |-
To sanitize a model response, run:
$ {command} my-template --location=us-central1 --model-response-data="test-model-response"
arguments:
params:
- help_text: |-
Represents resource name of template
e.g. name=projects/sample-project/locations/us-central1/templates/templ01
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.model_armor.v1alpha_resources:project_location_template
required: true
- group:
mutex: true
help_text: |-
Arguments for the data item.
params:
- arg_name: model-response-data-text
api_field: sanitizeModelResponseRequest.modelResponseData.text
required: false
repeated: false
help_text: |-
Plaintext string data for sanitization.
- group:
api_field: sanitizeModelResponseRequest.modelResponseData.byteItem
required: false
help_text: |-
Represents Byte Data item.
params:
- arg_name: model-response-data-byte-item-type
api_field: sanitizeModelResponseRequest.modelResponseData.byteItem.byteDataType
required: true
help_text: |-
The type of byte data
choices:
- arg_value: plaintext-utf8
enum_value: PLAINTEXT_UTF8
help_text: |-
plain text
- arg_value: pdf
enum_value: PDF
help_text: |-
PDF
- arg_name: model-response-data-byte-item-from-file
api_field: sanitizeModelResponseRequest.modelResponseData.byteItem.byteData
json_name: byteDataFromFile
required: true
repeated: false
type: file_type
help_text: |-
Bytes Data
- arg_name: user-prompt
api_field: sanitizeModelResponseRequest.userPrompt
required: false
repeated: false
help_text: |-
User Prompt associated with Model response.
request:
api_version: v1alpha
collection:
- modelarmor.projects.locations.templates
method: sanitizeModelResponse

View File

@@ -0,0 +1,135 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- BETA
auto_generated: true
help_text:
brief: Sanitize Model Response.
description: Sanitizes a model response.
examples: |-
To sanitize a model response, run:
$ {command} my-template --location=us-central1 --model-response-data="test-model-response"
arguments:
params:
- help_text: |-
Represents resource name of template
e.g. name=projects/sample-project/locations/us-central1/templates/templ01
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.model_armor.v1beta_resources:projects_locations_templates
required: true
- group:
mutex: true
help_text: |-
Arguments for the data item.
params:
- arg_name: model-response-data-text
api_field: sanitizeModelResponseRequest.modelResponseData.text
required: false
repeated: false
help_text: |-
Plaintext string data for sanitization.
- group:
api_field: sanitizeModelResponseRequest.modelResponseData.byteItem
required: false
help_text: |-
Represents Byte Data item.
params:
- arg_name: model-response-data-byte-item-type
api_field: sanitizeModelResponseRequest.modelResponseData.byteItem.byteDataType
required: true
help_text: |-
The type of byte data
choices:
- arg_value: plaintext-utf8
enum_value: PLAINTEXT_UTF8
help_text: |-
plain text
- arg_value: pdf
enum_value: PDF
help_text: |-
PDF
- arg_value: word-document
enum_value: WORD_DOCUMENT
help_text: |-
DOCX, DOCM, DOTX, DOTM
- arg_value: excel-document
enum_value: EXCEL_DOCUMENT
help_text: |-
XLSX, XLSM, XLTX, XLYM
- arg_value: powerpoint-document
enum_value: POWERPOINT_DOCUMENT
help_text: |-
PPTX, PPTM, POTX, POTM, POT
- arg_value: txt
enum_value: TXT
help_text: |-
TXT
- arg_value: csv
enum_value: CSV
help_text: |-
CSV
- group:
mutex: true
required: true
params:
- arg_name: model-response-data-byte-item-from-file
api_field: sanitizeModelResponseRequest.modelResponseData.byteItem.byteData
json_name: byteDataFromFile
required: false
repeated: false
type: file_type
help_text: |-
Bytes Data
- arg_name: model-response-data-byte-item
api_field: sanitizeModelResponseRequest.modelResponseData.byteItem.byteData
required: false
repeated: false
type: bytes
help_text: |-
Bytes Data
- arg_name: user-prompt
api_field: sanitizeModelResponseRequest.userPrompt
required: false
repeated: false
help_text: |-
User Prompt associated with Model response.
- arg_name: multi-language-detection-metadata-source
api_field: sanitizeModelResponseRequest.multiLanguageDetectionMetadata.sourceLanguage
required: false
repeated: false
help_text: |-
Optional Source language of the user prompt.
If multi-language detection is enabled but language is not set in that case
we would automatically detect the source language.
- arg_name: multi-language-detection-metadata-enable
api_field: sanitizeModelResponseRequest.multiLanguageDetectionMetadata.enableMultiLanguageDetection
action: store_true
required: false
type: bool
help_text: |-
Enable detection of multi-language prompts and responses.
default: null
request:
api_version: v1beta
collection:
- modelarmor.projects.locations.templates
method: sanitizeModelResponse
command_type: GENERIC

View File

@@ -0,0 +1,85 @@
# -*- coding: utf-8 -*- #
# Copyright 2024 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- GA
auto_generated: true
help_text:
brief: Sanitize Model Response.
description: Sanitizes a model response.
examples: |-
To sanitize a model response, run:
$ {command} my-template --location=us-central1 --model-response-data="test-model-response"
arguments:
params:
- help_text: |-
Represents resource name of template
e.g. name=projects/sample-project/locations/us-central1/templates/templ01
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.model_armor.v1_resources:project_location_template
required: true
- group:
mutex: true
help_text: |-
Arguments for the data item.
params:
- arg_name: model-response-data-text
api_field: sanitizeModelResponseRequest.modelResponseData.text
required: false
repeated: false
help_text: |-
Plaintext string data for sanitization.
- group:
api_field: sanitizeModelResponseRequest.modelResponseData.byteItem
required: false
help_text: |-
Represents Byte Data item.
params:
- arg_name: model-response-data-byte-item-type
api_field: sanitizeModelResponseRequest.modelResponseData.byteItem.byteDataType
required: true
help_text: |-
The type of byte data
choices:
- arg_value: plaintext-utf8
enum_value: PLAINTEXT_UTF8
help_text: |-
plain text
- arg_value: pdf
enum_value: PDF
help_text: |-
PDF
- arg_name: model-response-data-byte-item-from-file
api_field: sanitizeModelResponseRequest.modelResponseData.byteItem.byteData
json_name: byteDataFromFile
required: true
repeated: false
type: file_type
help_text: |-
Bytes Data
- arg_name: user-prompt
api_field: sanitizeModelResponseRequest.userPrompt
required: false
repeated: false
help_text: |-
User Prompt associated with Model response.
request:
api_version: v1
collection:
- modelarmor.projects.locations.templates
method: sanitizeModelResponse

View File

@@ -0,0 +1,79 @@
# -*- coding: utf-8 -*- #
# Copyright 2024 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- ALPHA
auto_generated: true
help_text:
brief: Sanitize User Prompt.
description: Sanitizes a user prompt.
examples: |-
To sanitize a user prompt, run:
$ {command} my-template --location=us-central1 --user-prompt-data="test-user-prompt"
arguments:
params:
- help_text: |-
Represents resource name of template
e.g. name=projects/sample-project/locations/us-central1/templates/templ01
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.model_armor.v1alpha_resources:project_location_template
required: true
- group:
mutex: true
help_text: |-
Arguments for the data item.
params:
- arg_name: user-prompt-data-text
api_field: sanitizeUserPromptRequest.userPromptData.text
required: false
repeated: false
help_text: |-
Plaintext string data for sanitization.
- group:
api_field: sanitizeUserPromptRequest.userPromptData.byteItem
required: false
help_text: |-
Represents Byte Data item.
params:
- arg_name: byte-item-data-type
api_field: sanitizeUserPromptRequest.userPromptData.byteItem.byteDataType
required: true
help_text: |-
The type of byte data
choices:
- arg_value: plaintext-utf8
enum_value: PLAINTEXT_UTF8
help_text: |-
plain text
- arg_value: pdf
enum_value: PDF
help_text: |-
PDF
- arg_name: byte-item-data-from-file
api_field: sanitizeUserPromptRequest.userPromptData.byteItem.byteData
json_name: byteDataFromFile
required: true
repeated: false
type: file_type
help_text: |-
Bytes Data
request:
api_version: v1alpha
collection:
- modelarmor.projects.locations.templates
method: sanitizeUserPrompt

View File

@@ -0,0 +1,129 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- BETA
auto_generated: true
help_text:
brief: Sanitize User Prompt.
description: Sanitizes a user prompt.
examples: |-
To sanitize a user prompt, run:
$ {command} my-template --location=us-central1 --user-prompt-data="test-user-prompt"
arguments:
params:
- help_text: |-
Represents resource name of template
e.g. name=projects/sample-project/locations/us-central1/templates/templ01
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.model_armor.v1beta_resources:projects_locations_templates
required: true
- group:
mutex: true
help_text: |-
Arguments for the data item.
params:
- arg_name: user-prompt-data-text
api_field: sanitizeUserPromptRequest.userPromptData.text
required: false
repeated: false
help_text: |-
Plaintext string data for sanitization.
- group:
api_field: sanitizeUserPromptRequest.userPromptData.byteItem
required: false
help_text: |-
Represents Byte Data item.
params:
- arg_name: byte-item-data-type
api_field: sanitizeUserPromptRequest.userPromptData.byteItem.byteDataType
required: true
help_text: |-
The type of byte data
choices:
- arg_value: plaintext-utf8
enum_value: PLAINTEXT_UTF8
help_text: |-
plain text
- arg_value: pdf
enum_value: PDF
help_text: |-
PDF
- arg_value: word-document
enum_value: WORD_DOCUMENT
help_text: |-
DOCX, DOCM, DOTX, DOTM
- arg_value: excel-document
enum_value: EXCEL_DOCUMENT
help_text: |-
XLSX, XLSM, XLTX, XLYM
- arg_value: powerpoint-document
enum_value: POWERPOINT_DOCUMENT
help_text: |-
PPTX, PPTM, POTX, POTM, POT
- arg_value: txt
enum_value: TXT
help_text: |-
TXT
- arg_value: csv
enum_value: CSV
help_text: |-
CSV
- group:
mutex: true
required: true
params:
- arg_name: byte-item-data-from-file
api_field: sanitizeUserPromptRequest.userPromptData.byteItem.byteData
json_name: byteDataFromFile
required: false
repeated: false
type: file_type
help_text: |-
Bytes Data
- arg_name: byte-item-data
api_field: sanitizeUserPromptRequest.userPromptData.byteItem.byteData
required: false
repeated: false
type: bytes
help_text: |-
Bytes Data
- arg_name: multi-language-detection-metadata-source
api_field: sanitizeUserPromptRequest.multiLanguageDetectionMetadata.sourceLanguage
required: false
repeated: false
help_text: |-
Optional Source language of the user prompt.
If multi-language detection is enabled but language is not set in that case
we would automatically detect the source language.
- arg_name: multi-language-detection-metadata-enable
api_field: sanitizeUserPromptRequest.multiLanguageDetectionMetadata.enableMultiLanguageDetection
action: store_true
required: false
type: bool
help_text: |-
Enable detection of multi-language prompts and responses.
default: null
request:
api_version: v1beta
collection:
- modelarmor.projects.locations.templates
method: sanitizeUserPrompt
command_type: GENERIC

View File

@@ -0,0 +1,79 @@
# -*- coding: utf-8 -*- #
# Copyright 2024 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- GA
auto_generated: true
help_text:
brief: Sanitize User Prompt.
description: Sanitizes a user prompt.
examples: |-
To sanitize a user prompt, run:
$ {command} my-template --location=us-central1 --user-prompt-data="test-user-prompt"
arguments:
params:
- help_text: |-
Represents resource name of template
e.g. name=projects/sample-project/locations/us-central1/templates/templ01
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.model_armor.v1_resources:project_location_template
required: true
- group:
mutex: true
help_text: |-
Arguments for the data item.
params:
- arg_name: user-prompt-data-text
api_field: sanitizeUserPromptRequest.userPromptData.text
required: false
repeated: false
help_text: |-
Plaintext string data for sanitization.
- group:
api_field: sanitizeUserPromptRequest.userPromptData.byteItem
required: false
help_text: |-
Represents Byte Data item.
params:
- arg_name: byte-item-data-type
api_field: sanitizeUserPromptRequest.userPromptData.byteItem.byteDataType
required: true
help_text: |-
The type of byte data
choices:
- arg_value: plaintext-utf8
enum_value: PLAINTEXT_UTF8
help_text: |-
plain text
- arg_value: pdf
enum_value: PDF
help_text: |-
PDF
- arg_name: byte-item-data-from-file
api_field: sanitizeUserPromptRequest.userPromptData.byteItem.byteData
json_name: byteDataFromFile
required: true
repeated: false
type: file_type
help_text: |-
Bytes Data
request:
api_version: v1
collection:
- modelarmor.projects.locations.templates
method: sanitizeUserPrompt

View File

@@ -0,0 +1,293 @@
# -*- coding: utf-8 -*- #
# Copyright 2024 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- ALPHA
auto_generated: true
help_text:
brief: Update Model Armor Template.
description: Updates a Template.
examples: |-
To update a Template, run:
$ {command} my-template --location=us-central1 --clear-labels
arguments:
params:
- help_text: |-
Identifier. name of resource
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.model_armor.v1alpha_resources:project_location_template
required: true
- arg_name: labels
api_field: template.labels
required: false
repeated: true
help_text: |-
Labels as key value pairs
clearable: true
spec:
- api_field: key
- api_field: value
- group:
api_field: template.filterConfig
arg_name: filter-config
clearable: true
required: false
help_text: |-
Filters configuration.
params:
- group:
api_field: template.filterConfig.raiSettings
required: false
help_text: |-
Responsible AI Filter settings.
params:
- arg_name: rai-settings-filters
api_field: template.filterConfig.raiSettings.raiFilters
required: false
repeated: true
help_text: |-
List of Responsible AI filters enabled for template.
clearable: true
spec:
- api_field: filterType
help_text: |-
Type of responsible AI filter.
- api_field: confidenceLevel
help_text: |-
Confidence level for this RAI filter.
During data sanitization, if data is classified under this filter with a
confidence level equal to or greater than the specified level, a positive
match is reported. If the confidence level is unspecified (i.e., 0), the
system will use a reasonable default level based on the `filter_type`.
- group:
api_field: template.filterConfig.sdpSettings
required: false
help_text: |-
Sensitive Data Protection settings.
params:
- group:
mutex: true
help_text: |-
Arguments for the sdp configuration.
params:
- group:
api_field: template.filterConfig.sdpSettings.basicConfig
required: false
help_text: |-
Sensitive Data Protection basic configuration.
params:
- arg_name: basic-config-filter-enforcement
api_field: template.filterConfig.sdpSettings.basicConfig.filterEnforcement
required: false
help_text: |-
Tells whether the Sensitive Data Protection basic config is enabled or
disabled.
choices:
- arg_value: enabled
enum_value: ENABLED
help_text: |-
Enabled
- arg_value: disabled
enum_value: DISABLED
help_text: |-
Disabled
- group:
api_field: template.filterConfig.sdpSettings.advancedConfig
required: false
help_text: |-
Sensitive Data Protection Advanced configuration.
params:
- arg_name: advanced-config-inspect-template
api_field: template.filterConfig.sdpSettings.advancedConfig.inspectTemplate
required: false
repeated: false
help_text: |-
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.
`organizations/{organization}/inspectTemplates/{inspect_template}`,
`projects/{project}/inspectTemplates/{inspect_template}`
`organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}`
`projects/{project}/locations/{location}/inspectTemplates/{inspect_template}`
- arg_name: advanced-config-deidentify-template
api_field: template.filterConfig.sdpSettings.advancedConfig.deidentifyTemplate
required: false
repeated: false
help_text: |-
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.
`organizations/{organization}/deidentifyTemplates/{deidentify_template}`,
`projects/{project}/deidentifyTemplates/{deidentify_template}`
`organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}`
`projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}`
- group:
api_field: template.filterConfig.piAndJailbreakFilterSettings
required: false
help_text: |-
Prompt injection and Jailbreak Filter settings.
params:
- arg_name: pi-and-jailbreak-filter-settings-enforcement
api_field: template.filterConfig.piAndJailbreakFilterSettings.filterEnforcement
required: false
help_text: |-
Tells whether Prompt injection and Jailbreak filter is enabled or
disabled.
choices:
- arg_value: enabled
enum_value: ENABLED
help_text: |-
Enabled
- arg_value: disabled
enum_value: DISABLED
help_text: |-
Enabled
- arg_name: pi-and-jailbreak-filter-settings-confidence-level
api_field: template.filterConfig.piAndJailbreakFilterSettings.confidenceLevel
required: false
help_text: |-
Confidence level for this filter.
Confidence level is used to determine the threshold for the filter. If
detection confidence is equal to or greater than the specified level, a
positive match is reported. Confidence level will only be used if the
filter is enabled.
choices:
- arg_value: low-and-above
enum_value: LOW_AND_ABOVE
help_text: |-
Highest chance of a false positive.
- arg_value: medium-and-above
enum_value: MEDIUM_AND_ABOVE
help_text: |-
Some chance of false positives.
- arg_value: high
enum_value: HIGH
help_text: |-
Low chance of false positives.
- group:
api_field: template.filterConfig.maliciousUriFilterSettings
required: false
help_text: |-
Malicious URI filter settings.
params:
- arg_name: malicious-uri-filter-settings-enforcement
api_field: template.filterConfig.maliciousUriFilterSettings.filterEnforcement
required: false
help_text: |-
Tells whether the Malicious URI filter is enabled or disabled.
choices:
- arg_value: enabled
enum_value: ENABLED
help_text: |-
Enabled
- arg_value: disabled
enum_value: DISABLED
help_text: |-
Disabled
- group:
api_field: template.templateMetadata
arg_name: template-metadata
clearable: true
required: false
help_text: |-
Message describing TemplateMetadata
params:
- arg_name: template-metadata-ignore-partial-invocation-failures
api_field: template.templateMetadata.ignorePartialInvocationFailures
action: store_true_false
required: false
type: bool
help_text: |-
If true, partial detector failures should be ignored.
- arg_name: template-metadata-custom-prompt-safety-error-code
api_field: template.templateMetadata.customPromptSafetyErrorCode
required: false
repeated: false
type: int
help_text: |-
Indicates the custom error code set by the user to be returned to the end
user by the service extension if the prompt trips Model Armor filters.
- arg_name: template-metadata-custom-prompt-safety-error-message
api_field: template.templateMetadata.customPromptSafetyErrorMessage
required: false
repeated: false
help_text: |-
Indicates the custom error message set by the user to be returned to the
end user if the prompt trips Model Armor filters.
- arg_name: template-metadata-custom-llm-response-safety-error-code
api_field: template.templateMetadata.customLlmResponseSafetyErrorCode
required: false
repeated: false
type: int
help_text: |-
Indicates the custom error code set by the user to be returned to the end
user if the LLM response trips Model Armor filters.
- arg_name: template-metadata-custom-llm-response-safety-error-message
api_field: template.templateMetadata.customLlmResponseSafetyErrorMessage
required: false
repeated: false
help_text: |-
Indicates the custom error message set by the user to be returned to the
end user if the LLM response trips Model Armor filters.
- arg_name: template-metadata-log-operations
api_field: template.templateMetadata.logTemplateOperations
action: store_true_false
required: false
type: bool
help_text: |-
If true, log template crud operations.
- arg_name: template-metadata-log-sanitize-operations
api_field: template.templateMetadata.logSanitizeOperations
action: store_true_false
required: false
type: bool
help_text: |-
If true, log sanitize operations.
- arg_name: request-id
api_field: requestId
required: false
repeated: false
help_text: |-
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).
request:
api_version: v1alpha
collection:
- modelarmor.projects.locations.templates
update:
read_modify_update: true

View File

@@ -0,0 +1,319 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- BETA
auto_generated: true
help_text:
brief: Update Model Armor Template.
description: Updates a Template.
examples: |-
To update a Template, run:
$ {command} my-template --location=us-central1 --clear-labels
arguments:
params:
- help_text: |-
Identifier. name of resource
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.model_armor.v1beta_resources:projects_locations_templates
required: true
- arg_name: labels
api_field: template.labels
required: false
repeated: true
help_text: |-
Labels as key value pairs
clearable: true
spec:
- api_field: key
- api_field: value
- group:
api_field: template.filterConfig
arg_name: filter-config
clearable: true
required: false
help_text: |-
Filters configuration.
params:
- group:
api_field: template.filterConfig.raiSettings
required: false
help_text: |-
Responsible AI Filter settings.
params:
- arg_name: rai-settings-filters
api_field: template.filterConfig.raiSettings.raiFilters
required: false
repeated: true
help_text: |-
List of Responsible AI filters enabled for template.
clearable: true
spec:
- api_field: filterType
help_text: |-
Type of responsible AI filter.
- api_field: confidenceLevel
help_text: |-
Confidence level for this RAI filter.
During data sanitization, if data is classified under this filter with a
confidence level equal to or greater than the specified level, a positive
match is reported. If the confidence level is unspecified (i.e., 0), the
system will use a reasonable default level based on the `filter_type`.
- group:
api_field: template.filterConfig.sdpSettings
required: false
help_text: |-
Sensitive Data Protection settings.
params:
- group:
mutex: true
help_text: |-
Arguments for the sdp configuration.
params:
- group:
api_field: template.filterConfig.sdpSettings.basicConfig
required: false
help_text: |-
Sensitive Data Protection basic configuration.
params:
- arg_name: basic-config-filter-enforcement
api_field: template.filterConfig.sdpSettings.basicConfig.filterEnforcement
required: false
help_text: |-
Tells whether the Sensitive Data Protection basic config is enabled or
disabled.
choices:
- arg_value: enabled
enum_value: ENABLED
help_text: |-
Enabled
- arg_value: disabled
enum_value: DISABLED
help_text: |-
Disabled
- group:
api_field: template.filterConfig.sdpSettings.advancedConfig
required: false
help_text: |-
Sensitive Data Protection Advanced configuration.
params:
- arg_name: advanced-config-inspect-template
api_field: template.filterConfig.sdpSettings.advancedConfig.inspectTemplate
required: false
repeated: false
help_text: |-
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}`
- arg_name: advanced-config-deidentify-template
api_field: template.filterConfig.sdpSettings.advancedConfig.deidentifyTemplate
required: false
repeated: false
help_text: |-
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}`
- group:
api_field: template.filterConfig.piAndJailbreakFilterSettings
required: false
help_text: |-
Prompt injection and Jailbreak Filter settings.
params:
- arg_name: pi-and-jailbreak-filter-settings-enforcement
api_field: template.filterConfig.piAndJailbreakFilterSettings.filterEnforcement
required: false
help_text: |-
Tells whether Prompt injection and Jailbreak filter is enabled or
disabled.
choices:
- arg_value: enabled
enum_value: ENABLED
help_text: |-
Enabled
- arg_value: disabled
enum_value: DISABLED
help_text: |-
Enabled
- arg_name: pi-and-jailbreak-filter-settings-confidence-level
api_field: template.filterConfig.piAndJailbreakFilterSettings.confidenceLevel
required: false
help_text: |-
Confidence level for this filter.
Confidence level is used to determine the threshold for the filter. If
detection confidence is equal to or greater than the specified level, a
positive match is reported. Confidence level will only be used if the
filter is enabled.
choices:
- arg_value: low-and-above
enum_value: LOW_AND_ABOVE
help_text: |-
Highest chance of a false positive.
- arg_value: medium-and-above
enum_value: MEDIUM_AND_ABOVE
help_text: |-
Some chance of false positives.
- arg_value: high
enum_value: HIGH
help_text: |-
Low chance of false positives.
- group:
api_field: template.filterConfig.maliciousUriFilterSettings
required: false
help_text: |-
Malicious URI filter settings.
params:
- arg_name: malicious-uri-filter-settings-enforcement
api_field: template.filterConfig.maliciousUriFilterSettings.filterEnforcement
required: false
help_text: |-
Tells whether the Malicious URI filter is enabled or disabled.
choices:
- arg_value: enabled
enum_value: ENABLED
help_text: |-
Enabled
- arg_value: disabled
enum_value: DISABLED
help_text: |-
Disabled
- group:
api_field: template.templateMetadata
arg_name: template-metadata
clearable: true
required: false
help_text: |-
Message describing TemplateMetadata
params:
- arg_name: template-metadata-ignore-partial-invocation-failures
api_field: template.templateMetadata.ignorePartialInvocationFailures
action: store_true_false
required: false
type: bool
help_text: |-
If true, partial detector failures should be ignored.
- arg_name: template-metadata-custom-prompt-safety-error-code
api_field: template.templateMetadata.customPromptSafetyErrorCode
required: false
repeated: false
type: int
help_text: |-
Indicates the custom error code set by the user to be returned to the end
user by the service extension if the prompt trips Model Armor filters.
- arg_name: template-metadata-custom-prompt-safety-error-message
api_field: template.templateMetadata.customPromptSafetyErrorMessage
required: false
repeated: false
help_text: |-
Indicates the custom error message set by the user to be returned to the
end user if the prompt trips Model Armor filters.
- arg_name: template-metadata-custom-llm-response-safety-error-code
api_field: template.templateMetadata.customLlmResponseSafetyErrorCode
required: false
repeated: false
type: int
help_text: |-
Indicates the custom error code set by the user to be returned to the end
user if the LLM response trips Model Armor filters.
- arg_name: template-metadata-custom-llm-response-safety-error-message
api_field: template.templateMetadata.customLlmResponseSafetyErrorMessage
required: false
repeated: false
help_text: |-
Indicates the custom error message set by the user to be returned to the
end user if the LLM response trips Model Armor filters.
- arg_name: template-metadata-log-operations
api_field: template.templateMetadata.logTemplateOperations
action: store_true_false
required: false
type: bool
help_text: |-
If true, log template crud operations.
- arg_name: template-metadata-log-sanitize-operations
api_field: template.templateMetadata.logSanitizeOperations
action: store_true_false
required: false
type: bool
help_text: |-
If true, log sanitize operations.
- arg_name: template-metadata-enforcement-type
api_field: template.templateMetadata.enforcementType
required: false
help_text: |-
Enforcement type for Model Armor filters.
choices:
- arg_value: inspect-only
enum_value: INSPECT_ONLY
help_text: |-
Model Armor filters will run in inspect only mode. No action will be
taken on the request.
- arg_value: inspect-and-block
enum_value: INSPECT_AND_BLOCK
help_text: |-
Model Armor filters will run in inspect and block mode. Requests
that trip Model Armor filters will be blocked.
- group:
api_field: template.templateMetadata.multiLanguageDetection
required: false
help_text: |-
Metadata to enable multi language detection via template.
params:
- arg_name: multi-language-detection-enable
api_field: template.templateMetadata.multiLanguageDetection.enableMultiLanguageDetection
action: store_true_false
required: false
type: bool
help_text: |-
If true, multi language detection will be enabled.
- arg_name: request-id
api_field: requestId
required: false
repeated: false
help_text: |-
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).
request:
api_version: v1beta
collection:
- modelarmor.projects.locations.templates
update:
read_modify_update: true

View File

@@ -0,0 +1,293 @@
# -*- coding: utf-8 -*- #
# Copyright 2024 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
- release_tracks:
- GA
auto_generated: true
help_text:
brief: Update Model Armor Template.
description: Updates a Template.
examples: |-
To update a Template, run:
$ {command} my-template --location=us-central1 --clear-labels
arguments:
params:
- help_text: |-
Identifier. name of resource
is_positional: true
is_primary_resource: true
resource_spec: !REF googlecloudsdk.command_lib.model_armor.v1_resources:project_location_template
required: true
- arg_name: labels
api_field: template.labels
required: false
repeated: true
help_text: |-
Labels as key value pairs
clearable: true
spec:
- api_field: key
- api_field: value
- group:
api_field: template.filterConfig
arg_name: filter-config
clearable: true
required: false
help_text: |-
Filters configuration.
params:
- group:
api_field: template.filterConfig.raiSettings
required: false
help_text: |-
Responsible AI Filter settings.
params:
- arg_name: rai-settings-filters
api_field: template.filterConfig.raiSettings.raiFilters
required: false
repeated: true
help_text: |-
List of Responsible AI filters enabled for template.
clearable: true
spec:
- api_field: filterType
help_text: |-
Type of responsible AI filter.
- api_field: confidenceLevel
help_text: |-
Confidence level for this RAI filter.
During data sanitization, if data is classified under this filter with a
confidence level equal to or greater than the specified level, a positive
match is reported. If the confidence level is unspecified (i.e., 0), the
system will use a reasonable default level based on the `filter_type`.
- group:
api_field: template.filterConfig.sdpSettings
required: false
help_text: |-
Sensitive Data Protection settings.
params:
- group:
mutex: true
help_text: |-
Arguments for the sdp configuration.
params:
- group:
api_field: template.filterConfig.sdpSettings.basicConfig
required: false
help_text: |-
Sensitive Data Protection basic configuration.
params:
- arg_name: basic-config-filter-enforcement
api_field: template.filterConfig.sdpSettings.basicConfig.filterEnforcement
required: false
help_text: |-
Tells whether the Sensitive Data Protection basic config is enabled or
disabled.
choices:
- arg_value: enabled
enum_value: ENABLED
help_text: |-
Enabled
- arg_value: disabled
enum_value: DISABLED
help_text: |-
Disabled
- group:
api_field: template.filterConfig.sdpSettings.advancedConfig
required: false
help_text: |-
Sensitive Data Protection Advanced configuration.
params:
- arg_name: advanced-config-inspect-template
api_field: template.filterConfig.sdpSettings.advancedConfig.inspectTemplate
required: false
repeated: false
help_text: |-
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.
`organizations/{organization}/inspectTemplates/{inspect_template}`,
`projects/{project}/inspectTemplates/{inspect_template}`
`organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}`
`projects/{project}/locations/{location}/inspectTemplates/{inspect_template}`
- arg_name: advanced-config-deidentify-template
api_field: template.filterConfig.sdpSettings.advancedConfig.deidentifyTemplate
required: false
repeated: false
help_text: |-
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.
`organizations/{organization}/deidentifyTemplates/{deidentify_template}`,
`projects/{project}/deidentifyTemplates/{deidentify_template}`
`organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}`
`projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}`
- group:
api_field: template.filterConfig.piAndJailbreakFilterSettings
required: false
help_text: |-
Prompt injection and Jailbreak Filter settings.
params:
- arg_name: pi-and-jailbreak-filter-settings-enforcement
api_field: template.filterConfig.piAndJailbreakFilterSettings.filterEnforcement
required: false
help_text: |-
Tells whether Prompt injection and Jailbreak filter is enabled or
disabled.
choices:
- arg_value: enabled
enum_value: ENABLED
help_text: |-
Enabled
- arg_value: disabled
enum_value: DISABLED
help_text: |-
Enabled
- arg_name: pi-and-jailbreak-filter-settings-confidence-level
api_field: template.filterConfig.piAndJailbreakFilterSettings.confidenceLevel
required: false
help_text: |-
Confidence level for this filter.
Confidence level is used to determine the threshold for the filter. If
detection confidence is equal to or greater than the specified level, a
positive match is reported. Confidence level will only be used if the
filter is enabled.
choices:
- arg_value: low-and-above
enum_value: LOW_AND_ABOVE
help_text: |-
Highest chance of a false positive.
- arg_value: medium-and-above
enum_value: MEDIUM_AND_ABOVE
help_text: |-
Some chance of false positives.
- arg_value: high
enum_value: HIGH
help_text: |-
Low chance of false positives.
- group:
api_field: template.filterConfig.maliciousUriFilterSettings
required: false
help_text: |-
Malicious URI filter settings.
params:
- arg_name: malicious-uri-filter-settings-enforcement
api_field: template.filterConfig.maliciousUriFilterSettings.filterEnforcement
required: false
help_text: |-
Tells whether the Malicious URI filter is enabled or disabled.
choices:
- arg_value: enabled
enum_value: ENABLED
help_text: |-
Enabled
- arg_value: disabled
enum_value: DISABLED
help_text: |-
Disabled
- group:
api_field: template.templateMetadata
arg_name: template-metadata
clearable: true
required: false
help_text: |-
Message describing TemplateMetadata
params:
- arg_name: template-metadata-ignore-partial-invocation-failures
api_field: template.templateMetadata.ignorePartialInvocationFailures
action: store_true_false
required: false
type: bool
help_text: |-
If true, partial detector failures should be ignored.
- arg_name: template-metadata-custom-prompt-safety-error-code
api_field: template.templateMetadata.customPromptSafetyErrorCode
required: false
repeated: false
type: int
help_text: |-
Indicates the custom error code set by the user to be returned to the end
user by the service extension if the prompt trips Model Armor filters.
- arg_name: template-metadata-custom-prompt-safety-error-message
api_field: template.templateMetadata.customPromptSafetyErrorMessage
required: false
repeated: false
help_text: |-
Indicates the custom error message set by the user to be returned to the
end user if the prompt trips Model Armor filters.
- arg_name: template-metadata-custom-llm-response-safety-error-code
api_field: template.templateMetadata.customLlmResponseSafetyErrorCode
required: false
repeated: false
type: int
help_text: |-
Indicates the custom error code set by the user to be returned to the end
user if the LLM response trips Model Armor filters.
- arg_name: template-metadata-custom-llm-response-safety-error-message
api_field: template.templateMetadata.customLlmResponseSafetyErrorMessage
required: false
repeated: false
help_text: |-
Indicates the custom error message set by the user to be returned to the
end user if the LLM response trips Model Armor filters.
- arg_name: template-metadata-log-operations
api_field: template.templateMetadata.logTemplateOperations
action: store_true_false
required: false
type: bool
help_text: |-
If true, log template crud operations.
- arg_name: template-metadata-log-sanitize-operations
api_field: template.templateMetadata.logSanitizeOperations
action: store_true_false
required: false
type: bool
help_text: |-
If true, log sanitize operations.
- arg_name: request-id
api_field: requestId
required: false
repeated: false
help_text: |-
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).
request:
api_version: v1
collection:
- modelarmor.projects.locations.templates
update:
read_modify_update: true

View File

@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
_PARTIALS_: true

View File

@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
_PARTIALS_: true

View File

@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
_PARTIALS_: true

View File

@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
_PARTIALS_: true

View File

@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
_PARTIALS_: true

View File

@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
_PARTIALS_: true

View File

@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 Google LLC. All Rights Reserved.
#
# 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.
#
# NOTE: This file is autogenerated and should not be edited by hand.
# AUTOGEN_CLI_VERSION: HEAD
_PARTIALS_: true