Class AccessApproval.AccessApprovalClient (1.1.0)

public class AccessApprovalClient : ClientBase<AccessApproval.AccessApprovalClient>

Client for AccessApproval

Inheritance

Object > ClientBase > ClientBase<AccessApproval.AccessApprovalClient> > AccessApproval.AccessApprovalClient

Namespace

Google.Cloud.AccessApproval.V1

Assembly

Google.Cloud.AccessApproval.V1.dll

Constructors

AccessApprovalClient()

protected AccessApprovalClient()

Protected parameterless constructor to allow creation of test doubles.

AccessApprovalClient(CallInvoker)

public AccessApprovalClient(CallInvoker callInvoker)

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

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

AccessApprovalClient(ChannelBase)

public AccessApprovalClient(ChannelBase channel)

Creates a new client for AccessApproval

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

AccessApprovalClient(ClientBase.ClientBaseConfiguration)

protected AccessApprovalClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration

The client configuration.

Methods

ApproveApprovalRequest(ApproveApprovalRequestMessage, CallOptions)

public virtual ApprovalRequest ApproveApprovalRequest(ApproveApprovalRequestMessage request, CallOptions options)

Approves a request and returns the updated ApprovalRequest.

Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.

Parameters
NameDescription
requestApproveApprovalRequestMessage

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ApprovalRequest

The response received from the server.

ApproveApprovalRequest(ApproveApprovalRequestMessage, Metadata, Nullable<DateTime>, CancellationToken)

