Model Armor v1beta API - Class ModelArmor.ModelArmorBase (1.0.0-beta06)

[BindServiceMethod(typeof(ModelArmor), "BindService")]
public abstract class ModelArmor.ModelArmorBase

Reference documentation and code samples for the Model Armor v1beta API class ModelArmor.ModelArmorBase.

Base class for server-side implementations of ModelArmor

Inheritance

object > ModelArmor.ModelArmorBase

Namespace

Google.Cloud.ModelArmor.V1Beta

Assembly

Google.Cloud.ModelArmor.V1Beta.dll

Methods

CreateTemplate(CreateTemplateRequest, ServerCallContext)

public virtual Task<Template> CreateTemplate(CreateTemplateRequest request, ServerCallContext context)

Creates a new Template in a given project and location.

Parameters
Name Description
request CreateTemplateRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskTemplate

The response to send back to the client (wrapped by a task).

DeleteTemplate(DeleteTemplateRequest, ServerCallContext)

public virtual Task<Empty> DeleteTemplate(DeleteTemplateRequest request, ServerCallContext context)

Deletes a single Template.

Parameters
Name Description
request DeleteTemplateRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskEmpty

The response to send back to the client (wrapped by a task).

GetFloorSetting(GetFloorSettingRequest, ServerCallContext)

public virtual Task<FloorSetting> GetFloorSetting(GetFloorSettingRequest request, ServerCallContext context)

Gets details of a single floor setting of a project

Parameters
Name Description
request GetFloorSettingRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskFloorSetting

The response to send back to the client (wrapped by a task).

GetTemplate(GetTemplateRequest, ServerCallContext)

public virtual Task<Template> GetTemplate(GetTemplateRequest request, ServerCallContext context)

Gets details of a single Template.

Parameters
Name Description
request GetTemplateRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskTemplate

The response to send back to the client (wrapped by a task).

ListTemplates(ListTemplatesRequest, ServerCallContext)

public virtual Task<ListTemplatesResponse> ListTemplates(ListTemplatesRequest request, ServerCallContext context)

Lists Templates in a given project and location.

Parameters
Name Description
request ListTemplatesRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskListTemplatesResponse

The response to send back to the client (wrapped by a task).

SanitizeModelResponse(SanitizeModelResponseRequest, ServerCallContext)

public virtual Task<SanitizeModelResponseResponse> SanitizeModelResponse(SanitizeModelResponseRequest request, ServerCallContext context)

Sanitizes Model Response.

Parameters
Name Description
request SanitizeModelResponseRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskSanitizeModelResponseResponse

The response to send back to the client (wrapped by a task).

SanitizeUserPrompt(SanitizeUserPromptRequest, ServerCallContext)

public virtual Task<SanitizeUserPromptResponse> SanitizeUserPrompt(SanitizeUserPromptRequest request, ServerCallContext context)

Sanitizes User Prompt.

Parameters
Name Description
request SanitizeUserPromptRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskSanitizeUserPromptResponse

The response to send back to the client (wrapped by a task).

StreamSanitizeModelResponse(IAsyncStreamReader<SanitizeModelResponseRequest>, IServerStreamWriter<SanitizeModelResponseResponse>, ServerCallContext)

public virtual Task StreamSanitizeModelResponse(IAsyncStreamReader<SanitizeModelResponseRequest> requestStream, IServerStreamWriter<SanitizeModelResponseResponse> responseStream, ServerCallContext context)

Streaming version of Sanitizes Model Response.

Parameters
Name Description
requestStream IAsyncStreamReaderSanitizeModelResponseRequest

Used for reading requests from the client.

responseStream IServerStreamWriterSanitizeModelResponseResponse

Used for sending responses back to the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
Task

A task indicating completion of the handler.

StreamSanitizeUserPrompt(IAsyncStreamReader<SanitizeUserPromptRequest>, IServerStreamWriter<SanitizeUserPromptResponse>, ServerCallContext)

public virtual Task StreamSanitizeUserPrompt(IAsyncStreamReader<SanitizeUserPromptRequest> requestStream, IServerStreamWriter<SanitizeUserPromptResponse> responseStream, ServerCallContext context)

Streaming version of Sanitize User Prompt.

Parameters
Name Description
requestStream IAsyncStreamReaderSanitizeUserPromptRequest

Used for reading requests from the client.

responseStream IServerStreamWriterSanitizeUserPromptResponse

Used for sending responses back to the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
Task

A task indicating completion of the handler.

UpdateFloorSetting(UpdateFloorSettingRequest, ServerCallContext)

public virtual Task<FloorSetting> UpdateFloorSetting(UpdateFloorSettingRequest request, ServerCallContext context)

Updates the parameters of a single floor setting of a project

Parameters
Name Description
request UpdateFloorSettingRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskFloorSetting

The response to send back to the client (wrapped by a task).

UpdateTemplate(UpdateTemplateRequest, ServerCallContext)

public virtual Task<Template> UpdateTemplate(UpdateTemplateRequest request, ServerCallContext context)

Updates the parameters of a single Template.

Parameters
Name Description
request UpdateTemplateRequest

The request received from the client.

context ServerCallContext

The context of the server-side call handler being invoked.

Returns
Type Description
TaskTemplate

The response to send back to the client (wrapped by a task).