public abstract class RecaptchaEnterpriseServiceClient
Reference documentation and code samples for the Google Cloud reCAPTCHA Enterprise v1 API class RecaptchaEnterpriseServiceClient.
RecaptchaEnterpriseService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.RecaptchaEnterprise.V1Assembly
Google.Cloud.RecaptchaEnterprise.V1.dll
Remarks
Service to determine the likelihood an event is legitimate.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the RecaptchaEnterpriseService service, which is a host of "recaptchaenterprise.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default RecaptchaEnterpriseService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default RecaptchaEnterpriseService scopes are:
GrpcClient
public virtual RecaptchaEnterpriseService.RecaptchaEnterpriseServiceClient GrpcClient { get; }
The underlying gRPC RecaptchaEnterpriseService client
Property Value | |
---|---|
Type | Description |
RecaptchaEnterpriseService.RecaptchaEnterpriseServiceClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
Methods
AnnotateAssessment(AnnotateAssessmentRequest, CallSettings)
public virtual AnnotateAssessmentResponse AnnotateAssessment(AnnotateAssessmentRequest request, CallSettings callSettings = null)
Annotates a previously created Assessment to provide additional information on whether the event turned out to be authentic or fraudulent.
Parameters | |
---|---|
Name | Description |
request | AnnotateAssessmentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AnnotateAssessmentResponse | The RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
AnnotateAssessmentRequest request = new AnnotateAssessmentRequest
{
AssessmentName = AssessmentName.FromProjectAssessment("[PROJECT]", "[ASSESSMENT]"),
Annotation = AnnotateAssessmentRequest.Types.Annotation.Unspecified,
Reasons =
{
AnnotateAssessmentRequest.Types.Reason.Unspecified,
},
HashedAccountId = ByteString.Empty,
};
// Make the request
AnnotateAssessmentResponse response = recaptchaEnterpriseServiceClient.AnnotateAssessment(request);
AnnotateAssessment(AssessmentName, AnnotateAssessmentRequest.Types.Annotation, CallSettings)
public virtual AnnotateAssessmentResponse AnnotateAssessment(AssessmentName name, AnnotateAssessmentRequest.Types.Annotation annotation, CallSettings callSettings = null)
Annotates a previously created Assessment to provide additional information on whether the event turned out to be authentic or fraudulent.
Parameters | |
---|---|
Name | Description |
name | AssessmentName Required. The resource name of the Assessment, in the format "projects/{project}/assessments/{assessment}". |
annotation | AnnotateAssessmentRequest.Types.Annotation Optional. The annotation that will be assigned to the Event. This field can be left empty to provide reasons that apply to an event without concluding whether the event is legitimate or fraudulent. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AnnotateAssessmentResponse | The RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
AssessmentName name = AssessmentName.FromProjectAssessment("[PROJECT]", "[ASSESSMENT]");
AnnotateAssessmentRequest.Types.Annotation annotation = AnnotateAssessmentRequest.Types.Annotation.Unspecified;
// Make the request
AnnotateAssessmentResponse response = recaptchaEnterpriseServiceClient.AnnotateAssessment(name, annotation);
AnnotateAssessment(String, AnnotateAssessmentRequest.Types.Annotation, CallSettings)
public virtual AnnotateAssessmentResponse AnnotateAssessment(string name, AnnotateAssessmentRequest.Types.Annotation annotation, CallSettings callSettings = null)
Annotates a previously created Assessment to provide additional information on whether the event turned out to be authentic or fraudulent.
Parameters | |
---|---|
Name | Description |
name | String Required. The resource name of the Assessment, in the format "projects/{project}/assessments/{assessment}". |
annotation | AnnotateAssessmentRequest.Types.Annotation Optional. The annotation that will be assigned to the Event. This field can be left empty to provide reasons that apply to an event without concluding whether the event is legitimate or fraudulent. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AnnotateAssessmentResponse | The RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/assessments/[ASSESSMENT]";
AnnotateAssessmentRequest.Types.Annotation annotation = AnnotateAssessmentRequest.Types.Annotation.Unspecified;
// Make the request
AnnotateAssessmentResponse response = recaptchaEnterpriseServiceClient.AnnotateAssessment(name, annotation);
AnnotateAssessmentAsync(AnnotateAssessmentRequest, CallSettings)
public virtual Task<AnnotateAssessmentResponse> AnnotateAssessmentAsync(AnnotateAssessmentRequest request, CallSettings callSettings = null)
Annotates a previously created Assessment to provide additional information on whether the event turned out to be authentic or fraudulent.
Parameters | |
---|---|
Name | Description |
request | AnnotateAssessmentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<AnnotateAssessmentResponse> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
AnnotateAssessmentRequest request = new AnnotateAssessmentRequest
{
AssessmentName = AssessmentName.FromProjectAssessment("[PROJECT]", "[ASSESSMENT]"),
Annotation = AnnotateAssessmentRequest.Types.Annotation.Unspecified,
Reasons =
{
AnnotateAssessmentRequest.Types.Reason.Unspecified,
},
HashedAccountId = ByteString.Empty,
};
// Make the request
AnnotateAssessmentResponse response = await recaptchaEnterpriseServiceClient.AnnotateAssessmentAsync(request);
AnnotateAssessmentAsync(AnnotateAssessmentRequest, CancellationToken)
public virtual Task<AnnotateAssessmentResponse> AnnotateAssessmentAsync(AnnotateAssessmentRequest request, CancellationToken cancellationToken)
Annotates a previously created Assessment to provide additional information on whether the event turned out to be authentic or fraudulent.
Parameters | |
---|---|
Name | Description |
request | AnnotateAssessmentRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<AnnotateAssessmentResponse> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
AnnotateAssessmentRequest request = new AnnotateAssessmentRequest
{
AssessmentName = AssessmentName.FromProjectAssessment("[PROJECT]", "[ASSESSMENT]"),
Annotation = AnnotateAssessmentRequest.Types.Annotation.Unspecified,
Reasons =
{
AnnotateAssessmentRequest.Types.Reason.Unspecified,
},
HashedAccountId = ByteString.Empty,
};
// Make the request
AnnotateAssessmentResponse response = await recaptchaEnterpriseServiceClient.AnnotateAssessmentAsync(request);
AnnotateAssessmentAsync(AssessmentName, AnnotateAssessmentRequest.Types.Annotation, CallSettings)
public virtual Task<AnnotateAssessmentResponse> AnnotateAssessmentAsync(AssessmentName name, AnnotateAssessmentRequest.Types.Annotation annotation, CallSettings callSettings = null)
Annotates a previously created Assessment to provide additional information on whether the event turned out to be authentic or fraudulent.
Parameters | |
---|---|
Name | Description |
name | AssessmentName Required. The resource name of the Assessment, in the format "projects/{project}/assessments/{assessment}". |
annotation | AnnotateAssessmentRequest.Types.Annotation Optional. The annotation that will be assigned to the Event. This field can be left empty to provide reasons that apply to an event without concluding whether the event is legitimate or fraudulent. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<AnnotateAssessmentResponse> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
AssessmentName name = AssessmentName.FromProjectAssessment("[PROJECT]", "[ASSESSMENT]");
AnnotateAssessmentRequest.Types.Annotation annotation = AnnotateAssessmentRequest.Types.Annotation.Unspecified;
// Make the request
AnnotateAssessmentResponse response = await recaptchaEnterpriseServiceClient.AnnotateAssessmentAsync(name, annotation);
AnnotateAssessmentAsync(AssessmentName, AnnotateAssessmentRequest.Types.Annotation, CancellationToken)
public virtual Task<AnnotateAssessmentResponse> AnnotateAssessmentAsync(AssessmentName name, AnnotateAssessmentRequest.Types.Annotation annotation, CancellationToken cancellationToken)
Annotates a previously created Assessment to provide additional information on whether the event turned out to be authentic or fraudulent.
Parameters | |
---|---|
Name | Description |
name | AssessmentName Required. The resource name of the Assessment, in the format "projects/{project}/assessments/{assessment}". |
annotation | AnnotateAssessmentRequest.Types.Annotation Optional. The annotation that will be assigned to the Event. This field can be left empty to provide reasons that apply to an event without concluding whether the event is legitimate or fraudulent. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<AnnotateAssessmentResponse> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
AssessmentName name = AssessmentName.FromProjectAssessment("[PROJECT]", "[ASSESSMENT]");
AnnotateAssessmentRequest.Types.Annotation annotation = AnnotateAssessmentRequest.Types.Annotation.Unspecified;
// Make the request
AnnotateAssessmentResponse response = await recaptchaEnterpriseServiceClient.AnnotateAssessmentAsync(name, annotation);
AnnotateAssessmentAsync(String, AnnotateAssessmentRequest.Types.Annotation, CallSettings)
public virtual Task<AnnotateAssessmentResponse> AnnotateAssessmentAsync(string name, AnnotateAssessmentRequest.Types.Annotation annotation, CallSettings callSettings = null)
Annotates a previously created Assessment to provide additional information on whether the event turned out to be authentic or fraudulent.
Parameters | |
---|---|
Name | Description |
name | String Required. The resource name of the Assessment, in the format "projects/{project}/assessments/{assessment}". |
annotation | AnnotateAssessmentRequest.Types.Annotation Optional. The annotation that will be assigned to the Event. This field can be left empty to provide reasons that apply to an event without concluding whether the event is legitimate or fraudulent. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<AnnotateAssessmentResponse> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/assessments/[ASSESSMENT]";
AnnotateAssessmentRequest.Types.Annotation annotation = AnnotateAssessmentRequest.Types.Annotation.Unspecified;
// Make the request
AnnotateAssessmentResponse response = await recaptchaEnterpriseServiceClient.AnnotateAssessmentAsync(name, annotation);
AnnotateAssessmentAsync(String, AnnotateAssessmentRequest.Types.Annotation, CancellationToken)
public virtual Task<AnnotateAssessmentResponse> AnnotateAssessmentAsync(string name, AnnotateAssessmentRequest.Types.Annotation annotation, CancellationToken cancellationToken)
Annotates a previously created Assessment to provide additional information on whether the event turned out to be authentic or fraudulent.
Parameters | |
---|---|
Name | Description |
name | String Required. The resource name of the Assessment, in the format "projects/{project}/assessments/{assessment}". |
annotation | AnnotateAssessmentRequest.Types.Annotation Optional. The annotation that will be assigned to the Event. This field can be left empty to provide reasons that apply to an event without concluding whether the event is legitimate or fraudulent. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<AnnotateAssessmentResponse> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/assessments/[ASSESSMENT]";
AnnotateAssessmentRequest.Types.Annotation annotation = AnnotateAssessmentRequest.Types.Annotation.Unspecified;
// Make the request
AnnotateAssessmentResponse response = await recaptchaEnterpriseServiceClient.AnnotateAssessmentAsync(name, annotation);
Create()
public static RecaptchaEnterpriseServiceClient Create()
Synchronously creates a RecaptchaEnterpriseServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use RecaptchaEnterpriseServiceClientBuilder.
Returns | |
---|---|
Type | Description |
RecaptchaEnterpriseServiceClient | The created RecaptchaEnterpriseServiceClient. |
CreateAssessment(ProjectName, Assessment, CallSettings)
public virtual Assessment CreateAssessment(ProjectName parent, Assessment assessment, CallSettings callSettings = null)
Creates an Assessment of the likelihood an event is legitimate.
Parameters | |
---|---|
Name | Description |
parent | ProjectName Required. The name of the project in which the assessment will be created, in the format "projects/{project}". |
assessment | Assessment Required. The assessment details. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Assessment | The RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
Assessment assessment = new Assessment();
// Make the request
Assessment response = recaptchaEnterpriseServiceClient.CreateAssessment(parent, assessment);
CreateAssessment(CreateAssessmentRequest, CallSettings)
public virtual Assessment CreateAssessment(CreateAssessmentRequest request, CallSettings callSettings = null)
Creates an Assessment of the likelihood an event is legitimate.
Parameters | |
---|---|
Name | Description |
request | CreateAssessmentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Assessment | The RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
CreateAssessmentRequest request = new CreateAssessmentRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Assessment = new Assessment(),
};
// Make the request
Assessment response = recaptchaEnterpriseServiceClient.CreateAssessment(request);
CreateAssessment(String, Assessment, CallSettings)
public virtual Assessment CreateAssessment(string parent, Assessment assessment, CallSettings callSettings = null)
Creates an Assessment of the likelihood an event is legitimate.
Parameters | |
---|---|
Name | Description |
parent | String Required. The name of the project in which the assessment will be created, in the format "projects/{project}". |
assessment | Assessment Required. The assessment details. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Assessment | The RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
Assessment assessment = new Assessment();
// Make the request
Assessment response = recaptchaEnterpriseServiceClient.CreateAssessment(parent, assessment);
CreateAssessmentAsync(ProjectName, Assessment, CallSettings)
public virtual Task<Assessment> CreateAssessmentAsync(ProjectName parent, Assessment assessment, CallSettings callSettings = null)
Creates an Assessment of the likelihood an event is legitimate.
Parameters | |
---|---|
Name | Description |
parent | ProjectName Required. The name of the project in which the assessment will be created, in the format "projects/{project}". |
assessment | Assessment Required. The assessment details. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Assessment> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
Assessment assessment = new Assessment();
// Make the request
Assessment response = await recaptchaEnterpriseServiceClient.CreateAssessmentAsync(parent, assessment);
CreateAssessmentAsync(ProjectName, Assessment, CancellationToken)
public virtual Task<Assessment> CreateAssessmentAsync(ProjectName parent, Assessment assessment, CancellationToken cancellationToken)
Creates an Assessment of the likelihood an event is legitimate.
Parameters | |
---|---|
Name | Description |
parent | ProjectName Required. The name of the project in which the assessment will be created, in the format "projects/{project}". |
assessment | Assessment Required. The assessment details. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Assessment> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
Assessment assessment = new Assessment();
// Make the request
Assessment response = await recaptchaEnterpriseServiceClient.CreateAssessmentAsync(parent, assessment);
CreateAssessmentAsync(CreateAssessmentRequest, CallSettings)
public virtual Task<Assessment> CreateAssessmentAsync(CreateAssessmentRequest request, CallSettings callSettings = null)
Creates an Assessment of the likelihood an event is legitimate.
Parameters | |
---|---|
Name | Description |
request | CreateAssessmentRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Assessment> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
CreateAssessmentRequest request = new CreateAssessmentRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Assessment = new Assessment(),
};
// Make the request
Assessment response = await recaptchaEnterpriseServiceClient.CreateAssessmentAsync(request);
CreateAssessmentAsync(CreateAssessmentRequest, CancellationToken)
public virtual Task<Assessment> CreateAssessmentAsync(CreateAssessmentRequest request, CancellationToken cancellationToken)
Creates an Assessment of the likelihood an event is legitimate.
Parameters | |
---|---|
Name | Description |
request | CreateAssessmentRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Assessment> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
CreateAssessmentRequest request = new CreateAssessmentRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Assessment = new Assessment(),
};
// Make the request
Assessment response = await recaptchaEnterpriseServiceClient.CreateAssessmentAsync(request);
CreateAssessmentAsync(String, Assessment, CallSettings)
public virtual Task<Assessment> CreateAssessmentAsync(string parent, Assessment assessment, CallSettings callSettings = null)
Creates an Assessment of the likelihood an event is legitimate.
Parameters | |
---|---|
Name | Description |
parent | String Required. The name of the project in which the assessment will be created, in the format "projects/{project}". |
assessment | Assessment Required. The assessment details. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Assessment> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
Assessment assessment = new Assessment();
// Make the request
Assessment response = await recaptchaEnterpriseServiceClient.CreateAssessmentAsync(parent, assessment);
CreateAssessmentAsync(String, Assessment, CancellationToken)
public virtual Task<Assessment> CreateAssessmentAsync(string parent, Assessment assessment, CancellationToken cancellationToken)
Creates an Assessment of the likelihood an event is legitimate.
Parameters | |
---|---|
Name | Description |
parent | String Required. The name of the project in which the assessment will be created, in the format "projects/{project}". |
assessment | Assessment Required. The assessment details. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Assessment> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
Assessment assessment = new Assessment();
// Make the request
Assessment response = await recaptchaEnterpriseServiceClient.CreateAssessmentAsync(parent, assessment);
CreateAsync(CancellationToken)
public static Task<RecaptchaEnterpriseServiceClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a RecaptchaEnterpriseServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use RecaptchaEnterpriseServiceClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
Task<RecaptchaEnterpriseServiceClient> | The task representing the created RecaptchaEnterpriseServiceClient. |
CreateKey(CreateKeyRequest, CallSettings)
public virtual Key CreateKey(CreateKeyRequest request, CallSettings callSettings = null)
Creates a new reCAPTCHA Enterprise key.
Parameters | |
---|---|
Name | Description |
request | CreateKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Key | The RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
CreateKeyRequest request = new CreateKeyRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Key = new Key(),
};
// Make the request
Key response = recaptchaEnterpriseServiceClient.CreateKey(request);
CreateKeyAsync(CreateKeyRequest, CallSettings)
public virtual Task<Key> CreateKeyAsync(CreateKeyRequest request, CallSettings callSettings = null)
Creates a new reCAPTCHA Enterprise key.
Parameters | |
---|---|
Name | Description |
request | CreateKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Key> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
CreateKeyRequest request = new CreateKeyRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Key = new Key(),
};
// Make the request
Key response = await recaptchaEnterpriseServiceClient.CreateKeyAsync(request);
CreateKeyAsync(CreateKeyRequest, CancellationToken)
public virtual Task<Key> CreateKeyAsync(CreateKeyRequest request, CancellationToken cancellationToken)
Creates a new reCAPTCHA Enterprise key.
Parameters | |
---|---|
Name | Description |
request | CreateKeyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Key> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
CreateKeyRequest request = new CreateKeyRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
Key = new Key(),
};
// Make the request
Key response = await recaptchaEnterpriseServiceClient.CreateKeyAsync(request);
DeleteKey(DeleteKeyRequest, CallSettings)
public virtual void DeleteKey(DeleteKeyRequest request, CallSettings callSettings = null)
Deletes the specified key.
Parameters | |
---|---|
Name | Description |
request | DeleteKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
DeleteKeyRequest request = new DeleteKeyRequest
{
KeyName = KeyName.FromProjectKey("[PROJECT]", "[KEY]"),
};
// Make the request
recaptchaEnterpriseServiceClient.DeleteKey(request);
DeleteKeyAsync(DeleteKeyRequest, CallSettings)
public virtual Task DeleteKeyAsync(DeleteKeyRequest request, CallSettings callSettings = null)
Deletes the specified key.
Parameters | |
---|---|
Name | Description |
request | DeleteKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteKeyRequest request = new DeleteKeyRequest
{
KeyName = KeyName.FromProjectKey("[PROJECT]", "[KEY]"),
};
// Make the request
await recaptchaEnterpriseServiceClient.DeleteKeyAsync(request);
DeleteKeyAsync(DeleteKeyRequest, CancellationToken)
public virtual Task DeleteKeyAsync(DeleteKeyRequest request, CancellationToken cancellationToken)
Deletes the specified key.
Parameters | |
---|---|
Name | Description |
request | DeleteKeyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteKeyRequest request = new DeleteKeyRequest
{
KeyName = KeyName.FromProjectKey("[PROJECT]", "[KEY]"),
};
// Make the request
await recaptchaEnterpriseServiceClient.DeleteKeyAsync(request);
GetKey(GetKeyRequest, CallSettings)
public virtual Key GetKey(GetKeyRequest request, CallSettings callSettings = null)
Returns the specified key.
Parameters | |
---|---|
Name | Description |
request | GetKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Key | The RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
GetKeyRequest request = new GetKeyRequest
{
KeyName = KeyName.FromProjectKey("[PROJECT]", "[KEY]"),
};
// Make the request
Key response = recaptchaEnterpriseServiceClient.GetKey(request);
GetKeyAsync(GetKeyRequest, CallSettings)
public virtual Task<Key> GetKeyAsync(GetKeyRequest request, CallSettings callSettings = null)
Returns the specified key.
Parameters | |
---|---|
Name | Description |
request | GetKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Key> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
GetKeyRequest request = new GetKeyRequest
{
KeyName = KeyName.FromProjectKey("[PROJECT]", "[KEY]"),
};
// Make the request
Key response = await recaptchaEnterpriseServiceClient.GetKeyAsync(request);
GetKeyAsync(GetKeyRequest, CancellationToken)
public virtual Task<Key> GetKeyAsync(GetKeyRequest request, CancellationToken cancellationToken)
Returns the specified key.
Parameters | |
---|---|
Name | Description |
request | GetKeyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Key> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
GetKeyRequest request = new GetKeyRequest
{
KeyName = KeyName.FromProjectKey("[PROJECT]", "[KEY]"),
};
// Make the request
Key response = await recaptchaEnterpriseServiceClient.GetKeyAsync(request);
GetMetrics(GetMetricsRequest, CallSettings)
public virtual Metrics GetMetrics(GetMetricsRequest request, CallSettings callSettings = null)
Get some aggregated metrics for a Key. This data can be used to build dashboards.
Parameters | |
---|---|
Name | Description |
request | GetMetricsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Metrics | The RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
GetMetricsRequest request = new GetMetricsRequest
{
MetricsName = MetricsName.FromProjectKey("[PROJECT]", "[KEY]"),
};
// Make the request
Metrics response = recaptchaEnterpriseServiceClient.GetMetrics(request);
GetMetrics(MetricsName, CallSettings)
public virtual Metrics GetMetrics(MetricsName name, CallSettings callSettings = null)
Get some aggregated metrics for a Key. This data can be used to build dashboards.
Parameters | |
---|---|
Name | Description |
name | MetricsName Required. The name of the requested metrics, in the format "projects/{project}/keys/{key}/metrics". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Metrics | The RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
MetricsName name = MetricsName.FromProjectKey("[PROJECT]", "[KEY]");
// Make the request
Metrics response = recaptchaEnterpriseServiceClient.GetMetrics(name);
GetMetrics(String, CallSettings)
public virtual Metrics GetMetrics(string name, CallSettings callSettings = null)
Get some aggregated metrics for a Key. This data can be used to build dashboards.
Parameters | |
---|---|
Name | Description |
name | String Required. The name of the requested metrics, in the format "projects/{project}/keys/{key}/metrics". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Metrics | The RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/keys/[KEY]/metrics";
// Make the request
Metrics response = recaptchaEnterpriseServiceClient.GetMetrics(name);
GetMetricsAsync(GetMetricsRequest, CallSettings)
public virtual Task<Metrics> GetMetricsAsync(GetMetricsRequest request, CallSettings callSettings = null)
Get some aggregated metrics for a Key. This data can be used to build dashboards.
Parameters | |
---|---|
Name | Description |
request | GetMetricsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Metrics> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
GetMetricsRequest request = new GetMetricsRequest
{
MetricsName = MetricsName.FromProjectKey("[PROJECT]", "[KEY]"),
};
// Make the request
Metrics response = await recaptchaEnterpriseServiceClient.GetMetricsAsync(request);
GetMetricsAsync(GetMetricsRequest, CancellationToken)
public virtual Task<Metrics> GetMetricsAsync(GetMetricsRequest request, CancellationToken cancellationToken)
Get some aggregated metrics for a Key. This data can be used to build dashboards.
Parameters | |
---|---|
Name | Description |
request | GetMetricsRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Metrics> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
GetMetricsRequest request = new GetMetricsRequest
{
MetricsName = MetricsName.FromProjectKey("[PROJECT]", "[KEY]"),
};
// Make the request
Metrics response = await recaptchaEnterpriseServiceClient.GetMetricsAsync(request);
GetMetricsAsync(MetricsName, CallSettings)
public virtual Task<Metrics> GetMetricsAsync(MetricsName name, CallSettings callSettings = null)
Get some aggregated metrics for a Key. This data can be used to build dashboards.
Parameters | |
---|---|
Name | Description |
name | MetricsName Required. The name of the requested metrics, in the format "projects/{project}/keys/{key}/metrics". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Metrics> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
MetricsName name = MetricsName.FromProjectKey("[PROJECT]", "[KEY]");
// Make the request
Metrics response = await recaptchaEnterpriseServiceClient.GetMetricsAsync(name);
GetMetricsAsync(MetricsName, CancellationToken)
public virtual Task<Metrics> GetMetricsAsync(MetricsName name, CancellationToken cancellationToken)
Get some aggregated metrics for a Key. This data can be used to build dashboards.
Parameters | |
---|---|
Name | Description |
name | MetricsName Required. The name of the requested metrics, in the format "projects/{project}/keys/{key}/metrics". |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Metrics> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
MetricsName name = MetricsName.FromProjectKey("[PROJECT]", "[KEY]");
// Make the request
Metrics response = await recaptchaEnterpriseServiceClient.GetMetricsAsync(name);
GetMetricsAsync(String, CallSettings)
public virtual Task<Metrics> GetMetricsAsync(string name, CallSettings callSettings = null)
Get some aggregated metrics for a Key. This data can be used to build dashboards.
Parameters | |
---|---|
Name | Description |
name | String Required. The name of the requested metrics, in the format "projects/{project}/keys/{key}/metrics". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Metrics> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/keys/[KEY]/metrics";
// Make the request
Metrics response = await recaptchaEnterpriseServiceClient.GetMetricsAsync(name);
GetMetricsAsync(String, CancellationToken)
public virtual Task<Metrics> GetMetricsAsync(string name, CancellationToken cancellationToken)
Get some aggregated metrics for a Key. This data can be used to build dashboards.
Parameters | |
---|---|
Name | Description |
name | String Required. The name of the requested metrics, in the format "projects/{project}/keys/{key}/metrics". |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Metrics> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/keys/[KEY]/metrics";
// Make the request
Metrics response = await recaptchaEnterpriseServiceClient.GetMetricsAsync(name);
ListKeys(ListKeysRequest, CallSettings)
public virtual PagedEnumerable<ListKeysResponse, Key> ListKeys(ListKeysRequest request, CallSettings callSettings = null)
Returns the list of all keys that belong to a project.
Parameters | |
---|---|
Name | Description |
request | ListKeysRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListKeysResponse, Key> | A pageable sequence of Key resources. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
ListKeysRequest request = new ListKeysRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedEnumerable<ListKeysResponse, Key> response = recaptchaEnterpriseServiceClient.ListKeys(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Key item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListKeysResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Key item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Key> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Key item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListKeysAsync(ListKeysRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListKeysResponse, Key> ListKeysAsync(ListKeysRequest request, CallSettings callSettings = null)
Returns the list of all keys that belong to a project.
Parameters | |
---|---|
Name | Description |
request | ListKeysRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListKeysResponse, Key> | A pageable asynchronous sequence of Key resources. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
ListKeysRequest request = new ListKeysRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedAsyncEnumerable<ListKeysResponse, Key> response = recaptchaEnterpriseServiceClient.ListKeysAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Key item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListKeysResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Key item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Key> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Key item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRelatedAccountGroupMemberships(ListRelatedAccountGroupMembershipsRequest, CallSettings)
public virtual PagedEnumerable<ListRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> ListRelatedAccountGroupMemberships(ListRelatedAccountGroupMembershipsRequest request, CallSettings callSettings = null)
Get memberships in a group of related accounts.
Parameters | |
---|---|
Name | Description |
request | ListRelatedAccountGroupMembershipsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> | A pageable sequence of RelatedAccountGroupMembership resources. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
ListRelatedAccountGroupMembershipsRequest request = new ListRelatedAccountGroupMembershipsRequest
{
ParentAsRelatedAccountGroupName = RelatedAccountGroupName.FromProjectRelatedaccountgroup("[PROJECT]", "[RELATEDACCOUNTGROUP]"),
};
// Make the request
PagedEnumerable<ListRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> response = recaptchaEnterpriseServiceClient.ListRelatedAccountGroupMemberships(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (RelatedAccountGroupMembership item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListRelatedAccountGroupMembershipsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RelatedAccountGroupMembership item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RelatedAccountGroupMembership> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RelatedAccountGroupMembership item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRelatedAccountGroupMemberships(RelatedAccountGroupName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> ListRelatedAccountGroupMemberships(RelatedAccountGroupName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Get memberships in a group of related accounts.
Parameters | |
---|---|
Name | Description |
parent | RelatedAccountGroupName Required. The resource name for the related account group in the format
|
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> | A pageable sequence of RelatedAccountGroupMembership resources. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
RelatedAccountGroupName parent = RelatedAccountGroupName.FromProjectRelatedaccountgroup("[PROJECT]", "[RELATEDACCOUNTGROUP]");
// Make the request
PagedEnumerable<ListRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> response = recaptchaEnterpriseServiceClient.ListRelatedAccountGroupMemberships(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (RelatedAccountGroupMembership item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListRelatedAccountGroupMembershipsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RelatedAccountGroupMembership item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RelatedAccountGroupMembership> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RelatedAccountGroupMembership item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRelatedAccountGroupMemberships(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> ListRelatedAccountGroupMemberships(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Get memberships in a group of related accounts.
Parameters | |
---|---|
Name | Description |
parent | String Required. The resource name for the related account group in the format
|
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> | A pageable sequence of RelatedAccountGroupMembership resources. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/relatedaccountgroups/[RELATEDACCOUNTGROUP]";
// Make the request
PagedEnumerable<ListRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> response = recaptchaEnterpriseServiceClient.ListRelatedAccountGroupMemberships(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (RelatedAccountGroupMembership item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListRelatedAccountGroupMembershipsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RelatedAccountGroupMembership item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RelatedAccountGroupMembership> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RelatedAccountGroupMembership item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRelatedAccountGroupMembershipsAsync(ListRelatedAccountGroupMembershipsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> ListRelatedAccountGroupMembershipsAsync(ListRelatedAccountGroupMembershipsRequest request, CallSettings callSettings = null)
Get memberships in a group of related accounts.
Parameters | |
---|---|
Name | Description |
request | ListRelatedAccountGroupMembershipsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> | A pageable asynchronous sequence of RelatedAccountGroupMembership resources. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
ListRelatedAccountGroupMembershipsRequest request = new ListRelatedAccountGroupMembershipsRequest
{
ParentAsRelatedAccountGroupName = RelatedAccountGroupName.FromProjectRelatedaccountgroup("[PROJECT]", "[RELATEDACCOUNTGROUP]"),
};
// Make the request
PagedAsyncEnumerable<ListRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> response = recaptchaEnterpriseServiceClient.ListRelatedAccountGroupMembershipsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((RelatedAccountGroupMembership item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListRelatedAccountGroupMembershipsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RelatedAccountGroupMembership item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RelatedAccountGroupMembership> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RelatedAccountGroupMembership item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRelatedAccountGroupMembershipsAsync(RelatedAccountGroupName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> ListRelatedAccountGroupMembershipsAsync(RelatedAccountGroupName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Get memberships in a group of related accounts.
Parameters | |
---|---|
Name | Description |
parent | RelatedAccountGroupName Required. The resource name for the related account group in the format
|
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> | A pageable asynchronous sequence of RelatedAccountGroupMembership resources. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
RelatedAccountGroupName parent = RelatedAccountGroupName.FromProjectRelatedaccountgroup("[PROJECT]", "[RELATEDACCOUNTGROUP]");
// Make the request
PagedAsyncEnumerable<ListRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> response = recaptchaEnterpriseServiceClient.ListRelatedAccountGroupMembershipsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((RelatedAccountGroupMembership item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListRelatedAccountGroupMembershipsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RelatedAccountGroupMembership item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RelatedAccountGroupMembership> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RelatedAccountGroupMembership item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRelatedAccountGroupMembershipsAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> ListRelatedAccountGroupMembershipsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Get memberships in a group of related accounts.
Parameters | |
---|---|
Name | Description |
parent | String Required. The resource name for the related account group in the format
|
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> | A pageable asynchronous sequence of RelatedAccountGroupMembership resources. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/relatedaccountgroups/[RELATEDACCOUNTGROUP]";
// Make the request
PagedAsyncEnumerable<ListRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> response = recaptchaEnterpriseServiceClient.ListRelatedAccountGroupMembershipsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((RelatedAccountGroupMembership item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListRelatedAccountGroupMembershipsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RelatedAccountGroupMembership item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RelatedAccountGroupMembership> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RelatedAccountGroupMembership item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRelatedAccountGroups(ProjectName, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListRelatedAccountGroupsResponse, RelatedAccountGroup> ListRelatedAccountGroups(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List groups of related accounts.
Parameters | |
---|---|
Name | Description |
parent | ProjectName Required. The name of the project to list related account groups from, in the format "projects/{project}". |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListRelatedAccountGroupsResponse, RelatedAccountGroup> | A pageable sequence of RelatedAccountGroup resources. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedEnumerable<ListRelatedAccountGroupsResponse, RelatedAccountGroup> response = recaptchaEnterpriseServiceClient.ListRelatedAccountGroups(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (RelatedAccountGroup item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListRelatedAccountGroupsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RelatedAccountGroup item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RelatedAccountGroup> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RelatedAccountGroup item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRelatedAccountGroups(ListRelatedAccountGroupsRequest, CallSettings)
public virtual PagedEnumerable<ListRelatedAccountGroupsResponse, RelatedAccountGroup> ListRelatedAccountGroups(ListRelatedAccountGroupsRequest request, CallSettings callSettings = null)
List groups of related accounts.
Parameters | |
---|---|
Name | Description |
request | ListRelatedAccountGroupsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListRelatedAccountGroupsResponse, RelatedAccountGroup> | A pageable sequence of RelatedAccountGroup resources. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
ListRelatedAccountGroupsRequest request = new ListRelatedAccountGroupsRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedEnumerable<ListRelatedAccountGroupsResponse, RelatedAccountGroup> response = recaptchaEnterpriseServiceClient.ListRelatedAccountGroups(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (RelatedAccountGroup item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListRelatedAccountGroupsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RelatedAccountGroup item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RelatedAccountGroup> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RelatedAccountGroup item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRelatedAccountGroups(String, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListRelatedAccountGroupsResponse, RelatedAccountGroup> ListRelatedAccountGroups(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List groups of related accounts.
Parameters | |
---|---|
Name | Description |
parent | String Required. The name of the project to list related account groups from, in the format "projects/{project}". |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListRelatedAccountGroupsResponse, RelatedAccountGroup> | A pageable sequence of RelatedAccountGroup resources. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedEnumerable<ListRelatedAccountGroupsResponse, RelatedAccountGroup> response = recaptchaEnterpriseServiceClient.ListRelatedAccountGroups(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (RelatedAccountGroup item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListRelatedAccountGroupsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RelatedAccountGroup item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RelatedAccountGroup> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RelatedAccountGroup item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRelatedAccountGroupsAsync(ProjectName, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListRelatedAccountGroupsResponse, RelatedAccountGroup> ListRelatedAccountGroupsAsync(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List groups of related accounts.
Parameters | |
---|---|
Name | Description |
parent | ProjectName Required. The name of the project to list related account groups from, in the format "projects/{project}". |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListRelatedAccountGroupsResponse, RelatedAccountGroup> | A pageable asynchronous sequence of RelatedAccountGroup resources. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedAsyncEnumerable<ListRelatedAccountGroupsResponse, RelatedAccountGroup> response = recaptchaEnterpriseServiceClient.ListRelatedAccountGroupsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((RelatedAccountGroup item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListRelatedAccountGroupsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RelatedAccountGroup item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RelatedAccountGroup> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RelatedAccountGroup item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRelatedAccountGroupsAsync(ListRelatedAccountGroupsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListRelatedAccountGroupsResponse, RelatedAccountGroup> ListRelatedAccountGroupsAsync(ListRelatedAccountGroupsRequest request, CallSettings callSettings = null)
List groups of related accounts.
Parameters | |
---|---|
Name | Description |
request | ListRelatedAccountGroupsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListRelatedAccountGroupsResponse, RelatedAccountGroup> | A pageable asynchronous sequence of RelatedAccountGroup resources. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
ListRelatedAccountGroupsRequest request = new ListRelatedAccountGroupsRequest
{
ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedAsyncEnumerable<ListRelatedAccountGroupsResponse, RelatedAccountGroup> response = recaptchaEnterpriseServiceClient.ListRelatedAccountGroupsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((RelatedAccountGroup item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListRelatedAccountGroupsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RelatedAccountGroup item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RelatedAccountGroup> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RelatedAccountGroup item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListRelatedAccountGroupsAsync(String, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListRelatedAccountGroupsResponse, RelatedAccountGroup> ListRelatedAccountGroupsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
List groups of related accounts.
Parameters | |
---|---|
Name | Description |
parent | String Required. The name of the project to list related account groups from, in the format "projects/{project}". |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListRelatedAccountGroupsResponse, RelatedAccountGroup> | A pageable asynchronous sequence of RelatedAccountGroup resources. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedAsyncEnumerable<ListRelatedAccountGroupsResponse, RelatedAccountGroup> response = recaptchaEnterpriseServiceClient.ListRelatedAccountGroupsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((RelatedAccountGroup item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListRelatedAccountGroupsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RelatedAccountGroup item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RelatedAccountGroup> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RelatedAccountGroup item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
MigrateKey(MigrateKeyRequest, CallSettings)
public virtual Key MigrateKey(MigrateKeyRequest request, CallSettings callSettings = null)
Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise. Once a key is migrated, it can be used from either product. SiteVerify requests are billed as CreateAssessment calls. You must be authenticated as one of the current owners of the reCAPTCHA Site Key, and your user must have the reCAPTCHA Enterprise Admin IAM role in the destination project.
Parameters | |
---|---|
Name | Description |
request | MigrateKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Key | The RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
MigrateKeyRequest request = new MigrateKeyRequest
{
KeyName = KeyName.FromProjectKey("[PROJECT]", "[KEY]"),
SkipBillingCheck = false,
};
// Make the request
Key response = recaptchaEnterpriseServiceClient.MigrateKey(request);
MigrateKeyAsync(MigrateKeyRequest, CallSettings)
public virtual Task<Key> MigrateKeyAsync(MigrateKeyRequest request, CallSettings callSettings = null)
Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise. Once a key is migrated, it can be used from either product. SiteVerify requests are billed as CreateAssessment calls. You must be authenticated as one of the current owners of the reCAPTCHA Site Key, and your user must have the reCAPTCHA Enterprise Admin IAM role in the destination project.
Parameters | |
---|---|
Name | Description |
request | MigrateKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Key> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
MigrateKeyRequest request = new MigrateKeyRequest
{
KeyName = KeyName.FromProjectKey("[PROJECT]", "[KEY]"),
SkipBillingCheck = false,
};
// Make the request
Key response = await recaptchaEnterpriseServiceClient.MigrateKeyAsync(request);
MigrateKeyAsync(MigrateKeyRequest, CancellationToken)
public virtual Task<Key> MigrateKeyAsync(MigrateKeyRequest request, CancellationToken cancellationToken)
Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise. Once a key is migrated, it can be used from either product. SiteVerify requests are billed as CreateAssessment calls. You must be authenticated as one of the current owners of the reCAPTCHA Site Key, and your user must have the reCAPTCHA Enterprise Admin IAM role in the destination project.
Parameters | |
---|---|
Name | Description |
request | MigrateKeyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Key> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
MigrateKeyRequest request = new MigrateKeyRequest
{
KeyName = KeyName.FromProjectKey("[PROJECT]", "[KEY]"),
SkipBillingCheck = false,
};
// Make the request
Key response = await recaptchaEnterpriseServiceClient.MigrateKeyAsync(request);
RetrieveLegacySecretKey(KeyName, CallSettings)
public virtual RetrieveLegacySecretKeyResponse RetrieveLegacySecretKey(KeyName key, CallSettings callSettings = null)
Returns the secret key related to the specified public key. You must use the legacy secret key only in a 3rd party integration with legacy reCAPTCHA.
Parameters | |
---|---|
Name | Description |
key | KeyName Required. The public key name linked to the requested secret key in the format "projects/{project}/keys/{key}". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
RetrieveLegacySecretKeyResponse | The RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
KeyName key = KeyName.FromProjectKey("[PROJECT]", "[KEY]");
// Make the request
RetrieveLegacySecretKeyResponse response = recaptchaEnterpriseServiceClient.RetrieveLegacySecretKey(key);
RetrieveLegacySecretKey(RetrieveLegacySecretKeyRequest, CallSettings)
public virtual RetrieveLegacySecretKeyResponse RetrieveLegacySecretKey(RetrieveLegacySecretKeyRequest request, CallSettings callSettings = null)
Returns the secret key related to the specified public key. You must use the legacy secret key only in a 3rd party integration with legacy reCAPTCHA.
Parameters | |
---|---|
Name | Description |
request | RetrieveLegacySecretKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
RetrieveLegacySecretKeyResponse | The RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
RetrieveLegacySecretKeyRequest request = new RetrieveLegacySecretKeyRequest
{
KeyAsKeyName = KeyName.FromProjectKey("[PROJECT]", "[KEY]"),
};
// Make the request
RetrieveLegacySecretKeyResponse response = recaptchaEnterpriseServiceClient.RetrieveLegacySecretKey(request);
RetrieveLegacySecretKey(String, CallSettings)
public virtual RetrieveLegacySecretKeyResponse RetrieveLegacySecretKey(string key, CallSettings callSettings = null)
Returns the secret key related to the specified public key. You must use the legacy secret key only in a 3rd party integration with legacy reCAPTCHA.
Parameters | |
---|---|
Name | Description |
key | String Required. The public key name linked to the requested secret key in the format "projects/{project}/keys/{key}". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
RetrieveLegacySecretKeyResponse | The RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
string key = "projects/[PROJECT]/keys/[KEY]";
// Make the request
RetrieveLegacySecretKeyResponse response = recaptchaEnterpriseServiceClient.RetrieveLegacySecretKey(key);
RetrieveLegacySecretKeyAsync(KeyName, CallSettings)
public virtual Task<RetrieveLegacySecretKeyResponse> RetrieveLegacySecretKeyAsync(KeyName key, CallSettings callSettings = null)
Returns the secret key related to the specified public key. You must use the legacy secret key only in a 3rd party integration with legacy reCAPTCHA.
Parameters | |
---|---|
Name | Description |
key | KeyName Required. The public key name linked to the requested secret key in the format "projects/{project}/keys/{key}". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<RetrieveLegacySecretKeyResponse> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
KeyName key = KeyName.FromProjectKey("[PROJECT]", "[KEY]");
// Make the request
RetrieveLegacySecretKeyResponse response = await recaptchaEnterpriseServiceClient.RetrieveLegacySecretKeyAsync(key);
RetrieveLegacySecretKeyAsync(KeyName, CancellationToken)
public virtual Task<RetrieveLegacySecretKeyResponse> RetrieveLegacySecretKeyAsync(KeyName key, CancellationToken cancellationToken)
Returns the secret key related to the specified public key. You must use the legacy secret key only in a 3rd party integration with legacy reCAPTCHA.
Parameters | |
---|---|
Name | Description |
key | KeyName Required. The public key name linked to the requested secret key in the format "projects/{project}/keys/{key}". |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<RetrieveLegacySecretKeyResponse> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
KeyName key = KeyName.FromProjectKey("[PROJECT]", "[KEY]");
// Make the request
RetrieveLegacySecretKeyResponse response = await recaptchaEnterpriseServiceClient.RetrieveLegacySecretKeyAsync(key);
RetrieveLegacySecretKeyAsync(RetrieveLegacySecretKeyRequest, CallSettings)
public virtual Task<RetrieveLegacySecretKeyResponse> RetrieveLegacySecretKeyAsync(RetrieveLegacySecretKeyRequest request, CallSettings callSettings = null)
Returns the secret key related to the specified public key. You must use the legacy secret key only in a 3rd party integration with legacy reCAPTCHA.
Parameters | |
---|---|
Name | Description |
request | RetrieveLegacySecretKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<RetrieveLegacySecretKeyResponse> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
RetrieveLegacySecretKeyRequest request = new RetrieveLegacySecretKeyRequest
{
KeyAsKeyName = KeyName.FromProjectKey("[PROJECT]", "[KEY]"),
};
// Make the request
RetrieveLegacySecretKeyResponse response = await recaptchaEnterpriseServiceClient.RetrieveLegacySecretKeyAsync(request);
RetrieveLegacySecretKeyAsync(RetrieveLegacySecretKeyRequest, CancellationToken)
public virtual Task<RetrieveLegacySecretKeyResponse> RetrieveLegacySecretKeyAsync(RetrieveLegacySecretKeyRequest request, CancellationToken cancellationToken)
Returns the secret key related to the specified public key. You must use the legacy secret key only in a 3rd party integration with legacy reCAPTCHA.
Parameters | |
---|---|
Name | Description |
request | RetrieveLegacySecretKeyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<RetrieveLegacySecretKeyResponse> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
RetrieveLegacySecretKeyRequest request = new RetrieveLegacySecretKeyRequest
{
KeyAsKeyName = KeyName.FromProjectKey("[PROJECT]", "[KEY]"),
};
// Make the request
RetrieveLegacySecretKeyResponse response = await recaptchaEnterpriseServiceClient.RetrieveLegacySecretKeyAsync(request);
RetrieveLegacySecretKeyAsync(String, CallSettings)
public virtual Task<RetrieveLegacySecretKeyResponse> RetrieveLegacySecretKeyAsync(string key, CallSettings callSettings = null)
Returns the secret key related to the specified public key. You must use the legacy secret key only in a 3rd party integration with legacy reCAPTCHA.
Parameters | |
---|---|
Name | Description |
key | String Required. The public key name linked to the requested secret key in the format "projects/{project}/keys/{key}". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<RetrieveLegacySecretKeyResponse> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
string key = "projects/[PROJECT]/keys/[KEY]";
// Make the request
RetrieveLegacySecretKeyResponse response = await recaptchaEnterpriseServiceClient.RetrieveLegacySecretKeyAsync(key);
RetrieveLegacySecretKeyAsync(String, CancellationToken)
public virtual Task<RetrieveLegacySecretKeyResponse> RetrieveLegacySecretKeyAsync(string key, CancellationToken cancellationToken)
Returns the secret key related to the specified public key. You must use the legacy secret key only in a 3rd party integration with legacy reCAPTCHA.
Parameters | |
---|---|
Name | Description |
key | String Required. The public key name linked to the requested secret key in the format "projects/{project}/keys/{key}". |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<RetrieveLegacySecretKeyResponse> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
string key = "projects/[PROJECT]/keys/[KEY]";
// Make the request
RetrieveLegacySecretKeyResponse response = await recaptchaEnterpriseServiceClient.RetrieveLegacySecretKeyAsync(key);
SearchRelatedAccountGroupMemberships(RelatedAccountGroupName, ByteString, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<SearchRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> SearchRelatedAccountGroupMemberships(RelatedAccountGroupName project, ByteString hashedAccountId, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Search group memberships related to a given account.
Parameters | |
---|---|
Name | Description |
project | RelatedAccountGroupName Required. The name of the project to search related account group memberships from. Specify the project name in the following format: "projects/{project}". |
hashedAccountId | ByteString Optional. The unique stable hashed user identifier we should search
connections to. The identifier should correspond to a |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<SearchRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> | A pageable sequence of RelatedAccountGroupMembership resources. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
RelatedAccountGroupName project = RelatedAccountGroupName.FromProjectRelatedaccountgroup("[PROJECT]", "[RELATEDACCOUNTGROUP]");
ByteString hashedAccountId = ByteString.Empty;
// Make the request
PagedEnumerable<SearchRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> response = recaptchaEnterpriseServiceClient.SearchRelatedAccountGroupMemberships(project, hashedAccountId);
// Iterate over all response items, lazily performing RPCs as required
foreach (RelatedAccountGroupMembership item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (SearchRelatedAccountGroupMembershipsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RelatedAccountGroupMembership item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RelatedAccountGroupMembership> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RelatedAccountGroupMembership item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
SearchRelatedAccountGroupMemberships(SearchRelatedAccountGroupMembershipsRequest, CallSettings)
public virtual PagedEnumerable<SearchRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> SearchRelatedAccountGroupMemberships(SearchRelatedAccountGroupMembershipsRequest request, CallSettings callSettings = null)
Search group memberships related to a given account.
Parameters | |
---|---|
Name | Description |
request | SearchRelatedAccountGroupMembershipsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<SearchRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> | A pageable sequence of RelatedAccountGroupMembership resources. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
SearchRelatedAccountGroupMembershipsRequest request = new SearchRelatedAccountGroupMembershipsRequest
{
ProjectAsRelatedAccountGroupName = RelatedAccountGroupName.FromProjectRelatedaccountgroup("[PROJECT]", "[RELATEDACCOUNTGROUP]"),
HashedAccountId = ByteString.Empty,
};
// Make the request
PagedEnumerable<SearchRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> response = recaptchaEnterpriseServiceClient.SearchRelatedAccountGroupMemberships(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (RelatedAccountGroupMembership item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (SearchRelatedAccountGroupMembershipsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RelatedAccountGroupMembership item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RelatedAccountGroupMembership> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RelatedAccountGroupMembership item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
SearchRelatedAccountGroupMemberships(String, ByteString, String, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<SearchRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> SearchRelatedAccountGroupMemberships(string project, ByteString hashedAccountId, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Search group memberships related to a given account.
Parameters | |
---|---|
Name | Description |
project | String Required. The name of the project to search related account group memberships from. Specify the project name in the following format: "projects/{project}". |
hashedAccountId | ByteString Optional. The unique stable hashed user identifier we should search
connections to. The identifier should correspond to a |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<SearchRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> | A pageable sequence of RelatedAccountGroupMembership resources. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
string project = "projects/[PROJECT]/relatedaccountgroups/[RELATEDACCOUNTGROUP]";
ByteString hashedAccountId = ByteString.Empty;
// Make the request
PagedEnumerable<SearchRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> response = recaptchaEnterpriseServiceClient.SearchRelatedAccountGroupMemberships(project, hashedAccountId);
// Iterate over all response items, lazily performing RPCs as required
foreach (RelatedAccountGroupMembership item in response)
{
// Do something with each item
Console.WriteLine(item);
}
// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (SearchRelatedAccountGroupMembershipsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RelatedAccountGroupMembership item in page)
{
// Do something with each item
Console.WriteLine(item);
}
}
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RelatedAccountGroupMembership> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RelatedAccountGroupMembership item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
SearchRelatedAccountGroupMembershipsAsync(RelatedAccountGroupName, ByteString, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<SearchRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> SearchRelatedAccountGroupMembershipsAsync(RelatedAccountGroupName project, ByteString hashedAccountId, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Search group memberships related to a given account.
Parameters | |
---|---|
Name | Description |
project | RelatedAccountGroupName Required. The name of the project to search related account group memberships from. Specify the project name in the following format: "projects/{project}". |
hashedAccountId | ByteString Optional. The unique stable hashed user identifier we should search
connections to. The identifier should correspond to a |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<SearchRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> | A pageable asynchronous sequence of RelatedAccountGroupMembership resources. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
RelatedAccountGroupName project = RelatedAccountGroupName.FromProjectRelatedaccountgroup("[PROJECT]", "[RELATEDACCOUNTGROUP]");
ByteString hashedAccountId = ByteString.Empty;
// Make the request
PagedAsyncEnumerable<SearchRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> response = recaptchaEnterpriseServiceClient.SearchRelatedAccountGroupMembershipsAsync(project, hashedAccountId);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((RelatedAccountGroupMembership item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((SearchRelatedAccountGroupMembershipsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RelatedAccountGroupMembership item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RelatedAccountGroupMembership> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RelatedAccountGroupMembership item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
SearchRelatedAccountGroupMembershipsAsync(SearchRelatedAccountGroupMembershipsRequest, CallSettings)
public virtual PagedAsyncEnumerable<SearchRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> SearchRelatedAccountGroupMembershipsAsync(SearchRelatedAccountGroupMembershipsRequest request, CallSettings callSettings = null)
Search group memberships related to a given account.
Parameters | |
---|---|
Name | Description |
request | SearchRelatedAccountGroupMembershipsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<SearchRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> | A pageable asynchronous sequence of RelatedAccountGroupMembership resources. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
SearchRelatedAccountGroupMembershipsRequest request = new SearchRelatedAccountGroupMembershipsRequest
{
ProjectAsRelatedAccountGroupName = RelatedAccountGroupName.FromProjectRelatedaccountgroup("[PROJECT]", "[RELATEDACCOUNTGROUP]"),
HashedAccountId = ByteString.Empty,
};
// Make the request
PagedAsyncEnumerable<SearchRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> response = recaptchaEnterpriseServiceClient.SearchRelatedAccountGroupMembershipsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((RelatedAccountGroupMembership item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((SearchRelatedAccountGroupMembershipsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RelatedAccountGroupMembership item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RelatedAccountGroupMembership> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RelatedAccountGroupMembership item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
SearchRelatedAccountGroupMembershipsAsync(String, ByteString, String, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<SearchRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> SearchRelatedAccountGroupMembershipsAsync(string project, ByteString hashedAccountId, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Search group memberships related to a given account.
Parameters | |
---|---|
Name | Description |
project | String Required. The name of the project to search related account group memberships from. Specify the project name in the following format: "projects/{project}". |
hashedAccountId | ByteString Optional. The unique stable hashed user identifier we should search
connections to. The identifier should correspond to a |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<SearchRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> | A pageable asynchronous sequence of RelatedAccountGroupMembership resources. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
string project = "projects/[PROJECT]/relatedaccountgroups/[RELATEDACCOUNTGROUP]";
ByteString hashedAccountId = ByteString.Empty;
// Make the request
PagedAsyncEnumerable<SearchRelatedAccountGroupMembershipsResponse, RelatedAccountGroupMembership> response = recaptchaEnterpriseServiceClient.SearchRelatedAccountGroupMembershipsAsync(project, hashedAccountId);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((RelatedAccountGroupMembership item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((SearchRelatedAccountGroupMembershipsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (RelatedAccountGroupMembership item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<RelatedAccountGroupMembership> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (RelatedAccountGroupMembership item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.
UpdateKey(UpdateKeyRequest, CallSettings)
public virtual Key UpdateKey(UpdateKeyRequest request, CallSettings callSettings = null)
Updates the specified key.
Parameters | |
---|---|
Name | Description |
request | UpdateKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Key | The RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = RecaptchaEnterpriseServiceClient.Create();
// Initialize request argument(s)
UpdateKeyRequest request = new UpdateKeyRequest
{
Key = new Key(),
UpdateMask = new FieldMask(),
};
// Make the request
Key response = recaptchaEnterpriseServiceClient.UpdateKey(request);
UpdateKeyAsync(UpdateKeyRequest, CallSettings)
public virtual Task<Key> UpdateKeyAsync(UpdateKeyRequest request, CallSettings callSettings = null)
Updates the specified key.
Parameters | |
---|---|
Name | Description |
request | UpdateKeyRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Key> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateKeyRequest request = new UpdateKeyRequest
{
Key = new Key(),
UpdateMask = new FieldMask(),
};
// Make the request
Key response = await recaptchaEnterpriseServiceClient.UpdateKeyAsync(request);
UpdateKeyAsync(UpdateKeyRequest, CancellationToken)
public virtual Task<Key> UpdateKeyAsync(UpdateKeyRequest request, CancellationToken cancellationToken)
Updates the specified key.
Parameters | |
---|---|
Name | Description |
request | UpdateKeyRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Key> | A Task containing the RPC response. |
// Create client
RecaptchaEnterpriseServiceClient recaptchaEnterpriseServiceClient = await RecaptchaEnterpriseServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateKeyRequest request = new UpdateKeyRequest
{
Key = new Key(),
UpdateMask = new FieldMask(),
};
// Make the request
Key response = await recaptchaEnterpriseServiceClient.UpdateKeyAsync(request);