Class HttpJsonModelArmorStub (0.11.0)

publicclass HttpJsonModelArmorStubextendsModelArmorStub

REST stub implementation for the ModelArmor service API.

This class is for advanced usage and reflects the underlying API directly.

Inheritance

java.lang.Object > ModelArmorStub > HttpJsonModelArmorStub

Static Methods

create(ClientContext clientContext)

publicstaticfinalHttpJsonModelArmorStubcreate(ClientContextclientContext)
Parameter
Name Description
clientContext ClientContext
Returns
Type Description
HttpJsonModelArmorStub
Exceptions
Type Description
IOException

create(ClientContext clientContext, HttpJsonStubCallableFactory callableFactory)

publicstaticfinalHttpJsonModelArmorStubcreate(ClientContextclientContext,HttpJsonStubCallableFactorycallableFactory)
Parameters
Name Description
clientContext ClientContext
callableFactory HttpJsonStubCallableFactory
Returns
Type Description
HttpJsonModelArmorStub
Exceptions
Type Description
IOException

create(ModelArmorStubSettings settings)

publicstaticfinalHttpJsonModelArmorStubcreate(ModelArmorStubSettingssettings)
Parameter
Name Description
settings ModelArmorStubSettings
Returns
Type Description
HttpJsonModelArmorStub
Exceptions
Type Description
IOException

getMethodDescriptors()

publicstaticList<ApiMethodDescriptor>getMethodDescriptors()
Returns
Type Description
List<ApiMethodDescriptor>

Constructors

HttpJsonModelArmorStub(ModelArmorStubSettings settings, ClientContext clientContext)

protectedHttpJsonModelArmorStub(ModelArmorStubSettingssettings,ClientContextclientContext)

Constructs an instance of HttpJsonModelArmorStub, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameters
Name Description
settings ModelArmorStubSettings
clientContext ClientContext

HttpJsonModelArmorStub(ModelArmorStubSettings settings, ClientContext clientContext, HttpJsonStubCallableFactory callableFactory)

protectedHttpJsonModelArmorStub(ModelArmorStubSettingssettings,ClientContextclientContext,HttpJsonStubCallableFactorycallableFactory)

Constructs an instance of HttpJsonModelArmorStub, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameters
Name Description
settings ModelArmorStubSettings
clientContext ClientContext
callableFactory HttpJsonStubCallableFactory

Methods

awaitTermination(long duration, TimeUnit unit)

publicbooleanawaitTermination(longduration,TimeUnitunit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

close()

publicfinalvoidclose()
Overrides

createTemplateCallable()

publicUnaryCallable<CreateTemplateRequest,Template>createTemplateCallable()
Returns
Type Description
UnaryCallable<CreateTemplateRequest,Template>
Overrides

deleteTemplateCallable()

publicUnaryCallable<DeleteTemplateRequest,Empty>deleteTemplateCallable()
Returns
Type Description
UnaryCallable<DeleteTemplateRequest,Empty>
Overrides

getFloorSettingCallable()

publicUnaryCallable<GetFloorSettingRequest,FloorSetting>getFloorSettingCallable()
Returns
Type Description
UnaryCallable<GetFloorSettingRequest,FloorSetting>
Overrides

getLocationCallable()

publicUnaryCallable<GetLocationRequest,Location>getLocationCallable()
Returns
Type Description
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>
Overrides

getTemplateCallable()

publicUnaryCallable<GetTemplateRequest,Template>getTemplateCallable()
Returns
Type Description
UnaryCallable<GetTemplateRequest,Template>
Overrides

isShutdown()

publicbooleanisShutdown()
Returns
Type Description
boolean

isTerminated()

publicbooleanisTerminated()
Returns
Type Description
boolean

listLocationsCallable()

publicUnaryCallable<ListLocationsRequest,ListLocationsResponse>listLocationsCallable()
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>
Overrides

listLocationsPagedCallable()

publicUnaryCallable<ListLocationsRequest,ModelArmorClient.ListLocationsPagedResponse>listLocationsPagedCallable()
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse>
Overrides

listTemplatesCallable()

publicUnaryCallable<ListTemplatesRequest,ListTemplatesResponse>listTemplatesCallable()
Returns
Type Description
UnaryCallable<ListTemplatesRequest,ListTemplatesResponse>
Overrides

listTemplatesPagedCallable()

publicUnaryCallable<ListTemplatesRequest,ModelArmorClient.ListTemplatesPagedResponse>listTemplatesPagedCallable()
Returns
Type Description
UnaryCallable<ListTemplatesRequest,ListTemplatesPagedResponse>
Overrides

sanitizeModelResponseCallable()

publicUnaryCallable<SanitizeModelResponseRequest,SanitizeModelResponseResponse>sanitizeModelResponseCallable()
Returns
Type Description
UnaryCallable<SanitizeModelResponseRequest,SanitizeModelResponseResponse>
Overrides

sanitizeUserPromptCallable()

publicUnaryCallable<SanitizeUserPromptRequest,SanitizeUserPromptResponse>sanitizeUserPromptCallable()
Returns
Type Description
UnaryCallable<SanitizeUserPromptRequest,SanitizeUserPromptResponse>
Overrides

shutdown()

publicvoidshutdown()

shutdownNow()

publicvoidshutdownNow()

updateFloorSettingCallable()

publicUnaryCallable<UpdateFloorSettingRequest,FloorSetting>updateFloorSettingCallable()
Returns
Type Description
UnaryCallable<UpdateFloorSettingRequest,FloorSetting>
Overrides

updateTemplateCallable()

publicUnaryCallable<UpdateTemplateRequest,Template>updateTemplateCallable()
Returns
Type Description
UnaryCallable<UpdateTemplateRequest,Template>
Overrides

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.