/// <summary>Snippet for CreateAssessmentAsync</summary> public async Task CreateAssessmentAsync() { // Snippet: CreateAssessmentAsync(string, Assessment, CallSettings) // Additional: CreateAssessmentAsync(string, Assessment, CancellationToken) // 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); // End snippet }
/// <summary>Snippet for CreateAssessmentAsync</summary> public async Task CreateAssessmentResourceNamesAsync() { // Snippet: CreateAssessmentAsync(ProjectName, Assessment, CallSettings) // Additional: CreateAssessmentAsync(ProjectName, Assessment, CancellationToken) // 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); // End snippet }
/// <summary>Snippet for CreateAssessmentAsync</summary> public async Task CreateAssessmentRequestObjectAsync() { // Snippet: CreateAssessmentAsync(CreateAssessmentRequest, CallSettings) // Additional: CreateAssessmentAsync(CreateAssessmentRequest, CancellationToken) // 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); // End snippet }