Model Armor v1beta API - Class ModelArmor.ModelArmorClient (1.0.0-beta01)

public class ModelArmor.ModelArmorClient : ClientBase<ModelArmor.ModelArmorClient>

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

Client for ModelArmor

Inheritance

object > ClientBase > ClientBaseModelArmorModelArmorClient > ModelArmor.ModelArmorClient

Namespace

Google.Cloud.ModelArmor.V1Beta

Assembly

Google.Cloud.ModelArmor.V1Beta.dll

Constructors

ModelArmorClient()

protected ModelArmorClient()

Protected parameterless constructor to allow creation of test doubles.

ModelArmorClient(CallInvoker)

public ModelArmorClient(CallInvoker callInvoker)

Creates a new client for ModelArmor that uses a custom CallInvoker.

Parameter
Name Description
callInvoker CallInvoker

The callInvoker to use to make remote calls.

ModelArmorClient(ChannelBase)

public ModelArmorClient(ChannelBase channel)

Creates a new client for ModelArmor

Parameter
Name Description
channel ChannelBase

The channel to use to make remote calls.

ModelArmorClient(ClientBaseConfiguration)

protected ModelArmorClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration

The client configuration.

Methods

CreateLocationsClient()

public virtual Locations.LocationsClient CreateLocationsClient()

Creates a new instance of Locations.LocationsClient using the same call invoker as this client.

Returns
Type Description
LocationsLocationsClient

A new Locations.LocationsClient for the same target as this client.

CreateTemplate(CreateTemplateRequest, CallOptions)

public virtual Template CreateTemplate(CreateTemplateRequest request, CallOptions options)

Creates a new Template in a given project and location.

Parameters
Name Description
request CreateTemplateRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Template

The response received from the server.

CreateTemplate(CreateTemplateRequest, Metadata, DateTime?, CancellationToken)