public virtual ApprovalRequest ApproveApprovalRequest(ApproveApprovalRequestMessage request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Approves a request and returns the updated ApprovalRequest.

Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.

Parameters
NameDescription
requestApproveApprovalRequestMessage

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ApprovalRequest

The response received from the server.

ApproveApprovalRequestAsync(ApproveApprovalRequestMessage, CallOptions)

public virtual AsyncUnaryCall<ApprovalRequest> ApproveApprovalRequestAsync(ApproveApprovalRequestMessage request, CallOptions options)

Approves a request and returns the updated ApprovalRequest.

Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.

Parameters
NameDescription
requestApproveApprovalRequestMessage

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<ApprovalRequest>

The call object.

ApproveApprovalRequestAsync(ApproveApprovalRequestMessage, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<ApprovalRequest> ApproveApprovalRequestAsync(ApproveApprovalRequestMessage request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Approves a request and returns the updated ApprovalRequest.

Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.

Parameters
NameDescription
requestApproveApprovalRequestMessage

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<ApprovalRequest>

The call object.

DeleteAccessApprovalSettings(DeleteAccessApprovalSettingsMessage, CallOptions)

public virtual Empty DeleteAccessApprovalSettings(DeleteAccessApprovalSettingsMessage request, CallOptions options)

Deletes the settings associated with a project, folder, or organization. This will have the effect of disabling Access Approval for the project, folder, or organization, but only if all ancestors also have Access Approval disabled. If Access Approval is enabled at a higher level of the hierarchy, then Access Approval will still be enabled at this level as the settings are inherited.

Parameters
NameDescription
requestDeleteAccessApprovalSettingsMessage

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteAccessApprovalSettings(DeleteAccessApprovalSettingsMessage, Metadata, Nullable<DateTime>, CancellationToken)

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

Deletes the settings associated with a project, folder, or organization. This will have the effect of disabling Access Approval for the project, folder, or organization, but only if all ancestors also have Access Approval disabled. If Access Approval is enabled at a higher level of the hierarchy, then Access Approval will still be enabled at this level as the settings are inherited.

Parameters
NameDescription
requestDeleteAccessApprovalSettingsMessage

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteAccessApprovalSettingsAsync(DeleteAccessApprovalSettingsMessage, CallOptions)

public virtual AsyncUnaryCall<Empty> DeleteAccessApprovalSettingsAsync(DeleteAccessApprovalSettingsMessage request, CallOptions options)

Deletes the settings associated with a project, folder, or organization. This will have the effect of disabling Access Approval for the project, folder, or organization, but only if all ancestors also have Access Approval disabled. If Access Approval is enabled at a higher level of the hierarchy, then Access Approval will still be enabled at this level as the settings are inherited.

Parameters
NameDescription
requestDeleteAccessApprovalSettingsMessage

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Empty>

The call object.

DeleteAccessApprovalSettingsAsync(DeleteAccessApprovalSettingsMessage, Metadata, Nullable<DateTime>, CancellationToken)

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

Deletes the settings associated with a project, folder, or organization. This will have the effect of disabling Access Approval for the project, folder, or organization, but only if all ancestors also have Access Approval disabled. If Access Approval is enabled at a higher level of the hierarchy, then Access Approval will still be enabled at this level as the settings are inherited.

Parameters
NameDescription
requestDeleteAccessApprovalSettingsMessage

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Empty>

The call object.

DismissApprovalRequest(DismissApprovalRequestMessage, CallOptions)

public virtual ApprovalRequest DismissApprovalRequest(DismissApprovalRequestMessage request, CallOptions options)

Dismisses a request. Returns the updated ApprovalRequest.

NOTE: This does not deny access to the resource if another request has been made and approved. It is equivalent in effect to ignoring the request altogether.

Returns NOT_FOUND if the request does not exist.

Returns FAILED_PRECONDITION if the request exists but is not in a pending state.

Parameters
NameDescription
requestDismissApprovalRequestMessage

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ApprovalRequest

The response received from the server.

DismissApprovalRequest(DismissApprovalRequestMessage, Metadata, Nullable<DateTime>, CancellationToken)

public virtual ApprovalRequest DismissApprovalRequest(DismissApprovalRequestMessage request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Dismisses a request. Returns the updated ApprovalRequest.

NOTE: This does not deny access to the resource if another request has been made and approved. It is equivalent in effect to ignoring the request altogether.

Returns NOT_FOUND if the request does not exist.

Returns FAILED_PRECONDITION if the request exists but is not in a pending state.

Parameters
NameDescription
requestDismissApprovalRequestMessage

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ApprovalRequest

The response received from the server.

DismissApprovalRequestAsync(DismissApprovalRequestMessage, CallOptions)

public virtual AsyncUnaryCall<ApprovalRequest> DismissApprovalRequestAsync(DismissApprovalRequestMessage request, CallOptions options)

Dismisses a request. Returns the updated ApprovalRequest.

NOTE: This does not deny access to the resource if another request has been made and approved. It is equivalent in effect to ignoring the request altogether.

Returns NOT_FOUND if the request does not exist.

Returns FAILED_PRECONDITION if the request exists but is not in a pending state.

Parameters
NameDescription
requestDismissApprovalRequestMessage

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<ApprovalRequest>

The call object.

DismissApprovalRequestAsync(DismissApprovalRequestMessage, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<ApprovalRequest> DismissApprovalRequestAsync(DismissApprovalRequestMessage request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Dismisses a request. Returns the updated ApprovalRequest.

NOTE: This does not deny access to the resource if another request has been made and approved. It is equivalent in effect to ignoring the request altogether.

Returns NOT_FOUND if the request does not exist.

Returns FAILED_PRECONDITION if the request exists but is not in a pending state.

Parameters
NameDescription
requestDismissApprovalRequestMessage

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<ApprovalRequest>

The call object.

GetAccessApprovalSettings(GetAccessApprovalSettingsMessage, CallOptions)

public virtual AccessApprovalSettings GetAccessApprovalSettings(GetAccessApprovalSettingsMessage request, CallOptions options)

Gets the settings associated with a project, folder, or organization.

Parameters
NameDescription
requestGetAccessApprovalSettingsMessage

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AccessApprovalSettings

The response received from the server.

GetAccessApprovalSettings(GetAccessApprovalSettingsMessage, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AccessApprovalSettings GetAccessApprovalSettings(GetAccessApprovalSettingsMessage request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Gets the settings associated with a project, folder, or organization.

Parameters
NameDescription
requestGetAccessApprovalSettingsMessage

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AccessApprovalSettings

The response received from the server.

GetAccessApprovalSettingsAsync(GetAccessApprovalSettingsMessage, CallOptions)

public virtual AsyncUnaryCall<AccessApprovalSettings> GetAccessApprovalSettingsAsync(GetAccessApprovalSettingsMessage request, CallOptions options)

Gets the settings associated with a project, folder, or organization.

Parameters
NameDescription
requestGetAccessApprovalSettingsMessage

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<AccessApprovalSettings>

The call object.

GetAccessApprovalSettingsAsync(GetAccessApprovalSettingsMessage, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<AccessApprovalSettings> GetAccessApprovalSettingsAsync(GetAccessApprovalSettingsMessage request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Gets the settings associated with a project, folder, or organization.

Parameters
NameDescription
requestGetAccessApprovalSettingsMessage

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<AccessApprovalSettings>

The call object.

GetApprovalRequest(GetApprovalRequestMessage, CallOptions)

public virtual ApprovalRequest GetApprovalRequest(GetApprovalRequestMessage request, CallOptions options)

Gets an approval request. Returns NOT_FOUND if the request does not exist.

Parameters
NameDescription
requestGetApprovalRequestMessage

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ApprovalRequest

The response received from the server.

GetApprovalRequest(GetApprovalRequestMessage, Metadata, Nullable<DateTime>, CancellationToken)

public virtual ApprovalRequest GetApprovalRequest(GetApprovalRequestMessage request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Gets an approval request. Returns NOT_FOUND if the request does not exist.

Parameters
NameDescription
requestGetApprovalRequestMessage

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ApprovalRequest

The response received from the server.

GetApprovalRequestAsync(GetApprovalRequestMessage, CallOptions)

public virtual AsyncUnaryCall<ApprovalRequest> GetApprovalRequestAsync(GetApprovalRequestMessage request, CallOptions options)

Gets an approval request. Returns NOT_FOUND if the request does not exist.

Parameters
NameDescription
requestGetApprovalRequestMessage

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<ApprovalRequest>

The call object.

GetApprovalRequestAsync(GetApprovalRequestMessage, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<ApprovalRequest> GetApprovalRequestAsync(GetApprovalRequestMessage request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Gets an approval request. Returns NOT_FOUND if the request does not exist.

Parameters
NameDescription
requestGetApprovalRequestMessage

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<ApprovalRequest>

The call object.

ListApprovalRequests(ListApprovalRequestsMessage, CallOptions)

public virtual ListApprovalRequestsResponse ListApprovalRequests(ListApprovalRequestsMessage request, CallOptions options)

Lists approval requests associated with a project, folder, or organization. Approval requests can be filtered by state (pending, active, dismissed). The order is reverse chronological.

Parameters
NameDescription
requestListApprovalRequestsMessage

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListApprovalRequestsResponse

The response received from the server.

ListApprovalRequests(ListApprovalRequestsMessage, Metadata, Nullable<DateTime>, CancellationToken)

public virtual ListApprovalRequestsResponse ListApprovalRequests(ListApprovalRequestsMessage request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Lists approval requests associated with a project, folder, or organization. Approval requests can be filtered by state (pending, active, dismissed). The order is reverse chronological.

Parameters
NameDescription
requestListApprovalRequestsMessage

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ListApprovalRequestsResponse

The response received from the server.

ListApprovalRequestsAsync(ListApprovalRequestsMessage, CallOptions)

public virtual AsyncUnaryCall<ListApprovalRequestsResponse> ListApprovalRequestsAsync(ListApprovalRequestsMessage request, CallOptions options)

Lists approval requests associated with a project, folder, or organization. Approval requests can be filtered by state (pending, active, dismissed). The order is reverse chronological.

Parameters
NameDescription
requestListApprovalRequestsMessage

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<ListApprovalRequestsResponse>

The call object.

ListApprovalRequestsAsync(ListApprovalRequestsMessage, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<ListApprovalRequestsResponse> ListApprovalRequestsAsync(ListApprovalRequestsMessage request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Lists approval requests associated with a project, folder, or organization. Approval requests can be filtered by state (pending, active, dismissed). The order is reverse chronological.

Parameters
NameDescription
requestListApprovalRequestsMessage

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<ListApprovalRequestsResponse>

The call object.

NewInstance(ClientBase.ClientBaseConfiguration)

protected override AccessApproval.AccessApprovalClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration
Returns
TypeDescription
AccessApproval.AccessApprovalClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.AccessApproval.V1.AccessApproval.AccessApprovalClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

UpdateAccessApprovalSettings(UpdateAccessApprovalSettingsMessage, CallOptions)

public virtual AccessApprovalSettings UpdateAccessApprovalSettings(UpdateAccessApprovalSettingsMessage request, CallOptions options)

Updates the settings associated with a project, folder, or organization. Settings to update are determined by the value of field_mask.

Parameters
NameDescription
requestUpdateAccessApprovalSettingsMessage

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AccessApprovalSettings

The response received from the server.

UpdateAccessApprovalSettings(UpdateAccessApprovalSettingsMessage, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AccessApprovalSettings UpdateAccessApprovalSettings(UpdateAccessApprovalSettingsMessage request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Updates the settings associated with a project, folder, or organization. Settings to update are determined by the value of field_mask.

Parameters
NameDescription
requestUpdateAccessApprovalSettingsMessage

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AccessApprovalSettings

The response received from the server.

UpdateAccessApprovalSettingsAsync(UpdateAccessApprovalSettingsMessage, CallOptions)

public virtual AsyncUnaryCall<AccessApprovalSettings> UpdateAccessApprovalSettingsAsync(UpdateAccessApprovalSettingsMessage request, CallOptions options)

Updates the settings associated with a project, folder, or organization. Settings to update are determined by the value of field_mask.

Parameters
NameDescription
requestUpdateAccessApprovalSettingsMessage

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<AccessApprovalSettings>

The call object.

UpdateAccessApprovalSettingsAsync(UpdateAccessApprovalSettingsMessage, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<AccessApprovalSettings> UpdateAccessApprovalSettingsAsync(UpdateAccessApprovalSettingsMessage request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Updates the settings associated with a project, folder, or organization. Settings to update are determined by the value of field_mask.

Parameters
NameDescription
requestUpdateAccessApprovalSettingsMessage

The request to send to the server.

headersMetadata

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

deadlineNullable<DateTime>

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

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<AccessApprovalSettings>

The call object.