public virtual Template CreateTemplate(CreateTemplateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a new Template in a given project and location.

Parameters
Name Description
request CreateTemplateRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Template

The response received from the server.

CreateTemplateAsync(CreateTemplateRequest, CallOptions)

public virtual AsyncUnaryCall<Template> CreateTemplateAsync(CreateTemplateRequest request, CallOptions options)

Creates a new Template in a given project and location.

Parameters
Name Description
request CreateTemplateRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallTemplate

The call object.

CreateTemplateAsync(CreateTemplateRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Template> CreateTemplateAsync(CreateTemplateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a new Template in a given project and location.

Parameters
Name Description
request CreateTemplateRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallTemplate

The call object.

DeleteTemplate(DeleteTemplateRequest, CallOptions)

public virtual Empty DeleteTemplate(DeleteTemplateRequest request, CallOptions options)

Deletes a single Template.

Parameters
Name Description
request DeleteTemplateRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Empty

The response received from the server.

DeleteTemplate(DeleteTemplateRequest, Metadata, DateTime?, CancellationToken)

public virtual Empty DeleteTemplate(DeleteTemplateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a single Template.

Parameters
Name Description
request DeleteTemplateRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Empty

The response received from the server.

DeleteTemplateAsync(DeleteTemplateRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DeleteTemplateAsync(DeleteTemplateRequest request, CallOptions options)

Deletes a single Template.

Parameters
Name Description
request DeleteTemplateRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallEmpty

The call object.

DeleteTemplateAsync(DeleteTemplateRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Empty> DeleteTemplateAsync(DeleteTemplateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a single Template.

Parameters
Name Description
request DeleteTemplateRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallEmpty

The call object.

GetFloorSetting(GetFloorSettingRequest, CallOptions)

public virtual FloorSetting GetFloorSetting(GetFloorSettingRequest request, CallOptions options)

Gets details of a single floor setting of a project

Parameters
Name Description
request GetFloorSettingRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
FloorSetting

The response received from the server.

GetFloorSetting(GetFloorSettingRequest, Metadata, DateTime?, CancellationToken)

public virtual FloorSetting GetFloorSetting(GetFloorSettingRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets details of a single floor setting of a project

Parameters
Name Description
request GetFloorSettingRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
FloorSetting

The response received from the server.

GetFloorSettingAsync(GetFloorSettingRequest, CallOptions)

public virtual AsyncUnaryCall<FloorSetting> GetFloorSettingAsync(GetFloorSettingRequest request, CallOptions options)

Gets details of a single floor setting of a project

Parameters
Name Description
request GetFloorSettingRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallFloorSetting

The call object.

GetFloorSettingAsync(GetFloorSettingRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<FloorSetting> GetFloorSettingAsync(GetFloorSettingRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets details of a single floor setting of a project

Parameters
Name Description
request GetFloorSettingRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallFloorSetting

The call object.

GetTemplate(GetTemplateRequest, CallOptions)

public virtual Template GetTemplate(GetTemplateRequest request, CallOptions options)

Gets details of a single Template.

Parameters
Name Description
request GetTemplateRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Template

The response received from the server.

GetTemplate(GetTemplateRequest, Metadata, DateTime?, CancellationToken)

public virtual Template GetTemplate(GetTemplateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets details of a single Template.

Parameters
Name Description
request GetTemplateRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Template

The response received from the server.

GetTemplateAsync(GetTemplateRequest, CallOptions)

public virtual AsyncUnaryCall<Template> GetTemplateAsync(GetTemplateRequest request, CallOptions options)

Gets details of a single Template.

Parameters
Name Description
request GetTemplateRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallTemplate

The call object.

GetTemplateAsync(GetTemplateRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Template> GetTemplateAsync(GetTemplateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets details of a single Template.

Parameters
Name Description
request GetTemplateRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallTemplate

The call object.

ListTemplates(ListTemplatesRequest, CallOptions)

public virtual ListTemplatesResponse ListTemplates(ListTemplatesRequest request, CallOptions options)

Lists Templates in a given project and location.

Parameters
Name Description
request ListTemplatesRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ListTemplatesResponse

The response received from the server.

ListTemplates(ListTemplatesRequest, Metadata, DateTime?, CancellationToken)

public virtual ListTemplatesResponse ListTemplates(ListTemplatesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists Templates in a given project and location.

Parameters
Name Description
request ListTemplatesRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
ListTemplatesResponse

The response received from the server.

ListTemplatesAsync(ListTemplatesRequest, CallOptions)

public virtual AsyncUnaryCall<ListTemplatesResponse> ListTemplatesAsync(ListTemplatesRequest request, CallOptions options)

Lists Templates in a given project and location.

Parameters
Name Description
request ListTemplatesRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallListTemplatesResponse

The call object.

ListTemplatesAsync(ListTemplatesRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListTemplatesResponse> ListTemplatesAsync(ListTemplatesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists Templates in a given project and location.

Parameters
Name Description
request ListTemplatesRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallListTemplatesResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override ModelArmor.ModelArmorClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration
Returns
Type Description
ModelArmorModelArmorClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.ModelArmor.V1Beta.ModelArmor.ModelArmorClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

SanitizeModelResponse(SanitizeModelResponseRequest, CallOptions)

public virtual SanitizeModelResponseResponse SanitizeModelResponse(SanitizeModelResponseRequest request, CallOptions options)

Sanitizes Model Response.

Parameters
Name Description
request SanitizeModelResponseRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
SanitizeModelResponseResponse

The response received from the server.

SanitizeModelResponse(SanitizeModelResponseRequest, Metadata, DateTime?, CancellationToken)

public virtual SanitizeModelResponseResponse SanitizeModelResponse(SanitizeModelResponseRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Sanitizes Model Response.

Parameters
Name Description
request SanitizeModelResponseRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
SanitizeModelResponseResponse

The response received from the server.

SanitizeModelResponseAsync(SanitizeModelResponseRequest, CallOptions)

public virtual AsyncUnaryCall<SanitizeModelResponseResponse> SanitizeModelResponseAsync(SanitizeModelResponseRequest request, CallOptions options)

Sanitizes Model Response.

Parameters
Name Description
request SanitizeModelResponseRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallSanitizeModelResponseResponse

The call object.

SanitizeModelResponseAsync(SanitizeModelResponseRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<SanitizeModelResponseResponse> SanitizeModelResponseAsync(SanitizeModelResponseRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Sanitizes Model Response.

Parameters
Name Description
request SanitizeModelResponseRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallSanitizeModelResponseResponse

The call object.

SanitizeUserPrompt(SanitizeUserPromptRequest, CallOptions)

public virtual SanitizeUserPromptResponse SanitizeUserPrompt(SanitizeUserPromptRequest request, CallOptions options)

Sanitizes User Prompt.

Parameters
Name Description
request SanitizeUserPromptRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
SanitizeUserPromptResponse

The response received from the server.

SanitizeUserPrompt(SanitizeUserPromptRequest, Metadata, DateTime?, CancellationToken)

public virtual SanitizeUserPromptResponse SanitizeUserPrompt(SanitizeUserPromptRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Sanitizes User Prompt.

Parameters
Name Description
request SanitizeUserPromptRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
SanitizeUserPromptResponse

The response received from the server.

SanitizeUserPromptAsync(SanitizeUserPromptRequest, CallOptions)

public virtual AsyncUnaryCall<SanitizeUserPromptResponse> SanitizeUserPromptAsync(SanitizeUserPromptRequest request, CallOptions options)

Sanitizes User Prompt.

Parameters
Name Description
request SanitizeUserPromptRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallSanitizeUserPromptResponse

The call object.

SanitizeUserPromptAsync(SanitizeUserPromptRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<SanitizeUserPromptResponse> SanitizeUserPromptAsync(SanitizeUserPromptRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Sanitizes User Prompt.

Parameters
Name Description
request SanitizeUserPromptRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallSanitizeUserPromptResponse

The call object.

UpdateFloorSetting(UpdateFloorSettingRequest, CallOptions)

public virtual FloorSetting UpdateFloorSetting(UpdateFloorSettingRequest request, CallOptions options)

Updates the parameters of a single floor setting of a project

Parameters
Name Description
request UpdateFloorSettingRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
FloorSetting

The response received from the server.

UpdateFloorSetting(UpdateFloorSettingRequest, Metadata, DateTime?, CancellationToken)

public virtual FloorSetting UpdateFloorSetting(UpdateFloorSettingRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates the parameters of a single floor setting of a project

Parameters
Name Description
request UpdateFloorSettingRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
FloorSetting

The response received from the server.

UpdateFloorSettingAsync(UpdateFloorSettingRequest, CallOptions)

public virtual AsyncUnaryCall<FloorSetting> UpdateFloorSettingAsync(UpdateFloorSettingRequest request, CallOptions options)

Updates the parameters of a single floor setting of a project

Parameters
Name Description
request UpdateFloorSettingRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallFloorSetting

The call object.

UpdateFloorSettingAsync(UpdateFloorSettingRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<FloorSetting> UpdateFloorSettingAsync(UpdateFloorSettingRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates the parameters of a single floor setting of a project

Parameters
Name Description
request UpdateFloorSettingRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallFloorSetting

The call object.

UpdateTemplate(UpdateTemplateRequest, CallOptions)

public virtual Template UpdateTemplate(UpdateTemplateRequest request, CallOptions options)

Updates the parameters of a single Template.

Parameters
Name Description
request UpdateTemplateRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Template

The response received from the server.

UpdateTemplate(UpdateTemplateRequest, Metadata, DateTime?, CancellationToken)

public virtual Template UpdateTemplate(UpdateTemplateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates the parameters of a single Template.

Parameters
Name Description
request UpdateTemplateRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Template

The response received from the server.

UpdateTemplateAsync(UpdateTemplateRequest, CallOptions)

public virtual AsyncUnaryCall<Template> UpdateTemplateAsync(UpdateTemplateRequest request, CallOptions options)

Updates the parameters of a single Template.

Parameters
Name Description
request UpdateTemplateRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallTemplate

The call object.

UpdateTemplateAsync(UpdateTemplateRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Template> UpdateTemplateAsync(UpdateTemplateRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates the parameters of a single Template.

Parameters
Name Description
request UpdateTemplateRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallTemplate

The call object.